diff --git a/cesium/Cesium.js b/cesium/Cesium.js index e6c315d..6d98e42 100644 --- a/cesium/Cesium.js +++ b/cesium/Cesium.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,7 +23,7 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -var Cesium=(()=>{var zSe=Object.create;var yM=Object.defineProperty;var KSe=Object.getOwnPropertyDescriptor;var JSe=Object.getOwnPropertyNames;var QSe=Object.getPrototypeOf,jSe=Object.prototype.hasOwnProperty;var xM=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ic=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qSe=(e,t)=>{for(var n in t)yM(e,n,{get:t[n],enumerable:!0})},z6=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of JSe(t))!jSe.call(e,o)&&o!==n&&yM(e,o,{get:()=>t[o],enumerable:!(i=KSe(t,o))||i.enumerable});return e};var T=(e,t,n)=>(n=e!=null?zSe(QSe(e)):{},z6(t||!e||!e.__esModule?yM(n,"default",{value:e,enumerable:!0}):n,e)),$Se=e=>z6(yM({},"__esModule",{value:!0}),e);var S=Ic(()=>{globalThis.CESIUM_WORKERS=atob("dmFyIENlc2l1bVdvcmtlcnM9KCgpPT57dmFyIHFTPU9iamVjdC5jcmVhdGU7dmFyIERsPU9iamVjdC5kZWZpbmVQcm9wZXJ0eTt2YXIgS1M9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcjt2YXIgV1M9T2JqZWN0LmdldE93blByb3BlcnR5TmFtZXM7dmFyIFhTPU9iamVjdC5nZXRQcm90b3R5cGVPZixZUz1PYmplY3QucHJvdG90eXBlLmhh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VjdCgibGVmdCIsdCkseS50eXBlT2Yub2JqZWN0KCJyaWdodCIsZSksdC54KmUueCt0LnkqZS55K3QueiplLnordC53KmUud307THQubXVsdGlwbHlDb21wb25lbnRzPWZ1bmN0aW9uKHQsZSxuKXtyZXR1cm4geS50eXBlT2Yub2JqZWN0KCJsZWZ0Iix0KSx5LnR5cGVPZi5vYmplY3QoInJpZ2h0IixlKSx5LnR5cGVPZi5vYmplY3QoInJlc3VsdCIsbiksbi54PXQueCplLngsbi55PXQueSplLnksbi56PXQueiplLnosbi53PXQudyplLncsbn07THQuZGl2aWRlQ29tcG9uZW50cz1mdW5jdGlvbih0LGUsbil7cmV0dXJuIHkudHlwZU9mLm9iamVjdCgibGVmdCIsdCkseS50eXBlT2Yub2JqZWN0KCJyaWdodCIsZSkseS50eXBlT2Yub2JqZWN0KCJyZXN1bHQiLG4pLG4ueD10LngvZS54LG4ueT10LnkvZS55LG4uej10LnovZS56LG4udz10LncvZS53LG59O0x0LmFkZD1mdW5jdGlvbih0LGUsbil7cmV0dXJuIHkudHlwZU9mLm9iamVjdCgibGVmdCIsdCkseS50eXBlT2Yub2JqZWN0KCJyaWdodCIsZSkseS50eXBlT2Yub2JqZWN0KCJyZXN1bHQiLG4pLG4ueD10LngrZS54LG4ueT10LnkrZS55LG4uej10LnorZS56LG4udz10LncrZS53LG59O0x0LnN1YnRyYWN0PWZ1bmN0aW9uKHQsZSxuKXtyZXR1cm4geS50eXBlT2Yub2JqZWN0KCJsZWZ0Iix0KSx5LnR5cGVPZi5vYmplY3QoInJpZ2h0IixlKSx5LnR5cGVPZi5vYmplY3QoInJlc3VsdCIsbiksbi54PXQueC1lLngsbi55PXQueS1lLnksbi56PXQuei1lLnosbi53PXQudy1lLncsbn07THQubXVsdGlwbHlCeVNjYWxhcj1mdW5jdGlvbih0LGUsbil7cmV0dXJuIHkudHlwZU9mLm9iamVjdCgiY2FydGVzaWFuIix0KSx5LnR5cGVPZi5udW1iZXIoInNjYWxhciIsZSkseS50e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WRMZW5ndGg9MTY7YnQucGFjaz1mdW5jdGlvbih0LGUsbil7cmV0dXJuIHkudHlwZU9mLm9iamVjdCgidmFsdWUiLHQpLHkuZGVmaW5lZCgiYXJyYXkiLGUpLG49eChuLDApLGVbbisrXT10WzBdLGVbbisrXT10WzFdLGVbbisrXT10WzJdLGVbbisrXT10WzNdLGVbbisrXT10WzRdLGVbbisrXT10WzVdLGVbbisrXT10WzZdLGVbbisrXT10WzddLGVbbisrXT10WzhdLGVbbisrXT10WzldLGVbbisrXT10WzEwXSxlW24rK109dFsxMV0sZVtuKytdPXRbMTJdLGVbbisrXT10WzEzXSxlW24rK109dFsxNF0sZVtuXT10WzE1XSxlfTtidC51bnBhY2s9ZnVuY3Rpb24odCxlLG4pe3JldHVybiB5LmRlZmluZWQoImFycmF5Iix0KSxlPXgoZSwwKSxoKG4pfHwobj1uZXcgYnQpLG5bMF09dFtlKytdLG5bMV09dFtlKytdLG5bMl09dFtlKytdLG5bM109dFtlKytdLG5bNF09dFtlKytdLG5bNV09dFtlKytdLG5bNl09dFtlKytdLG5bN109dFtlKytdLG5bOF09dFtlKytdLG5bOV09dFtlKytdLG5bMTBdPXRbZSsrXSxuWzExXT10W2UrK10sblsxMl09dFtlKytdLG5bMTNdPXRbZSsrXSxuWzE0XT10W2UrK10sblsxNV09dFtlXSxufTtidC5wYWNrQXJyYXk9ZnVuY3Rpb24odCxlKXt5LmRlZmluZWQoImFycmF5Iix0KTtsZXQgbj10Lmxlbmd0aCxvPW4qMTY7aWYoIWgoZSkpZT1uZXcgQXJyYXkobyk7ZWxzZXtpZighQXJyYXkuaXNBcnJheShlKSYmZS5sZW5ndGghPT1vKXRocm93IG5ldyBGKCJJZiByZXN1bHQgaXMgYSB0eXBlZCBhcnJheSwgaXQgbXVzdCBoYXZlIGV4YWN0bHkgYXJyYXkubGVuZ3RoICogMTYgZWxlbWVudHMiKTtlLmxlbmd0aCE9PW8mJihlLmxlbmd0aD1vKX1mb3IobGV0IHI9MDtyPG47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W5ldyBGbG9hdDY0QXJyYXkoNio0KjMpLHNbMF09ZS54LHNbMV09ZS55LHNbMl09bi56LHNbM109bi54LHNbNF09ZS55LHNbNV09bi56LHNbNl09bi54LHNbN109bi55LHNbOF09bi56LHNbOV09ZS54LHNbMTBdPW4ueSxzWzExXT1uLnosc1sxMl09ZS54LHNbMTNdPWUueSxzWzE0XT1lLnosc1sxNV09bi54LHNbMTZdPWUueSxzWzE3XT1lLnosc1sxOF09bi54LHNbMTldPW4ueSxzWzIwXT1lLnosc1syMV09ZS54LHNbMjJdPW4ueSxzWzIzXT1lLnosc1syNF09bi54LHNbMjVdPWUueSxzWzI2XT1lLnosc1syN109bi54LHNbMjhdPW4ueSxzWzI5XT1lLnosc1szMF09bi54LHNbMzFdPW4ueSxzWzMyXT1uLnosc1szM109bi54LHNbMzRdPWUueSxzWzM1XT1uLnosc1szNl09ZS54LHNbMzddPWUueSxzWzM4XT1lLnosc1szOV09ZS54LHNbNDBdPW4ueSxzWzQxXT1lLnosc1s0Ml09ZS54LHNbNDNdPW4ueSxzWzQ0XT1uLnosc1s0NV09ZS54LHNbNDZdPWUueSxzWzQ3XT1uLnosc1s0OF09ZS54LHNbNDldPW4ueSxzWzUwXT1lLnosc1s1MV09bi54LHNbNTJdPW4ueSxzWzUzXT1lLnosc1s1NF09bi54LHNbNTVdPW4ueSxzWzU2XT1uLnosc1s1N109ZS54LHNbNThdPW4ueSxzWzU5XT1uLnosc1s2MF09ZS54LHNbNjFdPWUueSxzWzYyXT1lLnosc1s2M109bi54LHNbNjRdPWUueSxzWzY1XT1lLnosc1s2Nl09bi54LHNbNjddPWUueSxzWzY4XT1uLnosc1s2OV09ZS54LHNbNzBdPWUueSxzWzcxXT1uLnosci5wb3NpdGlvbj1uZXcgaXQoe2NvbXBvbmVudERhdGF0eXBlOm50LkRPVUJMRSxjb21wb25lbnRzUGVyQXR0cmlidXRlOjMsdmFsdWVzOnN9KSksby5ub3JtYWwpe2xldCBjPW5ldyBGbG9hdDMy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z0wO188aTtfKyspe2xldCBqPV8vaSpNLlRXT19QSSxIPVMqTWF0aC5jb3Moaiksaz1TKk1hdGguc2luKGopO2cmJihBLng9SCxBLnk9ayxJJiYoUD1hLm5vcm1hbGl6ZShhLmNyb3NzKGEuVU5JVF9aLEEsUCksUCkpLHIubm9ybWFsJiYocFtEKytdPUEueCxwW0QrK109QS55LHBbRCsrXT1BLnoscFtEKytdPUEueCxwW0QrK109QS55LHBbRCsrXT1BLnopLHIudGFuZ2VudCYmKGRbdisrXT1QLngsZFt2KytdPVAueSxkW3YrK109UC56LGRbdisrXT1QLngsZFt2KytdPVAueSxkW3YrK109UC56KSxyLmJpdGFuZ2VudCYmKEI9YS5ub3JtYWxpemUoYS5jcm9zcyhBLFAsQiksQiksbVtMKytdPUIueCxtW0wrK109Qi55LG1bTCsrXT1CLnosbVtMKytdPUIueCxtW0wrK109Qi55LG1bTCsrXT1CLnopKX1mb3IoXz0wO188aTtfKyspci5ub3JtYWwmJihwW0QrK109MCxwW0QrK109MCxwW0QrK109LTEpLHIudGFuZ2VudCYmKGRbdisrXT0xLGRbdisrXT0wLGRbdisrXT0wKSxyLmJpdGFuZ2VudCYmKG1bTCsrXT0wLG1bTCsrXT0tMSxtW0wrK109MCk7Zm9yKF89MDtfPGk7XysrKXIubm9ybWFsJiYocFtEKytdPTAscFtEKytdPTAscFtEKytdPTEpLHIudGFuZ2VudCYmKGRbdisrXT0xLGRbdisrXT0wLGRbdisrXT0wKSxyLmJpdGFuZ2VudCYmKG1bTCsrXT0wLG1bTCsrXT0xLG1bTCsrXT0wKX1sZXQgYj0xMippLTEyLHc9RHQuY3JlYXRlVHlwZWRBcnJheSh1LGIpLE89MCxFPTA7Zm9yKF89MDtfPGktMTtfKyspd1tPKytdPUUsd1tPKytdPUUrMix3W08rK109RSszLHdbTysrXT1FLHdbTysrXT1FKzMsd1tPKytdPUUrMSxFKz0yO2Zvcih3W08rK109cy0yLHdbTysrXT0wLHdbTysrXT0xLHdbTysrXT1zLT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X0sTFY9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5vMSgpKX0sRFY9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5pMSgpKX07cmV0dXJuICRTKEZWKTt9KSgpOwo=")});var _M=Ic((dCt,J6)=>{var uCt=T(S()),ip=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)};ip.prototype.init_seed=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(((e&4294901760)>>>16)*1812433253<<16)+(e&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};ip.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 r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1664525<<16)+(r&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 r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1566083941<<16)+(r&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};ip.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>>1^t[e&1];for(;n>>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};ip.prototype.random_int31=function(){return this.random_int()>>>1};ip.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};ip.prototype.random=function(){return this.random_int()*(1/4294967296)};ip.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};ip.prototype.random_long=function(){var e=this.random_int()>>>5,t=this.random_int()>>>6;return(e*67108864+t)*(1/9007199254740992)};J6.exports=ip});var cq=Ic((RS,ZS)=>{var v1t=T(S());/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var t=typeof RS=="object"&&RS&&!RS.nodeType&&RS,n=typeof ZS=="object"&&ZS&&!ZS.nodeType&&ZS,i=typeof global=="object"&&global;(i.global===i||i.window===i||i.self===i)&&(e=i);var o,r=2147483647,s=36,a=1,c=26,d=38,u=700,m=72,p=128,g="-",f=/^xn--/,x=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},V=s-a,L=Math.floor,Z=String.fromCharCode,G;function X(U){throw new RangeError(C[U])}function v(U,O){for(var k=U.length,J=[];k--;)J[k]=O(U[k]);return J}function P(U,O){var k=U.split("@"),J="";k.length>1&&(J=k[0]+"@",U=k[1]),U=U.replace(_,".");var H=U.split("."),ee=v(H,O).join(".");return J+ee}function F(U){for(var O=[],k=0,J=U.length,H,ee;k=55296&&H<=56319&&k65535&&(O-=65536,k+=Z(O>>>10&1023|55296),O=56320|O&1023),k+=Z(O),k}).join("")}function b(U){return U-48<10?U-22:U-65<26?U-65:U-97<26?U-97:s}function R(U,O){return U+22+75*(U<26)-((O!=0)<<5)}function E(U,O,k){var J=0;for(U=k?L(U/u):U>>1,U+=L(U/O);U>V*c>>1;J+=s)U=L(U/V);return L(J+(V+1)*U/(U+d))}function I(U){var O=[],k=U.length,J,H=0,ee=p,z=m,j,q,be,Te,ae,ye,Se,Le,Xe;for(j=U.lastIndexOf(g),j<0&&(j=0),q=0;q=128&&X("not-basic"),O.push(U.charCodeAt(q));for(be=j>0?j+1:0;be=k&&X("invalid-input"),Se=b(U.charCodeAt(be++)),(Se>=s||Se>L((r-H)/ae))&&X("overflow"),H+=Se*ae,Le=ye<=z?a:ye>=z+c?c:ye-z,!(SeL(r/Xe)&&X("overflow"),ae*=Xe;J=O.length+1,z=E(H-Te,J,Te==0),L(H/J)>r-ee&&X("overflow"),ee+=L(H/J),H%=J,O.splice(H++,0,ee)}return A(O)}function w(U){var O,k,J,H,ee,z,j,q,be,Te,ae,ye=[],Se,Le,Xe,Pe;for(U=F(U),Se=U.length,O=p,k=0,ee=m,z=0;z=O&&aeL((r-k)/Le)&&X("overflow"),k+=(j-O)*Le,O=j,z=0;zr&&X("overflow"),ae==O){for(q=k,be=s;Te=be<=ee?a:be>=ee+c?c:be-ee,!(q{var w1t=T(S());/*! +var Cesium=(()=>{var qTe=Object.create;var xM=Object.defineProperty;var $Te=Object.getOwnPropertyDescriptor;var eCe=Object.getOwnPropertyNames;var tCe=Object.getPrototypeOf,nCe=Object.prototype.hasOwnProperty;var _M=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Wc=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),iCe=(e,t)=>{for(var n in t)xM(e,n,{get:t[n],enumerable:!0})},z6=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of eCe(t))!nCe.call(e,o)&&o!==n&&xM(e,o,{get:()=>t[o],enumerable:!(i=$Te(t,o))||i.enumerable});return e};var S=(e,t,n)=>(n=e!=null?qTe(tCe(e)):{},z6(t||!e||!e.__esModule?xM(n,"default",{value:e,enumerable:!0}):n,e)),oCe=e=>z6(xM({},"__esModule",{value:!0}),e);var T=Wc(()=>{globalThis.CESIUM_WORKERS=atob("d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xKYixjTSk7aWYoaChEKSl7Xz0hMDtsZXQgdj1hLm11bHRpcGx5QnlTY2FsYXIoYS5VTklUX1ksdU0sYU0pO08ueTwwJiYoYS5uZWdhdGUodix2KSxUPWwuYXR0cmlidXRlcyxDPWwuaW5kaWNlcyxOPWMuYXR0cmlidXRlcyxJPWMuaW5kaWNlcyk7bGV0IEw9YS5hZGQoRCx2LGZNKTtULnBvc2l0aW9uLnZhbHVlcy5wdXNoKE8ueCxPLnksTy56LE8ueCxPLnksTy56KSxULnBvc2l0aW9uLnZhbHVlcy5wdXNoKEwueCxMLnksTC56KSxULnBvc2l0aW9uLnZhbHVlcy5wdXNoKEwueCxMLnksTC56KSxULnByZXZQb3NpdGlvbi52YWx1ZXMucHVzaChyW2IqM10scltiKjMrMV0scltiKjMrMl0pLFQucHJldlBvc2l0aW9uLnZhbHVlcy5wdXNoKHJbYiozKzNdLHJbYiozKzRdLHJbYiozKzVdKSxULnByZXZQb3NpdGlvbi52YWx1ZXMucHVzaChPLngsTy55LE8ueixPLngsTy55LE8ueiksVC5uZXh0UG9zaXRpb24udmFsdWVzLnB1c2goTC54LEwueSxMLnopLFQubmV4dFBvc2l0aW9uLnZhbHVlcy5wdXNoKEwueCxMLnksTC56KSxULm5leHRQb3NpdGlvbi52YWx1ZXMucHVzaChMLngsTC55LEwueiksVC5uZXh0UG9zaXRpb24udmFsdWVzLnB1c2goTC54LEwueSxMLnopLGEubmVnYXRlKHYsdiksYS5hZGQoRCx2LEwpLE4ucG9zaXRpb24udmFsdWVzLnB1c2goTC54LEwueSxMLnopLE4ucG9zaXRpb24udmFsdWVzLnB1c2goTC54LEwueSxMLnopLE4ucG9zaXRpb24udmFsdWVzLnB1c2goRS54LEUueSxFLnosRS54LEUueSxFLnopLE4ucHJldlBvc2l0aW9uLnZhbHVlcy5wdXNoKEwueCxMLnksTC56KSxOLnByZXZQb3NpdGlvbi52YWx1ZXMucHVzaChMLngsTC55LEwueiksTi5wcmV2UG9zaXRpb24udmFsdWV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3R8fG8ubm9ybWFsfHxvLnRhbmdlbnR8fG8uYml0YW5nZW50KSl7aWYoby5wb3NpdGlvbiYmKHM9bmV3IEZsb2F0NjRBcnJheSg2KjQqMyksc1swXT10Lngsc1sxXT10Lnksc1syXT1uLnosc1szXT1uLngsc1s0XT10Lnksc1s1XT1uLnosc1s2XT1uLngsc1s3XT1uLnksc1s4XT1uLnosc1s5XT10Lngsc1sxMF09bi55LHNbMTFdPW4ueixzWzEyXT10Lngsc1sxM109dC55LHNbMTRdPXQueixzWzE1XT1uLngsc1sxNl09dC55LHNbMTddPXQueixzWzE4XT1uLngsc1sxOV09bi55LHNbMjBdPXQueixzWzIxXT10Lngsc1syMl09bi55LHNbMjNdPXQueixzWzI0XT1uLngsc1syNV09dC55LHNbMjZdPXQueixzWzI3XT1uLngsc1syOF09bi55LHNbMjldPXQueixzWzMwXT1uLngsc1szMV09bi55LHNbMzJdPW4ueixzWzMzXT1uLngsc1szNF09dC55LHNbMzVdPW4ueixzWzM2XT10Lngsc1szN109dC55LHNbMzhdPXQueixzWzM5XT10Lngsc1s0MF09bi55LHNbNDFdPXQueixzWzQyXT10Lngsc1s0M109bi55LHNbNDRdPW4ueixzWzQ1XT10Lngsc1s0Nl09dC55LHNbNDddPW4ueixzWzQ4XT10Lngsc1s0OV09bi55LHNbNTBdPXQueixzWzUxXT1uLngsc1s1Ml09bi55LHNbNTNdPXQueixzWzU0XT1uLngsc1s1NV09bi55LHNbNTZdPW4ueixzWzU3XT10Lngsc1s1OF09bi55LHNbNTldPW4ueixzWzYwXT10Lngsc1s2MV09dC55LHNbNjJdPXQueixzWzYzXT1uLngsc1s2NF09dC55LHNbNjVdPXQueixzWzY2XT1uLngsc1s2N109dC55LHNbNjhdPW4ueixzWzY5XT10Lngsc1s3MF09dC55LHNbNzFdPW4ueixyLnBvc2l0aW9uPW5ldyBpZSh7Y29tcG9uZW50RGF0YXR5cGU6bmUuRE9VQkxFLGNvbXBvbmVudHNQZXJBdHRyaWJ1dGU6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ybWFsKEssRSksYiYmKHdbaitTXT0tRS54LHdbSCtTXT0tRS55LHdbaytTXT0tRS56KTtsZXQgUj1hLm11bHRpcGx5QnlTY2FsYXIoRSxmLHd3KTtpZihLPWEuYWRkKEssUixLKSxSPWEubXVsdGlwbHlCeVNjYWxhcihFLHUsUiksWD1hLmFkZChYLFIsWCksbi5wb3NpdGlvbiYmKHBbaitTXT1YLngscFtIK1NdPVgueSxwW2srU109WC56LHBbal09Sy54LHBbSF09Sy55LHBba109Sy56KSxuLm5vcm1hbHx8bi50YW5nZW50fHxuLmJpdGFuZ2VudCl7Qz1hLmNsb25lKEUsQyk7bGV0IG9lPWEuZnJvbUFycmF5KGUsKGorMyklUyx3dyk7YS5zdWJ0cmFjdChvZSxLLG9lKTtsZXQgYWU9YS5zdWJ0cmFjdChYLEssXzApO0U9YS5ub3JtYWxpemUoYS5jcm9zcyhhZSxvZSxFKSxFKSxuLm5vcm1hbCYmKG1bal09RS54LG1bSF09RS55LG1ba109RS56LG1baitTXT1FLngsbVtIK1NdPUUueSxtW2srU109RS56KSxuLnRhbmdlbnQmJihUPWEubm9ybWFsaXplKGEuY3Jvc3MoQyxFLFQpLFQpLF9bal09VC54LF9bSF09VC55LF9ba109VC56LF9baitTXT1ULngsX1tqKzErU109VC55LF9baisyK1NdPVQueiksbi5iaXRhbmdlbnQmJihnW2pdPUMueCxnW0hdPUMueSxnW2tdPUMueixnW2orU109Qy54LGdbSCtTXT1DLnksZ1trK1NdPUMueil9fWlmKG4uc3Qpe1M9ZC5sZW5ndGg7Zm9yKGxldCBqPTA7ajxTO2orPTIpZFtqXT0oZFtqXS1VLngpLyhBLngtVS54KSxkW2orMV09KGRbaisxXS1VLnkpLyhBLnktVS55KX1sZXQgQj1uZXcgaXQ7aWYobi5wb3NpdGlvbiYmKEIucG9zaXRpb249bmV3IGllKHtjb21wb25lbnREYXRhdHlwZTpuZS5ET1VCTEUsY29tcG9uZW50c1BlckF0dHJpYnV0ZTozLHZhbHVlczpwfSkp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m9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5xZygpKX0seFY9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT4kZygpKX0sUFY9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5uMSgpKX0sTVY9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5vMSgpKX0sTlY9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5pMSgpKX07cmV0dXJuIGVDKElWKTt9KSgpOwo=")});var SM=Wc((oCt,H6)=>{var rCt=S(T()),np=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)};np.prototype.init_seed=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(((e&4294901760)>>>16)*1812433253<<16)+(e&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};np.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 r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1664525<<16)+(r&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 r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1566083941<<16)+(r&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};np.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>>1^t[e&1];for(;n>>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};np.prototype.random_int31=function(){return this.random_int()>>>1};np.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};np.prototype.random=function(){return this.random_int()*(1/4294967296)};np.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};np.prototype.random_long=function(){var e=this.random_int()>>>5,t=this.random_int()>>>6;return(e*67108864+t)*(1/9007199254740992)};H6.exports=np});var aq=Wc((ZT,LT)=>{var G1t=S(T());/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var t=typeof ZT=="object"&&ZT&&!ZT.nodeType&&ZT,n=typeof LT=="object"&<&&!LT.nodeType&<,i=typeof global=="object"&&global;(i.global===i||i.window===i||i.self===i)&&(e=i);var o,r=2147483647,s=36,a=1,c=26,d=38,u=700,m=72,p=128,g="-",f=/^xn--/,x=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},V=s-a,Z=Math.floor,R=String.fromCharCode,G;function W(k){throw new RangeError(C[k])}function v(k,O){for(var U=k.length,J=[];U--;)J[U]=O(k[U]);return J}function P(k,O){var U=k.split("@"),J="";U.length>1&&(J=U[0]+"@",k=U[1]),k=k.replace(_,".");var z=k.split("."),ee=v(z,O).join(".");return J+ee}function F(k){for(var O=[],U=0,J=k.length,z,ee;U=55296&&z<=56319&&U65535&&(O-=65536,U+=R(O>>>10&1023|55296),O=56320|O&1023),U+=R(O),U}).join("")}function b(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:s}function L(k,O){return k+22+75*(k<26)-((O!=0)<<5)}function E(k,O,U){var J=0;for(k=U?Z(k/u):k>>1,k+=Z(k/O);k>V*c>>1;J+=s)k=Z(k/V);return Z(J+(V+1)*k/(k+d))}function I(k){var O=[],U=k.length,J,z=0,ee=p,K=m,j,q,be,Se,ae,ye,Te,Ze,We;for(j=k.lastIndexOf(g),j<0&&(j=0),q=0;q=128&&W("not-basic"),O.push(k.charCodeAt(q));for(be=j>0?j+1:0;be=U&&W("invalid-input"),Te=b(k.charCodeAt(be++)),(Te>=s||Te>Z((r-z)/ae))&&W("overflow"),z+=Te*ae,Ze=ye<=K?a:ye>=K+c?c:ye-K,!(TeZ(r/We)&&W("overflow"),ae*=We;J=O.length+1,K=E(z-Se,J,Se==0),Z(z/J)>r-ee&&W("overflow"),ee+=Z(z/J),z%=J,O.splice(z++,0,ee)}return M(O)}function w(k){var O,U,J,z,ee,K,j,q,be,Se,ae,ye=[],Te,Ze,We,Pe;for(k=F(k),Te=k.length,O=p,U=0,ee=m,K=0;K=O&&aeZ((r-U)/Ze)&&W("overflow"),U+=(j-O)*Ze,O=j,K=0;Kr&&W("overflow"),ae==O){for(q=U,be=s;Se=be<=ee?a:be>=ee+c?c:be-ee,!(q{var E1t=S(T());/*! * URI.js - Mutating URLs * IPv6 Support * @@ -35,7 +35,7 @@ var Cesium=(()=>{var zSe=Object.create;var yM=Object.defineProperty;var KSe=Obje * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * - */(function(e,t){"use strict";typeof EM=="object"&&EM.exports?EM.exports=t():typeof define=="function"&&define.amd?define(t):e.IPv6=t(e)})(lq,function(e){"use strict";var t=e&&e.IPv6;function n(o){var r=o.toLowerCase(),s=r.split(":"),a=s.length,c=8;s[0]===""&&s[1]===""&&s[2]===""?(s.shift(),s.shift()):s[0]===""&&s[1]===""?s.shift():s[a-1]===""&&s[a-2]===""&&s.pop(),a=s.length,s[a-1].indexOf(".")!==-1&&(c=7);var d;for(d=0;d1);p++)u.splice(0,1);s[m]=u.join("")}var g=-1,f=0,x=0,_=-1,C=!1;for(m=0;mf&&(g=_,f=x)):s[m]==="0"&&(C=!0,_=m,x=1);x>f&&(g=_,f=x),f>1&&s.splice(g,f,""),a=s.length;var V="";for(s[0]===""&&(V=":"),m=0;m{var F1t=T(S());/*! + */(function(e,t){"use strict";typeof WM=="object"&&WM.exports?WM.exports=t():typeof define=="function"&&define.amd?define(t):e.IPv6=t(e)})(cq,function(e){"use strict";var t=e&&e.IPv6;function n(o){var r=o.toLowerCase(),s=r.split(":"),a=s.length,c=8;s[0]===""&&s[1]===""&&s[2]===""?(s.shift(),s.shift()):s[0]===""&&s[1]===""?s.shift():s[a-1]===""&&s[a-2]===""&&s.pop(),a=s.length,s[a-1].indexOf(".")!==-1&&(c=7);var d;for(d=0;d1);p++)u.splice(0,1);s[m]=u.join("")}var g=-1,f=0,x=0,_=-1,C=!1;for(m=0;mf&&(g=_,f=x)):s[m]==="0"&&(C=!0,_=m,x=1);x>f&&(g=_,f=x),f>1&&s.splice(g,f,""),a=s.length;var V="";for(s[0]===""&&(V=":"),m=0;m{var W1t=S(T());/*! * URI.js - Mutating URLs * Second Level Domain (SLD) Support * @@ -47,7 +47,7 @@ var Cesium=(()=>{var zSe=Object.create;var yM=Object.defineProperty;var KSe=Obje * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * - */(function(e,t){"use strict";typeof XM=="object"&&XM.exports?XM.exports=t():typeof define=="function"&&define.amd?define(t):e.SecondLevelDomains=t(e)})(uq,function(e){"use strict";var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return!1;var s=n.list[i.slice(o+1)];return s?s.indexOf(" "+i.slice(r+1,o)+" ")>=0:!1},is:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r>=0)return!1;var s=n.list[i.slice(o+1)];return s?s.indexOf(" "+i.slice(0,o)+" ")>=0:!1},get:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return null;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return null;var s=n.list[i.slice(o+1)];return!s||s.indexOf(" "+i.slice(r+1,o)+" ")<0?null:i.slice(r+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})});var id=Ic((hq,IM)=>{var A1t=T(S());/*! + */(function(e,t){"use strict";typeof IM=="object"&&IM.exports?IM.exports=t():typeof define=="function"&&define.amd?define(t):e.SecondLevelDomains=t(e)})(dq,function(e){"use strict";var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return!1;var s=n.list[i.slice(o+1)];return s?s.indexOf(" "+i.slice(r+1,o)+" ")>=0:!1},is:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r>=0)return!1;var s=n.list[i.slice(o+1)];return s?s.indexOf(" "+i.slice(0,o)+" ")>=0:!1},get:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return null;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return null;var s=n.list[i.slice(o+1)];return!s||s.indexOf(" "+i.slice(r+1,o)+" ")<0?null:i.slice(r+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})});var nd=Wc((mq,XM)=>{var I1t=S(T());/*! * URI.js - Mutating URLs * * Version: 1.19.11 @@ -58,28 +58,28 @@ var Cesium=(()=>{var zSe=Object.create;var yM=Object.defineProperty;var KSe=Obje * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * - */(function(e,t){"use strict";typeof IM=="object"&&IM.exports?IM.exports=t(cq(),dq(),mq()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(hq,function(e,t,n,i){"use strict";var o=i&&i.URI;function r(R,E){var I=arguments.length>=1,w=arguments.length>=2;if(!(this instanceof r))return I?w?new r(R,E):new r(R):new r;if(R===void 0){if(I)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?R=location.href+"":R=""}if(R===null&&I)throw new TypeError("null is not a valid argument for URI");return this.href(R),E!==void 0?this.absoluteTo(E):this}function s(R){return/^[0-9]+$/.test(R)}r.version="1.19.11";var a=r.prototype,c=Object.prototype.hasOwnProperty;function d(R){return R.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function u(R){return R===void 0?"Undefined":String(Object.prototype.toString.call(R)).slice(8,-1)}function m(R){return u(R)==="Array"}function p(R,E){var I={},w,N;if(u(E)==="RegExp")I=null;else if(m(E))for(w=0,N=E.length;w]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(R){if(!(!R||!R.nodeName)){var E=R.nodeName.toLowerCase();if(!(E==="input"&&R.type!=="image"))return r.domAttributes[E]}};function _(R){return escape(R)}function C(R){return encodeURIComponent(R).replace(/[!'()*]/g,_).replace(/\*/g,"%2A")}r.encode=C,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=C,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(R,E){var I=r.encode(R+"");return E===void 0&&(E=r.escapeQuerySpace),E?I.replace(/%20/g,"+"):I},r.decodeQuery=function(R,E){R+="",E===void 0&&(E=r.escapeQuerySpace);try{return r.decode(E?R.replace(/\+/g,"%20"):R)}catch{return R}};var V={encode:"encode",decode:"decode"},L,Z=function(R,E){return function(I){try{return r[E](I+"").replace(r.characters[R][E].expression,function(w){return r.characters[R][E].map[w]})}catch{return I}}};for(L in V)r[L+"PathSegment"]=Z("pathname",V[L]),r[L+"UrnPathSegment"]=Z("urnpath",V[L]);var G=function(R,E,I){return function(w){var N;I?N=function(k){return r[E](r[I](k))}:N=r[E];for(var B=(w+"").split(R),U=0,O=B.length;U-1&&(E.fragment=R.substring(I+1)||null,R=R.substring(0,I)),I=R.indexOf("?"),I>-1&&(E.query=R.substring(I+1)||null,R=R.substring(0,I)),R=R.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),R=R.replace(/^[/\\]{2,}/i,"//"),R.substring(0,2)==="//"?(E.protocol=null,R=R.substring(2),R=r.parseAuthority(R,E)):(I=R.indexOf(":"),I>-1&&(E.protocol=R.substring(0,I)||null,E.protocol&&!E.protocol.match(r.protocol_expression)?E.protocol=void 0:R.substring(I+1,I+3).replace(/\\/g,"/")==="//"?(R=R.substring(I+3),R=r.parseAuthority(R,E)):(R=R.substring(I+1),E.urn=!0))),E.path=R,E},r.parseHost=function(R,E){R||(R=""),R=R.replace(/\\/g,"/");var I=R.indexOf("/"),w,N;if(I===-1&&(I=R.length),R.charAt(0)==="[")w=R.indexOf("]"),E.hostname=R.substring(1,w)||null,E.port=R.substring(w+2,I)||null,E.port==="/"&&(E.port=null);else{var B=R.indexOf(":"),U=R.indexOf("/"),O=R.indexOf(":",B+1);O!==-1&&(U===-1||O-1?N:R.length-1),U;return B>-1&&(N===-1||B-1?z=z.slice(0,j)+z.slice(j).replace(B,""):z=z.replace(B,""),!(z.length<=k[0].length)&&!(I.ignore&&I.ignore.test(z))){ee=J+z.length;var Te=E(z,J,ee,R);if(Te===void 0){w.lastIndex=ee;continue}Te=String(Te),R=R.slice(0,J)+Te+R.slice(ee),w.lastIndex=J+Te.length}}return w.lastIndex=0,R},r.ensureValidHostname=function(R,E){var I=!!R,w=!!E,N=!1;if(w&&(N=g(r.hostProtocols,E)),N&&!I)throw new TypeError("Hostname cannot be empty, if protocol is "+E);if(R&&R.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+R+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(R).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+R+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(R){if(R){var E=Number(R);if(!(s(E)&&E>0&&E<65536))throw new TypeError('Port "'+R+'" is not a valid port')}},r.noConflict=function(R){if(R){var E={URI:this.noConflict()};return i.URITemplate&&typeof i.URITemplate.noConflict=="function"&&(E.URITemplate=i.URITemplate.noConflict()),i.IPv6&&typeof i.IPv6.noConflict=="function"&&(E.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&typeof i.SecondLevelDomains.noConflict=="function"&&(E.SecondLevelDomains=i.SecondLevelDomains.noConflict()),E}else i.URI===this&&(i.URI=o);return this},a.build=function(R){return R===!0?this._deferred_build=!0:(R===void 0||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new r(this)},a.valueOf=a.toString=function(){return this.build(!1)._string};function X(R){return function(E,I){return E===void 0?this._parts[R]||"":(this._parts[R]=E||null,this.build(!I),this)}}function v(R,E){return function(I,w){return I===void 0?this._parts[R]||"":(I!==null&&(I=I+"",I.charAt(0)===E&&(I=I.substring(1))),this._parts[R]=I,this.build(!w),this)}}a.protocol=X("protocol"),a.username=X("username"),a.password=X("password"),a.hostname=X("hostname"),a.port=X("port"),a.query=v("query","?"),a.fragment=v("fragment","#"),a.search=function(R,E){var I=this.query(R,E);return typeof I=="string"&&I.length?"?"+I:I},a.hash=function(R,E){var I=this.fragment(R,E);return typeof I=="string"&&I.length?"#"+I:I},a.pathname=function(R,E){if(R===void 0||R===!0){var I=this._parts.path||(this._parts.hostname?"/":"");return R?(this._parts.urn?r.decodeUrnPath:r.decodePath)(I):I}else return this._parts.urn?this._parts.path=R?r.recodeUrnPath(R):"":this._parts.path=R?r.recodePath(R):"/",this.build(!E),this},a.path=a.pathname,a.href=function(R,E){var I;if(R===void 0)return this.toString();this._string="",this._parts=r._parts();var w=R instanceof r,N=typeof R=="object"&&(R.hostname||R.path||R.pathname);if(R.nodeName){var B=r.getDomAttribute(R);R=R[B]||"",N=!1}if(!w&&N&&R.pathname!==void 0&&(R=R.toString()),typeof R=="string"||R instanceof String)this._parts=r.parse(String(R),this._parts);else if(w||N){var U=w?R._parts:R;for(I in U)I!=="query"&&c.call(this._parts,I)&&(this._parts[I]=U[I]);U.query&&this.query(U.query,!1)}else throw new TypeError("invalid input");return this.build(!E),this},a.is=function(R){var E=!1,I=!1,w=!1,N=!1,B=!1,U=!1,O=!1,k=!this._parts.urn;switch(this._parts.hostname&&(k=!1,I=r.ip4_expression.test(this._parts.hostname),w=r.ip6_expression.test(this._parts.hostname),E=I||w,N=!E,B=N&&n&&n.has(this._parts.hostname),U=N&&r.idn_expression.test(this._parts.hostname),O=N&&r.punycode_expression.test(this._parts.hostname)),R.toLowerCase()){case"relative":return k;case"absolute":return!k;case"domain":case"name":return N;case"sld":return B;case"ip":return E;case"ip4":case"ipv4":case"inet4":return I;case"ip6":case"ipv6":case"inet6":return w;case"idn":return U;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return O}return null};var P=a.protocol,F=a.port,A=a.hostname;a.protocol=function(R,E){if(R&&(R=R.replace(/:(\/\/)?$/,""),!R.match(r.protocol_expression)))throw new TypeError('Protocol "'+R+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return P.call(this,R,E)},a.scheme=a.protocol,a.port=function(R,E){return this._parts.urn?R===void 0?"":this:(R!==void 0&&(R===0&&(R=null),R&&(R+="",R.charAt(0)===":"&&(R=R.substring(1)),r.ensureValidPort(R))),F.call(this,R,E))},a.hostname=function(R,E){if(this._parts.urn)return R===void 0?"":this;if(R!==void 0){var I={preventInvalidHostname:this._parts.preventInvalidHostname},w=r.parseHost(R,I);if(w!=="/")throw new TypeError('Hostname "'+R+'" contains characters other than [A-Z0-9.-]');R=I.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(R,this._parts.protocol)}return A.call(this,R,E)},a.origin=function(R,E){if(this._parts.urn)return R===void 0?"":this;if(R===void 0){var I=this.protocol(),w=this.authority();return w?(I?I+"://":"")+this.authority():""}else{var N=r(R);return this.protocol(N.protocol()).authority(N.authority()).build(!E),this}},a.host=function(R,E){if(this._parts.urn)return R===void 0?"":this;if(R===void 0)return this._parts.hostname?r.buildHost(this._parts):"";var I=r.parseHost(R,this._parts);if(I!=="/")throw new TypeError('Hostname "'+R+'" contains characters other than [A-Z0-9.-]');return this.build(!E),this},a.authority=function(R,E){if(this._parts.urn)return R===void 0?"":this;if(R===void 0)return this._parts.hostname?r.buildAuthority(this._parts):"";var I=r.parseAuthority(R,this._parts);if(I!=="/")throw new TypeError('Hostname "'+R+'" contains characters other than [A-Z0-9.-]');return this.build(!E),this},a.userinfo=function(R,E){if(this._parts.urn)return R===void 0?"":this;if(R===void 0){var I=r.buildUserinfo(this._parts);return I&&I.substring(0,I.length-1)}else return R[R.length-1]!=="@"&&(R+="@"),r.parseUserinfo(R,this._parts),this.build(!E),this},a.resource=function(R,E){var I;return R===void 0?this.path()+this.search()+this.hash():(I=r.parse(R),this._parts.path=I.path,this._parts.query=I.query,this._parts.fragment=I.fragment,this.build(!E),this)},a.subdomain=function(R,E){if(this._parts.urn)return R===void 0?"":this;if(R===void 0){if(!this._parts.hostname||this.is("IP"))return"";var I=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,I)||""}else{var w=this._parts.hostname.length-this.domain().length,N=this._parts.hostname.substring(0,w),B=new RegExp("^"+d(N));if(R&&R.charAt(R.length-1)!=="."&&(R+="."),R.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return R&&r.ensureValidHostname(R,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(B,R),this.build(!E),this}},a.domain=function(R,E){if(this._parts.urn)return R===void 0?"":this;if(typeof R=="boolean"&&(E=R,R=void 0),R===void 0){if(!this._parts.hostname||this.is("IP"))return"";var I=this._parts.hostname.match(/\./g);if(I&&I.length<2)return this._parts.hostname;var w=this._parts.hostname.length-this.tld(E).length-1;return w=this._parts.hostname.lastIndexOf(".",w-1)+1,this._parts.hostname.substring(w)||""}else{if(!R)throw new TypeError("cannot set domain empty");if(R.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(R,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=R;else{var N=new RegExp(d(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(N,R)}return this.build(!E),this}},a.tld=function(R,E){if(this._parts.urn)return R===void 0?"":this;if(typeof R=="boolean"&&(E=R,R=void 0),R===void 0){if(!this._parts.hostname||this.is("IP"))return"";var I=this._parts.hostname.lastIndexOf("."),w=this._parts.hostname.substring(I+1);return E!==!0&&n&&n.list[w.toLowerCase()]&&n.get(this._parts.hostname)||w}else{var N;if(R)if(R.match(/[^a-zA-Z0-9-]/))if(n&&n.is(R))N=new RegExp(d(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(N,R);else throw new TypeError('TLD "'+R+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");N=new RegExp(d(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(N,R)}else throw new TypeError("cannot set TLD empty");return this.build(!E),this}},a.directory=function(R,E){if(this._parts.urn)return R===void 0?"":this;if(R===void 0||R===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var I=this._parts.path.length-this.filename().length-1,w=this._parts.path.substring(0,I)||(this._parts.hostname?"/":"");return R?r.decodePath(w):w}else{var N=this._parts.path.length-this.filename().length,B=this._parts.path.substring(0,N),U=new RegExp("^"+d(B));return this.is("relative")||(R||(R="/"),R.charAt(0)!=="/"&&(R="/"+R)),R&&R.charAt(R.length-1)!=="/"&&(R+="/"),R=r.recodePath(R),this._parts.path=this._parts.path.replace(U,R),this.build(!E),this}},a.filename=function(R,E){if(this._parts.urn)return R===void 0?"":this;if(typeof R!="string"){if(!this._parts.path||this._parts.path==="/")return"";var I=this._parts.path.lastIndexOf("/"),w=this._parts.path.substring(I+1);return R?r.decodePathSegment(w):w}else{var N=!1;R.charAt(0)==="/"&&(R=R.substring(1)),R.match(/\.?\//)&&(N=!0);var B=new RegExp(d(this.filename())+"$");return R=r.recodePath(R),this._parts.path=this._parts.path.replace(B,R),N?this.normalizePath(E):this.build(!E),this}},a.suffix=function(R,E){if(this._parts.urn)return R===void 0?"":this;if(R===void 0||R===!0){if(!this._parts.path||this._parts.path==="/")return"";var I=this.filename(),w=I.lastIndexOf("."),N,B;return w===-1?"":(N=I.substring(w+1),B=/^[a-z0-9%]+$/i.test(N)?N:"",R?r.decodePathSegment(B):B)}else{R.charAt(0)==="."&&(R=R.substring(1));var U=this.suffix(),O;if(U)R?O=new RegExp(d(U)+"$"):O=new RegExp(d("."+U)+"$");else{if(!R)return this;this._parts.path+="."+r.recodePath(R)}return O&&(R=r.recodePath(R),this._parts.path=this._parts.path.replace(O,R)),this.build(!E),this}},a.segment=function(R,E,I){var w=this._parts.urn?":":"/",N=this.path(),B=N.substring(0,1)==="/",U=N.split(w);if(R!==void 0&&typeof R!="number"&&(I=E,E=R,R=void 0),R!==void 0&&typeof R!="number")throw new Error('Bad segment "'+R+'", must be 0-based integer');if(B&&U.shift(),R<0&&(R=Math.max(U.length+R,0)),E===void 0)return R===void 0?U:U[R];if(R===null||U[R]===void 0)if(m(E)){U=[];for(var O=0,k=E.length;O{var D8t=T(S());/*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/LICENSE */(function(e,t){typeof VO=="object"&&typeof LO<"u"?LO.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.DOMPurify=t())})(VO,function(){"use strict";let{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object,{freeze:r,seal:s,create:a}=Object,{apply:c,construct:d}=typeof Reflect<"u"&&Reflect;r||(r=function($e){return $e}),s||(s=function($e){return $e}),c||(c=function($e,Qe,je){return $e.apply(Qe,je)}),d||(d=function($e,Qe){return new $e(...Qe)});let u=X(Array.prototype.forEach),m=X(Array.prototype.pop),p=X(Array.prototype.push),g=X(String.prototype.toLowerCase),f=X(String.prototype.toString),x=X(String.prototype.match),_=X(String.prototype.replace),C=X(String.prototype.indexOf),V=X(String.prototype.trim),L=X(Object.prototype.hasOwnProperty),Z=X(RegExp.prototype.test),G=v(TypeError);function X(Ae){return function($e){for(var Qe=arguments.length,je=new Array(Qe>1?Qe-1:0),kt=1;kt2&&arguments[2]!==void 0?arguments[2]:g;t&&t(Ae,null);let je=$e.length;for(;je--;){let kt=$e[je];if(typeof kt=="string"){let pe=Qe(kt);pe!==kt&&(n($e)||($e[je]=pe),kt=pe)}Ae[kt]=!0}return Ae}function F(Ae){for(let $e=0;$e/gm),j=s(/\${[\w\W]*}/gm),q=s(/^data-[\-\w.\u00B7-\uFFFF]/),be=s(/^aria-[\-\w]+$/),Te=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ae=s(/^(?:\w+script|data):/i),ye=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Se=s(/^html$/i),Le=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var Xe=Object.freeze({__proto__:null,MUSTACHE_EXPR:ee,ERB_EXPR:z,TMPLIT_EXPR:j,DATA_ATTR:q,ARIA_ATTR:be,IS_ALLOWED_URI:Te,IS_SCRIPT_OR_DATA:ae,ATTR_WHITESPACE:ye,DOCTYPE_NAME:Se,CUSTOM_ELEMENT:Le});let Pe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ke=function(){return typeof window>"u"?null:window},Pt=function($e,Qe){if(typeof $e!="object"||typeof $e.createPolicy!="function")return null;let je=null,kt="data-tt-policy-suffix";Qe&&Qe.hasAttribute(kt)&&(je=Qe.getAttribute(kt));let pe="dompurify"+(je?"#"+je:"");try{return $e.createPolicy(pe,{createHTML(Ve){return Ve},createScriptURL(Ve){return Ve}})}catch{return console.warn("TrustedTypes policy "+pe+" could not be created."),null}};function Ot(){let Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ke(),$e=Rn=>Ot(Rn);if($e.version="3.1.5",$e.removed=[],!Ae||!Ae.document||Ae.document.nodeType!==Pe.document)return $e.isSupported=!1,$e;let{document:Qe}=Ae,je=Qe,kt=je.currentScript,{DocumentFragment:pe,HTMLTemplateElement:Ve,Node:Dt,Element:bt,NodeFilter:li,NamedNodeMap:Vo=Ae.NamedNodeMap||Ae.MozNamedAttrMap,HTMLFormElement:Rs,DOMParser:zs,trustedTypes:Nr}=Ae,$r=bt.prototype,Ue=b($r,"cloneNode"),it=b($r,"nextSibling"),tt=b($r,"childNodes"),qe=b($r,"parentNode");if(typeof Ve=="function"){let Rn=Qe.createElement("template");Rn.content&&Rn.content.ownerDocument&&(Qe=Rn.content.ownerDocument)}let dt,Bt="",{implementation:Ln,createNodeIterator:Lo,createDocumentFragment:nr,getElementsByTagName:Na}=Qe,{importNode:ka}=je,io={};$e.isSupported=typeof e=="function"&&typeof qe=="function"&&Ln&&Ln.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Bi,ERB_EXPR:us,TMPLIT_EXPR:yr,DATA_ATTR:ml,ARIA_ATTR:Do,IS_SCRIPT_OR_DATA:xr,ATTR_WHITESPACE:fb,CUSTOM_ELEMENT:Gc}=Xe,{IS_ALLOWED_URI:Ua}=Xe,dr=null,ya=P({},[...R,...E,...I,...N,...U]),oo=null,ZL=P({},[...O,...k,...J,...H]),$n=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ec=null,nd=null,Ny=!0,_r=!0,es=!1,pb=!0,bb=!1,mM=!0,ky=!1,hB=!1,fB=!1,yS=!1,hM=!1,fM=!1,R6=!0,Z6=!1,NSe="user-content-",pB=!0,GL=!1,xS={},_S=null,G6=P({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),E6=null,X6=P({},["audio","video","img","source","image","track"]),bB=null,I6=P({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pM="http://www.w3.org/1998/Math/MathML",bM="http://www.w3.org/2000/svg",tp="http://www.w3.org/1999/xhtml",TS=tp,gB=!1,yB=null,kSe=P({},[pM,bM,tp],f),EL=null,USe=["application/xhtml+xml","text/html"],DSe="text/html",Ks=null,SS=null,BSe=Qe.createElement("form"),W6=function(Ze){return Ze instanceof RegExp||Ze instanceof Function},xB=function(){let Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(SS&&SS===Ze)){if((!Ze||typeof Ze!="object")&&(Ze={}),Ze=A(Ze),EL=USe.indexOf(Ze.PARSER_MEDIA_TYPE)===-1?DSe:Ze.PARSER_MEDIA_TYPE,Ks=EL==="application/xhtml+xml"?f:g,dr=L(Ze,"ALLOWED_TAGS")?P({},Ze.ALLOWED_TAGS,Ks):ya,oo=L(Ze,"ALLOWED_ATTR")?P({},Ze.ALLOWED_ATTR,Ks):ZL,yB=L(Ze,"ALLOWED_NAMESPACES")?P({},Ze.ALLOWED_NAMESPACES,f):kSe,bB=L(Ze,"ADD_URI_SAFE_ATTR")?P(A(I6),Ze.ADD_URI_SAFE_ATTR,Ks):I6,E6=L(Ze,"ADD_DATA_URI_TAGS")?P(A(X6),Ze.ADD_DATA_URI_TAGS,Ks):X6,_S=L(Ze,"FORBID_CONTENTS")?P({},Ze.FORBID_CONTENTS,Ks):G6,Ec=L(Ze,"FORBID_TAGS")?P({},Ze.FORBID_TAGS,Ks):{},nd=L(Ze,"FORBID_ATTR")?P({},Ze.FORBID_ATTR,Ks):{},xS=L(Ze,"USE_PROFILES")?Ze.USE_PROFILES:!1,Ny=Ze.ALLOW_ARIA_ATTR!==!1,_r=Ze.ALLOW_DATA_ATTR!==!1,es=Ze.ALLOW_UNKNOWN_PROTOCOLS||!1,pb=Ze.ALLOW_SELF_CLOSE_IN_ATTR!==!1,bb=Ze.SAFE_FOR_TEMPLATES||!1,mM=Ze.SAFE_FOR_XML!==!1,ky=Ze.WHOLE_DOCUMENT||!1,yS=Ze.RETURN_DOM||!1,hM=Ze.RETURN_DOM_FRAGMENT||!1,fM=Ze.RETURN_TRUSTED_TYPE||!1,fB=Ze.FORCE_BODY||!1,R6=Ze.SANITIZE_DOM!==!1,Z6=Ze.SANITIZE_NAMED_PROPS||!1,pB=Ze.KEEP_CONTENT!==!1,GL=Ze.IN_PLACE||!1,Ua=Ze.ALLOWED_URI_REGEXP||Te,TS=Ze.NAMESPACE||tp,$n=Ze.CUSTOM_ELEMENT_HANDLING||{},Ze.CUSTOM_ELEMENT_HANDLING&&W6(Ze.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($n.tagNameCheck=Ze.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ze.CUSTOM_ELEMENT_HANDLING&&W6(Ze.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($n.attributeNameCheck=Ze.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ze.CUSTOM_ELEMENT_HANDLING&&typeof Ze.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($n.allowCustomizedBuiltInElements=Ze.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),bb&&(_r=!1),hM&&(yS=!0),xS&&(dr=P({},U),oo=[],xS.html===!0&&(P(dr,R),P(oo,O)),xS.svg===!0&&(P(dr,E),P(oo,k),P(oo,H)),xS.svgFilters===!0&&(P(dr,I),P(oo,k),P(oo,H)),xS.mathMl===!0&&(P(dr,N),P(oo,J),P(oo,H))),Ze.ADD_TAGS&&(dr===ya&&(dr=A(dr)),P(dr,Ze.ADD_TAGS,Ks)),Ze.ADD_ATTR&&(oo===ZL&&(oo=A(oo)),P(oo,Ze.ADD_ATTR,Ks)),Ze.ADD_URI_SAFE_ATTR&&P(bB,Ze.ADD_URI_SAFE_ATTR,Ks),Ze.FORBID_CONTENTS&&(_S===G6&&(_S=A(_S)),P(_S,Ze.FORBID_CONTENTS,Ks)),pB&&(dr["#text"]=!0),ky&&P(dr,["html","head","body"]),dr.table&&(P(dr,["tbody"]),delete Ec.tbody),Ze.TRUSTED_TYPES_POLICY){if(typeof Ze.TRUSTED_TYPES_POLICY.createHTML!="function")throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ze.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');dt=Ze.TRUSTED_TYPES_POLICY,Bt=dt.createHTML("")}else dt===void 0&&(dt=Pt(Nr,kt)),dt!==null&&typeof Bt=="string"&&(Bt=dt.createHTML(""));r&&r(Ze),SS=Ze}},P6=P({},["mi","mo","mn","ms","mtext"]),v6=P({},["foreignobject","annotation-xml"]),YSe=P({},["title","style","font","a","script"]),w6=P({},[...E,...I,...w]),F6=P({},[...N,...B]),OSe=function(Ze){let It=qe(Ze);(!It||!It.tagName)&&(It={namespaceURI:TS,tagName:"template"});let bn=g(Ze.tagName),Bo=g(It.tagName);return yB[Ze.namespaceURI]?Ze.namespaceURI===bM?It.namespaceURI===tp?bn==="svg":It.namespaceURI===pM?bn==="svg"&&(Bo==="annotation-xml"||P6[Bo]):!!w6[bn]:Ze.namespaceURI===pM?It.namespaceURI===tp?bn==="math":It.namespaceURI===bM?bn==="math"&&v6[Bo]:!!F6[bn]:Ze.namespaceURI===tp?It.namespaceURI===bM&&!v6[Bo]||It.namespaceURI===pM&&!P6[Bo]?!1:!F6[bn]&&(YSe[bn]||!w6[bn]):!!(EL==="application/xhtml+xml"&&yB[Ze.namespaceURI]):!1},vh=function(Ze){p($e.removed,{element:Ze});try{Ze.parentNode.removeChild(Ze)}catch{Ze.remove()}},gM=function(Ze,It){try{p($e.removed,{attribute:It.getAttributeNode(Ze),from:It})}catch{p($e.removed,{attribute:null,from:It})}if(It.removeAttribute(Ze),Ze==="is"&&!oo[Ze])if(yS||hM)try{vh(It)}catch{}else try{It.setAttribute(Ze,"")}catch{}},A6=function(Ze){let It=null,bn=null;if(fB)Ze=""+Ze;else{let xa=x(Ze,/^[\r\n\t ]+/);bn=xa&&xa[0]}EL==="application/xhtml+xml"&&TS===tp&&(Ze=''+Ze+"");let Bo=dt?dt.createHTML(Ze):Ze;if(TS===tp)try{It=new zs().parseFromString(Bo,EL)}catch{}if(!It||!It.documentElement){It=Ln.createDocument(TS,"template",null);try{It.documentElement.innerHTML=gB?Bt:Bo}catch{}}let Da=It.body||It.documentElement;return Ze&&bn&&Da.insertBefore(Qe.createTextNode(bn),Da.childNodes[0]||null),TS===tp?Na.call(It,ky?"html":"body")[0]:ky?It.documentElement:Da},M6=function(Ze){return Lo.call(Ze.ownerDocument||Ze,Ze,li.SHOW_ELEMENT|li.SHOW_COMMENT|li.SHOW_TEXT|li.SHOW_PROCESSING_INSTRUCTION|li.SHOW_CDATA_SECTION,null)},N6=function(Ze){return Ze instanceof Rs&&(typeof Ze.nodeName!="string"||typeof Ze.textContent!="string"||typeof Ze.removeChild!="function"||!(Ze.attributes instanceof Vo)||typeof Ze.removeAttribute!="function"||typeof Ze.setAttribute!="function"||typeof Ze.namespaceURI!="string"||typeof Ze.insertBefore!="function"||typeof Ze.hasChildNodes!="function")},k6=function(Ze){return typeof Dt=="function"&&Ze instanceof Dt},np=function(Ze,It,bn){io[Ze]&&u(io[Ze],Bo=>{Bo.call($e,It,bn,SS)})},U6=function(Ze){let It=null;if(np("beforeSanitizeElements",Ze,null),N6(Ze))return vh(Ze),!0;let bn=Ks(Ze.nodeName);if(np("uponSanitizeElement",Ze,{tagName:bn,allowedTags:dr}),Ze.hasChildNodes()&&!k6(Ze.firstElementChild)&&Z(/<[/\w]/g,Ze.innerHTML)&&Z(/<[/\w]/g,Ze.textContent)||Ze.nodeType===Pe.progressingInstruction||mM&&Ze.nodeType===Pe.comment&&Z(/<[/\w]/g,Ze.data))return vh(Ze),!0;if(!dr[bn]||Ec[bn]){if(!Ec[bn]&&B6(bn)&&($n.tagNameCheck instanceof RegExp&&Z($n.tagNameCheck,bn)||$n.tagNameCheck instanceof Function&&$n.tagNameCheck(bn)))return!1;if(pB&&!_S[bn]){let Bo=qe(Ze)||Ze.parentNode,Da=tt(Ze)||Ze.childNodes;if(Da&&Bo){let xa=Da.length;for(let hl=xa-1;hl>=0;--hl){let wh=Ue(Da[hl],!0);wh.__removalCount=(Ze.__removalCount||0)+1,Bo.insertBefore(wh,it(Ze))}}}return vh(Ze),!0}return Ze instanceof bt&&!OSe(Ze)||(bn==="noscript"||bn==="noembed"||bn==="noframes")&&Z(/<\/no(script|embed|frames)/i,Ze.innerHTML)?(vh(Ze),!0):(bb&&Ze.nodeType===Pe.text&&(It=Ze.textContent,u([Bi,us,yr],Bo=>{It=_(It,Bo," ")}),Ze.textContent!==It&&(p($e.removed,{element:Ze.cloneNode()}),Ze.textContent=It)),np("afterSanitizeElements",Ze,null),!1)},D6=function(Ze,It,bn){if(R6&&(It==="id"||It==="name")&&(bn in Qe||bn in BSe))return!1;if(!(_r&&!nd[It]&&Z(ml,It))){if(!(Ny&&Z(Do,It))){if(!oo[It]||nd[It]){if(!(B6(Ze)&&($n.tagNameCheck instanceof RegExp&&Z($n.tagNameCheck,Ze)||$n.tagNameCheck instanceof Function&&$n.tagNameCheck(Ze))&&($n.attributeNameCheck instanceof RegExp&&Z($n.attributeNameCheck,It)||$n.attributeNameCheck instanceof Function&&$n.attributeNameCheck(It))||It==="is"&&$n.allowCustomizedBuiltInElements&&($n.tagNameCheck instanceof RegExp&&Z($n.tagNameCheck,bn)||$n.tagNameCheck instanceof Function&&$n.tagNameCheck(bn))))return!1}else if(!bB[It]){if(!Z(Ua,_(bn,fb,""))){if(!((It==="src"||It==="xlink:href"||It==="href")&&Ze!=="script"&&C(bn,"data:")===0&&E6[Ze])){if(!(es&&!Z(xr,_(bn,fb,"")))){if(bn)return!1}}}}}}return!0},B6=function(Ze){return Ze!=="annotation-xml"&&x(Ze,Gc)},Y6=function(Ze){np("beforeSanitizeAttributes",Ze,null);let{attributes:It}=Ze;if(!It)return;let bn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:oo},Bo=It.length;for(;Bo--;){let Da=It[Bo],{name:xa,namespaceURI:hl,value:wh}=Da,XL=Ks(xa),Xc=xa==="value"?wh:V(wh);if(bn.attrName=XL,bn.attrValue=Xc,bn.keepAttr=!0,bn.forceKeepAttr=void 0,np("uponSanitizeAttribute",Ze,bn),Xc=bn.attrValue,bn.forceKeepAttr||(gM(xa,Ze),!bn.keepAttr))continue;if(!pb&&Z(/\/>/i,Xc)){gM(xa,Ze);continue}if(mM&&Z(/((--!?|])>)|<\/(style|title)/i,Xc)){gM(xa,Ze);continue}bb&&u([Bi,us,yr],H6=>{Xc=_(Xc,H6," ")});let O6=Ks(Ze.nodeName);if(D6(O6,XL,Xc)){if(Z6&&(XL==="id"||XL==="name")&&(gM(xa,Ze),Xc=NSe+Xc),dt&&typeof Nr=="object"&&typeof Nr.getAttributeType=="function"&&!hl)switch(Nr.getAttributeType(O6,XL)){case"TrustedHTML":{Xc=dt.createHTML(Xc);break}case"TrustedScriptURL":{Xc=dt.createScriptURL(Xc);break}}try{hl?Ze.setAttributeNS(hl,xa,Xc):Ze.setAttribute(xa,Xc),N6(Ze)?vh(Ze):m($e.removed)}catch{}}}np("afterSanitizeAttributes",Ze,null)},HSe=function Rn(Ze){let It=null,bn=M6(Ze);for(np("beforeSanitizeShadowDOM",Ze,null);It=bn.nextNode();)np("uponSanitizeShadowNode",It,null),!U6(It)&&(It.content instanceof pe&&Rn(It.content),Y6(It));np("afterSanitizeShadowDOM",Ze,null)};return $e.sanitize=function(Rn){let Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},It=null,bn=null,Bo=null,Da=null;if(gB=!Rn,gB&&(Rn=""),typeof Rn!="string"&&!k6(Rn))if(typeof Rn.toString=="function"){if(Rn=Rn.toString(),typeof Rn!="string")throw G("dirty is not a string, aborting")}else throw G("toString is not a function");if(!$e.isSupported)return Rn;if(hB||xB(Ze),$e.removed=[],typeof Rn=="string"&&(GL=!1),GL){if(Rn.nodeName){let wh=Ks(Rn.nodeName);if(!dr[wh]||Ec[wh])throw G("root node is forbidden and cannot be sanitized in-place")}}else if(Rn instanceof Dt)It=A6(""),bn=It.ownerDocument.importNode(Rn,!0),bn.nodeType===Pe.element&&bn.nodeName==="BODY"||bn.nodeName==="HTML"?It=bn:It.appendChild(bn);else{if(!yS&&!bb&&!ky&&Rn.indexOf("<")===-1)return dt&&fM?dt.createHTML(Rn):Rn;if(It=A6(Rn),!It)return yS?null:fM?Bt:""}It&&fB&&vh(It.firstChild);let xa=M6(GL?Rn:It);for(;Bo=xa.nextNode();)U6(Bo)||(Bo.content instanceof pe&&HSe(Bo.content),Y6(Bo));if(GL)return Rn;if(yS){if(hM)for(Da=nr.call(It.ownerDocument);It.firstChild;)Da.appendChild(It.firstChild);else Da=It;return(oo.shadowroot||oo.shadowrootmode)&&(Da=ka.call(je,Da,!0)),Da}let hl=ky?It.outerHTML:It.innerHTML;return ky&&dr["!doctype"]&&It.ownerDocument&&It.ownerDocument.doctype&&It.ownerDocument.doctype.name&&Z(Se,It.ownerDocument.doctype.name)&&(hl=" -`+hl),bb&&u([Bi,us,yr],wh=>{hl=_(hl,wh," ")}),dt&&fM?dt.createHTML(hl):hl},$e.setConfig=function(){let Rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xB(Rn),hB=!0},$e.clearConfig=function(){SS=null,hB=!1},$e.isValidAttribute=function(Rn,Ze,It){SS||xB({});let bn=Ks(Rn),Bo=Ks(Ze);return D6(bn,Bo,It)},$e.addHook=function(Rn,Ze){typeof Ze=="function"&&(io[Rn]=io[Rn]||[],p(io[Rn],Ze))},$e.removeHook=function(Rn){if(io[Rn])return m(io[Rn])},$e.removeHooks=function(Rn){io[Rn]&&(io[Rn]=[])},$e.removeAllHooks=function(){io={}},$e}var ht=Ot();return ht})});var yoe=Ic((Iln,uH)=>{"use strict";var Wln=T(S());uH.exports=t5;uH.exports.default=t5;function t5(e,t,n){n=n||2;var i=t&&t.length,o=i?t[0]*n:e.length,r=poe(e,0,o,n,!0),s=[];if(!r||r.next===r.prev)return s;var a,c,d,u,m,p,g;if(i&&(r=l9e(e,t,r,n)),e.length>80*n){a=d=e[0],c=u=e[1];for(var f=n;fd&&(d=m),p>u&&(u=p);g=Math.max(d-a,u-c),g=g!==0?32767/g:0}return GX(r,s,n,a,c,g,0),s}function poe(e,t,n,i,o){var r,s;if(o===dH(e,t,n,i)>0)for(r=t;r=t;r-=i)s=foe(r,e[r],e[r+1],s);return s&&n5(s,s.next)&&(XX(s),s=s.next),s}function $x(e,t){if(!e)return e;t||(t=e);var n=e,i;do if(i=!1,!n.steiner&&(n5(n,n.next)||Lr(n.prev,n,n.next)===0)){if(XX(n),n=t=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==t);return t}function GX(e,t,n,i,o,r,s){if(e){!s&&r&&f9e(e,i,o,r);for(var a=e,c,d;e.prev!==e.next;){if(c=e.prev,d=e.next,r?s9e(e,i,o,r):r9e(e)){t.push(c.i/n|0),t.push(e.i/n|0),t.push(d.i/n|0),XX(e),e=d.next,a=d.next;continue}if(e=d,e===a){s?s===1?(e=a9e($x(e),t,n),GX(e,t,n,i,o,r,2)):s===2&&c9e(e,t,n,i,o,r):GX($x(e),t,n,i,o,r,1);break}}}}function r9e(e){var t=e.prev,n=e,i=e.next;if(Lr(t,n,i)>=0)return!1;for(var o=t.x,r=n.x,s=i.x,a=t.y,c=n.y,d=i.y,u=or?o>s?o:s:r>s?r:s,g=a>c?a>d?a:d:c>d?c:d,f=i.next;f!==t;){if(f.x>=u&&f.x<=p&&f.y>=m&&f.y<=g&&_C(o,a,r,c,s,d,f.x,f.y)&&Lr(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function s9e(e,t,n,i){var o=e.prev,r=e,s=e.next;if(Lr(o,r,s)>=0)return!1;for(var a=o.x,c=r.x,d=s.x,u=o.y,m=r.y,p=s.y,g=ac?a>d?a:d:c>d?c:d,_=u>m?u>p?u:p:m>p?m:p,C=cH(g,f,t,n,i),V=cH(x,_,t,n,i),L=e.prevZ,Z=e.nextZ;L&&L.z>=C&&Z&&Z.z<=V;){if(L.x>=g&&L.x<=x&&L.y>=f&&L.y<=_&&L!==o&&L!==s&&_C(a,u,c,m,d,p,L.x,L.y)&&Lr(L.prev,L,L.next)>=0||(L=L.prevZ,Z.x>=g&&Z.x<=x&&Z.y>=f&&Z.y<=_&&Z!==o&&Z!==s&&_C(a,u,c,m,d,p,Z.x,Z.y)&&Lr(Z.prev,Z,Z.next)>=0))return!1;Z=Z.nextZ}for(;L&&L.z>=C;){if(L.x>=g&&L.x<=x&&L.y>=f&&L.y<=_&&L!==o&&L!==s&&_C(a,u,c,m,d,p,L.x,L.y)&&Lr(L.prev,L,L.next)>=0)return!1;L=L.prevZ}for(;Z&&Z.z<=V;){if(Z.x>=g&&Z.x<=x&&Z.y>=f&&Z.y<=_&&Z!==o&&Z!==s&&_C(a,u,c,m,d,p,Z.x,Z.y)&&Lr(Z.prev,Z,Z.next)>=0)return!1;Z=Z.nextZ}return!0}function a9e(e,t,n){var i=e;do{var o=i.prev,r=i.next.next;!n5(o,r)&&boe(o,i,i.next,r)&&EX(o,r)&&EX(r,o)&&(t.push(o.i/n|0),t.push(i.i/n|0),t.push(r.i/n|0),XX(i),XX(i.next),i=e=r),i=i.next}while(i!==e);return $x(i)}function c9e(e,t,n,i,o,r){var s=e;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&g9e(s,a)){var c=goe(s,a);s=$x(s,s.next),c=$x(c,c.next),GX(s,t,n,i,o,r,0),GX(c,t,n,i,o,r,0);return}a=a.next}s=s.next}while(s!==e)}function l9e(e,t,n,i){var o=[],r,s,a,c,d;for(r=0,s=t.length;r=n.next.y&&n.next.y!==n.y){var a=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&a>r&&(r=a,s=n.x=n.x&&n.x>=d&&i!==n.x&&_C(os.x||n.x===s.x&&h9e(s,n)))&&(s=n,m=p)),n=n.next;while(n!==c);return s}function h9e(e,t){return Lr(e.prev,e,t.prev)<0&&Lr(t.next,e,e.next)<0}function f9e(e,t,n,i){var o=e;do o.z===0&&(o.z=cH(o.x,o.y,t,n,i)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,p9e(o)}function p9e(e){var t,n,i,o,r,s,a,c,d=1;do{for(n=e,e=null,r=null,s=0;n;){for(s++,i=n,a=0,t=0;t0||c>0&&i;)a!==0&&(c===0||!i||n.z<=i.z)?(o=n,n=n.nextZ,a--):(o=i,i=i.nextZ,c--),r?r.nextZ=o:e=o,o.prevZ=r,r=o;n=i}r.nextZ=null,d*=2}while(s>1);return e}function cH(e,t,n,i,o){return e=(e-n)*o|0,t=(t-i)*o|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function b9e(e){var t=e,n=e;do(t.x=(e-s)*(r-a)&&(e-s)*(i-a)>=(n-s)*(t-a)&&(n-s)*(r-a)>=(o-s)*(i-a)}function g9e(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!y9e(e,t)&&(EX(e,t)&&EX(t,e)&&x9e(e,t)&&(Lr(e.prev,e,t.prev)||Lr(e,t.prev,t))||n5(e,t)&&Lr(e.prev,e,e.next)>0&&Lr(t.prev,t,t.next)>0)}function Lr(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function n5(e,t){return e.x===t.x&&e.y===t.y}function boe(e,t,n,i){var o=e5(Lr(e,t,n)),r=e5(Lr(e,t,i)),s=e5(Lr(n,i,e)),a=e5(Lr(n,i,t));return!!(o!==r&&s!==a||o===0&&$N(e,n,t)||r===0&&$N(e,i,t)||s===0&&$N(n,e,i)||a===0&&$N(n,t,i))}function $N(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function e5(e){return e>0?1:e<0?-1:0}function y9e(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&boe(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function EX(e,t){return Lr(e.prev,e,e.next)<0?Lr(e,t,e.next)>=0&&Lr(e,e.prev,t)>=0:Lr(e,t,e.prev)<0||Lr(e,e.next,t)<0}function x9e(e,t){var n=e,i=!1,o=(e.x+t.x)/2,r=(e.y+t.y)/2;do n.y>r!=n.next.y>r&&n.next.y!==n.y&&o<(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==e);return i}function goe(e,t){var n=new lH(e.i,e.x,e.y),i=new lH(t.i,t.x,t.y),o=e.next,r=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,i.next=n,n.prev=i,r.next=i,i.prev=r,i}function foe(e,t,n,i){var o=new lH(e,t,n);return i?(o.next=i.next,o.prev=i,i.next.prev=o,i.next=o):(o.prev=o,o.next=o),o}function XX(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function lH(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}t5.deviation=function(e,t,n,i){var o=t&&t.length,r=o?t[0]*n:e.length,s=Math.abs(dH(e,0,r,n));if(o)for(var a=0,c=t.length;a0&&(i+=e[o-1].length,n.holes.push(i))}return n}});var Rae=Ic((yIn,Lae)=>{"use strict";var xIn=T(S());Lae.exports=tYe;var HW=1e20;function tYe(e,t){t||(t={});var n=t.cutoff==null?.25:t.cutoff,i=t.radius==null?8:t.radius,o=t.channel||0,r,s,a,c,d,u,m,p,g,f,x;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");r=t.width,s=t.height,c=e,t.stride?u=t.stride:u=Math.floor(e.length/r/s)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(p=e,m=p.getContext("2d"),r=p.width,s=p.height,g=m.getImageData(0,0,r,s),c=g.data,u=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(p=e.canvas,m=e,r=p.width,s=p.height,g=m.getImageData(0,0,r,s),c=g.data,u=4):window.ImageData&&e instanceof window.ImageData&&(g=e,r=e.width,s=e.height,c=g.data,u=4);if(a=Math.max(r,s),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(d=c,c=Array(r*s),f=0,x=Math.floor(d.length/u);f{var NIn=T(S());function mYe(){var e=0,t=1,n=2,i=3,o=4,r=5,s=6,a=7,c=8,d=9,u=10,m=11,p=12,g=13,f=14,x=15,_=16,C=17,V=0,L=1,Z=2,G=3,X=4;function v(b,R){return 55296<=b.charCodeAt(R)&&b.charCodeAt(R)<=56319&&56320<=b.charCodeAt(R+1)&&b.charCodeAt(R+1)<=57343}function P(b,R){R===void 0&&(R=0);var E=b.charCodeAt(R);if(55296<=E&&E<=56319&&R=1){var I=b.charCodeAt(R-1),w=E;return 55296<=I&&I<=56319?(I-55296)*1024+(w-56320)+65536:w}return E}function F(b,R,E){var I=[b].concat(R).concat([E]),w=I[I.length-2],N=E,B=I.lastIndexOf(f);if(B>1&&I.slice(1,B).every(function(k){return k==i})&&[i,g,C].indexOf(b)==-1)return Z;var U=I.lastIndexOf(o);if(U>0&&I.slice(1,U).every(function(k){return k==o})&&[p,o].indexOf(w)==-1)return I.filter(function(k){return k==o}).length%2==1?G:X;if(w==e&&N==t)return V;if(w==n||w==e||w==t)return N==f&&R.every(function(k){return k==i})?Z:L;if(N==n||N==e||N==t)return L;if(w==s&&(N==s||N==a||N==d||N==u))return V;if((w==d||w==a)&&(N==a||N==c))return V;if((w==u||w==c)&&N==c)return V;if(N==i||N==x)return V;if(N==r)return V;if(w==p)return V;var O=I.indexOf(i)!=-1?I.lastIndexOf(i)-1:I.length-2;return[g,C].indexOf(I[O])!=-1&&I.slice(O+1,-1).every(function(k){return k==i})&&N==f||w==x&&[_,C].indexOf(N)!=-1?V:R.indexOf(o)!=-1?Z:w==o&&N==o?V:L}this.nextBreak=function(b,R){if(R===void 0&&(R=0),R<0)return 0;if(R>=b.length-1)return b.length;for(var E=A(P(b,R)),I=[],w=R+1;w{var Wei=T(S());(function(e,t){typeof qK=="object"&&typeof $K<"u"?$K.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).RBush=t()})(qK,function(){"use strict";function e(_,C,V,L,Z){(function G(X,v,P,F,A){for(;F>P;){if(F-P>600){var b=F-P+1,R=v-P+1,E=Math.log(b),I=.5*Math.exp(2*E/3),w=.5*Math.sqrt(E*I*(b-I)/b)*(R-b/2<0?-1:1),N=Math.max(P,Math.floor(v-R*I/b+w)),B=Math.min(F,Math.floor(v+(b-R)*I/b+w));G(X,v,N,B,A)}var U=X[v],O=P,k=F;for(t(X,P,v),A(X[F],U)>0&&t(X,P,F);O0;)k--}A(X[P],U)===0?t(X,P,k):t(X,++k,F),k<=v&&(P=k+1),v<=k&&(F=k-1)}})(_,C,V||0,L||_.length-1,Z||n)}function t(_,C,V){var L=_[C];_[C]=_[V],_[V]=L}function n(_,C){return _C?1:0}var i=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(_,C,V){if(!V)return C.indexOf(_);for(var L=0;L=_.minX&&C.maxY>=_.minY}function f(_){return{children:_,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(_,C,V,L,Z){for(var G=[C,V];G.length;)if(!((V=G.pop())-(C=G.pop())<=L)){var X=C+Math.ceil((V-C)/L/2)*L;e(_,X,C,V,Z),G.push(C,X,X,V)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(_){var C=this.data,V=[];if(!g(_,C))return V;for(var L=this.toBBox,Z=[];C;){for(var G=0;G=0&&Z[C].children.length>this._maxEntries;)this._split(Z,C),C--;this._adjustParentBBoxes(L,Z,C)},i.prototype._split=function(_,C){var V=_[C],L=V.children.length,Z=this._minEntries;this._chooseSplitAxis(V,Z,L);var G=this._chooseSplitIndex(V,Z,L),X=f(V.children.splice(G,V.children.length-G));X.height=V.height,X.leaf=V.leaf,r(V,this.toBBox),r(X,this.toBBox),C?_[C-1].children.push(X):this._splitRoot(V,X)},i.prototype._splitRoot=function(_,C){this.data=f([_,C]),this.data.height=_.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(_,C,V){for(var L,Z,G,X,v,P,F,A=1/0,b=1/0,R=C;R<=V-C;R++){var E=s(_,0,R,this.toBBox),I=s(_,R,V,this.toBBox),w=(Z=E,G=I,X=void 0,v=void 0,P=void 0,F=void 0,X=Math.max(Z.minX,G.minX),v=Math.max(Z.minY,G.minY),P=Math.min(Z.maxX,G.maxX),F=Math.min(Z.maxY,G.maxY),Math.max(0,P-X)*Math.max(0,F-v)),N=u(E)+u(I);w=C;A--){var b=_.children[A];a(X,_.leaf?Z(b):b),v+=m(X)}return v},i.prototype._adjustParentBBoxes=function(_,C,V){for(var L=V;L>=0;L--)a(C[L],_)},i.prototype._condense=function(_){for(var C=_.length-1,V=void 0;C>=0;C--)_[C].children.length===0?C>0?(V=_[C-1].children).splice(V.indexOf(_[C]),1):this.clear():r(_[C],this.toBBox)},i})});var E4=Ic((exports,module)=>{var $xi=T(S());/*! - * protobuf.js v7.3.0 (c) 2016, daniel wirtz - * compiled fri, 10 may 2024 03:38:34 utc + */(function(e,t){"use strict";typeof XM=="object"&&XM.exports?XM.exports=t(aq(),lq(),uq()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(mq,function(e,t,n,i){"use strict";var o=i&&i.URI;function r(L,E){var I=arguments.length>=1,w=arguments.length>=2;if(!(this instanceof r))return I?w?new r(L,E):new r(L):new r;if(L===void 0){if(I)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?L=location.href+"":L=""}if(L===null&&I)throw new TypeError("null is not a valid argument for URI");return this.href(L),E!==void 0?this.absoluteTo(E):this}function s(L){return/^[0-9]+$/.test(L)}r.version="1.19.11";var a=r.prototype,c=Object.prototype.hasOwnProperty;function d(L){return L.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function u(L){return L===void 0?"Undefined":String(Object.prototype.toString.call(L)).slice(8,-1)}function m(L){return u(L)==="Array"}function p(L,E){var I={},w,N;if(u(E)==="RegExp")I=null;else if(m(E))for(w=0,N=E.length;w]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(L){if(!(!L||!L.nodeName)){var E=L.nodeName.toLowerCase();if(!(E==="input"&&L.type!=="image"))return r.domAttributes[E]}};function _(L){return escape(L)}function C(L){return encodeURIComponent(L).replace(/[!'()*]/g,_).replace(/\*/g,"%2A")}r.encode=C,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=C,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(L,E){var I=r.encode(L+"");return E===void 0&&(E=r.escapeQuerySpace),E?I.replace(/%20/g,"+"):I},r.decodeQuery=function(L,E){L+="",E===void 0&&(E=r.escapeQuerySpace);try{return r.decode(E?L.replace(/\+/g,"%20"):L)}catch{return L}};var V={encode:"encode",decode:"decode"},Z,R=function(L,E){return function(I){try{return r[E](I+"").replace(r.characters[L][E].expression,function(w){return r.characters[L][E].map[w]})}catch{return I}}};for(Z in V)r[Z+"PathSegment"]=R("pathname",V[Z]),r[Z+"UrnPathSegment"]=R("urnpath",V[Z]);var G=function(L,E,I){return function(w){var N;I?N=function(U){return r[E](r[I](U))}:N=r[E];for(var B=(w+"").split(L),k=0,O=B.length;k-1&&(E.fragment=L.substring(I+1)||null,L=L.substring(0,I)),I=L.indexOf("?"),I>-1&&(E.query=L.substring(I+1)||null,L=L.substring(0,I)),L=L.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),L=L.replace(/^[/\\]{2,}/i,"//"),L.substring(0,2)==="//"?(E.protocol=null,L=L.substring(2),L=r.parseAuthority(L,E)):(I=L.indexOf(":"),I>-1&&(E.protocol=L.substring(0,I)||null,E.protocol&&!E.protocol.match(r.protocol_expression)?E.protocol=void 0:L.substring(I+1,I+3).replace(/\\/g,"/")==="//"?(L=L.substring(I+3),L=r.parseAuthority(L,E)):(L=L.substring(I+1),E.urn=!0))),E.path=L,E},r.parseHost=function(L,E){L||(L=""),L=L.replace(/\\/g,"/");var I=L.indexOf("/"),w,N;if(I===-1&&(I=L.length),L.charAt(0)==="[")w=L.indexOf("]"),E.hostname=L.substring(1,w)||null,E.port=L.substring(w+2,I)||null,E.port==="/"&&(E.port=null);else{var B=L.indexOf(":"),k=L.indexOf("/"),O=L.indexOf(":",B+1);O!==-1&&(k===-1||O-1?N:L.length-1),k;return B>-1&&(N===-1||B-1?K=K.slice(0,j)+K.slice(j).replace(B,""):K=K.replace(B,""),!(K.length<=U[0].length)&&!(I.ignore&&I.ignore.test(K))){ee=J+K.length;var Se=E(K,J,ee,L);if(Se===void 0){w.lastIndex=ee;continue}Se=String(Se),L=L.slice(0,J)+Se+L.slice(ee),w.lastIndex=J+Se.length}}return w.lastIndex=0,L},r.ensureValidHostname=function(L,E){var I=!!L,w=!!E,N=!1;if(w&&(N=g(r.hostProtocols,E)),N&&!I)throw new TypeError("Hostname cannot be empty, if protocol is "+E);if(L&&L.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+L+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(L).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+L+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(L){if(L){var E=Number(L);if(!(s(E)&&E>0&&E<65536))throw new TypeError('Port "'+L+'" is not a valid port')}},r.noConflict=function(L){if(L){var E={URI:this.noConflict()};return i.URITemplate&&typeof i.URITemplate.noConflict=="function"&&(E.URITemplate=i.URITemplate.noConflict()),i.IPv6&&typeof i.IPv6.noConflict=="function"&&(E.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&typeof i.SecondLevelDomains.noConflict=="function"&&(E.SecondLevelDomains=i.SecondLevelDomains.noConflict()),E}else i.URI===this&&(i.URI=o);return this},a.build=function(L){return L===!0?this._deferred_build=!0:(L===void 0||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new r(this)},a.valueOf=a.toString=function(){return this.build(!1)._string};function W(L){return function(E,I){return E===void 0?this._parts[L]||"":(this._parts[L]=E||null,this.build(!I),this)}}function v(L,E){return function(I,w){return I===void 0?this._parts[L]||"":(I!==null&&(I=I+"",I.charAt(0)===E&&(I=I.substring(1))),this._parts[L]=I,this.build(!w),this)}}a.protocol=W("protocol"),a.username=W("username"),a.password=W("password"),a.hostname=W("hostname"),a.port=W("port"),a.query=v("query","?"),a.fragment=v("fragment","#"),a.search=function(L,E){var I=this.query(L,E);return typeof I=="string"&&I.length?"?"+I:I},a.hash=function(L,E){var I=this.fragment(L,E);return typeof I=="string"&&I.length?"#"+I:I},a.pathname=function(L,E){if(L===void 0||L===!0){var I=this._parts.path||(this._parts.hostname?"/":"");return L?(this._parts.urn?r.decodeUrnPath:r.decodePath)(I):I}else return this._parts.urn?this._parts.path=L?r.recodeUrnPath(L):"":this._parts.path=L?r.recodePath(L):"/",this.build(!E),this},a.path=a.pathname,a.href=function(L,E){var I;if(L===void 0)return this.toString();this._string="",this._parts=r._parts();var w=L instanceof r,N=typeof L=="object"&&(L.hostname||L.path||L.pathname);if(L.nodeName){var B=r.getDomAttribute(L);L=L[B]||"",N=!1}if(!w&&N&&L.pathname!==void 0&&(L=L.toString()),typeof L=="string"||L instanceof String)this._parts=r.parse(String(L),this._parts);else if(w||N){var k=w?L._parts:L;for(I in k)I!=="query"&&c.call(this._parts,I)&&(this._parts[I]=k[I]);k.query&&this.query(k.query,!1)}else throw new TypeError("invalid input");return this.build(!E),this},a.is=function(L){var E=!1,I=!1,w=!1,N=!1,B=!1,k=!1,O=!1,U=!this._parts.urn;switch(this._parts.hostname&&(U=!1,I=r.ip4_expression.test(this._parts.hostname),w=r.ip6_expression.test(this._parts.hostname),E=I||w,N=!E,B=N&&n&&n.has(this._parts.hostname),k=N&&r.idn_expression.test(this._parts.hostname),O=N&&r.punycode_expression.test(this._parts.hostname)),L.toLowerCase()){case"relative":return U;case"absolute":return!U;case"domain":case"name":return N;case"sld":return B;case"ip":return E;case"ip4":case"ipv4":case"inet4":return I;case"ip6":case"ipv6":case"inet6":return w;case"idn":return k;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return O}return null};var P=a.protocol,F=a.port,M=a.hostname;a.protocol=function(L,E){if(L&&(L=L.replace(/:(\/\/)?$/,""),!L.match(r.protocol_expression)))throw new TypeError('Protocol "'+L+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return P.call(this,L,E)},a.scheme=a.protocol,a.port=function(L,E){return this._parts.urn?L===void 0?"":this:(L!==void 0&&(L===0&&(L=null),L&&(L+="",L.charAt(0)===":"&&(L=L.substring(1)),r.ensureValidPort(L))),F.call(this,L,E))},a.hostname=function(L,E){if(this._parts.urn)return L===void 0?"":this;if(L!==void 0){var I={preventInvalidHostname:this._parts.preventInvalidHostname},w=r.parseHost(L,I);if(w!=="/")throw new TypeError('Hostname "'+L+'" contains characters other than [A-Z0-9.-]');L=I.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(L,this._parts.protocol)}return M.call(this,L,E)},a.origin=function(L,E){if(this._parts.urn)return L===void 0?"":this;if(L===void 0){var I=this.protocol(),w=this.authority();return w?(I?I+"://":"")+this.authority():""}else{var N=r(L);return this.protocol(N.protocol()).authority(N.authority()).build(!E),this}},a.host=function(L,E){if(this._parts.urn)return L===void 0?"":this;if(L===void 0)return this._parts.hostname?r.buildHost(this._parts):"";var I=r.parseHost(L,this._parts);if(I!=="/")throw new TypeError('Hostname "'+L+'" contains characters other than [A-Z0-9.-]');return this.build(!E),this},a.authority=function(L,E){if(this._parts.urn)return L===void 0?"":this;if(L===void 0)return this._parts.hostname?r.buildAuthority(this._parts):"";var I=r.parseAuthority(L,this._parts);if(I!=="/")throw new TypeError('Hostname "'+L+'" contains characters other than [A-Z0-9.-]');return this.build(!E),this},a.userinfo=function(L,E){if(this._parts.urn)return L===void 0?"":this;if(L===void 0){var I=r.buildUserinfo(this._parts);return I&&I.substring(0,I.length-1)}else return L[L.length-1]!=="@"&&(L+="@"),r.parseUserinfo(L,this._parts),this.build(!E),this},a.resource=function(L,E){var I;return L===void 0?this.path()+this.search()+this.hash():(I=r.parse(L),this._parts.path=I.path,this._parts.query=I.query,this._parts.fragment=I.fragment,this.build(!E),this)},a.subdomain=function(L,E){if(this._parts.urn)return L===void 0?"":this;if(L===void 0){if(!this._parts.hostname||this.is("IP"))return"";var I=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,I)||""}else{var w=this._parts.hostname.length-this.domain().length,N=this._parts.hostname.substring(0,w),B=new RegExp("^"+d(N));if(L&&L.charAt(L.length-1)!=="."&&(L+="."),L.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return L&&r.ensureValidHostname(L,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(B,L),this.build(!E),this}},a.domain=function(L,E){if(this._parts.urn)return L===void 0?"":this;if(typeof L=="boolean"&&(E=L,L=void 0),L===void 0){if(!this._parts.hostname||this.is("IP"))return"";var I=this._parts.hostname.match(/\./g);if(I&&I.length<2)return this._parts.hostname;var w=this._parts.hostname.length-this.tld(E).length-1;return w=this._parts.hostname.lastIndexOf(".",w-1)+1,this._parts.hostname.substring(w)||""}else{if(!L)throw new TypeError("cannot set domain empty");if(L.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(L,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=L;else{var N=new RegExp(d(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(N,L)}return this.build(!E),this}},a.tld=function(L,E){if(this._parts.urn)return L===void 0?"":this;if(typeof L=="boolean"&&(E=L,L=void 0),L===void 0){if(!this._parts.hostname||this.is("IP"))return"";var I=this._parts.hostname.lastIndexOf("."),w=this._parts.hostname.substring(I+1);return E!==!0&&n&&n.list[w.toLowerCase()]&&n.get(this._parts.hostname)||w}else{var N;if(L)if(L.match(/[^a-zA-Z0-9-]/))if(n&&n.is(L))N=new RegExp(d(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(N,L);else throw new TypeError('TLD "'+L+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");N=new RegExp(d(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(N,L)}else throw new TypeError("cannot set TLD empty");return this.build(!E),this}},a.directory=function(L,E){if(this._parts.urn)return L===void 0?"":this;if(L===void 0||L===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var I=this._parts.path.length-this.filename().length-1,w=this._parts.path.substring(0,I)||(this._parts.hostname?"/":"");return L?r.decodePath(w):w}else{var N=this._parts.path.length-this.filename().length,B=this._parts.path.substring(0,N),k=new RegExp("^"+d(B));return this.is("relative")||(L||(L="/"),L.charAt(0)!=="/"&&(L="/"+L)),L&&L.charAt(L.length-1)!=="/"&&(L+="/"),L=r.recodePath(L),this._parts.path=this._parts.path.replace(k,L),this.build(!E),this}},a.filename=function(L,E){if(this._parts.urn)return L===void 0?"":this;if(typeof L!="string"){if(!this._parts.path||this._parts.path==="/")return"";var I=this._parts.path.lastIndexOf("/"),w=this._parts.path.substring(I+1);return L?r.decodePathSegment(w):w}else{var N=!1;L.charAt(0)==="/"&&(L=L.substring(1)),L.match(/\.?\//)&&(N=!0);var B=new RegExp(d(this.filename())+"$");return L=r.recodePath(L),this._parts.path=this._parts.path.replace(B,L),N?this.normalizePath(E):this.build(!E),this}},a.suffix=function(L,E){if(this._parts.urn)return L===void 0?"":this;if(L===void 0||L===!0){if(!this._parts.path||this._parts.path==="/")return"";var I=this.filename(),w=I.lastIndexOf("."),N,B;return w===-1?"":(N=I.substring(w+1),B=/^[a-z0-9%]+$/i.test(N)?N:"",L?r.decodePathSegment(B):B)}else{L.charAt(0)==="."&&(L=L.substring(1));var k=this.suffix(),O;if(k)L?O=new RegExp(d(k)+"$"):O=new RegExp(d("."+k)+"$");else{if(!L)return this;this._parts.path+="."+r.recodePath(L)}return O&&(L=r.recodePath(L),this._parts.path=this._parts.path.replace(O,L)),this.build(!E),this}},a.segment=function(L,E,I){var w=this._parts.urn?":":"/",N=this.path(),B=N.substring(0,1)==="/",k=N.split(w);if(L!==void 0&&typeof L!="number"&&(I=E,E=L,L=void 0),L!==void 0&&typeof L!="number")throw new Error('Bad segment "'+L+'", must be 0-based integer');if(B&&k.shift(),L<0&&(L=Math.max(k.length+L,0)),E===void 0)return L===void 0?k:k[L];if(L===null||k[L]===void 0)if(m(E)){k=[];for(var O=0,U=E.length;O{var A8t=S(T());/*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/LICENSE */(function(e,t){typeof ZO=="object"&&typeof LO<"u"?LO.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.DOMPurify=t())})(ZO,function(){"use strict";let{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object,{freeze:r,seal:s,create:a}=Object,{apply:c,construct:d}=typeof Reflect<"u"&&Reflect;r||(r=function($e){return $e}),s||(s=function($e){return $e}),c||(c=function($e,Qe,je){return $e.apply(Qe,je)}),d||(d=function($e,Qe){return new $e(...Qe)});let u=W(Array.prototype.forEach),m=W(Array.prototype.pop),p=W(Array.prototype.push),g=W(String.prototype.toLowerCase),f=W(String.prototype.toString),x=W(String.prototype.match),_=W(String.prototype.replace),C=W(String.prototype.indexOf),V=W(String.prototype.trim),Z=W(Object.prototype.hasOwnProperty),R=W(RegExp.prototype.test),G=v(TypeError);function W(Ae){return function($e){for(var Qe=arguments.length,je=new Array(Qe>1?Qe-1:0),Ut=1;Ut2&&arguments[2]!==void 0?arguments[2]:g;t&&t(Ae,null);let je=$e.length;for(;je--;){let Ut=$e[je];if(typeof Ut=="string"){let pe=Qe(Ut);pe!==Ut&&(n($e)||($e[je]=pe),Ut=pe)}Ae[Ut]=!0}return Ae}function F(Ae){for(let $e=0;$e/gm),j=s(/\${[\w\W]*}/gm),q=s(/^data-[\-\w.\u00B7-\uFFFF]/),be=s(/^aria-[\-\w]+$/),Se=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ae=s(/^(?:\w+script|data):/i),ye=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Te=s(/^html$/i),Ze=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var We=Object.freeze({__proto__:null,MUSTACHE_EXPR:ee,ERB_EXPR:K,TMPLIT_EXPR:j,DATA_ATTR:q,ARIA_ATTR:be,IS_ALLOWED_URI:Se,IS_SCRIPT_OR_DATA:ae,ATTR_WHITESPACE:ye,DOCTYPE_NAME:Te,CUSTOM_ELEMENT:Ze});let Pe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ue=function(){return typeof window>"u"?null:window},Pt=function($e,Qe){if(typeof $e!="object"||typeof $e.createPolicy!="function")return null;let je=null,Ut="data-tt-policy-suffix";Qe&&Qe.hasAttribute(Ut)&&(je=Qe.getAttribute(Ut));let pe="dompurify"+(je?"#"+je:"");try{return $e.createPolicy(pe,{createHTML(Ve){return Ve},createScriptURL(Ve){return Ve}})}catch{return console.warn("TrustedTypes policy "+pe+" could not be created."),null}};function Ot(){let Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ue(),$e=Ln=>Ot(Ln);if($e.version="3.1.5",$e.removed=[],!Ae||!Ae.document||Ae.document.nodeType!==Pe.document)return $e.isSupported=!1,$e;let{document:Qe}=Ae,je=Qe,Ut=je.currentScript,{DocumentFragment:pe,HTMLTemplateElement:Ve,Node:Dt,Element:bt,NodeFilter:li,NamedNodeMap:Vo=Ae.NamedNodeMap||Ae.MozNamedAttrMap,HTMLFormElement:Gs,DOMParser:Hs,trustedTypes:Ur}=Ae,ts=bt.prototype,ke=b(ts,"cloneNode"),ot=b(ts,"nextSibling"),nt=b(ts,"childNodes"),qe=b(ts,"parentNode");if(typeof Ve=="function"){let Ln=Qe.createElement("template");Ln.content&&Ln.content.ownerDocument&&(Qe=Ln.content.ownerDocument)}let dt,Bt="",{implementation:Zn,createNodeIterator:Zo,createDocumentFragment:ir,getElementsByTagName:Ua}=Qe,{importNode:ka}=je,oo={};$e.isSupported=typeof e=="function"&&typeof qe=="function"&&Zn&&Zn.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Yi,ERB_EXPR:hs,TMPLIT_EXPR:xr,DATA_ATTR:ul,ARIA_ATTR:Bo,IS_SCRIPT_OR_DATA:_r,ATTR_WHITESPACE:h0,CUSTOM_ELEMENT:Rc}=We,{IS_ALLOWED_URI:Da}=We,ur=null,xa=P({},[...L,...E,...I,...N,...k]),ro=null,RZ=P({},[...O,...U,...J,...z]),$n=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Gc=null,td=null,My=!0,Sr=!0,ns=!1,f0=!0,p0=!1,hM=!0,Ny=!1,fY=!1,pY=!1,gT=!1,fM=!1,pM=!1,Z6=!0,L6=!1,YTe="user-content-",bY=!0,GZ=!1,yT={},xT=null,R6=P({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),G6=null,E6=P({},["audio","video","img","source","image","track"]),gY=null,W6=P({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bM="http://www.w3.org/1998/Math/MathML",gM="http://www.w3.org/2000/svg",ep="http://www.w3.org/1999/xhtml",_T=ep,yY=!1,xY=null,OTe=P({},[bM,gM,ep],f),EZ=null,zTe=["application/xhtml+xml","text/html"],KTe="text/html",Js=null,ST=null,HTe=Qe.createElement("form"),I6=function(Re){return Re instanceof RegExp||Re instanceof Function},_Y=function(){let Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ST&&ST===Re)){if((!Re||typeof Re!="object")&&(Re={}),Re=M(Re),EZ=zTe.indexOf(Re.PARSER_MEDIA_TYPE)===-1?KTe:Re.PARSER_MEDIA_TYPE,Js=EZ==="application/xhtml+xml"?f:g,ur=Z(Re,"ALLOWED_TAGS")?P({},Re.ALLOWED_TAGS,Js):xa,ro=Z(Re,"ALLOWED_ATTR")?P({},Re.ALLOWED_ATTR,Js):RZ,xY=Z(Re,"ALLOWED_NAMESPACES")?P({},Re.ALLOWED_NAMESPACES,f):OTe,gY=Z(Re,"ADD_URI_SAFE_ATTR")?P(M(W6),Re.ADD_URI_SAFE_ATTR,Js):W6,G6=Z(Re,"ADD_DATA_URI_TAGS")?P(M(E6),Re.ADD_DATA_URI_TAGS,Js):E6,xT=Z(Re,"FORBID_CONTENTS")?P({},Re.FORBID_CONTENTS,Js):R6,Gc=Z(Re,"FORBID_TAGS")?P({},Re.FORBID_TAGS,Js):{},td=Z(Re,"FORBID_ATTR")?P({},Re.FORBID_ATTR,Js):{},yT=Z(Re,"USE_PROFILES")?Re.USE_PROFILES:!1,My=Re.ALLOW_ARIA_ATTR!==!1,Sr=Re.ALLOW_DATA_ATTR!==!1,ns=Re.ALLOW_UNKNOWN_PROTOCOLS||!1,f0=Re.ALLOW_SELF_CLOSE_IN_ATTR!==!1,p0=Re.SAFE_FOR_TEMPLATES||!1,hM=Re.SAFE_FOR_XML!==!1,Ny=Re.WHOLE_DOCUMENT||!1,gT=Re.RETURN_DOM||!1,fM=Re.RETURN_DOM_FRAGMENT||!1,pM=Re.RETURN_TRUSTED_TYPE||!1,pY=Re.FORCE_BODY||!1,Z6=Re.SANITIZE_DOM!==!1,L6=Re.SANITIZE_NAMED_PROPS||!1,bY=Re.KEEP_CONTENT!==!1,GZ=Re.IN_PLACE||!1,Da=Re.ALLOWED_URI_REGEXP||Se,_T=Re.NAMESPACE||ep,$n=Re.CUSTOM_ELEMENT_HANDLING||{},Re.CUSTOM_ELEMENT_HANDLING&&I6(Re.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($n.tagNameCheck=Re.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Re.CUSTOM_ELEMENT_HANDLING&&I6(Re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($n.attributeNameCheck=Re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Re.CUSTOM_ELEMENT_HANDLING&&typeof Re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($n.allowCustomizedBuiltInElements=Re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),p0&&(Sr=!1),fM&&(gT=!0),yT&&(ur=P({},k),ro=[],yT.html===!0&&(P(ur,L),P(ro,O)),yT.svg===!0&&(P(ur,E),P(ro,U),P(ro,z)),yT.svgFilters===!0&&(P(ur,I),P(ro,U),P(ro,z)),yT.mathMl===!0&&(P(ur,N),P(ro,J),P(ro,z))),Re.ADD_TAGS&&(ur===xa&&(ur=M(ur)),P(ur,Re.ADD_TAGS,Js)),Re.ADD_ATTR&&(ro===RZ&&(ro=M(ro)),P(ro,Re.ADD_ATTR,Js)),Re.ADD_URI_SAFE_ATTR&&P(gY,Re.ADD_URI_SAFE_ATTR,Js),Re.FORBID_CONTENTS&&(xT===R6&&(xT=M(xT)),P(xT,Re.FORBID_CONTENTS,Js)),bY&&(ur["#text"]=!0),Ny&&P(ur,["html","head","body"]),ur.table&&(P(ur,["tbody"]),delete Gc.tbody),Re.TRUSTED_TYPES_POLICY){if(typeof Re.TRUSTED_TYPES_POLICY.createHTML!="function")throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Re.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');dt=Re.TRUSTED_TYPES_POLICY,Bt=dt.createHTML("")}else dt===void 0&&(dt=Pt(Ur,Ut)),dt!==null&&typeof Bt=="string"&&(Bt=dt.createHTML(""));r&&r(Re),ST=Re}},X6=P({},["mi","mo","mn","ms","mtext"]),P6=P({},["foreignobject","annotation-xml"]),JTe=P({},["title","style","font","a","script"]),v6=P({},[...E,...I,...w]),w6=P({},[...N,...B]),QTe=function(Re){let It=qe(Re);(!It||!It.tagName)&&(It={namespaceURI:_T,tagName:"template"});let bn=g(Re.tagName),Yo=g(It.tagName);return xY[Re.namespaceURI]?Re.namespaceURI===gM?It.namespaceURI===ep?bn==="svg":It.namespaceURI===bM?bn==="svg"&&(Yo==="annotation-xml"||X6[Yo]):!!v6[bn]:Re.namespaceURI===bM?It.namespaceURI===ep?bn==="math":It.namespaceURI===gM?bn==="math"&&P6[Yo]:!!w6[bn]:Re.namespaceURI===ep?It.namespaceURI===gM&&!P6[Yo]||It.namespaceURI===bM&&!X6[Yo]?!1:!w6[bn]&&(JTe[bn]||!v6[bn]):!!(EZ==="application/xhtml+xml"&&xY[Re.namespaceURI]):!1},Ph=function(Re){p($e.removed,{element:Re});try{Re.parentNode.removeChild(Re)}catch{Re.remove()}},yM=function(Re,It){try{p($e.removed,{attribute:It.getAttributeNode(Re),from:It})}catch{p($e.removed,{attribute:null,from:It})}if(It.removeAttribute(Re),Re==="is"&&!ro[Re])if(gT||fM)try{Ph(It)}catch{}else try{It.setAttribute(Re,"")}catch{}},F6=function(Re){let It=null,bn=null;if(pY)Re=""+Re;else{let _a=x(Re,/^[\r\n\t ]+/);bn=_a&&_a[0]}EZ==="application/xhtml+xml"&&_T===ep&&(Re=''+Re+"");let Yo=dt?dt.createHTML(Re):Re;if(_T===ep)try{It=new Hs().parseFromString(Yo,EZ)}catch{}if(!It||!It.documentElement){It=Zn.createDocument(_T,"template",null);try{It.documentElement.innerHTML=yY?Bt:Yo}catch{}}let Ba=It.body||It.documentElement;return Re&&bn&&Ba.insertBefore(Qe.createTextNode(bn),Ba.childNodes[0]||null),_T===ep?Ua.call(It,Ny?"html":"body")[0]:Ny?It.documentElement:Ba},A6=function(Re){return Zo.call(Re.ownerDocument||Re,Re,li.SHOW_ELEMENT|li.SHOW_COMMENT|li.SHOW_TEXT|li.SHOW_PROCESSING_INSTRUCTION|li.SHOW_CDATA_SECTION,null)},M6=function(Re){return Re instanceof Gs&&(typeof Re.nodeName!="string"||typeof Re.textContent!="string"||typeof Re.removeChild!="function"||!(Re.attributes instanceof Vo)||typeof Re.removeAttribute!="function"||typeof Re.setAttribute!="function"||typeof Re.namespaceURI!="string"||typeof Re.insertBefore!="function"||typeof Re.hasChildNodes!="function")},N6=function(Re){return typeof Dt=="function"&&Re instanceof Dt},tp=function(Re,It,bn){oo[Re]&&u(oo[Re],Yo=>{Yo.call($e,It,bn,ST)})},U6=function(Re){let It=null;if(tp("beforeSanitizeElements",Re,null),M6(Re))return Ph(Re),!0;let bn=Js(Re.nodeName);if(tp("uponSanitizeElement",Re,{tagName:bn,allowedTags:ur}),Re.hasChildNodes()&&!N6(Re.firstElementChild)&&R(/<[/\w]/g,Re.innerHTML)&&R(/<[/\w]/g,Re.textContent)||Re.nodeType===Pe.progressingInstruction||hM&&Re.nodeType===Pe.comment&&R(/<[/\w]/g,Re.data))return Ph(Re),!0;if(!ur[bn]||Gc[bn]){if(!Gc[bn]&&D6(bn)&&($n.tagNameCheck instanceof RegExp&&R($n.tagNameCheck,bn)||$n.tagNameCheck instanceof Function&&$n.tagNameCheck(bn)))return!1;if(bY&&!xT[bn]){let Yo=qe(Re)||Re.parentNode,Ba=nt(Re)||Re.childNodes;if(Ba&&Yo){let _a=Ba.length;for(let ml=_a-1;ml>=0;--ml){let vh=ke(Ba[ml],!0);vh.__removalCount=(Re.__removalCount||0)+1,Yo.insertBefore(vh,ot(Re))}}}return Ph(Re),!0}return Re instanceof bt&&!QTe(Re)||(bn==="noscript"||bn==="noembed"||bn==="noframes")&&R(/<\/no(script|embed|frames)/i,Re.innerHTML)?(Ph(Re),!0):(p0&&Re.nodeType===Pe.text&&(It=Re.textContent,u([Yi,hs,xr],Yo=>{It=_(It,Yo," ")}),Re.textContent!==It&&(p($e.removed,{element:Re.cloneNode()}),Re.textContent=It)),tp("afterSanitizeElements",Re,null),!1)},k6=function(Re,It,bn){if(Z6&&(It==="id"||It==="name")&&(bn in Qe||bn in HTe))return!1;if(!(Sr&&!td[It]&&R(ul,It))){if(!(My&&R(Bo,It))){if(!ro[It]||td[It]){if(!(D6(Re)&&($n.tagNameCheck instanceof RegExp&&R($n.tagNameCheck,Re)||$n.tagNameCheck instanceof Function&&$n.tagNameCheck(Re))&&($n.attributeNameCheck instanceof RegExp&&R($n.attributeNameCheck,It)||$n.attributeNameCheck instanceof Function&&$n.attributeNameCheck(It))||It==="is"&&$n.allowCustomizedBuiltInElements&&($n.tagNameCheck instanceof RegExp&&R($n.tagNameCheck,bn)||$n.tagNameCheck instanceof Function&&$n.tagNameCheck(bn))))return!1}else if(!gY[It]){if(!R(Da,_(bn,h0,""))){if(!((It==="src"||It==="xlink:href"||It==="href")&&Re!=="script"&&C(bn,"data:")===0&&G6[Re])){if(!(ns&&!R(_r,_(bn,h0,"")))){if(bn)return!1}}}}}}return!0},D6=function(Re){return Re!=="annotation-xml"&&x(Re,Rc)},B6=function(Re){tp("beforeSanitizeAttributes",Re,null);let{attributes:It}=Re;if(!It)return;let bn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ro},Yo=It.length;for(;Yo--;){let Ba=It[Yo],{name:_a,namespaceURI:ml,value:vh}=Ba,WZ=Js(_a),Ec=_a==="value"?vh:V(vh);if(bn.attrName=WZ,bn.attrValue=Ec,bn.keepAttr=!0,bn.forceKeepAttr=void 0,tp("uponSanitizeAttribute",Re,bn),Ec=bn.attrValue,bn.forceKeepAttr||(yM(_a,Re),!bn.keepAttr))continue;if(!f0&&R(/\/>/i,Ec)){yM(_a,Re);continue}if(hM&&R(/((--!?|])>)|<\/(style|title)/i,Ec)){yM(_a,Re);continue}p0&&u([Yi,hs,xr],O6=>{Ec=_(Ec,O6," ")});let Y6=Js(Re.nodeName);if(k6(Y6,WZ,Ec)){if(L6&&(WZ==="id"||WZ==="name")&&(yM(_a,Re),Ec=YTe+Ec),dt&&typeof Ur=="object"&&typeof Ur.getAttributeType=="function"&&!ml)switch(Ur.getAttributeType(Y6,WZ)){case"TrustedHTML":{Ec=dt.createHTML(Ec);break}case"TrustedScriptURL":{Ec=dt.createScriptURL(Ec);break}}try{ml?Re.setAttributeNS(ml,_a,Ec):Re.setAttribute(_a,Ec),M6(Re)?Ph(Re):m($e.removed)}catch{}}}tp("afterSanitizeAttributes",Re,null)},jTe=function Ln(Re){let It=null,bn=A6(Re);for(tp("beforeSanitizeShadowDOM",Re,null);It=bn.nextNode();)tp("uponSanitizeShadowNode",It,null),!U6(It)&&(It.content instanceof pe&&Ln(It.content),B6(It));tp("afterSanitizeShadowDOM",Re,null)};return $e.sanitize=function(Ln){let Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},It=null,bn=null,Yo=null,Ba=null;if(yY=!Ln,yY&&(Ln=""),typeof Ln!="string"&&!N6(Ln))if(typeof Ln.toString=="function"){if(Ln=Ln.toString(),typeof Ln!="string")throw G("dirty is not a string, aborting")}else throw G("toString is not a function");if(!$e.isSupported)return Ln;if(fY||_Y(Re),$e.removed=[],typeof Ln=="string"&&(GZ=!1),GZ){if(Ln.nodeName){let vh=Js(Ln.nodeName);if(!ur[vh]||Gc[vh])throw G("root node is forbidden and cannot be sanitized in-place")}}else if(Ln instanceof Dt)It=F6(""),bn=It.ownerDocument.importNode(Ln,!0),bn.nodeType===Pe.element&&bn.nodeName==="BODY"||bn.nodeName==="HTML"?It=bn:It.appendChild(bn);else{if(!gT&&!p0&&!Ny&&Ln.indexOf("<")===-1)return dt&&pM?dt.createHTML(Ln):Ln;if(It=F6(Ln),!It)return gT?null:pM?Bt:""}It&&pY&&Ph(It.firstChild);let _a=A6(GZ?Ln:It);for(;Yo=_a.nextNode();)U6(Yo)||(Yo.content instanceof pe&&jTe(Yo.content),B6(Yo));if(GZ)return Ln;if(gT){if(fM)for(Ba=ir.call(It.ownerDocument);It.firstChild;)Ba.appendChild(It.firstChild);else Ba=It;return(ro.shadowroot||ro.shadowrootmode)&&(Ba=ka.call(je,Ba,!0)),Ba}let ml=Ny?It.outerHTML:It.innerHTML;return Ny&&ur["!doctype"]&&It.ownerDocument&&It.ownerDocument.doctype&&It.ownerDocument.doctype.name&&R(Te,It.ownerDocument.doctype.name)&&(ml=" +`+ml),p0&&u([Yi,hs,xr],vh=>{ml=_(ml,vh," ")}),dt&&pM?dt.createHTML(ml):ml},$e.setConfig=function(){let Ln=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_Y(Ln),fY=!0},$e.clearConfig=function(){ST=null,fY=!1},$e.isValidAttribute=function(Ln,Re,It){ST||_Y({});let bn=Js(Ln),Yo=Js(Re);return k6(bn,Yo,It)},$e.addHook=function(Ln,Re){typeof Re=="function"&&(oo[Ln]=oo[Ln]||[],p(oo[Ln],Re))},$e.removeHook=function(Ln){if(oo[Ln])return m(oo[Ln])},$e.removeHooks=function(Ln){oo[Ln]&&(oo[Ln]=[])},$e.removeAllHooks=function(){oo={}},$e}var ht=Ot();return ht})});var Soe=Wc((Lln,mz)=>{"use strict";var Rln=S(T());mz.exports=n5;mz.exports.default=n5;function n5(e,t,n){n=n||2;var i=t&&t.length,o=i?t[0]*n:e.length,r=yoe(e,0,o,n,!0),s=[];if(!r||r.next===r.prev)return s;var a,c,d,u,m,p,g;if(i&&(r=r9e(e,t,r,n)),e.length>80*n){a=d=e[0],c=u=e[1];for(var f=n;fd&&(d=m),p>u&&(u=p);g=Math.max(d-a,u-c),g=g!==0?32767/g:0}return GW(r,s,n,a,c,g,0),s}function yoe(e,t,n,i,o){var r,s;if(o===uz(e,t,n,i)>0)for(r=t;r=t;r-=i)s=goe(r,e[r],e[r+1],s);return s&&i5(s,s.next)&&(WW(s),s=s.next),s}function qx(e,t){if(!e)return e;t||(t=e);var n=e,i;do if(i=!1,!n.steiner&&(i5(n,n.next)||Lr(n.prev,n,n.next)===0)){if(WW(n),n=t=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==t);return t}function GW(e,t,n,i,o,r,s){if(e){!s&&r&&d9e(e,i,o,r);for(var a=e,c,d;e.prev!==e.next;){if(c=e.prev,d=e.next,r?n9e(e,i,o,r):t9e(e)){t.push(c.i/n|0),t.push(e.i/n|0),t.push(d.i/n|0),WW(e),e=d.next,a=d.next;continue}if(e=d,e===a){s?s===1?(e=i9e(qx(e),t,n),GW(e,t,n,i,o,r,2)):s===2&&o9e(e,t,n,i,o,r):GW(qx(e),t,n,i,o,r,1);break}}}}function t9e(e){var t=e.prev,n=e,i=e.next;if(Lr(t,n,i)>=0)return!1;for(var o=t.x,r=n.x,s=i.x,a=t.y,c=n.y,d=i.y,u=or?o>s?o:s:r>s?r:s,g=a>c?a>d?a:d:c>d?c:d,f=i.next;f!==t;){if(f.x>=u&&f.x<=p&&f.y>=m&&f.y<=g&&xC(o,a,r,c,s,d,f.x,f.y)&&Lr(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function n9e(e,t,n,i){var o=e.prev,r=e,s=e.next;if(Lr(o,r,s)>=0)return!1;for(var a=o.x,c=r.x,d=s.x,u=o.y,m=r.y,p=s.y,g=ac?a>d?a:d:c>d?c:d,_=u>m?u>p?u:p:m>p?m:p,C=lz(g,f,t,n,i),V=lz(x,_,t,n,i),Z=e.prevZ,R=e.nextZ;Z&&Z.z>=C&&R&&R.z<=V;){if(Z.x>=g&&Z.x<=x&&Z.y>=f&&Z.y<=_&&Z!==o&&Z!==s&&xC(a,u,c,m,d,p,Z.x,Z.y)&&Lr(Z.prev,Z,Z.next)>=0||(Z=Z.prevZ,R.x>=g&&R.x<=x&&R.y>=f&&R.y<=_&&R!==o&&R!==s&&xC(a,u,c,m,d,p,R.x,R.y)&&Lr(R.prev,R,R.next)>=0))return!1;R=R.nextZ}for(;Z&&Z.z>=C;){if(Z.x>=g&&Z.x<=x&&Z.y>=f&&Z.y<=_&&Z!==o&&Z!==s&&xC(a,u,c,m,d,p,Z.x,Z.y)&&Lr(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;R&&R.z<=V;){if(R.x>=g&&R.x<=x&&R.y>=f&&R.y<=_&&R!==o&&R!==s&&xC(a,u,c,m,d,p,R.x,R.y)&&Lr(R.prev,R,R.next)>=0)return!1;R=R.nextZ}return!0}function i9e(e,t,n){var i=e;do{var o=i.prev,r=i.next.next;!i5(o,r)&&xoe(o,i,i.next,r)&&EW(o,r)&&EW(r,o)&&(t.push(o.i/n|0),t.push(i.i/n|0),t.push(r.i/n|0),WW(i),WW(i.next),i=e=r),i=i.next}while(i!==e);return qx(i)}function o9e(e,t,n,i,o,r){var s=e;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&h9e(s,a)){var c=_oe(s,a);s=qx(s,s.next),c=qx(c,c.next),GW(s,t,n,i,o,r,0),GW(c,t,n,i,o,r,0);return}a=a.next}s=s.next}while(s!==e)}function r9e(e,t,n,i){var o=[],r,s,a,c,d;for(r=0,s=t.length;r=n.next.y&&n.next.y!==n.y){var a=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&a>r&&(r=a,s=n.x=n.x&&n.x>=d&&i!==n.x&&xC(os.x||n.x===s.x&&l9e(s,n)))&&(s=n,m=p)),n=n.next;while(n!==c);return s}function l9e(e,t){return Lr(e.prev,e,t.prev)<0&&Lr(t.next,e,e.next)<0}function d9e(e,t,n,i){var o=e;do o.z===0&&(o.z=lz(o.x,o.y,t,n,i)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,u9e(o)}function u9e(e){var t,n,i,o,r,s,a,c,d=1;do{for(n=e,e=null,r=null,s=0;n;){for(s++,i=n,a=0,t=0;t0||c>0&&i;)a!==0&&(c===0||!i||n.z<=i.z)?(o=n,n=n.nextZ,a--):(o=i,i=i.nextZ,c--),r?r.nextZ=o:e=o,o.prevZ=r,r=o;n=i}r.nextZ=null,d*=2}while(s>1);return e}function lz(e,t,n,i,o){return e=(e-n)*o|0,t=(t-i)*o|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function m9e(e){var t=e,n=e;do(t.x=(e-s)*(r-a)&&(e-s)*(i-a)>=(n-s)*(t-a)&&(n-s)*(r-a)>=(o-s)*(i-a)}function h9e(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!f9e(e,t)&&(EW(e,t)&&EW(t,e)&&p9e(e,t)&&(Lr(e.prev,e,t.prev)||Lr(e,t.prev,t))||i5(e,t)&&Lr(e.prev,e,e.next)>0&&Lr(t.prev,t,t.next)>0)}function Lr(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function i5(e,t){return e.x===t.x&&e.y===t.y}function xoe(e,t,n,i){var o=t5(Lr(e,t,n)),r=t5(Lr(e,t,i)),s=t5(Lr(n,i,e)),a=t5(Lr(n,i,t));return!!(o!==r&&s!==a||o===0&&e5(e,n,t)||r===0&&e5(e,i,t)||s===0&&e5(n,e,i)||a===0&&e5(n,t,i))}function e5(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function t5(e){return e>0?1:e<0?-1:0}function f9e(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&xoe(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function EW(e,t){return Lr(e.prev,e,e.next)<0?Lr(e,t,e.next)>=0&&Lr(e,e.prev,t)>=0:Lr(e,t,e.prev)<0||Lr(e,e.next,t)<0}function p9e(e,t){var n=e,i=!1,o=(e.x+t.x)/2,r=(e.y+t.y)/2;do n.y>r!=n.next.y>r&&n.next.y!==n.y&&o<(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==e);return i}function _oe(e,t){var n=new dz(e.i,e.x,e.y),i=new dz(t.i,t.x,t.y),o=e.next,r=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,i.next=n,n.prev=i,r.next=i,i.prev=r,i}function goe(e,t,n,i){var o=new dz(e,t,n);return i?(o.next=i.next,o.prev=i,i.next.prev=o,i.next=o):(o.prev=o,o.next=o),o}function WW(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function dz(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n5.deviation=function(e,t,n,i){var o=t&&t.length,r=o?t[0]*n:e.length,s=Math.abs(uz(e,0,r,n));if(o)for(var a=0,c=t.length;a0&&(i+=e[o-1].length,n.holes.push(i))}return n}});var Eae=Wc((fIn,Gae)=>{"use strict";var pIn=S(T());Gae.exports=qYe;var zX=1e20;function qYe(e,t){t||(t={});var n=t.cutoff==null?.25:t.cutoff,i=t.radius==null?8:t.radius,o=t.channel||0,r,s,a,c,d,u,m,p,g,f,x;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");r=t.width,s=t.height,c=e,t.stride?u=t.stride:u=Math.floor(e.length/r/s)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(p=e,m=p.getContext("2d"),r=p.width,s=p.height,g=m.getImageData(0,0,r,s),c=g.data,u=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(p=e.canvas,m=e,r=p.width,s=p.height,g=m.getImageData(0,0,r,s),c=g.data,u=4):window.ImageData&&e instanceof window.ImageData&&(g=e,r=e.width,s=e.height,c=g.data,u=4);if(a=Math.max(r,s),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(d=c,c=Array(r*s),f=0,x=Math.floor(d.length/u);f{var wIn=S(T());function l3e(){var e=0,t=1,n=2,i=3,o=4,r=5,s=6,a=7,c=8,d=9,u=10,m=11,p=12,g=13,f=14,x=15,_=16,C=17,V=0,Z=1,R=2,G=3,W=4;function v(b,L){return 55296<=b.charCodeAt(L)&&b.charCodeAt(L)<=56319&&56320<=b.charCodeAt(L+1)&&b.charCodeAt(L+1)<=57343}function P(b,L){L===void 0&&(L=0);var E=b.charCodeAt(L);if(55296<=E&&E<=56319&&L=1){var I=b.charCodeAt(L-1),w=E;return 55296<=I&&I<=56319?(I-55296)*1024+(w-56320)+65536:w}return E}function F(b,L,E){var I=[b].concat(L).concat([E]),w=I[I.length-2],N=E,B=I.lastIndexOf(f);if(B>1&&I.slice(1,B).every(function(U){return U==i})&&[i,g,C].indexOf(b)==-1)return R;var k=I.lastIndexOf(o);if(k>0&&I.slice(1,k).every(function(U){return U==o})&&[p,o].indexOf(w)==-1)return I.filter(function(U){return U==o}).length%2==1?G:W;if(w==e&&N==t)return V;if(w==n||w==e||w==t)return N==f&&L.every(function(U){return U==i})?R:Z;if(N==n||N==e||N==t)return Z;if(w==s&&(N==s||N==a||N==d||N==u))return V;if((w==d||w==a)&&(N==a||N==c))return V;if((w==u||w==c)&&N==c)return V;if(N==i||N==x)return V;if(N==r)return V;if(w==p)return V;var O=I.indexOf(i)!=-1?I.lastIndexOf(i)-1:I.length-2;return[g,C].indexOf(I[O])!=-1&&I.slice(O+1,-1).every(function(U){return U==i})&&N==f||w==x&&[_,C].indexOf(N)!=-1?V:L.indexOf(o)!=-1?R:w==o&&N==o?V:Z}this.nextBreak=function(b,L){if(L===void 0&&(L=0),L<0)return 0;if(L>=b.length-1)return b.length;for(var E=M(P(b,L)),I=[],w=L+1;w{var Eei=S(T());(function(e,t){typeof qH=="object"&&typeof $H<"u"?$H.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).RBush=t()})(qH,function(){"use strict";function e(_,C,V,Z,R){(function G(W,v,P,F,M){for(;F>P;){if(F-P>600){var b=F-P+1,L=v-P+1,E=Math.log(b),I=.5*Math.exp(2*E/3),w=.5*Math.sqrt(E*I*(b-I)/b)*(L-b/2<0?-1:1),N=Math.max(P,Math.floor(v-L*I/b+w)),B=Math.min(F,Math.floor(v+(b-L)*I/b+w));G(W,v,N,B,M)}var k=W[v],O=P,U=F;for(t(W,P,v),M(W[F],k)>0&&t(W,P,F);O0;)U--}M(W[P],k)===0?t(W,P,U):t(W,++U,F),U<=v&&(P=U+1),v<=U&&(F=U-1)}})(_,C,V||0,Z||_.length-1,R||n)}function t(_,C,V){var Z=_[C];_[C]=_[V],_[V]=Z}function n(_,C){return _C?1:0}var i=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(_,C,V){if(!V)return C.indexOf(_);for(var Z=0;Z=_.minX&&C.maxY>=_.minY}function f(_){return{children:_,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(_,C,V,Z,R){for(var G=[C,V];G.length;)if(!((V=G.pop())-(C=G.pop())<=Z)){var W=C+Math.ceil((V-C)/Z/2)*Z;e(_,W,C,V,R),G.push(C,W,W,V)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(_){var C=this.data,V=[];if(!g(_,C))return V;for(var Z=this.toBBox,R=[];C;){for(var G=0;G=0&&R[C].children.length>this._maxEntries;)this._split(R,C),C--;this._adjustParentBBoxes(Z,R,C)},i.prototype._split=function(_,C){var V=_[C],Z=V.children.length,R=this._minEntries;this._chooseSplitAxis(V,R,Z);var G=this._chooseSplitIndex(V,R,Z),W=f(V.children.splice(G,V.children.length-G));W.height=V.height,W.leaf=V.leaf,r(V,this.toBBox),r(W,this.toBBox),C?_[C-1].children.push(W):this._splitRoot(V,W)},i.prototype._splitRoot=function(_,C){this.data=f([_,C]),this.data.height=_.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(_,C,V){for(var Z,R,G,W,v,P,F,M=1/0,b=1/0,L=C;L<=V-C;L++){var E=s(_,0,L,this.toBBox),I=s(_,L,V,this.toBBox),w=(R=E,G=I,W=void 0,v=void 0,P=void 0,F=void 0,W=Math.max(R.minX,G.minX),v=Math.max(R.minY,G.minY),P=Math.min(R.maxX,G.maxX),F=Math.min(R.maxY,G.maxY),Math.max(0,P-W)*Math.max(0,F-v)),N=u(E)+u(I);w=C;M--){var b=_.children[M];a(W,_.leaf?R(b):b),v+=m(W)}return v},i.prototype._adjustParentBBoxes=function(_,C,V){for(var Z=V;Z>=0;Z--)a(C[Z],_)},i.prototype._condense=function(_){for(var C=_.length-1,V=void 0;C>=0;C--)_[C].children.length===0?C>0?(V=_[C-1].children).splice(V.indexOf(_[C]),1):this.clear():r(_[C],this.toBBox)},i})});var _8=Wc((exports,module)=>{var G3i=S(T());/*! + * protobuf.js v7.3.2 (c) 2016, daniel wirtz + * compiled wed, 12 jun 2024 08:24:21 utc * licensed under the bsd-3-clause license * see: https://github.com/dcodeio/protobuf.js for details - */(function(undefined){"use strict";(function(t,n,i){function o(s){var a=n[s];return a||t[s][0].call(a=n[s]={exports:{}},o,a,a.exports),a.exports}var r=o(i[0]);r.util.global.protobuf=r,typeof define=="function"&&define.amd&&define(["long"],function(s){return s&&s.isLong&&(r.util.Long=s,r.configure()),r}),typeof module=="object"&&module&&module.exports&&(module.exports=r)})({1:[function(e,t,n){"use strict";t.exports=i;function i(o,r){for(var s=new Array(arguments.length-1),a=0,c=2,d=!0;c1&&d.charAt(u)==="=";)++m;return Math.ceil(d.length*3)/4-m};for(var o=new Array(64),r=new Array(123),s=0;s<64;)r[o[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(d,u,m){for(var p=null,g=[],f=0,x=0,_;u>2],_=(C&3)<<4,x=1;break;case 1:g[f++]=o[_|C>>4],_=(C&15)<<2,x=2;break;case 2:g[f++]=o[_|C>>6],g[f++]=o[C&63],x=0;break}f>8191&&((p||(p=[])).push(String.fromCharCode.apply(String,g)),f=0)}return x&&(g[f++]=o[_],g[f++]=61,x===1&&(g[f++]=61)),p?(f&&p.push(String.fromCharCode.apply(String,g.slice(0,f))),p.join("")):String.fromCharCode.apply(String,g.slice(0,f))};var a="invalid encoding";i.decode=function(d,u,m){for(var p=m,g=0,f,x=0;x1)break;if((_=r[_])===undefined)throw Error(a);switch(g){case 0:f=_,g=1;break;case 1:u[m++]=f<<2|(_&48)>>4,f=_,g=2;break;case 2:u[m++]=(f&15)<<4|(_&60)>>2,f=_,g=3;break;case 3:u[m++]=(f&3)<<6|_,g=0;break}}if(g===1)throw Error(a);return m-p},i.test=function(d){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(d)}},{}],3:[function(e,t,n){"use strict";t.exports=i;function i(){this._listeners={}}i.prototype.on=function(r,s,a){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:s,ctx:a||this}),this},i.prototype.off=function(r,s){if(r===undefined)this._listeners={};else if(s===undefined)this._listeners[r]=[];else for(var a=this._listeners[r],c=0;c0?0:2147483648,g,f);else if(isNaN(p))m(2143289344,g,f);else if(p>34028234663852886e22)m((x<<31|2139095040)>>>0,g,f);else if(p<11754943508222875e-54)m((x<<31|Math.round(p/1401298464324817e-60))>>>0,g,f);else{var _=Math.floor(Math.log(p)/Math.LN2),C=Math.round(p*Math.pow(2,-_)*8388608)&8388607;m((x<<31|_+127<<23|C)>>>0,g,f)}}c.writeFloatLE=d.bind(null,o),c.writeFloatBE=d.bind(null,r);function u(m,p,g){var f=m(p,g),x=(f>>31)*2+1,_=f>>>23&255,C=f&8388607;return _===255?C?NaN:x*(1/0):_===0?x*1401298464324817e-60*C:x*Math.pow(2,_-150)*(C+8388608)}c.readFloatLE=u.bind(null,s),c.readFloatBE=u.bind(null,a)}(),typeof Float64Array<"u"?function(){var d=new Float64Array([-0]),u=new Uint8Array(d.buffer),m=u[7]===128;function p(_,C,V){d[0]=_,C[V]=u[0],C[V+1]=u[1],C[V+2]=u[2],C[V+3]=u[3],C[V+4]=u[4],C[V+5]=u[5],C[V+6]=u[6],C[V+7]=u[7]}function g(_,C,V){d[0]=_,C[V]=u[7],C[V+1]=u[6],C[V+2]=u[5],C[V+3]=u[4],C[V+4]=u[3],C[V+5]=u[2],C[V+6]=u[1],C[V+7]=u[0]}c.writeDoubleLE=m?p:g,c.writeDoubleBE=m?g:p;function f(_,C){return u[0]=_[C],u[1]=_[C+1],u[2]=_[C+2],u[3]=_[C+3],u[4]=_[C+4],u[5]=_[C+5],u[6]=_[C+6],u[7]=_[C+7],d[0]}function x(_,C){return u[7]=_[C],u[6]=_[C+1],u[5]=_[C+2],u[4]=_[C+3],u[3]=_[C+4],u[2]=_[C+5],u[1]=_[C+6],u[0]=_[C+7],d[0]}c.readDoubleLE=m?f:x,c.readDoubleBE=m?x:f}():function(){function d(m,p,g,f,x,_){var C=f<0?1:0;if(C&&(f=-f),f===0)m(0,x,_+p),m(1/f>0?0:2147483648,x,_+g);else if(isNaN(f))m(0,x,_+p),m(2146959360,x,_+g);else if(f>17976931348623157e292)m(0,x,_+p),m((C<<31|2146435072)>>>0,x,_+g);else{var V;if(f<22250738585072014e-324)V=f/5e-324,m(V>>>0,x,_+p),m((C<<31|V/4294967296)>>>0,x,_+g);else{var L=Math.floor(Math.log(f)/Math.LN2);L===1024&&(L=1023),V=f*Math.pow(2,-L),m(V*4503599627370496>>>0,x,_+p),m((C<<31|L+1023<<20|V*1048576&1048575)>>>0,x,_+g)}}}c.writeDoubleLE=d.bind(null,o,0,4),c.writeDoubleBE=d.bind(null,r,4,0);function u(m,p,g,f,x){var _=m(f,x+p),C=m(f,x+g),V=(C>>31)*2+1,L=C>>>20&2047,Z=4294967296*(C&1048575)+_;return L===2047?Z?NaN:V*(1/0):L===0?V*5e-324*Z:V*Math.pow(2,L-1075)*(Z+4503599627370496)}c.readDoubleLE=u.bind(null,s,0,4),c.readDoubleBE=u.bind(null,a,4,0)}(),c}function o(c,d,u){d[u]=c&255,d[u+1]=c>>>8&255,d[u+2]=c>>>16&255,d[u+3]=c>>>24}function r(c,d,u){d[u]=c>>>24,d[u+1]=c>>>16&255,d[u+2]=c>>>8&255,d[u+3]=c&255}function s(c,d){return(c[d]|c[d+1]<<8|c[d+2]<<16|c[d+3]<<24)>>>0}function a(c,d){return(c[d]<<24|c[d+1]<<16|c[d+2]<<8|c[d+3])>>>0}},{}],5:[function(require,module,exports){"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}},{}],6:[function(e,t,n){"use strict";t.exports=i;function i(o,r,s){var a=s||8192,c=a>>>1,d=null,u=a;return function(p){if(p<1||p>c)return o(p);u+p>a&&(d=o(a),u=0);var g=r.call(d,u,u+=p);return u&7&&(u=(u|7)+1),g}}},{}],7:[function(e,t,n){"use strict";var i=n;i.length=function(r){for(var s=0,a=0,c=0;c191&&p<224?u[m++]=(p&31)<<6|r[s++]&63:p>239&&p<365?(p=((p&7)<<18|(r[s++]&63)<<12|(r[s++]&63)<<6|r[s++]&63)-65536,u[m++]=55296+(p>>10),u[m++]=56320+(p&1023)):u[m++]=(p&15)<<12|(r[s++]&63)<<6|r[s++]&63,m>8191&&((d||(d=[])).push(String.fromCharCode.apply(String,u)),m=0);return d?(m&&d.push(String.fromCharCode.apply(String,u.slice(0,m))),d.join("")):String.fromCharCode.apply(String,u.slice(0,m))},i.write=function(r,s,a){for(var c=a,d,u,m=0;m>6|192,s[a++]=d&63|128):(d&64512)===55296&&((u=r.charCodeAt(m+1))&64512)===56320?(d=65536+((d&1023)<<10)+(u&1023),++m,s[a++]=d>>18|240,s[a++]=d>>12&63|128,s[a++]=d>>6&63|128,s[a++]=d&63|128):(s[a++]=d>>12|224,s[a++]=d>>6&63|128,s[a++]=d&63|128);return a-c}},{}],8:[function(e,t,n){"use strict";var i=n;i.build="minimal",i.Writer=e(16),i.BufferWriter=e(17),i.Reader=e(9),i.BufferReader=e(10),i.util=e(15),i.rpc=e(12),i.roots=e(11),i.configure=o;function o(){i.util._configure(),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}o()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(e,t,n){"use strict";t.exports=c;var i=e(15),o,r=i.LongBits,s=i.utf8;function a(f,x){return RangeError("index out of range: "+f.pos+" + "+(x||1)+" > "+f.len)}function c(f){this.buf=f,this.pos=0,this.len=f.length}var d=typeof Uint8Array<"u"?function(x){if(x instanceof Uint8Array||Array.isArray(x))return new c(x);throw Error("illegal buffer")}:function(x){if(Array.isArray(x))return new c(x);throw Error("illegal buffer")},u=function(){return i.Buffer?function(_){return(c.create=function(V){return i.Buffer.isBuffer(V)?new o(V):d(V)})(_)}:d};c.create=u(),c.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,c.prototype.uint32=function(){var x=4294967295;return function(){if(x=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(x=(x|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(x=(x|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(x=(x|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(x=(x|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return x;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return x}}(),c.prototype.int32=function(){return this.uint32()|0},c.prototype.sint32=function(){var x=this.uint32();return x>>>1^-(x&1)|0};function m(){var f=new r(0,0),x=0;if(this.len-this.pos>4){for(;x<4;++x)if(f.lo=(f.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return f;if(f.lo=(f.lo|(this.buf[this.pos]&127)<<28)>>>0,f.hi=(f.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return f;x=0}else{for(;x<3;++x){if(this.pos>=this.len)throw a(this);if(f.lo=(f.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return f}return f.lo=(f.lo|(this.buf[this.pos++]&127)<>>0,f}if(this.len-this.pos>4){for(;x<5;++x)if(f.hi=(f.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return f}else for(;x<5;++x){if(this.pos>=this.len)throw a(this);if(f.hi=(f.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return f}throw Error("invalid varint encoding")}c.prototype.bool=function(){return this.uint32()!==0};function p(f,x){return(f[x-4]|f[x-3]<<8|f[x-2]<<16|f[x-1]<<24)>>>0}c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)|0};function g(){if(this.pos+8>this.len)throw a(this,8);return new r(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var x=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,x},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var x=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,x},c.prototype.bytes=function(){var x=this.uint32(),_=this.pos,C=this.pos+x;if(C>this.len)throw a(this,x);if(this.pos+=x,Array.isArray(this.buf))return this.buf.slice(_,C);if(_===C){var V=i.Buffer;return V?V.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,_,C)},c.prototype.string=function(){var x=this.bytes();return s.read(x,0,x.length)},c.prototype.skip=function(x){if(typeof x=="number"){if(this.pos+x>this.len)throw a(this,x);this.pos+=x}else do if(this.pos>=this.len)throw a(this);while(this.buf[this.pos++]&128);return this},c.prototype.skipType=function(f){switch(f){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(f=this.uint32()&7)!==4;)this.skipType(f);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+f+" at offset "+this.pos)}return this},c._configure=function(f){o=f,c.create=u(),o._configure();var x=i.Long?"toLong":"toNumber";i.merge(c.prototype,{int64:function(){return m.call(this)[x](!1)},uint64:function(){return m.call(this)[x](!0)},sint64:function(){return m.call(this).zzDecode()[x](!1)},fixed64:function(){return g.call(this)[x](!0)},sfixed64:function(){return g.call(this)[x](!1)}})}},{15:15}],10:[function(e,t,n){"use strict";t.exports=r;var i=e(9);(r.prototype=Object.create(i.prototype)).constructor=r;var o=e(15);function r(s){i.call(this,s)}r._configure=function(){o.Buffer&&(r.prototype._slice=o.Buffer.prototype.slice)},r.prototype.string=function(){var a=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+a,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+a,this.len))},r._configure()},{15:15,9:9}],11:[function(e,t,n){"use strict";t.exports={}},{}],12:[function(e,t,n){"use strict";var i=n;i.Service=e(13)},{13:13}],13:[function(e,t,n){"use strict";t.exports=o;var i=e(15);(o.prototype=Object.create(i.EventEmitter.prototype)).constructor=o;function o(r,s,a){if(typeof r!="function")throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=r,this.requestDelimited=!!s,this.responseDelimited=!!a}o.prototype.rpcCall=function r(s,a,c,d,u){if(!d)throw TypeError("request must be specified");var m=this;if(!u)return i.asPromise(r,m,s,a,c,d);if(!m.rpcImpl)return setTimeout(function(){u(Error("already ended"))},0),undefined;try{return m.rpcImpl(s,a[m.requestDelimited?"encodeDelimited":"encode"](d).finish(),function(g,f){if(g)return m.emit("error",g,s),u(g);if(f===null)return m.end(!0),undefined;if(!(f instanceof c))try{f=c[m.responseDelimited?"decodeDelimited":"decode"](f)}catch(x){return m.emit("error",x,s),u(x)}return m.emit("data",f,s),u(null,f)})}catch(p){return m.emit("error",p,s),setTimeout(function(){u(p)},0),undefined}},o.prototype.end=function(s){return this.rpcImpl&&(s||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(e,t,n){"use strict";t.exports=o;var i=e(15);function o(c,d){this.lo=c>>>0,this.hi=d>>>0}var r=o.zero=new o(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(d){if(d===0)return r;var u=d<0;u&&(d=-d);var m=d>>>0,p=(d-m)/4294967296>>>0;return u&&(p=~p>>>0,m=~m>>>0,++m>4294967295&&(m=0,++p>4294967295&&(p=0))),new o(m,p)},o.from=function(d){if(typeof d=="number")return o.fromNumber(d);if(i.isString(d))if(i.Long)d=i.Long.fromString(d);else return o.fromNumber(parseInt(d,10));return d.low||d.high?new o(d.low>>>0,d.high>>>0):r},o.prototype.toNumber=function(d){if(!d&&this.hi>>>31){var u=~this.lo+1>>>0,m=~this.hi>>>0;return u||(m=m+1>>>0),-(u+m*4294967296)}return this.lo+this.hi*4294967296},o.prototype.toLong=function(d){return i.Long?new i.Long(this.lo|0,this.hi|0,!!d):{low:this.lo|0,high:this.hi|0,unsigned:!!d}};var a=String.prototype.charCodeAt;o.fromHash=function(d){return d===s?r:new o((a.call(d,0)|a.call(d,1)<<8|a.call(d,2)<<16|a.call(d,3)<<24)>>>0,(a.call(d,4)|a.call(d,5)<<8|a.call(d,6)<<16|a.call(d,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var d=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^d)>>>0,this.lo=(this.lo<<1^d)>>>0,this},o.prototype.zzDecode=function(){var d=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^d)>>>0,this.hi=(this.hi>>>1^d)>>>0,this},o.prototype.length=function(){var d=this.lo,u=(this.lo>>>28|this.hi<<4)>>>0,m=this.hi>>>24;return m===0?u===0?d<16384?d<128?1:2:d<2097152?3:4:u<16384?u<128?5:6:u<2097152?7:8:m<128?9:10}},{15:15}],15:[function(e,t,n){"use strict";var i=n;i.asPromise=e(1),i.base64=e(2),i.EventEmitter=e(3),i.float=e(4),i.inquire=e(5),i.utf8=e(7),i.pool=e(6),i.LongBits=e(14),i.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),i.global=i.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||this,i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a},i.isString=function(a){return typeof a=="string"||a instanceof String},i.isObject=function(a){return a&&typeof a=="object"},i.isset=i.isSet=function(a,c){var d=a[c];return d!=null&&a.hasOwnProperty(c)?typeof d!="object"||(Array.isArray(d)?d.length:Object.keys(d).length)>0:!1},i.Buffer=function(){try{var s=i.inquire("buffer").Buffer;return s.prototype.utf8Write?s:null}catch{return null}}(),i._Buffer_from=null,i._Buffer_allocUnsafe=null,i.newBuffer=function(a){return typeof a=="number"?i.Buffer?i._Buffer_allocUnsafe(a):new i.Array(a):i.Buffer?i._Buffer_from(a):typeof Uint8Array>"u"?a:new Uint8Array(a)},i.Array=typeof Uint8Array<"u"?Uint8Array:Array,i.Long=i.global.dcodeIO&&i.global.dcodeIO.Long||i.global.Long||i.inquire("long"),i.key2Re=/^true|false|0|1$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(a){return a?i.LongBits.from(a).toHash():i.LongBits.zeroHash},i.longFromHash=function(a,c){var d=i.LongBits.fromHash(a);return i.Long?i.Long.fromBits(d.lo,d.hi,c):d.toNumber(!!c)};function o(s,a,c){for(var d=Object.keys(a),u=0;u-1;--m)if(c[u[m]]===1&&this[u[m]]!==undefined&&this[u[m]]!==null)return u[m]}},i.oneOfSetter=function(a){return function(c){for(var d=0;d127;)Z[G++]=L&127|128,L>>>=7;Z[G]=L}function x(L,Z){this.len=L,this.next=undefined,this.val=Z}x.prototype=Object.create(c.prototype),x.prototype.fn=f,m.prototype.uint32=function(Z){return this.len+=(this.tail=this.tail.next=new x((Z=Z>>>0)<128?1:Z<16384?2:Z<2097152?3:Z<268435456?4:5,Z)).len,this},m.prototype.int32=function(Z){return Z<0?this._push(_,10,r.fromNumber(Z)):this.uint32(Z)},m.prototype.sint32=function(Z){return this.uint32((Z<<1^Z>>31)>>>0)};function _(L,Z,G){for(;L.hi;)Z[G++]=L.lo&127|128,L.lo=(L.lo>>>7|L.hi<<25)>>>0,L.hi>>>=7;for(;L.lo>127;)Z[G++]=L.lo&127|128,L.lo=L.lo>>>7;Z[G++]=L.lo}m.prototype.uint64=function(Z){var G=r.from(Z);return this._push(_,G.length(),G)},m.prototype.int64=m.prototype.uint64,m.prototype.sint64=function(Z){var G=r.from(Z).zzEncode();return this._push(_,G.length(),G)},m.prototype.bool=function(Z){return this._push(g,1,Z?1:0)};function C(L,Z,G){Z[G]=L&255,Z[G+1]=L>>>8&255,Z[G+2]=L>>>16&255,Z[G+3]=L>>>24}m.prototype.fixed32=function(Z){return this._push(C,4,Z>>>0)},m.prototype.sfixed32=m.prototype.fixed32,m.prototype.fixed64=function(Z){var G=r.from(Z);return this._push(C,4,G.lo)._push(C,4,G.hi)},m.prototype.sfixed64=m.prototype.fixed64,m.prototype.float=function(Z){return this._push(i.float.writeFloatLE,4,Z)},m.prototype.double=function(Z){return this._push(i.float.writeDoubleLE,8,Z)};var V=i.Array.prototype.set?function(Z,G,X){G.set(Z,X)}:function(Z,G,X){for(var v=0;v>>0;if(!G)return this._push(g,1,0);if(i.isString(Z)){var X=m.alloc(G=s.length(Z));s.decode(Z,X,0),Z=X}return this.uint32(G)._push(V,G,Z)},m.prototype.string=function(Z){var G=a.length(Z);return G?this.uint32(G)._push(a.write,G,Z):this._push(g,1,0)},m.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(d,0,0),this.len=0,this},m.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(d,0,0),this.len=0),this},m.prototype.ldelim=function(){var Z=this.head,G=this.tail,X=this.len;return this.reset().uint32(X),X&&(this.tail.next=Z.next,this.tail=G,this.len+=X),this},m.prototype.finish=function(){for(var Z=this.head.next,G=this.constructor.alloc(this.len),X=0;Z;)Z.fn(Z.val,G,X),X+=Z.len,Z=Z.next;return G},m._configure=function(L){o=L,m.create=p(),o._configure()}},{15:15}],17:[function(e,t,n){"use strict";t.exports=r;var i=e(16);(r.prototype=Object.create(i.prototype)).constructor=r;var o=e(15);function r(){i.call(this)}r._configure=function(){r.alloc=o._Buffer_allocUnsafe,r.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&o.Buffer.prototype.set.name==="set"?function(c,d,u){d.set(c,u)}:function(c,d,u){if(c.copy)c.copy(d,u,0,c.length);else for(var m=0;m>>0;return this.uint32(d),d&&this._push(r.writeBytesBuffer,d,c),this};function s(a,c,d){a.length<40?o.utf8.write(a,c,d):c.utf8Write?c.utf8Write(a,d):c.write(a,d)}r.prototype.string=function(c){var d=o.Buffer.byteLength(c);return this.uint32(d),d&&this._push(s,d,c),this},r._configure()},{15:15,16:16}]},{},[8])})()});var ETe=Ic((Gji,w3)=>{var Eji=T(S());/* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */(function(){var e=function(){var o={};o.defaultNoDataValue=-34027999387901484e22,o.decode=function(u,m){m=m||{};var p=m.encodedMaskData||m.encodedMaskData===null,g=c(u,m.inputOffset||0,p),f=m.noDataValue!==null?m.noDataValue:o.defaultNoDataValue,x=r(g,m.pixelType||Float32Array,m.encodedMaskData,f,m.returnMask),_={width:g.width,height:g.height,pixelData:x.resultPixels,minValue:x.minValue,maxValue:g.pixels.maxValue,noDataValue:f};return x.resultMask&&(_.maskData=x.resultMask),m.returnEncodedMask&&g.mask&&(_.encodedMaskData=g.mask.bitset?g.mask.bitset:null),m.returnFileInfo&&(_.fileInfo=s(g),m.computeUsedBitDepths&&(_.fileInfo.bitDepths=a(g))),_};var r=function(u,m,p,g,f){var x=0,_=u.pixels.numBlocksX,C=u.pixels.numBlocksY,V=Math.floor(u.width/_),L=Math.floor(u.height/C),Z=2*u.maxZError,G=Number.MAX_VALUE,X;p=p||(u.mask?u.mask.bitset:null);var v,P;v=new m(u.width*u.height),f&&p&&(P=new Uint8Array(u.width*u.height));for(var F=new Float32Array(V*L),A,b,R=0;R<=C;R++){var E=R!==C?L:u.height%C;if(E!==0)for(var I=0;I<=_;I++){var w=I!==_?V:u.width%_;if(w!==0){var N=R*u.width*L+I*V,B=u.width-w,U=u.pixels.blocks[x],O,k,J;U.encoding<2?(U.encoding===0?O=U.rawData:(d(U.stuffedData,U.bitsPerPixel,U.numValidPixels,U.offset,Z,F,u.pixels.maxValue),O=F),k=0):U.encoding===2?J=0:J=U.offset;var H;if(p)for(b=0;b>3],H<<=N&7),A=0;A>3]),H&128?(P&&(P[N]=1),X=U.encoding<2?O[k++]:J,G=G>X?X:G,v[N++]=X):(P&&(P[N]=0),v[N++]=g),H<<=1;N+=B}else if(U.encoding<2)for(b=0;bX?X:G,v[N++]=X;N+=B}else for(G=G>J?J:G,b=0;b0){var _=new Uint8Array(Math.ceil(g.width*g.height/8));x=new DataView(u,m,g.mask.numBytes);var C=x.getInt16(0,!0),V=2,L=0;do{if(C>0)for(;C--;)_[L++]=x.getUint8(V++);else{var Z=x.getUint8(V++);for(C=-C;C--;)_[L++]=Z}C=x.getInt16(V,!0),V+=2}while(V0?1:0),P=X+(g.height%X>0?1:0);g.pixels.blocks=new Array(v*P);for(var F=0,A=0;A3)throw"Invalid block encoding ("+I.encoding+")";if(I.encoding===2){m++;continue}if(w!==0&&w!==2){if(w>>=6,I.offsetType=w,w===2)I.offset=x.getInt8(1),R++;else if(w===1)I.offset=x.getInt16(1,!0),R+=2;else if(w===0)I.offset=x.getFloat32(1,!0),R+=4;else throw"Invalid block offset type";if(I.encoding===1)if(w=x.getUint8(R),R++,I.bitsPerPixel=w&63,w>>=6,I.numValidPixelsType=w,w===2)I.numValidPixels=x.getUint8(R),R++;else if(w===1)I.numValidPixels=x.getUint16(R,!0),R+=2;else if(w===0)I.numValidPixels=x.getUint32(R,!0),R+=4;else throw"Invalid valid pixel count type"}if(m+=R,I.encoding!==3){var N,B;if(I.encoding===0){var U=(g.pixels.numBytes-1)/4;if(U!==Math.floor(U))throw"uncompressed block has invalid length";N=new ArrayBuffer(U*4),B=new Uint8Array(N),B.set(new Uint8Array(u,m,U*4));var O=new Float32Array(N);I.rawData=O,m+=U*4}else if(I.encoding===1){var k=Math.ceil(I.numValidPixels*I.bitsPerPixel/8),J=Math.ceil(k/4);N=new ArrayBuffer(J*4),B=new Uint8Array(N),B.set(new Uint8Array(u,m,k)),I.stuffedData=new Uint32Array(N),m+=k}}}return g.eofOffset=m,g},d=function(u,m,p,g,f,x,_){var C=(1<=m)G=X>>>Z-m&C,Z-=m;else{var F=m-Z;G=(X&C)<>>Z}x[L]=G=u?(Z=G>>>L-u&_,L-=u):(X=u-L,Z=(G&_)<>>L),d[V]=p[Z];else for(v=Math.ceil((x-g)/f),V=0;V=u?(Z=G>>>L-u&_,L-=u):(X=u-L,Z=(G&_)<>>L),d[V]=Z=d?(L=Z>>>V-d&f,V-=d):(C=d-V,L=(Z&f)<>>V),G[_]=L=u?(G=X>>>Z&_,L-=u,Z+=u):(v=u-L,G=X>>>Z&_,X=c[C++],L=32-v,G|=(X&(1<=u?(G=X>>>Z&_,L-=u,Z+=u):(v=u-L,G=X>>>Z&_,X=c[C++],L=32-v,G|=(X&(1<=d?(L=G>>>Z&f,V-=d,Z+=d):(C=d-V,L=G>>>Z&f,G=c[x++],V=32-C,L|=(G&(1<=u?(_=C>>>x-u&p,x-=u):(V=u-x,_=(C&p)<>>x),d[f]=_;return d},originalUnstuff2:function(c,d,u,m){var p=(1<=u?(C=V>>>_&p,x-=u,_+=u):(L=u-x,C=V>>>_&p,V=c[g++],x=32-L,C|=(V&(1<=359?359:p;p-=f;do d+=c[g++]<<8,u+=d+=c[g++];while(--f);d=(d&65535)+(d>>>16),u=(u&65535)+(u>>>16)}return m&1&&(u+=d+=c[g]<<8),d=(d&65535)+(d>>>16),u=(u&65535)+(u>>>16),(u<<16|d)>>>0},readHeaderInfo:function(c,d){var u=d.ptr,m=new Uint8Array(c,u,6),p={};if(p.fileIdentifierString=String.fromCharCode.apply(null,m),p.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+p.fileIdentifierString;u+=6;var g=new DataView(c,u,8),f=g.getInt32(0,!0);p.fileVersion=f,u+=4,f>=3&&(p.checksum=g.getUint32(4,!0),u+=4),g=new DataView(c,u,12),p.height=g.getUint32(0,!0),p.width=g.getUint32(4,!0),u+=8,f>=4?(p.numDims=g.getUint32(8,!0),u+=4):p.numDims=1,g=new DataView(c,u,40),p.numValidPixel=g.getUint32(0,!0),p.microBlockSize=g.getInt32(4,!0),p.blobSize=g.getInt32(8,!0),p.imageType=g.getInt32(12,!0),p.maxZError=g.getFloat64(16,!0),p.zMin=g.getFloat64(24,!0),p.zMax=g.getFloat64(32,!0),u+=40,d.headerInfo=p,d.ptr=u;var x,_;if(f>=3&&(_=f>=4?52:48,x=this.computeChecksumFletcher32(new Uint8Array(c,u-_,p.blobSize-14)),x!==p.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(c,d){var u=d.headerInfo,m=this.getDataTypeArray(u.imageType),p=u.numDims*this.getDataTypeSize(u.imageType),g=this.readSubArray(c,d.ptr,m,p),f=this.readSubArray(c,d.ptr+p,m,p);d.ptr+=2*p;var x,_=!0;for(x=0;x0){_=new Uint8Array(Math.ceil(p/8)),f=new DataView(c,u,x.numBytes);var V=f.getInt16(0,!0),L=2,Z=0,G=0;do{if(V>0)for(;V--;)_[Z++]=f.getUint8(L++);else for(G=f.getUint8(L++),V=-V;V--;)_[Z++]=G;V=f.getInt16(L,!0),L+=2}while(L>3],X<<=v&7):X=_[v>>3],X&128&&(C[v]=1);d.pixels.resultMask=C,x.bitset=_,u+=x.numBytes}return d.ptr=u,d.mask=x,!0},readDataOneSweep:function(c,d,u){var m=d.ptr,p=d.headerInfo,g=p.numDims,f=p.width*p.height,x=p.imageType,_=p.numValidPixel*r.getDataTypeSize(x)*g,C,V=d.pixels.resultMask;if(u===Uint8Array)C=new Uint8Array(c,m,_);else{var L=new ArrayBuffer(_),Z=new Uint8Array(L);Z.set(new Uint8Array(c,m,_)),C=new u(L)}if(C.length===f*g)d.pixels.resultPixels=C;else{d.pixels.resultPixels=new u(f*g);var G=0,X=0,v=0,P=0;if(g>1)for(v=0;v=x)return!1;var _=new Uint32Array(x-f);r.decodeBits(c,d,_);var C=[],V,L,Z,G;for(V=f;V0&&(C[L].second=R<>>32-G,32-b>=G?(b+=G,b===32&&(b=0,E++,R=A[E])):(b+=G-32,E++,R=A[E],C[L].second|=R>>>32-b));var I=0,w=0,N=new s;for(V=0;V=u?w=u:w=I,I>=30&&console.log("WARning, large NUM LUT BITS IS "+I);var B=[],U,O,k,J,H,ee;for(V=f;V0)if(U=[G,L],G<=w)for(O=C[L].second<=0;J--)H=O>>>J&1,H?(ee.right||(ee.right=new s),ee=ee.right):(ee.left||(ee.left=new s),ee=ee.left),J===0&&!ee.val&&(ee.val=U[1]);return{decodeLut:B,numBitsLUTQick:w,numBitsLUT:I,tree:N,stuffedData:A,srcPtr:E,bitPos:b}},readHuffman:function(c,d,u){var m=d.headerInfo,p=m.numDims,g=d.headerInfo.height,f=d.headerInfo.width,x=f*g,_=this.readHuffmanTree(c,d),C=_.decodeLut,V=_.tree,L=_.stuffedData,Z=_.srcPtr,G=_.bitPos,X=_.numBitsLUTQick,v=_.numBitsLUT,P=d.headerInfo.imageType===0?128:0,F,A,b,R=d.pixels.resultMask,E,I,w,N,B,U,O,k=0;G>0&&(Z++,G=0);var J=L[Z],H=d.encodeMode===1,ee=new u(x*p),z=ee,j;for(j=0;j1&&(z=new u(ee.buffer,x*j,x),k=0),d.headerInfo.numValidPixel===f*g)for(U=0,N=0;N>>32-X,I=E,32-G>>64-G-X,I=E),C[I])A=C[I][1],G+=C[I][0];else for(E=J<>>32-v,I=E,32-G>>64-G-v,I=E),F=V,O=0;O>>v-O-1&1,F=w?F.right:F.left,!(F.left||F.right)){A=F.val,G=G+O+1;break}G>=32&&(G-=32,Z++,J=L[Z]),b=A-P,H?(B>0?b+=k:N>0?b+=z[U-f]:b+=k,b&=255,z[U]=b,k=b):z[U]=b}else for(U=0,N=0;N>>32-X,I=E,32-G>>64-G-X,I=E),C[I])A=C[I][1],G+=C[I][0];else for(E=J<>>32-v,I=E,32-G>>64-G-v,I=E),F=V,O=0;O>>v-O-1&1,F=w?F.right:F.left,!(F.left||F.right)){A=F.val,G=G+O+1;break}G>=32&&(G-=32,Z++,J=L[Z]),b=A-P,H?(B>0&&R[U-1]?b+=k:N>0&&R[U-f]?b+=z[U-f]:b+=k,b&=255,z[U]=b,k=b):z[U]=b}d.ptr=d.ptr+(Z+1)*4+(G>0?4:0)}d.pixels.resultPixels=ee},decodeBits:function(c,d,u,m,p){{var g=d.headerInfo,f=g.fileVersion,x=0,_=new DataView(c,d.ptr,5),C=_.getUint8(0);x++;var V=C>>6,L=V===0?4:3-V,Z=(C&32)>0,G=C&31,X=0;if(L===1)X=_.getUint8(x),x++;else if(L===2)X=_.getUint16(x,!0),x+=2;else if(L===4)X=_.getUint32(x,!0),x+=4;else throw"Invalid valid pixel count type";var v=2*g.maxZError,P,F,A,b,R,E,I,w,N,B,U=g.numDims>1?g.maxValues[p]:g.zMax;if(Z){for(d.counter.lut++,w=_.getUint8(x),N=G,x++,b=Math.ceil((w-1)*G/8),R=Math.ceil(b/4),F=new ArrayBuffer(R*4),A=new Uint8Array(F),d.ptr+=x,A.set(new Uint8Array(c,d.ptr,b)),I=new Uint32Array(F),d.ptr+=b,B=0;w-1>>>B;)B++;b=Math.ceil(X*B/8),R=Math.ceil(b/4),F=new ArrayBuffer(R*4),A=new Uint8Array(F),A.set(new Uint8Array(c,d.ptr,b)),P=new Uint32Array(F),d.ptr+=b,f>=3?E=o.unstuffLUT2(I,G,w-1,m,v,U):E=o.unstuffLUT(I,G,w-1,m,v,U),f>=3?o.unstuff2(P,u,B,X,E):o.unstuff(P,u,B,X,E)}else d.counter.bitstuffer++,B=G,d.ptr+=x,B>0&&(b=Math.ceil(X*B/8),R=Math.ceil(b/4),F=new ArrayBuffer(R*4),A=new Uint8Array(F),A.set(new Uint8Array(c,d.ptr,b)),P=new Uint32Array(F),d.ptr+=b,f>=3?m==null?o.originalUnstuff2(P,u,B,X):o.unstuff2(P,u,B,X,!1,m,v,U):m==null?o.originalUnstuff(P,u,B,X):o.unstuff(P,u,B,X,!1,m,v,U))}},readTiles:function(c,d,u){var m=d.headerInfo,p=m.width,g=m.height,f=m.microBlockSize,x=m.imageType,_=r.getDataTypeSize(x),C=Math.ceil(p/f),V=Math.ceil(g/f);d.pixels.numBlocksY=V,d.pixels.numBlocksX=C,d.pixels.ptr=0;var L=0,Z=0,G=0,X=0,v=0,P=0,F=0,A=0,b=0,R=0,E=0,I=0,w=0,N=0,B=0,U=0,O,k,J,H,ee,z,j=new u(f*f),q=g%f||f,be=p%f||f,Te,ae,ye=m.numDims,Se,Le=d.pixels.resultMask,Xe=d.pixels.resultPixels;for(G=0;G1&&(Xe=new u(d.pixels.resultPixels.buffer,p*g*Se*_,p*g)),F=c.byteLength-d.ptr,O=new DataView(c,d.ptr,Math.min(10,F)),k={},U=0,A=O.getUint8(0),U++,b=A>>6&255,R=A>>2&15,R!==(X*f>>3&15))throw"integrity issue";if(z=A&3,z>3)throw d.ptr+=U,"Invalid block encoding ("+z+")";if(z===2){d.counter.constant++,d.ptr+=U;continue}else if(z===0){if(d.counter.uncompressed++,d.ptr+=U,w=v*P*_,N=c.byteLength-d.ptr,w=w1)for(g=0;g=-128&&d<=127;break;case 1:u=d>=0&&d<=255;break;case 2:u=d>=-32768&&d<=32767;break;case 3:u=d>=0&&d<=65536;break;case 4:u=d>=-2147483648&&d<=2147483647;break;case 5:u=d>=0&&d<=4294967296;break;case 6:u=d>=-34027999387901484e22&&d<=34027999387901484e22;break;case 7:u=d>=5e-324&&d<=17976931348623157e292;break;default:u=!1}return u},getDataTypeSize:function(c){var d=0;switch(c){case 0:case 1:d=1;break;case 2:case 3:d=2;break;case 4:case 5:case 6:d=4;break;case 7:d=8;break;default:d=c}return d},getDataTypeUsed:function(c,d){var u=c;switch(c){case 2:case 4:u=c-d;break;case 3:case 5:u=c-2*d;break;case 6:d===0?u=c:d===1?u=2:u=1;break;case 7:d===0?u=c:u=c-2*d+1;break;default:u=c;break}return u},getOnePixel:function(c,d,u,m){var p=0;switch(u){case 0:p=m.getInt8(d);break;case 1:p=m.getUint8(d);break;case 2:p=m.getInt16(d,!0);break;case 3:p=m.getUint16(d,!0);break;case 4:p=m.getInt32(d,!0);break;case 5:p=m.getUInt32(d,!0);break;case 6:p=m.getFloat32(d,!0);break;case 7:p=m.getFloat64(d,!0);break;default:throw"the decoder does not understand this pixel type"}return p}},s=function(c,d,u){this.val=c,this.left=d,this.right=u},a={decode:function(c,d){d=d||{};var u=d.noDataValue,m=0,p={};if(p.ptr=d.inputOffset||0,p.pixels={},!!r.readHeaderInfo(c,p)){var g=p.headerInfo,f=g.fileVersion,x=r.getDataTypeArray(g.imageType);r.readMask(c,p),g.numValidPixel!==g.width*g.height&&!p.pixels.resultMask&&(p.pixels.resultMask=d.maskData);var _=g.width*g.height;if(p.pixels.resultPixels=new x(_*g.numDims),p.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},g.numValidPixel!==0)if(g.zMax===g.zMin)r.constructConstantSurface(p);else if(f>=4&&r.checkMinMaxRanges(c,p))r.constructConstantSurface(p);else{var C=new DataView(c,p.ptr,2),V=C.getUint8(0);if(p.ptr++,V)r.readDataOneSweep(c,p,x);else if(f>1&&g.imageType<=1&&Math.abs(g.maxZError-.5)<1e-5){var L=C.getUint8(1);if(p.ptr++,p.encodeMode=L,L>2||f<4&&L>1)throw"Invalid Huffman flag "+L;L?r.readHuffman(c,p,x):r.readTiles(c,p,x)}else r.readTiles(c,p,x)}p.eofOffset=p.ptr;var Z;d.inputOffset?(Z=p.headerInfo.blobSize+d.inputOffset-p.ptr,Math.abs(Z)>=1&&(p.eofOffset=d.inputOffset+p.headerInfo.blobSize)):(Z=p.headerInfo.blobSize-p.ptr,Math.abs(Z)>=1&&(p.eofOffset=p.headerInfo.blobSize));var G={width:g.width,height:g.height,pixelData:p.pixels.resultPixels,minValue:g.zMin,maxValue:g.zMax,validPixelCount:g.numValidPixel,dimCount:g.numDims,dimStats:{minValues:g.minValues,maxValues:g.maxValues},maskData:p.pixels.resultMask};if(p.pixels.resultMask&&r.isValidPixelValue(g.imageType,u)){var X=p.pixels.resultMask;for(m=0;m<_;m++)X[m]||(G.pixelData[m]=u);G.noDataValue=u}return p.noDataValue=u,d.returnFileInfo&&(G.fileInfo=r.formatFileInfo(p)),G}},getBandCount:function(c){var d=0,u=0,m={};for(m.ptr=0,m.pixels={};u1&&V.fileInfo.mask&&V.fileInfo.mask.numBytes>0&&f.push(V.maskData),m++,C.pixels.push(V.pixelData),C.statistics.push({minValue:V.minValue,maxValue:V.maxValue,noDataValue:V.noDataValue,dimStats:V.dimStats})}var L,Z,G;if(u>1&&f.length>1){for(G=C.width*C.height,C.bandMasks=f,_=new Uint8Array(G),_.set(f[0]),L=1;L{var NCo=T(S());RSe.exports={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsL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navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,b6=()=>"wakeLock"in navigator,g6=class{constructor(){if(this.enabled=!1,b6()){this._wakeLock=null;let t=()=>{this._wakeLock!==null&&document.visibilityState==="visible"&&this.enable()};document.addEventListener("visibilitychange",t),document.addEventListener("fullscreenchange",t)}else p6()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",nSt),this._addSourceToVideo(this.noSleepVideo,"mp4",iSt),this.noSleepVideo.addEventListener("loadedmetadata",()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())})}))}_addSourceToVideo(t,n,i){var o=document.createElement("source");o.src=i,o.type=`video/${n}`,t.appendChild(o)}get isEnabled(){return this.enabled}enable(){return b6()?navigator.wakeLock.request("screen").then(t=>{this._wakeLock=t,this.enabled=!0,console.log("Wake Lock active."),this._wakeLock.addEventListener("release",()=>{console.log("Wake Lock released.")})}).catch(t=>{throw this.enabled=!1,console.error(`${t.name}, ${t.message}`),t}):p6()?(this.disable(),console.warn(` + */(function(undefined){"use strict";(function(t,n,i){function o(s){var a=n[s];return a||t[s][0].call(a=n[s]={exports:{}},o,a,a.exports),a.exports}var r=o(i[0]);r.util.global.protobuf=r,typeof define=="function"&&define.amd&&define(["long"],function(s){return s&&s.isLong&&(r.util.Long=s,r.configure()),r}),typeof module=="object"&&module&&module.exports&&(module.exports=r)})({1:[function(e,t,n){"use strict";t.exports=i;function i(o,r){for(var s=new Array(arguments.length-1),a=0,c=2,d=!0;c1&&d.charAt(u)==="=";)++m;return Math.ceil(d.length*3)/4-m};for(var o=new Array(64),r=new Array(123),s=0;s<64;)r[o[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(d,u,m){for(var p=null,g=[],f=0,x=0,_;u>2],_=(C&3)<<4,x=1;break;case 1:g[f++]=o[_|C>>4],_=(C&15)<<2,x=2;break;case 2:g[f++]=o[_|C>>6],g[f++]=o[C&63],x=0;break}f>8191&&((p||(p=[])).push(String.fromCharCode.apply(String,g)),f=0)}return x&&(g[f++]=o[_],g[f++]=61,x===1&&(g[f++]=61)),p?(f&&p.push(String.fromCharCode.apply(String,g.slice(0,f))),p.join("")):String.fromCharCode.apply(String,g.slice(0,f))};var a="invalid encoding";i.decode=function(d,u,m){for(var p=m,g=0,f,x=0;x1)break;if((_=r[_])===undefined)throw Error(a);switch(g){case 0:f=_,g=1;break;case 1:u[m++]=f<<2|(_&48)>>4,f=_,g=2;break;case 2:u[m++]=(f&15)<<4|(_&60)>>2,f=_,g=3;break;case 3:u[m++]=(f&3)<<6|_,g=0;break}}if(g===1)throw Error(a);return m-p},i.test=function(d){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(d)}},{}],3:[function(e,t,n){"use strict";t.exports=i;function i(){this._listeners={}}i.prototype.on=function(r,s,a){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:s,ctx:a||this}),this},i.prototype.off=function(r,s){if(r===undefined)this._listeners={};else if(s===undefined)this._listeners[r]=[];else for(var a=this._listeners[r],c=0;c0?0:2147483648,g,f);else if(isNaN(p))m(2143289344,g,f);else if(p>34028234663852886e22)m((x<<31|2139095040)>>>0,g,f);else if(p<11754943508222875e-54)m((x<<31|Math.round(p/1401298464324817e-60))>>>0,g,f);else{var _=Math.floor(Math.log(p)/Math.LN2),C=Math.round(p*Math.pow(2,-_)*8388608)&8388607;m((x<<31|_+127<<23|C)>>>0,g,f)}}c.writeFloatLE=d.bind(null,o),c.writeFloatBE=d.bind(null,r);function u(m,p,g){var f=m(p,g),x=(f>>31)*2+1,_=f>>>23&255,C=f&8388607;return _===255?C?NaN:x*(1/0):_===0?x*1401298464324817e-60*C:x*Math.pow(2,_-150)*(C+8388608)}c.readFloatLE=u.bind(null,s),c.readFloatBE=u.bind(null,a)}(),typeof Float64Array<"u"?function(){var d=new Float64Array([-0]),u=new Uint8Array(d.buffer),m=u[7]===128;function p(_,C,V){d[0]=_,C[V]=u[0],C[V+1]=u[1],C[V+2]=u[2],C[V+3]=u[3],C[V+4]=u[4],C[V+5]=u[5],C[V+6]=u[6],C[V+7]=u[7]}function g(_,C,V){d[0]=_,C[V]=u[7],C[V+1]=u[6],C[V+2]=u[5],C[V+3]=u[4],C[V+4]=u[3],C[V+5]=u[2],C[V+6]=u[1],C[V+7]=u[0]}c.writeDoubleLE=m?p:g,c.writeDoubleBE=m?g:p;function f(_,C){return u[0]=_[C],u[1]=_[C+1],u[2]=_[C+2],u[3]=_[C+3],u[4]=_[C+4],u[5]=_[C+5],u[6]=_[C+6],u[7]=_[C+7],d[0]}function x(_,C){return u[7]=_[C],u[6]=_[C+1],u[5]=_[C+2],u[4]=_[C+3],u[3]=_[C+4],u[2]=_[C+5],u[1]=_[C+6],u[0]=_[C+7],d[0]}c.readDoubleLE=m?f:x,c.readDoubleBE=m?x:f}():function(){function d(m,p,g,f,x,_){var C=f<0?1:0;if(C&&(f=-f),f===0)m(0,x,_+p),m(1/f>0?0:2147483648,x,_+g);else if(isNaN(f))m(0,x,_+p),m(2146959360,x,_+g);else if(f>17976931348623157e292)m(0,x,_+p),m((C<<31|2146435072)>>>0,x,_+g);else{var V;if(f<22250738585072014e-324)V=f/5e-324,m(V>>>0,x,_+p),m((C<<31|V/4294967296)>>>0,x,_+g);else{var Z=Math.floor(Math.log(f)/Math.LN2);Z===1024&&(Z=1023),V=f*Math.pow(2,-Z),m(V*4503599627370496>>>0,x,_+p),m((C<<31|Z+1023<<20|V*1048576&1048575)>>>0,x,_+g)}}}c.writeDoubleLE=d.bind(null,o,0,4),c.writeDoubleBE=d.bind(null,r,4,0);function u(m,p,g,f,x){var _=m(f,x+p),C=m(f,x+g),V=(C>>31)*2+1,Z=C>>>20&2047,R=4294967296*(C&1048575)+_;return Z===2047?R?NaN:V*(1/0):Z===0?V*5e-324*R:V*Math.pow(2,Z-1075)*(R+4503599627370496)}c.readDoubleLE=u.bind(null,s,0,4),c.readDoubleBE=u.bind(null,a,4,0)}(),c}function o(c,d,u){d[u]=c&255,d[u+1]=c>>>8&255,d[u+2]=c>>>16&255,d[u+3]=c>>>24}function r(c,d,u){d[u]=c>>>24,d[u+1]=c>>>16&255,d[u+2]=c>>>8&255,d[u+3]=c&255}function s(c,d){return(c[d]|c[d+1]<<8|c[d+2]<<16|c[d+3]<<24)>>>0}function a(c,d){return(c[d]<<24|c[d+1]<<16|c[d+2]<<8|c[d+3])>>>0}},{}],5:[function(require,module,exports){"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}},{}],6:[function(e,t,n){"use strict";t.exports=i;function i(o,r,s){var a=s||8192,c=a>>>1,d=null,u=a;return function(p){if(p<1||p>c)return o(p);u+p>a&&(d=o(a),u=0);var g=r.call(d,u,u+=p);return u&7&&(u=(u|7)+1),g}}},{}],7:[function(e,t,n){"use strict";var i=n;i.length=function(r){for(var s=0,a=0,c=0;c191&&p<224?u[m++]=(p&31)<<6|r[s++]&63:p>239&&p<365?(p=((p&7)<<18|(r[s++]&63)<<12|(r[s++]&63)<<6|r[s++]&63)-65536,u[m++]=55296+(p>>10),u[m++]=56320+(p&1023)):u[m++]=(p&15)<<12|(r[s++]&63)<<6|r[s++]&63,m>8191&&((d||(d=[])).push(String.fromCharCode.apply(String,u)),m=0);return d?(m&&d.push(String.fromCharCode.apply(String,u.slice(0,m))),d.join("")):String.fromCharCode.apply(String,u.slice(0,m))},i.write=function(r,s,a){for(var c=a,d,u,m=0;m>6|192,s[a++]=d&63|128):(d&64512)===55296&&((u=r.charCodeAt(m+1))&64512)===56320?(d=65536+((d&1023)<<10)+(u&1023),++m,s[a++]=d>>18|240,s[a++]=d>>12&63|128,s[a++]=d>>6&63|128,s[a++]=d&63|128):(s[a++]=d>>12|224,s[a++]=d>>6&63|128,s[a++]=d&63|128);return a-c}},{}],8:[function(e,t,n){"use strict";var i=n;i.build="minimal",i.Writer=e(16),i.BufferWriter=e(17),i.Reader=e(9),i.BufferReader=e(10),i.util=e(15),i.rpc=e(12),i.roots=e(11),i.configure=o;function o(){i.util._configure(),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}o()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(e,t,n){"use strict";t.exports=c;var i=e(15),o,r=i.LongBits,s=i.utf8;function a(f,x){return RangeError("index out of range: "+f.pos+" + "+(x||1)+" > "+f.len)}function c(f){this.buf=f,this.pos=0,this.len=f.length}var d=typeof Uint8Array<"u"?function(x){if(x instanceof Uint8Array||Array.isArray(x))return new c(x);throw Error("illegal buffer")}:function(x){if(Array.isArray(x))return new c(x);throw Error("illegal buffer")},u=function(){return i.Buffer?function(_){return(c.create=function(V){return i.Buffer.isBuffer(V)?new o(V):d(V)})(_)}:d};c.create=u(),c.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,c.prototype.uint32=function(){var x=4294967295;return function(){if(x=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(x=(x|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(x=(x|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(x=(x|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(x=(x|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return x;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return x}}(),c.prototype.int32=function(){return this.uint32()|0},c.prototype.sint32=function(){var x=this.uint32();return x>>>1^-(x&1)|0};function m(){var f=new r(0,0),x=0;if(this.len-this.pos>4){for(;x<4;++x)if(f.lo=(f.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return f;if(f.lo=(f.lo|(this.buf[this.pos]&127)<<28)>>>0,f.hi=(f.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return f;x=0}else{for(;x<3;++x){if(this.pos>=this.len)throw a(this);if(f.lo=(f.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return f}return f.lo=(f.lo|(this.buf[this.pos++]&127)<>>0,f}if(this.len-this.pos>4){for(;x<5;++x)if(f.hi=(f.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return f}else for(;x<5;++x){if(this.pos>=this.len)throw a(this);if(f.hi=(f.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return f}throw Error("invalid varint encoding")}c.prototype.bool=function(){return this.uint32()!==0};function p(f,x){return(f[x-4]|f[x-3]<<8|f[x-2]<<16|f[x-1]<<24)>>>0}c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)|0};function g(){if(this.pos+8>this.len)throw a(this,8);return new r(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var x=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,x},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var x=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,x},c.prototype.bytes=function(){var x=this.uint32(),_=this.pos,C=this.pos+x;if(C>this.len)throw a(this,x);if(this.pos+=x,Array.isArray(this.buf))return this.buf.slice(_,C);if(_===C){var V=i.Buffer;return V?V.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,_,C)},c.prototype.string=function(){var x=this.bytes();return s.read(x,0,x.length)},c.prototype.skip=function(x){if(typeof x=="number"){if(this.pos+x>this.len)throw a(this,x);this.pos+=x}else do if(this.pos>=this.len)throw a(this);while(this.buf[this.pos++]&128);return this},c.prototype.skipType=function(f){switch(f){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(f=this.uint32()&7)!==4;)this.skipType(f);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+f+" at offset "+this.pos)}return this},c._configure=function(f){o=f,c.create=u(),o._configure();var x=i.Long?"toLong":"toNumber";i.merge(c.prototype,{int64:function(){return m.call(this)[x](!1)},uint64:function(){return m.call(this)[x](!0)},sint64:function(){return m.call(this).zzDecode()[x](!1)},fixed64:function(){return g.call(this)[x](!0)},sfixed64:function(){return g.call(this)[x](!1)}})}},{15:15}],10:[function(e,t,n){"use strict";t.exports=r;var i=e(9);(r.prototype=Object.create(i.prototype)).constructor=r;var o=e(15);function r(s){i.call(this,s)}r._configure=function(){o.Buffer&&(r.prototype._slice=o.Buffer.prototype.slice)},r.prototype.string=function(){var a=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+a,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+a,this.len))},r._configure()},{15:15,9:9}],11:[function(e,t,n){"use strict";t.exports={}},{}],12:[function(e,t,n){"use strict";var i=n;i.Service=e(13)},{13:13}],13:[function(e,t,n){"use strict";t.exports=o;var i=e(15);(o.prototype=Object.create(i.EventEmitter.prototype)).constructor=o;function o(r,s,a){if(typeof r!="function")throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=r,this.requestDelimited=!!s,this.responseDelimited=!!a}o.prototype.rpcCall=function r(s,a,c,d,u){if(!d)throw TypeError("request must be specified");var m=this;if(!u)return i.asPromise(r,m,s,a,c,d);if(!m.rpcImpl)return setTimeout(function(){u(Error("already ended"))},0),undefined;try{return m.rpcImpl(s,a[m.requestDelimited?"encodeDelimited":"encode"](d).finish(),function(g,f){if(g)return m.emit("error",g,s),u(g);if(f===null)return m.end(!0),undefined;if(!(f instanceof c))try{f=c[m.responseDelimited?"decodeDelimited":"decode"](f)}catch(x){return m.emit("error",x,s),u(x)}return m.emit("data",f,s),u(null,f)})}catch(p){return m.emit("error",p,s),setTimeout(function(){u(p)},0),undefined}},o.prototype.end=function(s){return this.rpcImpl&&(s||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(e,t,n){"use strict";t.exports=o;var i=e(15);function o(c,d){this.lo=c>>>0,this.hi=d>>>0}var r=o.zero=new o(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(d){if(d===0)return r;var u=d<0;u&&(d=-d);var m=d>>>0,p=(d-m)/4294967296>>>0;return u&&(p=~p>>>0,m=~m>>>0,++m>4294967295&&(m=0,++p>4294967295&&(p=0))),new o(m,p)},o.from=function(d){if(typeof d=="number")return o.fromNumber(d);if(i.isString(d))if(i.Long)d=i.Long.fromString(d);else return o.fromNumber(parseInt(d,10));return d.low||d.high?new o(d.low>>>0,d.high>>>0):r},o.prototype.toNumber=function(d){if(!d&&this.hi>>>31){var u=~this.lo+1>>>0,m=~this.hi>>>0;return u||(m=m+1>>>0),-(u+m*4294967296)}return this.lo+this.hi*4294967296},o.prototype.toLong=function(d){return i.Long?new i.Long(this.lo|0,this.hi|0,!!d):{low:this.lo|0,high:this.hi|0,unsigned:!!d}};var a=String.prototype.charCodeAt;o.fromHash=function(d){return d===s?r:new o((a.call(d,0)|a.call(d,1)<<8|a.call(d,2)<<16|a.call(d,3)<<24)>>>0,(a.call(d,4)|a.call(d,5)<<8|a.call(d,6)<<16|a.call(d,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var d=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^d)>>>0,this.lo=(this.lo<<1^d)>>>0,this},o.prototype.zzDecode=function(){var d=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^d)>>>0,this.hi=(this.hi>>>1^d)>>>0,this},o.prototype.length=function(){var d=this.lo,u=(this.lo>>>28|this.hi<<4)>>>0,m=this.hi>>>24;return m===0?u===0?d<16384?d<128?1:2:d<2097152?3:4:u<16384?u<128?5:6:u<2097152?7:8:m<128?9:10}},{15:15}],15:[function(e,t,n){"use strict";var i=n;i.asPromise=e(1),i.base64=e(2),i.EventEmitter=e(3),i.float=e(4),i.inquire=e(5),i.utf8=e(7),i.pool=e(6),i.LongBits=e(14),i.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),i.global=i.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||this,i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a},i.isString=function(a){return typeof a=="string"||a instanceof String},i.isObject=function(a){return a&&typeof a=="object"},i.isset=i.isSet=function(a,c){var d=a[c];return d!=null&&a.hasOwnProperty(c)?typeof d!="object"||(Array.isArray(d)?d.length:Object.keys(d).length)>0:!1},i.Buffer=function(){try{var s=i.inquire("buffer").Buffer;return s.prototype.utf8Write?s:null}catch{return null}}(),i._Buffer_from=null,i._Buffer_allocUnsafe=null,i.newBuffer=function(a){return typeof a=="number"?i.Buffer?i._Buffer_allocUnsafe(a):new i.Array(a):i.Buffer?i._Buffer_from(a):typeof Uint8Array>"u"?a:new Uint8Array(a)},i.Array=typeof Uint8Array<"u"?Uint8Array:Array,i.Long=i.global.dcodeIO&&i.global.dcodeIO.Long||i.global.Long||i.inquire("long"),i.key2Re=/^true|false|0|1$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(a){return a?i.LongBits.from(a).toHash():i.LongBits.zeroHash},i.longFromHash=function(a,c){var d=i.LongBits.fromHash(a);return i.Long?i.Long.fromBits(d.lo,d.hi,c):d.toNumber(!!c)};function o(s,a,c){for(var d=Object.keys(a),u=0;u-1;--m)if(c[u[m]]===1&&this[u[m]]!==undefined&&this[u[m]]!==null)return u[m]}},i.oneOfSetter=function(a){return function(c){for(var d=0;d127;)R[G++]=Z&127|128,Z>>>=7;R[G]=Z}function x(Z,R){this.len=Z,this.next=undefined,this.val=R}x.prototype=Object.create(c.prototype),x.prototype.fn=f,m.prototype.uint32=function(R){return this.len+=(this.tail=this.tail.next=new x((R=R>>>0)<128?1:R<16384?2:R<2097152?3:R<268435456?4:5,R)).len,this},m.prototype.int32=function(R){return R<0?this._push(_,10,r.fromNumber(R)):this.uint32(R)},m.prototype.sint32=function(R){return this.uint32((R<<1^R>>31)>>>0)};function _(Z,R,G){for(;Z.hi;)R[G++]=Z.lo&127|128,Z.lo=(Z.lo>>>7|Z.hi<<25)>>>0,Z.hi>>>=7;for(;Z.lo>127;)R[G++]=Z.lo&127|128,Z.lo=Z.lo>>>7;R[G++]=Z.lo}m.prototype.uint64=function(R){var G=r.from(R);return this._push(_,G.length(),G)},m.prototype.int64=m.prototype.uint64,m.prototype.sint64=function(R){var G=r.from(R).zzEncode();return this._push(_,G.length(),G)},m.prototype.bool=function(R){return this._push(g,1,R?1:0)};function C(Z,R,G){R[G]=Z&255,R[G+1]=Z>>>8&255,R[G+2]=Z>>>16&255,R[G+3]=Z>>>24}m.prototype.fixed32=function(R){return this._push(C,4,R>>>0)},m.prototype.sfixed32=m.prototype.fixed32,m.prototype.fixed64=function(R){var G=r.from(R);return this._push(C,4,G.lo)._push(C,4,G.hi)},m.prototype.sfixed64=m.prototype.fixed64,m.prototype.float=function(R){return this._push(i.float.writeFloatLE,4,R)},m.prototype.double=function(R){return this._push(i.float.writeDoubleLE,8,R)};var V=i.Array.prototype.set?function(R,G,W){G.set(R,W)}:function(R,G,W){for(var v=0;v>>0;if(!G)return this._push(g,1,0);if(i.isString(R)){var W=m.alloc(G=s.length(R));s.decode(R,W,0),R=W}return this.uint32(G)._push(V,G,R)},m.prototype.string=function(R){var G=a.length(R);return G?this.uint32(G)._push(a.write,G,R):this._push(g,1,0)},m.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(d,0,0),this.len=0,this},m.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(d,0,0),this.len=0),this},m.prototype.ldelim=function(){var R=this.head,G=this.tail,W=this.len;return this.reset().uint32(W),W&&(this.tail.next=R.next,this.tail=G,this.len+=W),this},m.prototype.finish=function(){for(var R=this.head.next,G=this.constructor.alloc(this.len),W=0;R;)R.fn(R.val,G,W),W+=R.len,R=R.next;return G},m._configure=function(Z){o=Z,m.create=p(),o._configure()}},{15:15}],17:[function(e,t,n){"use strict";t.exports=r;var i=e(16);(r.prototype=Object.create(i.prototype)).constructor=r;var o=e(15);function r(){i.call(this)}r._configure=function(){r.alloc=o._Buffer_allocUnsafe,r.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&o.Buffer.prototype.set.name==="set"?function(c,d,u){d.set(c,u)}:function(c,d,u){if(c.copy)c.copy(d,u,0,c.length);else for(var m=0;m>>0;return this.uint32(d),d&&this._push(r.writeBytesBuffer,d,c),this};function s(a,c,d){a.length<40?o.utf8.write(a,c,d):c.utf8Write?c.utf8Write(a,d):c.write(a,d)}r.prototype.string=function(c){var d=o.Buffer.byteLength(c);return this.uint32(d),d&&this._push(s,d,c),this},r._configure()},{15:15,16:16}]},{},[8])})()});var vSe=Wc((Wji,FB)=>{var Iji=S(T());/* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */(function(){var e=function(){var o={};o.defaultNoDataValue=-34027999387901484e22,o.decode=function(u,m){m=m||{};var p=m.encodedMaskData||m.encodedMaskData===null,g=c(u,m.inputOffset||0,p),f=m.noDataValue!==null?m.noDataValue:o.defaultNoDataValue,x=r(g,m.pixelType||Float32Array,m.encodedMaskData,f,m.returnMask),_={width:g.width,height:g.height,pixelData:x.resultPixels,minValue:x.minValue,maxValue:g.pixels.maxValue,noDataValue:f};return x.resultMask&&(_.maskData=x.resultMask),m.returnEncodedMask&&g.mask&&(_.encodedMaskData=g.mask.bitset?g.mask.bitset:null),m.returnFileInfo&&(_.fileInfo=s(g),m.computeUsedBitDepths&&(_.fileInfo.bitDepths=a(g))),_};var r=function(u,m,p,g,f){var x=0,_=u.pixels.numBlocksX,C=u.pixels.numBlocksY,V=Math.floor(u.width/_),Z=Math.floor(u.height/C),R=2*u.maxZError,G=Number.MAX_VALUE,W;p=p||(u.mask?u.mask.bitset:null);var v,P;v=new m(u.width*u.height),f&&p&&(P=new Uint8Array(u.width*u.height));for(var F=new Float32Array(V*Z),M,b,L=0;L<=C;L++){var E=L!==C?Z:u.height%C;if(E!==0)for(var I=0;I<=_;I++){var w=I!==_?V:u.width%_;if(w!==0){var N=L*u.width*Z+I*V,B=u.width-w,k=u.pixels.blocks[x],O,U,J;k.encoding<2?(k.encoding===0?O=k.rawData:(d(k.stuffedData,k.bitsPerPixel,k.numValidPixels,k.offset,R,F,u.pixels.maxValue),O=F),U=0):k.encoding===2?J=0:J=k.offset;var z;if(p)for(b=0;b>3],z<<=N&7),M=0;M>3]),z&128?(P&&(P[N]=1),W=k.encoding<2?O[U++]:J,G=G>W?W:G,v[N++]=W):(P&&(P[N]=0),v[N++]=g),z<<=1;N+=B}else if(k.encoding<2)for(b=0;bW?W:G,v[N++]=W;N+=B}else for(G=G>J?J:G,b=0;b0){var _=new Uint8Array(Math.ceil(g.width*g.height/8));x=new DataView(u,m,g.mask.numBytes);var C=x.getInt16(0,!0),V=2,Z=0;do{if(C>0)for(;C--;)_[Z++]=x.getUint8(V++);else{var R=x.getUint8(V++);for(C=-C;C--;)_[Z++]=R}C=x.getInt16(V,!0),V+=2}while(V0?1:0),P=W+(g.height%W>0?1:0);g.pixels.blocks=new Array(v*P);for(var F=0,M=0;M3)throw"Invalid block encoding ("+I.encoding+")";if(I.encoding===2){m++;continue}if(w!==0&&w!==2){if(w>>=6,I.offsetType=w,w===2)I.offset=x.getInt8(1),L++;else if(w===1)I.offset=x.getInt16(1,!0),L+=2;else if(w===0)I.offset=x.getFloat32(1,!0),L+=4;else throw"Invalid block offset type";if(I.encoding===1)if(w=x.getUint8(L),L++,I.bitsPerPixel=w&63,w>>=6,I.numValidPixelsType=w,w===2)I.numValidPixels=x.getUint8(L),L++;else if(w===1)I.numValidPixels=x.getUint16(L,!0),L+=2;else if(w===0)I.numValidPixels=x.getUint32(L,!0),L+=4;else throw"Invalid valid pixel count type"}if(m+=L,I.encoding!==3){var N,B;if(I.encoding===0){var k=(g.pixels.numBytes-1)/4;if(k!==Math.floor(k))throw"uncompressed block has invalid length";N=new ArrayBuffer(k*4),B=new Uint8Array(N),B.set(new Uint8Array(u,m,k*4));var O=new Float32Array(N);I.rawData=O,m+=k*4}else if(I.encoding===1){var U=Math.ceil(I.numValidPixels*I.bitsPerPixel/8),J=Math.ceil(U/4);N=new ArrayBuffer(J*4),B=new Uint8Array(N),B.set(new Uint8Array(u,m,U)),I.stuffedData=new Uint32Array(N),m+=U}}}return g.eofOffset=m,g},d=function(u,m,p,g,f,x,_){var C=(1<=m)G=W>>>R-m&C,R-=m;else{var F=m-R;G=(W&C)<>>R}x[Z]=G=u?(R=G>>>Z-u&_,Z-=u):(W=u-Z,R=(G&_)<>>Z),d[V]=p[R];else for(v=Math.ceil((x-g)/f),V=0;V=u?(R=G>>>Z-u&_,Z-=u):(W=u-Z,R=(G&_)<>>Z),d[V]=R=d?(Z=R>>>V-d&f,V-=d):(C=d-V,Z=(R&f)<>>V),G[_]=Z=u?(G=W>>>R&_,Z-=u,R+=u):(v=u-Z,G=W>>>R&_,W=c[C++],Z=32-v,G|=(W&(1<=u?(G=W>>>R&_,Z-=u,R+=u):(v=u-Z,G=W>>>R&_,W=c[C++],Z=32-v,G|=(W&(1<=d?(Z=G>>>R&f,V-=d,R+=d):(C=d-V,Z=G>>>R&f,G=c[x++],V=32-C,Z|=(G&(1<=u?(_=C>>>x-u&p,x-=u):(V=u-x,_=(C&p)<>>x),d[f]=_;return d},originalUnstuff2:function(c,d,u,m){var p=(1<=u?(C=V>>>_&p,x-=u,_+=u):(Z=u-x,C=V>>>_&p,V=c[g++],x=32-Z,C|=(V&(1<=359?359:p;p-=f;do d+=c[g++]<<8,u+=d+=c[g++];while(--f);d=(d&65535)+(d>>>16),u=(u&65535)+(u>>>16)}return m&1&&(u+=d+=c[g]<<8),d=(d&65535)+(d>>>16),u=(u&65535)+(u>>>16),(u<<16|d)>>>0},readHeaderInfo:function(c,d){var u=d.ptr,m=new Uint8Array(c,u,6),p={};if(p.fileIdentifierString=String.fromCharCode.apply(null,m),p.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+p.fileIdentifierString;u+=6;var g=new DataView(c,u,8),f=g.getInt32(0,!0);p.fileVersion=f,u+=4,f>=3&&(p.checksum=g.getUint32(4,!0),u+=4),g=new DataView(c,u,12),p.height=g.getUint32(0,!0),p.width=g.getUint32(4,!0),u+=8,f>=4?(p.numDims=g.getUint32(8,!0),u+=4):p.numDims=1,g=new DataView(c,u,40),p.numValidPixel=g.getUint32(0,!0),p.microBlockSize=g.getInt32(4,!0),p.blobSize=g.getInt32(8,!0),p.imageType=g.getInt32(12,!0),p.maxZError=g.getFloat64(16,!0),p.zMin=g.getFloat64(24,!0),p.zMax=g.getFloat64(32,!0),u+=40,d.headerInfo=p,d.ptr=u;var x,_;if(f>=3&&(_=f>=4?52:48,x=this.computeChecksumFletcher32(new Uint8Array(c,u-_,p.blobSize-14)),x!==p.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(c,d){var u=d.headerInfo,m=this.getDataTypeArray(u.imageType),p=u.numDims*this.getDataTypeSize(u.imageType),g=this.readSubArray(c,d.ptr,m,p),f=this.readSubArray(c,d.ptr+p,m,p);d.ptr+=2*p;var x,_=!0;for(x=0;x0){_=new Uint8Array(Math.ceil(p/8)),f=new DataView(c,u,x.numBytes);var V=f.getInt16(0,!0),Z=2,R=0,G=0;do{if(V>0)for(;V--;)_[R++]=f.getUint8(Z++);else for(G=f.getUint8(Z++),V=-V;V--;)_[R++]=G;V=f.getInt16(Z,!0),Z+=2}while(Z>3],W<<=v&7):W=_[v>>3],W&128&&(C[v]=1);d.pixels.resultMask=C,x.bitset=_,u+=x.numBytes}return d.ptr=u,d.mask=x,!0},readDataOneSweep:function(c,d,u){var m=d.ptr,p=d.headerInfo,g=p.numDims,f=p.width*p.height,x=p.imageType,_=p.numValidPixel*r.getDataTypeSize(x)*g,C,V=d.pixels.resultMask;if(u===Uint8Array)C=new Uint8Array(c,m,_);else{var Z=new ArrayBuffer(_),R=new Uint8Array(Z);R.set(new Uint8Array(c,m,_)),C=new u(Z)}if(C.length===f*g)d.pixels.resultPixels=C;else{d.pixels.resultPixels=new u(f*g);var G=0,W=0,v=0,P=0;if(g>1)for(v=0;v=x)return!1;var _=new Uint32Array(x-f);r.decodeBits(c,d,_);var C=[],V,Z,R,G;for(V=f;V0&&(C[Z].second=L<>>32-G,32-b>=G?(b+=G,b===32&&(b=0,E++,L=M[E])):(b+=G-32,E++,L=M[E],C[Z].second|=L>>>32-b));var I=0,w=0,N=new s;for(V=0;V=u?w=u:w=I,I>=30&&console.log("WARning, large NUM LUT BITS IS "+I);var B=[],k,O,U,J,z,ee;for(V=f;V0)if(k=[G,Z],G<=w)for(O=C[Z].second<=0;J--)z=O>>>J&1,z?(ee.right||(ee.right=new s),ee=ee.right):(ee.left||(ee.left=new s),ee=ee.left),J===0&&!ee.val&&(ee.val=k[1]);return{decodeLut:B,numBitsLUTQick:w,numBitsLUT:I,tree:N,stuffedData:M,srcPtr:E,bitPos:b}},readHuffman:function(c,d,u){var m=d.headerInfo,p=m.numDims,g=d.headerInfo.height,f=d.headerInfo.width,x=f*g,_=this.readHuffmanTree(c,d),C=_.decodeLut,V=_.tree,Z=_.stuffedData,R=_.srcPtr,G=_.bitPos,W=_.numBitsLUTQick,v=_.numBitsLUT,P=d.headerInfo.imageType===0?128:0,F,M,b,L=d.pixels.resultMask,E,I,w,N,B,k,O,U=0;G>0&&(R++,G=0);var J=Z[R],z=d.encodeMode===1,ee=new u(x*p),K=ee,j;for(j=0;j1&&(K=new u(ee.buffer,x*j,x),U=0),d.headerInfo.numValidPixel===f*g)for(k=0,N=0;N>>32-W,I=E,32-G>>64-G-W,I=E),C[I])M=C[I][1],G+=C[I][0];else for(E=J<>>32-v,I=E,32-G>>64-G-v,I=E),F=V,O=0;O>>v-O-1&1,F=w?F.right:F.left,!(F.left||F.right)){M=F.val,G=G+O+1;break}G>=32&&(G-=32,R++,J=Z[R]),b=M-P,z?(B>0?b+=U:N>0?b+=K[k-f]:b+=U,b&=255,K[k]=b,U=b):K[k]=b}else for(k=0,N=0;N>>32-W,I=E,32-G>>64-G-W,I=E),C[I])M=C[I][1],G+=C[I][0];else for(E=J<>>32-v,I=E,32-G>>64-G-v,I=E),F=V,O=0;O>>v-O-1&1,F=w?F.right:F.left,!(F.left||F.right)){M=F.val,G=G+O+1;break}G>=32&&(G-=32,R++,J=Z[R]),b=M-P,z?(B>0&&L[k-1]?b+=U:N>0&&L[k-f]?b+=K[k-f]:b+=U,b&=255,K[k]=b,U=b):K[k]=b}d.ptr=d.ptr+(R+1)*4+(G>0?4:0)}d.pixels.resultPixels=ee},decodeBits:function(c,d,u,m,p){{var g=d.headerInfo,f=g.fileVersion,x=0,_=new DataView(c,d.ptr,5),C=_.getUint8(0);x++;var V=C>>6,Z=V===0?4:3-V,R=(C&32)>0,G=C&31,W=0;if(Z===1)W=_.getUint8(x),x++;else if(Z===2)W=_.getUint16(x,!0),x+=2;else if(Z===4)W=_.getUint32(x,!0),x+=4;else throw"Invalid valid pixel count type";var v=2*g.maxZError,P,F,M,b,L,E,I,w,N,B,k=g.numDims>1?g.maxValues[p]:g.zMax;if(R){for(d.counter.lut++,w=_.getUint8(x),N=G,x++,b=Math.ceil((w-1)*G/8),L=Math.ceil(b/4),F=new ArrayBuffer(L*4),M=new Uint8Array(F),d.ptr+=x,M.set(new Uint8Array(c,d.ptr,b)),I=new Uint32Array(F),d.ptr+=b,B=0;w-1>>>B;)B++;b=Math.ceil(W*B/8),L=Math.ceil(b/4),F=new ArrayBuffer(L*4),M=new Uint8Array(F),M.set(new Uint8Array(c,d.ptr,b)),P=new Uint32Array(F),d.ptr+=b,f>=3?E=o.unstuffLUT2(I,G,w-1,m,v,k):E=o.unstuffLUT(I,G,w-1,m,v,k),f>=3?o.unstuff2(P,u,B,W,E):o.unstuff(P,u,B,W,E)}else d.counter.bitstuffer++,B=G,d.ptr+=x,B>0&&(b=Math.ceil(W*B/8),L=Math.ceil(b/4),F=new ArrayBuffer(L*4),M=new Uint8Array(F),M.set(new Uint8Array(c,d.ptr,b)),P=new Uint32Array(F),d.ptr+=b,f>=3?m==null?o.originalUnstuff2(P,u,B,W):o.unstuff2(P,u,B,W,!1,m,v,k):m==null?o.originalUnstuff(P,u,B,W):o.unstuff(P,u,B,W,!1,m,v,k))}},readTiles:function(c,d,u){var m=d.headerInfo,p=m.width,g=m.height,f=m.microBlockSize,x=m.imageType,_=r.getDataTypeSize(x),C=Math.ceil(p/f),V=Math.ceil(g/f);d.pixels.numBlocksY=V,d.pixels.numBlocksX=C,d.pixels.ptr=0;var Z=0,R=0,G=0,W=0,v=0,P=0,F=0,M=0,b=0,L=0,E=0,I=0,w=0,N=0,B=0,k=0,O,U,J,z,ee,K,j=new u(f*f),q=g%f||f,be=p%f||f,Se,ae,ye=m.numDims,Te,Ze=d.pixels.resultMask,We=d.pixels.resultPixels;for(G=0;G1&&(We=new u(d.pixels.resultPixels.buffer,p*g*Te*_,p*g)),F=c.byteLength-d.ptr,O=new DataView(c,d.ptr,Math.min(10,F)),U={},k=0,M=O.getUint8(0),k++,b=M>>6&255,L=M>>2&15,L!==(W*f>>3&15))throw"integrity issue";if(K=M&3,K>3)throw d.ptr+=k,"Invalid block encoding ("+K+")";if(K===2){d.counter.constant++,d.ptr+=k;continue}else if(K===0){if(d.counter.uncompressed++,d.ptr+=k,w=v*P*_,N=c.byteLength-d.ptr,w=w1)for(g=0;g=-128&&d<=127;break;case 1:u=d>=0&&d<=255;break;case 2:u=d>=-32768&&d<=32767;break;case 3:u=d>=0&&d<=65536;break;case 4:u=d>=-2147483648&&d<=2147483647;break;case 5:u=d>=0&&d<=4294967296;break;case 6:u=d>=-34027999387901484e22&&d<=34027999387901484e22;break;case 7:u=d>=5e-324&&d<=17976931348623157e292;break;default:u=!1}return u},getDataTypeSize:function(c){var d=0;switch(c){case 0:case 1:d=1;break;case 2:case 3:d=2;break;case 4:case 5:case 6:d=4;break;case 7:d=8;break;default:d=c}return d},getDataTypeUsed:function(c,d){var u=c;switch(c){case 2:case 4:u=c-d;break;case 3:case 5:u=c-2*d;break;case 6:d===0?u=c:d===1?u=2:u=1;break;case 7:d===0?u=c:u=c-2*d+1;break;default:u=c;break}return u},getOnePixel:function(c,d,u,m){var p=0;switch(u){case 0:p=m.getInt8(d);break;case 1:p=m.getUint8(d);break;case 2:p=m.getInt16(d,!0);break;case 3:p=m.getUint16(d,!0);break;case 4:p=m.getInt32(d,!0);break;case 5:p=m.getUInt32(d,!0);break;case 6:p=m.getFloat32(d,!0);break;case 7:p=m.getFloat64(d,!0);break;default:throw"the decoder does not understand this pixel type"}return p}},s=function(c,d,u){this.val=c,this.left=d,this.right=u},a={decode:function(c,d){d=d||{};var u=d.noDataValue,m=0,p={};if(p.ptr=d.inputOffset||0,p.pixels={},!!r.readHeaderInfo(c,p)){var g=p.headerInfo,f=g.fileVersion,x=r.getDataTypeArray(g.imageType);r.readMask(c,p),g.numValidPixel!==g.width*g.height&&!p.pixels.resultMask&&(p.pixels.resultMask=d.maskData);var _=g.width*g.height;if(p.pixels.resultPixels=new x(_*g.numDims),p.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},g.numValidPixel!==0)if(g.zMax===g.zMin)r.constructConstantSurface(p);else if(f>=4&&r.checkMinMaxRanges(c,p))r.constructConstantSurface(p);else{var C=new DataView(c,p.ptr,2),V=C.getUint8(0);if(p.ptr++,V)r.readDataOneSweep(c,p,x);else if(f>1&&g.imageType<=1&&Math.abs(g.maxZError-.5)<1e-5){var Z=C.getUint8(1);if(p.ptr++,p.encodeMode=Z,Z>2||f<4&&Z>1)throw"Invalid Huffman flag "+Z;Z?r.readHuffman(c,p,x):r.readTiles(c,p,x)}else r.readTiles(c,p,x)}p.eofOffset=p.ptr;var R;d.inputOffset?(R=p.headerInfo.blobSize+d.inputOffset-p.ptr,Math.abs(R)>=1&&(p.eofOffset=d.inputOffset+p.headerInfo.blobSize)):(R=p.headerInfo.blobSize-p.ptr,Math.abs(R)>=1&&(p.eofOffset=p.headerInfo.blobSize));var G={width:g.width,height:g.height,pixelData:p.pixels.resultPixels,minValue:g.zMin,maxValue:g.zMax,validPixelCount:g.numValidPixel,dimCount:g.numDims,dimStats:{minValues:g.minValues,maxValues:g.maxValues},maskData:p.pixels.resultMask};if(p.pixels.resultMask&&r.isValidPixelValue(g.imageType,u)){var W=p.pixels.resultMask;for(m=0;m<_;m++)W[m]||(G.pixelData[m]=u);G.noDataValue=u}return p.noDataValue=u,d.returnFileInfo&&(G.fileInfo=r.formatFileInfo(p)),G}},getBandCount:function(c){var d=0,u=0,m={};for(m.ptr=0,m.pixels={};u1&&V.fileInfo.mask&&V.fileInfo.mask.numBytes>0&&f.push(V.maskData),m++,C.pixels.push(V.pixelData),C.statistics.push({minValue:V.minValue,maxValue:V.maxValue,noDataValue:V.noDataValue,dimStats:V.dimStats})}var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80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLD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AQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"}});var vTe=Wc((DCo,PTe)=>{var BCo=S(T()),{webm:QSt,mp4:jSt}=XTe(),f6=()=>typeof navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,p6=()=>"wakeLock"in navigator,b6=class{constructor(){if(this.enabled=!1,p6()){this._wakeLock=null;let t=()=>{this._wakeLock!==null&&document.visibilityState==="visible"&&this.enable()};document.addEventListener("visibilitychange",t),document.addEventListener("fullscreenchange",t)}else f6()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",QSt),this._addSourceToVideo(this.noSleepVideo,"mp4",jSt),this.noSleepVideo.addEventListener("loadedmetadata",()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())})}))}_addSourceToVideo(t,n,i){var o=document.createElement("source");o.src=i,o.type=`video/${n}`,t.appendChild(o)}get isEnabled(){return this.enabled}enable(){return p6()?navigator.wakeLock.request("screen").then(t=>{this._wakeLock=t,this.enabled=!0,console.log("Wake Lock active."),this._wakeLock.addEventListener("release",()=>{console.log("Wake Lock released.")})}).catch(t=>{throw this.enabled=!1,console.error(`${t.name}, ${t.message}`),t}):f6()?(this.disable(),console.warn(` NoSleep enabled for older iOS devices. This can interrupt active or long-running network requests from completing successfully. See https://github.com/richtr/NoSleep.js/issues/15 for more details. - `),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then(n=>(this.enabled=!0,n)).catch(n=>{throw this.enabled=!1,n})}disable(){b6()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):p6()?this.noSleepTimer&&(console.warn(` + `),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then(n=>(this.enabled=!0,n)).catch(n=>{throw this.enabled=!1,n})}disable(){p6()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):f6()?this.noSleepTimer&&(console.warn(` NoSleep now disabled for older iOS devices. - `),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}};GSe.exports=g6});var GSt={};qSe(GSt,{AlphaMode:()=>of,AlphaPipelineStage:()=>AI,Animation:()=>LA,AnimationViewModel:()=>RA,Appearance:()=>ji,ApproximateTerrainHeights:()=>ci,ArcGISTiledElevationTerrainProvider:()=>l4,ArcGisBaseMapType:()=>Ch,ArcGisMapServerImageryProvider:()=>J0,ArcGisMapService:()=>Od,ArcType:()=>$t,ArticulationStageType:()=>sc,AssociativeArray:()=>Ct,Atmosphere:()=>sF,AtmospherePipelineStage:()=>gI,AttributeCompression:()=>wn,AttributeType:()=>nn,AutoExposure:()=>qF,AutomaticUniforms:()=>mp,Axis:()=>Go,AxisAlignedBoundingBox:()=>Gb,B3dmLoader:()=>JX,B3dmParser:()=>HX,BaseLayerPicker:()=>GA,BaseLayerPickerViewModel:()=>ZA,BatchTable:()=>ax,BatchTableHierarchy:()=>vx,BatchTexture:()=>Dc,BatchTexturePipelineStage:()=>MI,Billboard:()=>uo,BillboardCollection:()=>yd,BillboardGraphics:()=>Ba,BillboardVisualizer:()=>zL,BingMapsGeocoderService:()=>u4,BingMapsImageryProvider:()=>vw,BingMapsStyle:()=>NV,BlendEquation:()=>Sa,BlendFunction:()=>xo,BlendOption:()=>To,BlendingState:()=>un,BoundingRectangle:()=>He,BoundingSphere:()=>le,BoundingSphereState:()=>mt,BoundingVolumeSemantics:()=>jx,BoxEmitter:()=>j8,BoxGeometry:()=>gl,BoxGeometryUpdater:()=>zE,BoxGraphics:()=>_x,BoxOutlineGeometry:()=>pm,BrdfLutGenerator:()=>cF,Buffer:()=>ft,BufferLoader:()=>kx,BufferUsage:()=>Ne,CPUStylingPipelineStage:()=>DI,CallbackProperty:()=>Vm,Camera:()=>ao,CameraEventAggregator:()=>r9,CameraEventType:()=>Ei,CameraFlightPath:()=>dF,Cartesian2:()=>D,Cartesian3:()=>h,Cartesian4:()=>se,Cartographic:()=>he,CartographicGeocoderService:()=>h4,CatmullRomSpline:()=>f4,Cesium3DContentGroup:()=>Px,Cesium3DTile:()=>Pu,Cesium3DTileBatchTable:()=>Xp,Cesium3DTileColorBlendMode:()=>Rl,Cesium3DTileContent:()=>q8,Cesium3DTileContentFactory:()=>y_,Cesium3DTileContentState:()=>Ao,Cesium3DTileContentType:()=>gs,Cesium3DTileFeature:()=>Ws,Cesium3DTileFeatureTable:()=>Mm,Cesium3DTileOptimizationHint:()=>Zu,Cesium3DTileOptimizations:()=>_2,Cesium3DTilePass:()=>Io,Cesium3DTilePassState:()=>tm,Cesium3DTilePointFeature:()=>t0,Cesium3DTileRefine:()=>vo,Cesium3DTileStyle:()=>iS,Cesium3DTileStyleEngine:()=>R2,Cesium3DTilesInspector:()=>vA,Cesium3DTilesInspectorViewModel:()=>PA,Cesium3DTilesVoxelProvider:()=>$8,Cesium3DTileset:()=>oa,Cesium3DTilesetBaseTraversal:()=>W2,Cesium3DTilesetCache:()=>C2,Cesium3DTilesetGraphics:()=>Zx,Cesium3DTilesetHeatmap:()=>V2,Cesium3DTilesetMetadata:()=>G_,Cesium3DTilesetMostDetailedTraversal:()=>E2,Cesium3DTilesetSkipTraversal:()=>w2,Cesium3DTilesetStatistics:()=>p0,Cesium3DTilesetTraversal:()=>Ms,Cesium3DTilesetVisualizer:()=>F2,CesiumInspector:()=>AA,CesiumInspectorViewModel:()=>FA,CesiumTerrainProvider:()=>gT,CesiumWidget:()=>B9,Check:()=>po,CheckerboardMaterialProperty:()=>c1,CircleEmitter:()=>K9,CircleGeometry:()=>_4,CircleOutlineGeometry:()=>T4,ClassificationModelDrawCommand:()=>uI,ClassificationPipelineStage:()=>NI,ClassificationPrimitive:()=>JS,ClassificationType:()=>kn,ClearCommand:()=>ii,ClippingPlane:()=>qx,ClippingPlaneCollection:()=>ss,ClippingPolygon:()=>VC,ClippingPolygonCollection:()=>vm,Clock:()=>qm,ClockRange:()=>vr,ClockStep:()=>mo,ClockViewModel:()=>TA,CloudCollection:()=>r7,CloudType:()=>hL,Color:()=>Y,ColorBlendMode:()=>rc,ColorGeometryInstanceAttribute:()=>Ht,ColorMaterialProperty:()=>Ut,Command:()=>t6,ComponentDatatype:()=>Q,Composite3DTileContent:()=>tX,CompositeEntityCollection:()=>Qz,CompositeMaterialProperty:()=>d1,CompositePositionProperty:()=>ra,CompositeProperty:()=>uc,CompressedTextureBuffer:()=>nR,ComputeCommand:()=>Cl,ComputeEngine:()=>vv,ConditionsExpression:()=>Y9,ConeEmitter:()=>a7,ConstantPositionProperty:()=>Mc,ConstantProperty:()=>Jn,ConstantSpline:()=>$X,ContentMetadata:()=>m2,Context:()=>kv,ContextLimits:()=>Mt,CoplanarPolygonGeometry:()=>_P,CoplanarPolygonGeometryLibrary:()=>l0,CoplanarPolygonOutlineGeometry:()=>Wu,CornerType:()=>Ri,CorridorGeometry:()=>v_,CorridorGeometryLibrary:()=>vi,CorridorGeometryUpdater:()=>O2,CorridorGraphics:()=>Sx,CorridorOutlineGeometry:()=>Y2,Credit:()=>Vt,CreditDisplay:()=>fF,CubeMap:()=>Qa,CubeMapFace:()=>Dh,CubicRealPolynomial:()=>ix,CullFace:()=>fi,CullingVolume:()=>rs,CumulusCloud:()=>qd,CustomDataSource:()=>j2,CustomHeightmapTerrainProvider:()=>S4,CustomShader:()=>$T,CustomShaderMode:()=>qp,CustomShaderPipelineStage:()=>JI,CustomShaderTranslucencyMode:()=>fg,CylinderGeometry:()=>q2,CylinderGeometryLibrary:()=>w_,CylinderGeometryUpdater:()=>eP,CylinderGraphics:()=>Cx,CylinderOutlineGeometry:()=>$2,CzmlDataSource:()=>dP,DataSource:()=>Wr,DataSourceClock:()=>$m,DataSourceCollection:()=>uP,DataSourceDisplay:()=>JP,DebugAppearance:()=>c7,DebugCameraPrimitive:()=>Df,DebugInspector:()=>h9,DebugModelMatrixPrimitive:()=>Q9,DefaultProxy:()=>C4,DepthFunction:()=>qa,DepthPlane:()=>gF,DequantizationPipelineStage:()=>jI,DerivedCommand:()=>eb,DeveloperError:()=>fe,DeviceOrientationCameraController:()=>xF,DirectionalLight:()=>l7,DiscardEmptyTileImagePolicy:()=>kV,DiscardMissingTileImagePolicy:()=>Ww,DistanceDisplayCondition:()=>Wt,DistanceDisplayConditionGeometryInstanceAttribute:()=>Nn,DoubleEndedPriorityQueue:()=>yT,DoublyLinkedList:()=>S2,DracoLoader:()=>Ap,DrawCommand:()=>et,DynamicAtmosphereLightingType:()=>WT,DynamicGeometryBatch:()=>B_,DynamicGeometryUpdater:()=>ti,EarthOrientationParameters:()=>UL,EarthOrientationParametersSample:()=>yb,EasingFunction:()=>Fr,EllipseGeometry:()=>el,EllipseGeometryLibrary:()=>kl,EllipseGeometryUpdater:()=>hP,EllipseGraphics:()=>Vx,EllipseOutlineGeometry:()=>Gd,Ellipsoid:()=>ie,EllipsoidGeodesic:()=>yp,EllipsoidGeometry:()=>Us,EllipsoidGeometryUpdater:()=>pP,EllipsoidGraphics:()=>Lx,EllipsoidOutlineGeometry:()=>_d,EllipsoidPrimitive:()=>nF,EllipsoidRhumbLine:()=>Ca,EllipsoidSurfaceAppearance:()=>d7,EllipsoidTangentPlane:()=>Ur,EllipsoidTerrainProvider:()=>Af,EllipsoidalOccluder:()=>T0,Empty3DTileContent:()=>JC,EncodedCartesian3:()=>Yn,Entity:()=>Ko,EntityCluster:()=>Sd,EntityCollection:()=>Ns,EntityView:()=>jP,Event:()=>ge,EventHelper:()=>Er,Expression:()=>fu,ExpressionNodeType:()=>gt,ExtrapolationType:()=>Vd,FeatureDetection:()=>Yt,FeatureIdPipelineStage:()=>hg,Fog:()=>_F,ForEach:()=>Ie,FrameRateMonitor:()=>$9,FrameState:()=>TF,Framebuffer:()=>ta,FramebufferManager:()=>ui,FrustumCommands:()=>LF,FrustumGeometry:()=>_T,FrustumOutlineGeometry:()=>zv,Fullscreen:()=>ur,FullscreenButton:()=>NA,FullscreenButtonViewModel:()=>MA,GeoJsonDataSource:()=>ev,GeoJsonLoader:()=>QX,GeocodeType:()=>py,Geocoder:()=>UA,GeocoderService:()=>GV,GeocoderViewModel:()=>kA,GeographicProjection:()=>Si,GeographicTilingScheme:()=>Mi,Geometry:()=>ut,Geometry3DTileContent:()=>iX,GeometryAttribute:()=>Ge,GeometryAttributes:()=>mn,GeometryFactory:()=>G4,GeometryInstance:()=>St,GeometryInstanceAttribute:()=>$a,GeometryOffsetAttribute:()=>cn,GeometryPipeline:()=>An,GeometryPipelineStage:()=>tW,GeometryType:()=>ru,GeometryUpdater:()=>ni,GeometryUpdaterSet:()=>eT,GeometryVisualizer:()=>AP,GetFeatureInfoFormat:()=>ET,Globe:()=>tF,GlobeDepth:()=>RF,GlobeSurfaceShaderSet:()=>Iw,GlobeSurfaceTile:()=>qu,GlobeSurfaceTileProvider:()=>Ow,GlobeTranslucency:()=>Hw,GlobeTranslucencyFramebuffer:()=>ZF,GlobeTranslucencyState:()=>SF,GltfBufferViewLoader:()=>cC,GltfDracoLoader:()=>lC,GltfImageLoader:()=>dC,GltfIndexBufferLoader:()=>uC,GltfJsonLoader:()=>hC,GltfLoader:()=>Bp,GltfLoaderUtil:()=>Xl,GltfStructuralMetadataLoader:()=>kX,GltfTextureLoader:()=>fC,GltfVertexBufferLoader:()=>pC,GoogleEarthEnterpriseImageryProvider:()=>m7,GoogleEarthEnterpriseMapsProvider:()=>Aw,GoogleEarthEnterpriseMetadata:()=>O0,GoogleEarthEnterpriseTerrainData:()=>EV,GoogleEarthEnterpriseTerrainProvider:()=>F4,GoogleEarthEnterpriseTileInformation:()=>Kv,GoogleMaps:()=>ST,GpxDataSource:()=>ov,GregorianDate:()=>op,GridImageryProvider:()=>h7,GridMaterialProperty:()=>_1,GroundGeometryUpdater:()=>On,GroundPolylineGeometry:()=>bx,GroundPolylinePrimitive:()=>_m,GroundPrimitive:()=>Fc,GroupMetadata:()=>r1,HeadingPitchRange:()=>Yu,HeadingPitchRoll:()=>Ka,Heap:()=>FL,HeightReference:()=>Je,HeightmapEncoding:()=>Ku,HeightmapTerrainData:()=>va,HeightmapTessellator:()=>xV,HermitePolynomialApproximation:()=>tP,HermiteSpline:()=>dg,HilbertOrder:()=>oC,HomeButton:()=>BA,HomeButtonViewModel:()=>DA,HorizontalOrigin:()=>hi,I3SBuildingSceneLayerExplorer:()=>d6,I3SBuildingSceneLayerExplorerViewModel:()=>YA,I3SDataProvider:()=>Wh,I3SDecoder:()=>eA,I3SFeature:()=>tA,I3SField:()=>nA,I3SGeometry:()=>fL,I3SLayer:()=>cS,I3SNode:()=>pL,I3SStatistics:()=>rA,I3SSublayer:()=>aA,I3SSymbology:()=>oA,I3dmLoader:()=>qX,I3dmParser:()=>jX,Iau2000Orientation:()=>Qv,Iau2006XysData:()=>DL,Iau2006XysSample:()=>qy,IauOrientationAxes:()=>jv,IauOrientationParameters:()=>Jv,ImageBasedLighting:()=>Wx,ImageBasedLightingPipelineStage:()=>xI,ImageMaterialProperty:()=>vb,Imagery:()=>HV,ImageryLayer:()=>ma,ImageryLayerCollection:()=>zw,ImageryLayerFeatureInfo:()=>Sh,ImageryProvider:()=>rl,ImageryState:()=>ai,Implicit3DTileContent:()=>yC,ImplicitAvailabilityBitstream:()=>sC,ImplicitMetadataView:()=>aC,ImplicitSubdivisionScheme:()=>Yr,ImplicitSubtree:()=>Jx,ImplicitSubtreeCache:()=>H9,ImplicitSubtreeMetadata:()=>oX,ImplicitTileCoordinates:()=>I_,ImplicitTileset:()=>X_,IndexDatatype:()=>Me,InfoBox:()=>KA,InfoBoxViewModel:()=>zA,InspectorShared:()=>Ma,InstanceAttributeSemantic:()=>Hr,InstancingPipelineStage:()=>PI,InterpolationAlgorithm:()=>M4,InterpolationType:()=>wm,Intersect:()=>Kt,IntersectionTests:()=>jn,Intersections2D:()=>B0,Interval:()=>_a,InvertClassification:()=>eL,Ion:()=>Rm,IonGeocoderService:()=>ew,IonImageryProvider:()=>Q0,IonResource:()=>ud,IonWorldImageryStyle:()=>j0,Iso8601:()=>Be,JobScheduler:()=>CF,JobType:()=>Ra,JsonMetadataTable:()=>Dp,JulianDate:()=>te,KTX2Transcoder:()=>iR,KeyboardEventModifier:()=>ua,KeyframeNode:()=>Ki,KmlCamera:()=>rv,KmlDataSource:()=>Iv,KmlLookAt:()=>Vv,KmlTour:()=>Lv,KmlTourFlyTo:()=>Zv,KmlTourWait:()=>Gv,Label:()=>_g,LabelCollection:()=>uf,LabelGraphics:()=>Tm,LabelStyle:()=>Fo,LabelVisualizer:()=>MP,LagrangePolynomialApproximation:()=>nP,LeapSecond:()=>Fi,Light:()=>g7,LightingModel:()=>af,LightingPipelineStage:()=>iW,LinearApproximation:()=>A_,LinearSpline:()=>lg,ManagedArray:()=>Uc,MapMode2D:()=>Ql,MapProjection:()=>U4,MapboxImageryProvider:()=>Mw,MapboxStyleImageryProvider:()=>y7,Material:()=>Ai,MaterialAppearance:()=>ro,MaterialPipelineStage:()=>rW,MaterialProperty:()=>zo,Math:()=>W,Matrix2:()=>Qi,Matrix3:()=>$,Matrix4:()=>M,Megatexture:()=>sL,MetadataClass:()=>Xm,MetadataClassProperty:()=>Ob,MetadataComponentType:()=>an,MetadataEntity:()=>Mn,MetadataEnum:()=>VX,MetadataEnumValue:()=>CX,MetadataPipelineStage:()=>yu,MetadataSchema:()=>Im,MetadataSchemaLoader:()=>bC,MetadataSemantic:()=>Qx,MetadataTable:()=>Gl,MetadataTableProperty:()=>sX,MetadataType:()=>zt,MipmapHint:()=>Bh,Model:()=>Um,Model3DTileContent:()=>cf,ModelAlphaOptions:()=>CW,ModelAnimation:()=>iI,ModelAnimationChannel:()=>nI,ModelAnimationCollection:()=>oI,ModelAnimationLoop:()=>Wl,ModelAnimationState:()=>Nm,ModelArticulation:()=>TI,ModelArticulationStage:()=>_I,ModelClippingPlanesPipelineStage:()=>VI,ModelClippingPolygonsPipelineStage:()=>ZI,ModelColorPipelineStage:()=>mg,ModelComponents:()=>_n,ModelDrawCommand:()=>mI,ModelFeature:()=>rI,ModelFeatureTable:()=>aI,ModelGraphics:()=>Vp,ModelLightingOptions:()=>PW,ModelMatrixUpdateStage:()=>vI,ModelNode:()=>GI,ModelRenderResources:()=>RW,ModelRuntimeNode:()=>FI,ModelRuntimePrimitive:()=>TW,ModelSceneGraph:()=>wW,ModelSilhouettePipelineStage:()=>EW,ModelSkin:()=>SW,ModelSplitterPipelineStage:()=>IW,ModelStatistics:()=>FW,ModelType:()=>or,ModelUtility:()=>jt,ModelVisualizer:()=>NP,Moon:()=>oF,MorphTargetsPipelineStage:()=>aW,MorphWeightSpline:()=>D4,MortonOrder:()=>Rg,Multiple3DTileContent:()=>p2,MultisampleFramebuffer:()=>DX,NavigationHelpButton:()=>HA,NavigationHelpButtonViewModel:()=>OA,NearFarScalar:()=>Ft,NeverTileDiscardPolicy:()=>_7,NodeRenderResources:()=>WW,NodeStatisticsPipelineStage:()=>wI,NodeTransformationProperty:()=>Rx,OIT:()=>GF,Occluder:()=>tw,OctahedralProjectedCubeMap:()=>Lm,OffsetGeometryInstanceAttribute:()=>Hi,OpenCageGeocoderService:()=>O4,OpenStreetMapImageryProvider:()=>mb,OrderedGroundPrimitiveCollection:()=>mP,OrientedBoundingBox:()=>Gn,OrthographicFrustum:()=>sn,OrthographicOffCenterFrustum:()=>Cr,Packable:()=>H4,PackableForInterpolation:()=>z4,Particle:()=>yL,ParticleBurst:()=>S7,ParticleEmitter:()=>C7,ParticleSystem:()=>V7,Pass:()=>Re,PassState:()=>pc,PathGraphics:()=>Lp,PathVisualizer:()=>UP,PeliasGeocoderService:()=>$v,PerInstanceColorAppearance:()=>ln,PerformanceDisplay:()=>tb,PerformanceWatchdog:()=>QA,PerformanceWatchdogViewModel:()=>JA,PerspectiveFrustum:()=>Ti,PerspectiveOffCenterFrustum:()=>ol,PickDepth:()=>VF,PickDepthFramebuffer:()=>XF,PickFramebuffer:()=>WF,Picking:()=>vF,PickingPipelineStage:()=>cW,PinBuilder:()=>w0,PixelDatatype:()=>ze,PixelFormat:()=>at,Plane:()=>dn,PlaneGeometry:()=>bP,PlaneGeometryUpdater:()=>yP,PlaneGraphics:()=>kE,PlaneOutlineGeometry:()=>gP,PntsLoader:()=>MW,PntsParser:()=>m_,PointCloud:()=>uA,PointCloudEyeDomeLighting:()=>Yp,PointCloudShading:()=>sf,PointCloudStylingPipelineStage:()=>dW,PointGraphics:()=>Gx,PointPrimitive:()=>ks,PointPrimitiveCollection:()=>p1,PointVisualizer:()=>BP,PolygonGeometry:()=>Up,PolygonGeometryLibrary:()=>Dn,PolygonGeometryUpdater:()=>SP,PolygonGraphics:()=>Sm,PolygonHierarchy:()=>Va,PolygonOutlineGeometry:()=>TP,PolygonPipeline:()=>si,Polyline:()=>Vu,PolylineArrowMaterialProperty:()=>S1,PolylineCollection:()=>Bm,PolylineColorAppearance:()=>Dr,PolylineDashMaterialProperty:()=>V1,PolylineGeometry:()=>v0,PolylineGeometryUpdater:()=>HP,PolylineGlowMaterialProperty:()=>R1,PolylineGraphics:()=>ec,PolylineMaterialAppearance:()=>qs,PolylineOutlineMaterialProperty:()=>vg,PolylinePipeline:()=>Li,PolylineVisualizer:()=>KP,PolylineVolumeGeometry:()=>LP,PolylineVolumeGeometryLibrary:()=>Km,PolylineVolumeGeometryUpdater:()=>EP,PolylineVolumeGraphics:()=>Ex,PolylineVolumeOutlineGeometry:()=>GP,PositionProperty:()=>Sp,PositionPropertyArray:()=>L0,PostProcessStage:()=>fo,PostProcessStageCollection:()=>n9,PostProcessStageComposite:()=>al,PostProcessStageLibrary:()=>im,PostProcessStageSampleMode:()=>Kd,PostProcessStageTextureCache:()=>YT,Primitive:()=>En,PrimitiveCollection:()=>Nl,PrimitiveLoadPlan:()=>r_,PrimitiveOutlineGenerator:()=>o_,PrimitiveOutlinePipelineStage:()=>hW,PrimitivePipeline:()=>hx,PrimitiveRenderResources:()=>vW,PrimitiveState:()=>pr,PrimitiveStatisticsPipelineStage:()=>fW,PrimitiveType:()=>Fe,ProjectionPicker:()=>qA,ProjectionPickerViewModel:()=>jA,Property:()=>K,PropertyArray:()=>G1,PropertyAttribute:()=>i_,PropertyAttributeProperty:()=>FX,PropertyBag:()=>Sl,PropertyTable:()=>Yc,PropertyTexture:()=>n_,PropertyTextureProperty:()=>wX,ProviderViewModel:()=>qr,Proxy:()=>K4,QuadraticRealPolynomial:()=>vc,QuadtreeOccluders:()=>Kw,QuadtreePrimitive:()=>eF,QuadtreeTile:()=>Jw,QuadtreeTileLoadState:()=>Os,QuadtreeTileProvider:()=>X7,QuantizedMeshTerrainData:()=>bT,QuarticRealPolynomial:()=>IR,Quaternion:()=>we,QuaternionSpline:()=>tI,Queue:()=>ig,Ray:()=>pn,Rectangle:()=>ce,RectangleCollisionChecker:()=>nT,RectangleGeometry:()=>K_,RectangleGeometryLibrary:()=>ys,RectangleGeometryUpdater:()=>XP,RectangleGraphics:()=>Cm,RectangleOutlineGeometry:()=>T_,ReferenceFrame:()=>$i,ReferenceProperty:()=>R0,RenderState:()=>De,Renderbuffer:()=>bd,RenderbufferFormat:()=>Hc,Request:()=>Yo,RequestErrorEvent:()=>Mh,RequestScheduler:()=>Ha,RequestState:()=>Qn,RequestType:()=>ns,Resource:()=>Ee,ResourceCache:()=>Ni,ResourceCacheKey:()=>Il,ResourceCacheStatistics:()=>ZX,ResourceLoader:()=>eo,ResourceLoaderState:()=>Xt,Rotation:()=>Mu,RuntimeError:()=>ue,S2Cell:()=>Pp,SDFSettings:()=>Fs,SampledPositionProperty:()=>aa,SampledProperty:()=>Rd,Sampler:()=>rn,ScaledPositionProperty:()=>Sf,Scene:()=>A9,SceneFramebuffer:()=>AT,SceneMode:()=>oe,SceneMode2DPipelineStage:()=>pW,SceneModePicker:()=>eM,SceneModePickerViewModel:()=>$A,SceneTransforms:()=>ki,SceneTransitioner:()=>o9,ScreenSpaceCameraController:()=>c9,ScreenSpaceEventHandler:()=>Yd,ScreenSpaceEventType:()=>Tn,SelectedFeatureIdPipelineStage:()=>pg,SelectionIndicator:()=>iM,SelectionIndicatorViewModel:()=>nM,SensorVolumePortionToDisplay:()=>W1,ShaderBuilder:()=>d_,ShaderCache:()=>wv,ShaderDestination:()=>xe,ShaderFunction:()=>LW,ShaderProgram:()=>qt,ShaderSource:()=>Ye,ShaderStruct:()=>VW,ShadowMap:()=>ob,ShadowMapShader:()=>Hf,ShadowMode:()=>xn,ShadowVolumeAppearance:()=>cd,ShowGeometryInstanceAttribute:()=>yn,Simon1994PlanetaryPositions:()=>cy,SimplePolylineGeometry:()=>ij,SingleTileImageryProvider:()=>Nw,SkinningPipelineStage:()=>gW,SkyAtmosphere:()=>M9,SkyBox:()=>N9,SpatialNode:()=>P9,SphereEmitter:()=>W7,SphereGeometry:()=>oj,SphereOutlineGeometry:()=>u0,Spherical:()=>iP,Spline:()=>to,SplitDirection:()=>zc,Splitter:()=>xL,StaticGeometryColorBatch:()=>Uu,StaticGeometryPerMaterialBatch:()=>Du,StaticGroundGeometryColorBatch:()=>Q1,StaticGroundGeometryPerMaterialBatch:()=>FP,StaticGroundPolylinePerMaterialBatch:()=>zP,StaticOutlineGeometryBatch:()=>$1,StencilConstants:()=>Nt,StencilFunction:()=>Un,StencilOperation:()=>pt,SteppedSpline:()=>eI,Stereographic:()=>oc,StripeMaterialProperty:()=>X1,StripeOrientation:()=>th,StructuralMetadata:()=>Za,StyleCommandsNeeded:()=>km,StyleExpression:()=>P7,Sun:()=>D9,SunLight:()=>U0,SunPostProcess:()=>u9,SupportedImageFormats:()=>UX,SvgPathBindingHandler:()=>xA,TaskProcessor:()=>pi,Terrain:()=>hA,TerrainData:()=>bh,TerrainEncoding:()=>gc,TerrainFillMesh:()=>QV,TerrainMesh:()=>Qu,TerrainOffsetProperty:()=>Xx,TerrainProvider:()=>Kr,TerrainQuantization:()=>Ys,TerrainState:()=>so,Texture:()=>Et,TextureAtlas:()=>xg,TextureCache:()=>Fv,TextureMagnificationFilter:()=>di,TextureManager:()=>v9,TextureMinificationFilter:()=>on,TextureUniform:()=>Q7,TextureWrap:()=>Cn,TileAvailability:()=>gh,TileBoundingRegion:()=>Iu,TileBoundingS2Cell:()=>y2,TileBoundingSphere:()=>m0,TileBoundingVolume:()=>v7,TileCoordinatesImageryProvider:()=>pA,TileDiscardPolicy:()=>F7,TileEdge:()=>gn,TileImagery:()=>zV,TileMapServiceImageryProvider:()=>Ty,TileMetadata:()=>h2,TileOrientedBoundingBox:()=>Td,TileProviderError:()=>Co,TileReplacementQueue:()=>Qw,TileSelectionResult:()=>Kn,TileState:()=>A7,Tileset3DTileContent:()=>UW,TilesetMetadata:()=>x2,TilesetPipelineStage:()=>fI,TilingScheme:()=>rj,TimeConstants:()=>zn,TimeDynamicImagery:()=>XT,TimeDynamicPointCloud:()=>CL,TimeInterval:()=>Sn,TimeIntervalCollection:()=>Ir,TimeIntervalCollectionPositionProperty:()=>Z0,TimeIntervalCollectionProperty:()=>G0,TimeStandard:()=>Hn,Timeline:()=>sM,TimelineHighlightRange:()=>oM,TimelineTrack:()=>rM,Tipsify:()=>fE,ToggleButtonViewModel:()=>vy,Tonemapper:()=>Ey,Transforms:()=>Gt,TranslationRotationScale:()=>wb,TranslucentTileClassification:()=>PF,TridiagonalSystemSolver:()=>WC,TrustedServers:()=>XS,TweenCollection:()=>zT,UniformState:()=>Nv,UniformType:()=>cL,UrlTemplateImageryProvider:()=>wa,VERSION:()=>ZSt,VRButton:()=>cM,VRButtonViewModel:()=>aM,VRTheWorldTerrainProvider:()=>sj,VaryingType:()=>j7,Vector3DTileBatch:()=>$h,Vector3DTileClampedPolylines:()=>l2,Vector3DTileContent:()=>u2,Vector3DTileGeometry:()=>Wp,Vector3DTilePoints:()=>n2,Vector3DTilePolygons:()=>i2,Vector3DTilePolylines:()=>g_,Vector3DTilePrimitive:()=>Ax,VelocityOrientationProperty:()=>rP,VelocityVectorProperty:()=>U_,VertexArray:()=>ei,VertexArrayFacade:()=>$p,VertexAttributeSemantic:()=>Tt,VertexFormat:()=>We,VerticalExaggeration:()=>hr,VerticalExaggerationPipelineStage:()=>xW,VerticalOrigin:()=>Pn,VideoSynchronizer:()=>aj,View:()=>kT,Viewer:()=>x6,ViewportQuad:()=>k7,Visibility:()=>cr,Visualizer:()=>KQ,VoxelBoxShape:()=>Qf,VoxelCell:()=>f9,VoxelContent:()=>z9,VoxelCylinderShape:()=>jf,VoxelEllipsoidShape:()=>jT,VoxelInspector:()=>uM,VoxelInspectorViewModel:()=>dM,VoxelPrimitive:()=>Iy,VoxelProvider:()=>D7,VoxelRenderResources:()=>E9,VoxelShape:()=>B7,VoxelShapeType:()=>Xi,VoxelTraversal:()=>aL,VulkanConstants:()=>cj,WallGeometry:()=>WP,WallGeometryLibrary:()=>J_,WallGeometryUpdater:()=>wP,WallGraphics:()=>Rp,WallOutlineGeometry:()=>vP,WebGLConstants:()=>ne,WebMapServiceImageryProvider:()=>Uw,WebMapTileServiceImageryProvider:()=>Bw,WebMercatorProjection:()=>Vi,WebMercatorTilingScheme:()=>Jr,WindingOrder:()=>os,WireframeIndexGenerator:()=>DC,WireframePipelineStage:()=>_W,_shadersAcesTonemappingStage:()=>wF,_shadersAdditiveBlend:()=>l9,_shadersAdjustTranslucentFS:()=>WV,_shadersAllMaterialAppearanceFS:()=>QL,_shadersAllMaterialAppearanceVS:()=>jL,_shadersAmbientOcclusionGenerate:()=>FF,_shadersAmbientOcclusionModulate:()=>AF,_shadersAspectRampMaterial:()=>sR,_shadersAtmosphereCommon:()=>z0,_shadersAtmosphereStageFS:()=>pI,_shadersAtmosphereStageVS:()=>bI,_shadersBasicMaterialAppearanceFS:()=>qL,_shadersBasicMaterialAppearanceVS:()=>$L,_shadersBillboardCollectionFS:()=>DW,_shadersBillboardCollectionVS:()=>BW,_shadersBlackAndWhite:()=>MF,_shadersBloomComposite:()=>NF,_shadersBrdfLutGeneratorFS:()=>lw,_shadersBrightPass:()=>d9,_shadersBrightness:()=>kF,_shadersBumpMapMaterial:()=>aR,_shadersCPUStylingStageFS:()=>UI,_shadersCPUStylingStageVS:()=>kI,_shadersCheckerboardMaterial:()=>cR,_shadersCloudCollectionFS:()=>dw,_shadersCloudCollectionVS:()=>uw,_shadersCloudNoiseFS:()=>mw,_shadersCloudNoiseVS:()=>hw,_shadersCompareAndPackTranslucentDepth:()=>fw,_shadersCompositeOITFS:()=>pw,_shadersCompositeTranslucentClassification:()=>NT,_shadersContrastBias:()=>UF,_shadersCustomShaderStageFS:()=>YI,_shadersCustomShaderStageVS:()=>BI,_shadersCzmBuiltins:()=>sx,_shadersDepthOfField:()=>DF,_shadersDepthPlaneFS:()=>bw,_shadersDepthPlaneVS:()=>gw,_shadersDepthView:()=>BF,_shadersDepthViewPacked:()=>J7,_shadersDotMaterial:()=>lR,_shadersEdgeDetection:()=>YF,_shadersElevationBandMaterial:()=>dR,_shadersElevationContourMaterial:()=>uR,_shadersElevationRampMaterial:()=>mR,_shadersEllipsoidFS:()=>PV,_shadersEllipsoidSurfaceAppearanceFS:()=>j9,_shadersEllipsoidSurfaceAppearanceVS:()=>q9,_shadersEllipsoidVS:()=>vV,_shadersFXAA:()=>HF,_shadersFXAA3_11:()=>yw,_shadersFadeMaterial:()=>hR,_shadersFeatureIdStageFS:()=>OI,_shadersFeatureIdStageVS:()=>HI,_shadersFilmicTonemapping:()=>OF,_shadersGaussianBlur1D:()=>Gy,_shadersGeometryStageFS:()=>qI,_shadersGeometryStageVS:()=>$I,_shadersGlobeFS:()=>xw,_shadersGlobeVS:()=>_w,_shadersGridMaterial:()=>fR,_shadersGroundAtmosphere:()=>wV,_shadersHSBToRGB:()=>ZZ,_shadersHSLToRGB:()=>GZ,_shadersImageBasedLightingStageFS:()=>yI,_shadersInstancingStageCommon:()=>EI,_shadersInstancingStageVS:()=>XI,_shadersIntersectBox:()=>T9,_shadersIntersectClippingPlanes:()=>_9,_shadersIntersectCylinder:()=>S9,_shadersIntersectDepth:()=>x9,_shadersIntersectEllipsoid:()=>C9,_shadersIntersectLongitude:()=>rL,_shadersIntersection:()=>QT,_shadersIntersectionUtils:()=>y9,_shadersLegacyInstancingStageVS:()=>II,_shadersLensFlare:()=>zF,_shadersLightingStageFS:()=>nW,_shadersMaterialStageFS:()=>oW,_shadersMegatexture:()=>G9,_shadersMetadataStageFS:()=>zI,_shadersMetadataStageVS:()=>KI,_shadersModelClippingPlanesStageFS:()=>CI,_shadersModelClippingPolygonsStageFS:()=>RI,_shadersModelClippingPolygonsStageVS:()=>LI,_shadersModelColorStageFS:()=>SI,_shadersModelFS:()=>cI,_shadersModelSilhouetteStageFS:()=>ZW,_shadersModelSilhouetteStageVS:()=>GW,_shadersModelSplitterStageFS:()=>XW,_shadersModelVS:()=>lI,_shadersModifiedReinhardTonemapping:()=>KF,_shadersMorphTargetsStageVS:()=>sW,_shadersNightVision:()=>JF,_shadersNormalMapMaterial:()=>pR,_shadersOctahedralProjectionAtlasFS:()=>KE,_shadersOctahedralProjectionFS:()=>JE,_shadersOctahedralProjectionVS:()=>QE,_shadersOctree:()=>Z9,_shadersPassThrough:()=>jl,_shadersPassThroughDepth:()=>Ly,_shadersPerInstanceColorAppearanceFS:()=>LR,_shadersPerInstanceColorAppearanceVS:()=>RR,_shadersPerInstanceFlatColorAppearanceFS:()=>nx,_shadersPerInstanceFlatColorAppearanceVS:()=>ZR,_shadersPointCloudEyeDomeLighting:()=>YX,_shadersPointCloudStylingStageVS:()=>lW,_shadersPointPrimitiveCollectionFS:()=>Pg,_shadersPointPrimitiveCollectionVS:()=>H2,_shadersPolygonSignedDistanceFS:()=>IX,_shadersPolylineArrowMaterial:()=>bR,_shadersPolylineColorAppearanceVS:()=>ZE,_shadersPolylineCommon:()=>ld,_shadersPolylineDashMaterial:()=>gR,_shadersPolylineFS:()=>yx,_shadersPolylineGlowMaterial:()=>yR,_shadersPolylineMaterialAppearanceVS:()=>GE,_shadersPolylineOutlineMaterial:()=>xR,_shadersPolylineShadowVolumeFS:()=>CE,_shadersPolylineShadowVolumeMorphFS:()=>VE,_shadersPolylineShadowVolumeMorphVS:()=>LE,_shadersPolylineShadowVolumeVS:()=>RE,_shadersPolylineVS:()=>QW,_shadersPrimitiveOutlineStageFS:()=>mW,_shadersPrimitiveOutlineStageVS:()=>uW,_shadersRGBToHSB:()=>EZ,_shadersRGBToHSL:()=>XZ,_shadersRGBToXYZ:()=>IZ,_shadersReinhardTonemapping:()=>QF,_shadersReprojectWebMercatorFS:()=>Tw,_shadersReprojectWebMercatorVS:()=>Sw,_shadersRimLightingMaterial:()=>_R,_shadersSelectedFeatureIdStageCommon:()=>UC,_shadersShadowVolumeAppearanceFS:()=>zS,_shadersShadowVolumeAppearanceVS:()=>dE,_shadersShadowVolumeFS:()=>Xb,_shadersSilhouette:()=>jF,_shadersSkinningStageVS:()=>bW,_shadersSkyAtmosphereCommon:()=>FV,_shadersSkyAtmosphereFS:()=>Cw,_shadersSkyAtmosphereVS:()=>Vw,_shadersSkyBoxFS:()=>Lw,_shadersSkyBoxVS:()=>Rw,_shadersSlopeRampMaterial:()=>TR,_shadersStripeMaterial:()=>SR,_shadersSunFS:()=>Zw,_shadersSunTextureFS:()=>Gw,_shadersSunVS:()=>Ew,_shadersTexturedMaterialAppearanceFS:()=>eR,_shadersTexturedMaterialAppearanceVS:()=>tR,_shadersVector3DTileClampedPolylinesFS:()=>a2,_shadersVector3DTileClampedPolylinesVS:()=>s2,_shadersVector3DTilePolylinesVS:()=>o2,_shadersVectorTileVS:()=>iC,_shadersVerticalExaggerationStageVS:()=>yW,_shadersViewportQuadFS:()=>Xw,_shadersViewportQuadVS:()=>mT,_shadersVoxelFS:()=>b9,_shadersVoxelUtils:()=>p9,_shadersVoxelVS:()=>g9,_shadersWater:()=>CR,_shadersXYZToRGB:()=>WZ,_shadersacesTonemapping:()=>PZ,_shadersalphaWeight:()=>vZ,_shadersantialias:()=>wZ,_shadersapplyHSBShift:()=>FZ,_shadersapproximateSphericalCoordinates:()=>AZ,_shadersapproximateTanh:()=>MZ,_shadersbackFacing:()=>NZ,_shadersbranchFreeTernary:()=>kZ,_shaderscascadeColor:()=>UZ,_shaderscascadeDistance:()=>DZ,_shaderscascadeMatrix:()=>BZ,_shaderscascadeWeights:()=>YZ,_shadersclipPolygons:()=>OZ,_shaderscolumbusViewMorph:()=>HZ,_shaderscomputeAtmosphereColor:()=>zZ,_shaderscomputeGroundAtmosphereScattering:()=>KZ,_shaderscomputePosition:()=>JZ,_shaderscomputeScattering:()=>QZ,_shadersconvertUvToBox:()=>V9,_shadersconvertUvToCylinder:()=>L9,_shadersconvertUvToEllipsoid:()=>R9,_shaderscosineAndSine:()=>jZ,_shadersdecompressTextureCoordinates:()=>qZ,_shadersdegreesPerRadian:()=>wR,_shadersdepthClamp:()=>$Z,_shadersdepthRange:()=>FR,_shadersdepthRangeStruct:()=>xZ,_shaderseastNorthUpToEyeCoordinates:()=>eG,_shadersellipsoidContainsPoint:()=>tG,_shadersellipsoidWgs84TextureCoordinates:()=>nG,_shadersepsilon1:()=>AR,_shadersepsilon2:()=>MR,_shadersepsilon3:()=>NR,_shadersepsilon4:()=>kR,_shadersepsilon5:()=>UR,_shadersepsilon6:()=>DR,_shadersepsilon7:()=>BR,_shadersequalsEpsilon:()=>iG,_shaderseyeOffset:()=>oG,_shaderseyeToWindowCoordinates:()=>rG,_shadersfastApproximateAtan:()=>sG,_shadersfog:()=>aG,_shadersgammaCorrect:()=>cG,_shadersgeodeticSurfaceNormal:()=>lG,_shadersgetDefaultMaterial:()=>dG,_shadersgetDynamicAtmosphereLightDirection:()=>uG,_shadersgetLambertDiffuse:()=>mG,_shadersgetSpecular:()=>hG,_shadersgetWaterNoise:()=>fG,_shadershue:()=>pG,_shadersinfinity:()=>YR,_shadersinverseGamma:()=>bG,_shadersisEmpty:()=>gG,_shadersisFull:()=>yG,_shaderslatitudeToWebMercatorFraction:()=>xG,_shaderslineDistance:()=>_G,_shaderslinearToSrgb:()=>TG,_shadersluminance:()=>SG,_shadersmaterial:()=>_Z,_shadersmaterialInput:()=>TZ,_shadersmaximumComponent:()=>CG,_shadersmetersPerPixel:()=>VG,_shadersmodelMaterial:()=>SZ,_shadersmodelToWindowCoordinates:()=>LG,_shadersmodelVertexOutput:()=>CZ,_shadersmultiplyWithColorBalance:()=>RG,_shadersnearFarScalar:()=>ZG,_shadersoctDecode:()=>GG,_shadersoneOverPi:()=>OR,_shadersoneOverTwoPi:()=>HR,_shaderspackDepth:()=>EG,_shaderspassCesium3DTile:()=>zR,_shaderspassCesium3DTileClassification:()=>KR,_shaderspassCesium3DTileClassificationIgnoreShow:()=>JR,_shaderspassClassification:()=>QR,_shaderspassCompute:()=>jR,_shaderspassEnvironment:()=>qR,_shaderspassGlobe:()=>$R,_shaderspassOpaque:()=>eZ,_shaderspassOverlay:()=>tZ,_shaderspassTerrainClassification:()=>nZ,_shaderspassTranslucent:()=>iZ,_shaderspassVoxels:()=>oZ,_shaderspbrLighting:()=>XG,_shadersphong:()=>IG,_shaderspi:()=>rZ,_shaderspiOverFour:()=>sZ,_shaderspiOverSix:()=>aZ,_shaderspiOverThree:()=>cZ,_shaderspiOverTwo:()=>lZ,_shadersplaneDistance:()=>WG,_shaderspointAlongRay:()=>PG,_shadersradiansPerDegree:()=>dZ,_shadersray:()=>VZ,_shadersrayEllipsoidIntersectionInterval:()=>vG,_shadersraySegment:()=>LZ,_shadersraySphereIntersectionInterval:()=>wG,_shadersreadDepth:()=>FG,_shadersreadNonPerspective:()=>AG,_shadersreverseLogDepth:()=>MG,_shadersround:()=>NG,_shaderssampleOctahedralProjection:()=>kG,_shaderssaturation:()=>UG,_shaderssceneMode2D:()=>uZ,_shaderssceneMode3D:()=>mZ,_shaderssceneModeColumbusView:()=>hZ,_shaderssceneModeMorphing:()=>fZ,_shadersshadowDepthCompare:()=>DG,_shadersshadowParameters:()=>RZ,_shadersshadowVisibility:()=>BG,_shaderssignNotZero:()=>YG,_shaderssolarRadius:()=>pZ,_shaderssphericalHarmonics:()=>OG,_shaderssrgbToLinear:()=>HG,_shaderstangentToEyeSpaceMatrix:()=>zG,_shaderstextureCube:()=>KG,_shadersthreePiOver2:()=>bZ,_shaderstransformPlane:()=>JG,_shaderstranslateRelativeToEye:()=>QG,_shaderstranslucentPhong:()=>jG,_shaderstranspose:()=>qG,_shaderstwoPi:()=>gZ,_shadersunpackClippingExtents:()=>$G,_shadersunpackDepth:()=>eE,_shadersunpackFloat:()=>tE,_shadersunpackUint:()=>nE,_shadersvalueTransform:()=>iE,_shadersvertexLogDepth:()=>oE,_shaderswebMercatorMaxLatitude:()=>yZ,_shaderswindowToEyeCoordinates:()=>rE,_shaderswriteDepthClamp:()=>sE,_shaderswriteLogDepth:()=>aE,_shaderswriteNonPerspective:()=>cE,addBuffer:()=>pX,addDefaults:()=>aX,addExtensionsRequired:()=>mX,addExtensionsUsed:()=>pu,addPipelineExtras:()=>Jb,addToArray:()=>hs,appendForwardSlash:()=>PL,arrayRemoveDuplicates:()=>go,barycentricCoordinates:()=>cx,binarySearch:()=>Ro,buildDrawCommand:()=>hI,buildModuleUrl:()=>tn,buildVoxelDrawCommands:()=>I9,clone:()=>Oe,combine:()=>xt,computeFlyToLocationForRectangle:()=>hS,createBillboardPointCallback:()=>h_,createCommand:()=>Vn,createDefaultImageryProviderViewModels:()=>EA,createDefaultTerrainProviderViewModels:()=>XA,createElevationBandMaterial:()=>O7,createGooglePhotorealistic3DTileset:()=>H7,createGuid:()=>Bn,createMaterialPropertyDescriptor:()=>Zo,createOsmBuildingsAsync:()=>z7,createPropertyDescriptor:()=>de,createRawPropertyDescriptor:()=>Tl,createTangentSpaceDebugPrimitive:()=>K7,createTaskProcessorWorker:()=>q7,createUniform:()=>PR,createUniformArray:()=>vR,createWorldBathymetryAsync:()=>ow,createWorldImageryAsync:()=>q0,createWorldTerrainAsync:()=>LT,decodeGoogleEarthEnterpriseData:()=>rw,decodeVectorPolylinePositions:()=>d2,defaultValue:()=>y,defer:()=>fl,defined:()=>l,demodernizeShader:()=>lE,deprecationWarning:()=>Is,destroyObject:()=>me,exportKml:()=>$Q,findAccessorMinMax:()=>Ox,findContentMetadata:()=>x_,findGroupMetadata:()=>__,findTileMetadata:()=>f2,forEachTextureInMaterial:()=>mC,formatError:()=>Ff,freezeRenderState:()=>wY,getAbsoluteUri:()=>Fh,getAccessorByteStride:()=>El,getBaseUri:()=>vL,getBinaryAccessor:()=>md,getClipAndStyleCode:()=>lA,getClippingFunction:()=>K0,getComponentReader:()=>Np,getElement:()=>In,getExtensionFromUri:()=>Yy,getFilenameFromUri:()=>C0,getImageFromTypedArray:()=>sw,getImagePixels:()=>mm,getJsonFromTypedArray:()=>Eo,getMagic:()=>Zm,getStringFromTypedArray:()=>Ll,getTimestamp:()=>bi,hasExtension:()=>oi,heightReferenceOnEntityPropertyChanged:()=>Zp,isBitSet:()=>xc,isBlobUri:()=>Oy,isCrossOriginUrl:()=>_b,isDataUri:()=>rp,isLeapYear:()=>um,knockout:()=>Ce,knockout_3_5_1:()=>fS,knockout_es5:()=>yA,loadAndExecuteScript:()=>Hy,loadCubeMap:()=>Uv,loadImageFromTypedArray:()=>Dx,loadKTX2:()=>yl,mergeSort:()=>H0,moveTechniqueRenderStates:()=>uX,moveTechniquesToExtension:()=>hX,numberOfComponentsForType:()=>fd,objectToQuery:()=>zy,oneTimeWarning:()=>At,parseBatchTable:()=>zp,parseFeatureMetadataLegacy:()=>NX,parseGlb:()=>lX,parseResponseHeaders:()=>wL,parseStructuralMetadata:()=>MX,pickModel:()=>YC,pointInsideTriangle:()=>hj,preprocess3DTileContent:()=>ff,processVoxelProperties:()=>X9,queryToObject:()=>od,readAccessorPacked:()=>bX,removeExtension:()=>Hx,removeExtensionsRequired:()=>cX,removeExtensionsUsed:()=>Yx,removePipelineExtras:()=>dX,removeUnusedElements:()=>fX,resizeImageToNextPowerOfTwo:()=>qb,sampleTerrain:()=>aw,sampleTerrainMostDetailed:()=>RT,scaleToGeodeticSurface:()=>By,srgbToLinear:()=>ZT,subdivideArray:()=>uE,subscribeAndEvaluate:()=>ba,updateAccessorComponentTypes:()=>gX,updateVersion:()=>yX,usesExtension:()=>ir,viewerCesium3DTilesInspectorMixin:()=>_6,viewerCesiumInspectorMixin:()=>T6,viewerDragDropMixin:()=>C6,viewerPerformanceWatchdogMixin:()=>V6,viewerVoxelInspectorMixin:()=>L6,webGLConstantToGlslType:()=>bj,wrapFunction:()=>cw,writeTextToCanvas:()=>p_});var nLo=T(S(),1);var Qqi=T(S(),1);var sCt=T(S(),1);var PSt=T(S(),1);function K6(e,t){return e??t}K6.EMPTY_OBJECT=Object.freeze({});var y=K6;var wSt=T(S(),1);function eCe(e){return e!=null}var l=eCe;var MSt=T(S(),1);function Uy(e){this.name="DeveloperError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(Uy.prototype=Object.create(Error.prototype),Uy.prototype.constructor=Uy);Uy.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=` -${this.stack.toString()}`),e};Uy.throwInstantiationError=function(){throw new Uy("This function defines an interface and should not be called directly.")};var fe=Uy;var OSt=T(S(),1);var DSt=T(S(),1);var ms={};ms.typeOf={};function tCe(e){return`${e} is required, actual value was undefined`}function CS(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}ms.defined=function(e,t){if(!l(t))throw new fe(tCe(e))};ms.typeOf.func=function(e,t){if(typeof t!="function")throw new fe(CS(typeof t,"function",e))};ms.typeOf.string=function(e,t){if(typeof t!="string")throw new fe(CS(typeof t,"string",e))};ms.typeOf.number=function(e,t){if(typeof t!="number")throw new fe(CS(typeof t,"number",e))};ms.typeOf.number.lessThan=function(e,t,n){if(ms.typeOf.number(e,t),t>=n)throw new fe(`Expected ${e} to be less than ${n}, actual value was ${t}`)};ms.typeOf.number.lessThanOrEquals=function(e,t,n){if(ms.typeOf.number(e,t),t>n)throw new fe(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)};ms.typeOf.number.greaterThan=function(e,t,n){if(ms.typeOf.number(e,t),t<=n)throw new fe(`Expected ${e} to be greater than ${n}, actual value was ${t}`)};ms.typeOf.number.greaterThanOrEquals=function(e,t,n){if(ms.typeOf.number(e,t),t0){for(o.sort(nCe),e=0;e0&&(this._hash={},e.length=0)};var Ct=Dy;var VZt=T(S(),1);var xCt=T(S(),1);var fCt=T(S(),1),_B=T(_M(),1);var lt={};lt.EPSILON1=.1;lt.EPSILON2=.01;lt.EPSILON3=.001;lt.EPSILON4=1e-4;lt.EPSILON5=1e-5;lt.EPSILON6=1e-6;lt.EPSILON7=1e-7;lt.EPSILON8=1e-8;lt.EPSILON9=1e-9;lt.EPSILON10=1e-10;lt.EPSILON11=1e-11;lt.EPSILON12=1e-12;lt.EPSILON13=1e-13;lt.EPSILON14=1e-14;lt.EPSILON15=1e-15;lt.EPSILON16=1e-16;lt.EPSILON17=1e-17;lt.EPSILON18=1e-18;lt.EPSILON19=1e-19;lt.EPSILON20=1e-20;lt.EPSILON21=1e-21;lt.GRAVITATIONALPARAMETER=3986004418e5;lt.SOLAR_RADIUS=6955e5;lt.LUNAR_RADIUS=1737400;lt.SIXTY_FOUR_KILOBYTES=64*1024;lt.FOUR_GIGABYTES=4*1024*1024*1024;lt.sign=y(Math.sign,function(t){return t=+t,t===0||t!==t?t:t>0?1:-1});lt.signNotZero=function(e){return e<0?-1:1};lt.toSNorm=function(e,t){return t=y(t,255),Math.round((lt.clamp(e,-1,1)*.5+.5)*t)};lt.fromSNorm=function(e,t){return t=y(t,255),lt.clamp(e,0,t)/t*2-1};lt.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:lt.clamp((e-t)/n,0,1)};lt.sinh=y(Math.sinh,function(t){return(Math.exp(t)-Math.exp(-t))/2});lt.cosh=y(Math.cosh,function(t){return(Math.exp(t)+Math.exp(-t))/2});lt.lerp=function(e,t,n){return(1-n)*e+n*t};lt.PI=Math.PI;lt.ONE_OVER_PI=1/Math.PI;lt.PI_OVER_TWO=Math.PI/2;lt.PI_OVER_THREE=Math.PI/3;lt.PI_OVER_FOUR=Math.PI/4;lt.PI_OVER_SIX=Math.PI/6;lt.THREE_PI_OVER_TWO=3*Math.PI/2;lt.TWO_PI=2*Math.PI;lt.ONE_OVER_TWO_PI=1/(2*Math.PI);lt.RADIANS_PER_DEGREE=Math.PI/180;lt.DEGREES_PER_RADIAN=180/Math.PI;lt.RADIANS_PER_ARCSECOND=lt.RADIANS_PER_DEGREE/3600;lt.toRadians=function(e){return e*lt.RADIANS_PER_DEGREE};lt.toDegrees=function(e){return e*lt.DEGREES_PER_RADIAN};lt.convertLongitudeRange=function(e){let t=lt.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n};lt.clampToLatitudeRange=function(e){return lt.clamp(e,-1*lt.PI_OVER_TWO,lt.PI_OVER_TWO)};lt.negativePiToPi=function(e){return e>=-lt.PI&&e<=lt.PI?e:lt.zeroToTwoPi(e+lt.PI)-lt.PI};lt.zeroToTwoPi=function(e){if(e>=0&&e<=lt.TWO_PI)return e;let t=lt.mod(e,lt.TWO_PI);return Math.abs(t)lt.EPSILON14?lt.TWO_PI:t};lt.mod=function(e,t){return lt.sign(e)===lt.sign(t)&&Math.abs(e)n};lt.greaterThanOrEquals=function(e,t,n){return e-t>-n};var TM=[1];lt.factorial=function(e){let t=TM.length;if(e>=t){let n=TM[t-1];for(let i=t;i<=e;i++){let o=n*i;TM.push(o),n=o}}return TM[e]};lt.incrementWrap=function(e,t,n){return n=y(n,0),++e,e>t&&(e=n),e};lt.isPowerOfTwo=function(e){return e!==0&&(e&e-1)===0};lt.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e};lt.previousPowerOfTwo=function(e){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};lt.clamp=function(e,t,n){return en?n:e};var Q6=new _B.default;lt.setRandomNumberSeed=function(e){Q6=new _B.default(e)};lt.nextRandomNumber=function(){return Q6.random()};lt.randomBetween=function(e,t){return lt.nextRandomNumber()*(t-e)+e};lt.acosClamped=function(e){return Math.acos(lt.clamp(e,-1,1))};lt.asinClamped=function(e){return Math.asin(lt.clamp(e,-1,1))};lt.chordLength=function(e,t){return 2*t*Math.sin(e*.5)};lt.logBase=function(e,t){return Math.log(e)/Math.log(t)};lt.cbrt=y(Math.cbrt,function(t){let n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n});lt.log2=y(Math.log2,function(t){return Math.log(t)*Math.LOG2E});lt.fog=function(e,t){let n=e*t;return 1-Math.exp(-(n*n))};lt.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)};lt.fastApproximateAtan2=function(e,t){let n,i=Math.abs(e);n=Math.abs(t);let o=Math.max(i,n);n=Math.min(i,n);let r=n/o;return i=lt.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?lt.PI_OVER_TWO-i:i,i=e<0?lt.PI-i:i,i=t<0?-i:i,i};var W=lt;function wt(e,t){this.x=y(e,0),this.y=y(t,0)}wt.fromElements=function(e,t,n){return l(n)?(n.x=e,n.y=t,n):new wt(e,t)};wt.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t):new wt(e.x,e.y)};wt.fromCartesian3=wt.clone;wt.fromCartesian4=wt.clone;wt.packedLength=2;wt.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n]=e.y,t};wt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new wt),n.x=e[t++],n.y=e[t],n};wt.packArray=function(e,t){let n=e.length,i=n*2;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;oW.EPSILON12);return l(o)?(o.x=r*F,o.y=s*A,o.z=a*b,o):new h(r*F,s*A,a*b)}var By=uCe;function ts(e,t,n){this.longitude=y(e,0),this.latitude=y(t,0),this.height=y(n,0)}ts.fromRadians=function(e,t,n,i){return n=y(n,0),l(i)?(i.longitude=e,i.latitude=t,i.height=n,i):new ts(e,t,n)};ts.fromDegrees=function(e,t,n,i){return e=W.toRadians(e),t=W.toRadians(t),ts.fromRadians(e,t,n,i)};var mCe=new h,hCe=new h,fCe=new h,pCe=new h(1/6378137,1/6378137,1/6356752314245179e-9),bCe=new h(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9)),gCe=W.EPSILON1;ts.fromCartesian=function(e,t,n){let i=l(t)?t.oneOverRadii:pCe,o=l(t)?t.oneOverRadiiSquared:bCe,r=l(t)?t._centerToleranceSquared:gCe,s=By(e,i,o,r,hCe);if(!l(s))return;let a=h.multiplyComponents(s,o,mCe);a=h.normalize(a,a);let c=h.subtract(e,s,fCe),d=Math.atan2(a.y,a.x),u=Math.asin(a.z),m=W.sign(h.dot(c,e))*h.magnitude(c);return l(n)?(n.longitude=d,n.latitude=u,n.height=m,n):new ts(d,u,m)};ts.toCartesian=function(e,t,n){return h.fromRadians(e.longitude,e.latitude,e.height,t,n)};ts.clone=function(e,t){if(l(e))return l(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new ts(e.longitude,e.latitude,e.height)};ts.equals=function(e,t){return e===t||l(e)&&l(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height};ts.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n};ts.ZERO=Object.freeze(new ts(0,0,0));ts.prototype.clone=function(e){return ts.clone(this,e)};ts.prototype.equals=function(e){return ts.equals(this,e)};ts.prototype.equalsEpsilon=function(e,t){return ts.equalsEpsilon(this,e,t)};ts.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var he=ts;var qCt=T(S(),1);var OCt=T(S(),1);function nq(e,t,n,i){t=y(t,0),n=y(n,0),i=y(i,0),e._radii=new h(t,n,i),e._radiiSquared=new h(t*t,n*n,i*i),e._radiiToTheFourth=new h(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new h(t===0?0:1/t,n===0?0:1/n,i===0?0:1/i),e._oneOverRadiiSquared=new h(t===0?0:1/(t*t),n===0?0:1/(n*n),i===0?0:1/(i*i)),e._minimumRadius=Math.min(t,n,i),e._maximumRadius=Math.max(t,n,i),e._centerToleranceSquared=W.EPSILON1,e._radiiSquared.z!==0&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function Yi(e,t,n){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,nq(this,e,t,n)}Object.defineProperties(Yi.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});Yi.clone=function(e,t){if(!l(e))return;let n=e._radii;return l(t)?(h.clone(n,t._radii),h.clone(e._radiiSquared,t._radiiSquared),h.clone(e._radiiToTheFourth,t._radiiToTheFourth),h.clone(e._oneOverRadii,t._oneOverRadii),h.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new Yi(n.x,n.y,n.z)};Yi.fromCartesian3=function(e,t){return l(t)||(t=new Yi),l(e)&&nq(t,e.x,e.y,e.z),t};Yi.WGS84=Object.freeze(new Yi(6378137,6378137,6356752314245179e-9));Yi.UNIT_SPHERE=Object.freeze(new Yi(1,1,1));Yi.MOON=Object.freeze(new Yi(W.LUNAR_RADIUS,W.LUNAR_RADIUS,W.LUNAR_RADIUS));Yi.prototype.clone=function(e){return Yi.clone(this,e)};Yi.packedLength=h.packedLength;Yi.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),t};Yi.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t);return Yi.fromCartesian3(i,n)};Yi.prototype.geocentricSurfaceNormal=h.normalize;Yi.prototype.geodeticSurfaceNormalCartographic=function(e,t){let n=e.longitude,i=e.latitude,o=Math.cos(i),r=o*Math.cos(n),s=o*Math.sin(n),a=Math.sin(i);return l(t)||(t=new h),t.x=r,t.y=s,t.z=a,h.normalize(t,t)};Yi.prototype.geodeticSurfaceNormal=function(e,t){if(!h.equalsEpsilon(e,h.ZERO,W.EPSILON14))return l(t)||(t=new h),t=h.multiplyComponents(e,this._oneOverRadiiSquared,t),h.normalize(t,t)};var yCe=new h,xCe=new h;Yi.prototype.cartographicToCartesian=function(e,t){let n=yCe,i=xCe;this.geodeticSurfaceNormalCartographic(e,n),h.multiplyComponents(this._radiiSquared,n,i);let o=Math.sqrt(h.dot(n,i));return h.divideByScalar(i,o,i),h.multiplyByScalar(n,e.height,n),l(t)||(t=new h),h.add(i,n,t)};Yi.prototype.cartographicArrayToCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i=this._radii.z-t))return n};var CCe=new h;Yi.prototype.getLocalCurvature=function(e,t){l(t)||(t=new D);let n=this.getSurfaceNormalIntersectionWithZAxis(e,0,CCe),i=h.distance(e,n),o=this.minimumRadius*i/this.maximumRadius**2,r=i*o**2;return D.fromElements(1/i,1/r,t)};var VCe=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],LCe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function tq(e,t,n){let i=.5*(t+e),o=.5*(t-e),r=0;for(let s=0;s<5;s++){let a=o*VCe[s];r+=LCe[s]*(n(i+a)+n(i-a))}return r*=o,r}Yi.prototype.surfaceArea=function(e){let t=e.west,n=e.east,i=e.south,o=e.north;for(;n0){o=r-1;continue}return r}return~(o+1)}var Ro=XCe;var l1t=T(S(),1);function ICe(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o}var yb=ICe;var P1t=T(S(),1);var g1t=T(S(),1);var u1t=T(S(),1);function WCe(e){return e%4===0&&e%100!==0||e%400===0}var um=WCe;var rq=[31,28,31,30,31,30,31,31,30,31,30,31];function PCe(e,t,n,i,o,r,s,a){e=y(e,1),t=y(t,1),n=y(n,1),i=y(i,0),o=y(o,0),r=y(r,0),s=y(s,0),a=y(a,!1),this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=o,this.second=r,this.millisecond=s,this.isLeapSecond=a;function x(){po.typeOf.number.greaterThanOrEquals("Year",e,1),po.typeOf.number.lessThanOrEquals("Year",e,9999),po.typeOf.number.greaterThanOrEquals("Month",t,1),po.typeOf.number.lessThanOrEquals("Month",t,12),po.typeOf.number.greaterThanOrEquals("Day",n,1),po.typeOf.number.lessThanOrEquals("Day",n,31),po.typeOf.number.greaterThanOrEquals("Hour",i,0),po.typeOf.number.lessThanOrEquals("Hour",i,23),po.typeOf.number.greaterThanOrEquals("Minute",o,0),po.typeOf.number.lessThanOrEquals("Minute",o,59),po.typeOf.bool("IsLeapSecond",a),po.typeOf.number.greaterThanOrEquals("Second",r,0),po.typeOf.number.lessThanOrEquals("Second",r,a?60:59),po.typeOf.number.greaterThanOrEquals("Millisecond",s,0),po.typeOf.number.lessThan("Millisecond",s,1e3)}function _(){let C=t===2&&um(e)?rq[t-1]+1:rq[t-1];if(n>C)throw new fe("Month and Day represents invalid date")}}var op=PCe;var x1t=T(S(),1);function vCe(e,t){this.julianDate=e,this.offset=t}var Fi=vCe;var T1t=T(S(),1),wCe={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1},zn=Object.freeze(wCe);var C1t=T(S(),1),FCe={UTC:0,TAI:1},Hn=Object.freeze(FCe);var aq=new op,CB=[31,28,31,30,31,30,31,31,30,31,30,31],VB=29;function LB(e,t){return Zt.compare(e.julianDate,t.julianDate)}var LS=new Fi;function GM(e){LS.julianDate=e;let t=Zt.leapSeconds,n=Ro(t,LS,LB);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&Zt.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),Zt.addSeconds(e,i,e)}function sq(e,t){LS.julianDate=e;let n=Zt.leapSeconds,i=Ro(n,LS,LB);if(i<0&&(i=~i),i===0)return Zt.addSeconds(e,-n[0].offset,t);if(i>=n.length)return Zt.addSeconds(e,-n[i-1].offset,t);let o=Zt.secondsDifference(n[i].julianDate,e);if(o===0)return Zt.addSeconds(e,-n[i].offset,t);if(!(o<=1))return Zt.addSeconds(e,-n[--i].offset,t)}function xb(e,t,n){let i=t/zn.SECONDS_PER_DAY|0;return e+=i,t-=zn.SECONDS_PER_DAY*i,t<0&&(e--,t+=zn.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function RB(e,t,n,i,o,r,s){let a=(t-14)/12|0,c=e+4800+a,d=(1461*c/4|0)+(367*(t-2-12*a)/12|0)-(3*((c+100)/100|0)/4|0)+n-32075;i=i-12,i<0&&(i+=24);let u=r+(i*zn.SECONDS_PER_HOUR+o*zn.SECONDS_PER_MINUTE+s*zn.SECONDS_PER_MILLISECOND);return u>=43200&&(d-=1),[d,u]}var ACe=/^(\d{4})$/,MCe=/^(\d{4})-(\d{2})$/,NCe=/^(\d{4})-?(\d{3})$/,kCe=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,UCe=/^(\d{4})-?(\d{2})-?(\d{2})$/,ZB=/([Z+\-])?(\d{2})?:?(\d{2})?$/,DCe=/^(\d{2})(\.\d+)?/.source+ZB.source,BCe=/^(\d{2}):?(\d{2})(\.\d+)?/.source+ZB.source,YCe=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+ZB.source;function Zt(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=y(e,0),t=y(t,0),n=y(n,Hn.UTC);let i=e|0;t=t+(e-i)*zn.SECONDS_PER_DAY,xb(i,t,this),n===Hn.UTC&&GM(this)}Zt.fromGregorianDate=function(e,t){let n=RB(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return l(t)?(xb(n[0],n[1],t),GM(t),t):new Zt(n[0],n[1],Hn.UTC)};Zt.fromDate=function(e,t){let n=RB(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return l(t)?(xb(n[0],n[1],t),GM(t),t):new Zt(n[0],n[1],Hn.UTC)};Zt.fromIso8601=function(e,t){e=e.replace(",",".");let n=e.split("T"),i,o=1,r=1,s=0,a=0,c=0,d=0,u=n[0],m=n[1],p,g;if(n=u.match(UCe),n!==null)i=+n[1],o=+n[2],r=+n[3];else if(n=u.match(MCe),n!==null)i=+n[1],o=+n[2];else if(n=u.match(ACe),n!==null)i=+n[1];else{let C;if(n=u.match(NCe),n!==null)i=+n[1],C=+n[2],g=um(i);else if(n=u.match(kCe),n!==null){i=+n[1];let V=+n[2],L=+n[3]||0,Z=new Date(Date.UTC(i,0,4));C=V*7+L-Z.getUTCDay()-3}p=new Date(Date.UTC(i,0,1)),p.setUTCDate(C),o=p.getUTCMonth()+1,r=p.getUTCDate()}g=um(i);let f;if(l(m)){n=m.match(YCe),n!==null?(s=+n[1],a=+n[2],c=+n[3],d=+(n[4]||0)*1e3,f=5):(n=m.match(BCe),n!==null?(s=+n[1],a=+n[2],c=+(n[3]||0)*60,f=4):(n=m.match(DCe),n!==null&&(s=+n[1],a=+(n[2]||0)*60,f=3)));let C=n[f],V=+n[f+1],L=+(n[f+2]||0);switch(C){case"+":s=s-V,a=a-L;break;case"-":s=s+V,a=a+L;break;case"Z":break;default:a=a+new Date(Date.UTC(i,o-1,r,s,a)).getTimezoneOffset();break}}let x=c===60;for(x&&c--;a>=60;)a-=60,s++;for(;s>=24;)s-=24,r++;for(p=g&&o===2?VB:CB[o-1];r>p;)r-=p,o++,o>12&&(o-=12,i++),p=g&&o===2?VB:CB[o-1];for(;a<0;)a+=60,s--;for(;s<0;)s+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),p=g&&o===2?VB:CB[o-1],r+=p;let _=RB(i,o,r,s,a,c,d);return l(t)?(xb(_[0],_[1],t),GM(t)):t=new Zt(_[0],_[1],Hn.UTC),x&&Zt.addSeconds(t,1,t),t};Zt.now=function(e){return Zt.fromDate(new Date,e)};var ZM=new Zt(0,0,Hn.TAI);Zt.toGregorianDate=function(e,t){let n=!1,i=sq(e,ZM);l(i)||(Zt.addSeconds(e,-1,ZM),i=sq(ZM,ZM),n=!0);let o=i.dayNumber,r=i.secondsOfDay;r>=43200&&(o+=1);let s=o+68569|0,a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;let c=4e3*(s+1)/1461001|0;s=s-(1461*c/4|0)+31|0;let d=80*s/2447|0,u=s-(2447*d/80|0)|0;s=d/11|0;let m=d+2-12*s|0,p=100*(a-49)+c+s|0,g=r/zn.SECONDS_PER_HOUR|0,f=r-g*zn.SECONDS_PER_HOUR,x=f/zn.SECONDS_PER_MINUTE|0;f=f-x*zn.SECONDS_PER_MINUTE;let _=f|0,C=(f-_)/zn.SECONDS_PER_MILLISECOND;return g+=12,g>23&&(g-=24),n&&(_+=1),l(t)?(t.year=p,t.month=m,t.day=u,t.hour=g,t.minute=x,t.second=_,t.millisecond=C,t.isLeapSecond=n,t):new op(p,m,u,g,x,_,C,n)};Zt.toDate=function(e){let t=Zt.toGregorianDate(e,aq),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))};Zt.toIso8601=function(e,t){let n=Zt.toGregorianDate(e,aq),i=n.year,o=n.month,r=n.day,s=n.hour,a=n.minute,c=n.second,d=n.millisecond;i===1e4&&o===1&&r===1&&s===0&&a===0&&c===0&&d===0&&(i=9999,o=12,r=31,s=24);let u;return!l(t)&&d!==0?(u=(d*.01).toString().replace(".",""),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${u}Z`):!l(t)||t===0?`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}Z`:(u=(d*.01).toFixed(t).replace(".","").slice(0,t),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${u}Z`)};Zt.clone=function(e,t){if(l(e))return l(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new Zt(e.dayNumber,e.secondsOfDay,Hn.TAI)};Zt.compare=function(e,t){let n=e.dayNumber-t.dayNumber;return n!==0?n:e.secondsOfDay-t.secondsOfDay};Zt.equals=function(e,t){return e===t||l(e)&&l(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay};Zt.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(Zt.secondsDifference(e,t))<=n};Zt.totalDays=function(e){return e.dayNumber+e.secondsOfDay/zn.SECONDS_PER_DAY};Zt.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*zn.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)};Zt.daysDifference=function(e,t){let n=e.dayNumber-t.dayNumber,i=(e.secondsOfDay-t.secondsOfDay)/zn.SECONDS_PER_DAY;return n+i};Zt.computeTaiMinusUtc=function(e){LS.julianDate=e;let t=Zt.leapSeconds,n=Ro(t,LS,LB);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset};Zt.addSeconds=function(e,t,n){return xb(e.dayNumber,e.secondsOfDay+t,n)};Zt.addMinutes=function(e,t,n){let i=e.secondsOfDay+t*zn.SECONDS_PER_MINUTE;return xb(e.dayNumber,i,n)};Zt.addHours=function(e,t,n){let i=e.secondsOfDay+t*zn.SECONDS_PER_HOUR;return xb(e.dayNumber,i,n)};Zt.addDays=function(e,t,n){let i=e.dayNumber+t;return xb(i,e.secondsOfDay,n)};Zt.lessThan=function(e,t){return Zt.compare(e,t)<0};Zt.lessThanOrEquals=function(e,t){return Zt.compare(e,t)<=0};Zt.greaterThan=function(e,t){return Zt.compare(e,t)>0};Zt.greaterThanOrEquals=function(e,t){return Zt.compare(e,t)>=0};Zt.prototype.clone=function(e){return Zt.clone(this,e)};Zt.prototype.equals=function(e){return Zt.equals(this,e)};Zt.prototype.equalsEpsilon=function(e,t){return Zt.equalsEpsilon(this,e,t)};Zt.prototype.toString=function(){return Zt.toIso8601(this)};Zt.leapSeconds=[new Fi(new Zt(2441317,43210,Hn.TAI),10),new Fi(new Zt(2441499,43211,Hn.TAI),11),new Fi(new Zt(2441683,43212,Hn.TAI),12),new Fi(new Zt(2442048,43213,Hn.TAI),13),new Fi(new Zt(2442413,43214,Hn.TAI),14),new Fi(new Zt(2442778,43215,Hn.TAI),15),new Fi(new Zt(2443144,43216,Hn.TAI),16),new Fi(new Zt(2443509,43217,Hn.TAI),17),new Fi(new Zt(2443874,43218,Hn.TAI),18),new Fi(new Zt(2444239,43219,Hn.TAI),19),new Fi(new Zt(2444786,43220,Hn.TAI),20),new Fi(new Zt(2445151,43221,Hn.TAI),21),new Fi(new Zt(2445516,43222,Hn.TAI),22),new Fi(new Zt(2446247,43223,Hn.TAI),23),new Fi(new Zt(2447161,43224,Hn.TAI),24),new Fi(new Zt(2447892,43225,Hn.TAI),25),new Fi(new Zt(2448257,43226,Hn.TAI),26),new Fi(new Zt(2448804,43227,Hn.TAI),27),new Fi(new Zt(2449169,43228,Hn.TAI),28),new Fi(new Zt(2449534,43229,Hn.TAI),29),new Fi(new Zt(2450083,43230,Hn.TAI),30),new Fi(new Zt(2450630,43231,Hn.TAI),31),new Fi(new Zt(2451179,43232,Hn.TAI),32),new Fi(new Zt(2453736,43233,Hn.TAI),33),new Fi(new Zt(2454832,43234,Hn.TAI),34),new Fi(new Zt(2456109,43235,Hn.TAI),35),new Fi(new Zt(2457204,43236,Hn.TAI),36),new Fi(new Zt(2457754,43237,Hn.TAI),37)];var te=Zt;var ZLt=T(S(),1),Rq=T(id(),1);var N1t=T(S(),1);function OCe(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var PL=OCe;var D1t=T(S(),1);function fq(e,t){if(e===null||typeof e!="object")return e;t=y(t,!1);let n=new e.constructor;for(let i in e)if(e.hasOwnProperty(i)){let o=e[i];t&&(o=fq(o,t)),n[i]=o}return n}var Oe=fq;var H1t=T(S(),1);function pq(e,t,n){n=y(n,!1);let i={},o=l(e),r=l(t),s,a,c;if(o)for(s in e)e.hasOwnProperty(s)&&(a=e[s],r&&n&&typeof a=="object"&&t.hasOwnProperty(s)?(c=t[s],typeof c=="object"?i[s]=pq(a,c,n):i[s]=a):i[s]=a);if(r)for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(c=t[s],i[s]=c);return i}var xt=pq;var K1t=T(S(),1);function HCe(){let e,t,n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}}var fl=HCe;var q1t=T(S(),1),bq=T(id(),1);function GB(e,t){let n;return typeof document<"u"&&(n=document),GB._implementation(e,t,n)}GB._implementation=function(e,t,n){if(!l(t)){if(typeof n>"u")return e;t=y(n.baseURI,n.location.href)}let i=new bq.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var Fh=GB;var eVt=T(S(),1),gq=T(id(),1);function zCe(e,t){let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new gq.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var vL=zCe;var nVt=T(S(),1),yq=T(id(),1);function KCe(e){let t=new yq.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),i=n.lastIndexOf("."),i===-1?n="":n=n.substr(i+1),n}var Yy=KCe;var rVt=T(S(),1);var xq={};function JCe(e,t,n){l(t)||(t=e.width),l(n)||(n=e.height);let i=xq[t];l(i)||(i={},xq[t]=i);let o=i[n];if(!l(o)){let r=document.createElement("canvas");r.width=t,r.height=n,o=r.getContext("2d",{willReadFrequently:!0}),o.globalCompositeOperation="copy",i[n]=o}return o.drawImage(e,0,0,t,n),o.getImageData(0,0,t,n).data}var mm=JCe;var aVt=T(S(),1);var QCe=/^blob:/i;function jCe(e){return QCe.test(e)}var Oy=jCe;var dVt=T(S(),1);var Ah;function qCe(e){l(Ah)||(Ah=document.createElement("a")),Ah.href=window.location.href;let t=Ah.host,n=Ah.protocol;return Ah.href=e,Ah.href=Ah.href,n!==Ah.protocol||t!==Ah.host}var _b=qCe;var mVt=T(S(),1);var $Ce=/^data:/i;function e1e(e){return $Ce.test(e)}var rp=e1e;var fVt=T(S(),1);function t1e(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let o=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,o.removeChild(t),n()},t.onerror=function(r){i(r)},o.appendChild(t)})}var Hy=t1e;var bVt=T(S(),1);function n1e(e){let t="";for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let r=0,s=i.length;r0){let s=o.substring(0,r),a=o.substring(r+2);t[s]=a}}return t}var wL=s1e;function _q(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=wL(this.responseHeaders))}_q.prototype.toString=function(){let e="Request has failed.";return l(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var Mh=_q;var JVt=T(S(),1),PM=T(id(),1);var NVt=T(S(),1);function Ky(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(Ky.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){let t=this._length;if(e=0;--t)this.heapify(t)};Ky.prototype.insert=function(e){let t=this._array,n=this._comparator,i=this._maximumLength,o=this._length++;for(oi&&(r=t[i],this._length=i),r};Ky.prototype.pop=function(e){if(e=y(e,0),this._length===0)return;let t=this._array,n=t[e];return EB(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var FL=Ky;function a1e(e,t){return e.priority-t.priority}var Ji={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},GS=20,Oa=new FL({comparator:a1e});Oa.maximumLength=GS;Oa.reserve(GS);var Nh=[],sp={},c1e=typeof document<"u"?new PM.default(document.location.href):new PM.default,vM=new ge;function Oo(){}Oo.maximumRequests=50;Oo.maximumRequestsPerServer=18;Oo.requestsByServer={};Oo.throttleRequests=!0;Oo.debugShowStatistics=!1;Oo.requestCompletedEvent=vM;Object.defineProperties(Oo,{statistics:{get:function(){return Ji}},priorityHeapLength:{get:function(){return GS},set:function(e){if(ee;){let t=Oa.pop();Jy(t)}GS=e,Oa.maximumLength=e,Oa.reserve(e)}}});function Tq(e){l(e.priorityFunction)&&(e.priority=e.priorityFunction())}Oo.serverHasOpenSlots=function(e,t){t=y(t,1);let n=y(Oo.requestsByServer[e],Oo.maximumRequestsPerServer);return sp[e]+t<=n};Oo.heapHasOpenSlots=function(e){return Oa.length+e<=GS};function Sq(e){return e.state===Qn.UNISSUED&&(e.state=Qn.ISSUED,e.deferred=fl()),e.deferred.promise}function l1e(e){return function(t){if(e.state===Qn.CANCELLED)return;let n=e.deferred;--Ji.numberOfActiveRequests,--sp[e.serverKey],vM.raiseEvent(),e.state=Qn.RECEIVED,e.deferred=void 0,n.resolve(t)}}function d1e(e){return function(t){e.state!==Qn.CANCELLED&&(++Ji.numberOfFailedRequests,--Ji.numberOfActiveRequests,--sp[e.serverKey],vM.raiseEvent(t),e.state=Qn.FAILED,e.deferred.reject(t))}}function Cq(e){let t=Sq(e);return e.state=Qn.ACTIVE,Nh.push(e),++Ji.numberOfActiveRequests,++Ji.numberOfActiveRequestsEver,++sp[e.serverKey],e.requestFunction().then(l1e(e)).catch(d1e(e)),t}function Jy(e){let t=e.state===Qn.ACTIVE;if(e.state=Qn.CANCELLED,++Ji.numberOfCancelledRequests,l(e.deferred)){let n=e.deferred;e.deferred=void 0,n.reject()}t&&(--Ji.numberOfActiveRequests,--sp[e.serverKey],++Ji.numberOfCancelledActiveRequests),l(e.cancelFunction)&&e.cancelFunction()}Oo.update=function(){let e,t,n=0,i=Nh.length;for(e=0;e0&&(Nh[e-n]=t)}Nh.length-=n;let o=Oa.internalArray,r=Oa.length;for(e=0;e0;){if(t=Oa.pop(),t.cancelled){Jy(t);continue}if(t.throttleByServer&&!Oo.serverHasOpenSlots(t.serverKey)){Jy(t);continue}Cq(t),++a}u1e()};Oo.getServerKey=function(e){let t=new PM.default(e);t.scheme()===""&&(t=t.absoluteTo(c1e),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=sp[n];return l(i)||(sp[n]=0),n};Oo.request=function(e){if(rp(e.url)||Oy(e.url))return vM.raiseEvent(),e.state=Qn.RECEIVED,e.requestFunction();if(++Ji.numberOfAttemptedRequests,l(e.serverKey)||(e.serverKey=Oo.getServerKey(e.url)),Oo.throttleRequests&&e.throttleByServer&&!Oo.serverHasOpenSlots(e.serverKey))return;if(!Oo.throttleRequests||!e.throttle)return Cq(e);if(Nh.length>=Oo.maximumRequests)return;Tq(e);let t=Oa.insert(e);if(l(t)){if(t===e)return;Jy(t)}return Sq(e)};function u1e(){Oo.debugShowStatistics&&(Ji.numberOfActiveRequests===0&&Ji.lastNumberOfActiveRequests>0&&(Ji.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${Ji.numberOfAttemptedRequests}`),Ji.numberOfAttemptedRequests=0),Ji.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${Ji.numberOfCancelledRequests}`),Ji.numberOfCancelledRequests=0),Ji.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${Ji.numberOfCancelledActiveRequests}`),Ji.numberOfCancelledActiveRequests=0),Ji.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${Ji.numberOfFailedRequests}`),Ji.numberOfFailedRequests=0)),Ji.lastNumberOfActiveRequests=Ji.numberOfActiveRequests)}Oo.clearForSpecs=function(){for(;Oa.length>0;){let t=Oa.pop();Jy(t)}let e=Nh.length;for(let t=0;t0}},credits:{get:function(){return this._credits}}});Lt.prototype.toString=function(){return this.getUrlComponent(!0,!0)};Lt.prototype.parseUrl=function(e,t,n,i){let o=new Rq.default(e),r=h1e(o.query());this._queryParameters=t?FM(r,this.queryParameters,n):r,o.search(""),o.fragment(""),l(i)&&o.scheme()===""&&(o=o.absoluteTo(Fh(i))),this._url=o.toString()};function h1e(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:od(e)}function FM(e,t,n){if(!n)return xt(e,t);let i=Oe(e,!0);for(let o in t)if(t.hasOwnProperty(o)){let r=i[o],s=t[o];l(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(s)):i[o]=Array.isArray(s)?s.slice():s}return i}Lt.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=this._url;e&&(n=`${n}${f1e(this.queryParameters)}`),n=n.replace(/%7B/g,"{").replace(/%7D/g,"}");let i=this._templateValues;return Object.keys(i).length>0&&(n=n.replace(/{(.*?)}/g,function(o,r){let s=i[r];return l(s)?encodeURIComponent(s):o})),t&&l(this.proxy)&&(n=this.proxy.getURL(n)),n};function f1e(e){let t=Object.keys(e);return t.length===0?"":t.length===1&&!l(e[t[0]])?`?${t[0]}`:`?${zy(e)}`}Lt.prototype.setQueryParameters=function(e,t){t?this._queryParameters=FM(this._queryParameters,e,!1):this._queryParameters=FM(e,this._queryParameters,!1)};Lt.prototype.appendQueryParameters=function(e){this._queryParameters=FM(e,this._queryParameters,!0)};Lt.prototype.setTemplateValues=function(e,t){t?this._templateValues=xt(this._templateValues,e):this._templateValues=xt(e,this._templateValues)};Lt.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,l(e.url)){let n=y(e.preserveQueryParameters,!1);t.parseUrl(e.url,!0,n,this._url)}return l(e.queryParameters)&&(t._queryParameters=xt(e.queryParameters,t.queryParameters)),l(e.templateValues)&&(t._templateValues=xt(e.templateValues,t.templateValues)),l(e.headers)&&(t.headers=xt(e.headers,t.headers)),l(e.proxy)&&(t.proxy=e.proxy),l(e.request)&&(t.request=e.request),l(e.retryCallback)&&(t.retryCallback=e.retryCallback),l(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t};Lt.prototype.retryOnError=function(e){let t=this.retryCallback;if(typeof t!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let n=this;return Promise.resolve(t(this,e)).then(function(i){return++n._retryCount,i})};Lt.prototype.clone=function(e){return l(e)?(e._url=this._url,e._queryParameters=Oe(this._queryParameters),e._templateValues=Oe(this._templateValues),e.headers=Oe(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new Lt({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:l(this.credits)?this.credits.slice():void 0})};Lt.prototype.getBaseUri=function(e){return vL(this.getUrlComponent(e),e)};Lt.prototype.appendForwardSlash=function(){this._url=PL(this._url)};Lt.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};Lt.fetchArrayBuffer=function(e){return new Lt(e).fetchArrayBuffer()};Lt.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};Lt.fetchBlob=function(e){return new Lt(e).fetchBlob()};Lt.prototype.fetchImage=function(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.preferImageBitmap,!1),n=y(e.preferBlob,!1),i=y(e.flipY,!1),o=y(e.skipColorSpaceConversion,!1);if(IB(this.request),!Zq||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return XB({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:t});let r=this.fetchBlob();if(!l(r))return;let s,a,c,d;return Lt.supportsImageBitmapOptions().then(function(u){return s=u,a=s&&t,r}).then(function(u){if(!l(u))return;if(d=u,a)return Lt.createImageBitmapFromBlob(u,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});let m=window.URL.createObjectURL(u);return c=new Lt({url:m}),XB({resource:c,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(u){if(l(u))return u.blob=d,a||window.URL.revokeObjectURL(c.url),u}).catch(function(u){return l(c)&&window.URL.revokeObjectURL(c.url),u.blob=d,Promise.reject(u)})};function XB(e){let t=e.resource,n=e.flipY,i=e.skipColorSpaceConversion,o=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){let a=!1;!t.isDataUri&&!t.isBlobUri&&(a=t.isCrossOriginUrl);let c=fl();return Lt._Implementations.createImage(r,a,c,n,i,o),c.promise};let s=Ha.request(r);if(l(s))return s.catch(function(a){return r.state!==Qn.FAILED?Promise.reject(a):t.retryOnError(a).then(function(c){return c?(r.state=Qn.UNISSUED,r.deferred=void 0,XB({resource:t,flipY:n,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(a)})})}Lt.fetchImage=function(e){return new Lt(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};Lt.prototype.fetchText=function(){return this.fetch({responseType:"text"})};Lt.fetchText=function(e){return new Lt(e).fetchText()};Lt.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(l(e))return e.then(function(t){if(l(t))return JSON.parse(t)})};Lt.fetchJson=function(e){return new Lt(e).fetchJson()};Lt.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};Lt.fetchXML=function(e){return new Lt(e).fetchXML()};Lt.prototype.fetchJsonp=function(e){e=y(e,"callback"),IB(this.request);let t;do t=`loadJsonp${W.nextRandomNumber().toString().substring(2,8)}`;while(l(window[t]));return Gq(this,e,t)};function Gq(e,t,n){let i={};i[t]=n,e.setQueryParameters(i);let o=e.request,r=e.url;o.url=r,o.requestFunction=function(){let a=fl();return window[n]=function(c){a.resolve(c);try{delete window[n]}catch{window[n]=void 0}},Lt._Implementations.loadAndExecuteScript(r,n,a),a.promise};let s=Ha.request(o);if(l(s))return s.catch(function(a){return o.state!==Qn.FAILED?Promise.reject(a):e.retryOnError(a).then(function(c){return c?(o.state=Qn.UNISSUED,o.deferred=void 0,Gq(e,t,n)):Promise.reject(a)})})}Lt.fetchJsonp=function(e){return new Lt(e).fetchJsonp(e.callbackParameterName)};Lt.prototype._makeRequest=function(e){let t=this;IB(t.request);let n=t.request,i=t.url;n.url=i,n.requestFunction=function(){let r=e.responseType,s=xt(e.headers,t.headers),a=e.overrideMimeType,c=e.method,d=e.data,u=fl(),m=Lt._Implementations.loadWithXhr(i,r,c,d,s,u,a);return l(m)&&l(m.abort)&&(n.cancelFunction=function(){m.abort()}),u.promise};let o=Ha.request(n);if(l(o))return o.then(function(r){return n.cancelFunction=void 0,r}).catch(function(r){return n.cancelFunction=void 0,n.state!==Qn.FAILED?Promise.reject(r):t.retryOnError(r).then(function(s){return s?(n.state=Qn.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)})})};function IB(e){if(e.state===Qn.ISSUED||e.state===Qn.ACTIVE)throw new ue("The Resource is already being fetched.");e.state=Qn.UNISSUED,e.deferred=void 0}var p1e=/^data:(.*?)(;base64)?,(.*)$/;function wM(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function Lq(e,t){let n=wM(e,t),i=new ArrayBuffer(n.length),o=new Uint8Array(i);for(let r=0;r{if(!a.ok){let c={};a.headers.forEach((d,u)=>{c[u]=d}),r.reject(new Mh(a.status,a,c));return}switch(t){case"text":r.resolve(a.text());break;case"json":r.resolve(a.json());break;default:r.resolve(new Uint8Array(await a.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(new Mh)})}var y1e=typeof XMLHttpRequest>"u";Lt._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){let a=p1e.exec(e);if(a!==null){r.resolve(b1e(a,t));return}if(y1e){g1e(e,t,n,i,o,r,s);return}let c=new XMLHttpRequest;if(XS.contains(e)&&(c.withCredentials=!0),c.open(n,e,!0),l(s)&&l(c.overrideMimeType)&&c.overrideMimeType(s),l(o))for(let u in o)o.hasOwnProperty(u)&&c.setRequestHeader(u,o[u]);l(t)&&(c.responseType=t);let d=!1;return typeof e=="string"&&(d=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),c.onload=function(){if((c.status<200||c.status>=300)&&!(d&&c.status===0)){r.reject(new Mh(c.status,c.response,c.getAllResponseHeaders()));return}let u=c.response,m=c.responseType;if(n==="HEAD"||n==="OPTIONS"){let g=c.getAllResponseHeaders().trim().split(/[\r\n]+/),f={};g.forEach(function(x){let _=x.split(": "),C=_.shift();f[C]=_.join(": ")}),r.resolve(f);return}if(c.status===204)r.resolve(void 0);else if(l(u)&&(!l(t)||m===t))r.resolve(u);else if(t==="json"&&typeof u=="string")try{r.resolve(JSON.parse(u))}catch(p){r.reject(p)}else(m===""||m==="document")&&l(c.responseXML)&&c.responseXML.hasChildNodes()?r.resolve(c.responseXML):(m===""||m==="text")&&l(c.responseText)?r.resolve(c.responseText):r.reject(new ue("Invalid XMLHttpRequest response type."))},c.onerror=function(u){r.reject(new Mh)},c.send(i),c};Lt._Implementations.loadAndExecuteScript=function(e,t,n){return Hy(e,t).catch(function(i){n.reject(i)})};Lt._DefaultImplementations={};Lt._DefaultImplementations.createImage=Lt._Implementations.createImage;Lt._DefaultImplementations.loadWithXhr=Lt._Implementations.loadWithXhr;Lt._DefaultImplementations.loadAndExecuteScript=Lt._Implementations.loadAndExecuteScript;Lt.DEFAULT=Object.freeze(new Lt({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var Ee=Lt;function kL(e){e=y(e,y.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._addNewLeapSeconds=y(e.addNewLeapSeconds,!0),l(e.data)?Eq(this,e.data):Eq(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}kL.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n=Ee.createIfNeeded(e),i;try{i=await n.fetchJson()}catch{throw new ue(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new kL({addNewLeapSeconds:t.addNewLeapSeconds,data:i})};kL.NONE=Object.freeze({compute:function(e,t){return l(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new yb(0,0,0,0,0),t}});kL.prototype.compute=function(e,t){if(!l(this._samples))return;if(l(t)||(t=new yb(0,0,0,0,0)),this._samples.length===0)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let n=this._dates,i=this._lastIndex,o=0,r=0;if(l(i)){let a=n[i],c=n[i+1],d=te.lessThanOrEquals(a,e),u=!l(c),m=u||te.greaterThanOrEquals(c,e);if(d&&m)return o=i,!u&&c.equals(e)&&++o,r=o+1,Iq(this,n,this._samples,e,o,r,t),t}let s=Ro(n,e,te.compare,this._dateColumn);return s>=0?(st.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;let c=t[o],d=t[r];if(c.equals(d)||i.equals(c))return Xq(e,n,o,a,s),s;if(i.equals(d))return Xq(e,n,r,a,s),s;let u=te.secondsDifference(i,c)/te.secondsDifference(d,c),m=o*a,p=r*a,g=n[m+e._ut1MinusUtcSecondsColumn],f=n[p+e._ut1MinusUtcSecondsColumn],x=f-g;if(x>.5||x<-.5){let _=n[m+e._taiMinusUtcSecondsColumn],C=n[p+e._taiMinusUtcSecondsColumn];_!==C&&(d.equals(i)?g=f:f-=C-_)}return s.xPoleWander=NL(u,n[m+e._xPoleWanderRadiansColumn],n[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=NL(u,n[m+e._yPoleWanderRadiansColumn],n[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=NL(u,n[m+e._xCelestialPoleOffsetRadiansColumn],n[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=NL(u,n[m+e._yCelestialPoleOffsetRadiansColumn],n[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=NL(u,g,f),s}var UL=kL;var YLt=T(S(),1);function za(e,t,n){this.heading=y(e,0),this.pitch=y(t,0),this.roll=y(n,0)}za.fromQuaternion=function(e,t){l(t)||(t=new za);let n=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),o=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),s=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(s,r),t.roll=Math.atan2(o,i),t.pitch=-W.asinClamped(n),t};za.fromDegrees=function(e,t,n,i){return l(i)||(i=new za),i.heading=e*W.RADIANS_PER_DEGREE,i.pitch=t*W.RADIANS_PER_DEGREE,i.roll=n*W.RADIANS_PER_DEGREE,i};za.clone=function(e,t){if(l(e))return l(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new za(e.heading,e.pitch,e.roll)};za.equals=function(e,t){return e===t||l(e)&&l(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};za.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&W.equalsEpsilon(e.heading,t.heading,n,i)&&W.equalsEpsilon(e.pitch,t.pitch,n,i)&&W.equalsEpsilon(e.roll,t.roll,n,i)};za.prototype.clone=function(e){return za.clone(this,e)};za.prototype.equals=function(e){return za.equals(this,e)};za.prototype.equalsEpsilon=function(e,t,n){return za.equalsEpsilon(this,e,t,n)};za.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var Ka=za;var aRt=T(S(),1);var JLt=T(S(),1);var Wq={};var Pq=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function _1e(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t"u"?e:(l(AM)||(AM=document.createElement("a")),AM.href=e,AM.href)}var Qy;function wq(){if(l(Qy))return Qy;let e;return typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:l(Wq?.url)?e=Fh(".",Wq.url):typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(xM.toUrl)?e=Fh("..",jy("Core/buildModuleUrl.js")):e=_1e(),Qy=new Ee({url:vq(e)}),Qy.appendForwardSlash(),Qy}function T1e(e){return vq(xM.toUrl(`../${e}`))}function Fq(e){return wq().getDerivedResource({url:e}).url}var MM;function jy(e){return l(MM)||(typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(xM.toUrl)?MM=T1e:MM=Fq),MM(e)}jy._cesiumScriptRegex=Pq;jy._buildModuleUrlFromBaseUrl=Fq;jy._clearBaseResource=function(){Qy=void 0};jy.setBaseUrl=function(e){Qy=Ee.DEFAULT.getDerivedResource({url:e})};jy.getCesiumBaseUrl=wq;var tn=jy;var qLt=T(S(),1);function S1e(e,t,n){this.x=e,this.y=t,this.s=n}var qy=S1e;function vB(e){e=y(e,y.EMPTY_OBJECT),this._xysFileUrlTemplate=Ee.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=y(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=y(e.sampleZeroJulianEphemerisDate,24423965e-1),this._sampleZeroDateTT=new te(this._sampleZeroJulianEphemerisDate,0,Hn.TAI),this._stepSizeDays=y(e.stepSizeDays,1),this._samplesPerXysFile=y(e.samplesPerXysFile,1e3),this._totalSamples=y(e.totalSamples,27426),this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,n=this._denominators=new Array(t+1),i=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t);for(let r=0;r<=t;++r){n[r]=o,i[r]=r*this._stepSizeDays;for(let s=0;s<=t;++s)s!==r&&(n[r]*=r-s);n[r]=1/n[r]}this._work=new Array(t+1),this._coef=new Array(t+1)}var C1e=new te(0,0,Hn.TAI);function WB(e,t,n){let i=C1e;return i.dayNumber=t,i.secondsOfDay=n,te.daysDifference(i,e._sampleZeroDateTT)}vB.prototype.preload=function(e,t,n,i){let o=WB(this,e,t),r=WB(this,n,i),s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;a>=this._totalSamples&&(a=this._totalSamples-1);let c=s/this._samplesPerXysFile|0,d=a/this._samplesPerXysFile|0,u=[];for(let m=c;m<=d;++m)u.push(PB(this,m));return Promise.all(u)};vB.prototype.computeXysRadians=function(e,t,n){let i=WB(this,e,t);if(i<0)return;let o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;let r=this._interpolationOrder,s=o-(r/2|0);s<0&&(s=0);let a=s+r;a>=this._totalSamples&&(a=this._totalSamples-1,s=a-r,s<0&&(s=0));let c=!1,d=this._samples;if(l(d[s*3])||(PB(this,s/this._samplesPerXysFile|0),c=!0),l(d[a*3])||(PB(this,a/this._samplesPerXysFile|0),c=!0),c)return;l(n)?(n.x=0,n.y=0,n.s=0):n=new qy(0,0,0);let u=i-s*this._stepSizeDays,m=this._work,p=this._denominators,g=this._coef,f=this._xTable,x,_;for(x=0;x<=r;++x)m[x]=u-f[x];for(x=0;x<=r;++x){for(g[x]=1,_=0;_<=r;++_)_!==x&&(g[x]*=m[_]);g[x]*=p[x];let C=(s+x)*3;n.x+=g[x]*d[C++],n.y+=g[x]*d[C++],n.s+=g[x]*d[C]}return n};function PB(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let n,i=e._xysFileUrlTemplate;l(i)?n=i.getDerivedResource({templateValues:{0:t}}):n=new Ee({url:tn(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=n.fetchJson().then(function(r){e._chunkDownloadsInProgress[t]=!1;let s=e._samples,a=r.samples,c=t*e._samplesPerXysFile*3;for(let d=0,u=a.length;di&&(o=d,i=u)}let r=1,s=0,a=FB[o],c=AB[o];if(Math.abs(e[rt.getElementIndex(c,a)])>n){let d=e[rt.getElementIndex(c,c)],u=e[rt.getElementIndex(a,a)],m=e[rt.getElementIndex(c,a)],p=(d-u)/2/m,g;p<0?g=-1/(-p+Math.sqrt(1+p*p)):g=1/(p+Math.sqrt(1+p*p)),r=1/Math.sqrt(1+g*g),s=g*r}return t=rt.clone(rt.IDENTITY,t),t[rt.getElementIndex(a,a)]=t[rt.getElementIndex(c,c)]=r,t[rt.getElementIndex(c,a)]=s,t[rt.getElementIndex(a,c)]=-s,t}var NM=new rt,Mq=new rt;rt.computeEigenDecomposition=function(e,t){let n=W.EPSILON20,i=10,o=0,r=0;l(t)||(t={});let s=t.unitary=rt.clone(rt.IDENTITY,t.unitary),a=t.diagonal=rt.clone(e,t.diagonal),c=n*G1e(a);for(;rc;)X1e(a,NM),rt.transpose(NM,Mq),rt.multiply(a,NM,a),rt.multiply(Mq,a,a),rt.multiply(s,NM,s),++o>2&&(++r,o=0);return t};rt.abs=function(e,t){return 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};rt.determinant=function(e){let t=e[0],n=e[3],i=e[6],o=e[1],r=e[4],s=e[7],a=e[2],c=e[5],d=e[8];return t*(r*d-c*s)+o*(c*i-n*d)+a*(n*s-r*i)};rt.inverse=function(e,t){let n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],c=e[6],d=e[7],u=e[8],m=rt.determinant(e);t[0]=s*u-d*a,t[1]=d*o-i*u,t[2]=i*a-s*o,t[3]=c*a-r*u,t[4]=n*u-c*o,t[5]=r*o-n*a,t[6]=r*d-c*s,t[7]=c*i-n*d,t[8]=n*s-r*i;let p=1/m;return rt.multiplyByScalar(t,p,t)};var I1e=new rt;rt.inverseTranspose=function(e,t){return rt.inverse(rt.transpose(e,I1e),t)};rt.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]};rt.equalsEpsilon=function(e,t,n){return n=y(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};rt.IDENTITY=Object.freeze(new rt(1,0,0,0,1,0,0,0,1));rt.ZERO=Object.freeze(new rt(0,0,0,0,0,0,0,0,0));rt.COLUMN0ROW0=0;rt.COLUMN0ROW1=1;rt.COLUMN0ROW2=2;rt.COLUMN1ROW0=3;rt.COLUMN1ROW1=4;rt.COLUMN1ROW2=5;rt.COLUMN2ROW0=6;rt.COLUMN2ROW1=7;rt.COLUMN2ROW2=8;Object.defineProperties(rt.prototype,{length:{get:function(){return rt.packedLength}}});rt.prototype.clone=function(e){return rt.clone(this,e)};rt.prototype.equals=function(e){return rt.equals(this,e)};rt.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]};rt.prototype.equalsEpsilon=function(e,t){return rt.equalsEpsilon(this,e,t)};rt.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]}) + `),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}};PTe.exports=b6});var TTt={};iCe(TTt,{AlphaMode:()=>nf,AlphaPipelineStage:()=>AI,Animation:()=>LA,AnimationViewModel:()=>RA,Appearance:()=>ji,ApproximateTerrainHeights:()=>ci,ArcGISTiledElevationTerrainProvider:()=>o8,ArcGisBaseMapType:()=>bh,ArcGisMapServerImageryProvider:()=>Bb,ArcGisMapService:()=>Md,ArcType:()=>$t,ArticulationStageType:()=>ac,AssociativeArray:()=>Ct,Atmosphere:()=>Bw,AtmospherePipelineStage:()=>gI,AttributeCompression:()=>wn,AttributeType:()=>nn,AutoExposure:()=>MF,AutomaticUniforms:()=>up,Axis:()=>Go,AxisAlignedBoundingBox:()=>R0,B3dmLoader:()=>JW,B3dmParser:()=>zW,BaseLayerPicker:()=>EA,BaseLayerPickerViewModel:()=>GA,BatchTable:()=>sx,BatchTableHierarchy:()=>Px,BatchTexture:()=>kc,BatchTexturePipelineStage:()=>MI,Billboard:()=>uo,BillboardCollection:()=>gd,BillboardGraphics:()=>Ya,BillboardVisualizer:()=>KZ,BingMapsGeocoderService:()=>s8,BingMapsImageryProvider:()=>rw,BingMapsStyle:()=>ZV,BlendEquation:()=>Ca,BlendFunction:()=>xo,BlendOption:()=>So,BlendingState:()=>un,BoundingRectangle:()=>ze,BoundingSphere:()=>le,BoundingSphereState:()=>mt,BoundingVolumeSemantics:()=>Qx,BoxEmitter:()=>Q8,BoxGeometry:()=>bl,BoxGeometryUpdater:()=>KE,BoxGraphics:()=>xx,BoxOutlineGeometry:()=>fm,BrdfLutGenerator:()=>Ow,Buffer:()=>ft,BufferLoader:()=>Nx,BufferUsage:()=>Ne,CPUStylingPipelineStage:()=>DI,CallbackProperty:()=>Cm,Camera:()=>io,CameraEventAggregator:()=>zF,CameraEventType:()=>Wi,CameraFlightPath:()=>Kw,Cartesian2:()=>D,Cartesian3:()=>h,Cartesian4:()=>se,Cartographic:()=>he,CartographicGeocoderService:()=>c8,CatmullRomSpline:()=>l8,Cesium3DContentGroup:()=>Xx,Cesium3DTile:()=>Xu,Cesium3DTileBatchTable:()=>Ep,Cesium3DTileColorBlendMode:()=>Zl,Cesium3DTileContent:()=>j8,Cesium3DTileContentFactory:()=>g_,Cesium3DTileContentState:()=>Mo,Cesium3DTileContentType:()=>xs,Cesium3DTileFeature:()=>Ps,Cesium3DTileFeatureTable:()=>Am,Cesium3DTileOptimizationHint:()=>Lu,Cesium3DTileOptimizations:()=>S2,Cesium3DTilePass:()=>Io,Cesium3DTilePassState:()=>$u,Cesium3DTilePointFeature:()=>eb,Cesium3DTileRefine:()=>wo,Cesium3DTileStyle:()=>nT,Cesium3DTileStyleEngine:()=>R2,Cesium3DTilesInspector:()=>MA,Cesium3DTilesInspectorViewModel:()=>AA,Cesium3DTilesVoxelProvider:()=>q8,Cesium3DTileset:()=>ra,Cesium3DTilesetBaseTraversal:()=>P2,Cesium3DTilesetCache:()=>V2,Cesium3DTilesetGraphics:()=>Lx,Cesium3DTilesetHeatmap:()=>Z2,Cesium3DTilesetMetadata:()=>R_,Cesium3DTilesetMostDetailedTraversal:()=>W2,Cesium3DTilesetSkipTraversal:()=>F2,Cesium3DTilesetStatistics:()=>fb,Cesium3DTilesetTraversal:()=>Ns,Cesium3DTilesetVisualizer:()=>A2,CesiumInspector:()=>vA,CesiumInspectorViewModel:()=>PA,CesiumTerrainProvider:()=>JS,CesiumWidget:()=>P9,Check:()=>po,CheckerboardMaterialProperty:()=>a1,CircleEmitter:()=>J9,CircleGeometry:()=>p8,CircleOutlineGeometry:()=>b8,ClassificationModelDrawCommand:()=>uI,ClassificationPipelineStage:()=>NI,ClassificationPrimitive:()=>HT,ClassificationType:()=>Un,ClearCommand:()=>ii,ClippingPlane:()=>jx,ClippingPlaneCollection:()=>as,ClippingPolygon:()=>CC,ClippingPolygonCollection:()=>Pm,Clock:()=>jm,ClockRange:()=>wr,ClockStep:()=>mo,ClockViewModel:()=>TA,CloudCollection:()=>o7,CloudType:()=>hZ,Color:()=>Y,ColorBlendMode:()=>sc,ColorGeometryInstanceAttribute:()=>zt,ColorMaterialProperty:()=>kt,Command:()=>e6,ComponentDatatype:()=>Q,Composite3DTileContent:()=>tW,CompositeEntityCollection:()=>QK,CompositeMaterialProperty:()=>l1,CompositePositionProperty:()=>sa,CompositeProperty:()=>mc,CompressedTextureBuffer:()=>nL,ComputeCommand:()=>Tl,ComputeEngine:()=>Fw,ConditionsExpression:()=>O9,ConeEmitter:()=>s7,ConstantPositionProperty:()=>Ac,ConstantProperty:()=>Jn,ConstantSpline:()=>$W,ContentMetadata:()=>m2,Context:()=>kw,ContextLimits:()=>Mt,CoplanarPolygonGeometry:()=>SP,CoplanarPolygonGeometryLibrary:()=>cb,CoplanarPolygonOutlineGeometry:()=>Iu,CornerType:()=>Ri,CorridorGeometry:()=>P_,CorridorGeometryLibrary:()=>wi,CorridorGeometryUpdater:()=>z2,CorridorGraphics:()=>Sx,CorridorOutlineGeometry:()=>O2,Credit:()=>Vt,CreditDisplay:()=>jw,CubeMap:()=>ja,CubeMapFace:()=>kh,CubicRealPolynomial:()=>nx,CullFace:()=>pi,CullingVolume:()=>ss,CumulusCloud:()=>jd,CustomDataSource:()=>q2,CustomHeightmapTerrainProvider:()=>g8,CustomShader:()=>BS,CustomShaderMode:()=>jp,CustomShaderPipelineStage:()=>JI,CustomShaderTranslucencyMode:()=>hg,CylinderGeometry:()=>$2,CylinderGeometryLibrary:()=>v_,CylinderGeometryUpdater:()=>tP,CylinderGraphics:()=>Tx,CylinderOutlineGeometry:()=>eP,CzmlDataSource:()=>uP,DataSource:()=>Pr,DataSourceClock:()=>qm,DataSourceCollection:()=>mP,DataSourceDisplay:()=>QP,DebugAppearance:()=>a7,DebugCameraPrimitive:()=>Uf,DebugInspector:()=>e9,DebugModelMatrixPrimitive:()=>j9,DefaultProxy:()=>y8,DepthFunction:()=>$a,DepthPlane:()=>iF,DequantizationPipelineStage:()=>jI,DerivedCommand:()=>Qb,DeveloperError:()=>fe,DeviceOrientationCameraController:()=>rF,DirectionalLight:()=>c7,DiscardEmptyTileImagePolicy:()=>LV,DiscardMissingTileImagePolicy:()=>iw,DistanceDisplayCondition:()=>Xt,DistanceDisplayConditionGeometryInstanceAttribute:()=>Nn,DoubleEndedPriorityQueue:()=>kS,DoublyLinkedList:()=>C2,DracoLoader:()=>Fp,DrawCommand:()=>tt,DynamicAtmosphereLightingType:()=>yS,DynamicGeometryBatch:()=>D_,DynamicGeometryUpdater:()=>ti,EarthOrientationParameters:()=>kZ,EarthOrientationParametersSample:()=>g0,EasingFunction:()=>Ar,EllipseGeometry:()=>$c,EllipseGeometryLibrary:()=>Nl,EllipseGeometryUpdater:()=>fP,EllipseGraphics:()=>Cx,EllipseOutlineGeometry:()=>Rd,Ellipsoid:()=>te,EllipsoidGeodesic:()=>gp,EllipsoidGeometry:()=>Ds,EllipsoidGeometryUpdater:()=>bP,EllipsoidGraphics:()=>Vx,EllipsoidOutlineGeometry:()=>xd,EllipsoidPrimitive:()=>Iw,EllipsoidRhumbLine:()=>Va,EllipsoidSurfaceAppearance:()=>l7,EllipsoidTangentPlane:()=>Dr,EllipsoidTerrainProvider:()=>Ff,EllipsoidalOccluder:()=>_b,Empty3DTileContent:()=>HC,EncodedCartesian3:()=>Yn,Entity:()=>Jo,EntityCluster:()=>Sd,EntityCollection:()=>Us,EntityView:()=>qP,Event:()=>ge,EventHelper:()=>Wr,Expression:()=>hu,ExpressionNodeType:()=>gt,ExtrapolationType:()=>Cd,FeatureDetection:()=>Yt,FeatureIdPipelineStage:()=>mg,Fog:()=>sF,ForEach:()=>Ie,FrameRateMonitor:()=>eA,FrameState:()=>aF,Framebuffer:()=>na,FramebufferManager:()=>ui,FrustumCommands:()=>uF,FrustumGeometry:()=>_S,FrustumOutlineGeometry:()=>eF,Fullscreen:()=>mr,FullscreenButton:()=>UA,FullscreenButtonViewModel:()=>NA,GeoJsonDataSource:()=>tv,GeoJsonLoader:()=>QW,GeocodeType:()=>Ry,Geocoder:()=>YA,GeocoderService:()=>cZ,GeocoderViewModel:()=>BA,GeographicProjection:()=>Ci,GeographicTilingScheme:()=>Ni,Geometry:()=>ut,Geometry3DTileContent:()=>iW,GeometryAttribute:()=>Ge,GeometryAttributes:()=>mn,GeometryFactory:()=>x8,GeometryInstance:()=>Tt,GeometryInstanceAttribute:()=>ec,GeometryOffsetAttribute:()=>cn,GeometryPipeline:()=>An,GeometryPipelineStage:()=>tX,GeometryType:()=>ou,GeometryUpdater:()=>ni,GeometryUpdaterSet:()=>$_,GeometryVisualizer:()=>MP,GetFeatureInfoFormat:()=>fS,Globe:()=>Lw,GlobeDepth:()=>mF,GlobeSurfaceShaderSet:()=>nw,GlobeSurfaceTile:()=>Ju,GlobeSurfaceTileProvider:()=>bw,GlobeTranslucency:()=>gw,GlobeTranslucencyFramebuffer:()=>hF,GlobeTranslucencyState:()=>cF,GltfBufferViewLoader:()=>aC,GltfDracoLoader:()=>cC,GltfImageLoader:()=>lC,GltfIndexBufferLoader:()=>dC,GltfJsonLoader:()=>mC,GltfLoader:()=>Dp,GltfLoaderUtil:()=>El,GltfStructuralMetadataLoader:()=>UW,GltfTextureLoader:()=>hC,GltfVertexBufferLoader:()=>fC,GoogleEarthEnterpriseImageryProvider:()=>u7,GoogleEarthEnterpriseMapsProvider:()=>cw,GoogleEarthEnterpriseMetadata:()=>l0,GoogleEarthEnterpriseTerrainData:()=>lZ,GoogleEarthEnterpriseTerrainProvider:()=>R8,GoogleEarthEnterpriseTileInformation:()=>F9,GoogleMaps:()=>jS,GpxDataSource:()=>rv,GregorianDate:()=>ip,GridImageryProvider:()=>m7,GridMaterialProperty:()=>x1,GroundGeometryUpdater:()=>On,GroundPolylineGeometry:()=>px,GroundPolylinePrimitive:()=>xm,GroundPrimitive:()=>wc,GroupMetadata:()=>o1,HeadingPitchRange:()=>Bu,HeadingPitchRoll:()=>Ja,Heap:()=>FZ,HeightReference:()=>Je,HeightmapEncoding:()=>zu,HeightmapTerrainData:()=>Pa,HeightmapTessellator:()=>SV,HermitePolynomialApproximation:()=>nP,HermiteSpline:()=>lg,HilbertOrder:()=>iC,HomeButton:()=>DA,HomeButtonViewModel:()=>kA,HorizontalOrigin:()=>fi,I3SBuildingSceneLayerExplorer:()=>l6,I3SBuildingSceneLayerExplorerViewModel:()=>OA,I3SDataProvider:()=>Ih,I3SDecoder:()=>tA,I3SFeature:()=>nA,I3SField:()=>iA,I3SGeometry:()=>fZ,I3SLayer:()=>aT,I3SNode:()=>pZ,I3SStatistics:()=>sA,I3SSublayer:()=>cA,I3SSymbology:()=>rA,I3dmLoader:()=>qW,I3dmParser:()=>jW,Iau2000Orientation:()=>Gw,Iau2006XysData:()=>DZ,Iau2006XysSample:()=>jy,IauOrientationAxes:()=>Ew,IauOrientationParameters:()=>Rw,ImageBasedLighting:()=>Ix,ImageBasedLightingPipelineStage:()=>xI,ImageMaterialProperty:()=>P0,Imagery:()=>XV,ImageryLayer:()=>ma,ImageryLayerCollection:()=>yw,ImageryLayerFeatureInfo:()=>ph,ImageryProvider:()=>il,ImageryState:()=>ai,Implicit3DTileContent:()=>gC,ImplicitAvailabilityBitstream:()=>rC,ImplicitMetadataView:()=>sC,ImplicitSubdivisionScheme:()=>zr,ImplicitSubtree:()=>Hx,ImplicitSubtreeCache:()=>K9,ImplicitSubtreeMetadata:()=>oW,ImplicitTileCoordinates:()=>W_,ImplicitTileset:()=>E_,IndexDatatype:()=>Me,InfoBox:()=>KA,InfoBoxViewModel:()=>zA,InspectorShared:()=>Na,InstanceAttributeSemantic:()=>Hr,InstancingPipelineStage:()=>PI,InterpolationAlgorithm:()=>G8,InterpolationType:()=>vm,Intersect:()=>Ht,IntersectionTests:()=>jn,Intersections2D:()=>a0,Interval:()=>Sa,InvertClassification:()=>BV,Ion:()=>Zm,IonGeocoderService:()=>N9,IonImageryProvider:()=>Yb,IonResource:()=>dd,IonWorldImageryStyle:()=>Ob,Iso8601:()=>Be,JobScheduler:()=>lF,JobType:()=>Ra,JsonMetadataTable:()=>kp,JulianDate:()=>ne,KTX2Transcoder:()=>iL,KeyboardEventModifier:()=>ba,KeyframeNode:()=>Hi,KmlCamera:()=>sv,KmlDataSource:()=>Xv,KmlLookAt:()=>Zv,KmlTour:()=>Lv,KmlTourFlyTo:()=>Gv,KmlTourWait:()=>Ev,Label:()=>xg,LabelCollection:()=>df,LabelGraphics:()=>_m,LabelStyle:()=>Ao,LabelVisualizer:()=>NP,LagrangePolynomialApproximation:()=>iP,LeapSecond:()=>Ai,Light:()=>b7,LightingModel:()=>sf,LightingPipelineStage:()=>iX,LinearApproximation:()=>F_,LinearSpline:()=>cg,ManagedArray:()=>Uc,MapMode2D:()=>Jl,MapProjection:()=>I8,MapboxImageryProvider:()=>lw,MapboxStyleImageryProvider:()=>g7,Material:()=>Mi,MaterialAppearance:()=>so,MaterialPipelineStage:()=>rX,MaterialProperty:()=>Ho,Math:()=>X,Matrix2:()=>Qi,Matrix3:()=>$,Matrix4:()=>A,Megatexture:()=>JV,MetadataClass:()=>Em,MetadataClassProperty:()=>Y0,MetadataComponentType:()=>an,MetadataEntity:()=>Mn,MetadataEnum:()=>VW,MetadataEnumValue:()=>CW,MetadataPipelineStage:()=>gu,MetadataSchema:()=>Wm,MetadataSchemaLoader:()=>pC,MetadataSemantic:()=>Jx,MetadataTable:()=>Rl,MetadataTableProperty:()=>sW,MetadataType:()=>Kt,MipmapHint:()=>Dh,Model:()=>Um,Model3DTileContent:()=>af,ModelAlphaOptions:()=>CX,ModelAnimation:()=>iI,ModelAnimationChannel:()=>nI,ModelAnimationCollection:()=>oI,ModelAnimationLoop:()=>Il,ModelAnimationState:()=>Mm,ModelArticulation:()=>SI,ModelArticulationStage:()=>_I,ModelClippingPlanesPipelineStage:()=>VI,ModelClippingPolygonsPipelineStage:()=>RI,ModelColorPipelineStage:()=>ug,ModelComponents:()=>_n,ModelDrawCommand:()=>mI,ModelFeature:()=>rI,ModelFeatureTable:()=>aI,ModelGraphics:()=>Cp,ModelLightingOptions:()=>PX,ModelMatrixUpdateStage:()=>vI,ModelNode:()=>GI,ModelRenderResources:()=>LX,ModelRuntimeNode:()=>FI,ModelRuntimePrimitive:()=>SX,ModelSceneGraph:()=>wX,ModelSilhouettePipelineStage:()=>EX,ModelSkin:()=>TX,ModelSplitterPipelineStage:()=>IX,ModelStatistics:()=>FX,ModelType:()=>rr,ModelUtility:()=>jt,ModelVisualizer:()=>UP,Moon:()=>Pw,MorphTargetsPipelineStage:()=>aX,MorphWeightSpline:()=>X8,MortonOrder:()=>Zg,Multiple3DTileContent:()=>p2,MultisampleFramebuffer:()=>DW,NavigationHelpButton:()=>JA,NavigationHelpButtonViewModel:()=>HA,NearFarScalar:()=>Ft,NeverTileDiscardPolicy:()=>x7,NodeRenderResources:()=>XX,NodeStatisticsPipelineStage:()=>wI,NodeTransformationProperty:()=>Zx,OIT:()=>fF,Occluder:()=>vw,OctahedralProjectedCubeMap:()=>Vm,OffsetGeometryInstanceAttribute:()=>zi,OpenCageGeocoderService:()=>v8,OpenStreetMapImageryProvider:()=>u0,OrderedGroundPrimitiveCollection:()=>hP,OrientedBoundingBox:()=>Gn,OrthographicFrustum:()=>sn,OrthographicOffCenterFrustum:()=>Vr,Packable:()=>w8,PackableForInterpolation:()=>F8,Particle:()=>yZ,ParticleBurst:()=>S7,ParticleEmitter:()=>T7,ParticleSystem:()=>C7,Pass:()=>Le,PassState:()=>xc,PathGraphics:()=>Vp,PathVisualizer:()=>DP,PeliasGeocoderService:()=>M9,PerInstanceColorAppearance:()=>ln,PerformanceDisplay:()=>jb,PerformanceWatchdog:()=>jA,PerformanceWatchdogViewModel:()=>QA,PerspectiveFrustum:()=>Ti,PerspectiveOffCenterFrustum:()=>rl,PickDepth:()=>dF,PickDepthFramebuffer:()=>bF,PickFramebuffer:()=>yF,Picking:()=>_F,PickingPipelineStage:()=>cX,PinBuilder:()=>vb,PixelDatatype:()=>Ke,PixelFormat:()=>at,Plane:()=>dn,PlaneGeometry:()=>gP,PlaneGeometryUpdater:()=>xP,PlaneGraphics:()=>UE,PlaneOutlineGeometry:()=>yP,PntsLoader:()=>MX,PntsParser:()=>u_,PointCloud:()=>mA,PointCloudEyeDomeLighting:()=>Bp,PointCloudShading:()=>rf,PointCloudStylingPipelineStage:()=>dX,PointGraphics:()=>Rx,PointPrimitive:()=>ks,PointPrimitiveCollection:()=>f1,PointVisualizer:()=>YP,PolygonGeometry:()=>Up,PolygonGeometryLibrary:()=>Dn,PolygonGeometryUpdater:()=>CP,PolygonGraphics:()=>Sm,PolygonHierarchy:()=>Za,PolygonOutlineGeometry:()=>TP,PolygonPipeline:()=>si,Polyline:()=>Cu,PolylineArrowMaterialProperty:()=>S1,PolylineCollection:()=>Dm,PolylineColorAppearance:()=>Br,PolylineDashMaterialProperty:()=>C1,PolylineGeometry:()=>Pb,PolylineGeometryUpdater:()=>KP,PolylineGlowMaterialProperty:()=>Z1,PolylineGraphics:()=>tc,PolylineMaterialAppearance:()=>$s,PolylineOutlineMaterialProperty:()=>Pg,PolylinePipeline:()=>Li,PolylineVisualizer:()=>JP,PolylineVolumeGeometry:()=>LP,PolylineVolumeGeometryLibrary:()=>Km,PolylineVolumeGeometryUpdater:()=>WP,PolylineVolumeGraphics:()=>Gx,PolylineVolumeOutlineGeometry:()=>EP,PositionProperty:()=>Sp,PositionPropertyArray:()=>Vb,PostProcessStage:()=>fo,PostProcessStageCollection:()=>DF,PostProcessStageComposite:()=>sl,PostProcessStageLibrary:()=>tm,PostProcessStageSampleMode:()=>Bd,PostProcessStageTextureCache:()=>XS,Primitive:()=>En,PrimitiveCollection:()=>Ml,PrimitiveLoadPlan:()=>o_,PrimitiveOutlineGenerator:()=>i_,PrimitiveOutlinePipelineStage:()=>hX,PrimitivePipeline:()=>mx,PrimitiveRenderResources:()=>vX,PrimitiveState:()=>br,PrimitiveStatisticsPipelineStage:()=>fX,PrimitiveType:()=>Fe,ProjectionPicker:()=>$A,ProjectionPickerViewModel:()=>qA,Property:()=>H,PropertyArray:()=>R1,PropertyAttribute:()=>n_,PropertyAttributeProperty:()=>FW,PropertyBag:()=>Sl,PropertyTable:()=>Bc,PropertyTexture:()=>t_,PropertyTextureProperty:()=>wW,ProviderViewModel:()=>es,Proxy:()=>A8,QuadraticRealPolynomial:()=>Pc,QuadtreeOccluders:()=>xw,QuadtreePrimitive:()=>Zw,QuadtreeTile:()=>_w,QuadtreeTileLoadState:()=>zs,QuadtreeTileProvider:()=>E7,QuantizedMeshTerrainData:()=>HS,QuarticRealPolynomial:()=>IL,Quaternion:()=>we,QuaternionSpline:()=>tI,Queue:()=>ng,Ray:()=>pn,Rectangle:()=>ce,RectangleCollisionChecker:()=>tS,RectangleGeometry:()=>K_,RectangleGeometryLibrary:()=>_s,RectangleGeometryUpdater:()=>IP,RectangleGraphics:()=>Tm,RectangleOutlineGeometry:()=>__,ReferenceFrame:()=>$i,ReferenceProperty:()=>Zb,RenderState:()=>De,Renderbuffer:()=>pd,RenderbufferFormat:()=>Oc,Request:()=>Oo,RequestErrorEvent:()=>Ah,RequestScheduler:()=>Ka,RequestState:()=>Qn,RequestType:()=>is,Resource:()=>Ee,ResourceCache:()=>Ui,ResourceCacheKey:()=>Wl,ResourceCacheStatistics:()=>RW,ResourceLoader:()=>eo,ResourceLoaderState:()=>Wt,Rotation:()=>Au,RuntimeError:()=>ue,S2Cell:()=>Xp,SDFSettings:()=>As,SampledPositionProperty:()=>ca,SampledProperty:()=>Zd,Sampler:()=>rn,ScaledPositionProperty:()=>Sf,Scene:()=>L9,SceneFramebuffer:()=>ZS,SceneMode:()=>oe,SceneMode2DPipelineStage:()=>pX,SceneModePicker:()=>tM,SceneModePickerViewModel:()=>eM,SceneTransforms:()=>ki,SceneTransitioner:()=>OF,ScreenSpaceCameraController:()=>JF,ScreenSpaceEventHandler:()=>Od,ScreenSpaceEventType:()=>Sn,SelectedFeatureIdPipelineStage:()=>fg,SelectionIndicator:()=>oM,SelectionIndicatorViewModel:()=>iM,SensorVolumePortionToDisplay:()=>I1,ShaderBuilder:()=>l_,ShaderCache:()=>Aw,ShaderDestination:()=>xe,ShaderFunction:()=>ZX,ShaderProgram:()=>qt,ShaderSource:()=>Ye,ShaderStruct:()=>VX,ShadowMap:()=>e0,ShadowMapShader:()=>Yf,ShadowMode:()=>xn,ShadowVolumeAppearance:()=>ad,ShowGeometryInstanceAttribute:()=>yn,Simon1994PlanetaryPositions:()=>uy,SimplePolylineGeometry:()=>M8,SingleTileImageryProvider:()=>dw,SkinningPipelineStage:()=>gX,SkyAtmosphere:()=>R9,SkyBox:()=>E9,SpatialNode:()=>S9,SphereEmitter:()=>I7,SphereGeometry:()=>N8,SphereOutlineGeometry:()=>db,Spherical:()=>oP,Spline:()=>to,SplitDirection:()=>zc,Splitter:()=>xZ,StaticGeometryColorBatch:()=>Uu,StaticGeometryPerMaterialBatch:()=>ku,StaticGroundGeometryColorBatch:()=>J1,StaticGroundGeometryPerMaterialBatch:()=>AP,StaticGroundPolylinePerMaterialBatch:()=>HP,StaticOutlineGeometryBatch:()=>q1,StencilConstants:()=>Nt,StencilFunction:()=>kn,StencilOperation:()=>pt,SteppedSpline:()=>eI,Stereographic:()=>rc,StripeMaterialProperty:()=>E1,StripeOrientation:()=>eh,StructuralMetadata:()=>Ga,StyleCommandsNeeded:()=>Nm,StyleExpression:()=>X7,Sun:()=>X9,SunLight:()=>Jb,SunPostProcess:()=>qF,SupportedImageFormats:()=>kW,SvgPathBindingHandler:()=>_A,TaskProcessor:()=>bi,Terrain:()=>fA,TerrainData:()=>fh,TerrainEncoding:()=>gc,TerrainFillMesh:()=>FV,TerrainMesh:()=>Hu,TerrainOffsetProperty:()=>Ex,TerrainProvider:()=>Qr,TerrainQuantization:()=>Os,TerrainState:()=>ao,Texture:()=>Et,TextureAtlas:()=>yg,TextureCache:()=>Mw,TextureMagnificationFilter:()=>di,TextureManager:()=>C9,TextureMinificationFilter:()=>on,TextureUniform:()=>J7,TextureWrap:()=>Cn,TileAvailability:()=>Lh,TileBoundingRegion:()=>Wu,TileBoundingS2Cell:()=>x2,TileBoundingSphere:()=>ub,TileBoundingVolume:()=>P7,TileCoordinatesImageryProvider:()=>bA,TileDiscardPolicy:()=>w7,TileEdge:()=>gn,TileImagery:()=>PV,TileMapServiceImageryProvider:()=>ly,TileMetadata:()=>h2,TileOrientedBoundingBox:()=>_d,TileProviderError:()=>Co,TileReplacementQueue:()=>Sw,TileSelectionResult:()=>Hn,TileState:()=>F7,Tileset3DTileContent:()=>kX,TilesetMetadata:()=>_2,TilesetPipelineStage:()=>fI,TilingScheme:()=>U8,TimeConstants:()=>Kn,TimeDynamicImagery:()=>pS,TimeDynamicPointCloud:()=>CZ,TimeInterval:()=>Tn,TimeIntervalCollection:()=>Xr,TimeIntervalCollectionPositionProperty:()=>Lb,TimeIntervalCollectionProperty:()=>Rb,TimeStandard:()=>zn,Timeline:()=>aM,TimelineHighlightRange:()=>rM,TimelineTrack:()=>sM,Tipsify:()=>fE,ToggleButtonViewModel:()=>Py,Tonemapper:()=>xy,Transforms:()=>Gt,TranslationRotationScale:()=>v0,TranslucentTileClassification:()=>xF,TridiagonalSystemSolver:()=>IC,TrustedServers:()=>ET,TweenCollection:()=>FS,UniformState:()=>Uw,UniformType:()=>jV,UrlTemplateImageryProvider:()=>va,VERSION:()=>STt,VRButton:()=>lM,VRButtonViewModel:()=>cM,VRTheWorldTerrainProvider:()=>k8,VaryingType:()=>Q7,Vector3DTileBatch:()=>qh,Vector3DTileClampedPolylines:()=>l2,Vector3DTileContent:()=>u2,Vector3DTileGeometry:()=>Ip,Vector3DTilePoints:()=>n2,Vector3DTilePolygons:()=>i2,Vector3DTilePolylines:()=>b_,Vector3DTilePrimitive:()=>Fx,VelocityOrientationProperty:()=>sP,VelocityVectorProperty:()=>U_,VertexArray:()=>ei,VertexArrayFacade:()=>qp,VertexAttributeSemantic:()=>St,VertexFormat:()=>Xe,VerticalExaggeration:()=>fr,VerticalExaggerationPipelineStage:()=>xX,VerticalOrigin:()=>Pn,VideoSynchronizer:()=>D8,View:()=>GS,Viewer:()=>y6,ViewportQuad:()=>N7,Visibility:()=>lr,Visualizer:()=>HQ,VoxelBoxShape:()=>Hf,VoxelCell:()=>t9,VoxelContent:()=>H9,VoxelCylinderShape:()=>Jf,VoxelEllipsoidShape:()=>US,VoxelInspector:()=>mM,VoxelInspectorViewModel:()=>uM,VoxelPrimitive:()=>Ty,VoxelProvider:()=>k7,VoxelRenderResources:()=>b9,VoxelShape:()=>D7,VoxelShapeType:()=>Ii,VoxelTraversal:()=>QV,VulkanConstants:()=>B8,WallGeometry:()=>PP,WallGeometryLibrary:()=>H_,WallGeometryUpdater:()=>FP,WallGraphics:()=>Zp,WallOutlineGeometry:()=>wP,WebGLConstants:()=>ie,WebMapServiceImageryProvider:()=>mw,WebMapTileServiceImageryProvider:()=>fw,WebMercatorProjection:()=>Zi,WebMercatorTilingScheme:()=>jr,WindingOrder:()=>rs,WireframeIndexGenerator:()=>kC,WireframePipelineStage:()=>_X,_shadersAcesTonemappingStage:()=>SF,_shadersAdditiveBlend:()=>QF,_shadersAdjustTranslucentFS:()=>bV,_shadersAllMaterialAppearanceFS:()=>QZ,_shadersAllMaterialAppearanceVS:()=>jZ,_shadersAmbientOcclusionGenerate:()=>TF,_shadersAmbientOcclusionModulate:()=>CF,_shadersAspectRampMaterial:()=>sL,_shadersAtmosphereCommon:()=>Ub,_shadersAtmosphereStageFS:()=>pI,_shadersAtmosphereStageVS:()=>bI,_shadersBasicMaterialAppearanceFS:()=>qZ,_shadersBasicMaterialAppearanceVS:()=>$Z,_shadersBillboardCollectionFS:()=>DX,_shadersBillboardCollectionVS:()=>BX,_shadersBlackAndWhite:()=>VF,_shadersBloomComposite:()=>ZF,_shadersBrdfLutGeneratorFS:()=>vv,_shadersBrightPass:()=>jF,_shadersBrightness:()=>LF,_shadersBumpMapMaterial:()=>aL,_shadersCPUStylingStageFS:()=>kI,_shadersCPUStylingStageVS:()=>UI,_shadersCheckerboardMaterial:()=>cL,_shadersCloudCollectionFS:()=>wv,_shadersCloudCollectionVS:()=>Fv,_shadersCloudNoiseFS:()=>Av,_shadersCloudNoiseVS:()=>Mv,_shadersCompareAndPackTranslucentDepth:()=>Nv,_shadersCompositeOITFS:()=>Uv,_shadersCompositeTranslucentClassification:()=>RS,_shadersContrastBias:()=>RF,_shadersCustomShaderStageFS:()=>YI,_shadersCustomShaderStageVS:()=>BI,_shadersCzmBuiltins:()=>rx,_shadersDepthOfField:()=>GF,_shadersDepthPlaneFS:()=>kv,_shadersDepthPlaneVS:()=>Dv,_shadersDepthView:()=>EF,_shadersDepthViewPacked:()=>H7,_shadersDotMaterial:()=>lL,_shadersEdgeDetection:()=>WF,_shadersElevationBandMaterial:()=>dL,_shadersElevationContourMaterial:()=>uL,_shadersElevationRampMaterial:()=>mL,_shadersEllipsoidFS:()=>gV,_shadersEllipsoidSurfaceAppearanceFS:()=>q9,_shadersEllipsoidSurfaceAppearanceVS:()=>$9,_shadersEllipsoidVS:()=>yV,_shadersFXAA:()=>XF,_shadersFXAA3_11:()=>Bv,_shadersFadeMaterial:()=>hL,_shadersFeatureIdStageFS:()=>OI,_shadersFeatureIdStageVS:()=>zI,_shadersFilmicTonemapping:()=>IF,_shadersGaussianBlur1D:()=>yy,_shadersGeometryStageFS:()=>qI,_shadersGeometryStageVS:()=>$I,_shadersGlobeFS:()=>Yv,_shadersGlobeVS:()=>Ov,_shadersGridMaterial:()=>fL,_shadersGroundAtmosphere:()=>xV,_shadersHSBToRGB:()=>RR,_shadersHSLToRGB:()=>GR,_shadersImageBasedLightingStageFS:()=>yI,_shadersInstancingStageCommon:()=>EI,_shadersInstancingStageVS:()=>WI,_shadersIntersectBox:()=>c9,_shadersIntersectClippingPlanes:()=>a9,_shadersIntersectCylinder:()=>l9,_shadersIntersectDepth:()=>s9,_shadersIntersectEllipsoid:()=>d9,_shadersIntersectLongitude:()=>HV,_shadersIntersection:()=>NS,_shadersIntersectionUtils:()=>r9,_shadersLegacyInstancingStageVS:()=>II,_shadersLensFlare:()=>PF,_shadersLightingStageFS:()=>nX,_shadersMaterialStageFS:()=>oX,_shadersMegatexture:()=>p9,_shadersMetadataStageFS:()=>KI,_shadersMetadataStageVS:()=>HI,_shadersModelClippingPlanesStageFS:()=>CI,_shadersModelClippingPolygonsStageFS:()=>LI,_shadersModelClippingPolygonsStageVS:()=>ZI,_shadersModelColorStageFS:()=>TI,_shadersModelFS:()=>cI,_shadersModelSilhouetteStageFS:()=>RX,_shadersModelSilhouetteStageVS:()=>GX,_shadersModelSplitterStageFS:()=>WX,_shadersModelVS:()=>lI,_shadersModifiedReinhardTonemapping:()=>vF,_shadersMorphTargetsStageVS:()=>sX,_shadersNightVision:()=>wF,_shadersNormalMapMaterial:()=>pL,_shadersOctahedralProjectionAtlasFS:()=>HE,_shadersOctahedralProjectionFS:()=>JE,_shadersOctahedralProjectionVS:()=>QE,_shadersOctree:()=>f9,_shadersPassThrough:()=>Ql,_shadersPassThroughDepth:()=>py,_shadersPerInstanceColorAppearanceFS:()=>ZL,_shadersPerInstanceColorAppearanceVS:()=>LL,_shadersPerInstanceFlatColorAppearanceFS:()=>tx,_shadersPerInstanceFlatColorAppearanceVS:()=>RL,_shadersPointCloudEyeDomeLighting:()=>YW,_shadersPointCloudStylingStageVS:()=>lX,_shadersPointPrimitiveCollectionFS:()=>Xg,_shadersPointPrimitiveCollectionVS:()=>K2,_shadersPolygonSignedDistanceFS:()=>IW,_shadersPolylineArrowMaterial:()=>bL,_shadersPolylineColorAppearanceVS:()=>RE,_shadersPolylineCommon:()=>cd,_shadersPolylineDashMaterial:()=>gL,_shadersPolylineFS:()=>gx,_shadersPolylineGlowMaterial:()=>yL,_shadersPolylineMaterialAppearanceVS:()=>GE,_shadersPolylineOutlineMaterial:()=>xL,_shadersPolylineShadowVolumeFS:()=>CE,_shadersPolylineShadowVolumeMorphFS:()=>VE,_shadersPolylineShadowVolumeMorphVS:()=>ZE,_shadersPolylineShadowVolumeVS:()=>LE,_shadersPolylineVS:()=>QX,_shadersPrimitiveOutlineStageFS:()=>mX,_shadersPrimitiveOutlineStageVS:()=>uX,_shadersRGBToHSB:()=>ER,_shadersRGBToHSL:()=>WR,_shadersRGBToXYZ:()=>IR,_shadersReinhardTonemapping:()=>FF,_shadersReprojectWebMercatorFS:()=>zv,_shadersReprojectWebMercatorVS:()=>Kv,_shadersRimLightingMaterial:()=>_L,_shadersSelectedFeatureIdStageCommon:()=>UC,_shadersShadowVolumeAppearanceFS:()=>zT,_shadersShadowVolumeAppearanceVS:()=>dE,_shadersShadowVolumeFS:()=>E0,_shadersSilhouette:()=>AF,_shadersSkinningStageVS:()=>bX,_shadersSkyAtmosphereCommon:()=>_V,_shadersSkyAtmosphereFS:()=>Hv,_shadersSkyAtmosphereVS:()=>Jv,_shadersSkyBoxFS:()=>Qv,_shadersSkyBoxVS:()=>jv,_shadersSlopeRampMaterial:()=>SL,_shadersStripeMaterial:()=>TL,_shadersSunFS:()=>qv,_shadersSunTextureFS:()=>$v,_shadersSunVS:()=>ew,_shadersTexturedMaterialAppearanceFS:()=>eL,_shadersTexturedMaterialAppearanceVS:()=>tL,_shadersVector3DTileClampedPolylinesFS:()=>a2,_shadersVector3DTileClampedPolylinesVS:()=>s2,_shadersVector3DTilePolylinesVS:()=>o2,_shadersVectorTileVS:()=>nC,_shadersVerticalExaggerationStageVS:()=>yX,_shadersViewportQuadFS:()=>tw,_shadersViewportQuadVS:()=>uS,_shadersVoxelFS:()=>i9,_shadersVoxelUtils:()=>n9,_shadersVoxelVS:()=>o9,_shadersWater:()=>CL,_shadersXYZToRGB:()=>XR,_shadersacesTonemapping:()=>PR,_shadersalphaWeight:()=>vR,_shadersantialias:()=>wR,_shadersapplyHSBShift:()=>FR,_shadersapproximateSphericalCoordinates:()=>AR,_shadersapproximateTanh:()=>MR,_shadersbackFacing:()=>NR,_shadersbranchFreeTernary:()=>UR,_shaderscascadeColor:()=>kR,_shaderscascadeDistance:()=>DR,_shaderscascadeMatrix:()=>BR,_shaderscascadeWeights:()=>YR,_shadersclipPolygons:()=>OR,_shaderscolumbusViewMorph:()=>zR,_shaderscomputeAtmosphereColor:()=>KR,_shaderscomputeGroundAtmosphereScattering:()=>HR,_shaderscomputePosition:()=>JR,_shaderscomputeScattering:()=>QR,_shadersconvertUvToBox:()=>u9,_shadersconvertUvToCylinder:()=>m9,_shadersconvertUvToEllipsoid:()=>h9,_shaderscosineAndSine:()=>jR,_shadersdecompressTextureCoordinates:()=>qR,_shadersdegreesPerRadian:()=>wL,_shadersdepthClamp:()=>$R,_shadersdepthRange:()=>FL,_shadersdepthRangeStruct:()=>xR,_shaderseastNorthUpToEyeCoordinates:()=>eG,_shadersellipsoidContainsPoint:()=>tG,_shadersellipsoidTextureCoordinates:()=>nG,_shadersepsilon1:()=>AL,_shadersepsilon2:()=>ML,_shadersepsilon3:()=>NL,_shadersepsilon4:()=>UL,_shadersepsilon5:()=>kL,_shadersepsilon6:()=>DL,_shadersepsilon7:()=>BL,_shadersequalsEpsilon:()=>iG,_shaderseyeOffset:()=>oG,_shaderseyeToWindowCoordinates:()=>rG,_shadersfastApproximateAtan:()=>sG,_shadersfog:()=>aG,_shadersgammaCorrect:()=>cG,_shadersgeodeticSurfaceNormal:()=>lG,_shadersgetDefaultMaterial:()=>dG,_shadersgetDynamicAtmosphereLightDirection:()=>uG,_shadersgetLambertDiffuse:()=>mG,_shadersgetSpecular:()=>hG,_shadersgetWaterNoise:()=>fG,_shadershue:()=>pG,_shadersinfinity:()=>YL,_shadersinverseGamma:()=>bG,_shadersisEmpty:()=>gG,_shadersisFull:()=>yG,_shaderslatitudeToWebMercatorFraction:()=>xG,_shaderslineDistance:()=>_G,_shaderslinearToSrgb:()=>SG,_shadersluminance:()=>TG,_shadersmaterial:()=>_R,_shadersmaterialInput:()=>SR,_shadersmaximumComponent:()=>CG,_shadersmetersPerPixel:()=>VG,_shadersmodelMaterial:()=>TR,_shadersmodelToWindowCoordinates:()=>ZG,_shadersmodelVertexOutput:()=>CR,_shadersmultiplyWithColorBalance:()=>LG,_shadersnearFarScalar:()=>RG,_shadersoctDecode:()=>GG,_shadersoneOverPi:()=>OL,_shadersoneOverTwoPi:()=>zL,_shaderspackDepth:()=>EG,_shaderspassCesium3DTile:()=>KL,_shaderspassCesium3DTileClassification:()=>HL,_shaderspassCesium3DTileClassificationIgnoreShow:()=>JL,_shaderspassClassification:()=>QL,_shaderspassCompute:()=>jL,_shaderspassEnvironment:()=>qL,_shaderspassGlobe:()=>$L,_shaderspassOpaque:()=>eR,_shaderspassOverlay:()=>tR,_shaderspassTerrainClassification:()=>nR,_shaderspassTranslucent:()=>iR,_shaderspassVoxels:()=>oR,_shaderspbrLighting:()=>WG,_shadersphong:()=>IG,_shaderspi:()=>rR,_shaderspiOverFour:()=>sR,_shaderspiOverSix:()=>aR,_shaderspiOverThree:()=>cR,_shaderspiOverTwo:()=>lR,_shadersplaneDistance:()=>XG,_shaderspointAlongRay:()=>PG,_shadersradiansPerDegree:()=>dR,_shadersray:()=>VR,_shadersrayEllipsoidIntersectionInterval:()=>vG,_shadersraySegment:()=>ZR,_shadersraySphereIntersectionInterval:()=>wG,_shadersreadDepth:()=>FG,_shadersreadNonPerspective:()=>AG,_shadersreverseLogDepth:()=>MG,_shadersround:()=>NG,_shaderssampleOctahedralProjection:()=>UG,_shaderssaturation:()=>kG,_shaderssceneMode2D:()=>uR,_shaderssceneMode3D:()=>mR,_shaderssceneModeColumbusView:()=>hR,_shaderssceneModeMorphing:()=>fR,_shadersshadowDepthCompare:()=>DG,_shadersshadowParameters:()=>LR,_shadersshadowVisibility:()=>BG,_shaderssignNotZero:()=>YG,_shaderssolarRadius:()=>pR,_shaderssphericalHarmonics:()=>OG,_shaderssrgbToLinear:()=>zG,_shaderstangentToEyeSpaceMatrix:()=>KG,_shaderstextureCube:()=>HG,_shadersthreePiOver2:()=>bR,_shaderstransformPlane:()=>JG,_shaderstranslateRelativeToEye:()=>QG,_shaderstranslucentPhong:()=>jG,_shaderstranspose:()=>qG,_shaderstwoPi:()=>gR,_shadersunpackClippingExtents:()=>$G,_shadersunpackDepth:()=>eE,_shadersunpackFloat:()=>tE,_shadersunpackUint:()=>nE,_shadersvalueTransform:()=>iE,_shadersvertexLogDepth:()=>oE,_shaderswebMercatorMaxLatitude:()=>yR,_shaderswindowToEyeCoordinates:()=>rE,_shaderswriteDepthClamp:()=>sE,_shaderswriteLogDepth:()=>aE,_shaderswriteNonPerspective:()=>cE,addBuffer:()=>pW,addDefaults:()=>aW,addExtensionsRequired:()=>mW,addExtensionsUsed:()=>fu,addPipelineExtras:()=>H0,addToArray:()=>ps,appendForwardSlash:()=>PZ,arrayRemoveDuplicates:()=>go,barycentricCoordinates:()=>ax,binarySearch:()=>Lo,buildDrawCommand:()=>hI,buildModuleUrl:()=>tn,buildVoxelDrawCommands:()=>y9,clone:()=>Oe,combine:()=>xt,computeFlyToLocationForRectangle:()=>mT,createBillboardPointCallback:()=>m_,createCommand:()=>Vn,createDefaultImageryProviderViewModels:()=>WA,createDefaultTerrainProviderViewModels:()=>IA,createElevationBandMaterial:()=>Y7,createGooglePhotorealistic3DTileset:()=>O7,createGuid:()=>Bn,createMaterialPropertyDescriptor:()=>Ro,createOsmBuildingsAsync:()=>z7,createPropertyDescriptor:()=>de,createRawPropertyDescriptor:()=>_l,createTangentSpaceDebugPrimitive:()=>K7,createTaskProcessorWorker:()=>j7,createUniform:()=>PL,createUniformArray:()=>vL,createWorldBathymetryAsync:()=>k9,createWorldImageryAsync:()=>zb,createWorldTerrainAsync:()=>$S,decodeGoogleEarthEnterpriseData:()=>D9,decodeVectorPolylinePositions:()=>d2,defaultValue:()=>y,defer:()=>hl,defined:()=>l,demodernizeShader:()=>lE,deprecationWarning:()=>Yr,destroyObject:()=>me,exportKml:()=>$Q,findAccessorMinMax:()=>Yx,findContentMetadata:()=>y_,findGroupMetadata:()=>x_,findTileMetadata:()=>f2,forEachTextureInMaterial:()=>uC,formatError:()=>vf,freezeRenderState:()=>F3,getAbsoluteUri:()=>wh,getAccessorByteStride:()=>Gl,getBaseUri:()=>vZ,getBinaryAccessor:()=>ud,getClipAndStyleCode:()=>dA,getClippingFunction:()=>Db,getComponentReader:()=>Mp,getElement:()=>In,getExtensionFromUri:()=>By,getFilenameFromUri:()=>Tb,getImageFromTypedArray:()=>T9,getImagePixels:()=>um,getJsonFromTypedArray:()=>Eo,getMagic:()=>Lm,getStringFromTypedArray:()=>Vl,getTimestamp:()=>gi,hasExtension:()=>oi,heightReferenceOnEntityPropertyChanged:()=>Lp,isBitSet:()=>Zc,isBlobUri:()=>Yy,isCrossOriginUrl:()=>x0,isDataUri:()=>op,isLeapYear:()=>dm,knockout:()=>Ce,knockout_3_5_1:()=>hT,knockout_es5:()=>xA,loadAndExecuteScript:()=>Oy,loadCubeMap:()=>G9,loadImageFromTypedArray:()=>kx,loadKTX2:()=>gl,mergeSort:()=>Hb,moveTechniqueRenderStates:()=>uW,moveTechniquesToExtension:()=>hW,numberOfComponentsForType:()=>hd,objectToQuery:()=>zy,oneTimeWarning:()=>At,parseBatchTable:()=>zp,parseFeatureMetadataLegacy:()=>NW,parseGlb:()=>lW,parseResponseHeaders:()=>wZ,parseStructuralMetadata:()=>MW,pickModel:()=>BC,pointInsideTriangle:()=>O8,preprocess3DTileContent:()=>hf,processVoxelProperties:()=>g9,queryToObject:()=>id,readAccessorPacked:()=>bW,removeExtension:()=>Ox,removeExtensionsRequired:()=>cW,removeExtensionsUsed:()=>Bx,removePipelineExtras:()=>dW,removeUnusedElements:()=>fW,resizeImageToNextPowerOfTwo:()=>j0,sampleTerrain:()=>B9,sampleTerrainMostDetailed:()=>eT,scaleToGeodeticSurface:()=>Dy,srgbToLinear:()=>tT,subdivideArray:()=>uE,subscribeAndEvaluate:()=>ga,updateAccessorComponentTypes:()=>gW,updateVersion:()=>yW,usesExtension:()=>or,viewerCesium3DTilesInspectorMixin:()=>x6,viewerCesiumInspectorMixin:()=>_6,viewerDragDropMixin:()=>T6,viewerPerformanceWatchdogMixin:()=>C6,viewerVoxelInspectorMixin:()=>V6,webGLConstantToGlslType:()=>H8,wrapFunction:()=>Y9,writeTextToCanvas:()=>f_});var oZo=S(T(),1);var qqi=S(T(),1);var eCt=S(T(),1);var RTt=S(T(),1);function K6(e,t){return e??t}K6.EMPTY_OBJECT=Object.freeze({});var y=K6;var ETt=S(T(),1);function rCe(e){return e!=null}var l=rCe;var XTt=S(T(),1);function Uy(e){this.name="DeveloperError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(Uy.prototype=Object.create(Error.prototype),Uy.prototype.constructor=Uy);Uy.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=` +${this.stack.toString()}`),e};Uy.throwInstantiationError=function(){throw new Uy("This function defines an interface and should not be called directly.")};var fe=Uy;var NTt=S(T(),1);var FTt=S(T(),1);var fs={};fs.typeOf={};function sCe(e){return`${e} is required, actual value was undefined`}function TT(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}fs.defined=function(e,t){if(!l(t))throw new fe(sCe(e))};fs.typeOf.func=function(e,t){if(typeof t!="function")throw new fe(TT(typeof t,"function",e))};fs.typeOf.string=function(e,t){if(typeof t!="string")throw new fe(TT(typeof t,"string",e))};fs.typeOf.number=function(e,t){if(typeof t!="number")throw new fe(TT(typeof t,"number",e))};fs.typeOf.number.lessThan=function(e,t,n){if(fs.typeOf.number(e,t),t>=n)throw new fe(`Expected ${e} to be less than ${n}, actual value was ${t}`)};fs.typeOf.number.lessThanOrEquals=function(e,t,n){if(fs.typeOf.number(e,t),t>n)throw new fe(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)};fs.typeOf.number.greaterThan=function(e,t,n){if(fs.typeOf.number(e,t),t<=n)throw new fe(`Expected ${e} to be greater than ${n}, actual value was ${t}`)};fs.typeOf.number.greaterThanOrEquals=function(e,t,n){if(fs.typeOf.number(e,t),t0){for(o.sort(aCe),e=0;e0&&(this._hash={},e.length=0)};var Ct=ky;var xRt=S(T(),1);var hCt=S(T(),1);var cCt=S(T(),1),SY=S(SM(),1);var lt={};lt.EPSILON1=.1;lt.EPSILON2=.01;lt.EPSILON3=.001;lt.EPSILON4=1e-4;lt.EPSILON5=1e-5;lt.EPSILON6=1e-6;lt.EPSILON7=1e-7;lt.EPSILON8=1e-8;lt.EPSILON9=1e-9;lt.EPSILON10=1e-10;lt.EPSILON11=1e-11;lt.EPSILON12=1e-12;lt.EPSILON13=1e-13;lt.EPSILON14=1e-14;lt.EPSILON15=1e-15;lt.EPSILON16=1e-16;lt.EPSILON17=1e-17;lt.EPSILON18=1e-18;lt.EPSILON19=1e-19;lt.EPSILON20=1e-20;lt.EPSILON21=1e-21;lt.GRAVITATIONALPARAMETER=3986004418e5;lt.SOLAR_RADIUS=6955e5;lt.LUNAR_RADIUS=1737400;lt.SIXTY_FOUR_KILOBYTES=64*1024;lt.FOUR_GIGABYTES=4*1024*1024*1024;lt.sign=y(Math.sign,function(t){return t=+t,t===0||t!==t?t:t>0?1:-1});lt.signNotZero=function(e){return e<0?-1:1};lt.toSNorm=function(e,t){return t=y(t,255),Math.round((lt.clamp(e,-1,1)*.5+.5)*t)};lt.fromSNorm=function(e,t){return t=y(t,255),lt.clamp(e,0,t)/t*2-1};lt.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:lt.clamp((e-t)/n,0,1)};lt.sinh=y(Math.sinh,function(t){return(Math.exp(t)-Math.exp(-t))/2});lt.cosh=y(Math.cosh,function(t){return(Math.exp(t)+Math.exp(-t))/2});lt.lerp=function(e,t,n){return(1-n)*e+n*t};lt.PI=Math.PI;lt.ONE_OVER_PI=1/Math.PI;lt.PI_OVER_TWO=Math.PI/2;lt.PI_OVER_THREE=Math.PI/3;lt.PI_OVER_FOUR=Math.PI/4;lt.PI_OVER_SIX=Math.PI/6;lt.THREE_PI_OVER_TWO=3*Math.PI/2;lt.TWO_PI=2*Math.PI;lt.ONE_OVER_TWO_PI=1/(2*Math.PI);lt.RADIANS_PER_DEGREE=Math.PI/180;lt.DEGREES_PER_RADIAN=180/Math.PI;lt.RADIANS_PER_ARCSECOND=lt.RADIANS_PER_DEGREE/3600;lt.toRadians=function(e){return e*lt.RADIANS_PER_DEGREE};lt.toDegrees=function(e){return e*lt.DEGREES_PER_RADIAN};lt.convertLongitudeRange=function(e){let t=lt.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n};lt.clampToLatitudeRange=function(e){return lt.clamp(e,-1*lt.PI_OVER_TWO,lt.PI_OVER_TWO)};lt.negativePiToPi=function(e){return e>=-lt.PI&&e<=lt.PI?e:lt.zeroToTwoPi(e+lt.PI)-lt.PI};lt.zeroToTwoPi=function(e){if(e>=0&&e<=lt.TWO_PI)return e;let t=lt.mod(e,lt.TWO_PI);return Math.abs(t)lt.EPSILON14?lt.TWO_PI:t};lt.mod=function(e,t){return lt.sign(e)===lt.sign(t)&&Math.abs(e)n};lt.greaterThanOrEquals=function(e,t,n){return e-t>-n};var TM=[1];lt.factorial=function(e){let t=TM.length;if(e>=t){let n=TM[t-1];for(let i=t;i<=e;i++){let o=n*i;TM.push(o),n=o}}return TM[e]};lt.incrementWrap=function(e,t,n){return n=y(n,0),++e,e>t&&(e=n),e};lt.isPowerOfTwo=function(e){return e!==0&&(e&e-1)===0};lt.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e};lt.previousPowerOfTwo=function(e){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};lt.clamp=function(e,t,n){return en?n:e};var J6=new SY.default;lt.setRandomNumberSeed=function(e){J6=new SY.default(e)};lt.nextRandomNumber=function(){return J6.random()};lt.randomBetween=function(e,t){return lt.nextRandomNumber()*(t-e)+e};lt.acosClamped=function(e){return Math.acos(lt.clamp(e,-1,1))};lt.asinClamped=function(e){return Math.asin(lt.clamp(e,-1,1))};lt.chordLength=function(e,t){return 2*t*Math.sin(e*.5)};lt.logBase=function(e,t){return Math.log(e)/Math.log(t)};lt.cbrt=y(Math.cbrt,function(t){let n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n});lt.log2=y(Math.log2,function(t){return Math.log(t)*Math.LOG2E});lt.fog=function(e,t){let n=e*t;return 1-Math.exp(-(n*n))};lt.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)};lt.fastApproximateAtan2=function(e,t){let n,i=Math.abs(e);n=Math.abs(t);let o=Math.max(i,n);n=Math.min(i,n);let r=n/o;return i=lt.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?lt.PI_OVER_TWO-i:i,i=e<0?lt.PI-i:i,i=t<0?-i:i,i};var X=lt;function wt(e,t){this.x=y(e,0),this.y=y(t,0)}wt.fromElements=function(e,t,n){return l(n)?(n.x=e,n.y=t,n):new wt(e,t)};wt.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t):new wt(e.x,e.y)};wt.fromCartesian3=wt.clone;wt.fromCartesian4=wt.clone;wt.packedLength=2;wt.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n]=e.y,t};wt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new wt),n.x=e[t++],n.y=e[t],n};wt.packArray=function(e,t){let n=e.length,i=n*2;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;oX.EPSILON12);return l(o)?(o.x=r*F,o.y=s*M,o.z=a*b,o):new h(r*F,s*M,a*b)}var Dy=pCe;function Xo(e,t,n){this.longitude=y(e,0),this.latitude=y(t,0),this.height=y(n,0)}Xo.fromRadians=function(e,t,n,i){return n=y(n,0),l(i)?(i.longitude=e,i.latitude=t,i.height=n,i):new Xo(e,t,n)};Xo.fromDegrees=function(e,t,n,i){return e=X.toRadians(e),t=X.toRadians(t),Xo.fromRadians(e,t,n,i)};var bCe=new h,gCe=new h,yCe=new h;Xo._ellipsoidOneOverRadii=new h(1/6378137,1/6378137,1/6356752314245179e-9);Xo._ellipsoidOneOverRadiiSquared=new h(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));Xo._ellipsoidCenterToleranceSquared=X.EPSILON1;Xo.fromCartesian=function(e,t,n){let i=l(t)?t.oneOverRadii:Xo._ellipsoidOneOverRadii,o=l(t)?t.oneOverRadiiSquared:Xo._ellipsoidOneOverRadiiSquared,r=l(t)?t._centerToleranceSquared:Xo._ellipsoidCenterToleranceSquared,s=Dy(e,i,o,r,gCe);if(!l(s))return;let a=h.multiplyComponents(s,o,bCe);a=h.normalize(a,a);let c=h.subtract(e,s,yCe),d=Math.atan2(a.y,a.x),u=Math.asin(a.z),m=X.sign(h.dot(c,e))*h.magnitude(c);return l(n)?(n.longitude=d,n.latitude=u,n.height=m,n):new Xo(d,u,m)};Xo.toCartesian=function(e,t,n){return h.fromRadians(e.longitude,e.latitude,e.height,t,n)};Xo.clone=function(e,t){if(l(e))return l(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new Xo(e.longitude,e.latitude,e.height)};Xo.equals=function(e,t){return e===t||l(e)&&l(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height};Xo.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n};Xo.ZERO=Object.freeze(new Xo(0,0,0));Xo.prototype.clone=function(e){return Xo.clone(this,e)};Xo.prototype.equals=function(e){return Xo.equals(this,e)};Xo.prototype.equalsEpsilon=function(e,t){return Xo.equalsEpsilon(this,e,t)};Xo.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var he=Xo;var NCt=S(T(),1);function tq(e,t,n,i){t=y(t,0),n=y(n,0),i=y(i,0),e._radii=new h(t,n,i),e._radiiSquared=new h(t*t,n*n,i*i),e._radiiToTheFourth=new h(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new h(t===0?0:1/t,n===0?0:1/n,i===0?0:1/i),e._oneOverRadiiSquared=new h(t===0?0:1/(t*t),n===0?0:1/(n*n),i===0?0:1/(i*i)),e._minimumRadius=Math.min(t,n,i),e._maximumRadius=Math.max(t,n,i),e._centerToleranceSquared=X.EPSILON1,e._radiiSquared.z!==0&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function hi(e,t,n){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,tq(this,e,t,n)}Object.defineProperties(hi.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});hi.clone=function(e,t){if(!l(e))return;let n=e._radii;return l(t)?(h.clone(n,t._radii),h.clone(e._radiiSquared,t._radiiSquared),h.clone(e._radiiToTheFourth,t._radiiToTheFourth),h.clone(e._oneOverRadii,t._oneOverRadii),h.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new hi(n.x,n.y,n.z)};hi.fromCartesian3=function(e,t){return l(t)||(t=new hi),l(e)&&tq(t,e.x,e.y,e.z),t};hi.WGS84=Object.freeze(new hi(6378137,6378137,6356752314245179e-9));hi.UNIT_SPHERE=Object.freeze(new hi(1,1,1));hi.MOON=Object.freeze(new hi(X.LUNAR_RADIUS,X.LUNAR_RADIUS,X.LUNAR_RADIUS));hi._default=hi.WGS84;Object.defineProperties(hi,{default:{get:function(){return hi._default},set:function(e){hi._default=e,h._ellipsoidRadiiSquared=e.radiiSquared,he._ellipsoidOneOverRadii=e.oneOverRadii,he._ellipsoidOneOverRadiiSquared=e.oneOverRadiiSquared,he._ellipsoidCenterToleranceSquared=e._centerToleranceSquared}}});hi.prototype.clone=function(e){return hi.clone(this,e)};hi.packedLength=h.packedLength;hi.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),t};hi.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t);return hi.fromCartesian3(i,n)};hi.prototype.geocentricSurfaceNormal=h.normalize;hi.prototype.geodeticSurfaceNormalCartographic=function(e,t){let n=e.longitude,i=e.latitude,o=Math.cos(i),r=o*Math.cos(n),s=o*Math.sin(n),a=Math.sin(i);return l(t)||(t=new h),t.x=r,t.y=s,t.z=a,h.normalize(t,t)};hi.prototype.geodeticSurfaceNormal=function(e,t){if(!h.equalsEpsilon(e,h.ZERO,X.EPSILON14))return l(t)||(t=new h),t=h.multiplyComponents(e,this._oneOverRadiiSquared,t),h.normalize(t,t)};var xCe=new h,_Ce=new h;hi.prototype.cartographicToCartesian=function(e,t){let n=xCe,i=_Ce;this.geodeticSurfaceNormalCartographic(e,n),h.multiplyComponents(this._radiiSquared,n,i);let o=Math.sqrt(h.dot(n,i));return h.divideByScalar(i,o,i),h.multiplyByScalar(n,e.height,n),l(t)||(t=new h),h.add(i,n,t)};hi.prototype.cartographicArrayToCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i=this._radii.z-t))return n};var VCe=new h;hi.prototype.getLocalCurvature=function(e,t){l(t)||(t=new D);let n=this.getSurfaceNormalIntersectionWithZAxis(e,0,VCe),i=h.distance(e,n),o=this.minimumRadius*i/this.maximumRadius**2,r=i*o**2;return D.fromElements(1/i,1/r,t)};var ZCe=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],LCe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function eq(e,t,n){let i=.5*(t+e),o=.5*(t-e),r=0;for(let s=0;s<5;s++){let a=o*ZCe[s];r+=LCe[s]*(n(i+a)+n(i-a))}return r*=o,r}hi.prototype.surfaceArea=function(e){let t=e.west,n=e.east,i=e.south,o=e.north;for(;n0){o=r-1;continue}return r}return~(o+1)}var Lo=ICe;var i1t=S(T(),1);function XCe(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o}var g0=XCe;var R1t=S(T(),1);var u1t=S(T(),1);var r1t=S(T(),1);function PCe(e){return e%4===0&&e%100!==0||e%400===0}var dm=PCe;var oq=[31,28,31,30,31,30,31,31,30,31,30,31];function vCe(e,t,n,i,o,r,s,a){e=y(e,1),t=y(t,1),n=y(n,1),i=y(i,0),o=y(o,0),r=y(r,0),s=y(s,0),a=y(a,!1),this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=o,this.second=r,this.millisecond=s,this.isLeapSecond=a;function x(){po.typeOf.number.greaterThanOrEquals("Year",e,1),po.typeOf.number.lessThanOrEquals("Year",e,9999),po.typeOf.number.greaterThanOrEquals("Month",t,1),po.typeOf.number.lessThanOrEquals("Month",t,12),po.typeOf.number.greaterThanOrEquals("Day",n,1),po.typeOf.number.lessThanOrEquals("Day",n,31),po.typeOf.number.greaterThanOrEquals("Hour",i,0),po.typeOf.number.lessThanOrEquals("Hour",i,23),po.typeOf.number.greaterThanOrEquals("Minute",o,0),po.typeOf.number.lessThanOrEquals("Minute",o,59),po.typeOf.bool("IsLeapSecond",a),po.typeOf.number.greaterThanOrEquals("Second",r,0),po.typeOf.number.lessThanOrEquals("Second",r,a?60:59),po.typeOf.number.greaterThanOrEquals("Millisecond",s,0),po.typeOf.number.lessThan("Millisecond",s,1e3)}function _(){let C=t===2&&dm(e)?oq[t-1]+1:oq[t-1];if(n>C)throw new fe("Month and Day represents invalid date")}}var ip=vCe;var h1t=S(T(),1);function wCe(e,t){this.julianDate=e,this.offset=t}var Ai=wCe;var p1t=S(T(),1),FCe={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1},Kn=Object.freeze(FCe);var g1t=S(T(),1),ACe={UTC:0,TAI:1},zn=Object.freeze(ACe);var sq=new ip,VY=[31,28,31,30,31,30,31,31,30,31,30,31],ZY=29;function LY(e,t){return Rt.compare(e.julianDate,t.julianDate)}var VT=new Ai;function EM(e){VT.julianDate=e;let t=Rt.leapSeconds,n=Lo(t,VT,LY);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&Rt.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),Rt.addSeconds(e,i,e)}function rq(e,t){VT.julianDate=e;let n=Rt.leapSeconds,i=Lo(n,VT,LY);if(i<0&&(i=~i),i===0)return Rt.addSeconds(e,-n[0].offset,t);if(i>=n.length)return Rt.addSeconds(e,-n[i-1].offset,t);let o=Rt.secondsDifference(n[i].julianDate,e);if(o===0)return Rt.addSeconds(e,-n[i].offset,t);if(!(o<=1))return Rt.addSeconds(e,-n[--i].offset,t)}function y0(e,t,n){let i=t/Kn.SECONDS_PER_DAY|0;return e+=i,t-=Kn.SECONDS_PER_DAY*i,t<0&&(e--,t+=Kn.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function RY(e,t,n,i,o,r,s){let a=(t-14)/12|0,c=e+4800+a,d=(1461*c/4|0)+(367*(t-2-12*a)/12|0)-(3*((c+100)/100|0)/4|0)+n-32075;i=i-12,i<0&&(i+=24);let u=r+(i*Kn.SECONDS_PER_HOUR+o*Kn.SECONDS_PER_MINUTE+s*Kn.SECONDS_PER_MILLISECOND);return u>=43200&&(d-=1),[d,u]}var MCe=/^(\d{4})$/,NCe=/^(\d{4})-(\d{2})$/,UCe=/^(\d{4})-?(\d{3})$/,kCe=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,DCe=/^(\d{4})-?(\d{2})-?(\d{2})$/,GY=/([Z+\-])?(\d{2})?:?(\d{2})?$/,BCe=/^(\d{2})(\.\d+)?/.source+GY.source,YCe=/^(\d{2}):?(\d{2})(\.\d+)?/.source+GY.source,OCe=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+GY.source;function Rt(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=y(e,0),t=y(t,0),n=y(n,zn.UTC);let i=e|0;t=t+(e-i)*Kn.SECONDS_PER_DAY,y0(i,t,this),n===zn.UTC&&EM(this)}Rt.fromGregorianDate=function(e,t){let n=RY(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return l(t)?(y0(n[0],n[1],t),EM(t),t):new Rt(n[0],n[1],zn.UTC)};Rt.fromDate=function(e,t){let n=RY(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return l(t)?(y0(n[0],n[1],t),EM(t),t):new Rt(n[0],n[1],zn.UTC)};Rt.fromIso8601=function(e,t){e=e.replace(",",".");let n=e.split("T"),i,o=1,r=1,s=0,a=0,c=0,d=0,u=n[0],m=n[1],p,g;if(n=u.match(DCe),n!==null)i=+n[1],o=+n[2],r=+n[3];else if(n=u.match(NCe),n!==null)i=+n[1],o=+n[2];else if(n=u.match(MCe),n!==null)i=+n[1];else{let C;if(n=u.match(UCe),n!==null)i=+n[1],C=+n[2],g=dm(i);else if(n=u.match(kCe),n!==null){i=+n[1];let V=+n[2],Z=+n[3]||0,R=new Date(Date.UTC(i,0,4));C=V*7+Z-R.getUTCDay()-3}p=new Date(Date.UTC(i,0,1)),p.setUTCDate(C),o=p.getUTCMonth()+1,r=p.getUTCDate()}g=dm(i);let f;if(l(m)){n=m.match(OCe),n!==null?(s=+n[1],a=+n[2],c=+n[3],d=+(n[4]||0)*1e3,f=5):(n=m.match(YCe),n!==null?(s=+n[1],a=+n[2],c=+(n[3]||0)*60,f=4):(n=m.match(BCe),n!==null&&(s=+n[1],a=+(n[2]||0)*60,f=3)));let C=n[f],V=+n[f+1],Z=+(n[f+2]||0);switch(C){case"+":s=s-V,a=a-Z;break;case"-":s=s+V,a=a+Z;break;case"Z":break;default:a=a+new Date(Date.UTC(i,o-1,r,s,a)).getTimezoneOffset();break}}let x=c===60;for(x&&c--;a>=60;)a-=60,s++;for(;s>=24;)s-=24,r++;for(p=g&&o===2?ZY:VY[o-1];r>p;)r-=p,o++,o>12&&(o-=12,i++),p=g&&o===2?ZY:VY[o-1];for(;a<0;)a+=60,s--;for(;s<0;)s+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),p=g&&o===2?ZY:VY[o-1],r+=p;let _=RY(i,o,r,s,a,c,d);return l(t)?(y0(_[0],_[1],t),EM(t)):t=new Rt(_[0],_[1],zn.UTC),x&&Rt.addSeconds(t,1,t),t};Rt.now=function(e){return Rt.fromDate(new Date,e)};var GM=new Rt(0,0,zn.TAI);Rt.toGregorianDate=function(e,t){let n=!1,i=rq(e,GM);l(i)||(Rt.addSeconds(e,-1,GM),i=rq(GM,GM),n=!0);let o=i.dayNumber,r=i.secondsOfDay;r>=43200&&(o+=1);let s=o+68569|0,a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;let c=4e3*(s+1)/1461001|0;s=s-(1461*c/4|0)+31|0;let d=80*s/2447|0,u=s-(2447*d/80|0)|0;s=d/11|0;let m=d+2-12*s|0,p=100*(a-49)+c+s|0,g=r/Kn.SECONDS_PER_HOUR|0,f=r-g*Kn.SECONDS_PER_HOUR,x=f/Kn.SECONDS_PER_MINUTE|0;f=f-x*Kn.SECONDS_PER_MINUTE;let _=f|0,C=(f-_)/Kn.SECONDS_PER_MILLISECOND;return g+=12,g>23&&(g-=24),n&&(_+=1),l(t)?(t.year=p,t.month=m,t.day=u,t.hour=g,t.minute=x,t.second=_,t.millisecond=C,t.isLeapSecond=n,t):new ip(p,m,u,g,x,_,C,n)};Rt.toDate=function(e){let t=Rt.toGregorianDate(e,sq),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))};Rt.toIso8601=function(e,t){let n=Rt.toGregorianDate(e,sq),i=n.year,o=n.month,r=n.day,s=n.hour,a=n.minute,c=n.second,d=n.millisecond;i===1e4&&o===1&&r===1&&s===0&&a===0&&c===0&&d===0&&(i=9999,o=12,r=31,s=24);let u;return!l(t)&&d!==0?(u=(d*.01).toString().replace(".",""),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${u}Z`):!l(t)||t===0?`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}Z`:(u=(d*.01).toFixed(t).replace(".","").slice(0,t),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${u}Z`)};Rt.clone=function(e,t){if(l(e))return l(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new Rt(e.dayNumber,e.secondsOfDay,zn.TAI)};Rt.compare=function(e,t){let n=e.dayNumber-t.dayNumber;return n!==0?n:e.secondsOfDay-t.secondsOfDay};Rt.equals=function(e,t){return e===t||l(e)&&l(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay};Rt.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(Rt.secondsDifference(e,t))<=n};Rt.totalDays=function(e){return e.dayNumber+e.secondsOfDay/Kn.SECONDS_PER_DAY};Rt.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*Kn.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)};Rt.daysDifference=function(e,t){let n=e.dayNumber-t.dayNumber,i=(e.secondsOfDay-t.secondsOfDay)/Kn.SECONDS_PER_DAY;return n+i};Rt.computeTaiMinusUtc=function(e){VT.julianDate=e;let t=Rt.leapSeconds,n=Lo(t,VT,LY);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset};Rt.addSeconds=function(e,t,n){return y0(e.dayNumber,e.secondsOfDay+t,n)};Rt.addMinutes=function(e,t,n){let i=e.secondsOfDay+t*Kn.SECONDS_PER_MINUTE;return y0(e.dayNumber,i,n)};Rt.addHours=function(e,t,n){let i=e.secondsOfDay+t*Kn.SECONDS_PER_HOUR;return y0(e.dayNumber,i,n)};Rt.addDays=function(e,t,n){let i=e.dayNumber+t;return y0(i,e.secondsOfDay,n)};Rt.lessThan=function(e,t){return Rt.compare(e,t)<0};Rt.lessThanOrEquals=function(e,t){return Rt.compare(e,t)<=0};Rt.greaterThan=function(e,t){return Rt.compare(e,t)>0};Rt.greaterThanOrEquals=function(e,t){return Rt.compare(e,t)>=0};Rt.prototype.clone=function(e){return Rt.clone(this,e)};Rt.prototype.equals=function(e){return Rt.equals(this,e)};Rt.prototype.equalsEpsilon=function(e,t){return Rt.equalsEpsilon(this,e,t)};Rt.prototype.toString=function(){return Rt.toIso8601(this)};Rt.leapSeconds=[new Ai(new Rt(2441317,43210,zn.TAI),10),new Ai(new Rt(2441499,43211,zn.TAI),11),new Ai(new Rt(2441683,43212,zn.TAI),12),new Ai(new Rt(2442048,43213,zn.TAI),13),new Ai(new Rt(2442413,43214,zn.TAI),14),new Ai(new Rt(2442778,43215,zn.TAI),15),new Ai(new Rt(2443144,43216,zn.TAI),16),new Ai(new Rt(2443509,43217,zn.TAI),17),new Ai(new Rt(2443874,43218,zn.TAI),18),new Ai(new Rt(2444239,43219,zn.TAI),19),new Ai(new Rt(2444786,43220,zn.TAI),20),new Ai(new Rt(2445151,43221,zn.TAI),21),new Ai(new Rt(2445516,43222,zn.TAI),22),new Ai(new Rt(2446247,43223,zn.TAI),23),new Ai(new Rt(2447161,43224,zn.TAI),24),new Ai(new Rt(2447892,43225,zn.TAI),25),new Ai(new Rt(2448257,43226,zn.TAI),26),new Ai(new Rt(2448804,43227,zn.TAI),27),new Ai(new Rt(2449169,43228,zn.TAI),28),new Ai(new Rt(2449534,43229,zn.TAI),29),new Ai(new Rt(2450083,43230,zn.TAI),30),new Ai(new Rt(2450630,43231,zn.TAI),31),new Ai(new Rt(2451179,43232,zn.TAI),32),new Ai(new Rt(2453736,43233,zn.TAI),33),new Ai(new Rt(2454832,43234,zn.TAI),34),new Ai(new Rt(2456109,43235,zn.TAI),35),new Ai(new Rt(2457204,43236,zn.TAI),36),new Ai(new Rt(2457754,43237,zn.TAI),37)];var ne=Rt;var SZt=S(T(),1),Zq=S(nd(),1);var P1t=S(T(),1);function zCe(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var PZ=zCe;var F1t=S(T(),1);function hq(e,t){if(e===null||typeof e!="object")return e;t=y(t,!1);let n=new e.constructor;for(let i in e)if(e.hasOwnProperty(i)){let o=e[i];t&&(o=hq(o,t)),n[i]=o}return n}var Oe=hq;var U1t=S(T(),1);function fq(e,t,n){n=y(n,!1);let i={},o=l(e),r=l(t),s,a,c;if(o)for(s in e)e.hasOwnProperty(s)&&(a=e[s],r&&n&&typeof a=="object"&&t.hasOwnProperty(s)?(c=t[s],typeof c=="object"?i[s]=fq(a,c,n):i[s]=a):i[s]=a);if(r)for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(c=t[s],i[s]=c);return i}var xt=fq;var D1t=S(T(),1);function KCe(){let e,t,n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}}var hl=KCe;var z1t=S(T(),1),pq=S(nd(),1);function EY(e,t){let n;return typeof document<"u"&&(n=document),EY._implementation(e,t,n)}EY._implementation=function(e,t,n){if(!l(t)){if(typeof n>"u")return e;t=y(n.baseURI,n.location.href)}let i=new pq.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var wh=EY;var H1t=S(T(),1),bq=S(nd(),1);function HCe(e,t){let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new bq.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var vZ=HCe;var Q1t=S(T(),1),gq=S(nd(),1);function JCe(e){let t=new gq.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),i=n.lastIndexOf("."),i===-1?n="":n=n.substr(i+1),n}var By=JCe;var $1t=S(T(),1);var yq={};function QCe(e,t,n){l(t)||(t=e.width),l(n)||(n=e.height);let i=yq[t];l(i)||(i={},yq[t]=i);let o=i[n];if(!l(o)){let r=document.createElement("canvas");r.width=t,r.height=n,o=r.getContext("2d",{willReadFrequently:!0}),o.globalCompositeOperation="copy",i[n]=o}return o.drawImage(e,0,0,t,n),o.getImageData(0,0,t,n).data}var um=QCe;var tVt=S(T(),1);var jCe=/^blob:/i;function qCe(e){return jCe.test(e)}var Yy=qCe;var oVt=S(T(),1);var Fh;function $Ce(e){l(Fh)||(Fh=document.createElement("a")),Fh.href=window.location.href;let t=Fh.host,n=Fh.protocol;return Fh.href=e,Fh.href=Fh.href,n!==Fh.protocol||t!==Fh.host}var x0=$Ce;var sVt=S(T(),1);var e1e=/^data:/i;function t1e(e){return e1e.test(e)}var op=t1e;var cVt=S(T(),1);function n1e(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let o=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,o.removeChild(t),n()},t.onerror=function(r){i(r)},o.appendChild(t)})}var Oy=n1e;var dVt=S(T(),1);function i1e(e){let t="";for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let r=0,s=i.length;r0){let s=o.substring(0,r),a=o.substring(r+2);t[s]=a}}return t}var wZ=a1e;function xq(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=wZ(this.responseHeaders))}xq.prototype.toString=function(){let e="Request has failed.";return l(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var Ah=xq;var BVt=S(T(),1),vM=S(nd(),1);var PVt=S(T(),1);function Ky(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(Ky.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){let t=this._length;if(e=0;--t)this.heapify(t)};Ky.prototype.insert=function(e){let t=this._array,n=this._comparator,i=this._maximumLength,o=this._length++;for(oi&&(r=t[i],this._length=i),r};Ky.prototype.pop=function(e){if(e=y(e,0),this._length===0)return;let t=this._array,n=t[e];return WY(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var FZ=Ky;function c1e(e,t){return e.priority-t.priority}var Ji={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},RT=20,za=new FZ({comparator:c1e});za.maximumLength=RT;za.reserve(RT);var Mh=[],rp={},l1e=typeof document<"u"?new vM.default(document.location.href):new vM.default,wM=new ge;function zo(){}zo.maximumRequests=50;zo.maximumRequestsPerServer=18;zo.requestsByServer={};zo.throttleRequests=!0;zo.debugShowStatistics=!1;zo.requestCompletedEvent=wM;Object.defineProperties(zo,{statistics:{get:function(){return Ji}},priorityHeapLength:{get:function(){return RT},set:function(e){if(ee;){let t=za.pop();Hy(t)}RT=e,za.maximumLength=e,za.reserve(e)}}});function _q(e){l(e.priorityFunction)&&(e.priority=e.priorityFunction())}zo.serverHasOpenSlots=function(e,t){t=y(t,1);let n=y(zo.requestsByServer[e],zo.maximumRequestsPerServer);return rp[e]+t<=n};zo.heapHasOpenSlots=function(e){return za.length+e<=RT};function Sq(e){return e.state===Qn.UNISSUED&&(e.state=Qn.ISSUED,e.deferred=hl()),e.deferred.promise}function d1e(e){return function(t){if(e.state===Qn.CANCELLED)return;let n=e.deferred;--Ji.numberOfActiveRequests,--rp[e.serverKey],wM.raiseEvent(),e.state=Qn.RECEIVED,e.deferred=void 0,n.resolve(t)}}function u1e(e){return function(t){e.state!==Qn.CANCELLED&&(++Ji.numberOfFailedRequests,--Ji.numberOfActiveRequests,--rp[e.serverKey],wM.raiseEvent(t),e.state=Qn.FAILED,e.deferred.reject(t))}}function Tq(e){let t=Sq(e);return e.state=Qn.ACTIVE,Mh.push(e),++Ji.numberOfActiveRequests,++Ji.numberOfActiveRequestsEver,++rp[e.serverKey],e.requestFunction().then(d1e(e)).catch(u1e(e)),t}function Hy(e){let t=e.state===Qn.ACTIVE;if(e.state=Qn.CANCELLED,++Ji.numberOfCancelledRequests,l(e.deferred)){let n=e.deferred;e.deferred=void 0,n.reject()}t&&(--Ji.numberOfActiveRequests,--rp[e.serverKey],++Ji.numberOfCancelledActiveRequests),l(e.cancelFunction)&&e.cancelFunction()}zo.update=function(){let e,t,n=0,i=Mh.length;for(e=0;e0&&(Mh[e-n]=t)}Mh.length-=n;let o=za.internalArray,r=za.length;for(e=0;e0;){if(t=za.pop(),t.cancelled){Hy(t);continue}if(t.throttleByServer&&!zo.serverHasOpenSlots(t.serverKey)){Hy(t);continue}Tq(t),++a}m1e()};zo.getServerKey=function(e){let t=new vM.default(e);t.scheme()===""&&(t=t.absoluteTo(l1e),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=rp[n];return l(i)||(rp[n]=0),n};zo.request=function(e){if(op(e.url)||Yy(e.url))return wM.raiseEvent(),e.state=Qn.RECEIVED,e.requestFunction();if(++Ji.numberOfAttemptedRequests,l(e.serverKey)||(e.serverKey=zo.getServerKey(e.url)),zo.throttleRequests&&e.throttleByServer&&!zo.serverHasOpenSlots(e.serverKey))return;if(!zo.throttleRequests||!e.throttle)return Tq(e);if(Mh.length>=zo.maximumRequests)return;_q(e);let t=za.insert(e);if(l(t)){if(t===e)return;Hy(t)}return Sq(e)};function m1e(){zo.debugShowStatistics&&(Ji.numberOfActiveRequests===0&&Ji.lastNumberOfActiveRequests>0&&(Ji.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${Ji.numberOfAttemptedRequests}`),Ji.numberOfAttemptedRequests=0),Ji.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${Ji.numberOfCancelledRequests}`),Ji.numberOfCancelledRequests=0),Ji.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${Ji.numberOfCancelledActiveRequests}`),Ji.numberOfCancelledActiveRequests=0),Ji.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${Ji.numberOfFailedRequests}`),Ji.numberOfFailedRequests=0)),Ji.lastNumberOfActiveRequests=Ji.numberOfActiveRequests)}zo.clearForSpecs=function(){for(;za.length>0;){let t=za.pop();Hy(t)}let e=Mh.length;for(let t=0;t0}},credits:{get:function(){return this._credits}}});Zt.prototype.toString=function(){return this.getUrlComponent(!0,!0)};Zt.prototype.parseUrl=function(e,t,n,i){let o=new Zq.default(e),r=f1e(o.query());this._queryParameters=t?AM(r,this.queryParameters,n):r,o.search(""),o.fragment(""),l(i)&&o.scheme()===""&&(o=o.absoluteTo(wh(i))),this._url=o.toString()};function f1e(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:id(e)}function AM(e,t,n){if(!n)return xt(e,t);let i=Oe(e,!0);for(let o in t)if(t.hasOwnProperty(o)){let r=i[o],s=t[o];l(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(s)):i[o]=Array.isArray(s)?s.slice():s}return i}Zt.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=this._url;e&&(n=`${n}${p1e(this.queryParameters)}`),n=n.replace(/%7B/g,"{").replace(/%7D/g,"}");let i=this._templateValues;return Object.keys(i).length>0&&(n=n.replace(/{(.*?)}/g,function(o,r){let s=i[r];return l(s)?encodeURIComponent(s):o})),t&&l(this.proxy)&&(n=this.proxy.getURL(n)),n};function p1e(e){let t=Object.keys(e);return t.length===0?"":t.length===1&&!l(e[t[0]])?`?${t[0]}`:`?${zy(e)}`}Zt.prototype.setQueryParameters=function(e,t){t?this._queryParameters=AM(this._queryParameters,e,!1):this._queryParameters=AM(e,this._queryParameters,!1)};Zt.prototype.appendQueryParameters=function(e){this._queryParameters=AM(e,this._queryParameters,!0)};Zt.prototype.setTemplateValues=function(e,t){t?this._templateValues=xt(this._templateValues,e):this._templateValues=xt(e,this._templateValues)};Zt.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,l(e.url)){let n=y(e.preserveQueryParameters,!1);t.parseUrl(e.url,!0,n,this._url)}return l(e.queryParameters)&&(t._queryParameters=xt(e.queryParameters,t.queryParameters)),l(e.templateValues)&&(t._templateValues=xt(e.templateValues,t.templateValues)),l(e.headers)&&(t.headers=xt(e.headers,t.headers)),l(e.proxy)&&(t.proxy=e.proxy),l(e.request)&&(t.request=e.request),l(e.retryCallback)&&(t.retryCallback=e.retryCallback),l(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t};Zt.prototype.retryOnError=function(e){let t=this.retryCallback;if(typeof t!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let n=this;return Promise.resolve(t(this,e)).then(function(i){return++n._retryCount,i})};Zt.prototype.clone=function(e){return l(e)?(e._url=this._url,e._queryParameters=Oe(this._queryParameters),e._templateValues=Oe(this._templateValues),e.headers=Oe(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new Zt({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:l(this.credits)?this.credits.slice():void 0})};Zt.prototype.getBaseUri=function(e){return vZ(this.getUrlComponent(e),e)};Zt.prototype.appendForwardSlash=function(){this._url=PZ(this._url)};Zt.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};Zt.fetchArrayBuffer=function(e){return new Zt(e).fetchArrayBuffer()};Zt.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};Zt.fetchBlob=function(e){return new Zt(e).fetchBlob()};Zt.prototype.fetchImage=function(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.preferImageBitmap,!1),n=y(e.preferBlob,!1),i=y(e.flipY,!1),o=y(e.skipColorSpaceConversion,!1);if(XY(this.request),!Lq||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return IY({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:t});let r=this.fetchBlob();if(!l(r))return;let s,a,c,d;return Zt.supportsImageBitmapOptions().then(function(u){return s=u,a=s&&t,r}).then(function(u){if(!l(u))return;if(d=u,a)return Zt.createImageBitmapFromBlob(u,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});let m=window.URL.createObjectURL(u);return c=new Zt({url:m}),IY({resource:c,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(u){if(l(u))return u.blob=d,a||window.URL.revokeObjectURL(c.url),u}).catch(function(u){return l(c)&&window.URL.revokeObjectURL(c.url),u.blob=d,Promise.reject(u)})};function IY(e){let t=e.resource,n=e.flipY,i=e.skipColorSpaceConversion,o=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){let a=!1;!t.isDataUri&&!t.isBlobUri&&(a=t.isCrossOriginUrl);let c=hl();return Zt._Implementations.createImage(r,a,c,n,i,o),c.promise};let s=Ka.request(r);if(l(s))return s.catch(function(a){return r.state!==Qn.FAILED?Promise.reject(a):t.retryOnError(a).then(function(c){return c?(r.state=Qn.UNISSUED,r.deferred=void 0,IY({resource:t,flipY:n,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(a)})})}Zt.fetchImage=function(e){return new Zt(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};Zt.prototype.fetchText=function(){return this.fetch({responseType:"text"})};Zt.fetchText=function(e){return new Zt(e).fetchText()};Zt.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(l(e))return e.then(function(t){if(l(t))return JSON.parse(t)})};Zt.fetchJson=function(e){return new Zt(e).fetchJson()};Zt.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};Zt.fetchXML=function(e){return new Zt(e).fetchXML()};Zt.prototype.fetchJsonp=function(e){e=y(e,"callback"),XY(this.request);let t;do t=`loadJsonp${X.nextRandomNumber().toString().substring(2,8)}`;while(l(window[t]));return Rq(this,e,t)};function Rq(e,t,n){let i={};i[t]=n,e.setQueryParameters(i);let o=e.request,r=e.url;o.url=r,o.requestFunction=function(){let a=hl();return window[n]=function(c){a.resolve(c);try{delete window[n]}catch{window[n]=void 0}},Zt._Implementations.loadAndExecuteScript(r,n,a),a.promise};let s=Ka.request(o);if(l(s))return s.catch(function(a){return o.state!==Qn.FAILED?Promise.reject(a):e.retryOnError(a).then(function(c){return c?(o.state=Qn.UNISSUED,o.deferred=void 0,Rq(e,t,n)):Promise.reject(a)})})}Zt.fetchJsonp=function(e){return new Zt(e).fetchJsonp(e.callbackParameterName)};Zt.prototype._makeRequest=function(e){let t=this;XY(t.request);let n=t.request,i=t.url;n.url=i,n.requestFunction=function(){let r=e.responseType,s=xt(e.headers,t.headers),a=e.overrideMimeType,c=e.method,d=e.data,u=hl(),m=Zt._Implementations.loadWithXhr(i,r,c,d,s,u,a);return l(m)&&l(m.abort)&&(n.cancelFunction=function(){m.abort()}),u.promise};let o=Ka.request(n);if(l(o))return o.then(function(r){return n.cancelFunction=void 0,r}).catch(function(r){return n.cancelFunction=void 0,n.state!==Qn.FAILED?Promise.reject(r):t.retryOnError(r).then(function(s){return s?(n.state=Qn.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)})})};function XY(e){if(e.state===Qn.ISSUED||e.state===Qn.ACTIVE)throw new ue("The Resource is already being fetched.");e.state=Qn.UNISSUED,e.deferred=void 0}var b1e=/^data:(.*?)(;base64)?,(.*)$/;function FM(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function Vq(e,t){let n=FM(e,t),i=new ArrayBuffer(n.length),o=new Uint8Array(i);for(let r=0;r{if(!a.ok){let c={};a.headers.forEach((d,u)=>{c[u]=d}),r.reject(new Ah(a.status,a,c));return}switch(t){case"text":r.resolve(a.text());break;case"json":r.resolve(a.json());break;default:r.resolve(new Uint8Array(await a.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(new Ah)})}var x1e=typeof XMLHttpRequest>"u";Zt._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){let a=b1e.exec(e);if(a!==null){r.resolve(g1e(a,t));return}if(x1e){y1e(e,t,n,i,o,r,s);return}let c=new XMLHttpRequest;if(ET.contains(e)&&(c.withCredentials=!0),c.open(n,e,!0),l(s)&&l(c.overrideMimeType)&&c.overrideMimeType(s),l(o))for(let u in o)o.hasOwnProperty(u)&&c.setRequestHeader(u,o[u]);l(t)&&(c.responseType=t);let d=!1;return typeof e=="string"&&(d=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),c.onload=function(){if((c.status<200||c.status>=300)&&!(d&&c.status===0)){r.reject(new Ah(c.status,c.response,c.getAllResponseHeaders()));return}let u=c.response,m=c.responseType;if(n==="HEAD"||n==="OPTIONS"){let g=c.getAllResponseHeaders().trim().split(/[\r\n]+/),f={};g.forEach(function(x){let _=x.split(": "),C=_.shift();f[C]=_.join(": ")}),r.resolve(f);return}if(c.status===204)r.resolve(void 0);else if(l(u)&&(!l(t)||m===t))r.resolve(u);else if(t==="json"&&typeof u=="string")try{r.resolve(JSON.parse(u))}catch(p){r.reject(p)}else(m===""||m==="document")&&l(c.responseXML)&&c.responseXML.hasChildNodes()?r.resolve(c.responseXML):(m===""||m==="text")&&l(c.responseText)?r.resolve(c.responseText):r.reject(new ue("Invalid XMLHttpRequest response type."))},c.onerror=function(u){r.reject(new Ah)},c.send(i),c};Zt._Implementations.loadAndExecuteScript=function(e,t,n){return Oy(e,t).catch(function(i){n.reject(i)})};Zt._DefaultImplementations={};Zt._DefaultImplementations.createImage=Zt._Implementations.createImage;Zt._DefaultImplementations.loadWithXhr=Zt._Implementations.loadWithXhr;Zt._DefaultImplementations.loadAndExecuteScript=Zt._Implementations.loadAndExecuteScript;Zt.DEFAULT=Object.freeze(new Zt({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var Ee=Zt;function UZ(e){e=y(e,y.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._addNewLeapSeconds=y(e.addNewLeapSeconds,!0),l(e.data)?Gq(this,e.data):Gq(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}UZ.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n=Ee.createIfNeeded(e),i;try{i=await n.fetchJson()}catch{throw new ue(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new UZ({addNewLeapSeconds:t.addNewLeapSeconds,data:i})};UZ.NONE=Object.freeze({compute:function(e,t){return l(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new g0(0,0,0,0,0),t}});UZ.prototype.compute=function(e,t){if(!l(this._samples))return;if(l(t)||(t=new g0(0,0,0,0,0)),this._samples.length===0)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let n=this._dates,i=this._lastIndex,o=0,r=0;if(l(i)){let a=n[i],c=n[i+1],d=ne.lessThanOrEquals(a,e),u=!l(c),m=u||ne.greaterThanOrEquals(c,e);if(d&&m)return o=i,!u&&c.equals(e)&&++o,r=o+1,Wq(this,n,this._samples,e,o,r,t),t}let s=Lo(n,e,ne.compare,this._dateColumn);return s>=0?(st.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;let c=t[o],d=t[r];if(c.equals(d)||i.equals(c))return Eq(e,n,o,a,s),s;if(i.equals(d))return Eq(e,n,r,a,s),s;let u=ne.secondsDifference(i,c)/ne.secondsDifference(d,c),m=o*a,p=r*a,g=n[m+e._ut1MinusUtcSecondsColumn],f=n[p+e._ut1MinusUtcSecondsColumn],x=f-g;if(x>.5||x<-.5){let _=n[m+e._taiMinusUtcSecondsColumn],C=n[p+e._taiMinusUtcSecondsColumn];_!==C&&(d.equals(i)?g=f:f-=C-_)}return s.xPoleWander=NZ(u,n[m+e._xPoleWanderRadiansColumn],n[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=NZ(u,n[m+e._yPoleWanderRadiansColumn],n[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=NZ(u,n[m+e._xCelestialPoleOffsetRadiansColumn],n[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=NZ(u,n[m+e._yCelestialPoleOffsetRadiansColumn],n[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=NZ(u,g,f),s}var kZ=UZ;var MZt=S(T(),1);function Ha(e,t,n){this.heading=y(e,0),this.pitch=y(t,0),this.roll=y(n,0)}Ha.fromQuaternion=function(e,t){l(t)||(t=new Ha);let n=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),o=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),s=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(s,r),t.roll=Math.atan2(o,i),t.pitch=-X.asinClamped(n),t};Ha.fromDegrees=function(e,t,n,i){return l(i)||(i=new Ha),i.heading=e*X.RADIANS_PER_DEGREE,i.pitch=t*X.RADIANS_PER_DEGREE,i.roll=n*X.RADIANS_PER_DEGREE,i};Ha.clone=function(e,t){if(l(e))return l(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new Ha(e.heading,e.pitch,e.roll)};Ha.equals=function(e,t){return e===t||l(e)&&l(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};Ha.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&X.equalsEpsilon(e.heading,t.heading,n,i)&&X.equalsEpsilon(e.pitch,t.pitch,n,i)&&X.equalsEpsilon(e.roll,t.roll,n,i)};Ha.prototype.clone=function(e){return Ha.clone(this,e)};Ha.prototype.equals=function(e){return Ha.equals(this,e)};Ha.prototype.equalsEpsilon=function(e,t,n){return Ha.equalsEpsilon(this,e,t,n)};Ha.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var Ja=Ha;var tLt=S(T(),1);var BZt=S(T(),1);var Iq={};var Xq=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function S1e(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t"u"?e:(l(MM)||(MM=document.createElement("a")),MM.href=e,MM.href)}var Jy;function vq(){if(l(Jy))return Jy;let e;return typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:l(Iq?.url)?e=wh(".",Iq.url):typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(_M.toUrl)?e=wh("..",Qy("Core/buildModuleUrl.js")):e=S1e(),Jy=new Ee({url:Pq(e)}),Jy.appendForwardSlash(),Jy}function T1e(e){return Pq(_M.toUrl(`../${e}`))}function wq(e){return vq().getDerivedResource({url:e}).url}var NM;function Qy(e){return l(NM)||(typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(_M.toUrl)?NM=T1e:NM=wq),NM(e)}Qy._cesiumScriptRegex=Xq;Qy._buildModuleUrlFromBaseUrl=wq;Qy._clearBaseResource=function(){Jy=void 0};Qy.setBaseUrl=function(e){Jy=Ee.DEFAULT.getDerivedResource({url:e})};Qy.getCesiumBaseUrl=vq;var tn=Qy;var zZt=S(T(),1);function C1e(e,t,n){this.x=e,this.y=t,this.s=n}var jy=C1e;function wY(e){e=y(e,y.EMPTY_OBJECT),this._xysFileUrlTemplate=Ee.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=y(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=y(e.sampleZeroJulianEphemerisDate,24423965e-1),this._sampleZeroDateTT=new ne(this._sampleZeroJulianEphemerisDate,0,zn.TAI),this._stepSizeDays=y(e.stepSizeDays,1),this._samplesPerXysFile=y(e.samplesPerXysFile,1e3),this._totalSamples=y(e.totalSamples,27426),this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,n=this._denominators=new Array(t+1),i=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t);for(let r=0;r<=t;++r){n[r]=o,i[r]=r*this._stepSizeDays;for(let s=0;s<=t;++s)s!==r&&(n[r]*=r-s);n[r]=1/n[r]}this._work=new Array(t+1),this._coef=new Array(t+1)}var V1e=new ne(0,0,zn.TAI);function PY(e,t,n){let i=V1e;return i.dayNumber=t,i.secondsOfDay=n,ne.daysDifference(i,e._sampleZeroDateTT)}wY.prototype.preload=function(e,t,n,i){let o=PY(this,e,t),r=PY(this,n,i),s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;a>=this._totalSamples&&(a=this._totalSamples-1);let c=s/this._samplesPerXysFile|0,d=a/this._samplesPerXysFile|0,u=[];for(let m=c;m<=d;++m)u.push(vY(this,m));return Promise.all(u)};wY.prototype.computeXysRadians=function(e,t,n){let i=PY(this,e,t);if(i<0)return;let o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;let r=this._interpolationOrder,s=o-(r/2|0);s<0&&(s=0);let a=s+r;a>=this._totalSamples&&(a=this._totalSamples-1,s=a-r,s<0&&(s=0));let c=!1,d=this._samples;if(l(d[s*3])||(vY(this,s/this._samplesPerXysFile|0),c=!0),l(d[a*3])||(vY(this,a/this._samplesPerXysFile|0),c=!0),c)return;l(n)?(n.x=0,n.y=0,n.s=0):n=new jy(0,0,0);let u=i-s*this._stepSizeDays,m=this._work,p=this._denominators,g=this._coef,f=this._xTable,x,_;for(x=0;x<=r;++x)m[x]=u-f[x];for(x=0;x<=r;++x){for(g[x]=1,_=0;_<=r;++_)_!==x&&(g[x]*=m[_]);g[x]*=p[x];let C=(s+x)*3;n.x+=g[x]*d[C++],n.y+=g[x]*d[C++],n.s+=g[x]*d[C]}return n};function vY(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let n,i=e._xysFileUrlTemplate;l(i)?n=i.getDerivedResource({templateValues:{0:t}}):n=new Ee({url:tn(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=n.fetchJson().then(function(r){e._chunkDownloadsInProgress[t]=!1;let s=e._samples,a=r.samples,c=t*e._samplesPerXysFile*3;for(let d=0,u=a.length;di&&(o=d,i=u)}let r=1,s=0,a=AY[o],c=MY[o];if(Math.abs(e[rt.getElementIndex(c,a)])>n){let d=e[rt.getElementIndex(c,c)],u=e[rt.getElementIndex(a,a)],m=e[rt.getElementIndex(c,a)],p=(d-u)/2/m,g;p<0?g=-1/(-p+Math.sqrt(1+p*p)):g=1/(p+Math.sqrt(1+p*p)),r=1/Math.sqrt(1+g*g),s=g*r}return t=rt.clone(rt.IDENTITY,t),t[rt.getElementIndex(a,a)]=t[rt.getElementIndex(c,c)]=r,t[rt.getElementIndex(c,a)]=s,t[rt.getElementIndex(a,c)]=-s,t}var UM=new rt,Aq=new rt;rt.computeEigenDecomposition=function(e,t){let n=X.EPSILON20,i=10,o=0,r=0;l(t)||(t={});let s=t.unitary=rt.clone(rt.IDENTITY,t.unitary),a=t.diagonal=rt.clone(e,t.diagonal),c=n*E1e(a);for(;rc;)I1e(a,UM),rt.transpose(UM,Aq),rt.multiply(a,UM,a),rt.multiply(Aq,a,a),rt.multiply(s,UM,s),++o>2&&(++r,o=0);return t};rt.abs=function(e,t){return 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};rt.determinant=function(e){let t=e[0],n=e[3],i=e[6],o=e[1],r=e[4],s=e[7],a=e[2],c=e[5],d=e[8];return t*(r*d-c*s)+o*(c*i-n*d)+a*(n*s-r*i)};rt.inverse=function(e,t){let n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],c=e[6],d=e[7],u=e[8],m=rt.determinant(e);t[0]=s*u-d*a,t[1]=d*o-i*u,t[2]=i*a-s*o,t[3]=c*a-r*u,t[4]=n*u-c*o,t[5]=r*o-n*a,t[6]=r*d-c*s,t[7]=c*i-n*d,t[8]=n*s-r*i;let p=1/m;return rt.multiplyByScalar(t,p,t)};var X1e=new rt;rt.inverseTranspose=function(e,t){return rt.inverse(rt.transpose(e,X1e),t)};rt.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]};rt.equalsEpsilon=function(e,t,n){return n=y(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};rt.IDENTITY=Object.freeze(new rt(1,0,0,0,1,0,0,0,1));rt.ZERO=Object.freeze(new rt(0,0,0,0,0,0,0,0,0));rt.COLUMN0ROW0=0;rt.COLUMN0ROW1=1;rt.COLUMN0ROW2=2;rt.COLUMN1ROW0=3;rt.COLUMN1ROW1=4;rt.COLUMN1ROW2=5;rt.COLUMN2ROW0=6;rt.COLUMN2ROW1=7;rt.COLUMN2ROW2=8;Object.defineProperties(rt.prototype,{length:{get:function(){return rt.packedLength}}});rt.prototype.clone=function(e){return rt.clone(this,e)};rt.prototype.equals=function(e){return rt.equals(this,e)};rt.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]};rt.prototype.equalsEpsilon=function(e,t){return rt.equalsEpsilon(this,e,t)};rt.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]}) (${this[1]}, ${this[4]}, ${this[7]}) -(${this[2]}, ${this[5]}, ${this[8]})`};var $=rt;var SRt=T(S(),1);function nt(e,t,n,i,o,r,s,a,c,d,u,m,p,g,f,x){this[0]=y(e,0),this[1]=y(o,0),this[2]=y(c,0),this[3]=y(p,0),this[4]=y(t,0),this[5]=y(r,0),this[6]=y(d,0),this[7]=y(g,0),this[8]=y(n,0),this[9]=y(s,0),this[10]=y(u,0),this[11]=y(f,0),this[12]=y(i,0),this[13]=y(a,0),this[14]=y(m,0),this[15]=y(x,0)}nt.packedLength=16;nt.pack=function(e,t,n){return n=y(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[n++]=e[9],t[n++]=e[10],t[n++]=e[11],t[n++]=e[12],t[n++]=e[13],t[n++]=e[14],t[n]=e[15],t};nt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new nt),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[9]=e[t++],n[10]=e[t++],n[11]=e[t++],n[12]=e[t++],n[13]=e[t++],n[14]=e[t++],n[15]=e[t],n};nt.packArray=function(e,t){let n=e.length,i=n*16;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o{let t=new Image;t.onload=function(){Wc._result=t.width>0&&t.height>0,e(Wc._result)},t.onerror=function(){Wc._result=!1,e(Wc._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),Wc._promise};Object.defineProperties(Wc,{initialized:{get:function(){return l(Wc._result)}}});var vS=[];typeof ArrayBuffer<"u"&&(vS.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&vS.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&vS.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&vS.push(BigInt64Array),typeof BigUint64Array<"u"&&vS.push(BigUint64Array));var nu={isChrome:YB,chromeVersion:U1e,isSafari:Dq,safariVersion:D1e,isWebkit:Bq,webkitVersion:B1e,isInternetExplorer:Yq,internetExplorerVersion:Y1e,isEdge:HM,edgeVersion:O1e,isFirefox:zM,firefoxVersion:K1e,isWindows:H1e,isIPadOrIOS:z1e,hardwareConcurrency:y(Ja.hardwareConcurrency,3),supportsPointerEvents:J1e,supportsImageRenderingPixelated:zq,supportsWebP:Wc,imageRenderingValue:Q1e,typedArrayTypes:vS};nu.supportsBasis=function(e){return nu.supportsWebAssembly()&&e.context.supportsBasis};nu.supportsFullscreen=function(){return ur.supportsFullscreen()};nu.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};nu.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};nu.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};nu.supportsBigInt=function(){return typeof BigInt<"u"};nu.supportsWebWorkers=function(){return typeof Worker<"u"};nu.supportsWebAssembly=function(){return typeof WebAssembly<"u"};nu.supportsWebgl2=function(e){return e.context.webgl2};nu.supportsEsmWebWorkers=function(){return!zM()||parseInt(OB)>=114};var Yt=nu;function st(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.z=y(n,0),this.w=y(i,0)}var OL=new h;st.fromAxisAngle=function(e,t,n){let i=t/2,o=Math.sin(i);OL=h.normalize(e,OL);let r=OL.x*o,s=OL.y*o,a=OL.z*o,c=Math.cos(i);return l(n)?(n.x=r,n.y=s,n.z=a,n.w=c,n):new st(r,s,a,c)};var j1e=[1,2,0],q1e=new Array(3);st.fromRotationMatrix=function(e,t){let n,i,o,r,s,a=e[$.COLUMN0ROW0],c=e[$.COLUMN1ROW1],d=e[$.COLUMN2ROW2],u=a+c+d;if(u>0)n=Math.sqrt(u+1),s=.5*n,n=.5/n,i=(e[$.COLUMN1ROW2]-e[$.COLUMN2ROW1])*n,o=(e[$.COLUMN2ROW0]-e[$.COLUMN0ROW2])*n,r=(e[$.COLUMN0ROW1]-e[$.COLUMN1ROW0])*n;else{let m=j1e,p=0;c>a&&(p=1),d>a&&d>c&&(p=2);let g=m[p],f=m[g];n=Math.sqrt(e[$.getElementIndex(p,p)]-e[$.getElementIndex(g,g)]-e[$.getElementIndex(f,f)]+1);let x=q1e;x[p]=.5*n,n=.5/n,s=(e[$.getElementIndex(f,g)]-e[$.getElementIndex(g,f)])*n,x[g]=(e[$.getElementIndex(g,p)]+e[$.getElementIndex(p,g)])*n,x[f]=(e[$.getElementIndex(f,p)]+e[$.getElementIndex(p,f)])*n,i=-x[0],o=-x[1],r=-x[2]}return l(t)?(t.x=i,t.y=o,t.z=r,t.w=s,t):new st(i,o,r,s)};var Kq=new st,Jq=new st,HB=new st,Qq=new st;st.fromHeadingPitchRoll=function(e,t){return Qq=st.fromAxisAngle(h.UNIT_X,e.roll,Kq),HB=st.fromAxisAngle(h.UNIT_Y,-e.pitch,t),t=st.multiply(HB,Qq,HB),Jq=st.fromAxisAngle(h.UNIT_Z,-e.heading,Kq),st.multiply(Jq,t,t)};var KM=new h,zB=new h,hm=new st,jq=new st,JM=new st;st.packedLength=4;st.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};st.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new st),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};st.packedInterpolationLength=3;st.convertPackedArrayForInterpolation=function(e,t,n,i){st.unpack(e,n*4,JM),st.conjugate(JM,JM);for(let o=0,r=n-t+1;o=0?r=1:(r=-1,o=-o);let s=o-1,a=1-n,c=n*n,d=a*a;for(let g=7;g>=0;--g)ap[g]=(QM[g]*c-jM[g])*s,cp[g]=(QM[g]*d-jM[g])*s;let u=r*n*(1+ap[0]*(1+ap[1]*(1+ap[2]*(1+ap[3]*(1+ap[4]*(1+ap[5]*(1+ap[6]*(1+ap[7])))))))),m=a*(1+cp[0]*(1+cp[1]*(1+cp[2]*(1+cp[3]*(1+cp[4]*(1+cp[5]*(1+cp[6]*(1+cp[7])))))))),p=st.multiplyByScalar(e,m,tVe);return st.multiplyByScalar(t,u,i),st.add(p,i,i)};st.fastSquad=function(e,t,n,i,o,r){let s=st.fastSlerp(e,t,o,HL),a=st.fastSlerp(n,i,o,wS);return st.fastSlerp(s,a,2*o*(1-o),r)};st.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};st.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n};st.ZERO=Object.freeze(new st(0,0,0,0));st.IDENTITY=Object.freeze(new st(0,0,0,1));st.prototype.clone=function(e){return st.clone(this,e)};st.prototype.equals=function(e){return st.equals(this,e)};st.prototype.equalsEpsilon=function(e,t){return st.equalsEpsilon(this,e,t)};st.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var we=st;var Oi={},jB={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},FS={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},qB={},bl={east:new h,north:new h,up:new h,west:new h,south:new h,down:new h},Sb=new h,Cb=new h,Vb=new h;Oi.localFrameToFixedFrameGenerator=function(e,t){if(!jB.hasOwnProperty(e)||!jB[e].hasOwnProperty(t))throw new fe("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=jB[e][t],i,o=e+t;return l(qB[o])?i=qB[o]:(i=function(r,s,a){if(l(a)||(a=new M),h.equalsEpsilon(r,h.ZERO,W.EPSILON14))h.unpack(FS[e],0,Sb),h.unpack(FS[t],0,Cb),h.unpack(FS[n],0,Vb);else if(W.equalsEpsilon(r.x,0,W.EPSILON14)&&W.equalsEpsilon(r.y,0,W.EPSILON14)){let c=W.sign(r.z);h.unpack(FS[e],0,Sb),e!=="east"&&e!=="west"&&h.multiplyByScalar(Sb,c,Sb),h.unpack(FS[t],0,Cb),t!=="east"&&t!=="west"&&h.multiplyByScalar(Cb,c,Cb),h.unpack(FS[n],0,Vb),n!=="east"&&n!=="west"&&h.multiplyByScalar(Vb,c,Vb)}else{s=y(s,ie.WGS84),s.geodeticSurfaceNormal(r,bl.up);let c=bl.up,d=bl.east;d.x=-r.y,d.y=r.x,d.z=0,h.normalize(d,bl.east),h.cross(c,d,bl.north),h.multiplyByScalar(bl.up,-1,bl.down),h.multiplyByScalar(bl.east,-1,bl.west),h.multiplyByScalar(bl.north,-1,bl.south),Sb=bl[e],Cb=bl[t],Vb=bl[n]}return a[0]=Sb.x,a[1]=Sb.y,a[2]=Sb.z,a[3]=0,a[4]=Cb.x,a[5]=Cb.y,a[6]=Cb.z,a[7]=0,a[8]=Vb.x,a[9]=Vb.y,a[10]=Vb.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},qB[o]=i),i};Oi.eastNorthUpToFixedFrame=Oi.localFrameToFixedFrameGenerator("east","north");Oi.northEastDownToFixedFrame=Oi.localFrameToFixedFrameGenerator("north","east");Oi.northUpEastToFixedFrame=Oi.localFrameToFixedFrameGenerator("north","up");Oi.northWestUpToFixedFrame=Oi.localFrameToFixedFrameGenerator("north","west");var nVe=new we,iVe=new h(1,1,1),oVe=new M;Oi.headingPitchRollToFixedFrame=function(e,t,n,i,o){i=y(i,Oi.eastNorthUpToFixedFrame);let r=we.fromHeadingPitchRoll(t,nVe),s=M.fromTranslationQuaternionRotationScale(h.ZERO,r,iVe,oVe);return o=i(e,n,o),M.multiply(o,s,o)};var rVe=new M,sVe=new $;Oi.headingPitchRollQuaternion=function(e,t,n,i,o){let r=Oi.headingPitchRollToFixedFrame(e,t,n,i,rVe),s=M.getMatrix3(r,sVe);return we.fromRotationMatrix(s,o)};var aVe=new h(1,1,1),cVe=new h,e$=new M,lVe=new M,dVe=new $,uVe=new we;Oi.fixedFrameToHeadingPitchRoll=function(e,t,n,i){t=y(t,ie.WGS84),n=y(n,Oi.eastNorthUpToFixedFrame),l(i)||(i=new Ka);let o=M.getTranslation(e,cVe);if(h.equals(o,h.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=M.inverseTransformation(n(o,t,e$),e$),s=M.setScale(e,aVe,lVe);s=M.setTranslation(s,h.ZERO,s),r=M.multiply(r,s,r);let a=we.fromRotationMatrix(M.getMatrix3(r,dVe),uVe);return a=we.normalize(a,a),Ka.fromQuaternion(a,i)};var mVe=6*3600+41*60+50.54841,hVe=8640184812866e-6,fVe=.093104,pVe=-62e-7,bVe=11772758384668e-32,gVe=72921158553e-15,yVe=W.TWO_PI/86400,qM=new te;Oi.computeTemeToPseudoFixedMatrix=function(e,t){qM=te.addSeconds(e,-te.computeTaiMinusUtc(e),qM);let n=qM.dayNumber,i=qM.secondsOfDay,o,r=n-2451545;i>=43200?o=(r+.5)/zn.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/zn.DAYS_PER_JULIAN_CENTURY;let a=(mVe+o*(hVe+o*(fVe+o*pVe)))*yVe%W.TWO_PI,c=gVe+bVe*(n-24515455e-1),d=(i+zn.SECONDS_PER_DAY*.5)%zn.SECONDS_PER_DAY,u=a+c*d,m=Math.cos(u),p=Math.sin(u);return l(t)?(t[0]=m,t[1]=-p,t[2]=0,t[3]=p,t[4]=m,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new $(m,p,0,-p,m,0,0,0,1)};Oi.iau2006XysData=new DL;Oi.earthOrientationParameters=UL.NONE;var tY=32.184,xVe=2451545;Oi.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+tY,i=e.stop.dayNumber,o=e.stop.secondsOfDay+tY;return Oi.iau2006XysData.preload(t,n,i,o)};Oi.computeIcrfToFixedMatrix=function(e,t){l(t)||(t=new $);let n=Oi.computeFixedToIcrfMatrix(e,t);if(l(n))return $.transpose(n,t)};var _Ve=new qy(0,0,0),TVe=new yb(0,0,0,0,0,0),$B=new $,eY=new $;Oi.computeFixedToIcrfMatrix=function(e,t){l(t)||(t=new $);let n=Oi.earthOrientationParameters.compute(e,TVe);if(!l(n))return;let i=e.dayNumber,o=e.secondsOfDay+tY,r=Oi.iau2006XysData.computeXysRadians(i,o,_Ve);if(!l(r))return;let s=r.x+n.xPoleOffset,a=r.y+n.yPoleOffset,c=1/(1+Math.sqrt(1-s*s-a*a)),d=$B;d[0]=1-c*s*s,d[3]=-c*s*a,d[6]=s,d[1]=-c*s*a,d[4]=1-c*a*a,d[7]=a,d[2]=-s,d[5]=-a,d[8]=1-c*(s*s+a*a);let u=$.fromRotationZ(-r.s,eY),m=$.multiply(d,u,$B),p=e.dayNumber,g=e.secondsOfDay-te.computeTaiMinusUtc(e)+n.ut1MinusUtc,f=p-2451545,x=g/zn.SECONDS_PER_DAY,_=.779057273264+x+.00273781191135448*(f+x);_=_%1*W.TWO_PI;let C=$.fromRotationZ(_,eY),V=$.multiply(m,C,$B),L=Math.cos(n.xPoleWander),Z=Math.cos(n.yPoleWander),G=Math.sin(n.xPoleWander),X=Math.sin(n.yPoleWander),v=i-xVe+o/zn.SECONDS_PER_DAY;v/=36525;let P=-47e-6*v*W.RADIANS_PER_DEGREE/3600,F=Math.cos(P),A=Math.sin(P),b=eY;return b[0]=L*F,b[1]=L*A,b[2]=G,b[3]=-Z*A+X*G*F,b[4]=Z*F+X*G*A,b[5]=-X*L,b[6]=-X*A-Z*G*F,b[7]=X*F-Z*G*A,b[8]=Z*L,$.multiply(V,b,t)};var SVe=new se;Oi.pointToWindowCoordinates=function(e,t,n,i){return i=Oi.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};Oi.pointToGLWindowCoordinates=function(e,t,n,i){l(i)||(i=new D);let o=SVe;return M.multiplyByVector(e,se.fromElements(n.x,n.y,n.z,1,o),o),se.multiplyByScalar(o,1/o.w,o),M.multiplyByVector(t,o,o),D.fromCartesian4(o,i)};var CVe=new h,VVe=new h,LVe=new h;Oi.rotationMatrixFromPositionVelocity=function(e,t,n,i){let o=y(n,ie.WGS84).geodeticSurfaceNormal(e,CVe),r=h.cross(t,o,VVe);h.equalsEpsilon(r,h.ZERO,W.EPSILON6)&&(r=h.clone(h.UNIT_X,r));let s=h.cross(r,t,LVe);return h.normalize(s,s),h.cross(t,s,r),h.negate(r,r),h.normalize(r,r),l(i)||(i=new $),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=s.x,i[7]=s.y,i[8]=s.z,i};var t$=new M(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),n$=new he,nY=new h,RVe=new h,ZVe=new $,iY=new M,i$=new M;Oi.basisTo2D=function(e,t,n){let i=M.getTranslation(t,RVe),o=e.ellipsoid,r;if(h.equals(i,h.ZERO))r=h.clone(h.ZERO,nY);else{let u=o.cartesianToCartographic(i,n$);r=e.project(u,nY),h.fromElements(r.z,r.x,r.y,r)}let s=Oi.eastNorthUpToFixedFrame(i,o,iY),a=M.inverseTransformation(s,i$),c=M.getMatrix3(t,ZVe),d=M.multiplyByMatrix3(a,c,n);return M.multiply(t$,d,n),M.setTranslation(n,r,n),n};Oi.wgs84To2DModelMatrix=function(e,t,n){let i=e.ellipsoid,o=Oi.eastNorthUpToFixedFrame(t,i,iY),r=M.inverseTransformation(o,i$),s=i.cartesianToCartographic(t,n$),a=e.project(s,nY);h.fromElements(a.z,a.x,a.y,a);let c=M.fromTranslation(a,iY);return M.multiply(t$,r,n),M.multiply(c,n,n),n};var Gt=Oi;function Xn(e,t,n,i){this.west=y(e,0),this.south=y(t,0),this.east=y(n,0),this.north=y(i,0)}Object.defineProperties(Xn.prototype,{width:{get:function(){return Xn.computeWidth(this)}},height:{get:function(){return Xn.computeHeight(this)}}});Xn.packedLength=4;Xn.pack=function(e,t,n){return n=y(n,0),t[n++]=e.west,t[n++]=e.south,t[n++]=e.east,t[n]=e.north,t};Xn.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Xn),n.west=e[t++],n.south=e[t++],n.east=e[t++],n.north=e[t],n};Xn.computeWidth=function(e){let t=e.east,n=e.west;return t=0?u.longitude:u.longitude+W.TWO_PI;o=Math.min(o,m),r=Math.max(r,m)}return i-n>r-o&&(n=o,i=r,i>W.PI&&(i=i-W.TWO_PI),n>W.PI&&(n=n-W.TWO_PI)),l(t)?(t.west=n,t.south=s,t.east=i,t.north=a,t):new Xn(n,s,i,a)};Xn.fromCartesianArray=function(e,t,n){t=y(t,ie.WGS84);let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let d=0,u=e.length;d=0?m.longitude:m.longitude+W.TWO_PI;r=Math.min(r,p),s=Math.max(s,p)}return o-i>s-r&&(i=r,o=s,o>W.PI&&(o=o-W.TWO_PI),i>W.PI&&(i=i-W.TWO_PI)),l(n)?(n.west=i,n.south=a,n.east=o,n.north=c,n):new Xn(i,a,o,c)};var GVe=new h,EVe=new h,XVe=new h,IVe=new h,WVe=new h,oY=new Array(5);for(let e=0;e0?i+=W.TWO_PI:r0&&(r+=W.TWO_PI),i=u))return l(n)?(n.west=a,n.south=d,n.east=c,n.north=u,n):new Xn(a,d,c,u)};Xn.simpleIntersection=function(e,t,n){let i=Math.max(e.west,t.west),o=Math.max(e.south,t.south),r=Math.min(e.east,t.east),s=Math.min(e.north,t.north);if(!(o>=s||i>=r))return l(n)?(n.west=i,n.south=o,n.east=r,n.north=s,n):new Xn(i,o,r,s)};Xn.union=function(e,t,n){l(n)||(n=new Xn);let i=e.east,o=e.west,r=t.east,s=t.west;i0?i+=W.TWO_PI:r0&&(r+=W.TWO_PI),io||W.equalsEpsilon(n,o,W.EPSILON14))&&(n=e.south&&i<=e.north};var PVe=new he;Xn.subsample=function(e,t,n,i){t=y(t,ie.WGS84),n=y(n,0),l(i)||(i=[]);let o=0,r=e.north,s=e.south,a=e.east,c=e.west,d=PVe;d.height=n,d.longitude=c,d.latitude=r,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.longitude=a,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.latitude=s,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.longitude=c,i[o]=t.cartographicToCartesian(d,i[o]),o++,r<0?d.latitude=r:s>0?d.latitude=s:d.latitude=0;for(let u=1;u<8;++u)d.longitude=-Math.PI+u*W.PI_OVER_TWO,Xn.contains(e,d)&&(i[o]=t.cartographicToCartesian(d,i[o]),o++);return d.latitude===0&&(d.longitude=c,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.longitude=a,i[o]=t.cartographicToCartesian(d,i[o]),o++),i.length=o,i};Xn.subsection=function(e,t,n,i,o,r){if(l(r)||(r=new Xn),e.west<=e.east){let a=e.east-e.west;r.west=e.west+t*a,r.east=e.west+i*a}else{let a=W.TWO_PI+e.east-e.west;r.west=W.negativePiToPi(e.west+t*a),r.east=W.negativePiToPi(e.west+i*a)}let s=e.north-e.south;return r.south=e.south+n*s,r.north=e.south+o*s,t===1&&(r.west=e.east),i===1&&(r.east=e.east),n===1&&(r.south=e.north),o===1&&(r.north=e.north),r};Xn.MAX_VALUE=Object.freeze(new Xn(-Math.PI,-W.PI_OVER_TWO,Math.PI,W.PI_OVER_TWO));var ce=Xn;function Sr(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.width=y(n,0),this.height=y(i,0)}Sr.packedLength=4;Sr.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t};Sr.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Sr),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};Sr.fromPoints=function(e,t){if(l(t)||(t=new Sr),!l(e)||e.length===0)return t.x=0,t.y=0,t.width=0,t.height=0,t;let n=e.length,i=e[0].x,o=e[0].y,r=e[0].x,s=e[0].y;for(let a=1;an.width?n.width=i:i<0&&(n.width-=i,n.x=t.x),o>n.height?n.height=o:o<0&&(n.height-=o,n.y=t.y),n};Sr.intersect=function(e,t){let n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.widthr+t.height?Kt.OUTSIDE:Kt.INTERSECTING};Sr.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height};Sr.prototype.clone=function(e){return Sr.clone(this,e)};Sr.prototype.intersect=function(e){return Sr.intersect(this,e)};Sr.prototype.equals=function(e){return Sr.equals(this,e)};var He=Sr;var XZt=T(S(),1);function rY(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n*6<1?e+(t-e)*6*n:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function re(e,t,n,i){this.red=y(e,1),this.green=y(t,1),this.blue=y(n,1),this.alpha=y(i,1)}re.fromCartesian4=function(e,t){return l(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new re(e.x,e.y,e.z,e.w)};re.fromBytes=function(e,t,n,i,o){return e=re.byteToFloat(y(e,255)),t=re.byteToFloat(y(t,255)),n=re.byteToFloat(y(n,255)),i=re.byteToFloat(y(i,255)),l(o)?(o.red=e,o.green=t,o.blue=n,o.alpha=i,o):new re(e,t,n,i)};re.fromAlpha=function(e,t,n){return l(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=t,n):new re(e.red,e.green,e.blue,t)};var sY,aY,lp;Yt.supportsTypedArrays()&&(sY=new ArrayBuffer(4),aY=new Uint32Array(sY),lp=new Uint8Array(sY));re.fromRgba=function(e,t){return aY[0]=e,re.fromBytes(lp[0],lp[1],lp[2],lp[3],t)};re.fromHsl=function(e,t,n,i,o){e=y(e,0)%1,t=y(t,0),n=y(n,0),i=y(i,1);let r=n,s=n,a=n;if(t!==0){let c;n<.5?c=n*(1+t):c=n+t-n*t;let d=2*n-c;r=rY(d,c,e+1/3),s=rY(d,c,e),a=rY(d,c,e-1/3)}return l(o)?(o.red=r,o.green=s,o.blue=a,o.alpha=i,o):new re(r,s,a,i)};re.fromRandom=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.red;if(!l(n)){let s=y(e.minimumRed,0),a=y(e.maximumRed,1);n=s+W.nextRandomNumber()*(a-s)}let i=e.green;if(!l(i)){let s=y(e.minimumGreen,0),a=y(e.maximumGreen,1);i=s+W.nextRandomNumber()*(a-s)}let o=e.blue;if(!l(o)){let s=y(e.minimumBlue,0),a=y(e.maximumBlue,1);o=s+W.nextRandomNumber()*(a-s)}let r=e.alpha;if(!l(r)){let s=y(e.minimumAlpha,0),a=y(e.maximumAlpha,1);r=s+W.nextRandomNumber()*(a-s)}return l(t)?(t.red=n,t.green=i,t.blue=o,t.alpha=r,t):new re(n,i,o,r)};var AVe=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,MVe=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,NVe=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,kVe=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;re.fromCssColorString=function(e,t){l(t)||(t=new re),e=e.trim();let n=re[e.toUpperCase()];if(l(n))return re.clone(n,t),t;let i=AVe.exec(e);return i!==null?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(y(i[4],"f"),16)/15,t):(i=MVe.exec(e),i!==null?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(y(i[4],"ff"),16)/255,t):(i=NVe.exec(e),i!==null?(t.red=parseFloat(i[1])/(i[1].substr(-1)==="%"?100:255),t.green=parseFloat(i[2])/(i[2].substr(-1)==="%"?100:255),t.blue=parseFloat(i[3])/(i[3].substr(-1)==="%"?100:255),t.alpha=parseFloat(y(i[4],"1.0")),t):(i=kVe.exec(e),i!==null?re.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(y(i[4],"1.0")),t):(t=void 0,t))))};re.packedLength=4;re.pack=function(e,t,n){return n=y(n,0),t[n++]=e.red,t[n++]=e.green,t[n++]=e.blue,t[n]=e.alpha,t};re.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new re),n.red=e[t++],n.green=e[t++],n.blue=e[t++],n.alpha=e[t],n};re.byteToFloat=function(e){return e/255};re.floatToByte=function(e){return e===1?255:e*256|0};re.clone=function(e,t){if(l(e))return l(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new re(e.red,e.green,e.blue,e.alpha)};re.equals=function(e,t){return e===t||l(e)&&l(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha};re.equalsArray=function(e,t,n){return e.red===t[n]&&e.green===t[n+1]&&e.blue===t[n+2]&&e.alpha===t[n+3]};re.prototype.clone=function(e){return re.clone(this,e)};re.prototype.equals=function(e){return re.equals(this,e)};re.prototype.equalsEpsilon=function(e,t){return this===e||l(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t};re.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};re.prototype.toCssColorString=function(){let e=re.floatToByte(this.red),t=re.floatToByte(this.green),n=re.floatToByte(this.blue);return this.alpha===1?`rgb(${e},${t},${n})`:`rgba(${e},${t},${n},${this.alpha})`};re.prototype.toCssHexString=function(){let e=re.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=re.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let n=re.floatToByte(this.blue).toString(16);if(n.length<2&&(n=`0${n}`),this.alpha<1){let i=re.floatToByte(this.alpha).toString(16);return i.length<2&&(i=`0${i}`),`#${e}${t}${n}${i}`}return`#${e}${t}${n}`};re.prototype.toBytes=function(e){let t=re.floatToByte(this.red),n=re.floatToByte(this.green),i=re.floatToByte(this.blue),o=re.floatToByte(this.alpha);return l(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o,e):[t,n,i,o]};re.prototype.toRgba=function(){return lp[0]=re.floatToByte(this.red),lp[1]=re.floatToByte(this.green),lp[2]=re.floatToByte(this.blue),lp[3]=re.floatToByte(this.alpha),aY[0]};re.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t};re.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t};re.prototype.withAlpha=function(e,t){return re.fromAlpha(this,e,t)};re.add=function(e,t,n){return n.red=e.red+t.red,n.green=e.green+t.green,n.blue=e.blue+t.blue,n.alpha=e.alpha+t.alpha,n};re.subtract=function(e,t,n){return n.red=e.red-t.red,n.green=e.green-t.green,n.blue=e.blue-t.blue,n.alpha=e.alpha-t.alpha,n};re.multiply=function(e,t,n){return n.red=e.red*t.red,n.green=e.green*t.green,n.blue=e.blue*t.blue,n.alpha=e.alpha*t.alpha,n};re.divide=function(e,t,n){return n.red=e.red/t.red,n.green=e.green/t.green,n.blue=e.blue/t.blue,n.alpha=e.alpha/t.alpha,n};re.mod=function(e,t,n){return n.red=e.red%t.red,n.green=e.green%t.green,n.blue=e.blue%t.blue,n.alpha=e.alpha%t.alpha,n};re.lerp=function(e,t,n,i){return i.red=W.lerp(e.red,t.red,n),i.green=W.lerp(e.green,t.green,n),i.blue=W.lerp(e.blue,t.blue,n),i.alpha=W.lerp(e.alpha,t.alpha,n),i};re.multiplyByScalar=function(e,t,n){return n.red=e.red*t,n.green=e.green*t,n.blue=e.blue*t,n.alpha=e.alpha*t,n};re.divideByScalar=function(e,t,n){return n.red=e.red/t,n.green=e.green/t,n.blue=e.blue/t,n.alpha=e.alpha/t,n};re.ALICEBLUE=Object.freeze(re.fromCssColorString("#F0F8FF"));re.ANTIQUEWHITE=Object.freeze(re.fromCssColorString("#FAEBD7"));re.AQUA=Object.freeze(re.fromCssColorString("#00FFFF"));re.AQUAMARINE=Object.freeze(re.fromCssColorString("#7FFFD4"));re.AZURE=Object.freeze(re.fromCssColorString("#F0FFFF"));re.BEIGE=Object.freeze(re.fromCssColorString("#F5F5DC"));re.BISQUE=Object.freeze(re.fromCssColorString("#FFE4C4"));re.BLACK=Object.freeze(re.fromCssColorString("#000000"));re.BLANCHEDALMOND=Object.freeze(re.fromCssColorString("#FFEBCD"));re.BLUE=Object.freeze(re.fromCssColorString("#0000FF"));re.BLUEVIOLET=Object.freeze(re.fromCssColorString("#8A2BE2"));re.BROWN=Object.freeze(re.fromCssColorString("#A52A2A"));re.BURLYWOOD=Object.freeze(re.fromCssColorString("#DEB887"));re.CADETBLUE=Object.freeze(re.fromCssColorString("#5F9EA0"));re.CHARTREUSE=Object.freeze(re.fromCssColorString("#7FFF00"));re.CHOCOLATE=Object.freeze(re.fromCssColorString("#D2691E"));re.CORAL=Object.freeze(re.fromCssColorString("#FF7F50"));re.CORNFLOWERBLUE=Object.freeze(re.fromCssColorString("#6495ED"));re.CORNSILK=Object.freeze(re.fromCssColorString("#FFF8DC"));re.CRIMSON=Object.freeze(re.fromCssColorString("#DC143C"));re.CYAN=Object.freeze(re.fromCssColorString("#00FFFF"));re.DARKBLUE=Object.freeze(re.fromCssColorString("#00008B"));re.DARKCYAN=Object.freeze(re.fromCssColorString("#008B8B"));re.DARKGOLDENROD=Object.freeze(re.fromCssColorString("#B8860B"));re.DARKGRAY=Object.freeze(re.fromCssColorString("#A9A9A9"));re.DARKGREEN=Object.freeze(re.fromCssColorString("#006400"));re.DARKGREY=re.DARKGRAY;re.DARKKHAKI=Object.freeze(re.fromCssColorString("#BDB76B"));re.DARKMAGENTA=Object.freeze(re.fromCssColorString("#8B008B"));re.DARKOLIVEGREEN=Object.freeze(re.fromCssColorString("#556B2F"));re.DARKORANGE=Object.freeze(re.fromCssColorString("#FF8C00"));re.DARKORCHID=Object.freeze(re.fromCssColorString("#9932CC"));re.DARKRED=Object.freeze(re.fromCssColorString("#8B0000"));re.DARKSALMON=Object.freeze(re.fromCssColorString("#E9967A"));re.DARKSEAGREEN=Object.freeze(re.fromCssColorString("#8FBC8F"));re.DARKSLATEBLUE=Object.freeze(re.fromCssColorString("#483D8B"));re.DARKSLATEGRAY=Object.freeze(re.fromCssColorString("#2F4F4F"));re.DARKSLATEGREY=re.DARKSLATEGRAY;re.DARKTURQUOISE=Object.freeze(re.fromCssColorString("#00CED1"));re.DARKVIOLET=Object.freeze(re.fromCssColorString("#9400D3"));re.DEEPPINK=Object.freeze(re.fromCssColorString("#FF1493"));re.DEEPSKYBLUE=Object.freeze(re.fromCssColorString("#00BFFF"));re.DIMGRAY=Object.freeze(re.fromCssColorString("#696969"));re.DIMGREY=re.DIMGRAY;re.DODGERBLUE=Object.freeze(re.fromCssColorString("#1E90FF"));re.FIREBRICK=Object.freeze(re.fromCssColorString("#B22222"));re.FLORALWHITE=Object.freeze(re.fromCssColorString("#FFFAF0"));re.FORESTGREEN=Object.freeze(re.fromCssColorString("#228B22"));re.FUCHSIA=Object.freeze(re.fromCssColorString("#FF00FF"));re.GAINSBORO=Object.freeze(re.fromCssColorString("#DCDCDC"));re.GHOSTWHITE=Object.freeze(re.fromCssColorString("#F8F8FF"));re.GOLD=Object.freeze(re.fromCssColorString("#FFD700"));re.GOLDENROD=Object.freeze(re.fromCssColorString("#DAA520"));re.GRAY=Object.freeze(re.fromCssColorString("#808080"));re.GREEN=Object.freeze(re.fromCssColorString("#008000"));re.GREENYELLOW=Object.freeze(re.fromCssColorString("#ADFF2F"));re.GREY=re.GRAY;re.HONEYDEW=Object.freeze(re.fromCssColorString("#F0FFF0"));re.HOTPINK=Object.freeze(re.fromCssColorString("#FF69B4"));re.INDIANRED=Object.freeze(re.fromCssColorString("#CD5C5C"));re.INDIGO=Object.freeze(re.fromCssColorString("#4B0082"));re.IVORY=Object.freeze(re.fromCssColorString("#FFFFF0"));re.KHAKI=Object.freeze(re.fromCssColorString("#F0E68C"));re.LAVENDER=Object.freeze(re.fromCssColorString("#E6E6FA"));re.LAVENDAR_BLUSH=Object.freeze(re.fromCssColorString("#FFF0F5"));re.LAWNGREEN=Object.freeze(re.fromCssColorString("#7CFC00"));re.LEMONCHIFFON=Object.freeze(re.fromCssColorString("#FFFACD"));re.LIGHTBLUE=Object.freeze(re.fromCssColorString("#ADD8E6"));re.LIGHTCORAL=Object.freeze(re.fromCssColorString("#F08080"));re.LIGHTCYAN=Object.freeze(re.fromCssColorString("#E0FFFF"));re.LIGHTGOLDENRODYELLOW=Object.freeze(re.fromCssColorString("#FAFAD2"));re.LIGHTGRAY=Object.freeze(re.fromCssColorString("#D3D3D3"));re.LIGHTGREEN=Object.freeze(re.fromCssColorString("#90EE90"));re.LIGHTGREY=re.LIGHTGRAY;re.LIGHTPINK=Object.freeze(re.fromCssColorString("#FFB6C1"));re.LIGHTSEAGREEN=Object.freeze(re.fromCssColorString("#20B2AA"));re.LIGHTSKYBLUE=Object.freeze(re.fromCssColorString("#87CEFA"));re.LIGHTSLATEGRAY=Object.freeze(re.fromCssColorString("#778899"));re.LIGHTSLATEGREY=re.LIGHTSLATEGRAY;re.LIGHTSTEELBLUE=Object.freeze(re.fromCssColorString("#B0C4DE"));re.LIGHTYELLOW=Object.freeze(re.fromCssColorString("#FFFFE0"));re.LIME=Object.freeze(re.fromCssColorString("#00FF00"));re.LIMEGREEN=Object.freeze(re.fromCssColorString("#32CD32"));re.LINEN=Object.freeze(re.fromCssColorString("#FAF0E6"));re.MAGENTA=Object.freeze(re.fromCssColorString("#FF00FF"));re.MAROON=Object.freeze(re.fromCssColorString("#800000"));re.MEDIUMAQUAMARINE=Object.freeze(re.fromCssColorString("#66CDAA"));re.MEDIUMBLUE=Object.freeze(re.fromCssColorString("#0000CD"));re.MEDIUMORCHID=Object.freeze(re.fromCssColorString("#BA55D3"));re.MEDIUMPURPLE=Object.freeze(re.fromCssColorString("#9370DB"));re.MEDIUMSEAGREEN=Object.freeze(re.fromCssColorString("#3CB371"));re.MEDIUMSLATEBLUE=Object.freeze(re.fromCssColorString("#7B68EE"));re.MEDIUMSPRINGGREEN=Object.freeze(re.fromCssColorString("#00FA9A"));re.MEDIUMTURQUOISE=Object.freeze(re.fromCssColorString("#48D1CC"));re.MEDIUMVIOLETRED=Object.freeze(re.fromCssColorString("#C71585"));re.MIDNIGHTBLUE=Object.freeze(re.fromCssColorString("#191970"));re.MINTCREAM=Object.freeze(re.fromCssColorString("#F5FFFA"));re.MISTYROSE=Object.freeze(re.fromCssColorString("#FFE4E1"));re.MOCCASIN=Object.freeze(re.fromCssColorString("#FFE4B5"));re.NAVAJOWHITE=Object.freeze(re.fromCssColorString("#FFDEAD"));re.NAVY=Object.freeze(re.fromCssColorString("#000080"));re.OLDLACE=Object.freeze(re.fromCssColorString("#FDF5E6"));re.OLIVE=Object.freeze(re.fromCssColorString("#808000"));re.OLIVEDRAB=Object.freeze(re.fromCssColorString("#6B8E23"));re.ORANGE=Object.freeze(re.fromCssColorString("#FFA500"));re.ORANGERED=Object.freeze(re.fromCssColorString("#FF4500"));re.ORCHID=Object.freeze(re.fromCssColorString("#DA70D6"));re.PALEGOLDENROD=Object.freeze(re.fromCssColorString("#EEE8AA"));re.PALEGREEN=Object.freeze(re.fromCssColorString("#98FB98"));re.PALETURQUOISE=Object.freeze(re.fromCssColorString("#AFEEEE"));re.PALEVIOLETRED=Object.freeze(re.fromCssColorString("#DB7093"));re.PAPAYAWHIP=Object.freeze(re.fromCssColorString("#FFEFD5"));re.PEACHPUFF=Object.freeze(re.fromCssColorString("#FFDAB9"));re.PERU=Object.freeze(re.fromCssColorString("#CD853F"));re.PINK=Object.freeze(re.fromCssColorString("#FFC0CB"));re.PLUM=Object.freeze(re.fromCssColorString("#DDA0DD"));re.POWDERBLUE=Object.freeze(re.fromCssColorString("#B0E0E6"));re.PURPLE=Object.freeze(re.fromCssColorString("#800080"));re.RED=Object.freeze(re.fromCssColorString("#FF0000"));re.ROSYBROWN=Object.freeze(re.fromCssColorString("#BC8F8F"));re.ROYALBLUE=Object.freeze(re.fromCssColorString("#4169E1"));re.SADDLEBROWN=Object.freeze(re.fromCssColorString("#8B4513"));re.SALMON=Object.freeze(re.fromCssColorString("#FA8072"));re.SANDYBROWN=Object.freeze(re.fromCssColorString("#F4A460"));re.SEAGREEN=Object.freeze(re.fromCssColorString("#2E8B57"));re.SEASHELL=Object.freeze(re.fromCssColorString("#FFF5EE"));re.SIENNA=Object.freeze(re.fromCssColorString("#A0522D"));re.SILVER=Object.freeze(re.fromCssColorString("#C0C0C0"));re.SKYBLUE=Object.freeze(re.fromCssColorString("#87CEEB"));re.SLATEBLUE=Object.freeze(re.fromCssColorString("#6A5ACD"));re.SLATEGRAY=Object.freeze(re.fromCssColorString("#708090"));re.SLATEGREY=re.SLATEGRAY;re.SNOW=Object.freeze(re.fromCssColorString("#FFFAFA"));re.SPRINGGREEN=Object.freeze(re.fromCssColorString("#00FF7F"));re.STEELBLUE=Object.freeze(re.fromCssColorString("#4682B4"));re.TAN=Object.freeze(re.fromCssColorString("#D2B48C"));re.TEAL=Object.freeze(re.fromCssColorString("#008080"));re.THISTLE=Object.freeze(re.fromCssColorString("#D8BFD8"));re.TOMATO=Object.freeze(re.fromCssColorString("#FF6347"));re.TURQUOISE=Object.freeze(re.fromCssColorString("#40E0D0"));re.VIOLET=Object.freeze(re.fromCssColorString("#EE82EE"));re.WHEAT=Object.freeze(re.fromCssColorString("#F5DEB3"));re.WHITE=Object.freeze(re.fromCssColorString("#FFFFFF"));re.WHITESMOKE=Object.freeze(re.fromCssColorString("#F5F5F5"));re.YELLOW=Object.freeze(re.fromCssColorString("#FFFF00"));re.YELLOWGREEN=Object.freeze(re.fromCssColorString("#9ACD32"));re.TRANSPARENT=Object.freeze(new re(0,0,0,0));var Y=re;var PZt=T(S(),1);function UVe(){return!0}function DVe(e,t){t=y(t,"This object was destroyed, i.e., destroy() was called.");function n(){}for(let i in e)typeof e[i]=="function"&&(e[i]=n);e.isDestroyed=UVe}var me=DVe;var AZt=T(S(),1);function rd(e,t){e=y(e,0),this._near=e,t=y(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(rd.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}});rd.packedLength=2;rd.pack=function(e,t,n){return n=y(n,0),t[n++]=e.near,t[n]=e.far,t};rd.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new rd),n.near=e[t++],n.far=e[t],n};rd.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};rd.clone=function(e,t){if(l(e))return l(t)||(t=new rd),t.near=e.near,t.far=e.far,t};rd.prototype.clone=function(e){return rd.clone(this,e)};rd.prototype.equals=function(e){return rd.equals(this,e)};var Wt=rd;var UZt=T(S(),1);function iu(e,t,n,i){this.near=y(e,0),this.nearValue=y(t,0),this.far=y(n,1),this.farValue=y(i,0)}iu.clone=function(e,t){if(l(e))return l(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new iu(e.near,e.nearValue,e.far,e.farValue)};iu.packedLength=4;iu.pack=function(e,t,n){return n=y(n,0),t[n++]=e.near,t[n++]=e.nearValue,t[n++]=e.far,t[n]=e.farValue,t};iu.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new iu),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n};iu.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue};iu.prototype.clone=function(e){return iu.clone(this,e)};iu.prototype.equals=function(e){return iu.equals(this,e)};var Ft=iu;var BZt=T(S(),1),ex={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2,CLAMP_TO_TERRAIN:3,RELATIVE_TO_TERRAIN:4,CLAMP_TO_3D_TILE:5,RELATIVE_TO_3D_TILE:6},Je=Object.freeze(ex);function ou(e){return e===ex.CLAMP_TO_GROUND||e===ex.CLAMP_TO_3D_TILE||e===ex.CLAMP_TO_TERRAIN}function AS(e){return e===ex.RELATIVE_TO_GROUND||e===ex.RELATIVE_TO_3D_TILE||e===ex.RELATIVE_TO_TERRAIN}var OZt=T(S(),1),BVe={CENTER:0,LEFT:1,RIGHT:-1},hi=Object.freeze(BVe);var zZt=T(S(),1),YVe={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},Pn=Object.freeze(YVe);var JZt=T(S(),1),OVe={DONE:0,PENDING:1,FAILED:2},mt=Object.freeze(OVe);var eGt=T(S(),1);function fm(){fe.throwInstantiationError()}Object.defineProperties(fm.prototype,{isConstant:{get:fe.throwInstantiationError},definitionChanged:{get:fe.throwInstantiationError}});fm.prototype.getValue=fe.throwInstantiationError;fm.prototype.equals=fe.throwInstantiationError;fm.equals=function(e,t){return e===t||l(e)&&e.equals(t)};fm.arrayEquals=function(e,t){if(e===t)return!0;if(!l(e)||!l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i-1;o--)r=t[o],l(r._billboard)&&l(r._position)&&s.set(r.id,new o$(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._billboard)&&l(r._position)?s.contains(r.id)||s.set(r.id,new o$(r)):(cY(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],cY(s.get(r.id),r,a),s.remove(r.id)};function cY(e,t,n){l(e)&&(e.billboard=void 0,n.removeBillboard(t))}var zL=Lb;var U8t=T(S(),1);var FEt=T(S(),1);var PGt=T(S(),1);var xGt=T(S(),1);function uLe(e,t){this.start=y(e,0),this.stop=y(t,0)}var _a=uLe;function fn(e,t){this.center=h.clone(y(e,h.ZERO)),this.radius=y(t,0)}var uY=new h,mY=new h,hY=new h,fY=new h,pY=new h,bY=new h,gY=new h,Js=new h,yY=new h,xY=new h,_Y=new h,TY=new h,mLe=4/3*W.PI;fn.fromPoints=function(e,t){if(l(t)||(t=new fn),!l(e)||e.length===0)return t.center=h.clone(h.ZERO,t.center),t.radius=0,t;let n=h.clone(e[0],gY),i=h.clone(n,uY),o=h.clone(n,mY),r=h.clone(n,hY),s=h.clone(n,fY),a=h.clone(n,pY),c=h.clone(n,bY),d=e.length,u;for(u=1;us.x&&h.clone(n,s),Fa.y&&h.clone(n,a),Ac.z&&h.clone(n,c)}let m=h.magnitudeSquared(h.subtract(s,i,Js)),p=h.magnitudeSquared(h.subtract(a,o,Js)),g=h.magnitudeSquared(h.subtract(c,r,Js)),f=i,x=s,_=m;p>_&&(_=p,f=o,x=a),g>_&&(_=g,f=r,x=c);let C=yY;C.x=(f.x+x.x)*.5,C.y=(f.y+x.y)*.5,C.z=(f.z+x.z)*.5;let V=h.magnitudeSquared(h.subtract(x,C,Js)),L=Math.sqrt(V),Z=xY;Z.x=i.x,Z.y=o.y,Z.z=r.z;let G=_Y;G.x=s.x,G.y=a.y,G.z=c.z;let X=h.midpoint(Z,G,TY),v=0;for(u=0;uv&&(v=P);let F=h.magnitudeSquared(h.subtract(n,C,Js));if(F>V){let A=Math.sqrt(F);L=(L+A)*.5,V=L*L;let b=A-L;C.x=(L*C.x+b*n.x)/A,C.y=(L*C.y+b*n.y)/A,C.z=(L*C.z+b*n.z)/A}}return Lc.x&&h.clone(o,c),bd.y&&h.clone(o,d),Ru.z&&h.clone(o,u)}let g=h.magnitudeSquared(h.subtract(c,r,Js)),f=h.magnitudeSquared(h.subtract(d,s,Js)),x=h.magnitudeSquared(h.subtract(u,a,Js)),_=r,C=c,V=g;f>V&&(V=f,_=s,C=d),x>V&&(V=x,_=a,C=u);let L=yY;L.x=(_.x+C.x)*.5,L.y=(_.y+C.y)*.5,L.z=(_.z+C.z)*.5;let Z=h.magnitudeSquared(h.subtract(C,L,Js)),G=Math.sqrt(Z),X=xY;X.x=r.x,X.y=s.y,X.z=a.z;let v=_Y;v.x=c.x,v.y=d.y,v.z=u.z;let P=h.midpoint(X,v,TY),F=0;for(p=0;pF&&(F=A);let b=h.magnitudeSquared(h.subtract(o,L,Js));if(b>Z){let R=Math.sqrt(b);G=(G+R)*.5,Z=G*G;let E=R-G;L.x=(G*L.x+E*o.x)/R,L.y=(G*L.y+E*o.y)/R,L.z=(G*L.z+E*o.z)/R}}return Ga.x&&h.clone(i,a),Ac.y&&h.clone(i,c),bd.z&&h.clone(i,d)}let p=h.magnitudeSquared(h.subtract(a,o,Js)),g=h.magnitudeSquared(h.subtract(c,r,Js)),f=h.magnitudeSquared(h.subtract(d,s,Js)),x=o,_=a,C=p;g>C&&(C=g,x=r,_=c),f>C&&(C=f,x=s,_=d);let V=yY;V.x=(x.x+_.x)*.5,V.y=(x.y+_.y)*.5,V.z=(x.z+_.z)*.5;let L=h.magnitudeSquared(h.subtract(_,V,Js)),Z=Math.sqrt(L),G=xY;G.x=o.x,G.y=r.y,G.z=s.z;let X=_Y;X.x=a.x,X.y=c.y,X.z=d.z;let v=h.midpoint(G,X,TY),P=0;for(m=0;mP&&(P=F);let A=h.magnitudeSquared(h.subtract(i,V,Js));if(A>L){let b=Math.sqrt(A);Z=(Z+b)*.5,L=Z*Z;let R=b-Z;V.x=(Z*V.x+R*i.x)/b,V.y=(Z*V.y+R*i.y)/b,V.z=(Z*V.z+R*i.z)/b}}return Z=c+s)return e.clone(n),n;if(s>=c+o)return t.clone(n),n;let d=(o+c+s)*.5,u=h.multiplyByScalar(a,(-o+d)/c,VLe);return h.add(u,i,u),h.clone(u,n.center),n.radius=d,n};var LLe=new h;fn.expand=function(e,t,n){n=fn.clone(e,n);let i=h.magnitude(h.subtract(t,n.center,LLe));return i>n.radius&&(n.radius=i),n};fn.intersectPlane=function(e,t){let n=e.center,i=e.radius,o=t.normal,r=h.dot(o,n)+t.distance;return r<-i?Kt.OUTSIDE:r{let t=new Image;t.onload=function(){Ic._result=t.width>0&&t.height>0,e(Ic._result)},t.onerror=function(){Ic._result=!1,e(Ic._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),Ic._promise};Object.defineProperties(Ic,{initialized:{get:function(){return l(Ic._result)}}});var PT=[];typeof ArrayBuffer<"u"&&(PT.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&PT.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&PT.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&PT.push(BigInt64Array),typeof BigUint64Array<"u"&&PT.push(BigUint64Array));var tu={isChrome:OY,chromeVersion:D1e,isSafari:kq,safariVersion:B1e,isWebkit:Dq,webkitVersion:Y1e,isInternetExplorer:Bq,internetExplorerVersion:O1e,isEdge:KM,edgeVersion:z1e,isFirefox:HM,firefoxVersion:J1e,isWindows:K1e,isIPadOrIOS:H1e,hardwareConcurrency:y(Qa.hardwareConcurrency,3),supportsPointerEvents:Q1e,supportsImageRenderingPixelated:zq,supportsWebP:Ic,imageRenderingValue:j1e,typedArrayTypes:PT};tu.supportsBasis=function(e){return tu.supportsWebAssembly()&&e.context.supportsBasis};tu.supportsFullscreen=function(){return mr.supportsFullscreen()};tu.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};tu.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};tu.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};tu.supportsBigInt=function(){return typeof BigInt<"u"};tu.supportsWebWorkers=function(){return typeof Worker<"u"};tu.supportsWebAssembly=function(){return typeof WebAssembly<"u"};tu.supportsWebgl2=function(e){return e.context.webgl2};tu.supportsEsmWebWorkers=function(){return!HM()||parseInt(zY)>=114};var Yt=tu;function st(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.z=y(n,0),this.w=y(i,0)}var OZ=new h;st.fromAxisAngle=function(e,t,n){let i=t/2,o=Math.sin(i);OZ=h.normalize(e,OZ);let r=OZ.x*o,s=OZ.y*o,a=OZ.z*o,c=Math.cos(i);return l(n)?(n.x=r,n.y=s,n.z=a,n.w=c,n):new st(r,s,a,c)};var q1e=[1,2,0],$1e=new Array(3);st.fromRotationMatrix=function(e,t){let n,i,o,r,s,a=e[$.COLUMN0ROW0],c=e[$.COLUMN1ROW1],d=e[$.COLUMN2ROW2],u=a+c+d;if(u>0)n=Math.sqrt(u+1),s=.5*n,n=.5/n,i=(e[$.COLUMN1ROW2]-e[$.COLUMN2ROW1])*n,o=(e[$.COLUMN2ROW0]-e[$.COLUMN0ROW2])*n,r=(e[$.COLUMN0ROW1]-e[$.COLUMN1ROW0])*n;else{let m=q1e,p=0;c>a&&(p=1),d>a&&d>c&&(p=2);let g=m[p],f=m[g];n=Math.sqrt(e[$.getElementIndex(p,p)]-e[$.getElementIndex(g,g)]-e[$.getElementIndex(f,f)]+1);let x=$1e;x[p]=.5*n,n=.5/n,s=(e[$.getElementIndex(f,g)]-e[$.getElementIndex(g,f)])*n,x[g]=(e[$.getElementIndex(g,p)]+e[$.getElementIndex(p,g)])*n,x[f]=(e[$.getElementIndex(f,p)]+e[$.getElementIndex(p,f)])*n,i=-x[0],o=-x[1],r=-x[2]}return l(t)?(t.x=i,t.y=o,t.z=r,t.w=s,t):new st(i,o,r,s)};var Kq=new st,Hq=new st,KY=new st,Jq=new st;st.fromHeadingPitchRoll=function(e,t){return Jq=st.fromAxisAngle(h.UNIT_X,e.roll,Kq),KY=st.fromAxisAngle(h.UNIT_Y,-e.pitch,t),t=st.multiply(KY,Jq,KY),Hq=st.fromAxisAngle(h.UNIT_Z,-e.heading,Kq),st.multiply(Hq,t,t)};var JM=new h,HY=new h,mm=new st,Qq=new st,QM=new st;st.packedLength=4;st.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};st.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new st),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};st.packedInterpolationLength=3;st.convertPackedArrayForInterpolation=function(e,t,n,i){st.unpack(e,n*4,QM),st.conjugate(QM,QM);for(let o=0,r=n-t+1;o=0?r=1:(r=-1,o=-o);let s=o-1,a=1-n,c=n*n,d=a*a;for(let g=7;g>=0;--g)sp[g]=(jM[g]*c-qM[g])*s,ap[g]=(jM[g]*d-qM[g])*s;let u=r*n*(1+sp[0]*(1+sp[1]*(1+sp[2]*(1+sp[3]*(1+sp[4]*(1+sp[5]*(1+sp[6]*(1+sp[7])))))))),m=a*(1+ap[0]*(1+ap[1]*(1+ap[2]*(1+ap[3]*(1+ap[4]*(1+ap[5]*(1+ap[6]*(1+ap[7])))))))),p=st.multiplyByScalar(e,m,nVe);return st.multiplyByScalar(t,u,i),st.add(p,i,i)};st.fastSquad=function(e,t,n,i,o,r){let s=st.fastSlerp(e,t,o,zZ),a=st.fastSlerp(n,i,o,vT);return st.fastSlerp(s,a,2*o*(1-o),r)};st.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};st.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n};st.ZERO=Object.freeze(new st(0,0,0,0));st.IDENTITY=Object.freeze(new st(0,0,0,1));st.prototype.clone=function(e){return st.clone(this,e)};st.prototype.equals=function(e){return st.equals(this,e)};st.prototype.equalsEpsilon=function(e,t){return st.equalsEpsilon(this,e,t)};st.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var we=st;var Oi={},qY={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},wT={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},$Y={},pl={east:new h,north:new h,up:new h,west:new h,south:new h,down:new h},S0=new h,T0=new h,C0=new h;Oi.localFrameToFixedFrameGenerator=function(e,t){if(!qY.hasOwnProperty(e)||!qY[e].hasOwnProperty(t))throw new fe("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=qY[e][t],i,o=e+t;return l($Y[o])?i=$Y[o]:(i=function(r,s,a){if(l(a)||(a=new A),h.equalsEpsilon(r,h.ZERO,X.EPSILON14))h.unpack(wT[e],0,S0),h.unpack(wT[t],0,T0),h.unpack(wT[n],0,C0);else if(X.equalsEpsilon(r.x,0,X.EPSILON14)&&X.equalsEpsilon(r.y,0,X.EPSILON14)){let c=X.sign(r.z);h.unpack(wT[e],0,S0),e!=="east"&&e!=="west"&&h.multiplyByScalar(S0,c,S0),h.unpack(wT[t],0,T0),t!=="east"&&t!=="west"&&h.multiplyByScalar(T0,c,T0),h.unpack(wT[n],0,C0),n!=="east"&&n!=="west"&&h.multiplyByScalar(C0,c,C0)}else{s=y(s,te.default),s.geodeticSurfaceNormal(r,pl.up);let c=pl.up,d=pl.east;d.x=-r.y,d.y=r.x,d.z=0,h.normalize(d,pl.east),h.cross(c,d,pl.north),h.multiplyByScalar(pl.up,-1,pl.down),h.multiplyByScalar(pl.east,-1,pl.west),h.multiplyByScalar(pl.north,-1,pl.south),S0=pl[e],T0=pl[t],C0=pl[n]}return a[0]=S0.x,a[1]=S0.y,a[2]=S0.z,a[3]=0,a[4]=T0.x,a[5]=T0.y,a[6]=T0.z,a[7]=0,a[8]=C0.x,a[9]=C0.y,a[10]=C0.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},$Y[o]=i),i};Oi.eastNorthUpToFixedFrame=Oi.localFrameToFixedFrameGenerator("east","north");Oi.northEastDownToFixedFrame=Oi.localFrameToFixedFrameGenerator("north","east");Oi.northUpEastToFixedFrame=Oi.localFrameToFixedFrameGenerator("north","up");Oi.northWestUpToFixedFrame=Oi.localFrameToFixedFrameGenerator("north","west");var iVe=new we,oVe=new h(1,1,1),rVe=new A;Oi.headingPitchRollToFixedFrame=function(e,t,n,i,o){i=y(i,Oi.eastNorthUpToFixedFrame);let r=we.fromHeadingPitchRoll(t,iVe),s=A.fromTranslationQuaternionRotationScale(h.ZERO,r,oVe,rVe);return o=i(e,n,o),A.multiply(o,s,o)};var sVe=new A,aVe=new $;Oi.headingPitchRollQuaternion=function(e,t,n,i,o){let r=Oi.headingPitchRollToFixedFrame(e,t,n,i,sVe),s=A.getMatrix3(r,aVe);return we.fromRotationMatrix(s,o)};var cVe=new h(1,1,1),lVe=new h,$q=new A,dVe=new A,uVe=new $,mVe=new we;Oi.fixedFrameToHeadingPitchRoll=function(e,t,n,i){t=y(t,te.default),n=y(n,Oi.eastNorthUpToFixedFrame),l(i)||(i=new Ja);let o=A.getTranslation(e,lVe);if(h.equals(o,h.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=A.inverseTransformation(n(o,t,$q),$q),s=A.setScale(e,cVe,dVe);s=A.setTranslation(s,h.ZERO,s),r=A.multiply(r,s,r);let a=we.fromRotationMatrix(A.getMatrix3(r,uVe),mVe);return a=we.normalize(a,a),Ja.fromQuaternion(a,i)};var hVe=6*3600+41*60+50.54841,fVe=8640184812866e-6,pVe=.093104,bVe=-62e-7,gVe=11772758384668e-32,yVe=72921158553e-15,xVe=X.TWO_PI/86400,$M=new ne;Oi.computeTemeToPseudoFixedMatrix=function(e,t){$M=ne.addSeconds(e,-ne.computeTaiMinusUtc(e),$M);let n=$M.dayNumber,i=$M.secondsOfDay,o,r=n-2451545;i>=43200?o=(r+.5)/Kn.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/Kn.DAYS_PER_JULIAN_CENTURY;let a=(hVe+o*(fVe+o*(pVe+o*bVe)))*xVe%X.TWO_PI,c=yVe+gVe*(n-24515455e-1),d=(i+Kn.SECONDS_PER_DAY*.5)%Kn.SECONDS_PER_DAY,u=a+c*d,m=Math.cos(u),p=Math.sin(u);return l(t)?(t[0]=m,t[1]=-p,t[2]=0,t[3]=p,t[4]=m,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new $(m,p,0,-p,m,0,0,0,1)};Oi.iau2006XysData=new DZ;Oi.earthOrientationParameters=kZ.NONE;var n3=32.184,_Ve=2451545;Oi.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+n3,i=e.stop.dayNumber,o=e.stop.secondsOfDay+n3;return Oi.iau2006XysData.preload(t,n,i,o)};Oi.computeIcrfToFixedMatrix=function(e,t){l(t)||(t=new $);let n=Oi.computeFixedToIcrfMatrix(e,t);if(l(n))return $.transpose(n,t)};var SVe=new jy(0,0,0),TVe=new g0(0,0,0,0,0,0),e3=new $,t3=new $;Oi.computeFixedToIcrfMatrix=function(e,t){l(t)||(t=new $);let n=Oi.earthOrientationParameters.compute(e,TVe);if(!l(n))return;let i=e.dayNumber,o=e.secondsOfDay+n3,r=Oi.iau2006XysData.computeXysRadians(i,o,SVe);if(!l(r))return;let s=r.x+n.xPoleOffset,a=r.y+n.yPoleOffset,c=1/(1+Math.sqrt(1-s*s-a*a)),d=e3;d[0]=1-c*s*s,d[3]=-c*s*a,d[6]=s,d[1]=-c*s*a,d[4]=1-c*a*a,d[7]=a,d[2]=-s,d[5]=-a,d[8]=1-c*(s*s+a*a);let u=$.fromRotationZ(-r.s,t3),m=$.multiply(d,u,e3),p=e.dayNumber,g=e.secondsOfDay-ne.computeTaiMinusUtc(e)+n.ut1MinusUtc,f=p-2451545,x=g/Kn.SECONDS_PER_DAY,_=.779057273264+x+.00273781191135448*(f+x);_=_%1*X.TWO_PI;let C=$.fromRotationZ(_,t3),V=$.multiply(m,C,e3),Z=Math.cos(n.xPoleWander),R=Math.cos(n.yPoleWander),G=Math.sin(n.xPoleWander),W=Math.sin(n.yPoleWander),v=i-_Ve+o/Kn.SECONDS_PER_DAY;v/=36525;let P=-47e-6*v*X.RADIANS_PER_DEGREE/3600,F=Math.cos(P),M=Math.sin(P),b=t3;return b[0]=Z*F,b[1]=Z*M,b[2]=G,b[3]=-R*M+W*G*F,b[4]=R*F+W*G*M,b[5]=-W*Z,b[6]=-W*M-R*G*F,b[7]=W*F-R*G*M,b[8]=R*Z,$.multiply(V,b,t)};var CVe=new se;Oi.pointToWindowCoordinates=function(e,t,n,i){return i=Oi.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};Oi.pointToGLWindowCoordinates=function(e,t,n,i){l(i)||(i=new D);let o=CVe;return A.multiplyByVector(e,se.fromElements(n.x,n.y,n.z,1,o),o),se.multiplyByScalar(o,1/o.w,o),A.multiplyByVector(t,o,o),D.fromCartesian4(o,i)};var VVe=new h,ZVe=new h,LVe=new h;Oi.rotationMatrixFromPositionVelocity=function(e,t,n,i){let o=y(n,te.default).geodeticSurfaceNormal(e,VVe),r=h.cross(t,o,ZVe);h.equalsEpsilon(r,h.ZERO,X.EPSILON6)&&(r=h.clone(h.UNIT_X,r));let s=h.cross(r,t,LVe);return h.normalize(s,s),h.cross(t,s,r),h.negate(r,r),h.normalize(r,r),l(i)||(i=new $),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=s.x,i[7]=s.y,i[8]=s.z,i};var e$=new A(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),t$=new he,i3=new h,RVe=new h,GVe=new $,o3=new A,n$=new A;Oi.basisTo2D=function(e,t,n){let i=A.getTranslation(t,RVe),o=e.ellipsoid,r;if(h.equals(i,h.ZERO))r=h.clone(h.ZERO,i3);else{let u=o.cartesianToCartographic(i,t$);r=e.project(u,i3),h.fromElements(r.z,r.x,r.y,r)}let s=Oi.eastNorthUpToFixedFrame(i,o,o3),a=A.inverseTransformation(s,n$),c=A.getMatrix3(t,GVe),d=A.multiplyByMatrix3(a,c,n);return A.multiply(e$,d,n),A.setTranslation(n,r,n),n};Oi.ellipsoidTo2DModelMatrix=function(e,t,n){let i=e.ellipsoid,o=Oi.eastNorthUpToFixedFrame(t,i,o3),r=A.inverseTransformation(o,n$),s=i.cartesianToCartographic(t,t$),a=e.project(s,i3);h.fromElements(a.z,a.x,a.y,a);let c=A.fromTranslation(a,o3);return A.multiply(e$,r,n),A.multiply(c,n,n),n};var Gt=Oi;function Wn(e,t,n,i){this.west=y(e,0),this.south=y(t,0),this.east=y(n,0),this.north=y(i,0)}Object.defineProperties(Wn.prototype,{width:{get:function(){return Wn.computeWidth(this)}},height:{get:function(){return Wn.computeHeight(this)}}});Wn.packedLength=4;Wn.pack=function(e,t,n){return n=y(n,0),t[n++]=e.west,t[n++]=e.south,t[n++]=e.east,t[n]=e.north,t};Wn.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Wn),n.west=e[t++],n.south=e[t++],n.east=e[t++],n.north=e[t],n};Wn.computeWidth=function(e){let t=e.east,n=e.west;return t=0?u.longitude:u.longitude+X.TWO_PI;o=Math.min(o,m),r=Math.max(r,m)}return i-n>r-o&&(n=o,i=r,i>X.PI&&(i=i-X.TWO_PI),n>X.PI&&(n=n-X.TWO_PI)),l(t)?(t.west=n,t.south=s,t.east=i,t.north=a,t):new Wn(n,s,i,a)};Wn.fromCartesianArray=function(e,t,n){t=y(t,te.default);let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let d=0,u=e.length;d=0?m.longitude:m.longitude+X.TWO_PI;r=Math.min(r,p),s=Math.max(s,p)}return o-i>s-r&&(i=r,o=s,o>X.PI&&(o=o-X.TWO_PI),i>X.PI&&(i=i-X.TWO_PI)),l(n)?(n.west=i,n.south=a,n.east=o,n.north=c,n):new Wn(i,a,o,c)};var EVe=new h,WVe=new h,IVe=new h,XVe=new h,PVe=new h,r3=new Array(5);for(let e=0;e0?i+=X.TWO_PI:r0&&(r+=X.TWO_PI),i=u))return l(n)?(n.west=a,n.south=d,n.east=c,n.north=u,n):new Wn(a,d,c,u)};Wn.simpleIntersection=function(e,t,n){let i=Math.max(e.west,t.west),o=Math.max(e.south,t.south),r=Math.min(e.east,t.east),s=Math.min(e.north,t.north);if(!(o>=s||i>=r))return l(n)?(n.west=i,n.south=o,n.east=r,n.north=s,n):new Wn(i,o,r,s)};Wn.union=function(e,t,n){l(n)||(n=new Wn);let i=e.east,o=e.west,r=t.east,s=t.west;i0?i+=X.TWO_PI:r0&&(r+=X.TWO_PI),io||X.equalsEpsilon(n,o,X.EPSILON14))&&(n=e.south&&i<=e.north};var vVe=new he;Wn.subsample=function(e,t,n,i){t=y(t,te.default),n=y(n,0),l(i)||(i=[]);let o=0,r=e.north,s=e.south,a=e.east,c=e.west,d=vVe;d.height=n,d.longitude=c,d.latitude=r,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.longitude=a,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.latitude=s,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.longitude=c,i[o]=t.cartographicToCartesian(d,i[o]),o++,r<0?d.latitude=r:s>0?d.latitude=s:d.latitude=0;for(let u=1;u<8;++u)d.longitude=-Math.PI+u*X.PI_OVER_TWO,Wn.contains(e,d)&&(i[o]=t.cartographicToCartesian(d,i[o]),o++);return d.latitude===0&&(d.longitude=c,i[o]=t.cartographicToCartesian(d,i[o]),o++,d.longitude=a,i[o]=t.cartographicToCartesian(d,i[o]),o++),i.length=o,i};Wn.subsection=function(e,t,n,i,o,r){if(l(r)||(r=new Wn),e.west<=e.east){let a=e.east-e.west;r.west=e.west+t*a,r.east=e.west+i*a}else{let a=X.TWO_PI+e.east-e.west;r.west=X.negativePiToPi(e.west+t*a),r.east=X.negativePiToPi(e.west+i*a)}let s=e.north-e.south;return r.south=e.south+n*s,r.north=e.south+o*s,t===1&&(r.west=e.east),i===1&&(r.east=e.east),n===1&&(r.south=e.north),o===1&&(r.north=e.north),r};Wn.MAX_VALUE=Object.freeze(new Wn(-Math.PI,-X.PI_OVER_TWO,Math.PI,X.PI_OVER_TWO));var ce=Wn;function Cr(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.width=y(n,0),this.height=y(i,0)}Cr.packedLength=4;Cr.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t};Cr.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Cr),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};Cr.fromPoints=function(e,t){if(l(t)||(t=new Cr),!l(e)||e.length===0)return t.x=0,t.y=0,t.width=0,t.height=0,t;let n=e.length,i=e[0].x,o=e[0].y,r=e[0].x,s=e[0].y;for(let a=1;an.width?n.width=i:i<0&&(n.width-=i,n.x=t.x),o>n.height?n.height=o:o<0&&(n.height-=o,n.y=t.y),n};Cr.intersect=function(e,t){let n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.widthr+t.height?Ht.OUTSIDE:Ht.INTERSECTING};Cr.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height};Cr.prototype.clone=function(e){return Cr.clone(this,e)};Cr.prototype.intersect=function(e){return Cr.intersect(this,e)};Cr.prototype.equals=function(e){return Cr.equals(this,e)};var ze=Cr;var ZRt=S(T(),1);function s3(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n*6<1?e+(t-e)*6*n:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function re(e,t,n,i){this.red=y(e,1),this.green=y(t,1),this.blue=y(n,1),this.alpha=y(i,1)}re.fromCartesian4=function(e,t){return l(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new re(e.x,e.y,e.z,e.w)};re.fromBytes=function(e,t,n,i,o){return e=re.byteToFloat(y(e,255)),t=re.byteToFloat(y(t,255)),n=re.byteToFloat(y(n,255)),i=re.byteToFloat(y(i,255)),l(o)?(o.red=e,o.green=t,o.blue=n,o.alpha=i,o):new re(e,t,n,i)};re.fromAlpha=function(e,t,n){return l(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=t,n):new re(e.red,e.green,e.blue,t)};var a3,c3,cp;Yt.supportsTypedArrays()&&(a3=new ArrayBuffer(4),c3=new Uint32Array(a3),cp=new Uint8Array(a3));re.fromRgba=function(e,t){return c3[0]=e,re.fromBytes(cp[0],cp[1],cp[2],cp[3],t)};re.fromHsl=function(e,t,n,i,o){e=y(e,0)%1,t=y(t,0),n=y(n,0),i=y(i,1);let r=n,s=n,a=n;if(t!==0){let c;n<.5?c=n*(1+t):c=n+t-n*t;let d=2*n-c;r=s3(d,c,e+1/3),s=s3(d,c,e),a=s3(d,c,e-1/3)}return l(o)?(o.red=r,o.green=s,o.blue=a,o.alpha=i,o):new re(r,s,a,i)};re.fromRandom=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.red;if(!l(n)){let s=y(e.minimumRed,0),a=y(e.maximumRed,1);n=s+X.nextRandomNumber()*(a-s)}let i=e.green;if(!l(i)){let s=y(e.minimumGreen,0),a=y(e.maximumGreen,1);i=s+X.nextRandomNumber()*(a-s)}let o=e.blue;if(!l(o)){let s=y(e.minimumBlue,0),a=y(e.maximumBlue,1);o=s+X.nextRandomNumber()*(a-s)}let r=e.alpha;if(!l(r)){let s=y(e.minimumAlpha,0),a=y(e.maximumAlpha,1);r=s+X.nextRandomNumber()*(a-s)}return l(t)?(t.red=n,t.green=i,t.blue=o,t.alpha=r,t):new re(n,i,o,r)};var AVe=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,MVe=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,NVe=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,UVe=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;re.fromCssColorString=function(e,t){l(t)||(t=new re),e=e.trim();let n=re[e.toUpperCase()];if(l(n))return re.clone(n,t),t;let i=AVe.exec(e);return i!==null?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(y(i[4],"f"),16)/15,t):(i=MVe.exec(e),i!==null?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(y(i[4],"ff"),16)/255,t):(i=NVe.exec(e),i!==null?(t.red=parseFloat(i[1])/(i[1].substr(-1)==="%"?100:255),t.green=parseFloat(i[2])/(i[2].substr(-1)==="%"?100:255),t.blue=parseFloat(i[3])/(i[3].substr(-1)==="%"?100:255),t.alpha=parseFloat(y(i[4],"1.0")),t):(i=UVe.exec(e),i!==null?re.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(y(i[4],"1.0")),t):(t=void 0,t))))};re.packedLength=4;re.pack=function(e,t,n){return n=y(n,0),t[n++]=e.red,t[n++]=e.green,t[n++]=e.blue,t[n]=e.alpha,t};re.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new re),n.red=e[t++],n.green=e[t++],n.blue=e[t++],n.alpha=e[t],n};re.byteToFloat=function(e){return e/255};re.floatToByte=function(e){return e===1?255:e*256|0};re.clone=function(e,t){if(l(e))return l(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new re(e.red,e.green,e.blue,e.alpha)};re.equals=function(e,t){return e===t||l(e)&&l(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha};re.equalsArray=function(e,t,n){return e.red===t[n]&&e.green===t[n+1]&&e.blue===t[n+2]&&e.alpha===t[n+3]};re.prototype.clone=function(e){return re.clone(this,e)};re.prototype.equals=function(e){return re.equals(this,e)};re.prototype.equalsEpsilon=function(e,t){return this===e||l(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t};re.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};re.prototype.toCssColorString=function(){let e=re.floatToByte(this.red),t=re.floatToByte(this.green),n=re.floatToByte(this.blue);return this.alpha===1?`rgb(${e},${t},${n})`:`rgba(${e},${t},${n},${this.alpha})`};re.prototype.toCssHexString=function(){let e=re.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=re.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let n=re.floatToByte(this.blue).toString(16);if(n.length<2&&(n=`0${n}`),this.alpha<1){let i=re.floatToByte(this.alpha).toString(16);return i.length<2&&(i=`0${i}`),`#${e}${t}${n}${i}`}return`#${e}${t}${n}`};re.prototype.toBytes=function(e){let t=re.floatToByte(this.red),n=re.floatToByte(this.green),i=re.floatToByte(this.blue),o=re.floatToByte(this.alpha);return l(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o,e):[t,n,i,o]};re.prototype.toRgba=function(){return cp[0]=re.floatToByte(this.red),cp[1]=re.floatToByte(this.green),cp[2]=re.floatToByte(this.blue),cp[3]=re.floatToByte(this.alpha),c3[0]};re.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t};re.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t};re.prototype.withAlpha=function(e,t){return re.fromAlpha(this,e,t)};re.add=function(e,t,n){return n.red=e.red+t.red,n.green=e.green+t.green,n.blue=e.blue+t.blue,n.alpha=e.alpha+t.alpha,n};re.subtract=function(e,t,n){return n.red=e.red-t.red,n.green=e.green-t.green,n.blue=e.blue-t.blue,n.alpha=e.alpha-t.alpha,n};re.multiply=function(e,t,n){return n.red=e.red*t.red,n.green=e.green*t.green,n.blue=e.blue*t.blue,n.alpha=e.alpha*t.alpha,n};re.divide=function(e,t,n){return n.red=e.red/t.red,n.green=e.green/t.green,n.blue=e.blue/t.blue,n.alpha=e.alpha/t.alpha,n};re.mod=function(e,t,n){return n.red=e.red%t.red,n.green=e.green%t.green,n.blue=e.blue%t.blue,n.alpha=e.alpha%t.alpha,n};re.lerp=function(e,t,n,i){return i.red=X.lerp(e.red,t.red,n),i.green=X.lerp(e.green,t.green,n),i.blue=X.lerp(e.blue,t.blue,n),i.alpha=X.lerp(e.alpha,t.alpha,n),i};re.multiplyByScalar=function(e,t,n){return n.red=e.red*t,n.green=e.green*t,n.blue=e.blue*t,n.alpha=e.alpha*t,n};re.divideByScalar=function(e,t,n){return n.red=e.red/t,n.green=e.green/t,n.blue=e.blue/t,n.alpha=e.alpha/t,n};re.ALICEBLUE=Object.freeze(re.fromCssColorString("#F0F8FF"));re.ANTIQUEWHITE=Object.freeze(re.fromCssColorString("#FAEBD7"));re.AQUA=Object.freeze(re.fromCssColorString("#00FFFF"));re.AQUAMARINE=Object.freeze(re.fromCssColorString("#7FFFD4"));re.AZURE=Object.freeze(re.fromCssColorString("#F0FFFF"));re.BEIGE=Object.freeze(re.fromCssColorString("#F5F5DC"));re.BISQUE=Object.freeze(re.fromCssColorString("#FFE4C4"));re.BLACK=Object.freeze(re.fromCssColorString("#000000"));re.BLANCHEDALMOND=Object.freeze(re.fromCssColorString("#FFEBCD"));re.BLUE=Object.freeze(re.fromCssColorString("#0000FF"));re.BLUEVIOLET=Object.freeze(re.fromCssColorString("#8A2BE2"));re.BROWN=Object.freeze(re.fromCssColorString("#A52A2A"));re.BURLYWOOD=Object.freeze(re.fromCssColorString("#DEB887"));re.CADETBLUE=Object.freeze(re.fromCssColorString("#5F9EA0"));re.CHARTREUSE=Object.freeze(re.fromCssColorString("#7FFF00"));re.CHOCOLATE=Object.freeze(re.fromCssColorString("#D2691E"));re.CORAL=Object.freeze(re.fromCssColorString("#FF7F50"));re.CORNFLOWERBLUE=Object.freeze(re.fromCssColorString("#6495ED"));re.CORNSILK=Object.freeze(re.fromCssColorString("#FFF8DC"));re.CRIMSON=Object.freeze(re.fromCssColorString("#DC143C"));re.CYAN=Object.freeze(re.fromCssColorString("#00FFFF"));re.DARKBLUE=Object.freeze(re.fromCssColorString("#00008B"));re.DARKCYAN=Object.freeze(re.fromCssColorString("#008B8B"));re.DARKGOLDENROD=Object.freeze(re.fromCssColorString("#B8860B"));re.DARKGRAY=Object.freeze(re.fromCssColorString("#A9A9A9"));re.DARKGREEN=Object.freeze(re.fromCssColorString("#006400"));re.DARKGREY=re.DARKGRAY;re.DARKKHAKI=Object.freeze(re.fromCssColorString("#BDB76B"));re.DARKMAGENTA=Object.freeze(re.fromCssColorString("#8B008B"));re.DARKOLIVEGREEN=Object.freeze(re.fromCssColorString("#556B2F"));re.DARKORANGE=Object.freeze(re.fromCssColorString("#FF8C00"));re.DARKORCHID=Object.freeze(re.fromCssColorString("#9932CC"));re.DARKRED=Object.freeze(re.fromCssColorString("#8B0000"));re.DARKSALMON=Object.freeze(re.fromCssColorString("#E9967A"));re.DARKSEAGREEN=Object.freeze(re.fromCssColorString("#8FBC8F"));re.DARKSLATEBLUE=Object.freeze(re.fromCssColorString("#483D8B"));re.DARKSLATEGRAY=Object.freeze(re.fromCssColorString("#2F4F4F"));re.DARKSLATEGREY=re.DARKSLATEGRAY;re.DARKTURQUOISE=Object.freeze(re.fromCssColorString("#00CED1"));re.DARKVIOLET=Object.freeze(re.fromCssColorString("#9400D3"));re.DEEPPINK=Object.freeze(re.fromCssColorString("#FF1493"));re.DEEPSKYBLUE=Object.freeze(re.fromCssColorString("#00BFFF"));re.DIMGRAY=Object.freeze(re.fromCssColorString("#696969"));re.DIMGREY=re.DIMGRAY;re.DODGERBLUE=Object.freeze(re.fromCssColorString("#1E90FF"));re.FIREBRICK=Object.freeze(re.fromCssColorString("#B22222"));re.FLORALWHITE=Object.freeze(re.fromCssColorString("#FFFAF0"));re.FORESTGREEN=Object.freeze(re.fromCssColorString("#228B22"));re.FUCHSIA=Object.freeze(re.fromCssColorString("#FF00FF"));re.GAINSBORO=Object.freeze(re.fromCssColorString("#DCDCDC"));re.GHOSTWHITE=Object.freeze(re.fromCssColorString("#F8F8FF"));re.GOLD=Object.freeze(re.fromCssColorString("#FFD700"));re.GOLDENROD=Object.freeze(re.fromCssColorString("#DAA520"));re.GRAY=Object.freeze(re.fromCssColorString("#808080"));re.GREEN=Object.freeze(re.fromCssColorString("#008000"));re.GREENYELLOW=Object.freeze(re.fromCssColorString("#ADFF2F"));re.GREY=re.GRAY;re.HONEYDEW=Object.freeze(re.fromCssColorString("#F0FFF0"));re.HOTPINK=Object.freeze(re.fromCssColorString("#FF69B4"));re.INDIANRED=Object.freeze(re.fromCssColorString("#CD5C5C"));re.INDIGO=Object.freeze(re.fromCssColorString("#4B0082"));re.IVORY=Object.freeze(re.fromCssColorString("#FFFFF0"));re.KHAKI=Object.freeze(re.fromCssColorString("#F0E68C"));re.LAVENDER=Object.freeze(re.fromCssColorString("#E6E6FA"));re.LAVENDAR_BLUSH=Object.freeze(re.fromCssColorString("#FFF0F5"));re.LAWNGREEN=Object.freeze(re.fromCssColorString("#7CFC00"));re.LEMONCHIFFON=Object.freeze(re.fromCssColorString("#FFFACD"));re.LIGHTBLUE=Object.freeze(re.fromCssColorString("#ADD8E6"));re.LIGHTCORAL=Object.freeze(re.fromCssColorString("#F08080"));re.LIGHTCYAN=Object.freeze(re.fromCssColorString("#E0FFFF"));re.LIGHTGOLDENRODYELLOW=Object.freeze(re.fromCssColorString("#FAFAD2"));re.LIGHTGRAY=Object.freeze(re.fromCssColorString("#D3D3D3"));re.LIGHTGREEN=Object.freeze(re.fromCssColorString("#90EE90"));re.LIGHTGREY=re.LIGHTGRAY;re.LIGHTPINK=Object.freeze(re.fromCssColorString("#FFB6C1"));re.LIGHTSEAGREEN=Object.freeze(re.fromCssColorString("#20B2AA"));re.LIGHTSKYBLUE=Object.freeze(re.fromCssColorString("#87CEFA"));re.LIGHTSLATEGRAY=Object.freeze(re.fromCssColorString("#778899"));re.LIGHTSLATEGREY=re.LIGHTSLATEGRAY;re.LIGHTSTEELBLUE=Object.freeze(re.fromCssColorString("#B0C4DE"));re.LIGHTYELLOW=Object.freeze(re.fromCssColorString("#FFFFE0"));re.LIME=Object.freeze(re.fromCssColorString("#00FF00"));re.LIMEGREEN=Object.freeze(re.fromCssColorString("#32CD32"));re.LINEN=Object.freeze(re.fromCssColorString("#FAF0E6"));re.MAGENTA=Object.freeze(re.fromCssColorString("#FF00FF"));re.MAROON=Object.freeze(re.fromCssColorString("#800000"));re.MEDIUMAQUAMARINE=Object.freeze(re.fromCssColorString("#66CDAA"));re.MEDIUMBLUE=Object.freeze(re.fromCssColorString("#0000CD"));re.MEDIUMORCHID=Object.freeze(re.fromCssColorString("#BA55D3"));re.MEDIUMPURPLE=Object.freeze(re.fromCssColorString("#9370DB"));re.MEDIUMSEAGREEN=Object.freeze(re.fromCssColorString("#3CB371"));re.MEDIUMSLATEBLUE=Object.freeze(re.fromCssColorString("#7B68EE"));re.MEDIUMSPRINGGREEN=Object.freeze(re.fromCssColorString("#00FA9A"));re.MEDIUMTURQUOISE=Object.freeze(re.fromCssColorString("#48D1CC"));re.MEDIUMVIOLETRED=Object.freeze(re.fromCssColorString("#C71585"));re.MIDNIGHTBLUE=Object.freeze(re.fromCssColorString("#191970"));re.MINTCREAM=Object.freeze(re.fromCssColorString("#F5FFFA"));re.MISTYROSE=Object.freeze(re.fromCssColorString("#FFE4E1"));re.MOCCASIN=Object.freeze(re.fromCssColorString("#FFE4B5"));re.NAVAJOWHITE=Object.freeze(re.fromCssColorString("#FFDEAD"));re.NAVY=Object.freeze(re.fromCssColorString("#000080"));re.OLDLACE=Object.freeze(re.fromCssColorString("#FDF5E6"));re.OLIVE=Object.freeze(re.fromCssColorString("#808000"));re.OLIVEDRAB=Object.freeze(re.fromCssColorString("#6B8E23"));re.ORANGE=Object.freeze(re.fromCssColorString("#FFA500"));re.ORANGERED=Object.freeze(re.fromCssColorString("#FF4500"));re.ORCHID=Object.freeze(re.fromCssColorString("#DA70D6"));re.PALEGOLDENROD=Object.freeze(re.fromCssColorString("#EEE8AA"));re.PALEGREEN=Object.freeze(re.fromCssColorString("#98FB98"));re.PALETURQUOISE=Object.freeze(re.fromCssColorString("#AFEEEE"));re.PALEVIOLETRED=Object.freeze(re.fromCssColorString("#DB7093"));re.PAPAYAWHIP=Object.freeze(re.fromCssColorString("#FFEFD5"));re.PEACHPUFF=Object.freeze(re.fromCssColorString("#FFDAB9"));re.PERU=Object.freeze(re.fromCssColorString("#CD853F"));re.PINK=Object.freeze(re.fromCssColorString("#FFC0CB"));re.PLUM=Object.freeze(re.fromCssColorString("#DDA0DD"));re.POWDERBLUE=Object.freeze(re.fromCssColorString("#B0E0E6"));re.PURPLE=Object.freeze(re.fromCssColorString("#800080"));re.RED=Object.freeze(re.fromCssColorString("#FF0000"));re.ROSYBROWN=Object.freeze(re.fromCssColorString("#BC8F8F"));re.ROYALBLUE=Object.freeze(re.fromCssColorString("#4169E1"));re.SADDLEBROWN=Object.freeze(re.fromCssColorString("#8B4513"));re.SALMON=Object.freeze(re.fromCssColorString("#FA8072"));re.SANDYBROWN=Object.freeze(re.fromCssColorString("#F4A460"));re.SEAGREEN=Object.freeze(re.fromCssColorString("#2E8B57"));re.SEASHELL=Object.freeze(re.fromCssColorString("#FFF5EE"));re.SIENNA=Object.freeze(re.fromCssColorString("#A0522D"));re.SILVER=Object.freeze(re.fromCssColorString("#C0C0C0"));re.SKYBLUE=Object.freeze(re.fromCssColorString("#87CEEB"));re.SLATEBLUE=Object.freeze(re.fromCssColorString("#6A5ACD"));re.SLATEGRAY=Object.freeze(re.fromCssColorString("#708090"));re.SLATEGREY=re.SLATEGRAY;re.SNOW=Object.freeze(re.fromCssColorString("#FFFAFA"));re.SPRINGGREEN=Object.freeze(re.fromCssColorString("#00FF7F"));re.STEELBLUE=Object.freeze(re.fromCssColorString("#4682B4"));re.TAN=Object.freeze(re.fromCssColorString("#D2B48C"));re.TEAL=Object.freeze(re.fromCssColorString("#008080"));re.THISTLE=Object.freeze(re.fromCssColorString("#D8BFD8"));re.TOMATO=Object.freeze(re.fromCssColorString("#FF6347"));re.TURQUOISE=Object.freeze(re.fromCssColorString("#40E0D0"));re.VIOLET=Object.freeze(re.fromCssColorString("#EE82EE"));re.WHEAT=Object.freeze(re.fromCssColorString("#F5DEB3"));re.WHITE=Object.freeze(re.fromCssColorString("#FFFFFF"));re.WHITESMOKE=Object.freeze(re.fromCssColorString("#F5F5F5"));re.YELLOW=Object.freeze(re.fromCssColorString("#FFFF00"));re.YELLOWGREEN=Object.freeze(re.fromCssColorString("#9ACD32"));re.TRANSPARENT=Object.freeze(new re(0,0,0,0));var Y=re;var GRt=S(T(),1);function kVe(){return!0}function DVe(e,t){t=y(t,"This object was destroyed, i.e., destroy() was called.");function n(){}for(let i in e)typeof e[i]=="function"&&(e[i]=n);e.isDestroyed=kVe}var me=DVe;var XRt=S(T(),1);function od(e,t){e=y(e,0),this._near=e,t=y(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(od.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}});od.packedLength=2;od.pack=function(e,t,n){return n=y(n,0),t[n++]=e.near,t[n]=e.far,t};od.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new od),n.near=e[t++],n.far=e[t],n};od.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};od.clone=function(e,t){if(l(e))return l(t)||(t=new od),t.near=e.near,t.far=e.far,t};od.prototype.clone=function(e){return od.clone(this,e)};od.prototype.equals=function(e){return od.equals(this,e)};var Xt=od;var FRt=S(T(),1);function nu(e,t,n,i){this.near=y(e,0),this.nearValue=y(t,0),this.far=y(n,1),this.farValue=y(i,0)}nu.clone=function(e,t){if(l(e))return l(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new nu(e.near,e.nearValue,e.far,e.farValue)};nu.packedLength=4;nu.pack=function(e,t,n){return n=y(n,0),t[n++]=e.near,t[n++]=e.nearValue,t[n++]=e.far,t[n]=e.farValue,t};nu.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new nu),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n};nu.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue};nu.prototype.clone=function(e){return nu.clone(this,e)};nu.prototype.equals=function(e){return nu.equals(this,e)};var Ft=nu;var MRt=S(T(),1),$y={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2,CLAMP_TO_TERRAIN:3,RELATIVE_TO_TERRAIN:4,CLAMP_TO_3D_TILE:5,RELATIVE_TO_3D_TILE:6},Je=Object.freeze($y);function iu(e){return e===$y.CLAMP_TO_GROUND||e===$y.CLAMP_TO_3D_TILE||e===$y.CLAMP_TO_TERRAIN}function FT(e){return e===$y.RELATIVE_TO_GROUND||e===$y.RELATIVE_TO_3D_TILE||e===$y.RELATIVE_TO_TERRAIN}var URt=S(T(),1),BVe={CENTER:0,LEFT:1,RIGHT:-1},fi=Object.freeze(BVe);var DRt=S(T(),1),YVe={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},Pn=Object.freeze(YVe);var YRt=S(T(),1),OVe={DONE:0,PENDING:1,FAILED:2},mt=Object.freeze(OVe);var JRt=S(T(),1);function hm(){fe.throwInstantiationError()}Object.defineProperties(hm.prototype,{isConstant:{get:fe.throwInstantiationError},definitionChanged:{get:fe.throwInstantiationError}});hm.prototype.getValue=fe.throwInstantiationError;hm.prototype.equals=fe.throwInstantiationError;hm.equals=function(e,t){return e===t||l(e)&&e.equals(t)};hm.arrayEquals=function(e,t){if(e===t)return!0;if(!l(e)||!l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i-1;o--)r=t[o],l(r._billboard)&&l(r._position)&&s.set(r.id,new o$(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._billboard)&&l(r._position)?s.contains(r.id)||s.set(r.id,new o$(r)):(l3(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],l3(s.get(r.id),r,a),s.remove(r.id)};function l3(e,t,n){l(e)&&(e.billboard=void 0,n.removeBillboard(t))}var KZ=V0;var F8t=S(T(),1);var IEt=S(T(),1);var GGt=S(T(),1);var fGt=S(T(),1);function uZe(e,t){this.start=y(e,0),this.stop=y(t,0)}var Sa=uZe;function fn(e,t){this.center=h.clone(y(e,h.ZERO)),this.radius=y(t,0)}var m3=new h,h3=new h,f3=new h,p3=new h,b3=new h,g3=new h,y3=new h,Qs=new h,x3=new h,_3=new h,S3=new h,T3=new h,mZe=4/3*X.PI;fn.fromPoints=function(e,t){if(l(t)||(t=new fn),!l(e)||e.length===0)return t.center=h.clone(h.ZERO,t.center),t.radius=0,t;let n=h.clone(e[0],y3),i=h.clone(n,m3),o=h.clone(n,h3),r=h.clone(n,f3),s=h.clone(n,p3),a=h.clone(n,b3),c=h.clone(n,g3),d=e.length,u;for(u=1;us.x&&h.clone(n,s),Fa.y&&h.clone(n,a),Mc.z&&h.clone(n,c)}let m=h.magnitudeSquared(h.subtract(s,i,Qs)),p=h.magnitudeSquared(h.subtract(a,o,Qs)),g=h.magnitudeSquared(h.subtract(c,r,Qs)),f=i,x=s,_=m;p>_&&(_=p,f=o,x=a),g>_&&(_=g,f=r,x=c);let C=x3;C.x=(f.x+x.x)*.5,C.y=(f.y+x.y)*.5,C.z=(f.z+x.z)*.5;let V=h.magnitudeSquared(h.subtract(x,C,Qs)),Z=Math.sqrt(V),R=_3;R.x=i.x,R.y=o.y,R.z=r.z;let G=S3;G.x=s.x,G.y=a.y,G.z=c.z;let W=h.midpoint(R,G,T3),v=0;for(u=0;uv&&(v=P);let F=h.magnitudeSquared(h.subtract(n,C,Qs));if(F>V){let M=Math.sqrt(F);Z=(Z+M)*.5,V=Z*Z;let b=M-Z;C.x=(Z*C.x+b*n.x)/M,C.y=(Z*C.y+b*n.y)/M,C.z=(Z*C.z+b*n.z)/M}}return Zc.x&&h.clone(o,c),bd.y&&h.clone(o,d),Lu.z&&h.clone(o,u)}let g=h.magnitudeSquared(h.subtract(c,r,Qs)),f=h.magnitudeSquared(h.subtract(d,s,Qs)),x=h.magnitudeSquared(h.subtract(u,a,Qs)),_=r,C=c,V=g;f>V&&(V=f,_=s,C=d),x>V&&(V=x,_=a,C=u);let Z=x3;Z.x=(_.x+C.x)*.5,Z.y=(_.y+C.y)*.5,Z.z=(_.z+C.z)*.5;let R=h.magnitudeSquared(h.subtract(C,Z,Qs)),G=Math.sqrt(R),W=_3;W.x=r.x,W.y=s.y,W.z=a.z;let v=S3;v.x=c.x,v.y=d.y,v.z=u.z;let P=h.midpoint(W,v,T3),F=0;for(p=0;pF&&(F=M);let b=h.magnitudeSquared(h.subtract(o,Z,Qs));if(b>R){let L=Math.sqrt(b);G=(G+L)*.5,R=G*G;let E=L-G;Z.x=(G*Z.x+E*o.x)/L,Z.y=(G*Z.y+E*o.y)/L,Z.z=(G*Z.z+E*o.z)/L}}return Ga.x&&h.clone(i,a),Mc.y&&h.clone(i,c),bd.z&&h.clone(i,d)}let p=h.magnitudeSquared(h.subtract(a,o,Qs)),g=h.magnitudeSquared(h.subtract(c,r,Qs)),f=h.magnitudeSquared(h.subtract(d,s,Qs)),x=o,_=a,C=p;g>C&&(C=g,x=r,_=c),f>C&&(C=f,x=s,_=d);let V=x3;V.x=(x.x+_.x)*.5,V.y=(x.y+_.y)*.5,V.z=(x.z+_.z)*.5;let Z=h.magnitudeSquared(h.subtract(_,V,Qs)),R=Math.sqrt(Z),G=_3;G.x=o.x,G.y=r.y,G.z=s.z;let W=S3;W.x=a.x,W.y=c.y,W.z=d.z;let v=h.midpoint(G,W,T3),P=0;for(m=0;mP&&(P=F);let M=h.magnitudeSquared(h.subtract(i,V,Qs));if(M>Z){let b=Math.sqrt(M);R=(R+b)*.5,Z=R*R;let L=b-R;V.x=(R*V.x+L*i.x)/b,V.y=(R*V.y+L*i.y)/b,V.z=(R*V.z+L*i.z)/b}}return R=c+s)return e.clone(n),n;if(s>=c+o)return t.clone(n),n;let d=(o+c+s)*.5,u=h.multiplyByScalar(a,(-o+d)/c,CZe);return h.add(u,i,u),h.clone(u,n.center),n.radius=d,n};var VZe=new h;fn.expand=function(e,t,n){n=fn.clone(e,n);let i=h.magnitude(h.subtract(t,n.center,VZe));return i>n.radius&&(n.radius=i),n};fn.intersectPlane=function(e,t){let n=e.center,i=e.radius,o=t.normal,r=h.dot(o,n)+t.distance;return r<-i?Ht.OUTSIDE:r{e.onmessage=function(o){let r=o.data.array,s=l(r)&&r[0]===t;i(s),e.terminate(),Qs._canTransferArrayBuffer=s}})}return Qs._canTransferArrayBuffer}var LY=new ge;function VY(e){let t;try{t=new Blob([e],{type:"application/javascript"})}catch{let o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,r=new o;r.append(e),t=r.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(t)}function RY(e){let t=new x$.default(e),n=t.scheme().length!==0&&t.fragment().length===0,i=e.replace(/\.js$/,""),o={},r,s;if(_b(e))s=e;else if(!n){let a=tn(`${Qs._workerModulePrefix}/${i}.js`);_b(a)&&(s=a)}if(s){let a=`import "${s}";`;return r=VY(a),o.type="module",new Worker(r,o)}if(!n&&typeof CESIUM_WORKERS<"u"){let a=` - importScripts("${VY(CESIUM_WORKERS)}"); +`;var iIt=S(T(),1);var zWt=S(T(),1);var NWt=S(T(),1);var tLe={ADD:ie.FUNC_ADD,SUBTRACT:ie.FUNC_SUBTRACT,REVERSE_SUBTRACT:ie.FUNC_REVERSE_SUBTRACT,MIN:ie.MIN,MAX:ie.MAX},Ca=Object.freeze(tLe);var DWt=S(T(),1);var nLe={ZERO:ie.ZERO,ONE:ie.ONE,SOURCE_COLOR:ie.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:ie.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:ie.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:ie.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:ie.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:ie.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:ie.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:ie.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:ie.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:ie.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:ie.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:ie.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:ie.SRC_ALPHA_SATURATE},xo=Object.freeze(nLe);var iLe={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Ca.ADD,equationAlpha:Ca.ADD,functionSourceRgb:xo.SOURCE_ALPHA,functionSourceAlpha:xo.ONE,functionDestinationRgb:xo.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:xo.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Ca.ADD,equationAlpha:Ca.ADD,functionSourceRgb:xo.ONE,functionSourceAlpha:xo.ONE,functionDestinationRgb:xo.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:xo.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:Ca.ADD,equationAlpha:Ca.ADD,functionSourceRgb:xo.SOURCE_ALPHA,functionSourceAlpha:xo.ONE,functionDestinationRgb:xo.ONE,functionDestinationAlpha:xo.ONE})},un=Object.freeze(iLe);var JWt=S(T(),1);var oLe={FRONT:ie.FRONT,BACK:ie.BACK,FRONT_AND_BACK:ie.FRONT_AND_BACK},pi=Object.freeze(oLe);function NT(e){e=y(e,y.EMPTY_OBJECT),this.material=e.material,this.translucent=y(e.translucent,!0),this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=y(e.closed,!1)}Object.defineProperties(NT.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}});NT.prototype.getFragmentShaderSource=function(){let e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),l(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join(` +`)};NT.prototype.isTranslucent=function(){return l(this.material)&&this.material.isTranslucent()||!l(this.material)&&this.translucent};NT.prototype.getRenderState=function(){let e=this.isTranslucent(),t=Oe(this.renderState,!1);return e?(t.depthMask=!1,t.blending=un.ALPHA_BLEND):t.depthMask=!0,t};NT.getDefaultRenderState=function(e,t,n){let i={depthTest:{enabled:!0}};return e&&(i.depthMask=!1,i.blending=un.ALPHA_BLEND),t&&(i.cull={enabled:!0,face:pi.BACK}),l(n)&&(i=xt(n,i,!0)),i};var ji=NT;var tPt=S(T(),1);var rIt=S(T(),1);function rLe(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var Bn=rLe;var WIt=S(T(),1);var LIt=S(T(),1);var cIt=S(T(),1);function UT(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(UT.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}}});UT.clone=function(e){if(l(e))return new UT(e._format,e._datatype,e._width,e._height,e._buffer)};UT.prototype.clone=function(){return UT.clone(this)};var nL=UT;var _It=S(T(),1),S$=S(nd(),1);function T$(){if(!l(js._canTransferArrayBuffer)){let e=R3("transferTypedArrayTest");e.postMessage=y(e.webkitPostMessage,e.postMessage);let t=99,n=new Int8Array([t]);try{e.postMessage({array:n},[n.buffer])}catch{return js._canTransferArrayBuffer=!1,js._canTransferArrayBuffer}js._canTransferArrayBuffer=new Promise(i=>{e.onmessage=function(o){let r=o.data.array,s=l(r)&&r[0]===t;i(s),e.terminate(),js._canTransferArrayBuffer=s}})}return js._canTransferArrayBuffer}var L3=new ge;function Z3(e){let t;try{t=new Blob([e],{type:"application/javascript"})}catch{let o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,r=new o;r.append(e),t=r.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(t)}function R3(e){let t=new S$.default(e),n=t.scheme().length!==0&&t.fragment().length===0,i=e.replace(/\.js$/,""),o={},r,s;if(x0(e))s=e;else if(!n){let a=tn(`${js._workerModulePrefix}/${i}.js`);x0(a)&&(s=a)}if(s){let a=`import "${s}";`;return r=Z3(a),o.type="module",new Worker(r,o)}if(!n&&typeof CESIUM_WORKERS<"u"){let a=` + importScripts("${Z3(CESIUM_WORKERS)}"); CesiumWorkers["${i}"](); - `;return r=VY(a),new Worker(r,o)}if(r=e,n||(r=tn(`${Qs._workerModulePrefix+i}.js`)),!Yt.supportsEsmWebWorkers())throw new ue("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(r,o)}async function cRe(e,t){let n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!Yt.supportsWebAssembly()){if(!l(t.fallbackModulePath))throw new ue(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=tn(t.fallbackModulePath),n}n.wasmBinaryFile=tn(t.wasmBinaryFile);let i=await Ee.fetchArrayBuffer({url:n.wasmBinaryFile});return n.wasmBinary=i,n}function Qs(e,t){this._workerPath=e,this._maximumActiveTasks=y(t,Number.POSITIVE_INFINITY),this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}var lRe=(e,t,n,i)=>{let o=({data:r})=>{if(r.id===t){if(l(r.error)){let s=r.error;s.name==="RuntimeError"?(s=new ue(r.error.message),s.stack=r.error.stack):s.name==="DeveloperError"?(s=new fe(r.error.message),s.stack=r.error.stack):s.name==="Error"&&(s=new Error(r.error.message),s.stack=r.error.stack),LY.raiseEvent(s),i(s)}else LY.raiseEvent(),n(r.result);e.removeEventListener("message",o)}};return o},dRe=[];async function uRe(e,t,n){let i=await Promise.resolve(_$());l(n)?i||(n.length=0):n=dRe;let o=e._nextID++,r=new Promise((s,a)=>{e._worker.addEventListener("message",lRe(e._worker,o,s,a))});return e._worker.postMessage({id:o,baseUrl:tn.getCesiumBaseUrl().url,parameters:t,canTransferArrayBuffer:i},n),r}async function mRe(e,t,n){++e._activeTasks;try{let i=await uRe(e,t,n);return--e._activeTasks,i}catch(i){throw--e._activeTasks,i}}Qs.prototype.scheduleTask=function(e,t){if(l(this._worker)||(this._worker=RY(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return mRe(this,e,t)};Qs.prototype.initWebAssemblyModule=async function(e){if(l(this._webAssemblyPromise))return this._webAssemblyPromise;let t=async()=>{let n=this._worker=RY(this._workerPath),i=await cRe(this,e),o=await Promise.resolve(_$()),r,s=i.wasmBinary;l(s)&&o&&(r=[s]);let a=new Promise((c,d)=>{n.onmessage=function({data:u}){l(u)?c(u.result):d(new ue("Could not configure wasm module"))}});return n.postMessage({canTransferArrayBuffer:o,parameters:{webAssemblyConfig:i}},r),a};return this._webAssemblyPromise=t(),this._webAssemblyPromise};Qs.prototype.isDestroyed=function(){return!1};Qs.prototype.destroy=function(){return l(this._worker)&&this._worker.terminate(),me(this)};Qs.taskCompletedEvent=LY;Qs._defaultWorkerModulePrefix="Workers/";Qs._workerModulePrefix=Qs._defaultWorkerModulePrefix;Qs._canTransferArrayBuffer=void 0;var pi=Qs;function dp(){}dp._transcodeTaskProcessor=new pi("transcodeKTX2",Number.POSITIVE_INFINITY);dp._readyPromise=void 0;function hRe(){let e=dp._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(t){if(t)return dp._transcodeTaskProcessor;throw new ue("KTX2 transcoder could not be initialized.")});dp._readyPromise=e}dp.transcode=function(e,t){return l(dp._readyPromise)||hRe(),dp._readyPromise.then(function(n){let i;if(e instanceof ArrayBuffer){let o=new Uint8Array(e);return i={supportedTargetFormats:t,ktx2Buffer:o},n.scheduleTask(i,[e])}return i={supportedTargetFormats:t,ktx2Buffer:e},n.scheduleTask(i,[e.buffer])}).then(function(n){let i=n.length,o=Object.keys(n[0]),r=o.length,s;for(s=0;s{let o=({data:r})=>{if(r.id===t){if(l(r.error)){let s=r.error;s.name==="RuntimeError"?(s=new ue(r.error.message),s.stack=r.error.stack):s.name==="DeveloperError"?(s=new fe(r.error.message),s.stack=r.error.stack):s.name==="Error"&&(s=new Error(r.error.message),s.stack=r.error.stack),L3.raiseEvent(s),i(s)}else L3.raiseEvent(),n(r.result);e.removeEventListener("message",o)}};return o},cLe=[];async function lLe(e,t,n){let i=await Promise.resolve(T$());l(n)?i||(n.length=0):n=cLe;let o=e._nextID++,r=new Promise((s,a)=>{e._worker.addEventListener("message",aLe(e._worker,o,s,a))});return e._worker.postMessage({id:o,baseUrl:tn.getCesiumBaseUrl().url,parameters:t,canTransferArrayBuffer:i},n),r}async function dLe(e,t,n){++e._activeTasks;try{let i=await lLe(e,t,n);return--e._activeTasks,i}catch(i){throw--e._activeTasks,i}}js.prototype.scheduleTask=function(e,t){if(l(this._worker)||(this._worker=R3(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return dLe(this,e,t)};js.prototype.initWebAssemblyModule=async function(e){if(l(this._webAssemblyPromise))return this._webAssemblyPromise;let t=async()=>{let n=this._worker=R3(this._workerPath),i=await sLe(this,e),o=await Promise.resolve(T$()),r,s=i.wasmBinary;l(s)&&o&&(r=[s]);let a=new Promise((c,d)=>{n.onmessage=function({data:u}){l(u)?c(u.result):d(new ue("Could not configure wasm module"))}});return n.postMessage({canTransferArrayBuffer:o,parameters:{webAssemblyConfig:i}},r),a};return this._webAssemblyPromise=t(),this._webAssemblyPromise};js.prototype.isDestroyed=function(){return!1};js.prototype.destroy=function(){return l(this._worker)&&this._worker.terminate(),me(this)};js.taskCompletedEvent=L3;js._defaultWorkerModulePrefix="Workers/";js._workerModulePrefix=js._defaultWorkerModulePrefix;js._canTransferArrayBuffer=void 0;var bi=js;function lp(){}lp._transcodeTaskProcessor=new bi("transcodeKTX2",Number.POSITIVE_INFINITY);lp._readyPromise=void 0;function uLe(){let e=lp._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(t){if(t)return lp._transcodeTaskProcessor;throw new ue("KTX2 transcoder could not be initialized.")});lp._readyPromise=e}lp.transcode=function(e,t){return l(lp._readyPromise)||uLe(),lp._readyPromise.then(function(n){let i;if(e instanceof ArrayBuffer){let o=new Uint8Array(e);return i={supportedTargetFormats:t,ktx2Buffer:o},n.scheduleTask(i,[e])}return i={supportedTargetFormats:t,ktx2Buffer:e},n.scheduleTask(i,[e.buffer])}).then(function(n){let i=n.length,o=Object.keys(n[0]),r=o.length,s;for(s=0;s-1)return!0;return!1}function _Re(e){let t=e._template.components,n=e._template.source;if(l(n))e.shaderSource+=`${n} +`;function He(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=y(e.minificationFilter,on.LINEAR),this._magnificationFilter=y(e.magnificationFilter,di.LINEAR),this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,mLe(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),l(He._uniformList[this.type])||(He._uniformList[this.type]=Object.keys(this._uniforms))}He._uniformList={};He.fromType=function(e,t){let n=new He({fabric:{type:e}});if(l(t))for(let i in t)t.hasOwnProperty(i)&&(n.uniforms[i]=t[i]);return n};He.prototype.isTranslucent=function(){if(l(this.translucent))return typeof this.translucent=="function"?this.translucent():this.translucent;let e=!0,t=this._translucentFunctions,n=t.length;for(let i=0;i-1)return!0;return!1}function yLe(e){let t=e._template.components,n=e._template.source;if(l(n))e.shaderSource+=`${n} `;else{if(e.shaderSource+=`czm_material czm_getMaterial(czm_materialInput materialInput) { `,e.shaderSource+=`czm_material material = czm_getDefaultMaterial(materialInput); -`,l(t)){let i=Object.keys(e._template.materials).length>0;for(let o in t)if(t.hasOwnProperty(o))if(o==="diffuse"||o==="emission"){let s=i&&xRe(t[o],e)?t[o]:`czm_gammaCorrect(${t[o]})`;e.shaderSource+=`material.${o} = ${s}; +`,l(t)){let i=Object.keys(e._template.materials).length>0;for(let o in t)if(t.hasOwnProperty(o))if(o==="diffuse"||o==="emission"){let s=i&&gLe(t[o],e)?t[o]:`czm_gammaCorrect(${t[o]})`;e.shaderSource+=`material.${o} = ${s}; `}else o==="alpha"?e.shaderSource+=`material.alpha = ${t.alpha}; `:e.shaderSource+=`material.${o} = ${t[o]}; `}e.shaderSource+=`return material; } -`}}var V$={mat2:Qi,mat3:$,mat4:M},TRe=/\.ktx2$/i;function SRe(e){let t;return function(n,i){let o=n.uniforms,r=o[e],s=t!==r,a=!l(r)||r===Ke.DefaultImageId;t=r;let c=n._textures[e],d,u;if(r instanceof HTMLVideoElement){if(r.readyState>=2){if(s&&l(c)&&(c!==i.defaultTexture&&c.destroy(),c=void 0),!l(c)||c===i.defaultTexture){let p=new rn({minificationFilter:n._minificationFilter,magnificationFilter:n._magnificationFilter});c=new Et({context:i,source:r,sampler:p}),n._textures[e]=c;return}c.copyFrom({source:r})}else l(c)||(n._textures[e]=i.defaultTexture);return}if(r instanceof Et&&r!==c){n._texturePaths[e]=void 0;let p=n._textures[e];l(p)&&p!==n._defaultTexture&&p.destroy(),n._textures[e]=r,d=`${e}Dimensions`,o.hasOwnProperty(d)&&(u=o[d],u.x=r._width,u.y=r._height);return}if(s&&l(c)&&a&&(c!==n._defaultTexture&&c.destroy(),c=void 0),l(c)||(n._texturePaths[e]=void 0,c=n._textures[e]=n._defaultTexture,d=`${e}Dimensions`,o.hasOwnProperty(d)&&(u=o[d],u.x=c._width,u.y=c._height)),a)return;let m=r instanceof Ee;if(!l(n._texturePaths[e])||m&&r.url!==n._texturePaths[e].url||!m&&r!==n._texturePaths[e]){if(typeof r=="string"||m){let p=m?r:Ee.createIfNeeded(r),g;TRe.test(p.url)?g=yl(p.url):g=p.fetchImage(),Promise.resolve(g).then(function(f){n._loadedImages.push({id:e,image:f})}).catch(function(){l(c)&&c!==n._defaultTexture&&c.destroy(),n._textures[e]=n._defaultTexture})}else(r instanceof HTMLCanvasElement||r instanceof HTMLImageElement)&&n._loadedImages.push({id:e,image:r});n._texturePaths[e]=r}}}function CRe(e){return function(t,n){let i=t.uniforms[e];if(i instanceof Qa){let r=t._textures[e];r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,t._textures[e]=i;return}if(l(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=n.defaultCubeMap),i===Ke.DefaultCubeMapId)return;let o=i.positiveX+i.negativeX+i.positiveY+i.negativeY+i.positiveZ+i.negativeZ;if(o!==t._texturePaths[e]){let r=[Ee.createIfNeeded(i.positiveX).fetchImage(),Ee.createIfNeeded(i.negativeX).fetchImage(),Ee.createIfNeeded(i.positiveY).fetchImage(),Ee.createIfNeeded(i.negativeY).fetchImage(),Ee.createIfNeeded(i.positiveZ).fetchImage(),Ee.createIfNeeded(i.negativeZ).fetchImage()];Promise.all(r).then(function(s){t._loadedCubeMaps.push({id:e,images:s})}),t._texturePaths[e]=o}}}function VRe(e){let t=e._template.uniforms;for(let n in t)t.hasOwnProperty(n)&&L$(e,n)}function L$(e,t){let n=e._strict,i=e._template.uniforms,o=i[t],r=LRe(o),s;if(r==="channels")s=VR(e,t,o,!1);else{if(r==="sampler2D"){let d=`${t}Dimensions`;ZRe(e,d)>0&&(i[d]={type:"ivec3",x:1,y:1},L$(e,d))}if(!new RegExp(`uniform\\s+${r}\\s+${t}\\s*;`).test(e.shaderSource)){let d=`uniform ${r} ${t};`;e.shaderSource=d+e.shaderSource}let c=`${t}_${e._count++}`;if(s=VR(e,t,c),e.uniforms[t]=o,r==="sampler2D")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(SRe(t));else if(r==="samplerCube")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(CRe(t));else if(r.indexOf("mat")!==-1){let d=new V$[r];e._uniforms[c]=function(){return V$[r].fromColumnMajorArray(e.uniforms[t],d)}}else e._uniforms[c]=function(){return e.uniforms[t]}}}function LRe(e){let t=e.type;if(!l(t)){let n=typeof e;if(n==="number")t="float";else if(n==="boolean")t="bool";else if(n==="string"||e instanceof Ee||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)/^([rgba]){1,4}$/i.test(e)?t="channels":e===Ke.DefaultCubeMapId?t="samplerCube":t="sampler2D";else if(n==="object")if(Array.isArray(e))(e.length===4||e.length===9||e.length===16)&&(t=`mat${Math.sqrt(e.length)}`);else{let i=0;for(let o in e)e.hasOwnProperty(o)&&(i+=1);i>=2&&i<=4?t=`vec${i}`:i===6&&(t="samplerCube")}}return t}function RRe(e){let t=e._strict,n=e._template.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=new Ke({strict:t,fabric:n[i],count:e._count});e._count=o._count,e._uniforms=xt(e._uniforms,o._uniforms,!0),e.materials[i]=o,e._translucentFunctions=e._translucentFunctions.concat(o._translucentFunctions);let r="czm_getMaterial",s=`${r}_${e._count++}`;VR(o,r,s),e.shaderSource=o.shaderSource+e.shaderSource;let a=`${s}(materialInput)`,c=VR(e,i,a)}}function VR(e,t,n,i){i=y(i,!0);let o=0,r="([\\w])?",s=`([\\w${i?".":""}])?`,a=new RegExp(s+t+r,"g");return e.shaderSource=e.shaderSource.replace(a,function(c,d,u){return d||u?c:(o+=1,n)}),o}function ZRe(e,t,n){return VR(e,t,t,n)}Ke._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}};Ke.DefaultImageId="czm_defaultImage";Ke.DefaultCubeMapId="czm_defaultCubeMap";Ke.ColorType="Color";Ke._materialCache.addMaterial(Ke.ColorType,{fabric:{type:Ke.ColorType,uniforms:{color:new Y(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});Ke.ImageType="Image";Ke._materialCache.addMaterial(Ke.ImageType,{fabric:{type:Ke.ImageType,uniforms:{image:Ke.DefaultImageId,repeat:new D(1,1),color:new Y(1,1,1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});Ke.DiffuseMapType="DiffuseMap";Ke._materialCache.addMaterial(Ke.DiffuseMapType,{fabric:{type:Ke.DiffuseMapType,uniforms:{image:Ke.DefaultImageId,channels:"rgb",repeat:new D(1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});Ke.AlphaMapType="AlphaMap";Ke._materialCache.addMaterial(Ke.AlphaMapType,{fabric:{type:Ke.AlphaMapType,uniforms:{image:Ke.DefaultImageId,channel:"a",repeat:new D(1,1)},components:{alpha:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!0});Ke.SpecularMapType="SpecularMap";Ke._materialCache.addMaterial(Ke.SpecularMapType,{fabric:{type:Ke.SpecularMapType,uniforms:{image:Ke.DefaultImageId,channel:"r",repeat:new D(1,1)},components:{specular:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!1});Ke.EmissionMapType="EmissionMap";Ke._materialCache.addMaterial(Ke.EmissionMapType,{fabric:{type:Ke.EmissionMapType,uniforms:{image:Ke.DefaultImageId,channels:"rgb",repeat:new D(1,1)},components:{emission:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});Ke.BumpMapType="BumpMap";Ke._materialCache.addMaterial(Ke.BumpMapType,{fabric:{type:Ke.BumpMapType,uniforms:{image:Ke.DefaultImageId,channel:"r",strength:.8,repeat:new D(1,1)},source:aR},translucent:!1});Ke.NormalMapType="NormalMap";Ke._materialCache.addMaterial(Ke.NormalMapType,{fabric:{type:Ke.NormalMapType,uniforms:{image:Ke.DefaultImageId,channels:"rgb",strength:.8,repeat:new D(1,1)},source:pR},translucent:!1});Ke.GridType="Grid";Ke._materialCache.addMaterial(Ke.GridType,{fabric:{type:Ke.GridType,uniforms:{color:new Y(0,1,0,1),cellAlpha:.1,lineCount:new D(8,8),lineThickness:new D(1,1),lineOffset:new D(0,0)},source:fR},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}});Ke.StripeType="Stripe";Ke._materialCache.addMaterial(Ke.StripeType,{fabric:{type:Ke.StripeType,uniforms:{horizontal:!0,evenColor:new Y(1,1,1,.5),oddColor:new Y(0,0,1,.5),offset:0,repeat:5},source:SR},translucent:function(e){let t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}});Ke.CheckerboardType="Checkerboard";Ke._materialCache.addMaterial(Ke.CheckerboardType,{fabric:{type:Ke.CheckerboardType,uniforms:{lightColor:new Y(1,1,1,.5),darkColor:new Y(0,0,0,.5),repeat:new D(5,5)},source:cR},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});Ke.DotType="Dot";Ke._materialCache.addMaterial(Ke.DotType,{fabric:{type:Ke.DotType,uniforms:{lightColor:new Y(1,1,0,.75),darkColor:new Y(0,1,1,.75),repeat:new D(5,5)},source:lR},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});Ke.WaterType="Water";Ke._materialCache.addMaterial(Ke.WaterType,{fabric:{type:Ke.WaterType,uniforms:{baseWaterColor:new Y(.2,.3,.6,1),blendColor:new Y(0,1,.699,1),specularMap:Ke.DefaultImageId,normalMap:Ke.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:CR},translucent:function(e){let t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}});Ke.RimLightingType="RimLighting";Ke._materialCache.addMaterial(Ke.RimLightingType,{fabric:{type:Ke.RimLightingType,uniforms:{color:new Y(1,0,0,.7),rimColor:new Y(1,1,1,.4),width:.3},source:_R},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}});Ke.FadeType="Fade";Ke._materialCache.addMaterial(Ke.FadeType,{fabric:{type:Ke.FadeType,uniforms:{fadeInColor:new Y(1,0,0,1),fadeOutColor:new Y(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new D(.5,.5)},source:hR},translucent:function(e){let t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}});Ke.PolylineArrowType="PolylineArrow";Ke._materialCache.addMaterial(Ke.PolylineArrowType,{fabric:{type:Ke.PolylineArrowType,uniforms:{color:new Y(1,1,1,1)},source:bR},translucent:!0});Ke.PolylineDashType="PolylineDash";Ke._materialCache.addMaterial(Ke.PolylineDashType,{fabric:{type:Ke.PolylineDashType,uniforms:{color:new Y(1,0,1,1),gapColor:new Y(0,0,0,0),dashLength:16,dashPattern:255},source:gR},translucent:!0});Ke.PolylineGlowType="PolylineGlow";Ke._materialCache.addMaterial(Ke.PolylineGlowType,{fabric:{type:Ke.PolylineGlowType,uniforms:{color:new Y(0,.5,1,1),glowPower:.25,taperPower:1},source:yR},translucent:!0});Ke.PolylineOutlineType="PolylineOutline";Ke._materialCache.addMaterial(Ke.PolylineOutlineType,{fabric:{type:Ke.PolylineOutlineType,uniforms:{color:new Y(1,1,1,1),outlineColor:new Y(1,0,0,1),outlineWidth:1},source:xR},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}});Ke.ElevationContourType="ElevationContour";Ke._materialCache.addMaterial(Ke.ElevationContourType,{fabric:{type:Ke.ElevationContourType,uniforms:{spacing:100,color:new Y(1,0,0,1),width:1},source:uR},translucent:!1});Ke.ElevationRampType="ElevationRamp";Ke._materialCache.addMaterial(Ke.ElevationRampType,{fabric:{type:Ke.ElevationRampType,uniforms:{image:Ke.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:mR},translucent:!1});Ke.SlopeRampMaterialType="SlopeRamp";Ke._materialCache.addMaterial(Ke.SlopeRampMaterialType,{fabric:{type:Ke.SlopeRampMaterialType,uniforms:{image:Ke.DefaultImageId},source:TR},translucent:!1});Ke.AspectRampMaterialType="AspectRamp";Ke._materialCache.addMaterial(Ke.AspectRampMaterialType,{fabric:{type:Ke.AspectRampMaterialType,uniforms:{image:Ke.DefaultImageId},source:sR},translucent:!1});Ke.ElevationBandType="ElevationBand";Ke._materialCache.addMaterial(Ke.ElevationBandType,{fabric:{type:Ke.ElevationBandType,uniforms:{heights:Ke.DefaultImageId,colors:Ke.DefaultImageId},source:dR},translucent:!0});var Ai=Ke;function tx(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.translucent,!0),n=y(e.closed,!1),i=y(e.materialSupport,tx.MaterialSupport.TEXTURED);this.material=l(e.material)?e.material:Ai.fromType(Ai.ColorType),this.translucent=t,this._vertexShaderSource=y(e.vertexShaderSource,i.vertexShaderSource),this._fragmentShaderSource=y(e.fragmentShaderSource,i.fragmentShaderSource),this._renderState=ji.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._materialSupport=i,this._vertexFormat=i.vertexFormat,this._flat=y(e.flat,!1),this._faceForward=y(e.faceForward,!n)}Object.defineProperties(tx.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});tx.prototype.getFragmentShaderSource=ji.prototype.getFragmentShaderSource;tx.prototype.isTranslucent=ji.prototype.isTranslucent;tx.prototype.getRenderState=ji.prototype.getRenderState;tx.MaterialSupport={BASIC:Object.freeze({vertexFormat:We.POSITION_AND_NORMAL,vertexShaderSource:$L,fragmentShaderSource:qL}),TEXTURED:Object.freeze({vertexFormat:We.POSITION_NORMAL_AND_ST,vertexShaderSource:tR,fragmentShaderSource:eR}),ALL:Object.freeze({vertexFormat:We.ALL,vertexShaderSource:jL,fragmentShaderSource:QL})};var ro=tx;var FPt=T(S(),1);var TPt=T(S(),1),LR=`in vec3 v_positionEC; +`}}var L$={mat2:Qi,mat3:$,mat4:A},xLe=/\.ktx2$/i;function _Le(e){let t;return function(n,i){let o=n.uniforms,r=o[e],s=t!==r,a=!l(r)||r===He.DefaultImageId;t=r;let c=n._textures[e],d,u;if(r instanceof HTMLVideoElement){if(r.readyState>=2){if(s&&l(c)&&(c!==i.defaultTexture&&c.destroy(),c=void 0),!l(c)||c===i.defaultTexture){let p=new rn({minificationFilter:n._minificationFilter,magnificationFilter:n._magnificationFilter});c=new Et({context:i,source:r,sampler:p}),n._textures[e]=c;return}c.copyFrom({source:r})}else l(c)||(n._textures[e]=i.defaultTexture);return}if(r instanceof Et&&r!==c){n._texturePaths[e]=void 0;let p=n._textures[e];l(p)&&p!==n._defaultTexture&&p.destroy(),n._textures[e]=r,d=`${e}Dimensions`,o.hasOwnProperty(d)&&(u=o[d],u.x=r._width,u.y=r._height);return}if(s&&l(c)&&a&&(c!==n._defaultTexture&&c.destroy(),c=void 0),l(c)||(n._texturePaths[e]=void 0,c=n._textures[e]=n._defaultTexture,d=`${e}Dimensions`,o.hasOwnProperty(d)&&(u=o[d],u.x=c._width,u.y=c._height)),a)return;let m=r instanceof Ee;if(!l(n._texturePaths[e])||m&&r.url!==n._texturePaths[e].url||!m&&r!==n._texturePaths[e]){if(typeof r=="string"||m){let p=m?r:Ee.createIfNeeded(r),g;xLe.test(p.url)?g=gl(p.url):g=p.fetchImage(),Promise.resolve(g).then(function(f){n._loadedImages.push({id:e,image:f})}).catch(function(){l(c)&&c!==n._defaultTexture&&c.destroy(),n._textures[e]=n._defaultTexture})}else(r instanceof HTMLCanvasElement||r instanceof HTMLImageElement)&&n._loadedImages.push({id:e,image:r});n._texturePaths[e]=r}}}function SLe(e){return function(t,n){let i=t.uniforms[e];if(i instanceof ja){let r=t._textures[e];r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,t._textures[e]=i;return}if(l(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=n.defaultCubeMap),i===He.DefaultCubeMapId)return;let o=i.positiveX+i.negativeX+i.positiveY+i.negativeY+i.positiveZ+i.negativeZ;if(o!==t._texturePaths[e]){let r=[Ee.createIfNeeded(i.positiveX).fetchImage(),Ee.createIfNeeded(i.negativeX).fetchImage(),Ee.createIfNeeded(i.positiveY).fetchImage(),Ee.createIfNeeded(i.negativeY).fetchImage(),Ee.createIfNeeded(i.positiveZ).fetchImage(),Ee.createIfNeeded(i.negativeZ).fetchImage()];Promise.all(r).then(function(s){t._loadedCubeMaps.push({id:e,images:s})}),t._texturePaths[e]=o}}}function TLe(e){let t=e._template.uniforms;for(let n in t)t.hasOwnProperty(n)&&R$(e,n)}function R$(e,t){let n=e._strict,i=e._template.uniforms,o=i[t],r=CLe(o),s;if(r==="channels")s=VL(e,t,o,!1);else{if(r==="sampler2D"){let d=`${t}Dimensions`;ZLe(e,d)>0&&(i[d]={type:"ivec3",x:1,y:1},R$(e,d))}if(!new RegExp(`uniform\\s+${r}\\s+${t}\\s*;`).test(e.shaderSource)){let d=`uniform ${r} ${t};`;e.shaderSource=d+e.shaderSource}let c=`${t}_${e._count++}`;if(s=VL(e,t,c),e.uniforms[t]=o,r==="sampler2D")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(_Le(t));else if(r==="samplerCube")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(SLe(t));else if(r.indexOf("mat")!==-1){let d=new L$[r];e._uniforms[c]=function(){return L$[r].fromColumnMajorArray(e.uniforms[t],d)}}else e._uniforms[c]=function(){return e.uniforms[t]}}}function CLe(e){let t=e.type;if(!l(t)){let n=typeof e;if(n==="number")t="float";else if(n==="boolean")t="bool";else if(n==="string"||e instanceof Ee||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)/^([rgba]){1,4}$/i.test(e)?t="channels":e===He.DefaultCubeMapId?t="samplerCube":t="sampler2D";else if(n==="object")if(Array.isArray(e))(e.length===4||e.length===9||e.length===16)&&(t=`mat${Math.sqrt(e.length)}`);else{let i=0;for(let o in e)e.hasOwnProperty(o)&&(i+=1);i>=2&&i<=4?t=`vec${i}`:i===6&&(t="samplerCube")}}return t}function VLe(e){let t=e._strict,n=e._template.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=new He({strict:t,fabric:n[i],count:e._count});e._count=o._count,e._uniforms=xt(e._uniforms,o._uniforms,!0),e.materials[i]=o,e._translucentFunctions=e._translucentFunctions.concat(o._translucentFunctions);let r="czm_getMaterial",s=`${r}_${e._count++}`;VL(o,r,s),e.shaderSource=o.shaderSource+e.shaderSource;let a=`${s}(materialInput)`,c=VL(e,i,a)}}function VL(e,t,n,i){i=y(i,!0);let o=0,r="([\\w])?",s=`([\\w${i?".":""}])?`,a=new RegExp(s+t+r,"g");return e.shaderSource=e.shaderSource.replace(a,function(c,d,u){return d||u?c:(o+=1,n)}),o}function ZLe(e,t,n){return VL(e,t,t,n)}He._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}};He.DefaultImageId="czm_defaultImage";He.DefaultCubeMapId="czm_defaultCubeMap";He.ColorType="Color";He._materialCache.addMaterial(He.ColorType,{fabric:{type:He.ColorType,uniforms:{color:new Y(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});He.ImageType="Image";He._materialCache.addMaterial(He.ImageType,{fabric:{type:He.ImageType,uniforms:{image:He.DefaultImageId,repeat:new D(1,1),color:new Y(1,1,1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});He.DiffuseMapType="DiffuseMap";He._materialCache.addMaterial(He.DiffuseMapType,{fabric:{type:He.DiffuseMapType,uniforms:{image:He.DefaultImageId,channels:"rgb",repeat:new D(1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});He.AlphaMapType="AlphaMap";He._materialCache.addMaterial(He.AlphaMapType,{fabric:{type:He.AlphaMapType,uniforms:{image:He.DefaultImageId,channel:"a",repeat:new D(1,1)},components:{alpha:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!0});He.SpecularMapType="SpecularMap";He._materialCache.addMaterial(He.SpecularMapType,{fabric:{type:He.SpecularMapType,uniforms:{image:He.DefaultImageId,channel:"r",repeat:new D(1,1)},components:{specular:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!1});He.EmissionMapType="EmissionMap";He._materialCache.addMaterial(He.EmissionMapType,{fabric:{type:He.EmissionMapType,uniforms:{image:He.DefaultImageId,channels:"rgb",repeat:new D(1,1)},components:{emission:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});He.BumpMapType="BumpMap";He._materialCache.addMaterial(He.BumpMapType,{fabric:{type:He.BumpMapType,uniforms:{image:He.DefaultImageId,channel:"r",strength:.8,repeat:new D(1,1)},source:aL},translucent:!1});He.NormalMapType="NormalMap";He._materialCache.addMaterial(He.NormalMapType,{fabric:{type:He.NormalMapType,uniforms:{image:He.DefaultImageId,channels:"rgb",strength:.8,repeat:new D(1,1)},source:pL},translucent:!1});He.GridType="Grid";He._materialCache.addMaterial(He.GridType,{fabric:{type:He.GridType,uniforms:{color:new Y(0,1,0,1),cellAlpha:.1,lineCount:new D(8,8),lineThickness:new D(1,1),lineOffset:new D(0,0)},source:fL},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}});He.StripeType="Stripe";He._materialCache.addMaterial(He.StripeType,{fabric:{type:He.StripeType,uniforms:{horizontal:!0,evenColor:new Y(1,1,1,.5),oddColor:new Y(0,0,1,.5),offset:0,repeat:5},source:TL},translucent:function(e){let t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}});He.CheckerboardType="Checkerboard";He._materialCache.addMaterial(He.CheckerboardType,{fabric:{type:He.CheckerboardType,uniforms:{lightColor:new Y(1,1,1,.5),darkColor:new Y(0,0,0,.5),repeat:new D(5,5)},source:cL},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});He.DotType="Dot";He._materialCache.addMaterial(He.DotType,{fabric:{type:He.DotType,uniforms:{lightColor:new Y(1,1,0,.75),darkColor:new Y(0,1,1,.75),repeat:new D(5,5)},source:lL},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});He.WaterType="Water";He._materialCache.addMaterial(He.WaterType,{fabric:{type:He.WaterType,uniforms:{baseWaterColor:new Y(.2,.3,.6,1),blendColor:new Y(0,1,.699,1),specularMap:He.DefaultImageId,normalMap:He.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:CL},translucent:function(e){let t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}});He.RimLightingType="RimLighting";He._materialCache.addMaterial(He.RimLightingType,{fabric:{type:He.RimLightingType,uniforms:{color:new Y(1,0,0,.7),rimColor:new Y(1,1,1,.4),width:.3},source:_L},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}});He.FadeType="Fade";He._materialCache.addMaterial(He.FadeType,{fabric:{type:He.FadeType,uniforms:{fadeInColor:new Y(1,0,0,1),fadeOutColor:new Y(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new D(.5,.5)},source:hL},translucent:function(e){let t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}});He.PolylineArrowType="PolylineArrow";He._materialCache.addMaterial(He.PolylineArrowType,{fabric:{type:He.PolylineArrowType,uniforms:{color:new Y(1,1,1,1)},source:bL},translucent:!0});He.PolylineDashType="PolylineDash";He._materialCache.addMaterial(He.PolylineDashType,{fabric:{type:He.PolylineDashType,uniforms:{color:new Y(1,0,1,1),gapColor:new Y(0,0,0,0),dashLength:16,dashPattern:255},source:gL},translucent:!0});He.PolylineGlowType="PolylineGlow";He._materialCache.addMaterial(He.PolylineGlowType,{fabric:{type:He.PolylineGlowType,uniforms:{color:new Y(0,.5,1,1),glowPower:.25,taperPower:1},source:yL},translucent:!0});He.PolylineOutlineType="PolylineOutline";He._materialCache.addMaterial(He.PolylineOutlineType,{fabric:{type:He.PolylineOutlineType,uniforms:{color:new Y(1,1,1,1),outlineColor:new Y(1,0,0,1),outlineWidth:1},source:xL},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}});He.ElevationContourType="ElevationContour";He._materialCache.addMaterial(He.ElevationContourType,{fabric:{type:He.ElevationContourType,uniforms:{spacing:100,color:new Y(1,0,0,1),width:1},source:uL},translucent:!1});He.ElevationRampType="ElevationRamp";He._materialCache.addMaterial(He.ElevationRampType,{fabric:{type:He.ElevationRampType,uniforms:{image:He.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:mL},translucent:!1});He.SlopeRampMaterialType="SlopeRamp";He._materialCache.addMaterial(He.SlopeRampMaterialType,{fabric:{type:He.SlopeRampMaterialType,uniforms:{image:He.DefaultImageId},source:SL},translucent:!1});He.AspectRampMaterialType="AspectRamp";He._materialCache.addMaterial(He.AspectRampMaterialType,{fabric:{type:He.AspectRampMaterialType,uniforms:{image:He.DefaultImageId},source:sL},translucent:!1});He.ElevationBandType="ElevationBand";He._materialCache.addMaterial(He.ElevationBandType,{fabric:{type:He.ElevationBandType,uniforms:{heights:He.DefaultImageId,colors:He.DefaultImageId},source:dL},translucent:!0});var Mi=He;function ex(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.translucent,!0),n=y(e.closed,!1),i=y(e.materialSupport,ex.MaterialSupport.TEXTURED);this.material=l(e.material)?e.material:Mi.fromType(Mi.ColorType),this.translucent=t,this._vertexShaderSource=y(e.vertexShaderSource,i.vertexShaderSource),this._fragmentShaderSource=y(e.fragmentShaderSource,i.fragmentShaderSource),this._renderState=ji.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._materialSupport=i,this._vertexFormat=i.vertexFormat,this._flat=y(e.flat,!1),this._faceForward=y(e.faceForward,!n)}Object.defineProperties(ex.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});ex.prototype.getFragmentShaderSource=ji.prototype.getFragmentShaderSource;ex.prototype.isTranslucent=ji.prototype.isTranslucent;ex.prototype.getRenderState=ji.prototype.getRenderState;ex.MaterialSupport={BASIC:Object.freeze({vertexFormat:Xe.POSITION_AND_NORMAL,vertexShaderSource:$Z,fragmentShaderSource:qZ}),TEXTURED:Object.freeze({vertexFormat:Xe.POSITION_NORMAL_AND_ST,vertexShaderSource:tL,fragmentShaderSource:eL}),ALL:Object.freeze({vertexFormat:Xe.ALL,vertexShaderSource:jZ,fragmentShaderSource:QZ})};var so=ex;var IPt=S(T(),1);var bPt=S(T(),1),ZL=`in vec3 v_positionEC; in vec3 v_normalEC; in vec4 v_color; @@ -840,7 +840,7 @@ void main() out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC); } -`;var CPt=T(S(),1),RR=`in vec3 position3DHigh; +`;var yPt=S(T(),1),LL=`in vec3 position3DHigh; in vec3 position3DLow; in vec3 normal; in vec4 color; @@ -860,13 +860,13 @@ void main() gl_Position = czm_modelViewProjectionRelativeToEye * p; } -`;var LPt=T(S(),1),nx=`in vec4 v_color; +`;var _Pt=S(T(),1),tx=`in vec4 v_color; void main() { out_FragColor = czm_gammaCorrect(v_color); } -`;var ZPt=T(S(),1),ZR=`in vec3 position3DHigh; +`;var TPt=S(T(),1),RL=`in vec3 position3DHigh; in vec3 position3DLow; in vec4 color; in float batchId; @@ -881,10 +881,10 @@ void main() gl_Position = czm_modelViewProjectionRelativeToEye * p; } -`;function up(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.translucent,!0),n=y(e.closed,!1),i=y(e.flat,!1),o=i?ZR:RR,r=i?nx:LR,s=i?up.FLAT_VERTEX_FORMAT:up.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=y(e.vertexShaderSource,o),this._fragmentShaderSource=y(e.fragmentShaderSource,r),this._renderState=ji.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=s,this._flat=i,this._faceForward=y(e.faceForward,!n)}Object.defineProperties(up.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});up.VERTEX_FORMAT=We.POSITION_AND_NORMAL;up.FLAT_VERTEX_FORMAT=We.POSITION_ONLY;up.prototype.getFragmentShaderSource=ji.prototype.getFragmentShaderSource;up.prototype.isTranslucent=ji.prototype.isTranslucent;up.prototype.getRenderState=ji.prototype.getRenderState;var ln=up;var BPt=T(S(),1);function DS(e){this._definitionChanged=new ge,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(DS.prototype,{isConstant:{get:function(){return K.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:de("color")});DS.prototype.getType=function(e){return"Color"};DS.prototype.getValue=function(e,t){return l(t)||(t={}),t.color=K.getValueOrClonedDefault(this._color,e,Y.WHITE,t.color),t};DS.prototype.equals=function(e){return this===e||e instanceof DS&&K.equals(this._color,e._color)};var Ut=DS;var XHt=T(S(),1);var dHt=T(S(),1);var uvt=T(S(),1);var qPt=T(S(),1);function Zb(e){e=y(e,y.EMPTY_OBJECT),this._ellipsoid=y(e.ellipsoid,ie.WGS84),this._rectangle=y(e.rectangle,ce.MAX_VALUE),this._projection=new Si(this._ellipsoid),this._numberOfLevelZeroTilesX=y(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=y(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(Zb.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});Zb.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<=o&&(d=o-1);let u=(i.north-e.latitude)/a|0;return u>=r&&(u=r-1),l(n)?(n.x=d,n.y=u,n):new D(d,u)};var Mi=Zb;var R$=new h,Z$=new h,G$=new he,GY=new h,GRe=new h,E$=new le,ERe=new Mi,GR=[new he,new he,new he,new he],ER=new D,kr={};kr.initialize=function(){let e=kr._initPromise;return l(e)||(e=Ee.fetchJson(tn("Assets/approximateTerrainHeights.json")).then(function(t){kr._terrainHeights=t}),kr._initPromise=e),e};kr.getMinimumMaximumHeights=function(e,t){t=y(t,ie.WGS84);let n=X$(e),i=kr._defaultMinTerrainHeight,o=kr._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=kr._terrainHeights[r];l(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(ce.northeast(e,G$),R$),t.cartographicToCartesian(ce.southwest(e,G$),Z$),h.midpoint(Z$,R$,GY);let a=t.scaleToGeodeticSurface(GY,GRe);if(l(a)){let c=h.distance(GY,a);i=Math.min(i,-c)}else i=kr._defaultMinTerrainHeight}return i=Math.max(kr._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}};kr.getBoundingSphere=function(e,t){t=y(t,ie.WGS84);let n=X$(e),i=kr._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=kr._terrainHeights[r];l(s)&&(i=s[1])}let o=le.fromRectangle3D(e,t,0);return le.fromRectangle3D(e,t,i,E$),le.union(o,E$,o)};function X$(e){he.fromRadians(e.east,e.north,0,GR[0]),he.fromRadians(e.west,e.north,0,GR[1]),he.fromRadians(e.east,e.south,0,GR[2]),he.fromRadians(e.west,e.south,0,GR[3]);let t=0,n=0,i=0,o=0,r=kr._terrainHeightsMaxLevel,s;for(s=0;s<=r;++s){let a=!1;for(let c=0;c<4;++c){let d=GR[c];if(ERe.positionToTileXY(d,s,ER),c===0)i=ER.x,o=ER.y;else if(i!==ER.x||o!==ER.y){a=!0;break}}if(a)break;t=i,n=o}if(s!==0)return{x:t,y:n,level:s>r?r:s-1}}kr._terrainHeightsMaxLevel=6;kr._defaultMaxTerrainHeight=9e3;kr._defaultMinTerrainHeight=-1e5;kr._terrainHeights=void 0;kr._initPromise=void 0;Object.defineProperties(kr,{initialized:{get:function(){return l(kr._terrainHeights)}}});var ci=kr;var Gwt=T(S(),1);var uwt=T(S(),1);var gvt=T(S(),1);function Pc(e,t,n){this.minimum=h.clone(y(e,h.ZERO)),this.maximum=h.clone(y(t,h.ZERO)),l(n)?n=h.clone(n):n=h.midpoint(this.minimum,this.maximum,new h),this.center=n}Pc.fromCorners=function(e,t,n){return l(n)||(n=new Pc),n.minimum=h.clone(e,n.minimum),n.maximum=h.clone(t,n.maximum),n.center=h.midpoint(e,t,n.center),n};Pc.fromPoints=function(e,t){if(l(t)||(t=new Pc),!l(e)||e.length===0)return t.minimum=h.clone(h.ZERO,t.minimum),t.maximum=h.clone(h.ZERO,t.maximum),t.center=h.clone(h.ZERO,t.center),t;let n=e[0].x,i=e[0].y,o=e[0].z,r=e[0].x,s=e[0].y,a=e[0].z,c=e.length;for(let m=1;m0?Kt.INSIDE:r+o<0?Kt.OUTSIDE:Kt.INTERSECTING};Pc.prototype.clone=function(e){return Pc.clone(this,e)};Pc.prototype.intersectPlane=function(e){return Pc.intersectPlane(this,e)};Pc.prototype.equals=function(e){return Pc.equals(this,e)};var Gb=Pc;var Ovt=T(S(),1);var _vt=T(S(),1);var EY={};EY.computeDiscriminant=function(e,t,n){return t*t-4*e*n};function I$(e,t,n){let i=e+t;return W.sign(e)!==W.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))d&&d/c0?[a/e,n/a]:[n/a,a/e]};var vc=EY;var Gvt=T(S(),1);var Cvt=T(S(),1);var IY={};IY.computeDiscriminant=function(e,t,n,i){let o=e*e,r=t*t,s=n*n,a=i*i;return 18*e*t*n*i+r*s-27*o*a-4*(e*s*n+r*t*i)};function XY(e,t,n,i){let o=e,r=t/3,s=n/3,a=i,c=o*s,d=r*a,u=r*r,m=s*s,p=o*s-u,g=o*a-r*s,f=r*a-m,x=4*p*f-g*g,_,C;if(x<0){let J,H,ee;u*d>=c*m?(J=o,H=p,ee=-2*r*p+o*g):(J=a,H=f,ee=-a*g+2*s*f);let j=-(ee<0?-1:1)*Math.abs(J)*Math.sqrt(-x);C=-ee+j;let q=C/2,be=q<0?-Math.pow(-q,1/3):Math.pow(q,1/3),Te=C===j?-be:-H/be;return _=H<=0?be+Te:-ee/(be*be+Te*Te+H),u*d>=c*m?[(_-r)/o]:[-a/(_+s)]}let V=p,L=-2*r*p+o*g,Z=f,G=-a*g+2*s*f,X=Math.sqrt(x),v=Math.sqrt(3)/2,P=Math.abs(Math.atan2(o*X,-L)/3);_=2*Math.sqrt(-V);let F=Math.cos(P);C=_*F;let A=_*(-F/2-v*Math.sin(P)),b=C+A>2*r?C-r:A-r,R=o,E=b/R;P=Math.abs(Math.atan2(a*X,-G)/3),_=2*Math.sqrt(-Z),F=Math.cos(P),C=_*F,A=_*(-F/2-v*Math.sin(P));let I=-a,w=C+A<2*s?C+s:A+s,N=I/w,B=R*w,U=-b*w-R*I,O=b*I,k=(s*U-r*O)/(-r*U+s*B);return E<=k?E<=N?k<=N?[E,k,N]:[E,N,k]:[N,E,k]:E<=N?[k,E,N]:k<=N?[k,N,E]:[N,k,E]}IY.computeRealRoots=function(e,t,n,i){let o,r;if(e===0)return vc.computeRealRoots(t,n,i);if(t===0){if(n===0){if(i===0)return[0,0,0];r=-i/e;let s=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[s,s,s]}else if(i===0)return o=vc.computeRealRoots(e,0,n),o.Length===0?[0]:[o[0],0,o[1]];return XY(e,0,n,i)}else{if(n===0)return i===0?(r=-t/e,r<0?[r,0,0]:[0,0,r]):XY(e,t,0,i);if(i===0)return o=vc.computeRealRoots(e,t,n),o.length===0?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]}return XY(e,t,n,i)};var ix=IY;var WY={};WY.computeDiscriminant=function(e,t,n,i,o){let r=e*e,s=r*e,a=t*t,c=a*t,d=n*n,u=d*n,m=i*i,p=m*i,g=o*o,f=g*o;return a*d*m-4*c*p-4*e*u*m+18*e*t*n*p-27*r*m*m+256*s*f+o*(18*c*n*i-4*a*u+16*e*d*d-80*e*t*d*i-6*e*a*m+144*r*n*m)+g*(144*e*a*n-27*a*a-128*r*d-192*r*t*i)};function gm(e,t,n,i){let o=e*e,r=t-3*o/8,s=n-t*e/2+o*e/8,a=i-n*e/4+t*o/16-3*o*o/256,c=ix.computeRealRoots(1,2*r,r*r-4*a,-s*s);if(c.length>0){let d=-e/4,u=c[c.length-1];if(Math.abs(u)=0&&g>=0){let x=Math.sqrt(p),_=Math.sqrt(g);return[d-_,d-x,d+x,d+_]}else{if(p>=0&&g<0)return f=Math.sqrt(p),[d-f,d+f];if(p<0&&g>=0)return f=Math.sqrt(g),[d-f,d+f]}}return[]}else if(u>0){let m=Math.sqrt(u),p=(r+u-s/m)/2,g=(r+u+s/m)/2,f=vc.computeRealRoots(1,m,p),x=vc.computeRealRoots(1,-m,g);return f.length!==0?(f[0]+=d,f[1]+=d,x.length!==0?(x[0]+=d,x[1]+=d,f[1]<=x[0]?[f[0],f[1],x[0],x[1]]:x[1]<=f[0]?[x[0],x[1],f[0],f[1]]:f[0]>=x[0]&&f[1]<=x[1]?[x[0],f[0],f[1],x[1]]:x[0]>=f[0]&&x[1]<=f[1]?[f[0],x[0],x[1],f[1]]:f[0]>x[0]&&f[0]0){let m=u[0],p=t-m,g=p*p,f=e/2,x=p/2,_=g-4*i,C=g+4*Math.abs(i),V=s-4*m,L=s+4*Math.abs(m),Z,G;if(m<0||_*L=b[0]&&A[1]<=b[1]?[b[0],A[0],A[1],b[1]]:b[0]>=A[0]&&b[1]<=A[1]?[A[0],b[0],b[1],A[1]]:A[0]>b[0]&&A[0]u)||(p=h.cross(m,a,P$),f=h.dot(s,p),f<0||g+f>u))return;x=h.dot(c,p)/u}else{if(Math.abs(u)1||(p=h.cross(m,a,P$),f=h.dot(s,p)*_,f<0||g+f>1))return;x=h.dot(c,p)*_}return x};Wo.rayTriangle=function(e,t,n,i,o,r){let s=Wo.rayTriangleParametric(e,t,n,i,o);if(!(!l(s)||s<0))return l(r)||(r=new h),h.multiplyByScalar(e.direction,s,r),h.add(e.origin,r,r)};var WRe=new pn;Wo.lineSegmentTriangle=function(e,t,n,i,o,r,s){let a=WRe;h.clone(e,a.origin),h.subtract(t,e,a.direction),h.normalize(a.direction,a.direction);let c=Wo.rayTriangleParametric(a,n,i,o,r);if(!(!l(c)||c<0||c>h.distance(e,t)))return l(s)||(s=new h),h.multiplyByScalar(a.direction,c,s),h.add(a.origin,s,s)};function PRe(e,t,n,i){let o=t*t-4*e*n;if(o<0)return;if(o>0){let s=1/(2*e),a=Math.sqrt(o),c=(-t+a)*s,d=(-t-a)*s;return cs))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,s),i};var FRe=new h,ARe=new h;Wo.rayEllipsoid=function(e,t){let n=t.oneOverRadii,i=h.multiplyComponents(n,e.origin,FRe),o=h.multiplyComponents(n,e.direction,ARe),r=h.magnitudeSquared(i),s=h.dot(i,o),a,c,d,u,m;if(r>1){if(s>=0)return;let p=s*s;if(a=r-1,c=h.magnitudeSquared(o),d=c*a,pd){u=s*s-d,m=-s+Math.sqrt(u);let f=m/c,x=a/m;return f0?g.push(new h(i,o*F,o*-R)):R!==0?(g.push(new h(i,o*F,o*-R)),g.push(new h(i,o*F,o*R)),++P):g.push(new h(i,o*F,o*R))}return g};var PY=new h,v$=new h,w$=new h,sN=new h,MRe=new h,NRe=new $,kRe=new $,URe=new $,DRe=new $,BRe=new $,F$=new $,A$=new $,M$=new h,YRe=new h,ORe=new he;Wo.grazingAltitudeLocation=function(e,t){let n=e.origin,i=e.direction;if(!h.equals(n,h.ZERO)){let X=t.geodeticSurfaceNormal(n,PY);if(h.dot(i,X)>=0)return n}let o=l(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,PY),s=h.normalize(r,r),a=h.mostOrthogonalAxis(r,sN),c=h.normalize(h.cross(a,s,v$),v$),d=h.normalize(h.cross(s,c,w$),w$),u=NRe;u[0]=s.x,u[1]=s.y,u[2]=s.z,u[3]=c.x,u[4]=c.y,u[5]=c.z,u[6]=d.x,u[7]=d.y,u[8]=d.z;let m=$.transpose(u,kRe),p=$.fromScale(t.radii,URe),g=$.fromScale(t.oneOverRadii,DRe),f=BRe;f[0]=0,f[1]=-i.z,f[2]=i.y,f[3]=i.z,f[4]=0,f[5]=-i.x,f[6]=-i.y,f[7]=i.x,f[8]=0;let x=$.multiply($.multiply(m,g,F$),f,F$),_=$.multiply($.multiply(x,p,A$),u,A$),C=$.multiplyByVector(x,n,MRe),V=Wo.quadraticVectorExpression(_,h.negate(C,PY),0,0,1),L,Z,G=V.length;if(G>0){let X=h.clone(h.ZERO,YRe),v=Number.NEGATIVE_INFINITY;for(let F=0;Fv&&(v=b,X=h.clone(L,X))}let P=t.cartesianToCartographic(X,ORe);return v=W.clamp(v,0,1),Z=h.magnitude(h.subtract(X,n,sN))*Math.sqrt(1-v*v),Z=o?-Z:Z,P.height=Z,t.cartographicToCartesian(P,new h)}};var HRe=new h;Wo.lineSegmentPlane=function(e,t,n,i){l(i)||(i=new h);let o=h.subtract(t,e,HRe),r=n.normal,s=h.dot(r,o);if(Math.abs(s)1))return h.multiplyByScalar(o,c,i),h.add(e,i,i),i};Wo.trianglePlaneIntersection=function(e,t,n,i){let o=i.normal,r=i.distance,s=h.dot(o,e)+r<0,a=h.dot(o,t)+r<0,c=h.dot(o,n)+r<0,d=0;d+=s?1:0,d+=a?1:0,d+=c?1:0;let u,m;if((d===1||d===2)&&(u=new h,m=new h),d===1){if(s)return Wo.lineSegmentPlane(e,t,i,u),Wo.lineSegmentPlane(e,n,i,m),{positions:[e,t,n,u,m],indices:[0,3,4,1,2,4,1,4,3]};if(a)return Wo.lineSegmentPlane(t,n,i,u),Wo.lineSegmentPlane(t,e,i,m),{positions:[e,t,n,u,m],indices:[1,3,4,2,0,4,2,4,3]};if(c)return Wo.lineSegmentPlane(n,e,i,u),Wo.lineSegmentPlane(n,t,i,m),{positions:[e,t,n,u,m],indices:[2,3,4,0,1,4,0,4,3]}}else if(d===2)if(s)if(a){if(!c)return Wo.lineSegmentPlane(e,n,i,u),Wo.lineSegmentPlane(t,n,i,m),{positions:[e,t,n,u,m],indices:[0,1,4,0,4,3,2,3,4]}}else return Wo.lineSegmentPlane(n,t,i,u),Wo.lineSegmentPlane(e,t,i,m),{positions:[e,t,n,u,m],indices:[2,0,4,2,4,3,1,3,4]};else return Wo.lineSegmentPlane(t,e,i,u),Wo.lineSegmentPlane(n,e,i,m),{positions:[e,t,n,u,m],indices:[1,2,4,1,4,3,0,3,4]}};var jn=Wo;var jvt=T(S(),1);function Zs(e,t){this.normal=h.clone(e),this.distance=t}Zs.fromPointNormal=function(e,t,n){let i=-h.dot(t,e);return l(n)?(h.clone(t,n.normal),n.distance=i,n):new Zs(t,i)};var zRe=new h;Zs.fromCartesian4=function(e,t){let n=h.fromCartesian4(e,zRe),i=e.w;return l(t)?(h.clone(n,t.normal),t.distance=i,t):new Zs(n,i)};Zs.getPointDistance=function(e,t){return h.dot(e.normal,t)+e.distance};var KRe=new h;Zs.projectPointOntoPlane=function(e,t,n){l(n)||(n=new h);let i=Zs.getPointDistance(e,t),o=h.multiplyByScalar(e.normal,i,KRe);return h.subtract(t,o,n)};var JRe=new M,QRe=new se,jRe=new h;Zs.transform=function(e,t,n){let i=e.normal,o=e.distance,r=M.inverseTranspose(t,JRe),s=se.fromElements(i.x,i.y,i.z,o,QRe);s=M.multiplyByVector(r,s,s);let a=h.fromCartesian4(s,jRe);return s=se.divideByScalar(s,h.magnitude(a),s),Zs.fromCartesian4(s,n)};Zs.clone=function(e,t){return l(t)?(h.clone(e.normal,t.normal),t.distance=e.distance,t):new Zs(e.normal,e.distance)};Zs.equals=function(e,t){return e.distance===t.distance&&h.equals(e.normal,t.normal)};Zs.ORIGIN_XY_PLANE=Object.freeze(new Zs(h.UNIT_Z,0));Zs.ORIGIN_YZ_PLANE=Object.freeze(new Zs(h.UNIT_X,0));Zs.ORIGIN_ZX_PLANE=Object.freeze(new Zs(h.UNIT_Y,0));var dn=Zs;var vY=new se;function Yh(e,t){t=y(t,ie.WGS84),e=t.scaleToGeodeticSurface(e);let n=Gt.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=h.fromCartesian4(M.getColumn(n,0,vY)),this._yAxis=h.fromCartesian4(M.getColumn(n,1,vY));let i=h.fromCartesian4(M.getColumn(n,2,vY));this._plane=dn.fromPointNormal(e,i)}Object.defineProperties(Yh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var qRe=new Gb;Yh.fromPoints=function(e,t){let n=Gb.fromPoints(e,qRe);return new Yh(n.center,t)};var U$=new pn,aN=new h;Yh.prototype.projectPointOntoPlane=function(e,t){let n=U$;n.origin=e,h.normalize(e,n.direction);let i=jn.rayPlane(n,this._plane,aN);if(l(i)||(h.negate(n.direction,n.direction),i=jn.rayPlane(n,this._plane,aN)),l(i)){let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),s=h.dot(this._yAxis,o);return l(t)?(t.x=r,t.y=s,t):new D(r,s)}};Yh.prototype.projectPointsOntoPlane=function(e,t){l(t)||(t=[]);let n=0,i=e.length;for(let o=0;o0?0:v.latitude,R=he.fromRadians(A,e.north,n,dZe),E=he.fromRadians(e.west,e.north,n,uZe),I=he.fromRadians(e.west,b,n,mZe),w=he.fromRadians(e.west,e.south,n,hZe),N=he.fromRadians(A,e.south,n,fZe),B=i.cartographicToCartesian(R,pZe),U=i.cartographicToCartesian(E,Y$),O=i.cartographicToCartesian(I,bZe),k=i.cartographicToCartesian(w,O$),J=i.cartographicToCartesian(N,gZe),H=F.projectPointToNearestOnPlane(B,yZe),ee=F.projectPointToNearestOnPlane(U,xZe),z=F.projectPointToNearestOnPlane(O,_Ze),j=F.projectPointToNearestOnPlane(k,TZe),q=F.projectPointToNearestOnPlane(J,SZe);return r=Math.min(ee.x,z.x,j.x),s=-r,c=Math.max(ee.y,H.y),a=Math.min(j.y,q.y),E.height=w.height=t,U=i.cartographicToCartesian(E,Y$),k=i.cartographicToCartesian(w,O$),d=Math.min(dn.getPointDistance(m,U),dn.getPointDistance(m,k)),u=n,D$(F.origin,F.xAxis,F.yAxis,F.zAxis,r,s,a,c,d,u,o)}let p=e.south>0,g=e.north<0,f=p?e.south:g?e.north:0,x=ce.center(e,B$).longitude,_=h.fromRadians(x,f,n,i,CZe);_.z=0;let V=Math.abs(_.x)=c?Kt.INSIDE:Kt.INTERSECTING};var K$=new h,J$=new h,Q$=new h,WZe=new h,H$=new h,PZe=new h;Wi.distanceSquaredTo=function(e,t){let n=h.subtract(t,e.center,z$),i=e.halfAxes,o=$.getColumn(i,0,K$),r=$.getColumn(i,1,J$),s=$.getColumn(i,2,Q$),a=h.magnitude(o),c=h.magnitude(r),d=h.magnitude(s),u=!0,m=!0,p=!0;a>0?h.divideByScalar(o,a,o):u=!1,c>0?h.divideByScalar(r,c,r):m=!1,d>0?h.divideByScalar(s,d,s):p=!1;let g=!u+!m+!p,f,x,_;if(g===1){let Z=o;f=r,x=s,m?p||(Z=s,x=o):(Z=r,f=o),_=h.cross(f,x,H$),Z===o?o=_:Z===r?r=_:Z===s&&(s=_)}else if(g===2){f=o,m?f=r:p&&(f=s);let Z=h.UNIT_Y;Z.equalsEpsilon(f,W.EPSILON3)&&(Z=h.UNIT_X),x=h.cross(f,Z,WZe),h.normalize(x,x),_=h.cross(f,x,H$),h.normalize(_,_),f===o?(r=x,s=_):f===r?(s=x,o=_):f===s&&(o=x,r=_)}else g===3&&(o=h.UNIT_X,r=h.UNIT_Y,s=h.UNIT_Z);let C=PZe;C.x=h.dot(n,o),C.y=h.dot(n,r),C.z=h.dot(n,s);let V=0,L;return C.x<-a?(L=C.x+a,V+=L*L):C.x>a&&(L=C.x-a,V+=L*L),C.y<-c?(L=C.y+c,V+=L*L):C.y>c&&(L=C.y-c,V+=L*L),C.z<-d?(L=C.z+d,V+=L*L):C.z>d&&(L=C.z-d,V+=L*L),V};var vZe=new h,wZe=new h;Wi.computePlaneDistances=function(e,t,n,i){l(i)||(i=new _a);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=e.center,a=e.halfAxes,c=$.getColumn(a,0,K$),d=$.getColumn(a,1,J$),u=$.getColumn(a,2,Q$),m=h.add(c,d,vZe);h.add(m,u,m),h.add(m,s,m);let p=h.subtract(m,t,wZe),g=h.dot(n,p);return o=Math.min(g,o),r=Math.max(g,r),h.add(s,c,m),h.add(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.add(s,c,m),h.subtract(m,d,m),h.add(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.add(s,c,m),h.subtract(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(s,c,m),h.add(m,d,m),h.add(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(s,c,m),h.add(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(s,c,m),h.subtract(m,d,m),h.add(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(s,c,m),h.subtract(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),i.start=o,i.stop=r,i};var FZe=new h,AZe=new h,MZe=new h;Wi.computeCorners=function(e,t){l(t)||(t=[new h,new h,new h,new h,new h,new h,new h,new h]);let n=e.center,i=e.halfAxes,o=$.getColumn(i,0,FZe),r=$.getColumn(i,1,AZe),s=$.getColumn(i,2,MZe);return h.clone(n,t[0]),h.subtract(t[0],o,t[0]),h.subtract(t[0],r,t[0]),h.subtract(t[0],s,t[0]),h.clone(n,t[1]),h.subtract(t[1],o,t[1]),h.subtract(t[1],r,t[1]),h.add(t[1],s,t[1]),h.clone(n,t[2]),h.subtract(t[2],o,t[2]),h.add(t[2],r,t[2]),h.subtract(t[2],s,t[2]),h.clone(n,t[3]),h.subtract(t[3],o,t[3]),h.add(t[3],r,t[3]),h.add(t[3],s,t[3]),h.clone(n,t[4]),h.add(t[4],o,t[4]),h.subtract(t[4],r,t[4]),h.subtract(t[4],s,t[4]),h.clone(n,t[5]),h.add(t[5],o,t[5]),h.subtract(t[5],r,t[5]),h.add(t[5],s,t[5]),h.clone(n,t[6]),h.add(t[6],o,t[6]),h.add(t[6],r,t[6]),h.subtract(t[6],s,t[6]),h.clone(n,t[7]),h.add(t[7],o,t[7]),h.add(t[7],r,t[7]),h.add(t[7],s,t[7]),t};var NZe=new $;Wi.computeTransformation=function(e,t){l(t)||(t=new M);let n=e.center,i=$.multiplyByUniformScale(e.halfAxes,2,NZe);return M.fromRotationTranslation(i,n,t)};var kZe=new le;Wi.isOccluded=function(e,t){let n=le.fromOrientedBoundingBox(e,kZe);return!t.isBoundingSphereVisible(n)};Wi.prototype.intersectPlane=function(e){return Wi.intersectPlane(this,e)};Wi.prototype.distanceSquaredTo=function(e){return Wi.distanceSquaredTo(this,e)};Wi.prototype.computePlaneDistances=function(e,t,n){return Wi.computePlaneDistances(this,e,t,n)};Wi.prototype.computeCorners=function(e){return Wi.computeCorners(this,e)};Wi.prototype.computeTransformation=function(e){return Wi.computeTransformation(this,e)};Wi.prototype.isOccluded=function(e){return Wi.isOccluded(this,e)};Wi.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&$.equals(e.halfAxes,t.halfAxes)};Wi.prototype.clone=function(e){return Wi.clone(this,e)};Wi.prototype.equals=function(e){return Wi.equals(this,e)};var Gn=Wi;var Pwt=T(S(),1);var cN={};cN.getHeight=function(e,t,n){return(e-n)*t+n};var UZe=new he;cN.getPosition=function(e,t,n,i,o){let r=t.cartesianToCartographic(e,UZe);if(!l(r))return h.clone(e,o);let s=cN.getHeight(r.height,n,i);return h.fromRadians(r.longitude,r.latitude,s,t,o)};var hr=cN;var HOt=T(S(),1);var Mwt=T(S(),1);var fr={CULL:1,OCCLUDE:2,EXECUTE_IN_CLOSEST_FRUSTUM:4,DEBUG_SHOW_BOUNDING_VOLUME:8,CAST_SHADOWS:16,RECEIVE_SHADOWS:32,PICK_ONLY:64,DEPTH_FOR_TRANSLUCENT_CLASSIFICATION:128};function WR(e){e=y(e,y.EMPTY_OBJECT),this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._modelMatrix=e.modelMatrix,this._primitiveType=y(e.primitiveType,Fe.TRIANGLES),this._vertexArray=e.vertexArray,this._count=e.count,this._offset=y(e.offset,0),this._instanceCount=y(e.instanceCount,0),this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._owner=e.owner,this._debugOverlappingFrustums=0,this._pickId=e.pickId,this._flags=0,this.cull=y(e.cull,!0),this.occlude=y(e.occlude,!0),this.executeInClosestFrustum=y(e.executeInClosestFrustum,!1),this.debugShowBoundingVolume=y(e.debugShowBoundingVolume,!1),this.castShadows=y(e.castShadows,!1),this.receiveShadows=y(e.receiveShadows,!1),this.pickOnly=y(e.pickOnly,!1),this.depthForTranslucentClassification=y(e.depthForTranslucentClassification,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}function ja(e,t){return(e._flags&t)===t}function Eb(e,t,n){n?e._flags|=t:e._flags&=~t}Object.defineProperties(WR.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return ja(this,fr.CULL)},set:function(e){ja(this,fr.CULL)!==e&&(Eb(this,fr.CULL,e),this.dirty=!0)}},occlude:{get:function(){return ja(this,fr.OCCLUDE)},set:function(e){ja(this,fr.OCCLUDE)!==e&&(Eb(this,fr.OCCLUDE,e),this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0)}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0)}},castShadows:{get:function(){return ja(this,fr.CAST_SHADOWS)},set:function(e){ja(this,fr.CAST_SHADOWS)!==e&&(Eb(this,fr.CAST_SHADOWS,e),this.dirty=!0)}},receiveShadows:{get:function(){return ja(this,fr.RECEIVE_SHADOWS)},set:function(e){ja(this,fr.RECEIVE_SHADOWS)!==e&&(Eb(this,fr.RECEIVE_SHADOWS,e),this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return ja(this,fr.EXECUTE_IN_CLOSEST_FRUSTUM)},set:function(e){ja(this,fr.EXECUTE_IN_CLOSEST_FRUSTUM)!==e&&(Eb(this,fr.EXECUTE_IN_CLOSEST_FRUSTUM,e),this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return ja(this,fr.DEBUG_SHOW_BOUNDING_VOLUME)},set:function(e){ja(this,fr.DEBUG_SHOW_BOUNDING_VOLUME)!==e&&(Eb(this,fr.DEBUG_SHOW_BOUNDING_VOLUME,e),this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickOnly:{get:function(){return ja(this,fr.PICK_ONLY)},set:function(e){ja(this,fr.PICK_ONLY)!==e&&(Eb(this,fr.PICK_ONLY,e),this.dirty=!0)}},depthForTranslucentClassification:{get:function(){return ja(this,fr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)},set:function(e){ja(this,fr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)!==e&&(Eb(this,fr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION,e),this.dirty=!0)}}});WR.shallowClone=function(e,t){if(l(e))return l(t)||(t=new WR),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._owner=e._owner,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._pickId=e._pickId,t._flags=e._flags,t.dirty=!0,t.lastDirtyTime=0,t};WR.prototype.execute=function(e,t){e.draw(this,t)};var et=WR;var kwt=T(S(),1),DZe={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE:4,CESIUM_3D_TILE_CLASSIFICATION:5,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:6,OPAQUE:7,TRANSLUCENT:8,VOXELS:9,OVERLAY:10,NUMBER_OF_PASSES:11},Re=Object.freeze(DZe);var $wt=T(S(),1);var Bwt=T(S(),1);var lN={CLOCKWISE:ne.CW,COUNTER_CLOCKWISE:ne.CCW};lN.validate=function(e){return e===lN.CLOCKWISE||e===lN.COUNTER_CLOCKWISE};var os=Object.freeze(lN);var Owt=T(S(),1);function j$(e){if(typeof e!="object"||e===null)return e;let t,n=Object.keys(e);for(let i=0;i0&&console.log(`${zh}Vertex shader compile log: ${c}`),c=e.getShaderInfoLog(r),l(c)&&c.length>0&&console.log(`${zh}Fragment shader compile log: ${c}`),c=e.getProgramInfoLog(s),l(c)&&c.length>0&&console.log(`${zh}Shader program link log: ${c}`)),e.deleteShader(o),e.deleteShader(r),s;let d,u=t._debugShaders;throw e.getShaderParameter(r,e.COMPILE_STATUS)?e.getShaderParameter(o,e.COMPILE_STATUS)?(c=e.getProgramInfoLog(s),console.error(`${zh}Shader program link log: ${c}`),m(o,"vertex"),m(r,"fragment"),d=`Program failed to link. Link log: ${c}`):(c=e.getShaderInfoLog(o),console.error(`${zh}Vertex shader compile log: ${c}`),console.error(`${zh} Vertex shader source: +`;function dp(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.translucent,!0),n=y(e.closed,!1),i=y(e.flat,!1),o=i?RL:LL,r=i?tx:ZL,s=i?dp.FLAT_VERTEX_FORMAT:dp.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=y(e.vertexShaderSource,o),this._fragmentShaderSource=y(e.fragmentShaderSource,r),this._renderState=ji.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=s,this._flat=i,this._faceForward=y(e.faceForward,!n)}Object.defineProperties(dp.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});dp.VERTEX_FORMAT=Xe.POSITION_AND_NORMAL;dp.FLAT_VERTEX_FORMAT=Xe.POSITION_ONLY;dp.prototype.getFragmentShaderSource=ji.prototype.getFragmentShaderSource;dp.prototype.isTranslucent=ji.prototype.isTranslucent;dp.prototype.getRenderState=ji.prototype.getRenderState;var ln=dp;var MPt=S(T(),1);function kT(e){this._definitionChanged=new ge,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(kT.prototype,{isConstant:{get:function(){return H.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:de("color")});kT.prototype.getType=function(e){return"Color"};kT.prototype.getValue=function(e,t){return l(t)||(t={}),t.color=H.getValueOrClonedDefault(this._color,e,Y.WHITE,t.color),t};kT.prototype.equals=function(e){return this===e||e instanceof kT&&H.equals(this._color,e._color)};var kt=kT;var Zzt=S(T(),1);var rzt=S(T(),1);var svt=S(T(),1);var KPt=S(T(),1);function L0(e){e=y(e,y.EMPTY_OBJECT),this._ellipsoid=y(e.ellipsoid,te.default),this._rectangle=y(e.rectangle,ce.MAX_VALUE),this._projection=new Ci(this._ellipsoid),this._numberOfLevelZeroTilesX=y(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=y(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(L0.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});L0.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<=o&&(d=o-1);let u=(i.north-e.latitude)/a|0;return u>=r&&(u=r-1),l(n)?(n.x=d,n.y=u,n):new D(d,u)};var Ni=L0;var G$=new h,E$=new h,W$=new he,E3=new h,LLe=new h,I$=new le,RLe=new Ni,GL=[new he,new he,new he,new he],EL=new D,kr={};kr.initialize=function(){let e=kr._initPromise;return l(e)||(e=Ee.fetchJson(tn("Assets/approximateTerrainHeights.json")).then(function(t){kr._terrainHeights=t}),kr._initPromise=e),e};kr.getMinimumMaximumHeights=function(e,t){t=y(t,te.default);let n=X$(e),i=kr._defaultMinTerrainHeight,o=kr._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=kr._terrainHeights[r];l(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(ce.northeast(e,W$),G$),t.cartographicToCartesian(ce.southwest(e,W$),E$),h.midpoint(E$,G$,E3);let a=t.scaleToGeodeticSurface(E3,LLe);if(l(a)){let c=h.distance(E3,a);i=Math.min(i,-c)}else i=kr._defaultMinTerrainHeight}return i=Math.max(kr._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}};kr.getBoundingSphere=function(e,t){t=y(t,te.default);let n=X$(e),i=kr._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=kr._terrainHeights[r];l(s)&&(i=s[1])}let o=le.fromRectangle3D(e,t,0);return le.fromRectangle3D(e,t,i,I$),le.union(o,I$,o)};function X$(e){he.fromRadians(e.east,e.north,0,GL[0]),he.fromRadians(e.west,e.north,0,GL[1]),he.fromRadians(e.east,e.south,0,GL[2]),he.fromRadians(e.west,e.south,0,GL[3]);let t=0,n=0,i=0,o=0,r=kr._terrainHeightsMaxLevel,s;for(s=0;s<=r;++s){let a=!1;for(let c=0;c<4;++c){let d=GL[c];if(RLe.positionToTileXY(d,s,EL),c===0)i=EL.x,o=EL.y;else if(i!==EL.x||o!==EL.y){a=!0;break}}if(a)break;t=i,n=o}if(s!==0)return{x:t,y:n,level:s>r?r:s-1}}kr._terrainHeightsMaxLevel=6;kr._defaultMaxTerrainHeight=9e3;kr._defaultMinTerrainHeight=-1e5;kr._terrainHeights=void 0;kr._initPromise=void 0;Object.defineProperties(kr,{initialized:{get:function(){return l(kr._terrainHeights)}}});var ci=kr;var Cwt=S(T(),1);var swt=S(T(),1);var mvt=S(T(),1);function Xc(e,t,n){this.minimum=h.clone(y(e,h.ZERO)),this.maximum=h.clone(y(t,h.ZERO)),l(n)?n=h.clone(n):n=h.midpoint(this.minimum,this.maximum,new h),this.center=n}Xc.fromCorners=function(e,t,n){return l(n)||(n=new Xc),n.minimum=h.clone(e,n.minimum),n.maximum=h.clone(t,n.maximum),n.center=h.midpoint(e,t,n.center),n};Xc.fromPoints=function(e,t){if(l(t)||(t=new Xc),!l(e)||e.length===0)return t.minimum=h.clone(h.ZERO,t.minimum),t.maximum=h.clone(h.ZERO,t.maximum),t.center=h.clone(h.ZERO,t.center),t;let n=e[0].x,i=e[0].y,o=e[0].z,r=e[0].x,s=e[0].y,a=e[0].z,c=e.length;for(let m=1;m0?Ht.INSIDE:r+o<0?Ht.OUTSIDE:Ht.INTERSECTING};Xc.prototype.clone=function(e){return Xc.clone(this,e)};Xc.prototype.intersectPlane=function(e){return Xc.intersectPlane(this,e)};Xc.prototype.equals=function(e){return Xc.equals(this,e)};var R0=Xc;var Uvt=S(T(),1);var pvt=S(T(),1);var W3={};W3.computeDiscriminant=function(e,t,n){return t*t-4*e*n};function P$(e,t,n){let i=e+t;return X.sign(e)!==X.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))d&&d/c0?[a/e,n/a]:[n/a,a/e]};var Pc=W3;var Cvt=S(T(),1);var yvt=S(T(),1);var X3={};X3.computeDiscriminant=function(e,t,n,i){let o=e*e,r=t*t,s=n*n,a=i*i;return 18*e*t*n*i+r*s-27*o*a-4*(e*s*n+r*t*i)};function I3(e,t,n,i){let o=e,r=t/3,s=n/3,a=i,c=o*s,d=r*a,u=r*r,m=s*s,p=o*s-u,g=o*a-r*s,f=r*a-m,x=4*p*f-g*g,_,C;if(x<0){let J,z,ee;u*d>=c*m?(J=o,z=p,ee=-2*r*p+o*g):(J=a,z=f,ee=-a*g+2*s*f);let j=-(ee<0?-1:1)*Math.abs(J)*Math.sqrt(-x);C=-ee+j;let q=C/2,be=q<0?-Math.pow(-q,1/3):Math.pow(q,1/3),Se=C===j?-be:-z/be;return _=z<=0?be+Se:-ee/(be*be+Se*Se+z),u*d>=c*m?[(_-r)/o]:[-a/(_+s)]}let V=p,Z=-2*r*p+o*g,R=f,G=-a*g+2*s*f,W=Math.sqrt(x),v=Math.sqrt(3)/2,P=Math.abs(Math.atan2(o*W,-Z)/3);_=2*Math.sqrt(-V);let F=Math.cos(P);C=_*F;let M=_*(-F/2-v*Math.sin(P)),b=C+M>2*r?C-r:M-r,L=o,E=b/L;P=Math.abs(Math.atan2(a*W,-G)/3),_=2*Math.sqrt(-R),F=Math.cos(P),C=_*F,M=_*(-F/2-v*Math.sin(P));let I=-a,w=C+M<2*s?C+s:M+s,N=I/w,B=L*w,k=-b*w-L*I,O=b*I,U=(s*k-r*O)/(-r*k+s*B);return E<=U?E<=N?U<=N?[E,U,N]:[E,N,U]:[N,E,U]:E<=N?[U,E,N]:U<=N?[U,N,E]:[N,U,E]}X3.computeRealRoots=function(e,t,n,i){let o,r;if(e===0)return Pc.computeRealRoots(t,n,i);if(t===0){if(n===0){if(i===0)return[0,0,0];r=-i/e;let s=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[s,s,s]}else if(i===0)return o=Pc.computeRealRoots(e,0,n),o.Length===0?[0]:[o[0],0,o[1]];return I3(e,0,n,i)}else{if(n===0)return i===0?(r=-t/e,r<0?[r,0,0]:[0,0,r]):I3(e,t,0,i);if(i===0)return o=Pc.computeRealRoots(e,t,n),o.length===0?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]}return I3(e,t,n,i)};var nx=X3;var P3={};P3.computeDiscriminant=function(e,t,n,i,o){let r=e*e,s=r*e,a=t*t,c=a*t,d=n*n,u=d*n,m=i*i,p=m*i,g=o*o,f=g*o;return a*d*m-4*c*p-4*e*u*m+18*e*t*n*p-27*r*m*m+256*s*f+o*(18*c*n*i-4*a*u+16*e*d*d-80*e*t*d*i-6*e*a*m+144*r*n*m)+g*(144*e*a*n-27*a*a-128*r*d-192*r*t*i)};function bm(e,t,n,i){let o=e*e,r=t-3*o/8,s=n-t*e/2+o*e/8,a=i-n*e/4+t*o/16-3*o*o/256,c=nx.computeRealRoots(1,2*r,r*r-4*a,-s*s);if(c.length>0){let d=-e/4,u=c[c.length-1];if(Math.abs(u)=0&&g>=0){let x=Math.sqrt(p),_=Math.sqrt(g);return[d-_,d-x,d+x,d+_]}else{if(p>=0&&g<0)return f=Math.sqrt(p),[d-f,d+f];if(p<0&&g>=0)return f=Math.sqrt(g),[d-f,d+f]}}return[]}else if(u>0){let m=Math.sqrt(u),p=(r+u-s/m)/2,g=(r+u+s/m)/2,f=Pc.computeRealRoots(1,m,p),x=Pc.computeRealRoots(1,-m,g);return f.length!==0?(f[0]+=d,f[1]+=d,x.length!==0?(x[0]+=d,x[1]+=d,f[1]<=x[0]?[f[0],f[1],x[0],x[1]]:x[1]<=f[0]?[x[0],x[1],f[0],f[1]]:f[0]>=x[0]&&f[1]<=x[1]?[x[0],f[0],f[1],x[1]]:x[0]>=f[0]&&x[1]<=f[1]?[f[0],x[0],x[1],f[1]]:f[0]>x[0]&&f[0]0){let m=u[0],p=t-m,g=p*p,f=e/2,x=p/2,_=g-4*i,C=g+4*Math.abs(i),V=s-4*m,Z=s+4*Math.abs(m),R,G;if(m<0||_*Z=b[0]&&M[1]<=b[1]?[b[0],M[0],M[1],b[1]]:b[0]>=M[0]&&b[1]<=M[1]?[M[0],b[0],b[1],M[1]]:M[0]>b[0]&&M[0]u)||(p=h.cross(m,a,w$),f=h.dot(s,p),f<0||g+f>u))return;x=h.dot(c,p)/u}else{if(Math.abs(u)1||(p=h.cross(m,a,w$),f=h.dot(s,p)*_,f<0||g+f>1))return;x=h.dot(c,p)*_}return x};Po.rayTriangle=function(e,t,n,i,o,r){let s=Po.rayTriangleParametric(e,t,n,i,o);if(!(!l(s)||s<0))return l(r)||(r=new h),h.multiplyByScalar(e.direction,s,r),h.add(e.origin,r,r)};var WLe=new pn;Po.lineSegmentTriangle=function(e,t,n,i,o,r,s){let a=WLe;h.clone(e,a.origin),h.subtract(t,e,a.direction),h.normalize(a.direction,a.direction);let c=Po.rayTriangleParametric(a,n,i,o,r);if(!(!l(c)||c<0||c>h.distance(e,t)))return l(s)||(s=new h),h.multiplyByScalar(a.direction,c,s),h.add(a.origin,s,s)};function ILe(e,t,n,i){let o=t*t-4*e*n;if(o<0)return;if(o>0){let s=1/(2*e),a=Math.sqrt(o),c=(-t+a)*s,d=(-t-a)*s;return cs))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,s),i};var vLe=new h,wLe=new h;Po.rayEllipsoid=function(e,t){let n=t.oneOverRadii,i=h.multiplyComponents(n,e.origin,vLe),o=h.multiplyComponents(n,e.direction,wLe),r=h.magnitudeSquared(i),s=h.dot(i,o),a,c,d,u,m;if(r>1){if(s>=0)return;let p=s*s;if(a=r-1,c=h.magnitudeSquared(o),d=c*a,pd){u=s*s-d,m=-s+Math.sqrt(u);let f=m/c,x=a/m;return f0?g.push(new h(i,o*F,o*-L)):L!==0?(g.push(new h(i,o*F,o*-L)),g.push(new h(i,o*F,o*L)),++P):g.push(new h(i,o*F,o*L))}return g};var v3=new h,F$=new h,A$=new h,aN=new h,FLe=new h,ALe=new $,MLe=new $,NLe=new $,ULe=new $,kLe=new $,M$=new $,N$=new $,U$=new h,DLe=new h,BLe=new he;Po.grazingAltitudeLocation=function(e,t){let n=e.origin,i=e.direction;if(!h.equals(n,h.ZERO)){let W=t.geodeticSurfaceNormal(n,v3);if(h.dot(i,W)>=0)return n}let o=l(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,v3),s=h.normalize(r,r),a=h.mostOrthogonalAxis(r,aN),c=h.normalize(h.cross(a,s,F$),F$),d=h.normalize(h.cross(s,c,A$),A$),u=ALe;u[0]=s.x,u[1]=s.y,u[2]=s.z,u[3]=c.x,u[4]=c.y,u[5]=c.z,u[6]=d.x,u[7]=d.y,u[8]=d.z;let m=$.transpose(u,MLe),p=$.fromScale(t.radii,NLe),g=$.fromScale(t.oneOverRadii,ULe),f=kLe;f[0]=0,f[1]=-i.z,f[2]=i.y,f[3]=i.z,f[4]=0,f[5]=-i.x,f[6]=-i.y,f[7]=i.x,f[8]=0;let x=$.multiply($.multiply(m,g,M$),f,M$),_=$.multiply($.multiply(x,p,N$),u,N$),C=$.multiplyByVector(x,n,FLe),V=Po.quadraticVectorExpression(_,h.negate(C,v3),0,0,1),Z,R,G=V.length;if(G>0){let W=h.clone(h.ZERO,DLe),v=Number.NEGATIVE_INFINITY;for(let F=0;Fv&&(v=b,W=h.clone(Z,W))}let P=t.cartesianToCartographic(W,BLe);return v=X.clamp(v,0,1),R=h.magnitude(h.subtract(W,n,aN))*Math.sqrt(1-v*v),R=o?-R:R,P.height=R,t.cartographicToCartesian(P,new h)}};var YLe=new h;Po.lineSegmentPlane=function(e,t,n,i){l(i)||(i=new h);let o=h.subtract(t,e,YLe),r=n.normal,s=h.dot(r,o);if(Math.abs(s)1))return h.multiplyByScalar(o,c,i),h.add(e,i,i),i};Po.trianglePlaneIntersection=function(e,t,n,i){let o=i.normal,r=i.distance,s=h.dot(o,e)+r<0,a=h.dot(o,t)+r<0,c=h.dot(o,n)+r<0,d=0;d+=s?1:0,d+=a?1:0,d+=c?1:0;let u,m;if((d===1||d===2)&&(u=new h,m=new h),d===1){if(s)return Po.lineSegmentPlane(e,t,i,u),Po.lineSegmentPlane(e,n,i,m),{positions:[e,t,n,u,m],indices:[0,3,4,1,2,4,1,4,3]};if(a)return Po.lineSegmentPlane(t,n,i,u),Po.lineSegmentPlane(t,e,i,m),{positions:[e,t,n,u,m],indices:[1,3,4,2,0,4,2,4,3]};if(c)return Po.lineSegmentPlane(n,e,i,u),Po.lineSegmentPlane(n,t,i,m),{positions:[e,t,n,u,m],indices:[2,3,4,0,1,4,0,4,3]}}else if(d===2)if(s)if(a){if(!c)return Po.lineSegmentPlane(e,n,i,u),Po.lineSegmentPlane(t,n,i,m),{positions:[e,t,n,u,m],indices:[0,1,4,0,4,3,2,3,4]}}else return Po.lineSegmentPlane(n,t,i,u),Po.lineSegmentPlane(e,t,i,m),{positions:[e,t,n,u,m],indices:[2,0,4,2,4,3,1,3,4]};else return Po.lineSegmentPlane(t,e,i,u),Po.lineSegmentPlane(n,e,i,m),{positions:[e,t,n,u,m],indices:[1,2,4,1,4,3,0,3,4]}};var jn=Po;var zvt=S(T(),1);function Es(e,t){this.normal=h.clone(e),this.distance=t}Es.fromPointNormal=function(e,t,n){let i=-h.dot(t,e);return l(n)?(h.clone(t,n.normal),n.distance=i,n):new Es(t,i)};var OLe=new h;Es.fromCartesian4=function(e,t){let n=h.fromCartesian4(e,OLe),i=e.w;return l(t)?(h.clone(n,t.normal),t.distance=i,t):new Es(n,i)};Es.getPointDistance=function(e,t){return h.dot(e.normal,t)+e.distance};var zLe=new h;Es.projectPointOntoPlane=function(e,t,n){l(n)||(n=new h);let i=Es.getPointDistance(e,t),o=h.multiplyByScalar(e.normal,i,zLe);return h.subtract(t,o,n)};var KLe=new A,HLe=new se,JLe=new h;Es.transform=function(e,t,n){let i=e.normal,o=e.distance,r=A.inverseTranspose(t,KLe),s=se.fromElements(i.x,i.y,i.z,o,HLe);s=A.multiplyByVector(r,s,s);let a=h.fromCartesian4(s,JLe);return s=se.divideByScalar(s,h.magnitude(a),s),Es.fromCartesian4(s,n)};Es.clone=function(e,t){return l(t)?(h.clone(e.normal,t.normal),t.distance=e.distance,t):new Es(e.normal,e.distance)};Es.equals=function(e,t){return e.distance===t.distance&&h.equals(e.normal,t.normal)};Es.ORIGIN_XY_PLANE=Object.freeze(new Es(h.UNIT_Z,0));Es.ORIGIN_YZ_PLANE=Object.freeze(new Es(h.UNIT_X,0));Es.ORIGIN_ZX_PLANE=Object.freeze(new Es(h.UNIT_Y,0));var dn=Es;var w3=new se;function Bh(e,t){t=y(t,te.default),e=t.scaleToGeodeticSurface(e);let n=Gt.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=h.fromCartesian4(A.getColumn(n,0,w3)),this._yAxis=h.fromCartesian4(A.getColumn(n,1,w3));let i=h.fromCartesian4(A.getColumn(n,2,w3));this._plane=dn.fromPointNormal(e,i)}Object.defineProperties(Bh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var QLe=new R0;Bh.fromPoints=function(e,t){let n=R0.fromPoints(e,QLe);return new Bh(n.center,t)};var B$=new pn,cN=new h;Bh.prototype.projectPointOntoPlane=function(e,t){let n=B$;n.origin=e,h.normalize(e,n.direction);let i=jn.rayPlane(n,this._plane,cN);if(l(i)||(h.negate(n.direction,n.direction),i=jn.rayPlane(n,this._plane,cN)),l(i)){let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),s=h.dot(this._yAxis,o);return l(t)?(t.x=r,t.y=s,t):new D(r,s)}};Bh.prototype.projectPointsOntoPlane=function(e,t){l(t)||(t=[]);let n=0,i=e.length;for(let o=0;o0?0:v.latitude,L=he.fromRadians(M,e.north,n,cRe),E=he.fromRadians(e.west,e.north,n,lRe),I=he.fromRadians(e.west,b,n,dRe),w=he.fromRadians(e.west,e.south,n,uRe),N=he.fromRadians(M,e.south,n,mRe),B=i.cartographicToCartesian(L,hRe),k=i.cartographicToCartesian(E,z$),O=i.cartographicToCartesian(I,fRe),U=i.cartographicToCartesian(w,K$),J=i.cartographicToCartesian(N,pRe),z=F.projectPointToNearestOnPlane(B,bRe),ee=F.projectPointToNearestOnPlane(k,gRe),K=F.projectPointToNearestOnPlane(O,yRe),j=F.projectPointToNearestOnPlane(U,xRe),q=F.projectPointToNearestOnPlane(J,_Re);return r=Math.min(ee.x,K.x,j.x),s=-r,c=Math.max(ee.y,z.y),a=Math.min(j.y,q.y),E.height=w.height=t,k=i.cartographicToCartesian(E,z$),U=i.cartographicToCartesian(w,K$),d=Math.min(dn.getPointDistance(m,k),dn.getPointDistance(m,U)),u=n,Y$(F.origin,F.xAxis,F.yAxis,F.zAxis,r,s,a,c,d,u,o)}let p=e.south>0,g=e.north<0,f=p?e.south:g?e.north:0,x=ce.center(e,O$).longitude,_=h.fromRadians(x,f,n,i,SRe);_.z=0;let V=Math.abs(_.x)=c?Ht.INSIDE:Ht.INTERSECTING};var Q$=new h,j$=new h,q$=new h,WRe=new h,H$=new h,IRe=new h;Pi.distanceSquaredTo=function(e,t){let n=h.subtract(t,e.center,J$),i=e.halfAxes,o=$.getColumn(i,0,Q$),r=$.getColumn(i,1,j$),s=$.getColumn(i,2,q$),a=h.magnitude(o),c=h.magnitude(r),d=h.magnitude(s),u=!0,m=!0,p=!0;a>0?h.divideByScalar(o,a,o):u=!1,c>0?h.divideByScalar(r,c,r):m=!1,d>0?h.divideByScalar(s,d,s):p=!1;let g=!u+!m+!p,f,x,_;if(g===1){let R=o;f=r,x=s,m?p||(R=s,x=o):(R=r,f=o),_=h.cross(f,x,H$),R===o?o=_:R===r?r=_:R===s&&(s=_)}else if(g===2){f=o,m?f=r:p&&(f=s);let R=h.UNIT_Y;R.equalsEpsilon(f,X.EPSILON3)&&(R=h.UNIT_X),x=h.cross(f,R,WRe),h.normalize(x,x),_=h.cross(f,x,H$),h.normalize(_,_),f===o?(r=x,s=_):f===r?(s=x,o=_):f===s&&(o=x,r=_)}else g===3&&(o=h.UNIT_X,r=h.UNIT_Y,s=h.UNIT_Z);let C=IRe;C.x=h.dot(n,o),C.y=h.dot(n,r),C.z=h.dot(n,s);let V=0,Z;return C.x<-a?(Z=C.x+a,V+=Z*Z):C.x>a&&(Z=C.x-a,V+=Z*Z),C.y<-c?(Z=C.y+c,V+=Z*Z):C.y>c&&(Z=C.y-c,V+=Z*Z),C.z<-d?(Z=C.z+d,V+=Z*Z):C.z>d&&(Z=C.z-d,V+=Z*Z),V};var XRe=new h,PRe=new h;Pi.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Sa);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=e.center,a=e.halfAxes,c=$.getColumn(a,0,Q$),d=$.getColumn(a,1,j$),u=$.getColumn(a,2,q$),m=h.add(c,d,XRe);h.add(m,u,m),h.add(m,s,m);let p=h.subtract(m,t,PRe),g=h.dot(n,p);return o=Math.min(g,o),r=Math.max(g,r),h.add(s,c,m),h.add(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.add(s,c,m),h.subtract(m,d,m),h.add(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.add(s,c,m),h.subtract(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(s,c,m),h.add(m,d,m),h.add(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(s,c,m),h.add(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(s,c,m),h.subtract(m,d,m),h.add(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(s,c,m),h.subtract(m,d,m),h.subtract(m,u,m),h.subtract(m,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),i.start=o,i.stop=r,i};var vRe=new h,wRe=new h,FRe=new h;Pi.computeCorners=function(e,t){l(t)||(t=[new h,new h,new h,new h,new h,new h,new h,new h]);let n=e.center,i=e.halfAxes,o=$.getColumn(i,0,vRe),r=$.getColumn(i,1,wRe),s=$.getColumn(i,2,FRe);return h.clone(n,t[0]),h.subtract(t[0],o,t[0]),h.subtract(t[0],r,t[0]),h.subtract(t[0],s,t[0]),h.clone(n,t[1]),h.subtract(t[1],o,t[1]),h.subtract(t[1],r,t[1]),h.add(t[1],s,t[1]),h.clone(n,t[2]),h.subtract(t[2],o,t[2]),h.add(t[2],r,t[2]),h.subtract(t[2],s,t[2]),h.clone(n,t[3]),h.subtract(t[3],o,t[3]),h.add(t[3],r,t[3]),h.add(t[3],s,t[3]),h.clone(n,t[4]),h.add(t[4],o,t[4]),h.subtract(t[4],r,t[4]),h.subtract(t[4],s,t[4]),h.clone(n,t[5]),h.add(t[5],o,t[5]),h.subtract(t[5],r,t[5]),h.add(t[5],s,t[5]),h.clone(n,t[6]),h.add(t[6],o,t[6]),h.add(t[6],r,t[6]),h.subtract(t[6],s,t[6]),h.clone(n,t[7]),h.add(t[7],o,t[7]),h.add(t[7],r,t[7]),h.add(t[7],s,t[7]),t};var ARe=new $;Pi.computeTransformation=function(e,t){l(t)||(t=new A);let n=e.center,i=$.multiplyByUniformScale(e.halfAxes,2,ARe);return A.fromRotationTranslation(i,n,t)};var MRe=new le;Pi.isOccluded=function(e,t){let n=le.fromOrientedBoundingBox(e,MRe);return!t.isBoundingSphereVisible(n)};Pi.prototype.intersectPlane=function(e){return Pi.intersectPlane(this,e)};Pi.prototype.distanceSquaredTo=function(e){return Pi.distanceSquaredTo(this,e)};Pi.prototype.computePlaneDistances=function(e,t,n){return Pi.computePlaneDistances(this,e,t,n)};Pi.prototype.computeCorners=function(e){return Pi.computeCorners(this,e)};Pi.prototype.computeTransformation=function(e){return Pi.computeTransformation(this,e)};Pi.prototype.isOccluded=function(e){return Pi.isOccluded(this,e)};Pi.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&$.equals(e.halfAxes,t.halfAxes)};Pi.prototype.clone=function(e){return Pi.clone(this,e)};Pi.prototype.equals=function(e){return Pi.equals(this,e)};var Gn=Pi;var Gwt=S(T(),1);var lN={};lN.getHeight=function(e,t,n){return(e-n)*t+n};var NRe=new he;lN.getPosition=function(e,t,n,i,o){let r=t.cartesianToCartographic(e,NRe);if(!l(r))return h.clone(e,o);let s=lN.getHeight(r.height,n,i);return h.fromRadians(r.longitude,r.latitude,s,t,o)};var fr=lN;var kOt=S(T(),1);var Pwt=S(T(),1);var pr={CULL:1,OCCLUDE:2,EXECUTE_IN_CLOSEST_FRUSTUM:4,DEBUG_SHOW_BOUNDING_VOLUME:8,CAST_SHADOWS:16,RECEIVE_SHADOWS:32,PICK_ONLY:64,DEPTH_FOR_TRANSLUCENT_CLASSIFICATION:128};function XL(e){e=y(e,y.EMPTY_OBJECT),this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._modelMatrix=e.modelMatrix,this._primitiveType=y(e.primitiveType,Fe.TRIANGLES),this._vertexArray=e.vertexArray,this._count=e.count,this._offset=y(e.offset,0),this._instanceCount=y(e.instanceCount,0),this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._owner=e.owner,this._debugOverlappingFrustums=0,this._pickId=e.pickId,this._flags=0,this.cull=y(e.cull,!0),this.occlude=y(e.occlude,!0),this.executeInClosestFrustum=y(e.executeInClosestFrustum,!1),this.debugShowBoundingVolume=y(e.debugShowBoundingVolume,!1),this.castShadows=y(e.castShadows,!1),this.receiveShadows=y(e.receiveShadows,!1),this.pickOnly=y(e.pickOnly,!1),this.depthForTranslucentClassification=y(e.depthForTranslucentClassification,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}function qa(e,t){return(e._flags&t)===t}function G0(e,t,n){n?e._flags|=t:e._flags&=~t}Object.defineProperties(XL.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return qa(this,pr.CULL)},set:function(e){qa(this,pr.CULL)!==e&&(G0(this,pr.CULL,e),this.dirty=!0)}},occlude:{get:function(){return qa(this,pr.OCCLUDE)},set:function(e){qa(this,pr.OCCLUDE)!==e&&(G0(this,pr.OCCLUDE,e),this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0)}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0)}},castShadows:{get:function(){return qa(this,pr.CAST_SHADOWS)},set:function(e){qa(this,pr.CAST_SHADOWS)!==e&&(G0(this,pr.CAST_SHADOWS,e),this.dirty=!0)}},receiveShadows:{get:function(){return qa(this,pr.RECEIVE_SHADOWS)},set:function(e){qa(this,pr.RECEIVE_SHADOWS)!==e&&(G0(this,pr.RECEIVE_SHADOWS,e),this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return qa(this,pr.EXECUTE_IN_CLOSEST_FRUSTUM)},set:function(e){qa(this,pr.EXECUTE_IN_CLOSEST_FRUSTUM)!==e&&(G0(this,pr.EXECUTE_IN_CLOSEST_FRUSTUM,e),this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return qa(this,pr.DEBUG_SHOW_BOUNDING_VOLUME)},set:function(e){qa(this,pr.DEBUG_SHOW_BOUNDING_VOLUME)!==e&&(G0(this,pr.DEBUG_SHOW_BOUNDING_VOLUME,e),this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickOnly:{get:function(){return qa(this,pr.PICK_ONLY)},set:function(e){qa(this,pr.PICK_ONLY)!==e&&(G0(this,pr.PICK_ONLY,e),this.dirty=!0)}},depthForTranslucentClassification:{get:function(){return qa(this,pr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)},set:function(e){qa(this,pr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)!==e&&(G0(this,pr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION,e),this.dirty=!0)}}});XL.shallowClone=function(e,t){if(l(e))return l(t)||(t=new XL),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._owner=e._owner,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._pickId=e._pickId,t._flags=e._flags,t.dirty=!0,t.lastDirtyTime=0,t};XL.prototype.execute=function(e,t){e.draw(this,t)};var tt=XL;var wwt=S(T(),1),URe={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE:4,CESIUM_3D_TILE_CLASSIFICATION:5,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:6,OPAQUE:7,TRANSLUCENT:8,VOXELS:9,OVERLAY:10,NUMBER_OF_PASSES:11},Le=Object.freeze(URe);var Hwt=S(T(),1);var Mwt=S(T(),1);var dN={CLOCKWISE:ie.CW,COUNTER_CLOCKWISE:ie.CCW};dN.validate=function(e){return e===dN.CLOCKWISE||e===dN.COUNTER_CLOCKWISE};var rs=Object.freeze(dN);var Uwt=S(T(),1);function $$(e){if(typeof e!="object"||e===null)return e;let t,n=Object.keys(e);for(let i=0;i0&&console.log(`${zh}Vertex shader compile log: ${c}`),c=e.getShaderInfoLog(r),l(c)&&c.length>0&&console.log(`${zh}Fragment shader compile log: ${c}`),c=e.getProgramInfoLog(s),l(c)&&c.length>0&&console.log(`${zh}Shader program link log: ${c}`)),e.deleteShader(o),e.deleteShader(r),s;let d,u=t._debugShaders;throw e.getShaderParameter(r,e.COMPILE_STATUS)?e.getShaderParameter(o,e.COMPILE_STATUS)?(c=e.getProgramInfoLog(s),console.error(`${zh}Shader program link log: ${c}`),m(o,"vertex"),m(r,"fragment"),d=`Program failed to link. Link log: ${c}`):(c=e.getShaderInfoLog(o),console.error(`${zh}Vertex shader compile log: ${c}`),console.error(`${zh} Vertex shader source: ${n}`),d=`Vertex shader failed to compile. Compile log: ${c}`):(c=e.getShaderInfoLog(r),console.error(`${zh}Fragment shader compile log: ${c}`),console.error(`${zh} Fragment shader source: ${i}`),d=`Fragment shader failed to compile. Compile log: ${c}`),e.deleteShader(o),e.deleteShader(r),e.deleteProgram(s),new ue(d);function m(p,g){if(!l(u))return;let f=u.getTranslatedShaderSource(p);if(f===""){console.error(`${zh}${g} shader translation failed.`);return}console.error(`${zh}Translated ${g} shaderSource: -${f}`)}}function iGe(e,t,n){let i={};for(let o=0;o=0){if(u=n[d.slice(0,f)],!l(u))continue;m=u._locations,m.length<=1&&(p=u.value,g=e.getUniformLocation(t,d),g!==null&&(m.push(g),p.push(e.getUniform(t,g))))}else{m=[];for(let x=0;x=0){if(u=n[d.slice(0,f)],!l(u))continue;m=u._locations,m.length<=1&&(p=u.value,g=e.getUniformLocation(t,d),g!==null&&(m.push(g),p.push(e.getUniform(t,g))))}else{m=[];for(let x=0;xtime can be positive, negative, or zero. * * @name czm_pointAlongRay @@ -3572,7 +3574,7 @@ vec3 czm_pointAlongRay(czm_ray ray, float time) { return ray.origin + (time * ray.direction); } -`;var FNt=T(S(),1),vG=`/** +`;var INt=S(T(),1),vG=`/** * DOC_TBA * * @name czm_rayEllipsoidIntersectionInterval @@ -3655,7 +3657,7 @@ czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_ } } } -`;var MNt=T(S(),1),wG=`/** +`;var PNt=S(T(),1),wG=`/** * Compute the intersection interval of a ray with a sphere. * * @name czm_raySphereIntersectionInterval @@ -3691,11 +3693,11 @@ czm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float czm_raySegment result = czm_raySegment(t0, t1); return result; } -`;var kNt=T(S(),1),FG=`float czm_readDepth(sampler2D depthTexture, vec2 texCoords) +`;var wNt=S(T(),1),FG=`float czm_readDepth(sampler2D depthTexture, vec2 texCoords) { return czm_reverseLogDepth(texture(depthTexture, texCoords).r); } -`;var DNt=T(S(),1),AG=`/** +`;var ANt=S(T(),1),AG=`/** * Reads a value previously transformed with {@link czm_writeNonPerspective} * by dividing it by \`w\`, the value used in the perspective divide. * This function is intended to be called in a fragment shader to access a @@ -3726,7 +3728,7 @@ vec3 czm_readNonPerspective(vec3 value, float oneOverW) { vec4 czm_readNonPerspective(vec4 value, float oneOverW) { return value * oneOverW; } -`;var YNt=T(S(),1),MG=`float czm_reverseLogDepth(float logZ) +`;var NNt=S(T(),1),MG=`float czm_reverseLogDepth(float logZ) { #ifdef LOG_DEPTH float near = czm_currentFrustum.x; @@ -3737,7 +3739,7 @@ vec4 czm_readNonPerspective(vec4 value, float oneOverW) { #endif return logZ; } -`;var HNt=T(S(),1),NG=`/** +`;var kNt=S(T(),1),NG=`/** * Round a floating point value. This function exists because round() doesn't * exist in GLSL 1.00. * @@ -3759,7 +3761,7 @@ vec3 czm_round(vec3 value) { vec4 czm_round(vec4 value) { return floor(value + 0.5); } -`;var KNt=T(S(),1),kG=`/** +`;var BNt=S(T(),1),UG=`/** * Samples the 4 neighboring pixels and return the weighted average. * * @private @@ -3837,7 +3839,7 @@ vec3 czm_sampleOctahedralProjection(sampler2D projectedMap, vec2 textureSize, ve return mix(colorNextLod, colorCurrentLod, nextLod - lod); } -`;var QNt=T(S(),1),UG=`/** +`;var ONt=S(T(),1),kG=`/** * Adjusts the saturation of a color. * * @name czm_saturation @@ -3859,7 +3861,7 @@ vec3 czm_saturation(vec3 rgb, float adjustment) vec3 intensity = vec3(dot(rgb, W)); return mix(intensity, rgb, adjustment); } -`;var qNt=T(S(),1),DG=` +`;var KNt=S(T(),1),DG=` float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d) { return czm_unpackDepth(czm_textureCube(shadowMap, d)); @@ -3883,7 +3885,7 @@ float czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth) { return step(depth, czm_sampleShadowMap(shadowMap, uv)); } -`;var e5t=T(S(),1),BG=` +`;var JNt=S(T(),1),BG=` float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness) { #ifdef USE_NORMAL_SHADING @@ -3949,7 +3951,7 @@ float czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParam return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness); } #endif -`;var n5t=T(S(),1),YG=`/** +`;var jNt=S(T(),1),YG=`/** * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL * built-in function sign except that returns 1.0 instead of 0.0 when the input value is 0.0. * @@ -3978,7 +3980,7 @@ vec4 czm_signNotZero(vec4 value) { return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w)); } -`;var o5t=T(S(),1),OG=`/** +`;var $Nt=S(T(),1),OG=`/** * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector. *

* The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22]. @@ -4020,7 +4022,7 @@ vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9]) + L21 * (z * x) + L22 * (x * x - y * y); } -`;var s5t=T(S(),1),HG=`/** +`;var t5t=S(T(),1),zG=`/** * Converts an sRGB color to a linear RGB color. * * @param {vec3|vec4} srgbIn The color in sRGB space @@ -4036,7 +4038,7 @@ vec4 czm_srgbToLinear(vec4 srgbIn) vec3 linearOut = pow(srgbIn.rgb, vec3(2.2)); return vec4(linearOut, srgbIn.a); } -`;var c5t=T(S(),1),zG=`/** +`;var i5t=S(T(),1),KG=`/** * Creates a matrix that transforms vectors from tangent space to eye space. * * @name czm_tangentToEyeSpaceMatrix @@ -4061,7 +4063,7 @@ mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC bitangent.x, bitangent.y, bitangent.z, normal.x , normal.y , normal.z); } -`;var d5t=T(S(),1),KG=`/** +`;var r5t=S(T(),1),HG=`/** * A wrapper around the texture (WebGL2) / textureCube (WebGL1) * function to allow for WebGL 1 support. * @@ -4077,7 +4079,7 @@ vec4 czm_textureCube(samplerCube sampler, vec3 p) { #else return textureCube(sampler, p); #endif -}`;var m5t=T(S(),1),JG=`/** +}`;var a5t=S(T(),1),JG=`/** * Transforms a plane. * * @name czm_transformPlane @@ -4092,7 +4094,7 @@ vec4 czm_transformPlane(vec4 plane, mat4 transform) { float normalMagnitude = length(transformedPlane.xyz); return transformedPlane / normalMagnitude; } -`;var f5t=T(S(),1),QG=`/** +`;var l5t=S(T(),1),QG=`/** * Translates a position (or any vec3) that was encoded with {@link EncodedCartesian3}, * and then provided to the shader as separate high and low bits to * be relative to the eye. As shown in the example, the position can then be transformed in eye @@ -4137,7 +4139,7 @@ vec4 czm_translateRelativeToEye(vec3 high, vec3 low) return vec4(highDifference + lowDifference, 1.0); } -`;var b5t=T(S(),1),jG=`/** +`;var u5t=S(T(),1),jG=`/** * @private */ vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC) @@ -4164,7 +4166,7 @@ vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirection return vec4(color, material.alpha); } -`;var y5t=T(S(),1),qG=`/** +`;var h5t=S(T(),1),qG=`/** * Returns the transpose of the matrix. The input matrix can be * a mat2, mat3, or mat4. * @@ -4209,7 +4211,7 @@ mat4 czm_transpose(mat4 matrix) matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2], matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]); } -`;var _5t=T(S(),1),$G=`vec2 getLookupUv(vec2 dimensions, int i) { +`;var p5t=S(T(),1),$G=`vec2 getLookupUv(vec2 dimensions, int i) { int pixY = i / int(dimensions.x); int pixX = i - (pixY * int(dimensions.x)); float pixelWidth = 1.0 / dimensions.x; @@ -4222,7 +4224,7 @@ mat4 czm_transpose(mat4 matrix) vec4 czm_unpackClippingExtents(highp sampler2D extentsTexture, int index) { vec2 textureDimensions = vec2(textureSize(extentsTexture, 0)); return texture(extentsTexture, getLookupUv(textureDimensions, index)); -}`;var S5t=T(S(),1),eE=`/** +}`;var g5t=S(T(),1),eE=`/** * Unpacks a vec4 depth value to a float in [0, 1) range. * * @name czm_unpackDepth @@ -4238,7 +4240,7 @@ vec4 czm_unpackClippingExtents(highp sampler2D extentsTexture, int index) { // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/ return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0)); } -`;var V5t=T(S(),1),tE=`/** +`;var x5t=S(T(),1),tE=`/** * Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4. * * @name czm_unpackFloat @@ -4262,7 +4264,7 @@ float czm_unpackFloat(vec4 packedFloat) float result = sign * exp2(exponent - 23.0) * mantissa; return result; } -`;var R5t=T(S(),1),nE=`/** +`;var S5t=S(T(),1),nE=`/** * Unpack unsigned integers of 1-4 bytes. in WebGL 1, there is no uint type, * so the return value is an int. *

@@ -4293,7 +4295,7 @@ float czm_unpackFloat(vec4 packedFloat) vec4 rounded = czm_round(packedValue * 255.0); return int(dot(rounded, vec4(1.0, 256.0, 65536.0, 16777216.0))); } -`;var G5t=T(S(),1),iE=`/** +`;var C5t=S(T(),1),iE=`/** * Transform metadata values following the EXT_structural_metadata spec * by multiplying by scale and adding the offset. Operations are always * performed component-wise, even for matrices. @@ -4331,7 +4333,7 @@ mat3 czm_valueTransform(mat3 offset, mat3 scale, mat3 value) { mat4 czm_valueTransform(mat4 offset, mat4 scale, mat4 value) { return matrixCompMult(scale, value) + offset; } -`;var X5t=T(S(),1),oE=`#ifdef LOG_DEPTH +`;var Z5t=S(T(),1),oE=`#ifdef LOG_DEPTH // 1.0 at the near plane, increasing linearly from there. out float v_depthFromNearPlusOne; #ifdef SHADOW_MAP @@ -4395,7 +4397,7 @@ void czm_vertexLogDepth(vec4 clipCoords) czm_updatePositionDepth(clipCoords); #endif } -`;var W5t=T(S(),1),rE=`vec4 czm_screenToEyeCoordinates(vec4 screenCoordinate) +`;var R5t=S(T(),1),rE=`vec4 czm_screenToEyeCoordinates(vec4 screenCoordinate) { // Reconstruct NDC coordinates float x = 2.0 * screenCoordinate.x - 1.0; @@ -4506,7 +4508,7 @@ vec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth vec2 screenCoordXY = (fragmentCoordinateXY.xy - czm_viewport.xy) / czm_viewport.zw; return czm_screenToEyeCoordinates(screenCoordXY, depthOrLogDepth); } -`;var v5t=T(S(),1),sE=`// emulated noperspective +`;var E5t=S(T(),1),sE=`// emulated noperspective #if !defined(LOG_DEPTH) in float v_WindowZ; #endif @@ -4530,7 +4532,7 @@ void czm_writeDepthClamp() gl_FragDepth = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0); #endif } -`;var F5t=T(S(),1),aE=`#ifdef LOG_DEPTH +`;var I5t=S(T(),1),aE=`#ifdef LOG_DEPTH in float v_depthFromNearPlusOne; #ifdef POLYGON_OFFSET @@ -4609,7 +4611,7 @@ void czm_writeLogDepth() { czm_writeLogDepth(v_depthFromNearPlusOne); #endif } -`;var M5t=T(S(),1),cE=`/** +`;var P5t=S(T(),1),cE=`/** * Transforms a value for non-perspective interpolation by multiplying * it by w, the value used in the perspective divide. This function is * intended to be called in a vertex shader to compute the value of a @@ -4641,20 +4643,20 @@ vec3 czm_writeNonPerspective(vec3 value, float w) { vec4 czm_writeNonPerspective(vec4 value, float w) { return value * w; } -`;var sx={czm_degreesPerRadian:wR,czm_depthRange:FR,czm_epsilon1:AR,czm_epsilon2:MR,czm_epsilon3:NR,czm_epsilon4:kR,czm_epsilon5:UR,czm_epsilon6:DR,czm_epsilon7:BR,czm_infinity:YR,czm_oneOverPi:OR,czm_oneOverTwoPi:HR,czm_passCesium3DTile:zR,czm_passCesium3DTileClassification:KR,czm_passCesium3DTileClassificationIgnoreShow:JR,czm_passClassification:QR,czm_passCompute:jR,czm_passEnvironment:qR,czm_passGlobe:$R,czm_passOpaque:eZ,czm_passOverlay:tZ,czm_passTerrainClassification:nZ,czm_passTranslucent:iZ,czm_passVoxels:oZ,czm_pi:rZ,czm_piOverFour:sZ,czm_piOverSix:aZ,czm_piOverThree:cZ,czm_piOverTwo:lZ,czm_radiansPerDegree:dZ,czm_sceneMode2D:uZ,czm_sceneMode3D:mZ,czm_sceneModeColumbusView:hZ,czm_sceneModeMorphing:fZ,czm_solarRadius:pZ,czm_threePiOver2:bZ,czm_twoPi:gZ,czm_webMercatorMaxLatitude:yZ,czm_depthRangeStruct:xZ,czm_material:_Z,czm_materialInput:TZ,czm_modelMaterial:SZ,czm_modelVertexOutput:CZ,czm_ray:VZ,czm_raySegment:LZ,czm_shadowParameters:RZ,czm_HSBToRGB:ZZ,czm_HSLToRGB:GZ,czm_RGBToHSB:EZ,czm_RGBToHSL:XZ,czm_RGBToXYZ:IZ,czm_XYZToRGB:WZ,czm_acesTonemapping:PZ,czm_alphaWeight:vZ,czm_antialias:wZ,czm_applyHSBShift:FZ,czm_approximateSphericalCoordinates:AZ,czm_approximateTanh:MZ,czm_backFacing:NZ,czm_branchFreeTernary:kZ,czm_cascadeColor:UZ,czm_cascadeDistance:DZ,czm_cascadeMatrix:BZ,czm_cascadeWeights:YZ,czm_clipPolygons:OZ,czm_columbusViewMorph:HZ,czm_computeAtmosphereColor:zZ,czm_computeGroundAtmosphereScattering:KZ,czm_computePosition:JZ,czm_computeScattering:QZ,czm_cosineAndSine:jZ,czm_decompressTextureCoordinates:qZ,czm_depthClamp:$Z,czm_eastNorthUpToEyeCoordinates:eG,czm_ellipsoidContainsPoint:tG,czm_ellipsoidWgs84TextureCoordinates:nG,czm_equalsEpsilon:iG,czm_eyeOffset:oG,czm_eyeToWindowCoordinates:rG,czm_fastApproximateAtan:sG,czm_fog:aG,czm_gammaCorrect:cG,czm_geodeticSurfaceNormal:lG,czm_getDefaultMaterial:dG,czm_getDynamicAtmosphereLightDirection:uG,czm_getLambertDiffuse:mG,czm_getSpecular:hG,czm_getWaterNoise:fG,czm_hue:pG,czm_inverseGamma:bG,czm_isEmpty:gG,czm_isFull:yG,czm_latitudeToWebMercatorFraction:xG,czm_lineDistance:_G,czm_linearToSrgb:TG,czm_luminance:SG,czm_maximumComponent:CG,czm_metersPerPixel:VG,czm_modelToWindowCoordinates:LG,czm_multiplyWithColorBalance:RG,czm_nearFarScalar:ZG,czm_octDecode:GG,czm_packDepth:EG,czm_pbrLighting:XG,czm_phong:IG,czm_planeDistance:WG,czm_pointAlongRay:PG,czm_rayEllipsoidIntersectionInterval:vG,czm_raySphereIntersectionInterval:wG,czm_readDepth:FG,czm_readNonPerspective:AG,czm_reverseLogDepth:MG,czm_round:NG,czm_sampleOctahedralProjection:kG,czm_saturation:UG,czm_shadowDepthCompare:DG,czm_shadowVisibility:BG,czm_signNotZero:YG,czm_sphericalHarmonics:OG,czm_srgbToLinear:HG,czm_tangentToEyeSpaceMatrix:zG,czm_textureCube:KG,czm_transformPlane:JG,czm_translateRelativeToEye:QG,czm_translucentPhong:jG,czm_transpose:qG,czm_unpackClippingExtents:$G,czm_unpackDepth:eE,czm_unpackFloat:tE,czm_unpackUint:nE,czm_valueTransform:iE,czm_vertexLogDepth:oE,czm_windowToEyeCoordinates:rE,czm_writeDepthClamp:sE,czm_writeLogDepth:aE,czm_writeNonPerspective:cE};var bDt=T(S(),1);function aGe(e,t){let n=e;return n=n.replaceAll("version 300 es",""),n=n.replaceAll(/(texture\()/g,"texture2D("),t?(n=n.replaceAll(/\n\s*(in)\s+(vec\d|mat\d|float)/g,` +`;var rx={czm_degreesPerRadian:wL,czm_depthRange:FL,czm_epsilon1:AL,czm_epsilon2:ML,czm_epsilon3:NL,czm_epsilon4:UL,czm_epsilon5:kL,czm_epsilon6:DL,czm_epsilon7:BL,czm_infinity:YL,czm_oneOverPi:OL,czm_oneOverTwoPi:zL,czm_passCesium3DTile:KL,czm_passCesium3DTileClassification:HL,czm_passCesium3DTileClassificationIgnoreShow:JL,czm_passClassification:QL,czm_passCompute:jL,czm_passEnvironment:qL,czm_passGlobe:$L,czm_passOpaque:eR,czm_passOverlay:tR,czm_passTerrainClassification:nR,czm_passTranslucent:iR,czm_passVoxels:oR,czm_pi:rR,czm_piOverFour:sR,czm_piOverSix:aR,czm_piOverThree:cR,czm_piOverTwo:lR,czm_radiansPerDegree:dR,czm_sceneMode2D:uR,czm_sceneMode3D:mR,czm_sceneModeColumbusView:hR,czm_sceneModeMorphing:fR,czm_solarRadius:pR,czm_threePiOver2:bR,czm_twoPi:gR,czm_webMercatorMaxLatitude:yR,czm_depthRangeStruct:xR,czm_material:_R,czm_materialInput:SR,czm_modelMaterial:TR,czm_modelVertexOutput:CR,czm_ray:VR,czm_raySegment:ZR,czm_shadowParameters:LR,czm_HSBToRGB:RR,czm_HSLToRGB:GR,czm_RGBToHSB:ER,czm_RGBToHSL:WR,czm_RGBToXYZ:IR,czm_XYZToRGB:XR,czm_acesTonemapping:PR,czm_alphaWeight:vR,czm_antialias:wR,czm_applyHSBShift:FR,czm_approximateSphericalCoordinates:AR,czm_approximateTanh:MR,czm_backFacing:NR,czm_branchFreeTernary:UR,czm_cascadeColor:kR,czm_cascadeDistance:DR,czm_cascadeMatrix:BR,czm_cascadeWeights:YR,czm_clipPolygons:OR,czm_columbusViewMorph:zR,czm_computeAtmosphereColor:KR,czm_computeGroundAtmosphereScattering:HR,czm_computePosition:JR,czm_computeScattering:QR,czm_cosineAndSine:jR,czm_decompressTextureCoordinates:qR,czm_depthClamp:$R,czm_eastNorthUpToEyeCoordinates:eG,czm_ellipsoidContainsPoint:tG,czm_ellipsoidTextureCoordinates:nG,czm_equalsEpsilon:iG,czm_eyeOffset:oG,czm_eyeToWindowCoordinates:rG,czm_fastApproximateAtan:sG,czm_fog:aG,czm_gammaCorrect:cG,czm_geodeticSurfaceNormal:lG,czm_getDefaultMaterial:dG,czm_getDynamicAtmosphereLightDirection:uG,czm_getLambertDiffuse:mG,czm_getSpecular:hG,czm_getWaterNoise:fG,czm_hue:pG,czm_inverseGamma:bG,czm_isEmpty:gG,czm_isFull:yG,czm_latitudeToWebMercatorFraction:xG,czm_lineDistance:_G,czm_linearToSrgb:SG,czm_luminance:TG,czm_maximumComponent:CG,czm_metersPerPixel:VG,czm_modelToWindowCoordinates:ZG,czm_multiplyWithColorBalance:LG,czm_nearFarScalar:RG,czm_octDecode:GG,czm_packDepth:EG,czm_pbrLighting:WG,czm_phong:IG,czm_planeDistance:XG,czm_pointAlongRay:PG,czm_rayEllipsoidIntersectionInterval:vG,czm_raySphereIntersectionInterval:wG,czm_readDepth:FG,czm_readNonPerspective:AG,czm_reverseLogDepth:MG,czm_round:NG,czm_sampleOctahedralProjection:UG,czm_saturation:kG,czm_shadowDepthCompare:DG,czm_shadowVisibility:BG,czm_signNotZero:YG,czm_sphericalHarmonics:OG,czm_srgbToLinear:zG,czm_tangentToEyeSpaceMatrix:KG,czm_textureCube:HG,czm_transformPlane:JG,czm_translateRelativeToEye:QG,czm_translucentPhong:jG,czm_transpose:qG,czm_unpackClippingExtents:$G,czm_unpackDepth:eE,czm_unpackFloat:tE,czm_unpackUint:nE,czm_valueTransform:iE,czm_vertexLogDepth:oE,czm_windowToEyeCoordinates:rE,czm_writeDepthClamp:sE,czm_writeLogDepth:aE,czm_writeNonPerspective:cE};var uDt=S(T(),1);function rGe(e,t){let n=e;return n=n.replaceAll("version 300 es",""),n=n.replaceAll(/(texture\()/g,"texture2D("),t?(n=n.replaceAll(/\n\s*(in)\s+(vec\d|mat\d|float)/g,` varying $2`),/out_FragData_(\d+)/.test(n)&&(n=`#extension GL_EXT_draw_buffers : enable ${n}`,n=n.replaceAll(/layout\s+\(location\s*=\s*\d+\)\s*out\s+vec4\s+out_FragData_\d+;/g,""),n=n.replaceAll(/out_FragData_(\d+)/g,"gl_FragData[$1]")),n=n.replaceAll(/layout\s+\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,""),n=n.replaceAll(/out_FragColor/g,"gl_FragColor"),n=n.replaceAll(/out_FragColor\[(\d+)\]/g,"gl_FragColor[$1]"),/gl_FragDepth/.test(n)&&(n=`#extension GL_EXT_frag_depth : enable ${n}`,n=n.replaceAll(/gl_FragDepth/g,"gl_FragDepthEXT")),n=`#ifdef GL_OES_standard_derivatives #extension GL_OES_standard_derivatives : enable #endif ${n}`):(n=n.replaceAll(/(in)\s+(vec\d|mat\d|float)/g,"attribute $2"),n=n.replaceAll(/(out)\s+(vec\d|mat\d|float)\s+([\w]+);/g,"varying $2 $3;")),n=`#version 100 -${n}`,n}var lE=aGe;function Fee(e){return e=e.replace(/\/\/.*/g,""),e.replace(/\/\*\*[\s\S]*?\*\//gm,function(t){let n=t.match(/\n/gm).length,i="";for(let o=0;o0;){let o=e.pop();n.push(o),o.requiredBy.length===0&&t.push(o)}for(;t.length>0;){let o=t.shift();e.push(o);for(let r=0;r=0;--o)i=`${i+t[o].glslSource} -`;return i.replace(n.glslSource,"")}function Nee(e,t,n){let i,o,r="",s=e.sources;if(l(s))for(i=0,o=s.length;i0;){let o=e.pop();n.push(o),o.requiredBy.length===0&&t.push(o)}for(;t.length>0;){let o=t.shift();e.push(o);for(let r=0;r=0;--o)i=`${i+t[o].glslSource} +`;return i.replace(n.glslSource,"")}function kee(e,t,n){let i,o,r="",s=e.sources;if(l(s))for(i=0,o=s.length;i=0?(n=Math.floor(e/65536)*65536,t.high=n,t.low=e-n):(n=Math.floor(-e/65536)*65536,t.high=-n,t.low=e+n),t};var fp={high:0,low:0};Kh.fromCartesian=function(e,t){l(t)||(t=new Kh);let n=t.high,i=t.low;return Kh.encode(e.x,fp),n.x=fp.high,i.x=fp.low,Kh.encode(e.y,fp),n.y=fp.high,i.y=fp.low,Kh.encode(e.z,fp),n.z=fp.high,i.z=fp.low,t};var MY=new Kh;Kh.writeElements=function(e,t,n){Kh.fromCartesian(e,MY);let i=MY.high,o=MY.low;t[n]=i.x,t[n+1]=i.y,t[n+2]=i.z,t[n+3]=o.x,t[n+4]=o.y,t[n+5]=o.z};var Yn=Kh;var MDt=T(S(),1);function fGe(e,t){let n=[],i=e.length,o=0;for(;o=W.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)};Es.createTypedArrayFromArrayBuffer=function(e,t,n,i){return e>=W.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)};Es.fromTypedArray=function(e){if(e instanceof Uint8Array)return Es.UNSIGNED_BYTE;if(e instanceof Uint16Array)return Es.UNSIGNED_SHORT;if(e instanceof Uint32Array)return Es.UNSIGNED_INT};var Me=Object.freeze(Es);var e3t=T(S(),1);function su(e){e=y(e,y.EMPTY_OBJECT);let t=e.context._gl,n=e.bufferTarget,i=e.typedArray,o=e.sizeInBytes,r=e.usage,s=l(i);s&&(o=i.byteLength);let a=t.createBuffer();t.bindBuffer(n,a),t.bufferData(n,s?i:o,r),t.bindBuffer(n,null),this._id=Bn(),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=o,this._usage=r,this._buffer=a,this.vertexArrayDestroyable=!0}su.createVertexBuffer=function(e){return new su({context:e.context,bufferTarget:ne.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};su.createIndexBuffer=function(e){let t=e.context,n=e.indexDatatype,i=Me.getSizeInBytes(n),o=new su({context:t,bufferTarget:ne.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage}),r=o.sizeInBytes/i;return Object.defineProperties(o,{indexDatatype:{get:function(){return n}},bytesPerIndex:{get:function(){return i}},numberOfIndices:{get:function(){return r}}}),o};Object.defineProperties(su.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}});su.prototype._getBuffer=function(){return this._buffer};su.prototype.copyFromArrayView=function(e,t){t=y(t,0);let n=this._gl,i=this._bufferTarget;n.bindBuffer(i,this._buffer),n.bufferSubData(i,t,e),n.bindBuffer(i,null)};su.prototype.copyFromBuffer=function(e,t,n,i){let o=ne.COPY_READ_BUFFER,r=ne.COPY_WRITE_BUFFER,s=this._gl;s.bindBuffer(r,this._buffer),s.bindBuffer(o,e._buffer),s.copyBufferSubData(o,r,t,n,i),s.bindBuffer(r,null),s.bindBuffer(o,null)};su.prototype.getBufferData=function(e,t,n,i){t=y(t,0),n=y(n,0);let o=this._gl,r=ne.COPY_READ_BUFFER;o.bindBuffer(r,this._buffer),o.getBufferSubData(r,t,e,n,i),o.bindBuffer(r,null)};su.prototype.isDestroyed=function(){return!1};su.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),me(this)};var ft=su;function pGe(e,t,n,i){let o=l(t.vertexBuffer),r=l(t.value),s=t.value?t.value.length:t.componentsPerAttribute,a={index:y(t.index,n),enabled:y(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:r?t.value.slice(0):void 0,componentsPerAttribute:s,componentDatatype:y(t.componentDatatype,Q.FLOAT),normalize:y(t.normalize,!1),offsetInBytes:y(t.offsetInBytes,0),strideInBytes:y(t.strideInBytes,0),instanceDivisor:y(t.instanceDivisor,0)};if(o)a.vertexAttrib=function(c){let d=this.index;c.bindBuffer(c.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),c.vertexAttribPointer(d,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),c.enableVertexAttribArray(d),this.instanceDivisor>0&&(i.glVertexAttribDivisor(d,this.instanceDivisor),i._vertexAttribDivisors[d]=this.instanceDivisor,i._previousDrawInstanced=!0)},a.disableVertexAttribArray=function(c){c.disableVertexAttribArray(this.index),this.instanceDivisor>0&&i.glVertexAttribDivisor(n,0)};else{switch(a.componentsPerAttribute){case 1:a.vertexAttrib=function(c){c.vertexAttrib1fv(this.index,this.value)};break;case 2:a.vertexAttrib=function(c){c.vertexAttrib2fv(this.index,this.value)};break;case 3:a.vertexAttrib=function(c){c.vertexAttrib3fv(this.index,this.value)};break;case 4:a.vertexAttrib=function(c){c.vertexAttrib4fv(this.index,this.value)};break}a.disableVertexAttribArray=function(c){}}e.push(a)}function Yee(e,t,n){for(let i=0;i0&&(c=!0),l(s[r].value)&&(d=!0);let m;t.vertexArrayObject&&(m=t.glCreateVertexArray(),t.glBindVertexArray(m),Yee(n,s,o),t.glBindVertexArray(null)),this._numberOfVertices=a,this._hasInstancedAttributes=c,this._hasConstantAttributes=d,this._context=t,this._gl=n,this._vao=m,this._attributes=s,this._indexBuffer=o}function Bee(e){return e.values.length/e.componentsPerAttribute}function bGe(e){return Q.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function gGe(e){let t,n,i,o=[];for(n in e)e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)&&(o.push(n),e[n].componentDatatype===Q.DOUBLE&&(e[n].componentDatatype=Q.FLOAT,e[n].values=Q.createTypedArray(Q.FLOAT,e[n].values)));let r,s=o.length;if(s>0)for(r=Bee(e[o[0]]),t=1;t0){let d=Q.getSizeInBytes(e[o[0]].componentDatatype),u=a%d;u!==0&&(a+=d-u);let m=r*a,p=new ArrayBuffer(m),g={};for(t=0;t=W.SIXTY_FOUR_KILOBYTES&&t.elementIndexUint?p=ft.createIndexBuffer({context:t,typedArray:new Uint32Array(g),usage:i,indexDatatype:Me.UNSIGNED_INT}):p=ft.createIndexBuffer({context:t,typedArray:new Uint16Array(g),usage:i,indexDatatype:Me.UNSIGNED_SHORT})),new pp({context:t,attributes:u,indexBuffer:p})};Object.defineProperties(pp.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}});pp.prototype.getAttribute=function(e){return this._attributes[e]};function yGe(e){let t=e._context,n=e._hasInstancedAttributes;if(!n&&!t._previousDrawInstanced)return;t._previousDrawInstanced=n;let i=t._vertexAttribDivisors,o=e._attributes,r=Mt.maximumVertexAttributes,s;if(n){let a=o.length;for(s=0;s0&&(t.glVertexAttribDivisor(s,0),i[s]=0)}function xGe(e,t){let n=e._attributes,i=n.length;for(let o=0;o=0?(n=Math.floor(e/65536)*65536,t.high=n,t.low=e-n):(n=Math.floor(-e/65536)*65536,t.high=-n,t.low=e+n),t};var hp={high:0,low:0};Kh.fromCartesian=function(e,t){l(t)||(t=new Kh);let n=t.high,i=t.low;return Kh.encode(e.x,hp),n.x=hp.high,i.x=hp.low,Kh.encode(e.y,hp),n.y=hp.high,i.y=hp.low,Kh.encode(e.z,hp),n.z=hp.high,i.z=hp.low,t};var N3=new Kh;Kh.writeElements=function(e,t,n){Kh.fromCartesian(e,N3);let i=N3.high,o=N3.low;t[n]=i.x,t[n+1]=i.y,t[n+2]=i.z,t[n+3]=o.x,t[n+4]=o.y,t[n+5]=o.z};var Yn=Kh;var PDt=S(T(),1);function mGe(e,t){let n=[],i=e.length,o=0;for(;o=X.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)};Is.createTypedArrayFromArrayBuffer=function(e,t,n,i){return e>=X.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)};Is.fromTypedArray=function(e){if(e instanceof Uint8Array)return Is.UNSIGNED_BYTE;if(e instanceof Uint16Array)return Is.UNSIGNED_SHORT;if(e instanceof Uint32Array)return Is.UNSIGNED_INT};var Me=Object.freeze(Is);var JDt=S(T(),1);function ru(e){e=y(e,y.EMPTY_OBJECT);let t=e.context._gl,n=e.bufferTarget,i=e.typedArray,o=e.sizeInBytes,r=e.usage,s=l(i);s&&(o=i.byteLength);let a=t.createBuffer();t.bindBuffer(n,a),t.bufferData(n,s?i:o,r),t.bindBuffer(n,null),this._id=Bn(),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=o,this._usage=r,this._buffer=a,this.vertexArrayDestroyable=!0}ru.createVertexBuffer=function(e){return new ru({context:e.context,bufferTarget:ie.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};ru.createIndexBuffer=function(e){let t=e.context,n=e.indexDatatype,i=Me.getSizeInBytes(n),o=new ru({context:t,bufferTarget:ie.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage}),r=o.sizeInBytes/i;return Object.defineProperties(o,{indexDatatype:{get:function(){return n}},bytesPerIndex:{get:function(){return i}},numberOfIndices:{get:function(){return r}}}),o};Object.defineProperties(ru.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}});ru.prototype._getBuffer=function(){return this._buffer};ru.prototype.copyFromArrayView=function(e,t){t=y(t,0);let n=this._gl,i=this._bufferTarget;n.bindBuffer(i,this._buffer),n.bufferSubData(i,t,e),n.bindBuffer(i,null)};ru.prototype.copyFromBuffer=function(e,t,n,i){let o=ie.COPY_READ_BUFFER,r=ie.COPY_WRITE_BUFFER,s=this._gl;s.bindBuffer(r,this._buffer),s.bindBuffer(o,e._buffer),s.copyBufferSubData(o,r,t,n,i),s.bindBuffer(r,null),s.bindBuffer(o,null)};ru.prototype.getBufferData=function(e,t,n,i){t=y(t,0),n=y(n,0);let o=this._gl,r=ie.COPY_READ_BUFFER;o.bindBuffer(r,this._buffer),o.getBufferSubData(r,t,e,n,i),o.bindBuffer(r,null)};ru.prototype.isDestroyed=function(){return!1};ru.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),me(this)};var ft=ru;function hGe(e,t,n,i){let o=l(t.vertexBuffer),r=l(t.value),s=t.value?t.value.length:t.componentsPerAttribute,a={index:y(t.index,n),enabled:y(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:r?t.value.slice(0):void 0,componentsPerAttribute:s,componentDatatype:y(t.componentDatatype,Q.FLOAT),normalize:y(t.normalize,!1),offsetInBytes:y(t.offsetInBytes,0),strideInBytes:y(t.strideInBytes,0),instanceDivisor:y(t.instanceDivisor,0)};if(o)a.vertexAttrib=function(c){let d=this.index;c.bindBuffer(c.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),c.vertexAttribPointer(d,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),c.enableVertexAttribArray(d),this.instanceDivisor>0&&(i.glVertexAttribDivisor(d,this.instanceDivisor),i._vertexAttribDivisors[d]=this.instanceDivisor,i._previousDrawInstanced=!0)},a.disableVertexAttribArray=function(c){c.disableVertexAttribArray(this.index),this.instanceDivisor>0&&i.glVertexAttribDivisor(n,0)};else{switch(a.componentsPerAttribute){case 1:a.vertexAttrib=function(c){c.vertexAttrib1fv(this.index,this.value)};break;case 2:a.vertexAttrib=function(c){c.vertexAttrib2fv(this.index,this.value)};break;case 3:a.vertexAttrib=function(c){c.vertexAttrib3fv(this.index,this.value)};break;case 4:a.vertexAttrib=function(c){c.vertexAttrib4fv(this.index,this.value)};break}a.disableVertexAttribArray=function(c){}}e.push(a)}function zee(e,t,n){for(let i=0;i0&&(c=!0),l(s[r].value)&&(d=!0);let m;t.vertexArrayObject&&(m=t.glCreateVertexArray(),t.glBindVertexArray(m),zee(n,s,o),t.glBindVertexArray(null)),this._numberOfVertices=a,this._hasInstancedAttributes=c,this._hasConstantAttributes=d,this._context=t,this._gl=n,this._vao=m,this._attributes=s,this._indexBuffer=o}function Oee(e){return e.values.length/e.componentsPerAttribute}function fGe(e){return Q.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function pGe(e){let t,n,i,o=[];for(n in e)e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)&&(o.push(n),e[n].componentDatatype===Q.DOUBLE&&(e[n].componentDatatype=Q.FLOAT,e[n].values=Q.createTypedArray(Q.FLOAT,e[n].values)));let r,s=o.length;if(s>0)for(r=Oee(e[o[0]]),t=1;t0){let d=Q.getSizeInBytes(e[o[0]].componentDatatype),u=a%d;u!==0&&(a+=d-u);let m=r*a,p=new ArrayBuffer(m),g={};for(t=0;t=X.SIXTY_FOUR_KILOBYTES&&t.elementIndexUint?p=ft.createIndexBuffer({context:t,typedArray:new Uint32Array(g),usage:i,indexDatatype:Me.UNSIGNED_INT}):p=ft.createIndexBuffer({context:t,typedArray:new Uint16Array(g),usage:i,indexDatatype:Me.UNSIGNED_SHORT})),new fp({context:t,attributes:u,indexBuffer:p})};Object.defineProperties(fp.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}});fp.prototype.getAttribute=function(e){return this._attributes[e]};function bGe(e){let t=e._context,n=e._hasInstancedAttributes;if(!n&&!t._previousDrawInstanced)return;t._previousDrawInstanced=n;let i=t._vertexAttribDivisors,o=e._attributes,r=Mt.maximumVertexAttributes,s;if(n){let a=o.length;for(s=0;s0&&(t.glVertexAttribDivisor(s,0),i[s]=0)}function gGe(e,t){let n=e._attributes,i=n.length;for(let o=0;o>1^-(e&1)}bo.zigZagDeltaDecode=function(e,t,n){let i=e.length,o=0,r=0,s=0;for(let a=0;a>11,u=c>>5&o,m=c&i,p=3*a;t[p]=d*r,t[p+1]=u*s,t[p+2]=m*r}return t};var wn=bo;var J3t=T(S(),1);var Qee=new h,jee=new h,qee=new h;function PGe(e,t,n,i,o){l(o)||(o=new h);let r,s,a,c,d,u,m,p;if(l(t.z)){if(h.equalsEpsilon(e,t,W.EPSILON14))return h.clone(h.UNIT_X,o);if(h.equalsEpsilon(e,n,W.EPSILON14))return h.clone(h.UNIT_Y,o);if(h.equalsEpsilon(e,i,W.EPSILON14))return h.clone(h.UNIT_Z,o);r=h.subtract(n,t,Qee),s=h.subtract(i,t,jee),a=h.subtract(e,t,qee),c=h.dot(r,r),d=h.dot(r,s),u=h.dot(r,a),m=h.dot(s,s),p=h.dot(s,a)}else{if(D.equalsEpsilon(e,t,W.EPSILON14))return h.clone(h.UNIT_X,o);if(D.equalsEpsilon(e,n,W.EPSILON14))return h.clone(h.UNIT_Y,o);if(D.equalsEpsilon(e,i,W.EPSILON14))return h.clone(h.UNIT_Z,o);r=D.subtract(n,t,Qee),s=D.subtract(i,t,jee),a=D.subtract(e,t,qee),c=D.dot(r,r),d=D.dot(r,s),u=D.dot(r,a),m=D.dot(s,s),p=D.dot(s,a)}o.y=m*u-d*p,o.z=c*p-d*u;let g=c*m-d*d;if(g!==0)return o.y/=g,o.z/=g,o.x=1-o.y-o.z,o}var cx=PGe;var $3t=T(S(),1);var UY={};UY.calculateACMR=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o=t.length;if(!l(n)){n=0;let a=0,c=t[a];for(;an&&(n=c),++a,c=t[a]}let r=[];for(let a=0;ai&&(r[t[a]]=s,++s);return(s-i+1)/(o/3)};UY.tipsify=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o;function r(b,R,E,I){for(;R.length>=1;){let w=R[R.length-1];if(R.splice(R.length-1,1),b[w].numLiveTriangles>0)return w}for(;o0)return++o,o-1;++o}return-1}function s(b,R,E,I,w,N,B){let U=-1,O,k=-1,J=0;for(;Jk||k===-1)&&(k=O,U=H)),++J}return U===-1?r(I,N,b,B):U}let a=t.length,c=0,d=0,u=t[d],m=a;if(l(n))c=n+1;else{for(;dc&&(c=u),++d,u=t[d];if(c===-1)return 0;++c}let p=[],g;for(g=0;gi&&(L.timeStamp=_,++_),++d}x=s(t,i,C,p,_,V,c)}return X};var fE=UY;var wc={};function xN(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function vGe(e){let t=e.length,n=t/3*6,i=Me.createTypedArray(t,n),o=0;for(let r=0;r=3){let n=(t-2)*6,i=Me.createTypedArray(t,n);xN(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r0){let t=e.length-1,n=(t-1)*6,i=Me.createTypedArray(t,n),o=e[0],r=0;for(let s=1;so&&(o=n[r]);e.indices=fE.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function $ee(e){let t={};for(let n in e)if(e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)){let i=e[n];t[n]=new Ge({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function AGe(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];for(let r=0;r=W.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=$ee(e.attributes),a=e.indices,c=a.length,d;e.primitiveType===Fe.TRIANGLES?d=3:e.primitiveType===Fe.LINES?d=2:e.primitiveType===Fe.POINTS&&(d=1);for(let u=0;u=W.SIXTY_FOUR_KILOBYTES&&(t.push(new ut({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=$ee(e.attributes))}o.length!==0&&t.push(new ut({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var ete=new h,MGe=new he;wc.projectTo2D=function(e,t,n,i,o){let r=e.attributes[t];o=l(o)?o:new Si;let s=o.ellipsoid,a=r.values,c=new Float64Array(a.length),d=0;for(let u=0;u_&&(_=V)}return new ut({attributes:u,indices:f,primitiveType:d,boundingSphere:l(x)?new le(x,_):void 0})}wc.combineInstances=function(e){let t=[],n=[],i=e.length;for(let r=0;r0&&o.push(OY(t,"geometry")),n.length>0&&(o.push(OY(n,"westHemisphereGeometry")),o.push(OY(n,"eastHemisphereGeometry"))),o};var au=new h,pE=new h,BS=new h,YS=new h;wc.computeNormal=function(e){let t=e.indices,n=e.attributes,i=n.position.values,o=n.position.values.length/3,r=t.length,s=new Array(o),a=new Array(r/3),c=new Array(r),d;for(d=0;d0){for(u=0;u3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;oo?i>r?s=W.sign(e.y):s=W.sign(n.y):o>r?s=W.sign(t.y):s=W.sign(n.y);let a=s<0;Ib(e,a),Ib(t,a),Ib(n,a)}var ote=new h;function cu(e,t,n,i){h.add(e,h.multiplyByScalar(h.subtract(t,e,ote),e.y/(e.y-t.y),ote),n),h.clone(n,i),Ib(n,!0),Ib(i,!1)}var lx=new h,dx=new h,ux=new h,mx=new h,HY={positions:new Array(7),indices:new Array(3*3)};function jGe(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;QGe(e,t,n);let i=e.y<0,o=t.y<0,r=n.y<0,s=0;s+=i?1:0,s+=o?1:0,s+=r?1:0;let a=HY.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(cu(e,t,lx,ux),cu(e,n,dx,mx),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(cu(t,n,lx,ux),cu(t,e,dx,mx),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(cu(n,e,lx,ux),cu(n,t,dx,mx),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):s===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?o?r||(cu(n,e,lx,ux),cu(n,t,dx,mx),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(cu(t,n,lx,ux),cu(t,e,dx,mx),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(cu(e,t,lx,ux),cu(e,n,dx,mx),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let c=HY.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,(s===1||s===2)&&(c[3]=lx,c[4]=dx,c[5]=ux,c[6]=mx,c.length=7),HY}function rte(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let o in n)if(n.hasOwnProperty(o)&&l(n[o])&&l(n[o].values)){let r=n[o];r.values=Q.createTypedArray(r.componentDatatype,r.values)}let i=ut.computeNumberOfVertices(e);return e.indices=Me.createTypedArray(i,e.indices),t&&(e.boundingSphere=le.fromVertices(n.position.values)),e}function HS(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];n[i]=new Ge({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new ut({attributes:n,indices:[],primitiveType:e.primitiveType})}function QY(e,t,n){let i=l(e.geometry.boundingSphere);t=rte(t,i),n=rte(n,i),l(n)&&!l(t)?e.geometry=n:!l(n)&&l(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function jY(e,t){let n=new e,i=new e,o=new e;return function(r,s,a,c,d,u,m,p){let g=e.fromArray(d,r*t,n),f=e.fromArray(d,s*t,i),x=e.fromArray(d,a*t,o);e.multiplyByScalar(g,c.x,g),e.multiplyByScalar(f,c.y,f),e.multiplyByScalar(x,c.z,x);let _=e.add(g,f,g);e.add(_,x,_),p&&e.normalize(_,_),e.pack(_,u,m*t)}}var qGe=jY(se,4),yN=jY(h,3),ute=jY(D,2),$Ge=function(e,t,n,i,o,r,s){let a=o[e]*i.x,c=o[t]*i.y,d=o[n]*i.z;r[s]=a+c+d>W.EPSILON6?1:0},gE=new h,zY=new h,KY=new h,eEe=new h;function bN(e,t,n,i,o,r,s,a,c,d,u,m,p,g,f,x){if(!l(r)&&!l(s)&&!l(a)&&!l(c)&&!l(d)&&g===0)return;let _=h.fromArray(o,e*3,gE),C=h.fromArray(o,t*3,zY),V=h.fromArray(o,n*3,KY),L=cx(i,_,C,V,eEe);if(l(L)){if(l(r)&&yN(e,t,n,L,r,m.normal.values,x,!0),l(d)){let Z=h.fromArray(d,e*3,gE),G=h.fromArray(d,t*3,zY),X=h.fromArray(d,n*3,KY);h.multiplyByScalar(Z,L.x,Z),h.multiplyByScalar(G,L.y,G),h.multiplyByScalar(X,L.z,X);let v;!h.equals(Z,h.ZERO)||!h.equals(G,h.ZERO)||!h.equals(X,h.ZERO)?(v=h.add(Z,G,Z),h.add(v,X,v),h.normalize(v,v)):(v=gE,v.x=0,v.y=0,v.z=0),h.pack(v,m.extrudeDirection.values,x*3)}if(l(u)&&$Ge(e,t,n,L,u,m.applyOffset.values,x),l(s)&&yN(e,t,n,L,s,m.tangent.values,x,!0),l(a)&&yN(e,t,n,L,a,m.bitangent.values,x,!0),l(c)&&ute(e,t,n,L,c,m.st.values,x),g>0)for(let Z=0;Z3){let I=E.positions,w=E.indices,N=w.length;for(let B=0;B0)continue;let c=h.unpack(i,s,fte);(a.y<0&&c.y>0||a.y>0&&c.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):h.pack(a,i,s));let d=h.unpack(o,s,JY);(a.y<0&&d.y>0||a.y>0&&d.y<0)&&(s+30||le.intersectPlane(n,dn.ORIGIN_ZX_PLANE)!==Kt.INTERSECTING))return e;if(t.geometryType!==ru.NONE)switch(t.geometryType){case ru.POLYLINES:dEe(e);break;case ru.TRIANGLES:ste(e);break;case ru.LINES:ate(e);break}else JGe(t),t.primitiveType===Fe.TRIANGLES?ste(e):t.primitiveType===Fe.LINES&&ate(e);return e};var An=wc;var PBt=T(S(),1);function xl(e){this._ellipsoid=y(e,ie.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(xl.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});xl.mercatorAngleToGeodeticLatitude=function(e){return W.PI_OVER_TWO-2*Math.atan(Math.exp(-e))};xl.geodeticLatitudeToMercatorAngle=function(e){e>xl.MaximumLatitude?e=xl.MaximumLatitude:e<-xl.MaximumLatitude&&(e=-xl.MaximumLatitude);let t=Math.sin(e);return .5*Math.log((1+t)/(1-t))};xl.MaximumLatitude=xl.mercatorAngleToGeodeticLatitude(Math.PI);xl.prototype.project=function(e,t){let n=this._semimajorAxis,i=e.longitude*n,o=xl.geodeticLatitudeToMercatorAngle(e.latitude)*n,r=e.height;return l(t)?(t.x=i,t.y=o,t.z=r,t):new h(i,o,r)};xl.prototype.unproject=function(e,t){let n=this._oneOverSemimajorAxis,i=e.x*n,o=xl.mercatorAngleToGeodeticLatitude(e.y*n),r=e.z;return l(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new he(i,o,r)};var Vi=xl;function uEe(e,t,n){let i=!n,o=e.length,r;if(!i&&o>1){let s=e[0].modelMatrix;for(r=1;r=0){let d=i[a];o=d.offset+d.count,s=d.index,r=n[s].indices.length}else o=0,s=0,r=n[s].indices.length;let c=e.length;for(let d=0;dr&&(o=0,r=n[++s].indices.length),i.push({index:s,offset:o,count:p}),o+=p}}function fEe(e,t){let n=[];return $Y(e,"geometry",t,n),$Y(e,"westHemisphereGeometry",t,n),$Y(e,"eastHemisphereGeometry",t,n),n}var gp={};gp.combineGeometry=function(e){let t,n,i=e.instances,o=i.length,r,s,a=!1;o>0&&(t=hEe(e),t.length>0&&(n=An.createAttributeLocations(t[0]),e.createPickOffsets&&(r=fEe(i,t))),l(i[0].attributes)&&l(i[0].attributes.offset)&&(s=new Array(o),a=!0));let c=new Array(o),d=new Array(o);for(let u=0;u0&&(n.set(c.indices,s),s+=f)}return t.push(n.buffer),{stringTable:i,packedData:n}};gp.unpackCreateGeometryResults=function(e){let t=e.stringTable,n=e.packedData,i,o=new Array(n[0]),r=0,s=1;for(;s0){let G=_.length/C;for(Z=Me.createTypedArray(G,x),i=0;i>1^-(e&1)}bo.zigZagDeltaDecode=function(e,t,n){let i=e.length,o=0,r=0,s=0;for(let a=0;a>11,u=c>>5&o,m=c&i,p=3*a;t[p]=d*r,t[p+1]=u*s,t[p+2]=m*r}return t};var wn=bo;var YBt=S(T(),1);var qee=new h,$ee=new h,ete=new h;function IGe(e,t,n,i,o){l(o)||(o=new h);let r,s,a,c,d,u,m,p;if(l(t.z)){if(h.equalsEpsilon(e,t,X.EPSILON14))return h.clone(h.UNIT_X,o);if(h.equalsEpsilon(e,n,X.EPSILON14))return h.clone(h.UNIT_Y,o);if(h.equalsEpsilon(e,i,X.EPSILON14))return h.clone(h.UNIT_Z,o);r=h.subtract(n,t,qee),s=h.subtract(i,t,$ee),a=h.subtract(e,t,ete),c=h.dot(r,r),d=h.dot(r,s),u=h.dot(r,a),m=h.dot(s,s),p=h.dot(s,a)}else{if(D.equalsEpsilon(e,t,X.EPSILON14))return h.clone(h.UNIT_X,o);if(D.equalsEpsilon(e,n,X.EPSILON14))return h.clone(h.UNIT_Y,o);if(D.equalsEpsilon(e,i,X.EPSILON14))return h.clone(h.UNIT_Z,o);r=D.subtract(n,t,qee),s=D.subtract(i,t,$ee),a=D.subtract(e,t,ete),c=D.dot(r,r),d=D.dot(r,s),u=D.dot(r,a),m=D.dot(s,s),p=D.dot(s,a)}o.y=m*u-d*p,o.z=c*p-d*u;let g=c*m-d*d;if(g!==0)return o.y/=g,o.z/=g,o.x=1-o.y-o.z,o}var ax=IGe;var HBt=S(T(),1);var D3={};D3.calculateACMR=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o=t.length;if(!l(n)){n=0;let a=0,c=t[a];for(;an&&(n=c),++a,c=t[a]}let r=[];for(let a=0;ai&&(r[t[a]]=s,++s);return(s-i+1)/(o/3)};D3.tipsify=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o;function r(b,L,E,I){for(;L.length>=1;){let w=L[L.length-1];if(L.splice(L.length-1,1),b[w].numLiveTriangles>0)return w}for(;o0)return++o,o-1;++o}return-1}function s(b,L,E,I,w,N,B){let k=-1,O,U=-1,J=0;for(;JU||U===-1)&&(U=O,k=z)),++J}return k===-1?r(I,N,b,B):k}let a=t.length,c=0,d=0,u=t[d],m=a;if(l(n))c=n+1;else{for(;dc&&(c=u),++d,u=t[d];if(c===-1)return 0;++c}let p=[],g;for(g=0;gi&&(Z.timeStamp=_,++_),++d}x=s(t,i,C,p,_,V,c)}return W};var fE=D3;var vc={};function _N(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function XGe(e){let t=e.length,n=t/3*6,i=Me.createTypedArray(t,n),o=0;for(let r=0;r=3){let n=(t-2)*6,i=Me.createTypedArray(t,n);_N(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r0){let t=e.length-1,n=(t-1)*6,i=Me.createTypedArray(t,n),o=e[0],r=0;for(let s=1;so&&(o=n[r]);e.indices=fE.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function tte(e){let t={};for(let n in e)if(e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)){let i=e[n];t[n]=new Ge({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function wGe(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];for(let r=0;r=X.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=tte(e.attributes),a=e.indices,c=a.length,d;e.primitiveType===Fe.TRIANGLES?d=3:e.primitiveType===Fe.LINES?d=2:e.primitiveType===Fe.POINTS&&(d=1);for(let u=0;u=X.SIXTY_FOUR_KILOBYTES&&(t.push(new ut({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=tte(e.attributes))}o.length!==0&&t.push(new ut({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var nte=new h,FGe=new he;vc.projectTo2D=function(e,t,n,i,o){let r=e.attributes[t];o=l(o)?o:new Ci;let s=o.ellipsoid,a=r.values,c=new Float64Array(a.length),d=0;for(let u=0;u_&&(_=V)}return new ut({attributes:u,indices:f,primitiveType:d,boundingSphere:l(x)?new le(x,_):void 0})}vc.combineInstances=function(e){let t=[],n=[],i=e.length;for(let r=0;r0&&o.push(z3(t,"geometry")),n.length>0&&(o.push(z3(n,"westHemisphereGeometry")),o.push(z3(n,"eastHemisphereGeometry"))),o};var su=new h,pE=new h,DT=new h,BT=new h;vc.computeNormal=function(e){let t=e.indices,n=e.attributes,i=n.position.values,o=n.position.values.length/3,r=t.length,s=new Array(o),a=new Array(r/3),c=new Array(r),d;for(d=0;d0){for(u=0;u3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;oo?i>r?s=X.sign(e.y):s=X.sign(n.y):o>r?s=X.sign(t.y):s=X.sign(n.y);let a=s<0;W0(e,a),W0(t,a),W0(n,a)}var ste=new h;function au(e,t,n,i){h.add(e,h.multiplyByScalar(h.subtract(t,e,ste),e.y/(e.y-t.y),ste),n),h.clone(n,i),W0(n,!0),W0(i,!1)}var cx=new h,lx=new h,dx=new h,ux=new h,K3={positions:new Array(7),indices:new Array(3*3)};function JGe(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;HGe(e,t,n);let i=e.y<0,o=t.y<0,r=n.y<0,s=0;s+=i?1:0,s+=o?1:0,s+=r?1:0;let a=K3.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(au(e,t,cx,dx),au(e,n,lx,ux),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(au(t,n,cx,dx),au(t,e,lx,ux),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(au(n,e,cx,dx),au(n,t,lx,ux),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):s===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?o?r||(au(n,e,cx,dx),au(n,t,lx,ux),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(au(t,n,cx,dx),au(t,e,lx,ux),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(au(e,t,cx,dx),au(e,n,lx,ux),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let c=K3.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,(s===1||s===2)&&(c[3]=cx,c[4]=lx,c[5]=dx,c[6]=ux,c.length=7),K3}function ate(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let o in n)if(n.hasOwnProperty(o)&&l(n[o])&&l(n[o].values)){let r=n[o];r.values=Q.createTypedArray(r.componentDatatype,r.values)}let i=ut.computeNumberOfVertices(e);return e.indices=Me.createTypedArray(i,e.indices),t&&(e.boundingSphere=le.fromVertices(n.position.values)),e}function OT(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];n[i]=new Ge({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new ut({attributes:n,indices:[],primitiveType:e.primitiveType})}function j3(e,t,n){let i=l(e.geometry.boundingSphere);t=ate(t,i),n=ate(n,i),l(n)&&!l(t)?e.geometry=n:!l(n)&&l(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function q3(e,t){let n=new e,i=new e,o=new e;return function(r,s,a,c,d,u,m,p){let g=e.fromArray(d,r*t,n),f=e.fromArray(d,s*t,i),x=e.fromArray(d,a*t,o);e.multiplyByScalar(g,c.x,g),e.multiplyByScalar(f,c.y,f),e.multiplyByScalar(x,c.z,x);let _=e.add(g,f,g);e.add(_,x,_),p&&e.normalize(_,_),e.pack(_,u,m*t)}}var QGe=q3(se,4),xN=q3(h,3),hte=q3(D,2),jGe=function(e,t,n,i,o,r,s){let a=o[e]*i.x,c=o[t]*i.y,d=o[n]*i.z;r[s]=a+c+d>X.EPSILON6?1:0},gE=new h,H3=new h,J3=new h,qGe=new h;function gN(e,t,n,i,o,r,s,a,c,d,u,m,p,g,f,x){if(!l(r)&&!l(s)&&!l(a)&&!l(c)&&!l(d)&&g===0)return;let _=h.fromArray(o,e*3,gE),C=h.fromArray(o,t*3,H3),V=h.fromArray(o,n*3,J3),Z=ax(i,_,C,V,qGe);if(l(Z)){if(l(r)&&xN(e,t,n,Z,r,m.normal.values,x,!0),l(d)){let R=h.fromArray(d,e*3,gE),G=h.fromArray(d,t*3,H3),W=h.fromArray(d,n*3,J3);h.multiplyByScalar(R,Z.x,R),h.multiplyByScalar(G,Z.y,G),h.multiplyByScalar(W,Z.z,W);let v;!h.equals(R,h.ZERO)||!h.equals(G,h.ZERO)||!h.equals(W,h.ZERO)?(v=h.add(R,G,R),h.add(v,W,v),h.normalize(v,v)):(v=gE,v.x=0,v.y=0,v.z=0),h.pack(v,m.extrudeDirection.values,x*3)}if(l(u)&&jGe(e,t,n,Z,u,m.applyOffset.values,x),l(s)&&xN(e,t,n,Z,s,m.tangent.values,x,!0),l(a)&&xN(e,t,n,Z,a,m.bitangent.values,x,!0),l(c)&&hte(e,t,n,Z,c,m.st.values,x),g>0)for(let R=0;R3){let I=E.positions,w=E.indices,N=w.length;for(let B=0;B0)continue;let c=h.unpack(i,s,bte);(a.y<0&&c.y>0||a.y>0&&c.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):h.pack(a,i,s));let d=h.unpack(o,s,Q3);(a.y<0&&d.y>0||a.y>0&&d.y<0)&&(s+30||le.intersectPlane(n,dn.ORIGIN_ZX_PLANE)!==Ht.INTERSECTING))return e;if(t.geometryType!==ou.NONE)switch(t.geometryType){case ou.POLYLINES:cEe(e);break;case ou.TRIANGLES:cte(e);break;case ou.LINES:lte(e);break}else KGe(t),t.primitiveType===Fe.TRIANGLES?cte(e):t.primitiveType===Fe.LINES&<e(e);return e};var An=vc;var GYt=S(T(),1);function yl(e){this._ellipsoid=y(e,te.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(yl.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});yl.mercatorAngleToGeodeticLatitude=function(e){return X.PI_OVER_TWO-2*Math.atan(Math.exp(-e))};yl.geodeticLatitudeToMercatorAngle=function(e){e>yl.MaximumLatitude?e=yl.MaximumLatitude:e<-yl.MaximumLatitude&&(e=-yl.MaximumLatitude);let t=Math.sin(e);return .5*Math.log((1+t)/(1-t))};yl.MaximumLatitude=yl.mercatorAngleToGeodeticLatitude(Math.PI);yl.prototype.project=function(e,t){let n=this._semimajorAxis,i=e.longitude*n,o=yl.geodeticLatitudeToMercatorAngle(e.latitude)*n,r=e.height;return l(t)?(t.x=i,t.y=o,t.z=r,t):new h(i,o,r)};yl.prototype.unproject=function(e,t){let n=this._oneOverSemimajorAxis,i=e.x*n,o=yl.mercatorAngleToGeodeticLatitude(e.y*n),r=e.z;return l(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new he(i,o,r)};var Zi=yl;function lEe(e,t,n){let i=!n,o=e.length,r;if(!i&&o>1){let s=e[0].modelMatrix;for(r=1;r=0){let d=i[a];o=d.offset+d.count,s=d.index,r=n[s].indices.length}else o=0,s=0,r=n[s].indices.length;let c=e.length;for(let d=0;dr&&(o=0,r=n[++s].indices.length),i.push({index:s,offset:o,count:p}),o+=p}}function mEe(e,t){let n=[];return eO(e,"geometry",t,n),eO(e,"westHemisphereGeometry",t,n),eO(e,"eastHemisphereGeometry",t,n),n}var bp={};bp.combineGeometry=function(e){let t,n,i=e.instances,o=i.length,r,s,a=!1;o>0&&(t=uEe(e),t.length>0&&(n=An.createAttributeLocations(t[0]),e.createPickOffsets&&(r=mEe(i,t))),l(i[0].attributes)&&l(i[0].attributes.offset)&&(s=new Array(o),a=!0));let c=new Array(o),d=new Array(o);for(let u=0;u0&&(n.set(c.indices,s),s+=f)}return t.push(n.buffer),{stringTable:i,packedData:n}};bp.unpackCreateGeometryResults=function(e){let t=e.stringTable,n=e.packedData,i,o=new Array(n[0]),r=0,s=1;for(;s0){let G=_.length/C;for(R=Me.createTypedArray(G,x),i=0;i= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; gl_Position *= show; }`,`${i} -${o}`};function xte(e,t){if(!e.compressVertices)return t;let n=t.search(/in\s+vec3\s+normal;/g)!==-1,i=t.search(/in\s+vec2\s+st;/g)!==-1;if(!n&&!i)return t;let o=t.search(/in\s+vec3\s+tangent;/g)!==-1,r=t.search(/in\s+vec3\s+bitangent;/g)!==-1,s=i&&n?2:1;s+=o||r?1:0;let a=s>1?`vec${s}`:"float",c="compressedAttributes",d=`in ${a} ${c};`,u="",m="";if(i){u+=`vec2 st; +${o}`};function Ste(e,t){if(!e.compressVertices)return t;let n=t.search(/in\s+vec3\s+normal;/g)!==-1,i=t.search(/in\s+vec2\s+st;/g)!==-1;if(!n&&!i)return t;let o=t.search(/in\s+vec3\s+tangent;/g)!==-1,r=t.search(/in\s+vec3\s+bitangent;/g)!==-1,s=i&&n?2:1;s+=o||r?1:0;let a=s>1?`vec${s}`:"float",c="compressedAttributes",d=`in ${a} ${c};`,u="",m="";if(i){u+=`vec2 st; `;let f=s>1?`${c}.x`:c;m+=` st = czm_decompressTextureCoordinates(${f}); `}n&&o&&r?(u+=`vec3 normal; vec3 tangent; @@ -4959,10 +4961,10 @@ vec3 bitangent; { ${m} czm_non_compressed_main(); }`;return[d,u,p,g].join(` -`)}function EEe(e){let t=Ye.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() { +`)}function REe(e){let t=Ye.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() { czm_non_depth_clamp_main(); gl_Position = czm_depthClamp(gl_Position);} -`,t}function XEe(e){let t=Ye.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() { +`,t}function GEe(e){let t=Ye.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() { czm_non_depth_clamp_main(); #if defined(LOG_DEPTH) czm_writeLogDepth(); @@ -4970,7 +4972,7 @@ ${m} czm_non_compressed_main(); czm_writeDepthClamp(); #endif } -`,t}function _te(e,t){let n=e.vertexAttributes}function IEe(e,t){return function(){return e[t]}}var eO=Math.max(Yt.hardwareConcurrency-1,1),TN,WEe=new pi("combineGeometry");function PEe(e,t){let n,i,o,r,s=e._instanceIds;if(e._state===pr.READY){n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];let a=e._numberOfInstances=n.length,c=[],d=[];for(o=0;o0){let x=new Float64Array(m);for(f=[x.buffer],r=0;r0?(e._recomputeBoundingSpheres=!0,e._state=pr.COMBINED):xE(e,t,pr.FAILED,void 0)}).catch(function(m){xE(e,t,pr.FAILED,m)})}}function vEe(e,t){let n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],i=e._numberOfInstances=n.length,o=new Array(i),r=e._instanceIds,s,a,c=0;for(a=0;a0?(e._recomputeBoundingSpheres=!0,e._state=pr.COMBINED):xE(e,t,pr.FAILED,void 0)}function wEe(e,t){let n=e._batchTableAttributeIndices.offset;if(!e._recomputeBoundingSpheres||!l(n)){e._recomputeBoundingSpheres=!1;return}let i,o=e._offsetInstanceExtend,r=e._instanceBoundingSpheres,s=r.length,a=e._tempBoundingSpheres;if(!l(a)){for(a=new Array(s),i=0;i0||le.intersectPlane(x,dn.ORIGIN_ZX_PLANE)!==Kt.INTERSECTING?c.push(x):(d.push(x),u.push(x))}let m=c[0],p=u[0],g=d[0];for(i=1;i0){if(Mt.maximumVertexTextureImageUnits===0)throw new ue("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this._state!==pr.COMPLETE&&this._state!==pr.COMBINED&&(this.asynchronous?PEe(this,e):vEe(this,e)),this._state===pr.COMBINED&&(FEe(this,e),Ste(this,e),MEe(this,e)),!this.show||this._state!==pr.COMPLETE)return;this._batchTableOffsetsUpdated||Ste(this,e),this._recomputeBoundingSpheres&&wEe(this,e);let n=this.appearance,i=n.material,o=!1,r=!1;this._appearance!==n?(this._appearance=n,this._material=i,o=!0,r=!0):this._material!==i&&(this._material=i,r=!0);let s=this.depthFailAppearance,a=l(s)?s.material:void 0;this._depthFailAppearance!==s?(this._depthFailAppearance=s,this._depthFailMaterial=a,o=!0,r=!0):this._depthFailMaterial!==a&&(this._depthFailMaterial=a,r=!0);let c=this._appearance.isTranslucent();this._translucent!==c&&(this._translucent=c,o=!0),l(this._material)&&this._material.update(t);let d=n.closed&&c;o&&y(this._createRenderStatesFunction,NEe)(this,t,n,d),r&&y(this._createShaderProgramFunction,kEe)(this,e,n),(o||r)&&y(this._createCommandsFunction,UEe)(this,n,i,c,d,this._colorCommands,this._pickCommands,e),y(this._updateAndQueueCommandsFunction,DEe)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,d)};var BEe=new le,YEe=new le;function Xte(e,t,n){if(n===cn.TOP){let i=le.clone(e,BEe),o=le.clone(e,YEe);o.center=h.add(o.center,t,o.center),e=le.union(i,o,e)}else n===cn.ALL&&(e.center=h.add(e.center,t,e.center));return e}function OEe(e,t,n){return function(){let i=e.getBatchedAttribute(t,n),o=e.attributes[n],r=o.componentsPerAttribute,s=Q.createTypedArray(o.componentDatatype,r);return l(i.constructor.pack)?i.constructor.pack(i,s,0):s[0]=i,s}}function HEe(e,t,n,i,o){return function(r){let s=Rte(r);e.setBatchedAttribute(t,n,s),o==="offset"&&(i._recomputeBoundingSpheres=!0,i._batchTableOffsetsUpdated=!1)}}var zEe=new h;function KEe(e,t,n){t.boundingSphere={get:function(){let i=e._instanceBoundingSpheres[n];if(l(i)){i=i.clone();let o=e.modelMatrix,r=t.offset;l(r)&&Xte(i,h.fromArray(r.get(),0,zEe),e._offsetInstanceExtend[n]),l(o)&&(i=le.transform(i,o))}return i}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[n]}}}function JEe(e,t,n){t.pickId={get:function(){return e._pickIds[n]}}}br.prototype.getGeometryInstanceAttributes=function(e){let t=this._perInstanceAttributeCache.get(e);if(l(t))return t;let n=-1,i=this._lastPerInstanceAttributeIndex,o=this._instanceIds,r=o.length;for(let d=0;d0){let x=new Float64Array(m);for(f=[x.buffer],r=0;r0?(e._recomputeBoundingSpheres=!0,e._state=br.COMBINED):xE(e,t,br.FAILED,void 0)}).catch(function(m){xE(e,t,br.FAILED,m)})}}function XEe(e,t){let n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],i=e._numberOfInstances=n.length,o=new Array(i),r=e._instanceIds,s,a,c=0;for(a=0;a0?(e._recomputeBoundingSpheres=!0,e._state=br.COMBINED):xE(e,t,br.FAILED,void 0)}function PEe(e,t){let n=e._batchTableAttributeIndices.offset;if(!e._recomputeBoundingSpheres||!l(n)){e._recomputeBoundingSpheres=!1;return}let i,o=e._offsetInstanceExtend,r=e._instanceBoundingSpheres,s=r.length,a=e._tempBoundingSpheres;if(!l(a)){for(a=new Array(s),i=0;i0||le.intersectPlane(x,dn.ORIGIN_ZX_PLANE)!==Ht.INTERSECTING?c.push(x):(d.push(x),u.push(x))}let m=c[0],p=u[0],g=d[0];for(i=1;i0){if(Mt.maximumVertexTextureImageUnits===0)throw new ue("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this._state!==br.COMPLETE&&this._state!==br.COMBINED&&(this.asynchronous?IEe(this,e):XEe(this,e)),this._state===br.COMBINED&&(vEe(this,e),Vte(this,e),FEe(this,e)),!this.show||this._state!==br.COMPLETE)return;this._batchTableOffsetsUpdated||Vte(this,e),this._recomputeBoundingSpheres&&PEe(this,e);let n=this.appearance,i=n.material,o=!1,r=!1;this._appearance!==n?(this._appearance=n,this._material=i,o=!0,r=!0):this._material!==i&&(this._material=i,r=!0);let s=this.depthFailAppearance,a=l(s)?s.material:void 0;this._depthFailAppearance!==s?(this._depthFailAppearance=s,this._depthFailMaterial=a,o=!0,r=!0):this._depthFailMaterial!==a&&(this._depthFailMaterial=a,r=!0);let c=this._appearance.isTranslucent();this._translucent!==c&&(this._translucent=c,o=!0),l(this._material)&&this._material.update(t);let d=n.closed&&c;o&&y(this._createRenderStatesFunction,AEe)(this,t,n,d),r&&y(this._createShaderProgramFunction,MEe)(this,e,n),(o||r)&&y(this._createCommandsFunction,NEe)(this,n,i,c,d,this._colorCommands,this._pickCommands,e),y(this._updateAndQueueCommandsFunction,UEe)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,d)};var kEe=new le,DEe=new le;function Xte(e,t,n){if(n===cn.TOP){let i=le.clone(e,kEe),o=le.clone(e,DEe);o.center=h.add(o.center,t,o.center),e=le.union(i,o,e)}else n===cn.ALL&&(e.center=h.add(e.center,t,e.center));return e}function BEe(e,t,n){return function(){let i=e.getBatchedAttribute(t,n),o=e.attributes[n],r=o.componentsPerAttribute,s=Q.createTypedArray(o.componentDatatype,r);return l(i.constructor.pack)?i.constructor.pack(i,s,0):s[0]=i,s}}function YEe(e,t,n,i,o){return function(r){let s=Gte(r);e.setBatchedAttribute(t,n,s),o==="offset"&&(i._recomputeBoundingSpheres=!0,i._batchTableOffsetsUpdated=!1)}}var OEe=new h;function zEe(e,t,n){t.boundingSphere={get:function(){let i=e._instanceBoundingSpheres[n];if(l(i)){i=i.clone();let o=e.modelMatrix,r=t.offset;l(r)&&Xte(i,h.fromArray(r.get(),0,OEe),e._offsetInstanceExtend[n]),l(o)&&(i=le.transform(i,o))}return i}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[n]}}}function KEe(e,t,n){t.pickId={get:function(){return e._pickIds[n]}}}gr.prototype.getGeometryInstanceAttributes=function(e){let t=this._perInstanceAttributeCache.get(e);if(l(t))return t;let n=-1,i=this._lastPerInstanceAttributeIndex,o=this._instanceIds,r=o.length;for(let d=0;dd&&(u=W.PI-s,s=-W.PI,d+=u),r-=W.EPSILON5,s-=W.EPSILON5,c+=W.EPSILON5,d+=W.EPSILON5;let m=1/(d-s),p=1/(c-r),g={sphericalExtents:new $a({componentDatatype:Q.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r,s,p,m]}),longitudeRotation:new $a({componentDatatype:Q.FLOAT,componentsPerAttribute:1,normalize:!1,value:[u]})};return Nte(g,t),Dte(e,i,g),g};lu.hasAttributesForTextureCoordinatePlanes=function(e){return l(e.southWest_HIGH)&&l(e.southWest_LOW)&&l(e.northward)&&l(e.eastward)&&l(e.planes2D_HIGH)&&l(e.planes2D_LOW)&&l(e.uMaxVmax)&&l(e.uvMinAndExtents)};lu.hasAttributesForSphericalExtents=function(e){return l(e.sphericalExtents)&&l(e.longitudeRotation)&&l(e.planes2D_HIGH)&&l(e.planes2D_LOW)&&l(e.uMaxVmax)&&l(e.uvMinAndExtents)};function lXe(e){return Math.max(e.width,e.height)>lu.MAX_WIDTH_FOR_PLANAR_EXTENTS}lu.shouldUseSphericalCoordinates=function(e){return lXe(e)};lu.MAX_WIDTH_FOR_PLANAR_EXTENTS=W.toRadians(1);var cd=lu;var _Ot=T(S(),1);var hOt=T(S(),1);var dXe={NEVER:ne.NEVER,LESS:ne.LESS,EQUAL:ne.EQUAL,LESS_OR_EQUAL:ne.LEQUAL,GREATER:ne.GREATER,NOT_EQUAL:ne.NOTEQUAL,GREATER_OR_EQUAL:ne.GEQUAL,ALWAYS:ne.ALWAYS},Un=Object.freeze(dXe);var bOt=T(S(),1);var uXe={ZERO:ne.ZERO,KEEP:ne.KEEP,REPLACE:ne.REPLACE,INCREMENT:ne.INCR,DECREMENT:ne.DECR,INVERT:ne.INVERT,INCREMENT_WRAP:ne.INCR_WRAP,DECREMENT_WRAP:ne.DECR_WRAP},pt=Object.freeze(uXe);var CN={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15};CN.setCesium3DTileBit=function(){return{enabled:!0,frontFunction:Un.ALWAYS,frontOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.REPLACE},backFunction:Un.ALWAYS,backOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.REPLACE},reference:CN.CESIUM_3D_TILE_MASK,mask:CN.CESIUM_3D_TILE_MASK}};var Nt=Object.freeze(CN);function fx(e){e=y(e,y.EMPTY_OBJECT);let t=e.geometryInstances;this.geometryInstances=t,this.show=y(e.show,!0),this.classificationType=y(e.classificationType,kn.BOTH),this.debugShowBoundingVolume=y(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=y(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=y(e._extruded,!1),this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:y(e.vertexCacheOptimize,!1),interleave:y(e.interleave,!1),releaseGeometryInstances:y(e.releaseGeometryInstances,!0),allowPicking:y(e.allowPicking,!0),asynchronous:y(e.asynchronous,!0),compressVertices:y(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}Object.defineProperties(fx.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}});fx.isSupported=function(e){return e.context.stencilBuffer};function KS(e,t){let n=t?Un.EQUAL:Un.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:n,frontOperation:{fail:pt.KEEP,zFail:pt.DECREMENT_WRAP,zPass:pt.KEEP},backFunction:n,backOperation:{fail:pt.KEEP,zFail:pt.INCREMENT_WRAP,zPass:pt.KEEP},reference:Nt.CESIUM_3D_TILE_MASK,mask:Nt.CESIUM_3D_TILE_MASK},stencilMask:Nt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:qa.LESS_OR_EQUAL},depthMask:!1}}function oO(e){return{stencilTest:{enabled:e,frontFunction:Un.NOT_EQUAL,frontOperation:{fail:pt.ZERO,zFail:pt.ZERO,zPass:pt.ZERO},backFunction:Un.NOT_EQUAL,backOperation:{fail:pt.ZERO,zFail:pt.ZERO,zPass:pt.ZERO},reference:0,mask:Nt.CLASSIFICATION_MASK},stencilMask:Nt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:un.PRE_MULTIPLIED_ALPHA_BLEND}}var mXe={stencilTest:{enabled:!0,frontFunction:Un.NOT_EQUAL,frontOperation:{fail:pt.ZERO,zFail:pt.ZERO,zPass:pt.ZERO},backFunction:Un.NOT_EQUAL,backOperation:{fail:pt.ZERO,zFail:pt.ZERO,zPass:pt.ZERO},reference:0,mask:Nt.CLASSIFICATION_MASK},stencilMask:Nt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function hXe(e,t,n,i){if(l(e._rsStencilDepthPass))return;let o=!e.debugShowShadowVolume;e._rsStencilDepthPass=De.fromCache(KS(o,!1)),e._rsStencilDepthPass3DTiles=De.fromCache(KS(o,!0)),e._rsColorPass=De.fromCache(oO(o,!1)),e._rsPickPass=De.fromCache(mXe)}function fXe(e,t){if(!e.compressVertices)return t;if(t.search(/in\s+vec3\s+extrudeDirection;/g)!==-1){let n="compressedAttributes",i=`in vec2 ${n};`,o=`vec3 extrudeDirection; +`;function cu(e,t,n){this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};let i=new iO;i.requiresTextureCoordinates=e,i.requiresEC=!n.flat;let o=new iO;if(o.requiresTextureCoordinates=e,n instanceof ln)i.requiresNormalEC=!n.flat;else{let r=`${n.material.shaderSource} +${n.fragmentShaderSource}`;i.normalEC=r.indexOf("materialInput.normalEC")!==-1||r.indexOf("czm_getDefaultMaterial")!==-1,i.positionToEyeEC=r.indexOf("materialInput.positionToEyeEC")!==-1,i.tangentToEyeMatrix=r.indexOf("materialInput.tangentToEyeMatrix")!==-1,i.st=r.indexOf("materialInput.st")!==-1}this._colorShaderDependencies=i,this._pickShaderDependencies=o,this._appearance=n,this._extentsCulling=e,this._planarExtents=t}cu.prototype.createFragmentShader=function(e){let t=this._appearance,n=this._colorShaderDependencies,i=[];!e&&!this._planarExtents&&i.push("SPHERICAL"),n.requiresEC&&i.push("REQUIRES_EC"),n.requiresWC&&i.push("REQUIRES_WC"),n.requiresTextureCoordinates&&i.push("TEXTURE_COORDINATES"),this._extentsCulling&&i.push("CULL_FRAGMENTS"),n.requiresNormalEC&&i.push("NORMAL_EC"),t instanceof ln&&i.push("PER_INSTANCE_COLOR"),n.normalEC&&i.push("USES_NORMAL_EC"),n.positionToEyeEC&&i.push("USES_POSITION_TO_EYE_EC"),n.tangentToEyeMatrix&&i.push("USES_TANGENT_TO_EYE"),n.st&&i.push("USES_ST"),t.flat&&i.push("FLAT");let o="";return t instanceof ln||(o=t.material.shaderSource),new Ye({defines:i,sources:[o,zT]})};cu.prototype.createPickFragmentShader=function(e){let t=this._pickShaderDependencies,n=["PICK"];return!e&&!this._planarExtents&&n.push("SPHERICAL"),t.requiresEC&&n.push("REQUIRES_EC"),t.requiresWC&&n.push("REQUIRES_WC"),t.requiresTextureCoordinates&&n.push("TEXTURE_COORDINATES"),this._extentsCulling&&n.push("CULL_FRAGMENTS"),new Ye({defines:n,sources:[zT],pickColorQualifier:"in"})};cu.prototype.createVertexShader=function(e,t,n,i){return Ute(this._colorShaderDependencies,this._planarExtents,n,e,t,this._appearance,i,this._projectionExtentDefines)};cu.prototype.createPickVertexShader=function(e,t,n,i){return Ute(this._pickShaderDependencies,this._planarExtents,n,e,t,void 0,i,this._projectionExtentDefines)};var Pte=new h,vte=new he,wte={high:0,low:0};function Ute(e,t,n,i,o,r,s,a){let c=i.slice();if(a.eastMostYhighDefine===""){let d=vte;d.longitude=X.PI,d.latitude=0,d.height=0;let u=s.project(d,Pte),m=Yn.encode(u.x,wte);a.eastMostYhighDefine=`EAST_MOST_X_HIGH ${m.high.toFixed(`${m.high}`.length+1)}`,a.eastMostYlowDefine=`EAST_MOST_X_LOW ${m.low.toFixed(`${m.low}`.length+1)}`;let p=vte;p.longitude=-X.PI,p.latitude=0,p.height=0;let g=s.project(p,Pte);m=Yn.encode(g.x,wte),a.westMostYhighDefine=`WEST_MOST_X_HIGH ${m.high.toFixed(`${m.high}`.length+1)}`,a.westMostYlowDefine=`WEST_MOST_X_LOW ${m.low.toFixed(`${m.low}`.length+1)}`}return n&&(c.push(a.eastMostYhighDefine),c.push(a.eastMostYlowDefine),c.push(a.westMostYhighDefine),c.push(a.westMostYlowDefine)),l(r)&&r instanceof ln&&c.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(c.push("TEXTURE_COORDINATES"),t||n||c.push("SPHERICAL"),n&&c.push("COLUMBUS_VIEW_2D")),new Ye({defines:c,sources:[o]})}function iO(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}Object.defineProperties(iO.prototype,{requiresEC:{get:function(){return this._requiresEC},set:function(e){this._requiresEC=e||this._requiresEC}},requiresWC:{get:function(){return this._requiresWC},set:function(e){this._requiresWC=e||this._requiresWC,this.requiresEC=this._requiresWC}},requiresNormalEC:{get:function(){return this._requiresNormalEC},set:function(e){this._requiresNormalEC=e||this._requiresNormalEC,this.requiresEC=this._requiresNormalEC}},requiresTextureCoordinates:{get:function(){return this._requiresTextureCoordinates},set:function(e){this._requiresTextureCoordinates=e||this._requiresTextureCoordinates,this.requiresWC=this._requiresTextureCoordinates}},normalEC:{set:function(e){this.requiresNormalEC=e,this._usesNormalEC=e},get:function(){return this._usesNormalEC}},tangentToEyeMatrix:{set:function(e){this.requiresWC=e,this.requiresNormalEC=e,this._usesTangentToEyeMat=e},get:function(){return this._usesTangentToEyeMat}},positionToEyeEC:{set:function(e){this.requiresEC=e,this._usesPositionToEyeEC=e},get:function(){return this._usesPositionToEyeEC}},st:{set:function(e){this.requiresTextureCoordinates=e,this._usesSt=e},get:function(){return this._usesSt}}});function Fte(e,t,n){return Math.abs((t.y-e.y)*n.x-(t.x-e.x)*n.y+t.x*e.y-t.y*e.x)/D.distance(t,e)}var JEe=[new D,new D,new D,new D];function kte(e,t){let n=JEe,i=D.unpack(t,0,n[0]),o=D.unpack(t,2,n[1]),r=D.unpack(t,4,n[2]);e.uMaxVmax=new ec({componentDatatype:Q.FLOAT,componentsPerAttribute:4,normalize:!1,value:[o.x,o.y,r.x,r.y]});let s=1/Fte(i,o,r),a=1/Fte(i,r,o);e.uvMinAndExtents=new ec({componentDatatype:Q.FLOAT,componentsPerAttribute:4,normalize:!1,value:[i.x,i.y,s,a]})}var Dte=new he,Bte=new h,QEe=new h,jEe=new h,CN={high:0,low:0};function Yte(e,t,n){let i=Dte;i.height=0,i.longitude=e.west,i.latitude=e.south;let o=t.project(i,Bte);i.latitude=e.north;let r=t.project(i,QEe);i.longitude=e.east,i.latitude=e.south;let s=t.project(i,jEe),a=[0,0,0,0],c=[0,0,0,0],d=Yn.encode(o.x,CN);a[0]=d.high,c[0]=d.low,d=Yn.encode(o.y,CN),a[1]=d.high,c[1]=d.low,d=Yn.encode(r.y,CN),a[2]=d.high,c[2]=d.low,d=Yn.encode(s.x,CN),a[3]=d.high,c[3]=d.low,n.planes2D_HIGH=new ec({componentDatatype:Q.FLOAT,componentsPerAttribute:4,normalize:!1,value:a}),n.planes2D_LOW=new ec({componentDatatype:Q.FLOAT,componentsPerAttribute:4,normalize:!1,value:c})}var qEe=new A,$Ee=new A,Ate=new h,eWe=new he,tWe=[new he,new he,new he,new he,new he,new he,new he,new he];function nWe(e,t,n,i,o,r){let s=ce.center(e,eWe);s.height=n;let a=he.toCartesian(s,t,Ate),c=Gt.eastNorthUpToFixedFrame(a,t,qEe),d=A.inverse(c,$Ee),u=e.west,m=e.east,p=e.north,g=e.south,f=tWe;f[0].latitude=g,f[0].longitude=u,f[1].latitude=p,f[1].longitude=u,f[2].latitude=p,f[2].longitude=m,f[3].latitude=g,f[3].longitude=m;let x=(u+m)*.5,_=(p+g)*.5;f[4].latitude=g,f[4].longitude=x,f[5].latitude=p,f[5].longitude=x,f[6].latitude=_,f[6].longitude=u,f[7].latitude=_,f[7].longitude=m;let C=Number.POSITIVE_INFINITY,V=Number.NEGATIVE_INFINITY,Z=Number.POSITIVE_INFINITY,R=Number.NEGATIVE_INFINITY;for(let P=0;P<8;P++){f[P].height=n;let F=he.toCartesian(f[P],t,Ate);A.multiplyByPoint(d,F,F),F.z=0,C=Math.min(C,F.x),V=Math.max(V,F.x),Z=Math.min(Z,F.y),R=Math.max(R,F.y)}let G=i;G.x=C,G.y=Z,G.z=0,A.multiplyByPoint(c,G,G);let W=o;W.x=V,W.y=Z,W.z=0,A.multiplyByPoint(c,W,W),h.subtract(W,G,o);let v=r;v.x=C,v.y=R,v.z=0,A.multiplyByPoint(c,v,v),h.subtract(v,G,r)}var iWe=new h,oWe=new h,rWe=new Yn;cu.getPlanarTextureCoordinateAttributes=function(e,t,n,i,o){let r=Bte,s=iWe,a=oWe;nWe(e,n,y(o,0),r,s,a);let c={};kte(c,t);let d=Yn.fromCartesian(r,rWe);return c.southWest_HIGH=new ec({componentDatatype:Q.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(d.high,[0,0,0])}),c.southWest_LOW=new ec({componentDatatype:Q.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(d.low,[0,0,0])}),c.eastward=new ec({componentDatatype:Q.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(s,[0,0,0])}),c.northward=new ec({componentDatatype:Q.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(a,[0,0,0])}),Yte(e,i,c),c};var sWe=new h;function Mte(e,t,n,i){let o=Dte;o.latitude=e,o.longitude=t,o.height=0;let r=he.toCartesian(o,n,sWe),s=Math.sqrt(r.x*r.x+r.y*r.y),a=X.fastApproximateAtan2(s,r.z),c=X.fastApproximateAtan2(r.x,r.y);return i.x=a,i.y=c,i}var Nte=new D;cu.getSphericalExtentGeometryInstanceAttributes=function(e,t,n,i){let o=Mte(e.south,e.west,n,Nte),r=o.x,s=o.y,a=Mte(e.north,e.east,n,Nte),c=a.x,d=a.y,u=0;s>d&&(u=X.PI-s,s=-X.PI,d+=u),r-=X.EPSILON5,s-=X.EPSILON5,c+=X.EPSILON5,d+=X.EPSILON5;let m=1/(d-s),p=1/(c-r),g={sphericalExtents:new ec({componentDatatype:Q.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r,s,p,m]}),longitudeRotation:new ec({componentDatatype:Q.FLOAT,componentsPerAttribute:1,normalize:!1,value:[u]})};return kte(g,t),Yte(e,i,g),g};cu.hasAttributesForTextureCoordinatePlanes=function(e){return l(e.southWest_HIGH)&&l(e.southWest_LOW)&&l(e.northward)&&l(e.eastward)&&l(e.planes2D_HIGH)&&l(e.planes2D_LOW)&&l(e.uMaxVmax)&&l(e.uvMinAndExtents)};cu.hasAttributesForSphericalExtents=function(e){return l(e.sphericalExtents)&&l(e.longitudeRotation)&&l(e.planes2D_HIGH)&&l(e.planes2D_LOW)&&l(e.uMaxVmax)&&l(e.uvMinAndExtents)};function aWe(e){return Math.max(e.width,e.height)>cu.MAX_WIDTH_FOR_PLANAR_EXTENTS}cu.shouldUseSphericalCoordinates=function(e){return aWe(e)};cu.MAX_WIDTH_FOR_PLANAR_EXTENTS=X.toRadians(1);var ad=cu;var pOt=S(T(),1);var cOt=S(T(),1);var cWe={NEVER:ie.NEVER,LESS:ie.LESS,EQUAL:ie.EQUAL,LESS_OR_EQUAL:ie.LEQUAL,GREATER:ie.GREATER,NOT_EQUAL:ie.NOTEQUAL,GREATER_OR_EQUAL:ie.GEQUAL,ALWAYS:ie.ALWAYS},kn=Object.freeze(cWe);var uOt=S(T(),1);var lWe={ZERO:ie.ZERO,KEEP:ie.KEEP,REPLACE:ie.REPLACE,INCREMENT:ie.INCR,DECREMENT:ie.DECR,INVERT:ie.INVERT,INCREMENT_WRAP:ie.INCR_WRAP,DECREMENT_WRAP:ie.DECR_WRAP},pt=Object.freeze(lWe);var VN={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15};VN.setCesium3DTileBit=function(){return{enabled:!0,frontFunction:kn.ALWAYS,frontOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.REPLACE},backFunction:kn.ALWAYS,backOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.REPLACE},reference:VN.CESIUM_3D_TILE_MASK,mask:VN.CESIUM_3D_TILE_MASK}};var Nt=Object.freeze(VN);function hx(e){e=y(e,y.EMPTY_OBJECT);let t=e.geometryInstances;this.geometryInstances=t,this.show=y(e.show,!0),this.classificationType=y(e.classificationType,Un.BOTH),this.debugShowBoundingVolume=y(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=y(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=y(e._extruded,!1),this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:y(e.vertexCacheOptimize,!1),interleave:y(e.interleave,!1),releaseGeometryInstances:y(e.releaseGeometryInstances,!0),allowPicking:y(e.allowPicking,!0),asynchronous:y(e.asynchronous,!0),compressVertices:y(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}Object.defineProperties(hx.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}});hx.isSupported=function(e){return e.context.stencilBuffer};function KT(e,t){let n=t?kn.EQUAL:kn.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:n,frontOperation:{fail:pt.KEEP,zFail:pt.DECREMENT_WRAP,zPass:pt.KEEP},backFunction:n,backOperation:{fail:pt.KEEP,zFail:pt.INCREMENT_WRAP,zPass:pt.KEEP},reference:Nt.CESIUM_3D_TILE_MASK,mask:Nt.CESIUM_3D_TILE_MASK},stencilMask:Nt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL},depthMask:!1}}function rO(e){return{stencilTest:{enabled:e,frontFunction:kn.NOT_EQUAL,frontOperation:{fail:pt.ZERO,zFail:pt.ZERO,zPass:pt.ZERO},backFunction:kn.NOT_EQUAL,backOperation:{fail:pt.ZERO,zFail:pt.ZERO,zPass:pt.ZERO},reference:0,mask:Nt.CLASSIFICATION_MASK},stencilMask:Nt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:un.PRE_MULTIPLIED_ALPHA_BLEND}}var dWe={stencilTest:{enabled:!0,frontFunction:kn.NOT_EQUAL,frontOperation:{fail:pt.ZERO,zFail:pt.ZERO,zPass:pt.ZERO},backFunction:kn.NOT_EQUAL,backOperation:{fail:pt.ZERO,zFail:pt.ZERO,zPass:pt.ZERO},reference:0,mask:Nt.CLASSIFICATION_MASK},stencilMask:Nt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function uWe(e,t,n,i){if(l(e._rsStencilDepthPass))return;let o=!e.debugShowShadowVolume;e._rsStencilDepthPass=De.fromCache(KT(o,!1)),e._rsStencilDepthPass3DTiles=De.fromCache(KT(o,!0)),e._rsColorPass=De.fromCache(rO(o,!1)),e._rsPickPass=De.fromCache(dWe)}function mWe(e,t){if(!e.compressVertices)return t;if(t.search(/in\s+vec3\s+extrudeDirection;/g)!==-1){let n="compressedAttributes",i=`in vec2 ${n};`,o=`vec3 extrudeDirection; `,r=` extrudeDirection = czm_octDecode(${n}, 65535.0); `,s=t;s=s.replace(/in\s+vec3\s+extrudeDirection;/g,""),s=Ye.replaceMain(s,"czm_non_compressed_main");let a=`void main() { ${r} czm_non_compressed_main(); }`;return[i,o,s,a].join(` -`)}}function pXe(e,t){let n=t.context,i=e._primitive,o=dE;o=e._primitive._batchTable.getVertexShaderCallback()(o),o=En._appendDistanceDisplayConditionToShader(i,o),o=En._modifyShaderPosition(e,o,t.scene3DOnly),o=En._updateColorAttribute(i,o);let r=e._hasPlanarExtentsAttributes,s=r||e._hasSphericalExtentsAttribute;e._extruded&&(o=fXe(i,o));let a=e._extruded?"EXTRUDED_GEOMETRY":"",c=new Ye({defines:[a],sources:[o]}),d=new Ye({sources:[Xb]}),u=e._primitive._attributeLocations,m=new cd(s,r,e.appearance);if(e._spStencil=qt.replaceCache({context:n,shaderProgram:e._spStencil,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:u}),e._primitive.allowPicking){let f=Ye.createPickVertexShaderSource(o);f=En._appendShowToShader(i,f),f=En._updatePickColorAttribute(f);let x=m.createPickFragmentShader(!1),_=m.createPickVertexShader([a],f,!1,t.mapProjection);if(e._spPick=qt.replaceCache({context:n,shaderProgram:e._spPick,vertexShaderSource:_,fragmentShaderSource:x,attributeLocations:u}),s){let C=n.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!l(C)){let V=m.createPickFragmentShader(!0),L=m.createPickVertexShader([a],f,!0,t.mapProjection);C=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:L,fragmentShaderSource:V,attributeLocations:u})}e._spPick2D=C}}else e._spPick=qt.fromCache({context:n,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:u});o=En._appendShowToShader(i,o),c=new Ye({defines:[a],sources:[o]}),e._sp=qt.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:u});let p=m.createFragmentShader(!1),g=m.createVertexShader([a],o,!1,t.mapProjection);if(e._spColor=qt.replaceCache({context:n,shaderProgram:e._spColor,vertexShaderSource:g,fragmentShaderSource:p,attributeLocations:u}),s){let f=n.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!l(f)){let x=m.createFragmentShader(!0),_=m.createVertexShader([a],o,!0,t.mapProjection);f=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:_,fragmentShaderSource:x,attributeLocations:u})}e._spColor2D=f}}function bXe(e,t){let n=e._primitive,i=n._va.length*2;t.length=i;let o,r,s,a=0,c=n._batchTable.getUniformMapCallback()(e._uniformMap),d=e._needs2DShader;for(o=0;o0&&(c=o[0].attributes,p=cd.hasAttributesForSphericalExtents(c),g=cd.hasAttributesForTextureCoordinatePlanes(c),m=c.color),s=0;s{l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};fx.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};fx.prototype.isDestroyed=function(){return!1};fx.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,me(this)};var JS=fx;var _Xe={u_globeMinimumAltitude:function(){return 55e3}};function _l(e){e=y(e,y.EMPTY_OBJECT);let t=e.appearance,n=e.geometryInstances;if(!l(t)&&l(n)){let o=Array.isArray(n)?n:[n],r=o.length;for(let s=0;s{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};_l.prototype.getBoundingSphere=function(e){let t=this._boundingSpheresKeys.indexOf(e);if(t!==-1)return this._boundingSpheres[t]};_l.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};_l.prototype.isDestroyed=function(){return!1};_l.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};_l._supportsMaterials=function(e){return e.depthTexture};_l.supportsMaterials=function(e){return _l._supportsMaterials(e.frameState.context)};var Fc=_l;var bHt=T(S(),1);function QS(){fe.throwInstantiationError()}Object.defineProperties(QS.prototype,{isConstant:{get:fe.throwInstantiationError},definitionChanged:{get:fe.throwInstantiationError}});QS.prototype.getType=fe.throwInstantiationError;QS.prototype.getValue=fe.throwInstantiationError;QS.prototype.equals=fe.throwInstantiationError;QS.getValue=function(e,t,n){let i;return l(t)&&(i=t.getType(e),l(i))?((!l(n)||n.type!==i)&&(n=Ai.fromType(i)),t.getValue(e,n.uniforms),n):((!l(n)||n.type!==Ai.ColorType)&&(n=Ai.fromType(Ai.ColorType)),Y.clone(Y.WHITE,n.uniforms.color),n)};var zo=QS;function px(e,t,n){this._primitives=t,this._orderedGroundPrimitives=n,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}px.prototype._isHidden=function(e,t,n){return!e.isShowing||!e.isAvailable(n)||!K.getValueOrDefault(t.show,n,!0)};px.prototype._setOptions=fe.throwInstantiationError;px.prototype.update=function(e){let t=this._geometryUpdater,n=t._onTerrain,i=this._primitives,o=this._orderedGroundPrimitives;n?o.remove(this._primitive):(i.removeAndDestroy(this._primitive),i.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;let r=this._entity,s=r[this._geometryUpdater._geometryPropertyName];if(this._setOptions(r,s,e),this._isHidden(r,s,e))return;let a=this._geometryUpdater.shadowsProperty.getValue(e),c=this._options;if(!l(s.fill)||s.fill.getValue(e)){let d=t.fillMaterialProperty,u=d instanceof Ut,m,p=t._getIsClosed(c);if(u)m=new ln({closed:p,flat:n&&!t._supportsMaterialsforEntitiesOnTerrain});else{let g=zo.getValue(e,d,this._material);this._material=g,m=new ro({material:g,translucent:g.isTranslucent(),closed:p})}if(n)c.vertexFormat=ln.VERTEX_FORMAT,this._primitive=o.add(new Fc({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:m,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),K.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{c.vertexFormat=m.vertexFormat;let g=this._geometryUpdater.createFillGeometryInstance(e);u&&(m.translucent=g.attributes.color.value[3]!==255),this._primitive=i.add(new En({geometryInstances:g,appearance:m,asynchronous:!1,shadows:a}))}}if(!n&&l(s.outline)&&s.outline.getValue(e)){let d=this._geometryUpdater.createOutlineGeometryInstance(e),u=K.getValueOrDefault(s.outlineWidth,e,1);this._outlinePrimitive=i.add(new En({geometryInstances:d,appearance:new ln({flat:!0,translucent:d.attributes.color.value[3]!==255,renderState:{lineWidth:t._scene.clampLineWidth(u)}}),asynchronous:!1,shadows:a}))}};px.prototype.getBoundingSphere=function(e){let t=this._entity,n=this._primitive,i=this._outlinePrimitive,o;return l(n)&&n.show&&n.ready&&(o=n.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(le.clone(o.boundingSphere,e),mt.DONE):l(i)&&i.show&&i.ready&&(o=i.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(le.clone(o.boundingSphere,e),mt.DONE):l(n)&&!n.ready||l(i)&&!i.ready?mt.PENDING:mt.FAILED};px.prototype.isDestroyed=function(){return!1};px.prototype.destroy=function(){let e=this._primitives,t=this._orderedGroundPrimitives;this._geometryUpdater._onTerrain?t.remove(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),me(this)};var ti=px;var $jt=T(S(),1);var vHt=T(S(),1);var Kte={};function _E(e,t){l(Kte[e])||(Kte[e]=!0,console.warn(y(t,e)))}_E.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";_E.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";_E.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";_E.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var At=_E;var Fjt=T(S(),1);var kKt=T(S(),1);var Gzt=T(S(),1);var FHt=T(S(),1),EXe={NONE:0,GEODESIC:1,RHUMB:2},$t=Object.freeze(EXe);var UHt=T(S(),1);var Jte=W.EPSILON10;function XXe(e,t,n,i){if(!l(e))return;n=y(n,!1);let o=l(i),r=e.length;if(r<2)return e;let s,a=e[0],c,d,u=0,m=-1;for(s=1;sW.EPSILON12);let R=A*(t*t-n*n)/(n*n),E=1+R*(4096+R*(R*(320-175*R)-768))/16384,I=R*(256+R*(R*(74-47*R)-128))/1024,w=b*b,N=I*F*(b+I*(P*(2*w-1)-I*b*(4*F*F-3)*(4*w-3)/6)/4),B=n*E*(v-N),U=Math.atan2(g*X,_-V*G),O=Math.atan2(m*X,_*G-V);e._distance=B,e._startHeading=U,e._endHeading=O,e._uSquared=R}var vXe=new h,aO=new h;function jte(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,aO),vXe),r=h.normalize(i.cartographicToCartesian(n,aO),aO);PXe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=he.clone(t,e._start),e._end=he.clone(n,e._end),e._start.height=0,e._end.height=0,IXe(e)}function TE(e,t,n){let i=y(n,ie.WGS84);this._ellipsoid=i,this._start=new he,this._end=new he,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&jte(this,e,t,i)}Object.defineProperties(TE.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}});TE.prototype.setEndPoints=function(e,t){jte(this,e,t,this._ellipsoid)};TE.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};TE.prototype.interpolateUsingSurfaceDistance=function(e,t){let n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),r=Math.cos(4*i),s=Math.cos(6*i),a=Math.sin(2*i),c=Math.sin(4*i),d=Math.sin(6*i),u=Math.sin(8*i),m=i*i,p=i*m,g=n.u8Over256,f=n.u2Over4,x=n.u6Over64,_=n.u4Over16,C=2*p*g*o/3+i*(1-f+7*_/4-15*x/4+579*g/64-(_-15*x/4+187*g/16)*o-(5*x/4-115*g/16)*r-29*g*s/16)+(f/2-_+71*x/32-85*g/16)*a+(5*_/16-5*x/4+383*g/96)*c-m*((x-11*g/2)*a+5*g*c/2)+(29*x/96-29*g/16)*d+539*g*u/1536,V=Math.asin(Math.sin(C)*n.cosineAlpha),L=Math.atan(n.a/n.b*Math.tan(V));C=C-n.sigma;let Z=Math.cos(2*n.sigma+C),G=Math.sin(C),X=Math.cos(C),v=n.cosineU*X,P=n.sineU*G,A=Math.atan2(G*n.sineHeading,v-P*n.cosineHeading)-Qte(n.f,n.sineAlpha,n.cosineSquaredAlpha,C,G,X,Z);return l(t)?(t.longitude=this._start.longitude+A,t.latitude=L,t.height=0,t):new he(this._start.longitude+A,L,0)};var yp=TE;var izt=T(S(),1);function lO(e,t,n){if(e===0)return t*n;let i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,c=a*i,d=n,u=Math.sin(2*d),m=Math.sin(4*d),p=Math.sin(6*d),g=Math.sin(8*d),f=Math.sin(10*d),x=Math.sin(12*d);return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*c/1048576)*d-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*c/524288)*u+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*c/8388608)*m-(35*r/3072+175*s/12288+3675*a/262144+13475*c/1048576)*p+(315*s/131072+2205*a/524288+43659*c/8388608)*g-(693*a/1310720+6237*c/5242880)*f+1001*c/8388608*x)}function wXe(e,t,n){let i=e/n;if(t===0)return i;let o=i*i,r=o*i,s=r*i,a=t,c=a*a,d=c*c,u=d*c,m=u*c,p=m*c,g=p*c,f=Math.sin(2*i),x=Math.cos(2*i),_=Math.sin(4*i),C=Math.cos(4*i),V=Math.sin(6*i),L=Math.cos(6*i),Z=Math.sin(8*i),G=Math.cos(8*i),X=Math.sin(10*i),v=Math.cos(10*i),P=Math.sin(12*i);return i+i*c/4+7*i*d/64+15*i*u/256+579*i*m/16384+1515*i*p/65536+16837*i*g/1048576+(3*i*d/16+45*i*u/256-i*(32*o-561)*m/4096-i*(232*o-1677)*p/16384+i*(399985-90560*o+512*s)*g/5242880)*x+(21*i*u/256+483*i*m/4096-i*(224*o-1969)*p/16384-i*(33152*o-112599)*g/1048576)*C+(151*i*m/4096+4681*i*p/65536+1479*i*g/16384-453*r*g/32768)*L+(1097*i*p/65536+42783*i*g/1048576)*G+8011*i*g/1048576*v+(3*c/8+3*d/16+213*u/2048-3*o*u/64+255*m/4096-33*o*m/512+20861*p/524288-33*o*p/512+s*p/1024+28273*g/1048576-471*o*g/8192+9*s*g/4096)*f+(21*d/256+21*u/256+533*m/8192-21*o*m/512+197*p/4096-315*o*p/4096+584039*g/16777216-12517*o*g/131072+7*s*g/2048)*_+(151*u/6144+151*m/4096+5019*p/131072-453*o*p/16384+26965*g/786432-8607*o*g/131072)*V+(1097*m/131072+1097*p/65536+225797*g/10485760-1097*o*g/65536)*Z+(8011*p/2621440+8011*g/1048576)*X+293393*g/251658240*P}function jS(e,t){if(e===0)return Math.log(Math.tan(.5*(W.PI_OVER_TWO+t)));let n=e*Math.sin(t);return Math.log(Math.tan(.5*(W.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function FXe(e,t,n,i,o){let r=jS(e._ellipticity,n),s=jS(e._ellipticity,o);return Math.atan2(W.negativePiToPi(i-t),s-r)}function AXe(e,t,n,i,o,r,s){let a=e._heading,c=r-i,d=0;if(W.equalsEpsilon(Math.abs(a),W.PI_OVER_TWO,W.EPSILON8))if(t===n)d=t*Math.cos(o)*W.negativePiToPi(c);else{let u=Math.sin(o);d=t*Math.cos(o)*W.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*u*u)}else{let u=lO(e._ellipticity,t,o);d=(lO(e._ellipticity,t,s)-u)/Math.cos(a)}return Math.abs(d)}var MXe=new h,cO=new h;function qte(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,cO),MXe),r=h.normalize(i.cartographicToCartesian(n,cO),cO),s=i.maximumRadius,a=i.minimumRadius,c=s*s,d=a*a;e._ellipticitySquared=(c-d)/c,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=he.clone(t,e._start),e._start.height=0,e._end=he.clone(n,e._end),e._end.height=0,e._heading=FXe(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=AXe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function $te(e,t,n,i,o,r){if(n===0)return he.clone(e,r);let s=o*o,a,c,d;if(Math.abs(W.PI_OVER_TWO-Math.abs(t))>W.EPSILON8){let u=lO(o,i,e.latitude),m=n*Math.cos(t),p=u+m;if(c=wXe(p,o,i),Math.abs(t)0?a=W.negativePiToPi(e.longitude+d):a=W.negativePiToPi(e.longitude-d)}return l(r)?(r.longitude=a,r.latitude=c,r.height=0,r):new he(a,c,0)}function xp(e,t,n){let i=y(n,ie.WGS84);this._ellipsoid=i,this._start=new he,this._end=new he,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&qte(this,e,t,i)}Object.defineProperties(xp.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}});xp.fromStartHeadingDistance=function(e,t,n,i,o){let r=y(i,ie.WGS84),s=r.maximumRadius,a=r.minimumRadius,c=s*s,d=a*a,u=Math.sqrt((c-d)/c);t=W.negativePiToPi(t);let m=$te(e,t,n,r.maximumRadius,u);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new xp(e,m,r):(o.setEndPoints(e,m),o)};xp.prototype.setEndPoints=function(e,t){qte(this,e,t,this._ellipsoid)};xp.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};xp.prototype.interpolateUsingSurfaceDistance=function(e,t){return $te(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};xp.prototype.findIntersectionWithLongitude=function(e,t){let n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=W.negativePiToPi(e),W.equalsEpsilon(Math.abs(e),Math.PI,W.EPSILON14)&&(e=W.sign(r.longitude)*Math.PI),l(t)||(t=new he),Math.abs(W.PI_OVER_TWO-o)<=W.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(W.equalsEpsilon(Math.abs(W.PI_OVER_TWO-o),W.PI_OVER_TWO,W.EPSILON8))return W.equalsEpsilon(e,r.longitude,W.EPSILON12)?void 0:(t.longitude=e,t.latitude=W.PI_OVER_TWO*W.sign(W.PI_OVER_TWO-i),t.height=0,t);let s=r.latitude,a=n*Math.sin(s),c=Math.tan(.5*(W.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),d=(1+a)/(1-a),u=r.latitude,m;do{m=u;let p=n*Math.sin(m),g=(1+p)/(1-p);u=2*Math.atan(c*Math.pow(g/d,n/2))-W.PI_OVER_TWO}while(!W.equalsEpsilon(u,m,W.EPSILON12));return t.longitude=e,t.latitude=u,t.height=0,t};xp.prototype.findIntersectionWithLatitude=function(e,t){let n=this._ellipticity,i=this._heading,o=this._start;if(W.equalsEpsilon(Math.abs(i),W.PI_OVER_TWO,W.EPSILON8))return;let r=jS(n,o.latitude),s=jS(n,e),a=Math.tan(i)*(s-r),c=W.negativePiToPi(o.longitude+a);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new he(c,e,0)};var Ca=xp;var gO=[Si,Vi],NXe=gO.length,xne=Math.cos(W.toRadians(30)),ene=Math.cos(W.toRadians(150)),_ne=0,Tne=1e3;function Pb(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions;this.width=y(e.width,1),this._positions=t,this.granularity=y(e.granularity,9999),this.loop=y(e.loop,!1),this.arcType=y(e.arcType,$t.GEODESIC),this._ellipsoid=ie.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(Pb.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+ie.packedLength+1+1}}});Pb.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;ixne||rW.PI_OVER_TWO&&(a=!0,s=h.subtract(r,n,cne),d=c.cartesianToCartographic(s,ane)),d.height=0;let u=e.project(d,o);return o=h.subtract(u,i,o),o.z=0,o=h.normalize(o,o),a&&h.negate(o,o),o}var rIe=new h,lne=new h;function dne(e,t,n,i,o,r){let s=h.subtract(t,e,rIe);h.normalize(s,s);let a=n-_ne,c=h.multiplyByScalar(s,a,lne);h.add(e,c,o);let d=i-Tne;c=h.multiplyByScalar(s,d,lne),h.add(t,c,r)}var sIe=new h;function ZN(e,t){let n=dn.getPointDistance(GN,e),i=dn.getPointDistance(GN,t),o=sIe;W.equalsEpsilon(n,0,W.EPSILON2)?(o=_p(t,e,o),h.multiplyByScalar(o,W.EPSILON2,o),h.add(e,o,e)):W.equalsEpsilon(i,0,W.EPSILON2)&&(o=_p(e,t,o),h.multiplyByScalar(o,W.EPSILON2,o),h.add(t,o,t))}function aIe(e,t){let n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(W.equalsEpsilon(n,W.PI,W.EPSILON11)){let o=W.sign(t.longitude);return e.longitude=o*(n-W.EPSILON11),1}else if(W.equalsEpsilon(i,W.PI,W.EPSILON11)){let o=W.sign(e.longitude);return t.longitude=o*(i-W.EPSILON11),2}return 0}var Cne=new he,Vne=new he,une=new h,hO=new h,mne=new h,hne=new h,cIe=new h,fne=new h,lIe=[Cne,Vne],dIe=new ce,uIe=new h,mIe=new h,hIe=new h,fIe=new h,pIe=new h,bIe=new h,fO=new h,pO=new h,gIe=new h,yIe=new h,xIe=new h,pne=new h,_Ie=new h,TIe=new h,SIe=new Yn,CIe=new Yn,bne=new h,VIe=new h,gne=new h,LIe=[new le,new le],Lne=[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],yne=Lne.length;function RIe(e,t,n,i,o,r,s){let a,c,d=t._ellipsoid,u=n.length/3-1,m=u*8,p=m*4,g=u*36,f=m>65535?new Uint32Array(g):new Uint16Array(g),x=new Float64Array(m*3),_=new Float32Array(p),C=new Float32Array(p),V=new Float32Array(p),L=new Float32Array(p),Z=new Float32Array(p),G,X,v,P;s&&(G=new Float32Array(p),X=new Float32Array(p),v=new Float32Array(p),P=new Float32Array(m*2));let F=r.length/2,A=0,b=Cne;b.height=0;let R=Vne;R.height=0;let E=une,I=hO;if(s)for(c=0,a=1;axne?(ht=SE(t,b,ke,Pt,fO),Ae=SE(t,R,j,Ot,pO)):Bi===1?(Ae=SE(t,R,j,Ot,pO),ht.x=0,ht.y=W.sign(b.longitude-Math.abs(R.longitude)),ht.z=0):(ht=SE(t,b,ke,Pt,fO),Ae.x=0,Ae.y=W.sign(b.longitude-R.longitude),Ae.z=0)}let $e=h.distance(Pe,z),Qe=Yn.fromCartesian(Xe,SIe),je=h.subtract(ee,Xe,gIe),kt=h.normalize(je,pne),pe=h.subtract(Pe,Xe,yIe);pe=h.normalize(pe,pe);let Ve=h.cross(kt,pe,pne);Ve=h.normalize(Ve,Ve);let Dt=h.cross(pe,ke,_Ie);Dt=h.normalize(Dt,Dt);let bt=h.subtract(z,ee,xIe);bt=h.normalize(bt,bt);let li=h.cross(j,bt,TIe);li=h.normalize(li,li);let Vo=$e/N,Rs=q/N,zs=0,Nr,$r,Ue,it=0,tt=0;if(s){zs=h.distance(Pt,Ot),Nr=Yn.fromCartesian(Pt,CIe),$r=h.subtract(Ot,Pt,bne),Ue=h.normalize($r,VIe);let Bi=Ue.x;Ue.x=Ue.y,Ue.y=-Bi,it=zs/A,tt=be/A}for(B=0;B<8;B++){let Bi=J+B*4,us=O+B*2,yr=Bi+3,ml=B<4?1:-1,Do=B===2||B===3||B===6||B===7?1:-1;h.pack(Qe.high,_,Bi),_[yr]=je.x,h.pack(Qe.low,C,Bi),C[yr]=je.y,h.pack(Dt,V,Bi),V[yr]=je.z,h.pack(li,L,Bi),L[yr]=Vo*ml,h.pack(Ve,Z,Bi);let xr=Rs*Do;xr===0&&Do<0&&(xr=9),Z[yr]=xr,s&&(G[Bi]=Nr.high.x,G[Bi+1]=Nr.high.y,G[Bi+2]=Nr.low.x,G[Bi+3]=Nr.low.y,v[Bi]=-ht.y,v[Bi+1]=ht.x,v[Bi+2]=Ae.y,v[Bi+3]=-Ae.x,X[Bi]=$r.x,X[Bi+1]=$r.y,X[Bi+2]=Ue.x,X[Bi+3]=Ue.y,P[us]=it*ml,xr=tt*Do,xr===0&&Do<0&&(xr=9),P[us+1]=xr)}let qe=hIe,dt=fIe,Bt=uIe,Ln=mIe,Lo=ce.fromCartographicArray(lIe,dIe),nr=ci.getMinimumMaximumHeights(Lo,d),Na=nr.minimumTerrainHeight,ka=nr.maximumTerrainHeight;Te+=Math.abs(Na),Te+=Math.abs(ka),dne(Xe,Pe,Na,ka,qe,Bt),dne(ee,z,Na,ka,dt,Ln);let io=h.multiplyByScalar(Ve,W.EPSILON5,gne);h.add(qe,io,qe),h.add(dt,io,dt),h.add(Bt,io,Bt),h.add(Ln,io,Ln),ZN(qe,dt),ZN(Bt,Ln),h.pack(qe,x,k),h.pack(dt,x,k+3),h.pack(Ln,x,k+6),h.pack(Bt,x,k+9),io=h.multiplyByScalar(Ve,-2*W.EPSILON5,gne),h.add(qe,io,qe),h.add(dt,io,dt),h.add(Bt,io,Bt),h.add(Ln,io,Ln),ZN(qe,dt),ZN(Bt,Ln),h.pack(qe,x,k+12),h.pack(dt,x,k+15),h.pack(Ln,x,k+18),h.pack(Bt,x,k+21),U+=2,c+=3,O+=16,k+=24,J+=32,q+=$e,be+=zs}c=0;let ae=0;for(a=0;a0&&(c=o[0].attributes,p=ad.hasAttributesForSphericalExtents(c),g=ad.hasAttributesForTextureCoordinatePlanes(c),m=c.color),s=0;s{l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};hx.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};hx.prototype.isDestroyed=function(){return!1};hx.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,me(this)};var HT=hx;var yWe={u_globeMinimumAltitude:function(){return 55e3}};function xl(e){e=y(e,y.EMPTY_OBJECT);let t=e.appearance,n=e.geometryInstances;if(!l(t)&&l(n)){let o=Array.isArray(n)?n:[n],r=o.length;for(let s=0;s{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};xl.prototype.getBoundingSphere=function(e){let t=this._boundingSpheresKeys.indexOf(e);if(t!==-1)return this._boundingSpheres[t]};xl.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};xl.prototype.isDestroyed=function(){return!1};xl.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};xl._supportsMaterials=function(e){return e.depthTexture};xl.supportsMaterials=function(e){return xl._supportsMaterials(e.frameState.context)};var wc=xl;var uzt=S(T(),1);function JT(){fe.throwInstantiationError()}Object.defineProperties(JT.prototype,{isConstant:{get:fe.throwInstantiationError},definitionChanged:{get:fe.throwInstantiationError}});JT.prototype.getType=fe.throwInstantiationError;JT.prototype.getValue=fe.throwInstantiationError;JT.prototype.equals=fe.throwInstantiationError;JT.getValue=function(e,t,n){let i;return l(t)&&(i=t.getType(e),l(i))?((!l(n)||n.type!==i)&&(n=Mi.fromType(i)),t.getValue(e,n.uniforms),n):((!l(n)||n.type!==Mi.ColorType)&&(n=Mi.fromType(Mi.ColorType)),Y.clone(Y.WHITE,n.uniforms.color),n)};var Ho=JT;function fx(e,t,n){this._primitives=t,this._orderedGroundPrimitives=n,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}fx.prototype._isHidden=function(e,t,n){return!e.isShowing||!e.isAvailable(n)||!H.getValueOrDefault(t.show,n,!0)};fx.prototype._setOptions=fe.throwInstantiationError;fx.prototype.update=function(e){let t=this._geometryUpdater,n=t._onTerrain,i=this._primitives,o=this._orderedGroundPrimitives;n?o.remove(this._primitive):(i.removeAndDestroy(this._primitive),i.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;let r=this._entity,s=r[this._geometryUpdater._geometryPropertyName];if(this._setOptions(r,s,e),this._isHidden(r,s,e))return;let a=this._geometryUpdater.shadowsProperty.getValue(e),c=this._options;if(!l(s.fill)||s.fill.getValue(e)){let d=t.fillMaterialProperty,u=d instanceof kt,m,p=t._getIsClosed(c);if(u)m=new ln({closed:p,flat:n&&!t._supportsMaterialsforEntitiesOnTerrain});else{let g=Ho.getValue(e,d,this._material);this._material=g,m=new so({material:g,translucent:g.isTranslucent(),closed:p})}if(n)c.vertexFormat=ln.VERTEX_FORMAT,this._primitive=o.add(new wc({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:m,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),H.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{c.vertexFormat=m.vertexFormat;let g=this._geometryUpdater.createFillGeometryInstance(e);u&&(m.translucent=g.attributes.color.value[3]!==255),this._primitive=i.add(new En({geometryInstances:g,appearance:m,asynchronous:!1,shadows:a}))}}if(!n&&l(s.outline)&&s.outline.getValue(e)){let d=this._geometryUpdater.createOutlineGeometryInstance(e),u=H.getValueOrDefault(s.outlineWidth,e,1);this._outlinePrimitive=i.add(new En({geometryInstances:d,appearance:new ln({flat:!0,translucent:d.attributes.color.value[3]!==255,renderState:{lineWidth:t._scene.clampLineWidth(u)}}),asynchronous:!1,shadows:a}))}};fx.prototype.getBoundingSphere=function(e){let t=this._entity,n=this._primitive,i=this._outlinePrimitive,o;return l(n)&&n.show&&n.ready&&(o=n.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(le.clone(o.boundingSphere,e),mt.DONE):l(i)&&i.show&&i.ready&&(o=i.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(le.clone(o.boundingSphere,e),mt.DONE):l(n)&&!n.ready||l(i)&&!i.ready?mt.PENDING:mt.FAILED};fx.prototype.isDestroyed=function(){return!1};fx.prototype.destroy=function(){let e=this._primitives,t=this._orderedGroundPrimitives;this._geometryUpdater._onTerrain?t.remove(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),me(this)};var ti=fx;var Hjt=S(T(),1);var Ezt=S(T(),1);var Qte={};function _E(e,t){l(Qte[e])||(Qte[e]=!0,console.warn(y(t,e)))}_E.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";_E.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";_E.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";_E.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var At=_E;var Ijt=S(T(),1);var wHt=S(T(),1);var CKt=S(T(),1);var Izt=S(T(),1),RWe={NONE:0,GEODESIC:1,RHUMB:2},$t=Object.freeze(RWe);var Fzt=S(T(),1);var jte=X.EPSILON10;function GWe(e,t,n,i){if(!l(e))return;n=y(n,!1);let o=l(i),r=e.length;if(r<2)return e;let s,a=e[0],c,d,u=0,m=-1;for(s=1;sX.EPSILON12);let L=M*(t*t-n*n)/(n*n),E=1+L*(4096+L*(L*(320-175*L)-768))/16384,I=L*(256+L*(L*(74-47*L)-128))/1024,w=b*b,N=I*F*(b+I*(P*(2*w-1)-I*b*(4*F*F-3)*(4*w-3)/6)/4),B=n*E*(v-N),k=Math.atan2(g*W,_-V*G),O=Math.atan2(m*W,_*G-V);e._distance=B,e._startHeading=k,e._endHeading=O,e._uSquared=L}var XWe=new h,cO=new h;function $te(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,cO),XWe),r=h.normalize(i.cartographicToCartesian(n,cO),cO);IWe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=he.clone(t,e._start),e._end=he.clone(n,e._end),e._start.height=0,e._end.height=0,EWe(e)}function SE(e,t,n){let i=y(n,te.default);this._ellipsoid=i,this._start=new he,this._end=new he,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&$te(this,e,t,i)}Object.defineProperties(SE.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}});SE.prototype.setEndPoints=function(e,t){$te(this,e,t,this._ellipsoid)};SE.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};SE.prototype.interpolateUsingSurfaceDistance=function(e,t){let n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),r=Math.cos(4*i),s=Math.cos(6*i),a=Math.sin(2*i),c=Math.sin(4*i),d=Math.sin(6*i),u=Math.sin(8*i),m=i*i,p=i*m,g=n.u8Over256,f=n.u2Over4,x=n.u6Over64,_=n.u4Over16,C=2*p*g*o/3+i*(1-f+7*_/4-15*x/4+579*g/64-(_-15*x/4+187*g/16)*o-(5*x/4-115*g/16)*r-29*g*s/16)+(f/2-_+71*x/32-85*g/16)*a+(5*_/16-5*x/4+383*g/96)*c-m*((x-11*g/2)*a+5*g*c/2)+(29*x/96-29*g/16)*d+539*g*u/1536,V=Math.asin(Math.sin(C)*n.cosineAlpha),Z=Math.atan(n.a/n.b*Math.tan(V));C=C-n.sigma;let R=Math.cos(2*n.sigma+C),G=Math.sin(C),W=Math.cos(C),v=n.cosineU*W,P=n.sineU*G,M=Math.atan2(G*n.sineHeading,v-P*n.cosineHeading)-qte(n.f,n.sineAlpha,n.cosineSquaredAlpha,C,G,W,R);return l(t)?(t.longitude=this._start.longitude+M,t.latitude=Z,t.height=0,t):new he(this._start.longitude+M,Z,0)};var gp=SE;var qzt=S(T(),1);function dO(e,t,n){if(e===0)return t*n;let i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,c=a*i,d=n,u=Math.sin(2*d),m=Math.sin(4*d),p=Math.sin(6*d),g=Math.sin(8*d),f=Math.sin(10*d),x=Math.sin(12*d);return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*c/1048576)*d-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*c/524288)*u+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*c/8388608)*m-(35*r/3072+175*s/12288+3675*a/262144+13475*c/1048576)*p+(315*s/131072+2205*a/524288+43659*c/8388608)*g-(693*a/1310720+6237*c/5242880)*f+1001*c/8388608*x)}function PWe(e,t,n){let i=e/n;if(t===0)return i;let o=i*i,r=o*i,s=r*i,a=t,c=a*a,d=c*c,u=d*c,m=u*c,p=m*c,g=p*c,f=Math.sin(2*i),x=Math.cos(2*i),_=Math.sin(4*i),C=Math.cos(4*i),V=Math.sin(6*i),Z=Math.cos(6*i),R=Math.sin(8*i),G=Math.cos(8*i),W=Math.sin(10*i),v=Math.cos(10*i),P=Math.sin(12*i);return i+i*c/4+7*i*d/64+15*i*u/256+579*i*m/16384+1515*i*p/65536+16837*i*g/1048576+(3*i*d/16+45*i*u/256-i*(32*o-561)*m/4096-i*(232*o-1677)*p/16384+i*(399985-90560*o+512*s)*g/5242880)*x+(21*i*u/256+483*i*m/4096-i*(224*o-1969)*p/16384-i*(33152*o-112599)*g/1048576)*C+(151*i*m/4096+4681*i*p/65536+1479*i*g/16384-453*r*g/32768)*Z+(1097*i*p/65536+42783*i*g/1048576)*G+8011*i*g/1048576*v+(3*c/8+3*d/16+213*u/2048-3*o*u/64+255*m/4096-33*o*m/512+20861*p/524288-33*o*p/512+s*p/1024+28273*g/1048576-471*o*g/8192+9*s*g/4096)*f+(21*d/256+21*u/256+533*m/8192-21*o*m/512+197*p/4096-315*o*p/4096+584039*g/16777216-12517*o*g/131072+7*s*g/2048)*_+(151*u/6144+151*m/4096+5019*p/131072-453*o*p/16384+26965*g/786432-8607*o*g/131072)*V+(1097*m/131072+1097*p/65536+225797*g/10485760-1097*o*g/65536)*R+(8011*p/2621440+8011*g/1048576)*W+293393*g/251658240*P}function QT(e,t){if(e===0)return Math.log(Math.tan(.5*(X.PI_OVER_TWO+t)));let n=e*Math.sin(t);return Math.log(Math.tan(.5*(X.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function vWe(e,t,n,i,o){let r=QT(e._ellipticity,n),s=QT(e._ellipticity,o);return Math.atan2(X.negativePiToPi(i-t),s-r)}function wWe(e,t,n,i,o,r,s){let a=e._heading,c=r-i,d=0;if(X.equalsEpsilon(Math.abs(a),X.PI_OVER_TWO,X.EPSILON8))if(t===n)d=t*Math.cos(o)*X.negativePiToPi(c);else{let u=Math.sin(o);d=t*Math.cos(o)*X.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*u*u)}else{let u=dO(e._ellipticity,t,o);d=(dO(e._ellipticity,t,s)-u)/Math.cos(a)}return Math.abs(d)}var FWe=new h,lO=new h;function ene(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,lO),FWe),r=h.normalize(i.cartographicToCartesian(n,lO),lO),s=i.maximumRadius,a=i.minimumRadius,c=s*s,d=a*a;e._ellipticitySquared=(c-d)/c,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=he.clone(t,e._start),e._start.height=0,e._end=he.clone(n,e._end),e._end.height=0,e._heading=vWe(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=wWe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function tne(e,t,n,i,o,r){if(n===0)return he.clone(e,r);let s=o*o,a,c,d;if(Math.abs(X.PI_OVER_TWO-Math.abs(t))>X.EPSILON8){let u=dO(o,i,e.latitude),m=n*Math.cos(t),p=u+m;if(c=PWe(p,o,i),Math.abs(t)0?a=X.negativePiToPi(e.longitude+d):a=X.negativePiToPi(e.longitude-d)}return l(r)?(r.longitude=a,r.latitude=c,r.height=0,r):new he(a,c,0)}function yp(e,t,n){let i=y(n,te.default);this._ellipsoid=i,this._start=new he,this._end=new he,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&ene(this,e,t,i)}Object.defineProperties(yp.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}});yp.fromStartHeadingDistance=function(e,t,n,i,o){let r=y(i,te.default),s=r.maximumRadius,a=r.minimumRadius,c=s*s,d=a*a,u=Math.sqrt((c-d)/c);t=X.negativePiToPi(t);let m=tne(e,t,n,r.maximumRadius,u);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new yp(e,m,r):(o.setEndPoints(e,m),o)};yp.prototype.setEndPoints=function(e,t){ene(this,e,t,this._ellipsoid)};yp.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};yp.prototype.interpolateUsingSurfaceDistance=function(e,t){return tne(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};yp.prototype.findIntersectionWithLongitude=function(e,t){let n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=X.negativePiToPi(e),X.equalsEpsilon(Math.abs(e),Math.PI,X.EPSILON14)&&(e=X.sign(r.longitude)*Math.PI),l(t)||(t=new he),Math.abs(X.PI_OVER_TWO-o)<=X.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(X.equalsEpsilon(Math.abs(X.PI_OVER_TWO-o),X.PI_OVER_TWO,X.EPSILON8))return X.equalsEpsilon(e,r.longitude,X.EPSILON12)?void 0:(t.longitude=e,t.latitude=X.PI_OVER_TWO*X.sign(X.PI_OVER_TWO-i),t.height=0,t);let s=r.latitude,a=n*Math.sin(s),c=Math.tan(.5*(X.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),d=(1+a)/(1-a),u=r.latitude,m;do{m=u;let p=n*Math.sin(m),g=(1+p)/(1-p);u=2*Math.atan(c*Math.pow(g/d,n/2))-X.PI_OVER_TWO}while(!X.equalsEpsilon(u,m,X.EPSILON12));return t.longitude=e,t.latitude=u,t.height=0,t};yp.prototype.findIntersectionWithLatitude=function(e,t){let n=this._ellipticity,i=this._heading,o=this._start;if(X.equalsEpsilon(Math.abs(i),X.PI_OVER_TWO,X.EPSILON8))return;let r=QT(n,o.latitude),s=QT(n,e),a=Math.tan(i)*(s-r),c=X.negativePiToPi(o.longitude+a);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new he(c,e,0)};var Va=yp;var yO=[Ci,Zi],AWe=yO.length,Sne=Math.cos(X.toRadians(30)),nne=Math.cos(X.toRadians(150)),Tne=0,Cne=1e3;function X0(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions;this.width=y(e.width,1),this._positions=t,this.granularity=y(e.granularity,9999),this.loop=y(e.loop,!1),this.arcType=y(e.arcType,$t.GEODESIC),this._ellipsoid=te.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(X0.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+te.packedLength+1+1}}});X0.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;iSne||rX.PI_OVER_TWO&&(a=!0,s=h.subtract(r,n,dne),d=c.cartesianToCartographic(s,lne)),d.height=0;let u=e.project(d,o);return o=h.subtract(u,i,o),o.z=0,o=h.normalize(o,o),a&&h.negate(o,o),o}var iIe=new h,une=new h;function mne(e,t,n,i,o,r){let s=h.subtract(t,e,iIe);h.normalize(s,s);let a=n-Tne,c=h.multiplyByScalar(s,a,une);h.add(e,c,o);let d=i-Cne;c=h.multiplyByScalar(s,d,une),h.add(t,c,r)}var oIe=new h;function GN(e,t){let n=dn.getPointDistance(EN,e),i=dn.getPointDistance(EN,t),o=oIe;X.equalsEpsilon(n,0,X.EPSILON2)?(o=xp(t,e,o),h.multiplyByScalar(o,X.EPSILON2,o),h.add(e,o,e)):X.equalsEpsilon(i,0,X.EPSILON2)&&(o=xp(e,t,o),h.multiplyByScalar(o,X.EPSILON2,o),h.add(t,o,t))}function rIe(e,t){let n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(X.equalsEpsilon(n,X.PI,X.EPSILON11)){let o=X.sign(t.longitude);return e.longitude=o*(n-X.EPSILON11),1}else if(X.equalsEpsilon(i,X.PI,X.EPSILON11)){let o=X.sign(e.longitude);return t.longitude=o*(i-X.EPSILON11),2}return 0}var Zne=new he,Lne=new he,hne=new h,fO=new h,fne=new h,pne=new h,sIe=new h,bne=new h,aIe=[Zne,Lne],cIe=new ce,lIe=new h,dIe=new h,uIe=new h,mIe=new h,hIe=new h,fIe=new h,pO=new h,bO=new h,pIe=new h,bIe=new h,gIe=new h,gne=new h,yIe=new h,xIe=new h,_Ie=new Yn,SIe=new Yn,yne=new h,TIe=new h,xne=new h,CIe=[new le,new le],Rne=[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],_ne=Rne.length;function VIe(e,t,n,i,o,r,s){let a,c,d=t._ellipsoid,u=n.length/3-1,m=u*8,p=m*4,g=u*36,f=m>65535?new Uint32Array(g):new Uint16Array(g),x=new Float64Array(m*3),_=new Float32Array(p),C=new Float32Array(p),V=new Float32Array(p),Z=new Float32Array(p),R=new Float32Array(p),G,W,v,P;s&&(G=new Float32Array(p),W=new Float32Array(p),v=new Float32Array(p),P=new Float32Array(m*2));let F=r.length/2,M=0,b=Zne;b.height=0;let L=Lne;L.height=0;let E=hne,I=fO;if(s)for(c=0,a=1;aSne?(ht=TE(t,b,Ue,Pt,pO),Ae=TE(t,L,j,Ot,bO)):Yi===1?(Ae=TE(t,L,j,Ot,bO),ht.x=0,ht.y=X.sign(b.longitude-Math.abs(L.longitude)),ht.z=0):(ht=TE(t,b,Ue,Pt,pO),Ae.x=0,Ae.y=X.sign(b.longitude-L.longitude),Ae.z=0)}let $e=h.distance(Pe,K),Qe=Yn.fromCartesian(We,_Ie),je=h.subtract(ee,We,pIe),Ut=h.normalize(je,gne),pe=h.subtract(Pe,We,bIe);pe=h.normalize(pe,pe);let Ve=h.cross(Ut,pe,gne);Ve=h.normalize(Ve,Ve);let Dt=h.cross(pe,Ue,yIe);Dt=h.normalize(Dt,Dt);let bt=h.subtract(K,ee,gIe);bt=h.normalize(bt,bt);let li=h.cross(j,bt,xIe);li=h.normalize(li,li);let Vo=$e/N,Gs=q/N,Hs=0,Ur,ts,ke,ot=0,nt=0;if(s){Hs=h.distance(Pt,Ot),Ur=Yn.fromCartesian(Pt,SIe),ts=h.subtract(Ot,Pt,yne),ke=h.normalize(ts,TIe);let Yi=ke.x;ke.x=ke.y,ke.y=-Yi,ot=Hs/M,nt=be/M}for(B=0;B<8;B++){let Yi=J+B*4,hs=O+B*2,xr=Yi+3,ul=B<4?1:-1,Bo=B===2||B===3||B===6||B===7?1:-1;h.pack(Qe.high,_,Yi),_[xr]=je.x,h.pack(Qe.low,C,Yi),C[xr]=je.y,h.pack(Dt,V,Yi),V[xr]=je.z,h.pack(li,Z,Yi),Z[xr]=Vo*ul,h.pack(Ve,R,Yi);let _r=Gs*Bo;_r===0&&Bo<0&&(_r=9),R[xr]=_r,s&&(G[Yi]=Ur.high.x,G[Yi+1]=Ur.high.y,G[Yi+2]=Ur.low.x,G[Yi+3]=Ur.low.y,v[Yi]=-ht.y,v[Yi+1]=ht.x,v[Yi+2]=Ae.y,v[Yi+3]=-Ae.x,W[Yi]=ts.x,W[Yi+1]=ts.y,W[Yi+2]=ke.x,W[Yi+3]=ke.y,P[hs]=ot*ul,_r=nt*Bo,_r===0&&Bo<0&&(_r=9),P[hs+1]=_r)}let qe=uIe,dt=mIe,Bt=lIe,Zn=dIe,Zo=ce.fromCartographicArray(aIe,cIe),ir=ci.getMinimumMaximumHeights(Zo,d),Ua=ir.minimumTerrainHeight,ka=ir.maximumTerrainHeight;Se+=Math.abs(Ua),Se+=Math.abs(ka),mne(We,Pe,Ua,ka,qe,Bt),mne(ee,K,Ua,ka,dt,Zn);let oo=h.multiplyByScalar(Ve,X.EPSILON5,xne);h.add(qe,oo,qe),h.add(dt,oo,dt),h.add(Bt,oo,Bt),h.add(Zn,oo,Zn),GN(qe,dt),GN(Bt,Zn),h.pack(qe,x,U),h.pack(dt,x,U+3),h.pack(Zn,x,U+6),h.pack(Bt,x,U+9),oo=h.multiplyByScalar(Ve,-2*X.EPSILON5,xne),h.add(qe,oo,qe),h.add(dt,oo,dt),h.add(Bt,oo,Bt),h.add(Zn,oo,Zn),GN(qe,dt),GN(Bt,Zn),h.pack(qe,x,U+12),h.pack(dt,x,U+15),h.pack(Zn,x,U+18),h.pack(Bt,x,U+21),k+=2,c+=3,O+=16,U+=24,J+=32,q+=$e,be+=Hs}c=0;let ae=0;for(a=0;a{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};Tp.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};Tp.isSupported=function(e){return e.frameState.context.depthTexture};Tp.prototype.isDestroyed=function(){return!1};Tp.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,me(this)};var _m=Tp;var lJt=T(S(),1);var nJt=T(S(),1);var JKt=T(S(),1);var WIe=new D(1,1),PIe=!1,vIe=Y.WHITE;function qS(e){e=y(e,y.EMPTY_OBJECT),this._definitionChanged=new ge,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent}Object.defineProperties(qS.prototype,{isConstant:{get:function(){return K.isConstant(this._image)&&K.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:de("image"),repeat:de("repeat"),color:de("color"),transparent:de("transparent")});qS.prototype.getType=function(e){return"Image"};qS.prototype.getValue=function(e,t){return l(t)||(t={}),t.image=K.getValueOrUndefined(this._image,e),t.repeat=K.getValueOrClonedDefault(this._repeat,e,WIe,t.repeat),t.color=K.getValueOrClonedDefault(this._color,e,vIe,t.color),K.getValueOrDefault(this._transparent,e,PIe)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t};qS.prototype.equals=function(e){return this===e||e instanceof qS&&K.equals(this._image,e._image)&&K.equals(this._repeat,e._repeat)&&K.equals(this._color,e._color)&&K.equals(this._transparent,e._transparent)};var vb=qS;function wIe(e){if(e instanceof Y)return new Ut(e);if(typeof e=="string"||e instanceof Ee||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){let t=new vb;return t.image=e,t}}function FIe(e,t){return de(e,t,wIe)}var Zo=FIe;function EE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(EE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),dimensions:de("dimensions"),heightReference:de("heightReference"),fill:de("fill"),material:Zo("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition")});EE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new EE(this)};EE.prototype.merge=function(e){this.show=y(this.show,e.show),this.dimensions=y(this.dimensions,e.dimensions),this.heightReference=y(this.heightReference,e.heightReference),this.fill=y(this.fill,e.fill),this.material=y(this.material,e.material),this.outline=y(this.outline,e.outline),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.shadows=y(this.shadows,e.shadows),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition)};var _x=EE;var ZJt=T(S(),1);var uJt=T(S(),1),AIe={FIXED:0,INERTIAL:1},$i=Object.freeze(AIe);var xJt=T(S(),1);function $S(){fe.throwInstantiationError()}Object.defineProperties($S.prototype,{isConstant:{get:fe.throwInstantiationError},definitionChanged:{get:fe.throwInstantiationError},referenceFrame:{get:fe.throwInstantiationError}});$S.prototype.getValue=fe.throwInstantiationError;$S.prototype.getValueInReferenceFrame=fe.throwInstantiationError;$S.prototype.equals=fe.throwInstantiationError;var _O=new $;$S.convertToReferenceFrame=function(e,t,n,i,o){if(!l(t))return t;if(l(o)||(o=new h),n===i)return h.clone(t,o);let r=Gt.computeIcrfToFixedMatrix(e,_O);if(l(r)||(r=Gt.computeTemeToPseudoFixedMatrix(e,_O)),n===$i.INERTIAL)return $.multiplyByVector(r,t,o);if(n===$i.FIXED)return $.multiplyByVector($.transpose(r,_O),t,o)};var Sp=$S;function Tx(e,t){this._definitionChanged=new ge,this._value=h.clone(e),this._referenceFrame=y(t,$i.FIXED)}Object.defineProperties(Tx.prototype,{isConstant:{get:function(){return!l(this._value)||this._referenceFrame===$i.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});Tx.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,$i.FIXED,t)};Tx.prototype.setValue=function(e,t){let n=!1;h.equals(this._value,e)||(n=!0,this._value=h.clone(e)),l(t)&&this._referenceFrame!==t&&(n=!0,this._referenceFrame=t),n&&this._definitionChanged.raiseEvent(this)};Tx.prototype.getValueInReferenceFrame=function(e,t,n){return Sp.convertToReferenceFrame(e,this._value,this._referenceFrame,t,n)};Tx.prototype.equals=function(e){return this===e||e instanceof Tx&&h.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame};var Mc=Tx;var vJt=T(S(),1);function XE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(XE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),positions:de("positions"),width:de("width"),height:de("height"),heightReference:de("heightReference"),extrudedHeight:de("extrudedHeight"),extrudedHeightReference:de("extrudedHeightReference"),cornerType:de("cornerType"),granularity:de("granularity"),fill:de("fill"),material:Zo("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition"),classificationType:de("classificationType"),zIndex:de("zIndex")});XE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new XE(this)};XE.prototype.merge=function(e){this.show=y(this.show,e.show),this.positions=y(this.positions,e.positions),this.width=y(this.width,e.width),this.height=y(this.height,e.height),this.heightReference=y(this.heightReference,e.heightReference),this.extrudedHeight=y(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=y(this.extrudedHeightReference,e.extrudedHeightReference),this.cornerType=y(this.cornerType,e.cornerType),this.granularity=y(this.granularity,e.granularity),this.fill=y(this.fill,e.fill),this.material=y(this.material,e.material),this.outline=y(this.outline,e.outline),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.shadows=y(this.shadows,e.shadows),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=y(this.classificationType,e.classificationType),this.zIndex=y(this.zIndex,e.zIndex)};var Sx=XE;var AJt=T(S(),1);function MIe(e){return e}function NIe(e,t){return de(e,t,MIe)}var Tl=NIe;var YJt=T(S(),1);function IE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(IE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),length:de("length"),topRadius:de("topRadius"),bottomRadius:de("bottomRadius"),heightReference:de("heightReference"),fill:de("fill"),material:Zo("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),numberOfVerticalLines:de("numberOfVerticalLines"),slices:de("slices"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition")});IE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new IE(this)};IE.prototype.merge=function(e){this.show=y(this.show,e.show),this.length=y(this.length,e.length),this.topRadius=y(this.topRadius,e.topRadius),this.bottomRadius=y(this.bottomRadius,e.bottomRadius),this.heightReference=y(this.heightReference,e.heightReference),this.fill=y(this.fill,e.fill),this.material=y(this.material,e.material),this.outline=y(this.outline,e.outline),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=y(this.numberOfVerticalLines,e.numberOfVerticalLines),this.slices=y(this.slices,e.slices),this.shadows=y(this.shadows,e.shadows),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition)};var Cx=IE;var jJt=T(S(),1);function WE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(WE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),semiMajorAxis:de("semiMajorAxis"),semiMinorAxis:de("semiMinorAxis"),height:de("height"),heightReference:de("heightReference"),extrudedHeight:de("extrudedHeight"),extrudedHeightReference:de("extrudedHeightReference"),rotation:de("rotation"),stRotation:de("stRotation"),granularity:de("granularity"),fill:de("fill"),material:Zo("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),numberOfVerticalLines:de("numberOfVerticalLines"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition"),classificationType:de("classificationType"),zIndex:de("zIndex")});WE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new WE(this)};WE.prototype.merge=function(e){this.show=y(this.show,e.show),this.semiMajorAxis=y(this.semiMajorAxis,e.semiMajorAxis),this.semiMinorAxis=y(this.semiMinorAxis,e.semiMinorAxis),this.height=y(this.height,e.height),this.heightReference=y(this.heightReference,e.heightReference),this.extrudedHeight=y(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=y(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=y(this.rotation,e.rotation),this.stRotation=y(this.stRotation,e.stRotation),this.granularity=y(this.granularity,e.granularity),this.fill=y(this.fill,e.fill),this.material=y(this.material,e.material),this.outline=y(this.outline,e.outline),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=y(this.numberOfVerticalLines,e.numberOfVerticalLines),this.shadows=y(this.shadows,e.shadows),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=y(this.classificationType,e.classificationType),this.zIndex=y(this.zIndex,e.zIndex)};var Vx=WE;var oQt=T(S(),1);function PE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(PE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),radii:de("radii"),innerRadii:de("innerRadii"),minimumClock:de("minimumClock"),maximumClock:de("maximumClock"),minimumCone:de("minimumCone"),maximumCone:de("maximumCone"),heightReference:de("heightReference"),fill:de("fill"),material:Zo("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),stackPartitions:de("stackPartitions"),slicePartitions:de("slicePartitions"),subdivisions:de("subdivisions"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition")});PE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new PE(this)};PE.prototype.merge=function(e){this.show=y(this.show,e.show),this.radii=y(this.radii,e.radii),this.innerRadii=y(this.innerRadii,e.innerRadii),this.minimumClock=y(this.minimumClock,e.minimumClock),this.maximumClock=y(this.maximumClock,e.maximumClock),this.minimumCone=y(this.minimumCone,e.minimumCone),this.maximumCone=y(this.maximumCone,e.maximumCone),this.heightReference=y(this.heightReference,e.heightReference),this.fill=y(this.fill,e.fill),this.material=y(this.material,e.material),this.outline=y(this.outline,e.outline),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.stackPartitions=y(this.stackPartitions,e.stackPartitions),this.slicePartitions=y(this.slicePartitions,e.slicePartitions),this.subdivisions=y(this.subdivisions,e.subdivisions),this.shadows=y(this.shadows,e.shadows),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition)};var Lx=PE;var dQt=T(S(),1);function vE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(vE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),text:de("text"),font:de("font"),style:de("style"),scale:de("scale"),showBackground:de("showBackground"),backgroundColor:de("backgroundColor"),backgroundPadding:de("backgroundPadding"),pixelOffset:de("pixelOffset"),eyeOffset:de("eyeOffset"),horizontalOrigin:de("horizontalOrigin"),verticalOrigin:de("verticalOrigin"),heightReference:de("heightReference"),fillColor:de("fillColor"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),translucencyByDistance:de("translucencyByDistance"),pixelOffsetScaleByDistance:de("pixelOffsetScaleByDistance"),scaleByDistance:de("scaleByDistance"),distanceDisplayCondition:de("distanceDisplayCondition"),disableDepthTestDistance:de("disableDepthTestDistance")});vE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new vE(this)};vE.prototype.merge=function(e){this.show=y(this.show,e.show),this.text=y(this.text,e.text),this.font=y(this.font,e.font),this.style=y(this.style,e.style),this.scale=y(this.scale,e.scale),this.showBackground=y(this.showBackground,e.showBackground),this.backgroundColor=y(this.backgroundColor,e.backgroundColor),this.backgroundPadding=y(this.backgroundPadding,e.backgroundPadding),this.pixelOffset=y(this.pixelOffset,e.pixelOffset),this.eyeOffset=y(this.eyeOffset,e.eyeOffset),this.horizontalOrigin=y(this.horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=y(this.verticalOrigin,e.verticalOrigin),this.heightReference=y(this.heightReference,e.heightReference),this.fillColor=y(this.fillColor,e.fillColor),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.translucencyByDistance=y(this.translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=y(this.pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.scaleByDistance=y(this.scaleByDistance,e.scaleByDistance),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=y(this.disableDepthTestDistance,e.disableDepthTestDistance)};var Tm=vE;var kQt=T(S(),1);var VQt=T(S(),1);var bQt=T(S(),1);var kIe=new h(1,1,1),UIe=h.ZERO,DIe=we.IDENTITY;function Gne(e,t,n){this.translation=h.clone(y(e,UIe)),this.rotation=we.clone(y(t,DIe)),this.scale=h.clone(y(n,kIe))}Gne.prototype.equals=function(e){return this===e||l(e)&&h.equals(this.translation,e.translation)&&we.equals(this.rotation,e.rotation)&&h.equals(this.scale,e.scale)};var wb=Gne;var TO=new wb;function wE(e){e=y(e,y.EMPTY_OBJECT),this._definitionChanged=new ge,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale}Object.defineProperties(wE.prototype,{isConstant:{get:function(){return K.isConstant(this._translation)&&K.isConstant(this._rotation)&&K.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:de("translation"),rotation:de("rotation"),scale:de("scale")});wE.prototype.getValue=function(e,t){return l(t)||(t=new wb),t.translation=K.getValueOrClonedDefault(this._translation,e,TO.translation,t.translation),t.rotation=K.getValueOrClonedDefault(this._rotation,e,TO.rotation,t.rotation),t.scale=K.getValueOrClonedDefault(this._scale,e,TO.scale,t.scale),t};wE.prototype.equals=function(e){return this===e||e instanceof wE&&K.equals(this._translation,e._translation)&&K.equals(this._rotation,e._rotation)&&K.equals(this._scale,e._scale)};var Rx=wE;var WQt=T(S(),1);function Cp(e,t){this._propertyNames=[],this._definitionChanged=new ge,l(e)&&this.merge(e,t)}Object.defineProperties(Cp.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){let e=this._propertyNames;for(let t=0,n=e.length;t{this._terrainHeight=a.height,this.definitionChanged.raiseEvent()};this._removeCallbackFunc=e.updateHeight(o,s,this._heightReference)};tC.prototype.getValue=function(e,t){let n=K.getValueOrDefault(this._heightReference,e,Je.NONE),i=K.getValueOrDefault(this._extrudedHeightReference,e,Je.NONE);if(n===Je.NONE&&!AS(i))return this._position=h.clone(h.ZERO,this._position),h.clone(h.ZERO,t);if(this._positionProperty.isConstant)return h.multiplyByScalar(this._normal,this._terrainHeight,t);let o=this._scene,r=this._positionProperty.getValue(e,Pne);if(!l(r)||h.equals(r,h.ZERO)||!l(o.globe))return h.clone(h.ZERO,t);if(h.equalsEpsilon(this._position,r,W.EPSILON10))return h.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=h.clone(r,this._position),this._updateClamping();let s=o.globe.ellipsoid.geodeticSurfaceNormal(r,this._normal);return h.multiplyByScalar(s,this._terrainHeight,t)};tC.prototype.isDestroyed=function(){return!1};tC.prototype.destroy=function(){return l(this._removeEventListener)&&this._removeEventListener(),l(this._removeModeListener)&&this._removeModeListener(),l(this._removeCallbackFunc)&&this._removeCallbackFunc(),me(this)};var Xx=tC;function sWe(e,t,n,i){if(ni.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o))return;l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference;if(l(r)){let s=new Vm(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new Xx(this._scene,s,r)}}var Zp=sWe;var vne=h.ZERO,wne=new h,aWe=new h,Fne=new Y;function cWe(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function dd(e,t){ni.call(this,{entity:e,scene:t,geometryOptions:new cWe(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}l(Object.create)&&(dd.prototype=Object.create(ni.prototype),dd.prototype.constructor=dd);Object.defineProperties(dd.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});dd.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new yn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Nn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Ut){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,Fne)),l(a)||(a=Y.WHITE),s.color=Ht.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=Hi.fromCartesian3(K.getValueOrDefault(this._terrainOffsetProperty,e,vne,wne))),new St({id:t,geometry:gl.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.mapProjection.ellipsoid),attributes:s})};dd.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=K.getValueOrDefault(this._outlineColorProperty,e,Y.BLACK,Fne),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new yn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Nn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=Hi.fromCartesian3(K.getValueOrDefault(this._terrainOffsetProperty,e,vne,wne))),new St({id:t,geometry:pm.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.mapProjection.ellipsoid),attributes:r})};dd.prototype._computeCenter=function(e,t){return K.getValueOrUndefined(this._entity.position,e,t)};dd.prototype._isHidden=function(e,t){return!l(t.dimensions)||!l(e.position)||ni.prototype._isHidden.call(this,e,t)};dd.prototype._isDynamic=function(e,t){return!e.position.isConstant||!K.isConstant(e.orientation)||!t.dimensions.isConstant||!K.isConstant(t.outlineWidth)};dd.prototype._setStaticOptions=function(e,t){let n=K.getValueOrDefault(t.heightReference,Be.MINIMUM_VALUE,Je.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Ut?ln.VERTEX_FORMAT:ro.MaterialSupport.TEXTURED.vertexFormat,i.dimensions=t.dimensions.getValue(Be.MINIMUM_VALUE,i.dimensions),i.offsetAttribute=n!==Je.NONE?cn.ALL:void 0};dd.prototype._onEntityPropertyChanged=Zp;dd.DynamicGeometryUpdater=nC;function nC(e,t,n){ti.call(this,e,t,n)}l(Object.create)&&(nC.prototype=Object.create(ti.prototype),nC.prototype.constructor=nC);nC.prototype._isHidden=function(e,t,n){let i=K.getValueOrUndefined(e.position,n,aWe),o=this._options.dimensions;return!l(i)||!l(o)||ti.prototype._isHidden.call(this,e,t,n)};nC.prototype._setOptions=function(e,t,n){let i=K.getValueOrDefault(t.heightReference,n,Je.NONE),o=this._options;o.dimensions=K.getValueOrUndefined(t.dimensions,n,o.dimensions),o.offsetAttribute=i!==Je.NONE?cn.ALL:void 0};var zE=dd;var mkn=T(S(),1);var tkn=T(S(),1);var H8t=T(S(),1),Mne=T(Ane(),1);var lWe=0,RO={};function Qh(e,t){let n,i=e;l(RO[i])?n=RO[i]:(n=lWe++,RO[i]=n),t=y(t,!1),this._id=n,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(Qh.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen},set:function(e){this._showOnScreen=e}},element:{get:function(){if(!l(this._element)){let e=Mne.default.sanitize(this._html),t=document.createElement("div");t._creditId=this._id,t.style.display="inline",t.innerHTML=e;let n=t.querySelectorAll("a");for(let i=0;i{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};_p.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};_p.isSupported=function(e){return e.frameState.context.depthTexture};_p.prototype.isDestroyed=function(){return!1};_p.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,me(this)};var xm=_p;var oJt=S(T(),1);var jHt=S(T(),1);var YHt=S(T(),1);var WIe=new D(1,1),IIe=!1,XIe=Y.WHITE;function jT(e){e=y(e,y.EMPTY_OBJECT),this._definitionChanged=new ge,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent}Object.defineProperties(jT.prototype,{isConstant:{get:function(){return H.isConstant(this._image)&&H.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:de("image"),repeat:de("repeat"),color:de("color"),transparent:de("transparent")});jT.prototype.getType=function(e){return"Image"};jT.prototype.getValue=function(e,t){return l(t)||(t={}),t.image=H.getValueOrUndefined(this._image,e),t.repeat=H.getValueOrClonedDefault(this._repeat,e,WIe,t.repeat),t.color=H.getValueOrClonedDefault(this._color,e,XIe,t.color),H.getValueOrDefault(this._transparent,e,IIe)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t};jT.prototype.equals=function(e){return this===e||e instanceof jT&&H.equals(this._image,e._image)&&H.equals(this._repeat,e._repeat)&&H.equals(this._color,e._color)&&H.equals(this._transparent,e._transparent)};var P0=jT;function PIe(e){if(e instanceof Y)return new kt(e);if(typeof e=="string"||e instanceof Ee||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){let t=new P0;return t.image=e,t}}function vIe(e,t){return de(e,t,PIe)}var Ro=vIe;function EE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(EE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),dimensions:de("dimensions"),heightReference:de("heightReference"),fill:de("fill"),material:Ro("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition")});EE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new EE(this)};EE.prototype.merge=function(e){this.show=y(this.show,e.show),this.dimensions=y(this.dimensions,e.dimensions),this.heightReference=y(this.heightReference,e.heightReference),this.fill=y(this.fill,e.fill),this.material=y(this.material,e.material),this.outline=y(this.outline,e.outline),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.shadows=y(this.shadows,e.shadows),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition)};var xx=EE;var TJt=S(T(),1);var sJt=S(T(),1),wIe={FIXED:0,INERTIAL:1},$i=Object.freeze(wIe);var fJt=S(T(),1);function qT(){fe.throwInstantiationError()}Object.defineProperties(qT.prototype,{isConstant:{get:fe.throwInstantiationError},definitionChanged:{get:fe.throwInstantiationError},referenceFrame:{get:fe.throwInstantiationError}});qT.prototype.getValue=fe.throwInstantiationError;qT.prototype.getValueInReferenceFrame=fe.throwInstantiationError;qT.prototype.equals=fe.throwInstantiationError;var SO=new $;qT.convertToReferenceFrame=function(e,t,n,i,o){if(!l(t))return t;if(l(o)||(o=new h),n===i)return h.clone(t,o);let r=Gt.computeIcrfToFixedMatrix(e,SO);if(l(r)||(r=Gt.computeTemeToPseudoFixedMatrix(e,SO)),n===$i.INERTIAL)return $.multiplyByVector(r,t,o);if(n===$i.FIXED)return $.multiplyByVector($.transpose(r,SO),t,o)};var Sp=qT;function _x(e,t){this._definitionChanged=new ge,this._value=h.clone(e),this._referenceFrame=y(t,$i.FIXED)}Object.defineProperties(_x.prototype,{isConstant:{get:function(){return!l(this._value)||this._referenceFrame===$i.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});_x.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,$i.FIXED,t)};_x.prototype.setValue=function(e,t){let n=!1;h.equals(this._value,e)||(n=!0,this._value=h.clone(e)),l(t)&&this._referenceFrame!==t&&(n=!0,this._referenceFrame=t),n&&this._definitionChanged.raiseEvent(this)};_x.prototype.getValueInReferenceFrame=function(e,t,n){return Sp.convertToReferenceFrame(e,this._value,this._referenceFrame,t,n)};_x.prototype.equals=function(e){return this===e||e instanceof _x&&h.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame};var Ac=_x;var EJt=S(T(),1);function WE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(WE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),positions:de("positions"),width:de("width"),height:de("height"),heightReference:de("heightReference"),extrudedHeight:de("extrudedHeight"),extrudedHeightReference:de("extrudedHeightReference"),cornerType:de("cornerType"),granularity:de("granularity"),fill:de("fill"),material:Ro("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition"),classificationType:de("classificationType"),zIndex:de("zIndex")});WE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new WE(this)};WE.prototype.merge=function(e){this.show=y(this.show,e.show),this.positions=y(this.positions,e.positions),this.width=y(this.width,e.width),this.height=y(this.height,e.height),this.heightReference=y(this.heightReference,e.heightReference),this.extrudedHeight=y(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=y(this.extrudedHeightReference,e.extrudedHeightReference),this.cornerType=y(this.cornerType,e.cornerType),this.granularity=y(this.granularity,e.granularity),this.fill=y(this.fill,e.fill),this.material=y(this.material,e.material),this.outline=y(this.outline,e.outline),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.shadows=y(this.shadows,e.shadows),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=y(this.classificationType,e.classificationType),this.zIndex=y(this.zIndex,e.zIndex)};var Sx=WE;var XJt=S(T(),1);function FIe(e){return e}function AIe(e,t){return de(e,t,FIe)}var _l=AIe;var NJt=S(T(),1);function IE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(IE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),length:de("length"),topRadius:de("topRadius"),bottomRadius:de("bottomRadius"),heightReference:de("heightReference"),fill:de("fill"),material:Ro("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),numberOfVerticalLines:de("numberOfVerticalLines"),slices:de("slices"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition")});IE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new IE(this)};IE.prototype.merge=function(e){this.show=y(this.show,e.show),this.length=y(this.length,e.length),this.topRadius=y(this.topRadius,e.topRadius),this.bottomRadius=y(this.bottomRadius,e.bottomRadius),this.heightReference=y(this.heightReference,e.heightReference),this.fill=y(this.fill,e.fill),this.material=y(this.material,e.material),this.outline=y(this.outline,e.outline),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=y(this.numberOfVerticalLines,e.numberOfVerticalLines),this.slices=y(this.slices,e.slices),this.shadows=y(this.shadows,e.shadows),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition)};var Tx=IE;var zJt=S(T(),1);function XE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(XE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),semiMajorAxis:de("semiMajorAxis"),semiMinorAxis:de("semiMinorAxis"),height:de("height"),heightReference:de("heightReference"),extrudedHeight:de("extrudedHeight"),extrudedHeightReference:de("extrudedHeightReference"),rotation:de("rotation"),stRotation:de("stRotation"),granularity:de("granularity"),fill:de("fill"),material:Ro("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),numberOfVerticalLines:de("numberOfVerticalLines"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition"),classificationType:de("classificationType"),zIndex:de("zIndex")});XE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new XE(this)};XE.prototype.merge=function(e){this.show=y(this.show,e.show),this.semiMajorAxis=y(this.semiMajorAxis,e.semiMajorAxis),this.semiMinorAxis=y(this.semiMinorAxis,e.semiMinorAxis),this.height=y(this.height,e.height),this.heightReference=y(this.heightReference,e.heightReference),this.extrudedHeight=y(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=y(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=y(this.rotation,e.rotation),this.stRotation=y(this.stRotation,e.stRotation),this.granularity=y(this.granularity,e.granularity),this.fill=y(this.fill,e.fill),this.material=y(this.material,e.material),this.outline=y(this.outline,e.outline),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=y(this.numberOfVerticalLines,e.numberOfVerticalLines),this.shadows=y(this.shadows,e.shadows),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=y(this.classificationType,e.classificationType),this.zIndex=y(this.zIndex,e.zIndex)};var Cx=XE;var $Jt=S(T(),1);function PE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(PE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),radii:de("radii"),innerRadii:de("innerRadii"),minimumClock:de("minimumClock"),maximumClock:de("maximumClock"),minimumCone:de("minimumCone"),maximumCone:de("maximumCone"),heightReference:de("heightReference"),fill:de("fill"),material:Ro("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),stackPartitions:de("stackPartitions"),slicePartitions:de("slicePartitions"),subdivisions:de("subdivisions"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition")});PE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new PE(this)};PE.prototype.merge=function(e){this.show=y(this.show,e.show),this.radii=y(this.radii,e.radii),this.innerRadii=y(this.innerRadii,e.innerRadii),this.minimumClock=y(this.minimumClock,e.minimumClock),this.maximumClock=y(this.maximumClock,e.maximumClock),this.minimumCone=y(this.minimumCone,e.minimumCone),this.maximumCone=y(this.maximumCone,e.maximumCone),this.heightReference=y(this.heightReference,e.heightReference),this.fill=y(this.fill,e.fill),this.material=y(this.material,e.material),this.outline=y(this.outline,e.outline),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.stackPartitions=y(this.stackPartitions,e.stackPartitions),this.slicePartitions=y(this.slicePartitions,e.slicePartitions),this.subdivisions=y(this.subdivisions,e.subdivisions),this.shadows=y(this.shadows,e.shadows),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition)};var Vx=PE;var rQt=S(T(),1);function vE(e){this._definitionChanged=new ge,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(vE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),text:de("text"),font:de("font"),style:de("style"),scale:de("scale"),showBackground:de("showBackground"),backgroundColor:de("backgroundColor"),backgroundPadding:de("backgroundPadding"),pixelOffset:de("pixelOffset"),eyeOffset:de("eyeOffset"),horizontalOrigin:de("horizontalOrigin"),verticalOrigin:de("verticalOrigin"),heightReference:de("heightReference"),fillColor:de("fillColor"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),translucencyByDistance:de("translucencyByDistance"),pixelOffsetScaleByDistance:de("pixelOffsetScaleByDistance"),scaleByDistance:de("scaleByDistance"),distanceDisplayCondition:de("distanceDisplayCondition"),disableDepthTestDistance:de("disableDepthTestDistance")});vE.prototype.clone=function(e){return l(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new vE(this)};vE.prototype.merge=function(e){this.show=y(this.show,e.show),this.text=y(this.text,e.text),this.font=y(this.font,e.font),this.style=y(this.style,e.style),this.scale=y(this.scale,e.scale),this.showBackground=y(this.showBackground,e.showBackground),this.backgroundColor=y(this.backgroundColor,e.backgroundColor),this.backgroundPadding=y(this.backgroundPadding,e.backgroundPadding),this.pixelOffset=y(this.pixelOffset,e.pixelOffset),this.eyeOffset=y(this.eyeOffset,e.eyeOffset),this.horizontalOrigin=y(this.horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=y(this.verticalOrigin,e.verticalOrigin),this.heightReference=y(this.heightReference,e.heightReference),this.fillColor=y(this.fillColor,e.fillColor),this.outlineColor=y(this.outlineColor,e.outlineColor),this.outlineWidth=y(this.outlineWidth,e.outlineWidth),this.translucencyByDistance=y(this.translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=y(this.pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.scaleByDistance=y(this.scaleByDistance,e.scaleByDistance),this.distanceDisplayCondition=y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=y(this.disableDepthTestDistance,e.disableDepthTestDistance)};var _m=vE;var wQt=S(T(),1);var xQt=S(T(),1);var uQt=S(T(),1);var MIe=new h(1,1,1),NIe=h.ZERO,UIe=we.IDENTITY;function Wne(e,t,n){this.translation=h.clone(y(e,NIe)),this.rotation=we.clone(y(t,UIe)),this.scale=h.clone(y(n,MIe))}Wne.prototype.equals=function(e){return this===e||l(e)&&h.equals(this.translation,e.translation)&&we.equals(this.rotation,e.rotation)&&h.equals(this.scale,e.scale)};var v0=Wne;var TO=new v0;function wE(e){e=y(e,y.EMPTY_OBJECT),this._definitionChanged=new ge,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale}Object.defineProperties(wE.prototype,{isConstant:{get:function(){return H.isConstant(this._translation)&&H.isConstant(this._rotation)&&H.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:de("translation"),rotation:de("rotation"),scale:de("scale")});wE.prototype.getValue=function(e,t){return l(t)||(t=new v0),t.translation=H.getValueOrClonedDefault(this._translation,e,TO.translation,t.translation),t.rotation=H.getValueOrClonedDefault(this._rotation,e,TO.rotation,t.rotation),t.scale=H.getValueOrClonedDefault(this._scale,e,TO.scale,t.scale),t};wE.prototype.equals=function(e){return this===e||e instanceof wE&&H.equals(this._translation,e._translation)&&H.equals(this._rotation,e._rotation)&&H.equals(this._scale,e._scale)};var Zx=wE;var RQt=S(T(),1);function Tp(e,t){this._propertyNames=[],this._definitionChanged=new ge,l(e)&&this.merge(e,t)}Object.defineProperties(Tp.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){let e=this._propertyNames;for(let t=0,n=e.length;t{this._terrainHeight=s.height,this.definitionChanged.raiseEvent()};this._removeCallbackFunc=e.updateHeight(i,r,this._heightReference)};eC.prototype.getValue=function(e,t){let n=H.getValueOrDefault(this._heightReference,e,Je.NONE),i=H.getValueOrDefault(this._extrudedHeightReference,e,Je.NONE);if(n===Je.NONE&&!FT(i))return this._position=h.clone(h.ZERO,this._position),h.clone(h.ZERO,t);if(this._positionProperty.isConstant)return h.multiplyByScalar(this._normal,this._terrainHeight,t);let o=this._scene,r=this._positionProperty.getValue(e,wne);if(!l(r)||h.equals(r,h.ZERO)||!l(o.globe))return h.clone(h.ZERO,t);if(h.equalsEpsilon(this._position,r,X.EPSILON10))return h.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=h.clone(r,this._position),this._updateClamping();let s=o.ellipsoid.geodeticSurfaceNormal(r,this._normal);return h.multiplyByScalar(s,this._terrainHeight,t)};eC.prototype.isDestroyed=function(){return!1};eC.prototype.destroy=function(){return l(this._removeEventListener)&&this._removeEventListener(),l(this._removeModeListener)&&this._removeModeListener(),l(this._removeCallbackFunc)&&this._removeCallbackFunc(),me(this)};var Ex=eC;function oXe(e,t,n,i){if(ni.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o))return;l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference;if(l(r)){let s=new Cm(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new Ex(this._scene,s,r)}}var Lp=oXe;var Fne=h.ZERO,Ane=new h,rXe=new h,Mne=new Y;function sXe(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function ld(e,t){ni.call(this,{entity:e,scene:t,geometryOptions:new sXe(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}l(Object.create)&&(ld.prototype=Object.create(ni.prototype),ld.prototype.constructor=ld);Object.defineProperties(ld.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});ld.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new yn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Nn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof kt){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,Mne)),l(a)||(a=Y.WHITE),s.color=zt.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=zi.fromCartesian3(H.getValueOrDefault(this._terrainOffsetProperty,e,Fne,Ane))),new Tt({id:t,geometry:bl.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:s})};ld.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=H.getValueOrDefault(this._outlineColorProperty,e,Y.BLACK,Mne),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new yn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:zt.fromColor(i),distanceDisplayCondition:Nn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=zi.fromCartesian3(H.getValueOrDefault(this._terrainOffsetProperty,e,Fne,Ane))),new Tt({id:t,geometry:fm.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:r})};ld.prototype._computeCenter=function(e,t){return H.getValueOrUndefined(this._entity.position,e,t)};ld.prototype._isHidden=function(e,t){return!l(t.dimensions)||!l(e.position)||ni.prototype._isHidden.call(this,e,t)};ld.prototype._isDynamic=function(e,t){return!e.position.isConstant||!H.isConstant(e.orientation)||!t.dimensions.isConstant||!H.isConstant(t.outlineWidth)};ld.prototype._setStaticOptions=function(e,t){let n=H.getValueOrDefault(t.heightReference,Be.MINIMUM_VALUE,Je.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof kt?ln.VERTEX_FORMAT:so.MaterialSupport.TEXTURED.vertexFormat,i.dimensions=t.dimensions.getValue(Be.MINIMUM_VALUE,i.dimensions),i.offsetAttribute=n!==Je.NONE?cn.ALL:void 0};ld.prototype._onEntityPropertyChanged=Lp;ld.DynamicGeometryUpdater=tC;function tC(e,t,n){ti.call(this,e,t,n)}l(Object.create)&&(tC.prototype=Object.create(ti.prototype),tC.prototype.constructor=tC);tC.prototype._isHidden=function(e,t,n){let i=H.getValueOrUndefined(e.position,n,rXe),o=this._options.dimensions;return!l(i)||!l(o)||ti.prototype._isHidden.call(this,e,t,n)};tC.prototype._setOptions=function(e,t,n){let i=H.getValueOrDefault(t.heightReference,n,Je.NONE),o=this._options;o.dimensions=H.getValueOrUndefined(t.dimensions,n,o.dimensions),o.offsetAttribute=i!==Je.NONE?cn.ALL:void 0};var KE=ld;var lUn=S(T(),1);var q5n=S(T(),1);var k8t=S(T(),1),Une=S(Nne(),1);var aXe=0,RO={};function Jh(e,t){let n,i=e;l(RO[i])?n=RO[i]:(n=aXe++,RO[i]=n),t=y(t,!1),this._id=n,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(Jh.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen},set:function(e){this._showOnScreen=e}},element:{get:function(){if(!l(this._element)){let e=Une.default.sanitize(this._html),t=document.createElement("div");t.className="cesium-credit-wrapper",t._creditId=this._id,t.style.display="inline",t.innerHTML=e;let n=t.querySelectorAll("a");for(let i=0;i0||this._imageBasedLightingFactor.y>0}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},useDefaultSphericalHarmonics:{get:function(){return this._useDefaultSphericalHarmonics}},useSphericalHarmonicCoefficients:{get:function(){return l(this._sphericalHarmonicCoefficients)||this._useDefaultSphericalHarmonics}},specularEnvironmentMapAtlas:{get:function(){return this._specularEnvironmentMapAtlas}},useDefaultSpecularMaps:{get:function(){return this._useDefaultSpecularMaps}},useSpecularEnvironmentMaps:{get:function(){return l(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready||this._useDefaultSpecularMaps}}});function xWe(e,t){if(Lm.isSupported(t)){if(e._specularEnvironmentMapAtlas=e._specularEnvironmentMapAtlas&&e._specularEnvironmentMapAtlas.destroy(),l(e._specularEnvironmentMaps)){let n=new Lm(e._specularEnvironmentMaps);e._specularEnvironmentMapAtlas=n,e._removeErrorListener=n.errorEvent.addEventListener(i=>{console.error(`Error loading specularEnvironmentMaps: ${i}`)})}e._shouldRegenerateShaders=!0}}jE.prototype.update=function(e){if(e.frameNumber===this._previousFrameNumber)return;this._previousFrameNumber=e.frameNumber;let t=e.context;e.brdfLutGenerator.update(e),this._shouldRegenerateShaders=!1;let n=this._imageBasedLightingFactor,i=this._previousImageBasedLightingFactor;D.equals(n,i)||(this._shouldRegenerateShaders=n.x>0&&i.x===0||n.x===0&&i.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||n.y>0&&i.y===0||n.y===0&&i.y>0,this._previousImageBasedLightingFactor=D.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor)),this._luminanceAtZenith!==this._previousLuminanceAtZenith&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||l(this._luminanceAtZenith)!==l(this._previousLuminanceAtZenith),this._previousLuminanceAtZenith=this._luminanceAtZenith),this._previousSphericalHarmonicCoefficients!==this._sphericalHarmonicCoefficients&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||l(this._previousSphericalHarmonicCoefficients)!==l(this._sphericalHarmonicCoefficients),this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients),this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._previousSpecularEnvironmentMapLoaded!==this._specularEnvironmentMapLoaded,this._previousSpecularEnvironmentMapLoaded=this._specularEnvironmentMapLoaded,this._specularEnvironmentMapAtlasDirty&&(xWe(this,t),this._specularEnvironmentMapAtlasDirty=!1),l(this._specularEnvironmentMapAtlas)&&(this._specularEnvironmentMapAtlas.update(e),this._specularEnvironmentMapAtlas.ready&&(this._specularEnvironmentMapLoaded=!0));let o=!l(this._specularEnvironmentMapAtlas)&&l(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,r=!l(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,s=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,a=!l(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||o||r||s||a,this._useDefaultSpecularMaps=!l(this._specularEnvironmentMapAtlas)&&l(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)};jE.prototype.isDestroyed=function(){return!1};jE.prototype.destroy=function(){return this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),this._removeErrorListener=this._removeErrorListener&&this._removeErrorListener(),me(this)};var Wx=jE;var z7t=T(S(),1),EO=T(id(),1);var N7t=T(S(),1);var GO,_We="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3ODZkMDQzOS03ZGJjLTQzZWUtYjlmYy04ZmM5Y2UwNzNhMmYiLCJpZCI6MjU5LCJpYXQiOjE2MzgyMDYwMDB9.cK1hsaFBgz0l2dG9Ry5vBFHWp-HF2lwjLC0tcK8Z8tY",TWe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI0YjhlOGM0Yy0xNzcwLTQwNWEtODk4Yy0xMGJkODg4MTA5ZGEiLCJpZCI6MjU5LCJpYXQiOjE3MTc0MzM4NjB9.VwBpSnRTNdg_G6uvU-JNsRNcSOCDMKW_j3Nl5E7wfwg",XN={};XN.defaultAccessToken=_We;XN.defaultServer=new Ee({url:"https://api.cesium.com/"});XN.getDefaultTokenCredit=function(e){if(e===TWe){if(!l(GO)){let t=` This application is using Cesium's default ion access token. Please assign Cesium.Ion.defaultAccessToken with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at https://cesium.com.`;GO=new Vt(t,!0)}return GO}};var Rm=XN;function kc(e,t){let n,i=e.externalType,o=l(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:SWe};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new ue("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");Ee.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new EO.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o}l(Object.create)&&(kc.prototype=Object.create(Ee.prototype),kc.prototype.constructor=kc);kc.fromAssetId=function(e,t){let n=kc._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new kc(i,n)})};Object.defineProperties(kc.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=kc.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});kc.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(Vt.getIonCredit),i=Rm.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(Vt.clone(i)),n};kc.prototype.clone=function(e){let t=y(this._ionRoot,this);return l(e)||(e=new kc(t._ionEndpoint,t._ionEndpointResource)),e=Ee.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};kc.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},l(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return Ee.prototype.fetchImage.call(this,e)};kc.prototype._makeRequest=function(e){return this._isExternal||new EO.default(this.url).authority()!==this._ionEndpointDomain?Ee.prototype._makeRequest.call(this,e):(l(e.headers)||(e.headers={}),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,e.headers["X-Cesium-Client"]="CesiumJS",typeof CESIUM_VERSION<"u"&&(e.headers["X-Cesium-Client-Version"]=CESIUM_VERSION),Ee.prototype._makeRequest.call(this,e))};kc._createEndpointResource=function(e,t){t=y(t,y.EMPTY_OBJECT);let n=y(t.server,Rm.defaultServer),i=y(t.accessToken,Rm.defaultAccessToken);n=Ee.createIfNeeded(n);let o={url:`v1/assets/${e}/endpoint`};return l(i)&&(o.queryParameters={access_token:i}),n.getDerivedResource(o)};function SWe(e,t){let n=y(e._ionRoot,e),i=n._ionEndpointResource,o=typeof Image<"u";return!l(t)||t.statusCode!==401&&!(o&&t.target instanceof Image)?Promise.resolve(!1):(l(n._pendingPromise)||(n._pendingPromise=i.fetchJson().then(function(r){return n._ionEndpoint=r,r}).finally(function(r){return n._pendingPromise=void 0,r})),n._pendingPromise.then(function(r){return e._ionEndpoint=r,!0}))}var ud=kc;var Q7t=T(S(),1);function jh(e){e=y(e,0),this._array=new Array(e),this._length=e}Object.defineProperties(jh.prototype,{length:{get:function(){return this._length},set:function(e){let t=this._array,n=this._length;if(et.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}});jh.prototype.get=function(e){return this._array[e]};jh.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t};jh.prototype.peek=function(){return this._array[this._length-1]};jh.prototype.push=function(e){let t=this.length++;this._array[t]=e};jh.prototype.pop=function(){if(this._length===0)return;let e=this._array[this._length-1];return--this.length,e};jh.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)};jh.prototype.resize=function(e){this.length=e};jh.prototype.trim=function(e){e=y(e,this._length),this._array.length=e};var Uc=jh;var e6t=T(S(),1);function IN(e){e=y(e,y.EMPTY_OBJECT),this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}IN.ALL=Object.freeze(new IN({color:new Y(0,0,0,0),depth:1,stencil:0}));IN.prototype.execute=function(e,t){e.clear(this,t)};var ii=IN;var o6t=T(S(),1);var Gp={X:0,Y:1,Z:2};Gp.Y_UP_TO_Z_UP=M.fromRotationTranslation($.fromArray([1,0,0,0,0,1,0,-1,0]));Gp.Z_UP_TO_Y_UP=M.fromRotationTranslation($.fromArray([1,0,0,0,0,-1,0,1,0]));Gp.X_UP_TO_Z_UP=M.fromRotationTranslation($.fromArray([0,0,1,0,1,0,-1,0,0]));Gp.Z_UP_TO_X_UP=M.fromRotationTranslation($.fromArray([0,0,-1,0,1,0,1,0,0]));Gp.X_UP_TO_Y_UP=M.fromRotationTranslation($.fromArray([0,1,0,-1,0,0,0,0,1]));Gp.Y_UP_TO_X_UP=M.fromRotationTranslation($.fromArray([0,-1,0,1,0,0,0,0,1]));Gp.fromName=function(e){return Gp[e]};var Go=Object.freeze(Gp);var gMn=T(S(),1);var m6t=T(S(),1);function uu(e){this.planes=y(e,[])}var qE=[new h,new h,new h];h.clone(h.UNIT_X,qE[0]);h.clone(h.UNIT_Y,qE[1]);h.clone(h.UNIT_Z,qE[2]);var Fb=new h,CWe=new h,One=new dn(new h(1,0,0),0);uu.fromBoundingSphere=function(e,t){l(t)||(t=new uu);let n=qE.length,i=t.planes;i.length=2*n;let o=e.center,r=e.radius,s=0;for(let a=0;a>10)+55296,(r&1023)+56320))}return t};function $E(e,t,n){return t<=e&&e<=n}function ZWe(e){let t=0,n=0,i=0,o=128,r=191,s=[],a=e.length;for(let c=0;c0){let o=Math.min(t,Mt.maximumTextureSize),r=Math.ceil(t/Mt.maximumTextureSize),s=1/o,a=s*.5,c=1/r,d=c*.5;n=new D(o,r),i=new se(s,a,c,d)}this._translucentFeaturesLength=0,this._featuresLength=t,this._textureDimensions=n,this._textureStep=i,this._owner=e.owner,this._statistics=e.statistics,this._colorChangedCallback=e.colorChangedCallback}Object.defineProperties(tc.prototype,{translucentFeaturesLength:{get:function(){return this._translucentFeaturesLength}},byteLength:{get:function(){let e=0;return l(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),l(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}},textureDimensions:{get:function(){return this._textureDimensions}},textureStep:{get:function(){return this._textureStep}},batchTexture:{get:function(){return this._batchTexture}},defaultTexture:{get:function(){return this._defaultTexture}},pickTexture:{get:function(){return this._pickTexture}}});tc.DEFAULT_COLOR_VALUE=Y.WHITE;tc.DEFAULT_SHOW_VALUE=!0;function Kne(e){let t=e._textureDimensions;return t.x*t.y*4}function Jne(e){if(!l(e._batchValues)){let t=Kne(e),n=new Uint8Array(t).fill(255);e._batchValues=n}return e._batchValues}function Qne(e){if(!l(e._showAlphaProperties)){let t=2*e._featuresLength,n=new Uint8Array(t).fill(255);e._showAlphaProperties=n}return e._showAlphaProperties}tc.prototype.setShow=function(e,t){if(t&&!l(this._showAlphaProperties))return;let n=Qne(this),i=e*2,o=t?255:0;if(n[i]!==o){n[i]=o;let r=Jne(this),s=e*4+3;r[s]=t?n[i+1]:0,this._batchValuesDirty=!0}};tc.prototype.setAllShow=function(e){let t=this._featuresLength;for(let n=0;n0){let i=e._pickIds,o=Kne(e),r=new Uint8Array(o),s=e._owner,a=e._statistics;for(let c=0;c0;){if(t=u.pop(),c[t]===d)continue;c[t]=d;let m=n(e,t);if(l(m))return m;let p=o[t],g=s[t];for(let f=0;f0||this._imageBasedLightingFactor.y>0}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},useDefaultSphericalHarmonics:{get:function(){return this._useDefaultSphericalHarmonics}},useSphericalHarmonicCoefficients:{get:function(){return l(this._sphericalHarmonicCoefficients)||this._useDefaultSphericalHarmonics}},specularEnvironmentMapAtlas:{get:function(){return this._specularEnvironmentMapAtlas}},useDefaultSpecularMaps:{get:function(){return this._useDefaultSpecularMaps}},useSpecularEnvironmentMaps:{get:function(){return l(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready||this._useDefaultSpecularMaps}}});function gXe(e,t){if(Vm.isSupported(t)){if(e._specularEnvironmentMapAtlas=e._specularEnvironmentMapAtlas&&e._specularEnvironmentMapAtlas.destroy(),l(e._specularEnvironmentMaps)){let n=new Vm(e._specularEnvironmentMaps);e._specularEnvironmentMapAtlas=n,e._removeErrorListener=n.errorEvent.addEventListener(i=>{console.error(`Error loading specularEnvironmentMaps: ${i}`)})}e._shouldRegenerateShaders=!0}}jE.prototype.update=function(e){if(e.frameNumber===this._previousFrameNumber)return;this._previousFrameNumber=e.frameNumber;let t=e.context;e.brdfLutGenerator.update(e),this._shouldRegenerateShaders=!1;let n=this._imageBasedLightingFactor,i=this._previousImageBasedLightingFactor;D.equals(n,i)||(this._shouldRegenerateShaders=n.x>0&&i.x===0||n.x===0&&i.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||n.y>0&&i.y===0||n.y===0&&i.y>0,this._previousImageBasedLightingFactor=D.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor)),this._luminanceAtZenith!==this._previousLuminanceAtZenith&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||l(this._luminanceAtZenith)!==l(this._previousLuminanceAtZenith),this._previousLuminanceAtZenith=this._luminanceAtZenith),this._previousSphericalHarmonicCoefficients!==this._sphericalHarmonicCoefficients&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||l(this._previousSphericalHarmonicCoefficients)!==l(this._sphericalHarmonicCoefficients),this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients),this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._previousSpecularEnvironmentMapLoaded!==this._specularEnvironmentMapLoaded,this._previousSpecularEnvironmentMapLoaded=this._specularEnvironmentMapLoaded,this._specularEnvironmentMapAtlasDirty&&(gXe(this,t),this._specularEnvironmentMapAtlasDirty=!1),l(this._specularEnvironmentMapAtlas)&&(this._specularEnvironmentMapAtlas.update(e),this._specularEnvironmentMapAtlas.ready&&(this._specularEnvironmentMapLoaded=!0));let o=!l(this._specularEnvironmentMapAtlas)&&l(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,r=!l(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,s=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,a=!l(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||o||r||s||a,this._useDefaultSpecularMaps=!l(this._specularEnvironmentMapAtlas)&&l(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)};jE.prototype.isDestroyed=function(){return!1};jE.prototype.destroy=function(){return this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),this._removeErrorListener=this._removeErrorListener&&this._removeErrorListener(),me(this)};var Ix=jE;var D7t=S(T(),1),WO=S(nd(),1);var v7t=S(T(),1);var EO,Kne="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyYTI3ZDMxOS1mODc4LTQ5NzktOGUzNy04OTA0ZGI5MmM1NGIiLCJpZCI6MjU5LCJpYXQiOjE3MTk4NDM5OTN9.FDHD-mZOIAzA9J_kzOz6AkKK2PHzl2yoMbFqbpsfH6Q",IN={};IN.defaultAccessToken=Kne;IN.defaultServer=new Ee({url:"https://api.cesium.com/"});IN.getDefaultTokenCredit=function(e){if(e===Kne){if(!l(EO)){let t=` This application is using Cesium's default ion access token. Please assign Cesium.Ion.defaultAccessToken with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at https://cesium.com.`;EO=new Vt(t,!0)}return EO}};var Zm=IN;function Nc(e,t){let n,i=e.externalType,o=l(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:yXe};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new ue("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");Ee.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new WO.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o}l(Object.create)&&(Nc.prototype=Object.create(Ee.prototype),Nc.prototype.constructor=Nc);Nc.fromAssetId=function(e,t){let n=Nc._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new Nc(i,n)})};Object.defineProperties(Nc.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=Nc.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});Nc.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(Vt.getIonCredit),i=Zm.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(Vt.clone(i)),n};Nc.prototype.clone=function(e){let t=y(this._ionRoot,this);return l(e)||(e=new Nc(t._ionEndpoint,t._ionEndpointResource)),e=Ee.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};Nc.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},l(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return Ee.prototype.fetchImage.call(this,e)};Nc.prototype._makeRequest=function(e){return this._isExternal||new WO.default(this.url).authority()!==this._ionEndpointDomain?Ee.prototype._makeRequest.call(this,e):(l(e.headers)||(e.headers={}),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,e.headers["X-Cesium-Client"]="CesiumJS",typeof CESIUM_VERSION<"u"&&(e.headers["X-Cesium-Client-Version"]=CESIUM_VERSION),Ee.prototype._makeRequest.call(this,e))};Nc._createEndpointResource=function(e,t){t=y(t,y.EMPTY_OBJECT);let n=y(t.server,Zm.defaultServer),i=y(t.accessToken,Zm.defaultAccessToken);n=Ee.createIfNeeded(n);let o={url:`v1/assets/${e}/endpoint`};return l(i)&&(o.queryParameters={access_token:i}),n.getDerivedResource(o)};function yXe(e,t){let n=y(e._ionRoot,e),i=n._ionEndpointResource,o=typeof Image<"u";return!l(t)||t.statusCode!==401&&!(o&&t.target instanceof Image)?Promise.resolve(!1):(l(n._pendingPromise)||(n._pendingPromise=i.fetchJson().then(function(r){return n._ionEndpoint=r,r}).finally(function(r){return n._pendingPromise=void 0,r})),n._pendingPromise.then(function(r){return e._ionEndpoint=r,!0}))}var dd=Nc;var O7t=S(T(),1);function Qh(e){e=y(e,0),this._array=new Array(e),this._length=e}Object.defineProperties(Qh.prototype,{length:{get:function(){return this._length},set:function(e){let t=this._array,n=this._length;if(et.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}});Qh.prototype.get=function(e){return this._array[e]};Qh.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t};Qh.prototype.peek=function(){return this._array[this._length-1]};Qh.prototype.push=function(e){let t=this.length++;this._array[t]=e};Qh.prototype.pop=function(){if(this._length===0)return;let e=this._array[this._length-1];return--this.length,e};Qh.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)};Qh.prototype.resize=function(e){this.length=e};Qh.prototype.trim=function(e){e=y(e,this._length),this._array.length=e};var Uc=Qh;var J7t=S(T(),1);function XN(e){e=y(e,y.EMPTY_OBJECT),this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}XN.ALL=Object.freeze(new XN({color:new Y(0,0,0,0),depth:1,stencil:0}));XN.prototype.execute=function(e,t){e.clear(this,t)};var ii=XN;var $7t=S(T(),1);var Rp={X:0,Y:1,Z:2};Rp.Y_UP_TO_Z_UP=A.fromRotationTranslation($.fromArray([1,0,0,0,0,1,0,-1,0]));Rp.Z_UP_TO_Y_UP=A.fromRotationTranslation($.fromArray([1,0,0,0,0,-1,0,1,0]));Rp.X_UP_TO_Z_UP=A.fromRotationTranslation($.fromArray([0,0,1,0,1,0,-1,0,0]));Rp.Z_UP_TO_X_UP=A.fromRotationTranslation($.fromArray([0,0,-1,0,1,0,1,0,0]));Rp.X_UP_TO_Y_UP=A.fromRotationTranslation($.fromArray([0,1,0,-1,0,0,0,0,1]));Rp.Y_UP_TO_X_UP=A.fromRotationTranslation($.fromArray([0,-1,0,1,0,0,0,0,1]));Rp.fromName=function(e){return Rp[e]};var Go=Object.freeze(Rp);var fMn=S(T(),1);var a6t=S(T(),1);function du(e){this.planes=y(e,[])}var qE=[new h,new h,new h];h.clone(h.UNIT_X,qE[0]);h.clone(h.UNIT_Y,qE[1]);h.clone(h.UNIT_Z,qE[2]);var w0=new h,xXe=new h,Hne=new dn(new h(1,0,0),0);du.fromBoundingSphere=function(e,t){l(t)||(t=new du);let n=qE.length,i=t.planes;i.length=2*n;let o=e.center,r=e.radius,s=0;for(let a=0;a>10)+55296,(r&1023)+56320))}return t};function $E(e,t,n){return t<=e&&e<=n}function CXe(e){let t=0,n=0,i=0,o=128,r=191,s=[],a=e.length;for(let c=0;c0){let o=Math.min(t,Mt.maximumTextureSize),r=Math.ceil(t/Mt.maximumTextureSize),s=1/o,a=s*.5,c=1/r,d=c*.5;n=new D(o,r),i=new se(s,a,c,d)}this._translucentFeaturesLength=0,this._featuresLength=t,this._textureDimensions=n,this._textureStep=i,this._owner=e.owner,this._statistics=e.statistics,this._colorChangedCallback=e.colorChangedCallback}Object.defineProperties(nc.prototype,{translucentFeaturesLength:{get:function(){return this._translucentFeaturesLength}},byteLength:{get:function(){let e=0;return l(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),l(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}},textureDimensions:{get:function(){return this._textureDimensions}},textureStep:{get:function(){return this._textureStep}},batchTexture:{get:function(){return this._batchTexture}},defaultTexture:{get:function(){return this._defaultTexture}},pickTexture:{get:function(){return this._pickTexture}}});nc.DEFAULT_COLOR_VALUE=Y.WHITE;nc.DEFAULT_SHOW_VALUE=!0;function jne(e){let t=e._textureDimensions;return t.x*t.y*4}function qne(e){if(!l(e._batchValues)){let t=jne(e),n=new Uint8Array(t).fill(255);e._batchValues=n}return e._batchValues}function $ne(e){if(!l(e._showAlphaProperties)){let t=2*e._featuresLength,n=new Uint8Array(t).fill(255);e._showAlphaProperties=n}return e._showAlphaProperties}nc.prototype.setShow=function(e,t){if(t&&!l(this._showAlphaProperties))return;let n=$ne(this),i=e*2,o=t?255:0;if(n[i]!==o){n[i]=o;let r=qne(this),s=e*4+3;r[s]=t?n[i+1]:0,this._batchValuesDirty=!0}};nc.prototype.setAllShow=function(e){let t=this._featuresLength;for(let n=0;n0){let i=e._pickIds,o=jne(e),r=new Uint8Array(o),s=e._owner,a=e._statistics;for(let c=0;c0;){if(t=u.pop(),c[t]===d)continue;c[t]=d;let m=n(e,t);if(l(m))return m;let p=o[t],g=s[t];for(let f=0;f0?(s="",e&&(s+=`uniform bool tile_translucentCommand; +`}co.prototype.getVertexShaderCallback=function(e,t,n){if(this.featuresLength===0)return;let i=this;return function(o){let r=iie(o,n,!1),s;return Mt.maximumVertexTextureImageUnits>0?(s="",e&&(s+=`uniform bool tile_translucentCommand; `),s+=`uniform sampler2D tile_batchTexture; out vec4 tile_featureColor; out vec2 tile_featureSt; @@ -6047,7 +6049,7 @@ void main() tile_color(vec4(1.0)); tile_featureSt = computeSt(${t}); }`,`${r} -${$We(i)}${s}`}};function qne(e,t){return e=Ye.replaceMain(e,"tile_main"),t?`${e}uniform float tile_colorBlend; +${JXe(i)}${s}`}};function tie(e,t){return e=Ye.replaceMain(e,"tile_main"),t?`${e}uniform float tile_colorBlend; void tile_color(vec4 tile_featureColor) { tile_main(); @@ -6060,7 +6062,7 @@ void tile_color(vec4 tile_featureColor) { tile_main(); } -`}function e2e(e,t){let n=`texture(${t}`,i=0,o=e.indexOf(n,i),r;for(;o>-1;){let s=0;for(let d=o;d-1;){let s=0;for(let d=o;d0?(i+=`uniform sampler2D tile_pickTexture; +`,e}co.prototype.getFragmentShaderCallback=function(e,t,n){if(this.featuresLength!==0)return function(i){return i=iie(i,t,!0),Mt.maximumVertexTextureImageUnits>0?(i+=`uniform sampler2D tile_pickTexture; in vec2 tile_featureSt; in vec4 tile_featureColor; void main() @@ -6142,7 +6144,7 @@ void main() out_FragColor = featureProperties; out_FragColor.rgb *= out_FragColor.a; } -`,e}};function t2e(e){let t=e._content.tileset,n=t.colorBlendMode,i=t.colorBlendAmount;if(n===Rl.HIGHLIGHT)return 0;if(n===Rl.REPLACE)return 1;if(n===Rl.MIX)return W.clamp(i,W.EPSILON4,1)}co.prototype.getUniformMapCallback=function(){if(this.featuresLength===0)return;let e=this;return function(t){return xt(t,{tile_batchTexture:function(){return y(e._batchTexture.batchTexture,e._batchTexture.defaultTexture)},tile_textureDimensions:function(){return e._batchTexture.textureDimensions},tile_textureStep:function(){return e._batchTexture.textureStep},tile_colorBlend:function(){return t2e(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}})}};co.prototype.getPickId=function(){return"texture(tile_pickTexture, tile_featureSt)"};var Nb={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};co.prototype.addDerivedCommands=function(e,t){let n=e.commandList,i=n.length,o=this._content._tile,r=o._finalResolution,s=o.tileset,a=s.isSkippingLevelOfDetail&&s.hasMixedContent&&e.context.stencilBuffer,c=n2e(this);for(let d=t;d>>Nt.SKIP_LOD_BIT_SHIFT}function d2e(e){let t=Oe(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=un.ALPHA_BLEND,t.stencilTest=Nt.setCesium3DTileBit(),t.stencilMask=Nt.CESIUM_3D_TILE_MASK,De.fromCache(t)}function u2e(e){let t=Oe(e,!0);return t.stencilTest=Nt.setCesium3DTileBit(),t.stencilMask=Nt.CESIUM_3D_TILE_MASK,De.fromCache(t)}co.prototype.update=function(e,t){this._batchTexture.update(e,t)};co.prototype.isDestroyed=function(){return!1};co.prototype.destroy=function(){return this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),me(this)};var Xp=co;var hen=T(S(),1);var i$t=T(S(),1);function m2e(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var $h=m2e;var een=T(S(),1);var r$t=T(S(),1),iC=`in vec3 position; +`,e}};function jXe(e){let t=e._content.tileset,n=t.colorBlendMode,i=t.colorBlendAmount;if(n===Zl.HIGHLIGHT)return 0;if(n===Zl.REPLACE)return 1;if(n===Zl.MIX)return X.clamp(i,X.EPSILON4,1)}co.prototype.getUniformMapCallback=function(){if(this.featuresLength===0)return;let e=this;return function(t){return xt(t,{tile_batchTexture:function(){return y(e._batchTexture.batchTexture,e._batchTexture.defaultTexture)},tile_textureDimensions:function(){return e._batchTexture.textureDimensions},tile_textureStep:function(){return e._batchTexture.textureStep},tile_colorBlend:function(){return jXe(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}})}};co.prototype.getPickId=function(){return"texture(tile_pickTexture, tile_featureSt)"};var M0={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};co.prototype.addDerivedCommands=function(e,t){let n=e.commandList,i=n.length,o=this._content._tile,r=o._finalResolution,s=o.tileset,a=s.isSkippingLevelOfDetail&&s.hasMixedContent&&e.context.stencilBuffer,c=qXe(this);for(let d=t;d>>Nt.SKIP_LOD_BIT_SHIFT}function s2e(e){let t=Oe(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=un.ALPHA_BLEND,t.stencilTest=Nt.setCesium3DTileBit(),t.stencilMask=Nt.CESIUM_3D_TILE_MASK,De.fromCache(t)}function a2e(e){let t=Oe(e,!0);return t.stencilTest=Nt.setCesium3DTileBit(),t.stencilMask=Nt.CESIUM_3D_TILE_MASK,De.fromCache(t)}co.prototype.update=function(e,t){this._batchTexture.update(e,t)};co.prototype.isDestroyed=function(){return!1};co.prototype.destroy=function(){return this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),me(this)};var Ep=co;var cen=S(T(),1);var qqt=S(T(),1);function c2e(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var qh=c2e;var J$t=S(T(),1);var e$t=S(T(),1),nC=`in vec3 position; in float a_batchId; uniform mat4 u_modifiedModelViewProjection; @@ -6151,31 +6153,31 @@ void main() { gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0)); } -`;var l$t=T(S(),1);function hu(e,t){this._content=e,this._batchId=t,this._color=void 0}Object.defineProperties(hu.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return l(this._color)||(this._color=new Y),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},polylinePositions:{get:function(){if(l(this._content.getPolylinePositions))return this._content.getPolylinePositions(this._batchId)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},featureId:{get:function(){return this._batchId}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}});hu.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};hu.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};hu.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};hu.getPropertyInherited=function(e,t,n){let i=e.batchTable;if(l(i)){if(i.hasPropertyBySemantic(t,n))return i.getPropertyBySemantic(t,n);if(i.hasProperty(t,n))return i.getProperty(t,n)}let o=e.metadata;if(l(o)){if(o.hasPropertyBySemantic(n))return o.getPropertyBySemantic(n);if(o.hasProperty(n))return o.getProperty(n)}let r=e.tile,s=r.metadata;if(l(s)){if(s.hasPropertyBySemantic(n))return s.getPropertyBySemantic(n);if(s.hasProperty(n))return s.getProperty(n)}let a;if(l(r.implicitSubtree)&&(a=r.implicitSubtree.metadata),l(a)){if(a.hasPropertyBySemantic(n))return a.getPropertyBySemantic(n);if(a.hasProperty(n))return a.getProperty(n)}let c=l(e.group)?e.group.metadata:void 0;if(l(c)){if(c.hasPropertyBySemantic(n))return c.getPropertyBySemantic(n);if(c.hasProperty(n))return c.getProperty(n)}let d=e.tileset.metadata;if(l(d)){if(d.hasPropertyBySemantic(n))return d.getPropertyBySemantic(n);if(d.hasProperty(n))return d.getProperty(n)}};hu.prototype.getPropertyInherited=function(e){return hu.getPropertyInherited(this._content,this._batchId,e)};hu.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};hu.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};hu.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};hu.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var Ws=hu;var V$t=T(S(),1);var u$t=T(S(),1),PO=class{add(t,n,i){if(typeof arguments[0]!="string")for(let o in arguments[0])this.add(o,arguments[0][o],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(o){this[o]=this[o]||[],n&&this[o][i?"unshift":"push"](n)},this)}run(t,n){this[t]=this[t]||[],this[t].forEach(function(i){i.call(n&&n.context?n.context:n,n)})}},vO=class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(n=>{if(typeof n!="object"||!n.name||!n.init)throw new Error("Invalid JSEP plugin format");this.registered[n.name]||(n.init(this.jsep),this.registered[n.name]=n)})}},Zl=class e{static get version(){return"1.3.8"}static toString(){return"JavaScript Expression Parser (JSEP) v"+e.version}static addUnaryOp(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}static addBinaryOp(t,n,i){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,i?e.right_associative.add(t):e.right_associative.delete(t),e}static addIdentifierChar(t){return e.additional_identifier_chars.add(t),e}static addLiteral(t,n){return e.literals[t]=n,e}static removeUnaryOp(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}static removeAllUnaryOps(){return e.unary_ops={},e.max_unop_len=0,e}static removeIdentifierChar(t){return e.additional_identifier_chars.delete(t),e}static removeBinaryOp(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}static removeAllBinaryOps(){return e.binary_ops={},e.max_binop_len=0,e}static removeLiteral(t){return delete e.literals[t],e}static removeAllLiterals(){return e.literals={},e}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new e(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(n=>n.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return e.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}throwError(t){let n=new Error(t+" at character "+this.index);throw n.index=this.index,n.description=t,n}runHook(t,n){if(e.hooks[t]){let i={context:this,node:n};return e.hooks.run(t,i),i.node}return n}searchHook(t){if(e.hooks[t]){let n={context:this};return e.hooks[t].find(function(i){return i.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let t=this.code;for(;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let t=this.gobbleExpressions(),n=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}gobbleExpressions(t){let n=[],i,o;for(;this.index0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.lengthr.right_a&&m.right_a?i>m.prec:i<=m.prec;for(;o.length>2&&u(o[o.length-2]);)a=o.pop(),n=o.pop().value,s=o.pop(),t={type:e.BINARY_EXP,operator:n,left:s,right:a},o.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+d),o.push(r,t)}for(c=o.length-1,t=o[c];c>1;)t={type:e.BINARY_EXP,operator:o[c-1].value,left:o[c-2],right:t},c-=2;return t}gobbleToken(){let t,n,i,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=this.gobbleArray();else{for(n=this.expr.substr(this.index,e.max_unop_len),i=n.length;i>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(r===e.COMMA_CODE){if(this.index++,o++,o!==n.length){if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(let s=n.length;s":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});Zl.max_unop_len=Zl.getMaxKeyLen(Zl.unary_ops);Zl.max_binop_len=Zl.getMaxKeyLen(Zl.binary_ops);var kb=e=>new Zl(e).parse(),f2e=Object.getOwnPropertyNames(Zl);f2e.forEach(e=>{kb[e]===void 0&&e!=="prototype"&&(kb[e]=Zl[e])});kb.Jsep=Zl;var p2e="ConditionalExpression",b2e={name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;let i=n.node,o=this.gobbleExpression();if(o||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let r=this.gobbleExpression();if(r||this.throwError("Expected expression"),n.node={type:p2e,test:i,consequent:o,alternate:r},i.operator&&e.binary_ops[i.operator]<=.9){let s=i;for(;s.right.operator&&e.binary_ops[s.right.operator]<=.9;)s=s.right;n.node.test=s.right,s.right=n.node,n.node=i}}else this.throwError("Expected :")}})}};kb.plugins.register(b2e);var h$t=T(S(),1),g2e={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},gt=Object.freeze(g2e);function Gm(e,t){this._expression=e,e=X2e(e,t),e=W2e(I2e(e)),kb.addBinaryOp("=~",0),kb.addBinaryOp("!~",0);let n;try{n=kb(e)}catch(i){throw new ue(i)}this._runtimeAst=yi(this,n)}Object.defineProperties(Gm.prototype,{expression:{get:function(){return this._expression}}});var vn={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new D],cartesian3Array:[new h],cartesian4Array:[new se],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);let e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new D),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new h),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new se),this.cartesian4Array[this.cartesian4Index++]}};Gm.prototype.evaluate=function(e,t){vn.reset();let n=this._runtimeAst.evaluate(e);return t instanceof Y&&n instanceof se?Y.fromCartesian4(n,t):n instanceof D||n instanceof h||n instanceof se?n.clone(t):n};Gm.prototype.evaluateColor=function(e,t){vn.reset();let n=this._runtimeAst.evaluate(e);return Y.fromCartesian4(n,t)};Gm.prototype.getShaderFunction=function(e,t,n,i){let o=this.getShaderExpression(t,n);return o=`${i} ${e} +`;var o$t=S(T(),1);function mu(e,t){this._content=e,this._batchId=t,this._color=void 0}Object.defineProperties(mu.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return l(this._color)||(this._color=new Y),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},polylinePositions:{get:function(){if(l(this._content.getPolylinePositions))return this._content.getPolylinePositions(this._batchId)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},featureId:{get:function(){return this._batchId}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}});mu.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};mu.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};mu.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};mu.getPropertyInherited=function(e,t,n){let i=e.batchTable;if(l(i)){if(i.hasPropertyBySemantic(t,n))return i.getPropertyBySemantic(t,n);if(i.hasProperty(t,n))return i.getProperty(t,n)}let o=e.metadata;if(l(o)){if(o.hasPropertyBySemantic(n))return o.getPropertyBySemantic(n);if(o.hasProperty(n))return o.getProperty(n)}let r=e.tile,s=r.metadata;if(l(s)){if(s.hasPropertyBySemantic(n))return s.getPropertyBySemantic(n);if(s.hasProperty(n))return s.getProperty(n)}let a;if(l(r.implicitSubtree)&&(a=r.implicitSubtree.metadata),l(a)){if(a.hasPropertyBySemantic(n))return a.getPropertyBySemantic(n);if(a.hasProperty(n))return a.getProperty(n)}let c=l(e.group)?e.group.metadata:void 0;if(l(c)){if(c.hasPropertyBySemantic(n))return c.getPropertyBySemantic(n);if(c.hasProperty(n))return c.getProperty(n)}let d=e.tileset.metadata;if(l(d)){if(d.hasPropertyBySemantic(n))return d.getPropertyBySemantic(n);if(d.hasProperty(n))return d.getProperty(n)}};mu.prototype.getPropertyInherited=function(e){return mu.getPropertyInherited(this._content,this._batchId,e)};mu.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};mu.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};mu.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};mu.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var Ps=mu;var x$t=S(T(),1);var s$t=S(T(),1),vO=class{add(t,n,i){if(typeof arguments[0]!="string")for(let o in arguments[0])this.add(o,arguments[0][o],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(o){this[o]=this[o]||[],n&&this[o][i?"unshift":"push"](n)},this)}run(t,n){this[t]=this[t]||[],this[t].forEach(function(i){i.call(n&&n.context?n.context:n,n)})}},wO=class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(n=>{if(typeof n!="object"||!n.name||!n.init)throw new Error("Invalid JSEP plugin format");this.registered[n.name]||(n.init(this.jsep),this.registered[n.name]=n)})}},Ll=class e{static get version(){return"1.3.8"}static toString(){return"JavaScript Expression Parser (JSEP) v"+e.version}static addUnaryOp(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}static addBinaryOp(t,n,i){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,i?e.right_associative.add(t):e.right_associative.delete(t),e}static addIdentifierChar(t){return e.additional_identifier_chars.add(t),e}static addLiteral(t,n){return e.literals[t]=n,e}static removeUnaryOp(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}static removeAllUnaryOps(){return e.unary_ops={},e.max_unop_len=0,e}static removeIdentifierChar(t){return e.additional_identifier_chars.delete(t),e}static removeBinaryOp(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}static removeAllBinaryOps(){return e.binary_ops={},e.max_binop_len=0,e}static removeLiteral(t){return delete e.literals[t],e}static removeAllLiterals(){return e.literals={},e}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new e(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(n=>n.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return e.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}throwError(t){let n=new Error(t+" at character "+this.index);throw n.index=this.index,n.description=t,n}runHook(t,n){if(e.hooks[t]){let i={context:this,node:n};return e.hooks.run(t,i),i.node}return n}searchHook(t){if(e.hooks[t]){let n={context:this};return e.hooks[t].find(function(i){return i.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let t=this.code;for(;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let t=this.gobbleExpressions(),n=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}gobbleExpressions(t){let n=[],i,o;for(;this.index0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.lengthr.right_a&&m.right_a?i>m.prec:i<=m.prec;for(;o.length>2&&u(o[o.length-2]);)a=o.pop(),n=o.pop().value,s=o.pop(),t={type:e.BINARY_EXP,operator:n,left:s,right:a},o.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+d),o.push(r,t)}for(c=o.length-1,t=o[c];c>1;)t={type:e.BINARY_EXP,operator:o[c-1].value,left:o[c-2],right:t},c-=2;return t}gobbleToken(){let t,n,i,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=this.gobbleArray();else{for(n=this.expr.substr(this.index,e.max_unop_len),i=n.length;i>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(r===e.COMMA_CODE){if(this.index++,o++,o!==n.length){if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(let s=n.length;s":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});Ll.max_unop_len=Ll.getMaxKeyLen(Ll.unary_ops);Ll.max_binop_len=Ll.getMaxKeyLen(Ll.binary_ops);var N0=e=>new Ll(e).parse(),d2e=Object.getOwnPropertyNames(Ll);d2e.forEach(e=>{N0[e]===void 0&&e!=="prototype"&&(N0[e]=Ll[e])});N0.Jsep=Ll;var u2e="ConditionalExpression",m2e={name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;let i=n.node,o=this.gobbleExpression();if(o||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let r=this.gobbleExpression();if(r||this.throwError("Expected expression"),n.node={type:u2e,test:i,consequent:o,alternate:r},i.operator&&e.binary_ops[i.operator]<=.9){let s=i;for(;s.right.operator&&e.binary_ops[s.right.operator]<=.9;)s=s.right;n.node.test=s.right,s.right=n.node,n.node=i}}else this.throwError("Expected :")}})}};N0.plugins.register(m2e);var c$t=S(T(),1),h2e={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},gt=Object.freeze(h2e);function Rm(e,t){this._expression=e,e=L2e(e,t),e=G2e(R2e(e)),N0.addBinaryOp("=~",0),N0.addBinaryOp("!~",0);let n;try{n=N0(e)}catch(i){throw new ue(i)}this._runtimeAst=xi(this,n)}Object.defineProperties(Rm.prototype,{expression:{get:function(){return this._expression}}});var vn={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new D],cartesian3Array:[new h],cartesian4Array:[new se],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);let e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new D),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new h),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new se),this.cartesian4Array[this.cartesian4Index++]}};Rm.prototype.evaluate=function(e,t){vn.reset();let n=this._runtimeAst.evaluate(e);return t instanceof Y&&n instanceof se?Y.fromCartesian4(n,t):n instanceof D||n instanceof h||n instanceof se?n.clone(t):n};Rm.prototype.evaluateColor=function(e,t){vn.reset();let n=this._runtimeAst.evaluate(e);return Y.fromCartesian4(n,t)};Rm.prototype.getShaderFunction=function(e,t,n,i){let o=this.getShaderExpression(t,n);return o=`${i} ${e} { return ${o}; } -`,o};Gm.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};Gm.prototype.getVariables=function(){let e=[];return this._runtimeAst.getVariables(e),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var y2e=["!","-","+"],tie=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],vN=/\${(.*?)}/g,x2e=/\\/g,_2e="@#%",T2e=/@#%/g,wN=new Y,FN={abs:Ps(Math.abs),sqrt:Ps(Math.sqrt),cos:Ps(Math.cos),sin:Ps(Math.sin),tan:Ps(Math.tan),acos:Ps(Math.acos),asin:Ps(Math.asin),atan:Ps(Math.atan),radians:Ps(W.toRadians),degrees:Ps(W.toDegrees),sign:Ps(W.sign),floor:Ps(Math.floor),ceil:Ps(Math.ceil),round:Ps(Math.round),exp:Ps(Math.exp),exp2:Ps(C2e),log:Ps(Math.log),log2:Ps(V2e),fract:Ps(S2e),length:L2e,normalize:R2e},AN={atan2:WN(Math.atan2,!1),pow:WN(Math.pow,!1),min:WN(Math.min,!0),max:WN(Math.max,!0),distance:Z2e,dot:G2e,cross:E2e},AO={clamp:nie(W.clamp,!0),mix:nie(W.lerp,!0)};function S2e(e){return e-Math.floor(e)}function C2e(e){return Math.pow(2,e)}function V2e(e){return W.log2(e)}function Ps(e){return function(t,n){if(typeof n=="number")return e(n);if(n instanceof D)return D.fromElements(e(n.x),e(n.y),vn.getCartesian2());if(n instanceof h)return h.fromElements(e(n.x),e(n.y),e(n.z),vn.getCartesian3());if(n instanceof se)return se.fromElements(e(n.x),e(n.y),e(n.z),e(n.w),vn.getCartesian4());throw new ue(`Function "${t}" requires a vector or number argument. Argument is ${n}.`)}}function WN(e,t){return function(n,i,o){if(t&&typeof o=="number"){if(typeof i=="number")return e(i,o);if(i instanceof D)return D.fromElements(e(i.x,o),e(i.y,o),vn.getCartesian2());if(i instanceof h)return h.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),vn.getCartesian3());if(i instanceof se)return se.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),e(i.w,o),vn.getCartesian4())}if(typeof i=="number"&&typeof o=="number")return e(i,o);if(i instanceof D&&o instanceof D)return D.fromElements(e(i.x,o.x),e(i.y,o.y),vn.getCartesian2());if(i instanceof h&&o instanceof h)return h.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),vn.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),e(i.w,o.w),vn.getCartesian4());throw new ue(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i} and ${o}.`)}}function nie(e,t){return function(n,i,o,r){if(t&&typeof r=="number"){if(typeof i=="number"&&typeof o=="number")return e(i,o,r);if(i instanceof D&&o instanceof D)return D.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),vn.getCartesian2());if(i instanceof h&&o instanceof h)return h.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),vn.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),e(i.w,o.w,r),vn.getCartesian4())}if(typeof i=="number"&&typeof o=="number"&&typeof r=="number")return e(i,o,r);if(i instanceof D&&o instanceof D&&r instanceof D)return D.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),vn.getCartesian2());if(i instanceof h&&o instanceof h&&r instanceof h)return h.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),vn.getCartesian3());if(i instanceof se&&o instanceof se&&r instanceof se)return se.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),e(i.w,o.w,r.w),vn.getCartesian4());throw new ue(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i}, ${o}, and ${r}.`)}}function L2e(e,t){if(typeof t=="number")return Math.abs(t);if(t instanceof D)return D.magnitude(t);if(t instanceof h)return h.magnitude(t);if(t instanceof se)return se.magnitude(t);throw new ue(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function R2e(e,t){if(typeof t=="number")return 1;if(t instanceof D)return D.normalize(t,vn.getCartesian2());if(t instanceof h)return h.normalize(t,vn.getCartesian3());if(t instanceof se)return se.normalize(t,vn.getCartesian4());throw new ue(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function Z2e(e,t,n){if(typeof t=="number"&&typeof n=="number")return Math.abs(t-n);if(t instanceof D&&n instanceof D)return D.distance(t,n);if(t instanceof h&&n instanceof h)return h.distance(t,n);if(t instanceof se&&n instanceof se)return se.distance(t,n);throw new ue(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function G2e(e,t,n){if(typeof t=="number"&&typeof n=="number")return t*n;if(t instanceof D&&n instanceof D)return D.dot(t,n);if(t instanceof h&&n instanceof h)return h.dot(t,n);if(t instanceof se&&n instanceof se)return se.dot(t,n);throw new ue(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function E2e(e,t,n){if(t instanceof h&&n instanceof h)return h.cross(t,n,vn.getCartesian3());throw new ue(`Function "${e}" requires vec3 arguments. Arguments are ${t} and ${n}.`)}function _t(e,t,n,i,o){this._type=e,this._value=t,this._left=n,this._right=i,this._test=o,this.evaluate=void 0,D2e(this)}function X2e(e,t){if(!l(t))return e;for(let n in t)if(t.hasOwnProperty(n)){let i=new RegExp(`\\$\\{${n}\\}`,"g"),o=`(${t[n]})`;l(o)&&(e=e.replace(i,o))}return e}function I2e(e){return e.replace(x2e,_2e)}function FO(e){return e.replace(T2e,"\\")}function W2e(e){let t=e,n="",i=t.indexOf("${");for(;i>=0;){let o=t.indexOf("'"),r=t.indexOf('"'),s;if(o>=0&&o=0&&r=0?new _t(gt.VARIABLE_IN_STRING,e.value):new _t(gt.LITERAL_STRING,FO(e.value))}function v2e(e,t){let n=t.arguments,i=n.length,o,r,s,a;if(t.callee.type==="MemberExpression"){o=t.callee.property.name;let c=t.callee.object;if(o==="test"||o==="exec"){if(!l(c.callee)||c.callee.name!=="regExp")throw new ue(`${o} is not a function.`);return i===0?o==="test"?new _t(gt.LITERAL_BOOLEAN,!1):new _t(gt.LITERAL_NULL,null):(s=yi(e,c),a=yi(e,n[0]),new _t(gt.FUNCTION_CALL,o,s,a))}else if(o==="toString")return r=yi(e,c),new _t(gt.FUNCTION_CALL,o,r);throw new ue(`Unexpected function call "${o}".`)}if(o=t.callee.name,o==="color"){if(i===0)return new _t(gt.LITERAL_COLOR,o);if(r=yi(e,n[0]),l(n[1])){let c=yi(e,n[1]);return new _t(gt.LITERAL_COLOR,o,[r,c])}return new _t(gt.LITERAL_COLOR,o,[r])}else if(o==="rgb"||o==="hsl"){if(i<3)throw new ue(`${o} requires three arguments.`);return r=[yi(e,n[0]),yi(e,n[1]),yi(e,n[2])],new _t(gt.LITERAL_COLOR,o,r)}else if(o==="rgba"||o==="hsla"){if(i<4)throw new ue(`${o} requires four arguments.`);return r=[yi(e,n[0]),yi(e,n[1]),yi(e,n[2]),yi(e,n[3])],new _t(gt.LITERAL_COLOR,o,r)}else if(o==="vec2"||o==="vec3"||o==="vec4"){r=new Array(i);for(let c=0;c1)throw new ue(`${o} requires exactly one argument.`);return r=yi(e,n[0]),new _t(gt.UNARY,o,r)}else if(o==="getExactClassName"){if(i>0)throw new ue(`${o} does not take any argument.`);return new _t(gt.UNARY,o)}else if(l(FN[o])){if(i!==1)throw new ue(`${o} requires exactly one argument.`);return r=yi(e,n[0]),new _t(gt.UNARY,o,r)}else if(l(AN[o])){if(i!==2)throw new ue(`${o} requires exactly two arguments.`);return s=yi(e,n[0]),a=yi(e,n[1]),new _t(gt.BINARY,o,s,a)}else if(l(AO[o])){if(i!==3)throw new ue(`${o} requires exactly three arguments.`);s=yi(e,n[0]),a=yi(e,n[1]);let c=yi(e,n[2]);return new _t(gt.TERNARY,o,s,a,c)}else{if(o==="Boolean")return i===0?new _t(gt.LITERAL_BOOLEAN,!1):(r=yi(e,n[0]),new _t(gt.UNARY,o,r));if(o==="Number")return i===0?new _t(gt.LITERAL_NUMBER,0):(r=yi(e,n[0]),new _t(gt.UNARY,o,r));if(o==="String")return i===0?new _t(gt.LITERAL_STRING,""):(r=yi(e,n[0]),new _t(gt.UNARY,o,r));if(o==="regExp")return w2e(e,t)}}throw new ue(`Unexpected function call "${o}".`)}function w2e(e,t){let n=t.arguments;if(n.length===0)return new _t(gt.LITERAL_REGEX,new RegExp);let i=yi(e,n[0]),o;if(n.length>1){let r=yi(e,n[1]);if(wO(i)&&wO(r)){try{o=new RegExp(FO(String(i._value)),r._value)}catch(s){throw new ue(s)}return new _t(gt.LITERAL_REGEX,o)}return new _t(gt.REGEX,i,r)}if(wO(i)){try{o=new RegExp(FO(String(i._value)))}catch(r){throw new ue(r)}return new _t(gt.LITERAL_REGEX,o)}return new _t(gt.REGEX,i)}function F2e(e){if(k2e(e.name)){let t=U2e(e.name);return t.substr(0,8)==="tiles3d_"?new _t(gt.BUILTIN_VARIABLE,t):new _t(gt.VARIABLE,t)}else{if(e.name==="NaN")return new _t(gt.LITERAL_NUMBER,NaN);if(e.name==="Infinity")return new _t(gt.LITERAL_NUMBER,1/0);if(e.name==="undefined")return new _t(gt.LITERAL_UNDEFINED,void 0)}throw new ue(`${e.name} is not defined.`)}function A2e(e){let t=e.property.name;if(t==="PI")return new _t(gt.LITERAL_NUMBER,Math.PI);if(t==="E")return new _t(gt.LITERAL_NUMBER,Math.E)}function M2e(e){if(e.property.name==="POSITIVE_INFINITY")return new _t(gt.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function N2e(e,t){if(t.object.name==="Math")return A2e(t);if(t.object.name==="Number")return M2e(t);let n,i=yi(e,t.object);return t.computed?(n=yi(e,t.property),new _t(gt.MEMBER,"brackets",i,n)):(n=new _t(gt.LITERAL_STRING,t.property.name),new _t(gt.MEMBER,"dot",i,n))}function wO(e){return e._type>=gt.LITERAL_NULL}function k2e(e){return e.substr(0,4)==="czm_"}function U2e(e){return e.substr(4)}function yi(e,t){let n,i,o,r;if(t.type==="Literal")n=P2e(t);else if(t.type==="CallExpression")n=v2e(e,t);else if(t.type==="Identifier")n=F2e(t);else if(t.type==="UnaryExpression"){i=t.operator;let s=yi(e,t.argument);if(y2e.indexOf(i)>-1)n=new _t(gt.UNARY,i,s);else throw new ue(`Unexpected operator "${i}".`)}else if(t.type==="BinaryExpression")if(i=t.operator,o=yi(e,t.left),r=yi(e,t.right),tie.indexOf(i)>-1)n=new _t(gt.BINARY,i,o,r);else throw new ue(`Unexpected operator "${i}".`);else if(t.type==="LogicalExpression")i=t.operator,o=yi(e,t.left),r=yi(e,t.right),tie.indexOf(i)>-1&&(n=new _t(gt.BINARY,i,o,r));else if(t.type==="ConditionalExpression"){let s=yi(e,t.test);o=yi(e,t.consequent),r=yi(e,t.alternate),n=new _t(gt.CONDITIONAL,"?",o,r,s)}else if(t.type==="MemberExpression")n=N2e(e,t);else if(t.type==="ArrayExpression"){let s=[];for(let a=0;a"?e.evaluate=e._evaluateGreaterThan:e._value===">="?e.evaluate=e._evaluateGreaterThanOrEquals:e._value==="&&"?e.evaluate=e._evaluateAnd:e._value==="||"?e.evaluate=e._evaluateOr:e._value==="=~"?e.evaluate=e._evaluateRegExpMatch:e._value==="!~"?e.evaluate=e._evaluateRegExpNotMatch:l(AN[e._value])&&(e.evaluate=O2e(e._value)):e._type===gt.TERNARY?e.evaluate=H2e(e._value):e._type===gt.MEMBER?e._value==="brackets"?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===gt.ARRAY?e.evaluate=e._evaluateArray:e._type===gt.VARIABLE?e.evaluate=e._evaluateVariable:e._type===gt.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===gt.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===gt.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===gt.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===gt.REGEX?e.evaluate=e._evaluateRegExp:e._type===gt.BUILTIN_VARIABLE?e._value==="tiles3d_tileset_time"&&(e.evaluate=B2e):e.evaluate=e._evaluateLiteral}function B2e(e){return l(e)?e.content.tileset.timeSinceLoad:0}function Y2e(e){let t=FN[e];return function(n){let i=this._left.evaluate(n);return t(e,i)}}function O2e(e){let t=AN[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n);return t(e,i,o)}}function H2e(e){let t=AO[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n),r=this._test.evaluate(n);return t(e,i,o,r)}}function MN(e,t){if(l(e))return e.getPropertyInherited(t)}_t.prototype._evaluateLiteral=function(){return this._value};_t.prototype._evaluateLiteralColor=function(e){let t=wN,n=this._left;if(this._value==="color")l(n)?n.length>1?(Y.fromCssColorString(n[0].evaluate(e),t),t.alpha=n[1].evaluate(e)):Y.fromCssColorString(n[0].evaluate(e),t):Y.fromBytes(255,255,255,255,t);else if(this._value==="rgb")Y.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),255,t);else if(this._value==="rgba"){let i=n[3].evaluate(e)*255;Y.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),i,t)}else this._value==="hsl"?Y.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),1,t):this._value==="hsla"&&Y.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),n[3].evaluate(e),t);return se.fromColor(t,vn.getCartesian4())};_t.prototype._evaluateLiteralVector=function(e){let t=vn.getArray(),n=this._value,i=this._left,o=i.length;for(let a=0;a1)throw new ue(`Invalid ${n} constructor. Not enough arguments.`);if(r>s&&o>1)throw new ue(`Invalid ${n} constructor. Too many arguments.`);if(r===1){let a=t[0];t.push(a,a,a)}if(n==="vec2")return D.fromArray(t,0,vn.getCartesian2());if(n==="vec3")return h.fromArray(t,0,vn.getCartesian3());if(n==="vec4")return se.fromArray(t,0,vn.getCartesian4())};_t.prototype._evaluateLiteralString=function(){return this._value};_t.prototype._evaluateVariableString=function(e){let t=this._value,n=vN.exec(t);for(;n!==null;){let i=n[0],o=n[1],r=MN(e,o);l(r)||(r=""),t=t.replace(i,r),n=vN.exec(t)}return t};_t.prototype._evaluateVariable=function(e){return MN(e,this._value)};function wx(e){return e._value==="feature"}_t.prototype._evaluateMemberDot=function(e){if(wx(this._left))return MN(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof D||t instanceof h||t instanceof se){if(n==="r")return t.x;if(n==="g")return t.y;if(n==="b")return t.z;if(n==="a")return t.w}return t[n]};_t.prototype._evaluateMemberBrackets=function(e){if(wx(this._left))return MN(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof D||t instanceof h||t instanceof se){if(n===0||n==="r")return t.x;if(n===1||n==="g")return t.y;if(n===2||n==="b")return t.z;if(n===3||n==="a")return t.w}return t[n]};_t.prototype._evaluateArray=function(e){let t=[];for(let n=0;n" requires number arguments. Arguments are ${t} and ${n}.`);return t>n};_t.prototype._evaluateGreaterThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ue(`Operator ">=" requires number arguments. Arguments are ${t} and ${n}.`);return t>=n};_t.prototype._evaluateOr=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ue(`Operator "||" requires boolean arguments. First argument is ${t}.`);if(t)return!0;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ue(`Operator "||" requires boolean arguments. Second argument is ${n}.`);return t||n};_t.prototype._evaluateAnd=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ue(`Operator "&&" requires boolean arguments. First argument is ${t}.`);if(!t)return!1;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ue(`Operator "&&" requires boolean arguments. Second argument is ${n}.`);return t&&n};_t.prototype._evaluatePlus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof D&&t instanceof D)return D.add(t,n,vn.getCartesian2());if(n instanceof h&&t instanceof h)return h.add(t,n,vn.getCartesian3());if(n instanceof se&&t instanceof se)return se.add(t,n,vn.getCartesian4());if(typeof t=="string"||typeof n=="string")return t+n;if(typeof t=="number"&&typeof n=="number")return t+n;throw new ue(`Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateMinus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof D&&t instanceof D)return D.subtract(t,n,vn.getCartesian2());if(n instanceof h&&t instanceof h)return h.subtract(t,n,vn.getCartesian3());if(n instanceof se&&t instanceof se)return se.subtract(t,n,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t-n;throw new ue(`Operator "-" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateTimes=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof D&&t instanceof D)return D.multiplyComponents(t,n,vn.getCartesian2());if(n instanceof D&&typeof t=="number")return D.multiplyByScalar(n,t,vn.getCartesian2());if(t instanceof D&&typeof n=="number")return D.multiplyByScalar(t,n,vn.getCartesian2());if(n instanceof h&&t instanceof h)return h.multiplyComponents(t,n,vn.getCartesian3());if(n instanceof h&&typeof t=="number")return h.multiplyByScalar(n,t,vn.getCartesian3());if(t instanceof h&&typeof n=="number")return h.multiplyByScalar(t,n,vn.getCartesian3());if(n instanceof se&&t instanceof se)return se.multiplyComponents(t,n,vn.getCartesian4());if(n instanceof se&&typeof t=="number")return se.multiplyByScalar(n,t,vn.getCartesian4());if(t instanceof se&&typeof n=="number")return se.multiplyByScalar(t,n,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t*n;throw new ue(`Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateDivide=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof D&&t instanceof D)return D.divideComponents(t,n,vn.getCartesian2());if(t instanceof D&&typeof n=="number")return D.divideByScalar(t,n,vn.getCartesian2());if(n instanceof h&&t instanceof h)return h.divideComponents(t,n,vn.getCartesian3());if(t instanceof h&&typeof n=="number")return h.divideByScalar(t,n,vn.getCartesian3());if(n instanceof se&&t instanceof se)return se.divideComponents(t,n,vn.getCartesian4());if(t instanceof se&&typeof n=="number")return se.divideByScalar(t,n,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t/n;throw new ue(`Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateMod=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof D&&t instanceof D)return D.fromElements(t.x%n.x,t.y%n.y,vn.getCartesian2());if(n instanceof h&&t instanceof h)return h.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,vn.getCartesian3());if(n instanceof se&&t instanceof se)return se.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,t.w%n.w,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t%n;throw new ue(`Operator "%" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof D&&t instanceof D||n instanceof h&&t instanceof h||n instanceof se&&t instanceof se?t.equals(n):t===n};_t.prototype._evaluateNotEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof D&&t instanceof D||n instanceof h&&t instanceof h||n instanceof se&&t instanceof se?!t.equals(n):t!==n};_t.prototype._evaluateConditional=function(e){let t=this._test.evaluate(e);if(typeof t!="boolean")throw new ue(`Conditional argument of conditional expression must be a boolean. Argument is ${t}.`);return t?this._left.evaluate(e):this._right.evaluate(e)};_t.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))};_t.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))};_t.prototype._evaluateIsExactClass=function(e){return l(e)?e.isExactClass(this._left.evaluate(e)):!1};_t.prototype._evaluateIsClass=function(e){return l(e)?e.isClass(this._left.evaluate(e)):!1};_t.prototype._evaluateGetExactClassName=function(e){if(l(e))return e.getExactClassName()};_t.prototype._evaluateBooleanConversion=function(e){return!!this._left.evaluate(e)};_t.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))};_t.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))};_t.prototype._evaluateRegExp=function(e){let t=this._value.evaluate(e),n="";l(this._left)&&(n=this._left.evaluate(e));let i;try{i=new RegExp(t,n)}catch(o){throw new ue(o)}return i};_t.prototype._evaluateRegExpTest=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ue(`RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);return t.test(n)};_t.prototype._evaluateRegExpMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return t.test(n);if(n instanceof RegExp&&typeof t=="string")return n.test(t);throw new ue(`Operator "=~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateRegExpNotMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return!t.test(n);if(n instanceof RegExp&&typeof t=="string")return!n.test(t);throw new ue(`Operator "!~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateRegExpExec=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ue(`RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);let i=t.exec(n);return l(i)?i[1]:null};_t.prototype._evaluateToString=function(e){let t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof D||t instanceof h||t instanceof se)return String(t);throw new ue(`Unexpected function call "${this._value}".`)};function iie(e){let t=e._left,n=t.length;for(let a=0;a1){let p=d[0],g=d[1];return g!=="1.0"&&(t.translucent=!0),`vec4(${p}, ${g})`}}else return"vec4(1.0)";return`vec4(${d[0]}, 1.0)`}else{if(c==="rgb")return i=oie(this),l(i)?PN(i):`vec4(${d[0]} / 255.0, ${d[1]} / 255.0, ${d[2]} / 255.0, 1.0)`;if(c==="rgba")return d[3]!=="1.0"&&(t.translucent=!0),i=oie(this),l(i)?PN(i):`vec4(${d[0]} / 255.0, ${d[1]} / 255.0, ${d[2]} / 255.0, ${d[3]})`;if(c==="hsl")return i=iie(this),l(i)?PN(i):`vec4(czm_HSLToRGB(vec3(${d[0]}, ${d[1]}, ${d[2]})), 1.0)`;if(c==="hsla")return i=iie(this),l(i)?(i.alpha!==1&&(t.translucent=!0),PN(i)):(d[3]!=="1.0"&&(t.translucent=!0),`vec4(czm_HSLToRGB(vec3(${d[0]}, ${d[1]}, ${d[2]})), ${d[3]})`)}break;case gt.LITERAL_VECTOR:u=o.length,m=`${c}(`;for(let p=0;p",">=","<","<=","&&","||","!~","=~"],wN=/\${(.*?)}/g,p2e=/\\/g,b2e="@#%",g2e=/@#%/g,FN=new Y,AN={abs:vs(Math.abs),sqrt:vs(Math.sqrt),cos:vs(Math.cos),sin:vs(Math.sin),tan:vs(Math.tan),acos:vs(Math.acos),asin:vs(Math.asin),atan:vs(Math.atan),radians:vs(X.toRadians),degrees:vs(X.toDegrees),sign:vs(X.sign),floor:vs(Math.floor),ceil:vs(Math.ceil),round:vs(Math.round),exp:vs(Math.exp),exp2:vs(x2e),log:vs(Math.log),log2:vs(_2e),fract:vs(y2e),length:S2e,normalize:T2e},MN={atan2:PN(Math.atan2,!1),pow:PN(Math.pow,!1),min:PN(Math.min,!0),max:PN(Math.max,!0),distance:C2e,dot:V2e,cross:Z2e},MO={clamp:rie(X.clamp,!0),mix:rie(X.lerp,!0)};function y2e(e){return e-Math.floor(e)}function x2e(e){return Math.pow(2,e)}function _2e(e){return X.log2(e)}function vs(e){return function(t,n){if(typeof n=="number")return e(n);if(n instanceof D)return D.fromElements(e(n.x),e(n.y),vn.getCartesian2());if(n instanceof h)return h.fromElements(e(n.x),e(n.y),e(n.z),vn.getCartesian3());if(n instanceof se)return se.fromElements(e(n.x),e(n.y),e(n.z),e(n.w),vn.getCartesian4());throw new ue(`Function "${t}" requires a vector or number argument. Argument is ${n}.`)}}function PN(e,t){return function(n,i,o){if(t&&typeof o=="number"){if(typeof i=="number")return e(i,o);if(i instanceof D)return D.fromElements(e(i.x,o),e(i.y,o),vn.getCartesian2());if(i instanceof h)return h.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),vn.getCartesian3());if(i instanceof se)return se.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),e(i.w,o),vn.getCartesian4())}if(typeof i=="number"&&typeof o=="number")return e(i,o);if(i instanceof D&&o instanceof D)return D.fromElements(e(i.x,o.x),e(i.y,o.y),vn.getCartesian2());if(i instanceof h&&o instanceof h)return h.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),vn.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),e(i.w,o.w),vn.getCartesian4());throw new ue(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i} and ${o}.`)}}function rie(e,t){return function(n,i,o,r){if(t&&typeof r=="number"){if(typeof i=="number"&&typeof o=="number")return e(i,o,r);if(i instanceof D&&o instanceof D)return D.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),vn.getCartesian2());if(i instanceof h&&o instanceof h)return h.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),vn.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),e(i.w,o.w,r),vn.getCartesian4())}if(typeof i=="number"&&typeof o=="number"&&typeof r=="number")return e(i,o,r);if(i instanceof D&&o instanceof D&&r instanceof D)return D.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),vn.getCartesian2());if(i instanceof h&&o instanceof h&&r instanceof h)return h.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),vn.getCartesian3());if(i instanceof se&&o instanceof se&&r instanceof se)return se.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),e(i.w,o.w,r.w),vn.getCartesian4());throw new ue(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i}, ${o}, and ${r}.`)}}function S2e(e,t){if(typeof t=="number")return Math.abs(t);if(t instanceof D)return D.magnitude(t);if(t instanceof h)return h.magnitude(t);if(t instanceof se)return se.magnitude(t);throw new ue(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function T2e(e,t){if(typeof t=="number")return 1;if(t instanceof D)return D.normalize(t,vn.getCartesian2());if(t instanceof h)return h.normalize(t,vn.getCartesian3());if(t instanceof se)return se.normalize(t,vn.getCartesian4());throw new ue(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function C2e(e,t,n){if(typeof t=="number"&&typeof n=="number")return Math.abs(t-n);if(t instanceof D&&n instanceof D)return D.distance(t,n);if(t instanceof h&&n instanceof h)return h.distance(t,n);if(t instanceof se&&n instanceof se)return se.distance(t,n);throw new ue(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function V2e(e,t,n){if(typeof t=="number"&&typeof n=="number")return t*n;if(t instanceof D&&n instanceof D)return D.dot(t,n);if(t instanceof h&&n instanceof h)return h.dot(t,n);if(t instanceof se&&n instanceof se)return se.dot(t,n);throw new ue(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function Z2e(e,t,n){if(t instanceof h&&n instanceof h)return h.cross(t,n,vn.getCartesian3());throw new ue(`Function "${e}" requires vec3 arguments. Arguments are ${t} and ${n}.`)}function _t(e,t,n,i,o){this._type=e,this._value=t,this._left=n,this._right=i,this._test=o,this.evaluate=void 0,M2e(this)}function L2e(e,t){if(!l(t))return e;for(let n in t)if(t.hasOwnProperty(n)){let i=new RegExp(`\\$\\{${n}\\}`,"g"),o=`(${t[n]})`;l(o)&&(e=e.replace(i,o))}return e}function R2e(e){return e.replace(p2e,b2e)}function AO(e){return e.replace(g2e,"\\")}function G2e(e){let t=e,n="",i=t.indexOf("${");for(;i>=0;){let o=t.indexOf("'"),r=t.indexOf('"'),s;if(o>=0&&o=0&&r=0?new _t(gt.VARIABLE_IN_STRING,e.value):new _t(gt.LITERAL_STRING,AO(e.value))}function W2e(e,t){let n=t.arguments,i=n.length,o,r,s,a;if(t.callee.type==="MemberExpression"){o=t.callee.property.name;let c=t.callee.object;if(o==="test"||o==="exec"){if(!l(c.callee)||c.callee.name!=="regExp")throw new ue(`${o} is not a function.`);return i===0?o==="test"?new _t(gt.LITERAL_BOOLEAN,!1):new _t(gt.LITERAL_NULL,null):(s=xi(e,c),a=xi(e,n[0]),new _t(gt.FUNCTION_CALL,o,s,a))}else if(o==="toString")return r=xi(e,c),new _t(gt.FUNCTION_CALL,o,r);throw new ue(`Unexpected function call "${o}".`)}if(o=t.callee.name,o==="color"){if(i===0)return new _t(gt.LITERAL_COLOR,o);if(r=xi(e,n[0]),l(n[1])){let c=xi(e,n[1]);return new _t(gt.LITERAL_COLOR,o,[r,c])}return new _t(gt.LITERAL_COLOR,o,[r])}else if(o==="rgb"||o==="hsl"){if(i<3)throw new ue(`${o} requires three arguments.`);return r=[xi(e,n[0]),xi(e,n[1]),xi(e,n[2])],new _t(gt.LITERAL_COLOR,o,r)}else if(o==="rgba"||o==="hsla"){if(i<4)throw new ue(`${o} requires four arguments.`);return r=[xi(e,n[0]),xi(e,n[1]),xi(e,n[2]),xi(e,n[3])],new _t(gt.LITERAL_COLOR,o,r)}else if(o==="vec2"||o==="vec3"||o==="vec4"){r=new Array(i);for(let c=0;c1)throw new ue(`${o} requires exactly one argument.`);return r=xi(e,n[0]),new _t(gt.UNARY,o,r)}else if(o==="getExactClassName"){if(i>0)throw new ue(`${o} does not take any argument.`);return new _t(gt.UNARY,o)}else if(l(AN[o])){if(i!==1)throw new ue(`${o} requires exactly one argument.`);return r=xi(e,n[0]),new _t(gt.UNARY,o,r)}else if(l(MN[o])){if(i!==2)throw new ue(`${o} requires exactly two arguments.`);return s=xi(e,n[0]),a=xi(e,n[1]),new _t(gt.BINARY,o,s,a)}else if(l(MO[o])){if(i!==3)throw new ue(`${o} requires exactly three arguments.`);s=xi(e,n[0]),a=xi(e,n[1]);let c=xi(e,n[2]);return new _t(gt.TERNARY,o,s,a,c)}else{if(o==="Boolean")return i===0?new _t(gt.LITERAL_BOOLEAN,!1):(r=xi(e,n[0]),new _t(gt.UNARY,o,r));if(o==="Number")return i===0?new _t(gt.LITERAL_NUMBER,0):(r=xi(e,n[0]),new _t(gt.UNARY,o,r));if(o==="String")return i===0?new _t(gt.LITERAL_STRING,""):(r=xi(e,n[0]),new _t(gt.UNARY,o,r));if(o==="regExp")return I2e(e,t)}}throw new ue(`Unexpected function call "${o}".`)}function I2e(e,t){let n=t.arguments;if(n.length===0)return new _t(gt.LITERAL_REGEX,new RegExp);let i=xi(e,n[0]),o;if(n.length>1){let r=xi(e,n[1]);if(FO(i)&&FO(r)){try{o=new RegExp(AO(String(i._value)),r._value)}catch(s){throw new ue(s)}return new _t(gt.LITERAL_REGEX,o)}return new _t(gt.REGEX,i,r)}if(FO(i)){try{o=new RegExp(AO(String(i._value)))}catch(r){throw new ue(r)}return new _t(gt.LITERAL_REGEX,o)}return new _t(gt.REGEX,i)}function X2e(e){if(F2e(e.name)){let t=A2e(e.name);return t.substr(0,8)==="tiles3d_"?new _t(gt.BUILTIN_VARIABLE,t):new _t(gt.VARIABLE,t)}else{if(e.name==="NaN")return new _t(gt.LITERAL_NUMBER,NaN);if(e.name==="Infinity")return new _t(gt.LITERAL_NUMBER,1/0);if(e.name==="undefined")return new _t(gt.LITERAL_UNDEFINED,void 0)}throw new ue(`${e.name} is not defined.`)}function P2e(e){let t=e.property.name;if(t==="PI")return new _t(gt.LITERAL_NUMBER,Math.PI);if(t==="E")return new _t(gt.LITERAL_NUMBER,Math.E)}function v2e(e){if(e.property.name==="POSITIVE_INFINITY")return new _t(gt.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function w2e(e,t){if(t.object.name==="Math")return P2e(t);if(t.object.name==="Number")return v2e(t);let n,i=xi(e,t.object);return t.computed?(n=xi(e,t.property),new _t(gt.MEMBER,"brackets",i,n)):(n=new _t(gt.LITERAL_STRING,t.property.name),new _t(gt.MEMBER,"dot",i,n))}function FO(e){return e._type>=gt.LITERAL_NULL}function F2e(e){return e.substr(0,4)==="czm_"}function A2e(e){return e.substr(4)}function xi(e,t){let n,i,o,r;if(t.type==="Literal")n=E2e(t);else if(t.type==="CallExpression")n=W2e(e,t);else if(t.type==="Identifier")n=X2e(t);else if(t.type==="UnaryExpression"){i=t.operator;let s=xi(e,t.argument);if(f2e.indexOf(i)>-1)n=new _t(gt.UNARY,i,s);else throw new ue(`Unexpected operator "${i}".`)}else if(t.type==="BinaryExpression")if(i=t.operator,o=xi(e,t.left),r=xi(e,t.right),oie.indexOf(i)>-1)n=new _t(gt.BINARY,i,o,r);else throw new ue(`Unexpected operator "${i}".`);else if(t.type==="LogicalExpression")i=t.operator,o=xi(e,t.left),r=xi(e,t.right),oie.indexOf(i)>-1&&(n=new _t(gt.BINARY,i,o,r));else if(t.type==="ConditionalExpression"){let s=xi(e,t.test);o=xi(e,t.consequent),r=xi(e,t.alternate),n=new _t(gt.CONDITIONAL,"?",o,r,s)}else if(t.type==="MemberExpression")n=w2e(e,t);else if(t.type==="ArrayExpression"){let s=[];for(let a=0;a"?e.evaluate=e._evaluateGreaterThan:e._value===">="?e.evaluate=e._evaluateGreaterThanOrEquals:e._value==="&&"?e.evaluate=e._evaluateAnd:e._value==="||"?e.evaluate=e._evaluateOr:e._value==="=~"?e.evaluate=e._evaluateRegExpMatch:e._value==="!~"?e.evaluate=e._evaluateRegExpNotMatch:l(MN[e._value])&&(e.evaluate=k2e(e._value)):e._type===gt.TERNARY?e.evaluate=D2e(e._value):e._type===gt.MEMBER?e._value==="brackets"?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===gt.ARRAY?e.evaluate=e._evaluateArray:e._type===gt.VARIABLE?e.evaluate=e._evaluateVariable:e._type===gt.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===gt.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===gt.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===gt.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===gt.REGEX?e.evaluate=e._evaluateRegExp:e._type===gt.BUILTIN_VARIABLE?e._value==="tiles3d_tileset_time"&&(e.evaluate=N2e):e.evaluate=e._evaluateLiteral}function N2e(e){return l(e)?e.content.tileset.timeSinceLoad:0}function U2e(e){let t=AN[e];return function(n){let i=this._left.evaluate(n);return t(e,i)}}function k2e(e){let t=MN[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n);return t(e,i,o)}}function D2e(e){let t=MO[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n),r=this._test.evaluate(n);return t(e,i,o,r)}}function NN(e,t){if(l(e))return e.getPropertyInherited(t)}_t.prototype._evaluateLiteral=function(){return this._value};_t.prototype._evaluateLiteralColor=function(e){let t=FN,n=this._left;if(this._value==="color")l(n)?n.length>1?(Y.fromCssColorString(n[0].evaluate(e),t),t.alpha=n[1].evaluate(e)):Y.fromCssColorString(n[0].evaluate(e),t):Y.fromBytes(255,255,255,255,t);else if(this._value==="rgb")Y.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),255,t);else if(this._value==="rgba"){let i=n[3].evaluate(e)*255;Y.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),i,t)}else this._value==="hsl"?Y.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),1,t):this._value==="hsla"&&Y.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),n[3].evaluate(e),t);return se.fromColor(t,vn.getCartesian4())};_t.prototype._evaluateLiteralVector=function(e){let t=vn.getArray(),n=this._value,i=this._left,o=i.length;for(let a=0;a1)throw new ue(`Invalid ${n} constructor. Not enough arguments.`);if(r>s&&o>1)throw new ue(`Invalid ${n} constructor. Too many arguments.`);if(r===1){let a=t[0];t.push(a,a,a)}if(n==="vec2")return D.fromArray(t,0,vn.getCartesian2());if(n==="vec3")return h.fromArray(t,0,vn.getCartesian3());if(n==="vec4")return se.fromArray(t,0,vn.getCartesian4())};_t.prototype._evaluateLiteralString=function(){return this._value};_t.prototype._evaluateVariableString=function(e){let t=this._value,n=wN.exec(t);for(;n!==null;){let i=n[0],o=n[1],r=NN(e,o);l(r)||(r=""),t=t.replace(i,r),n=wN.exec(t)}return t};_t.prototype._evaluateVariable=function(e){return NN(e,this._value)};function vx(e){return e._value==="feature"}_t.prototype._evaluateMemberDot=function(e){if(vx(this._left))return NN(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof D||t instanceof h||t instanceof se){if(n==="r")return t.x;if(n==="g")return t.y;if(n==="b")return t.z;if(n==="a")return t.w}return t[n]};_t.prototype._evaluateMemberBrackets=function(e){if(vx(this._left))return NN(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof D||t instanceof h||t instanceof se){if(n===0||n==="r")return t.x;if(n===1||n==="g")return t.y;if(n===2||n==="b")return t.z;if(n===3||n==="a")return t.w}return t[n]};_t.prototype._evaluateArray=function(e){let t=[];for(let n=0;n" requires number arguments. Arguments are ${t} and ${n}.`);return t>n};_t.prototype._evaluateGreaterThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ue(`Operator ">=" requires number arguments. Arguments are ${t} and ${n}.`);return t>=n};_t.prototype._evaluateOr=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ue(`Operator "||" requires boolean arguments. First argument is ${t}.`);if(t)return!0;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ue(`Operator "||" requires boolean arguments. Second argument is ${n}.`);return t||n};_t.prototype._evaluateAnd=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ue(`Operator "&&" requires boolean arguments. First argument is ${t}.`);if(!t)return!1;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ue(`Operator "&&" requires boolean arguments. Second argument is ${n}.`);return t&&n};_t.prototype._evaluatePlus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof D&&t instanceof D)return D.add(t,n,vn.getCartesian2());if(n instanceof h&&t instanceof h)return h.add(t,n,vn.getCartesian3());if(n instanceof se&&t instanceof se)return se.add(t,n,vn.getCartesian4());if(typeof t=="string"||typeof n=="string")return t+n;if(typeof t=="number"&&typeof n=="number")return t+n;throw new ue(`Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateMinus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof D&&t instanceof D)return D.subtract(t,n,vn.getCartesian2());if(n instanceof h&&t instanceof h)return h.subtract(t,n,vn.getCartesian3());if(n instanceof se&&t instanceof se)return se.subtract(t,n,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t-n;throw new ue(`Operator "-" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateTimes=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof D&&t instanceof D)return D.multiplyComponents(t,n,vn.getCartesian2());if(n instanceof D&&typeof t=="number")return D.multiplyByScalar(n,t,vn.getCartesian2());if(t instanceof D&&typeof n=="number")return D.multiplyByScalar(t,n,vn.getCartesian2());if(n instanceof h&&t instanceof h)return h.multiplyComponents(t,n,vn.getCartesian3());if(n instanceof h&&typeof t=="number")return h.multiplyByScalar(n,t,vn.getCartesian3());if(t instanceof h&&typeof n=="number")return h.multiplyByScalar(t,n,vn.getCartesian3());if(n instanceof se&&t instanceof se)return se.multiplyComponents(t,n,vn.getCartesian4());if(n instanceof se&&typeof t=="number")return se.multiplyByScalar(n,t,vn.getCartesian4());if(t instanceof se&&typeof n=="number")return se.multiplyByScalar(t,n,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t*n;throw new ue(`Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateDivide=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof D&&t instanceof D)return D.divideComponents(t,n,vn.getCartesian2());if(t instanceof D&&typeof n=="number")return D.divideByScalar(t,n,vn.getCartesian2());if(n instanceof h&&t instanceof h)return h.divideComponents(t,n,vn.getCartesian3());if(t instanceof h&&typeof n=="number")return h.divideByScalar(t,n,vn.getCartesian3());if(n instanceof se&&t instanceof se)return se.divideComponents(t,n,vn.getCartesian4());if(t instanceof se&&typeof n=="number")return se.divideByScalar(t,n,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t/n;throw new ue(`Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateMod=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof D&&t instanceof D)return D.fromElements(t.x%n.x,t.y%n.y,vn.getCartesian2());if(n instanceof h&&t instanceof h)return h.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,vn.getCartesian3());if(n instanceof se&&t instanceof se)return se.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,t.w%n.w,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t%n;throw new ue(`Operator "%" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof D&&t instanceof D||n instanceof h&&t instanceof h||n instanceof se&&t instanceof se?t.equals(n):t===n};_t.prototype._evaluateNotEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof D&&t instanceof D||n instanceof h&&t instanceof h||n instanceof se&&t instanceof se?!t.equals(n):t!==n};_t.prototype._evaluateConditional=function(e){let t=this._test.evaluate(e);if(typeof t!="boolean")throw new ue(`Conditional argument of conditional expression must be a boolean. Argument is ${t}.`);return t?this._left.evaluate(e):this._right.evaluate(e)};_t.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))};_t.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))};_t.prototype._evaluateIsExactClass=function(e){return l(e)?e.isExactClass(this._left.evaluate(e)):!1};_t.prototype._evaluateIsClass=function(e){return l(e)?e.isClass(this._left.evaluate(e)):!1};_t.prototype._evaluateGetExactClassName=function(e){if(l(e))return e.getExactClassName()};_t.prototype._evaluateBooleanConversion=function(e){return!!this._left.evaluate(e)};_t.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))};_t.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))};_t.prototype._evaluateRegExp=function(e){let t=this._value.evaluate(e),n="";l(this._left)&&(n=this._left.evaluate(e));let i;try{i=new RegExp(t,n)}catch(o){throw new ue(o)}return i};_t.prototype._evaluateRegExpTest=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ue(`RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);return t.test(n)};_t.prototype._evaluateRegExpMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return t.test(n);if(n instanceof RegExp&&typeof t=="string")return n.test(t);throw new ue(`Operator "=~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateRegExpNotMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return!t.test(n);if(n instanceof RegExp&&typeof t=="string")return!n.test(t);throw new ue(`Operator "!~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};_t.prototype._evaluateRegExpExec=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ue(`RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);let i=t.exec(n);return l(i)?i[1]:null};_t.prototype._evaluateToString=function(e){let t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof D||t instanceof h||t instanceof se)return String(t);throw new ue(`Unexpected function call "${this._value}".`)};function sie(e){let t=e._left,n=t.length;for(let a=0;a1){let p=d[0],g=d[1];return g!=="1.0"&&(t.translucent=!0),`vec4(${p}, ${g})`}}else return"vec4(1.0)";return`vec4(${d[0]}, 1.0)`}else{if(c==="rgb")return i=aie(this),l(i)?vN(i):`vec4(${d[0]} / 255.0, ${d[1]} / 255.0, ${d[2]} / 255.0, 1.0)`;if(c==="rgba")return d[3]!=="1.0"&&(t.translucent=!0),i=aie(this),l(i)?vN(i):`vec4(${d[0]} / 255.0, ${d[1]} / 255.0, ${d[2]} / 255.0, ${d[3]})`;if(c==="hsl")return i=sie(this),l(i)?vN(i):`vec4(czm_HSLToRGB(vec3(${d[0]}, ${d[1]}, ${d[2]})), 1.0)`;if(c==="hsla")return i=sie(this),l(i)?(i.alpha!==1&&(t.translucent=!0),vN(i)):(d[3]!=="1.0"&&(t.translucent=!0),`vec4(czm_HSLToRGB(vec3(${d[0]}, ${d[1]}, ${d[2]})), ${d[3]})`)}break;case gt.LITERAL_VECTOR:u=o.length,m=`${c}(`;for(let p=0;p0;){let u=t.pop();if(Y.equals(u.color,a.color))d=MO(n,s,d,i,o,u.batchIds,r),a.batchIds=a.batchIds.concat(u.batchIds),a.count=d-a.offset;else{let m=d;d=MO(n,s,d,i,o,u.batchIds,r),u.offset=m,u.count=d-m,c.push(u),a=u}}e._va.indexBuffer.copyFromArrayView(s),e._indices=s,e._batchedIndices=c}function NO(e,t,n,i,o,r,s){let a=e.bytesPerIndex,c=r.length;for(let d=0;d0;){let m=t.pop();if(Y.equals(m.color,r.color))d=NO(a,c,d,n,i,m.batchIds,o),r.batchIds=r.batchIds.concat(m.batchIds),r.count=d-r.offset;else{let p=d;d=NO(a,c,d,n,i,m.batchIds,o),m.offset=p,m.count=d-p,s.push(m),r=m}}let u=e._va;e._va=e._vaSwap,e._vaSwap=u,e._batchedIndices=s}function iPe(e,t){return t.color.toRgba()-e.color.toRgba()}function oPe(e,t){if(!e._batchDirty)return!1;let n=e._batchedIndices,i=n.length,o=!1,r={};for(let s=0;s=x&&s{e.isDestroyed()||(e._error=f)}):void 0}}function _Pe(e){l(e._primitive)||(e._primitive=new Ax({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:y(e._pickObject,e)}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0)}hd.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};hd.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};hd.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};hd.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};hd.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=xPe(this)),l(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};hd.prototype.isDestroyed=function(){return!1};hd.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};var Wp=hd;function ef(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,this._geometries=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,CPe(this,i,o)}Object.defineProperties(ef.prototype,{featuresLength:{get:function(){return l(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return l(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},batchTable:{get:function(){return this._batchTable}},group:{get:function(){return this._group},set:function(e){this._group=e}}});function TPe(e){return function(t,n){l(e._geometries)&&e._geometries.updateCommands(t,n)}}function SPe(e,t){let n,i,o,r,s,a=y(e.BOXES_LENGTH,0),c=y(e.CYLINDERS_LENGTH,0),d=y(e.ELLIPSOIDS_LENGTH,0),u=y(e.SPHERES_LENGTH,0);if(a>0&&l(e.BOX_BATCH_IDS)){let f=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,f,a)}if(c>0&&l(e.CYLINDER_BATCH_IDS)){let f=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,f,c)}if(d>0&&l(e.ELLIPSOID_BATCH_IDS)){let f=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,f,d)}if(u>0&&l(e.SPHERE_BATCH_IDS)){let f=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,f,u)}let m=l(n)||l(i)||l(o)||l(r),p=a>0&&!l(n)||c>0&&!l(i)||d>0&&!l(o)||u>0&&!l(r);if(m&&p)throw new ue("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(o)&&!l(r)){let f=0;if(!l(n)&&a>0)for(n=new Uint16Array(a),s=0;s0)for(i=new Uint16Array(c),s=0;s0)for(o=new Uint16Array(d),s=0;s0)for(r=new Uint16Array(u),s=0;s0&&(g=Eo(i,n,d),n+=d,u>0&&(f=new Uint8Array(t,n,u),f=new Uint8Array(f)));let x=y(m.BOXES_LENGTH,0),_=y(m.CYLINDERS_LENGTH,0),C=y(m.ELLIPSOIDS_LENGTH,0),V=y(m.SPHERES_LENGTH,0),L=x+_+C+V,Z=new Xp(e,L,g,f,TPe(e));if(e._batchTable=Z,L===0)return;let G=e.tile.computedTransform,X;l(m.RTC_CENTER)&&(X=h.unpack(m.RTC_CENTER),M.multiplyByPoint(G,X,X));let v=SPe(m,p);if(x>0||_>0||C>0||V>0){let P,F,A,b;if(x>0){let R=p.byteOffset+m.BOXES.byteOffset;P=new Float32Array(p.buffer,R,Wp.packedBoxLength*x)}if(_>0){let R=p.byteOffset+m.CYLINDERS.byteOffset;F=new Float32Array(p.buffer,R,Wp.packedCylinderLength*_)}if(C>0){let R=p.byteOffset+m.ELLIPSOIDS.byteOffset;A=new Float32Array(p.buffer,R,Wp.packedEllipsoidLength*C)}if(V>0){let R=p.byteOffset+m.SPHERES.byteOffset;b=new Float32Array(p.buffer,R,Wp.packedSphereLength*V)}return e._geometries=new Wp({boxes:P,boxBatchIds:v.boxes,cylinders:F,cylinderBatchIds:v.cylinders,ellipsoids:A,ellipsoidBatchIds:v.ellipsoids,spheres:b,sphereBatchIds:v.spheres,center:X,modelMatrix:G,batchTable:Z,boundingVolume:e.tile.boundingVolume.boundingVolume}),e}return Promise.resolve(e)}function die(e){let t=e.featuresLength;if(!l(e._features)&&t>0){let n=new Array(t);l(e._geometries)&&e._geometries.createFeatures(e,n),e._features=n}}ef.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};ef.prototype.getFeature=function(e){return die(this),this._features[e]};ef.prototype.applyDebugSettings=function(e,t){l(this._geometries)&&this._geometries.applyDebugSettings(e,t)};ef.prototype.applyStyle=function(e){die(this),l(this._geometries)&&this._geometries.applyStyle(e,this._features)};ef.prototype.update=function(e,t){l(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),l(this._batchTable)&&this._geometries.ready&&(this._batchTable.update(e,t),this._ready=!0)};ef.prototype.pick=function(e,t,n){};ef.prototype.isDestroyed=function(){return!1};ef.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),me(this)};var iX=ef;var oln=T(S(),1);var Ren=T(S(),1);var kO={};kO.encode2D=function(e,t,n){let i=Math.pow(2,e),o={x:t,y:n},r,s,a,c=BigInt(0);for(a=i/2;a>0;a/=2)r=(o.x&a)>0?1:0,s=(o.y&a)>0?1:0,c+=BigInt((3*r^s)*a*a),uie(i,o,r,s);return c};kO.decode2D=function(e,t){let n=Math.pow(2,e),i={x:0,y:0},o,r,s,a;for(s=1,a=t;s>>0,UO=2*Nx+1,Db=4,fie=[],pie=[],RPe=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],Bb=1,rC=2,NN=[Bb,0,0,Bb|rC];function Br(e){if(!Yt.supportsBigInt())throw new ue("S2 required BigInt support");this._cellId=e,this._level=Br.getLevel(e)}Br.fromToken=function(e){return new Br(Br.getIdFromToken(e))};Br.isValidId=function(e){return!(e<=0||e>>BigInt(UO)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))};Br.isValidToken=function(e){return/^[0-9a-fA-F]{1,16}$/.test(e)?Br.isValidId(Br.getIdFromToken(e)):!1};Br.getIdFromToken=function(e){return BigInt("0x"+e+"0".repeat(16-e.length))};Br.getTokenFromId=function(e){let t=Math.floor(FPe(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n};Br.getLevel=function(e){let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e=e>>BigInt(1);return Nx-(t>>1)};Br.prototype.getChild=function(e){let t=yie(this._cellId)>>BigInt(2),n=this._cellId+BigInt(2*e+1-4)*t;return new Br(n)};Br.prototype.getParent=function(){let e=yie(this._cellId)<>1&1;return gie(i[0],o[0][r^n&1],o[1][r])}function EPe(e,t){let n=bie(e),i=n[0],o=n[1],r=n[2],s=t===30,a=!s&&(BigInt(o)^e>>BigInt(2))&BigInt(1),c=s?1:a?2:0,d=(o<<1)+c,u=(r<<1)+c;return[i,d,u]}function bie(e){fie.length===0&&PPe();let t=Number(e>>BigInt(UO)),n=t&Bb,i=(1<=0;s--){let c=(1<<2*(s===7?Nx-7*Db:Db))-1;n+=Number(e>>BigInt(s*2*Db+1)&BigInt(c))<<2,n=pie[n];let d=s*Db;o+=n>>Db+2<>2&i)<=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function mie(e){return 1/LPe*e}function IPe(e,t){let n=[[],[]],i=WPe(t);for(let o=0;o<2;++o){let r=e[o]&-i,s=r+i;n[o][0]=kN(hie(r)),n[o][1]=kN(hie(s))}return n}function WPe(e){return 1<>>0}function hie(e){return 1/VPe*e}function Yb(e,t,n,i,o,r){if(e===Db){let s=(t<>1),n+(s[0]&1),i,o,r^NN[0]),Yb(e,t+(s[1]>>1),n+(s[1]&1),i,o+1,r^NN[1]),Yb(e,t+(s[2]>>1),n+(s[2]&1),i,o+2,r^NN[2]),Yb(e,t+(s[3]>>1),n+(s[3]&1),i,o+3,r^NN[3])}}function PPe(){Yb(0,0,0,0,0,0),Yb(0,0,0,Bb,0,Bb),Yb(0,0,0,rC,0,rC),Yb(0,0,0,Bb|rC,0,Bb|rC)}function yie(e){return e&~e+BigInt(1)}function vPe(e){return BigInt(1)<>3,r=i%8;n+=e[o]>>r&1}return n}Object.defineProperties(DO.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}});DO.prototype.getBit=function(e){if(l(this._constant))return this._constant;let t=e>>3,n=e%8;return(this._bitstream[t]>>n&1)===1};var sC=DO;var Oen=T(S(),1);function vp(e){e=y(e,y.EMPTY_OBJECT);let t=e.metadataTable,n=e.class,i=e.entityId,o=e.propertyTableJson;this._class=n,this._metadataTable=t,this._entityId=i,this._extensions=o.extensions,this._extras=o.extras}Object.defineProperties(vp.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});vp.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)};vp.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)};vp.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)};vp.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)};vp.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)};vp.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)};vp.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)};var aC=vp;var zen=T(S(),1);var UN={QUADTREE:"QUADTREE",OCTREE:"OCTREE"};UN.getBranchingFactor=function(e){switch(e){case UN.OCTREE:return 8;case UN.QUADTREE:return 4}};var Yr=Object.freeze(UN);var itn=T(S(),1);var qen=T(S(),1);function $s(){}Object.defineProperties($s.prototype,{class:{get:function(){fe.throwInstantiationError()}}});$s.prototype.hasProperty=function(e){fe.throwInstantiationError()};$s.prototype.hasPropertyBySemantic=function(e){fe.throwInstantiationError()};$s.prototype.getPropertyIds=function(e){fe.throwInstantiationError()};$s.prototype.getProperty=function(e){fe.throwInstantiationError()};$s.prototype.setProperty=function(e,t){fe.throwInstantiationError()};$s.prototype.getPropertyBySemantic=function(e){fe.throwInstantiationError()};$s.prototype.setPropertyBySemantic=function(e,t){fe.throwInstantiationError()};$s.hasProperty=function(e,t,n){if(l(t[e]))return!0;let i=n.properties;if(!l(i))return!1;let o=i[e];return!!(l(o)&&l(o.default))};$s.hasPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return!1;let o=i[e];return l(o)};$s.getPropertyIds=function(e,t,n){n=l(n)?n:[],n.length=0;for(let o in e)e.hasOwnProperty(o)&&l(e[o])&&n.push(o);let i=t.properties;if(l(i))for(let o in i)i.hasOwnProperty(o)&&!l(e[o])&&l(i[o].default)&&n.push(o);return n};$s.getProperty=function(e,t,n){let i=n.properties[e],o=t[e];Array.isArray(o)&&(o=o.slice());let r=!0;if(o=i.handleNoData(o),!l(o)&&l(i.default))return o=Oe(i.default,!0),i.unpackVectorAndMatrixTypes(o,r);if(l(o))return o=i.normalize(o),o=i.applyValueTransform(o),i.unpackVectorAndMatrixTypes(o,r)};$s.setProperty=function(e,t,n,i){if(!l(n[e]))return!1;Array.isArray(t)&&(t=t.slice());let o,r=i.properties;return l(r)&&(o=r[e]),l(o)&&(t=o.packVectorAndMatrixTypes(t,!0),t=o.unapplyValueTransform(t),t=o.unnormalize(t)),n[e]=t,!0};$s.getPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return;let o=i[e];if(l(o))return $s.getProperty(o.id,t,n)};$s.setPropertyBySemantic=function(e,t,n,i){let o=i.propertiesBySemantic;if(!l(o))return!1;let r=i.propertiesBySemantic[e];return l(r)?$s.setProperty(r.id,t,n,i):!1};var Mn=$s;function wp(e){e=y(e,y.EMPTY_OBJECT);let t=e.subtreeMetadata,n=e.class,i=l(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(wp.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});wp.prototype.hasProperty=function(e){return Mn.hasProperty(e,this._properties,this._class)};wp.prototype.hasPropertyBySemantic=function(e){return Mn.hasPropertyBySemantic(e,this._properties,this._class)};wp.prototype.getPropertyIds=function(e){return Mn.getPropertyIds(this._properties,this._class,e)};wp.prototype.getProperty=function(e){return Mn.getProperty(e,this._properties,this._class)};wp.prototype.setProperty=function(e,t){return Mn.setProperty(e,t,this._properties,this._class)};wp.prototype.getPropertyBySemantic=function(e){return Mn.getPropertyBySemantic(e,this._properties,this._class)};wp.prototype.setPropertyBySemantic=function(e,t){return Mn.setPropertyBySemantic(e,t,this._properties,this._class)};var oX=wp;var Ktn=T(S(),1);var Utn=T(S(),1);var ctn=T(S(),1);var vt={INT8:"INT8",UINT8:"UINT8",INT16:"INT16",UINT16:"UINT16",INT32:"INT32",UINT32:"UINT32",INT64:"INT64",UINT64:"UINT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"};vt.getMinimum=function(e){switch(e){case vt.INT8:return-128;case vt.UINT8:return 0;case vt.INT16:return-32768;case vt.UINT16:return 0;case vt.INT32:return-2147483648;case vt.UINT32:return 0;case vt.INT64:return Yt.supportsBigInt()?BigInt("-9223372036854775808"):-Math.pow(2,63);case vt.UINT64:return Yt.supportsBigInt()?BigInt(0):0;case vt.FLOAT32:return-34028234663852886e22;case vt.FLOAT64:return-Number.MAX_VALUE}};vt.getMaximum=function(e){switch(e){case vt.INT8:return 127;case vt.UINT8:return 255;case vt.INT16:return 32767;case vt.UINT16:return 65535;case vt.INT32:return 2147483647;case vt.UINT32:return 4294967295;case vt.INT64:return Yt.supportsBigInt()?BigInt("9223372036854775807"):Math.pow(2,63)-1;case vt.UINT64:return Yt.supportsBigInt()?BigInt("18446744073709551615"):Math.pow(2,64)-1;case vt.FLOAT32:return 34028234663852886e22;case vt.FLOAT64:return Number.MAX_VALUE}};vt.isIntegerType=function(e){switch(e){case vt.INT8:case vt.UINT8:case vt.INT16:case vt.UINT16:case vt.INT32:case vt.UINT32:case vt.INT64:case vt.UINT64:return!0;default:return!1}};vt.isUnsignedIntegerType=function(e){switch(e){case vt.UINT8:case vt.UINT16:case vt.UINT32:case vt.UINT64:return!0;default:return!1}};vt.isVectorCompatible=function(e){switch(e){case vt.INT8:case vt.UINT8:case vt.INT16:case vt.UINT16:case vt.INT32:case vt.UINT32:case vt.FLOAT32:case vt.FLOAT64:return!0;default:return!1}};vt.normalize=function(e,t){return Math.max(Number(e)/Number(vt.getMaximum(t)),-1)};vt.unnormalize=function(e,t){let n=vt.getMaximum(t),i=vt.isUnsignedIntegerType(t)?0:-n;return e=W.sign(e)*Math.round(Math.abs(e)*Number(n)),(t===vt.INT64||t===vt.UINT64)&&Yt.supportsBigInt()&&(e=BigInt(e)),e>n?n:e1;if(!n&&o===1)return e;if(!n)return new Array(o).fill(e);if(!r)return new Array(i).fill(e);if(!t)return new Array(this._arrayLength*o).fill(e);let s=new Array(o).fill(e);return new Array(this._arrayLength).fill(s)};La.prototype.handleNoData=function(e){let t=this._noData;if(!l(t))return e;if(!Sie(e,t))return e};function Sie(e,t){if(!Array.isArray(e))return e===t;if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n1;return l(n)?t&&r?e.map(function(s){return n.unpack(s)}):i?n.unpackArray(e):n.unpack(e):e};La.prototype.packVectorAndMatrixTypes=function(e,t){t=y(t,!1);let n=zt.getMathType(this._type),i=this._isArray,o=zt.getComponentCount(this._type),r=i&&o>1;return l(n)?t&&r?e.map(function(s){return n.pack(s,[])}):i?n.packArray(e,[]):n.pack(e,[]):e};La.prototype.validate=function(e){if(!(!l(e)&&l(this._default)))return this._required&&!l(e)?"required property must have a value":this._isArray?UPe(this,e):Cie(this,e)};function UPe(e,t){if(!Array.isArray(t))return`value ${t} must be an array`;let n=t.length;if(!e._isVariableLengthArray&&n!==e._arrayLength)return"Array length does not match property.arrayLength";for(let i=0;i1?xie(e,t,n):void 0}if(ean.getMaximum(t))return xie(e,t,n)}function Tie(e,t){return`value ${e} of type ${t} must be finite`}function BO(e,t,n){if(!Array.isArray(e))return n(e,t);for(let i=0;i>3,i=e%8;return(t.typedArray[n]>>i&1)===1}function qPe(e,t,n){let i=e>>3,o=e%8;n?t.typedArray[i]|=1<0,s=!0;for(let a=0;a<8;++a){let c=n.getUint8(i+a);r&&(s?c!==0&&(c=~(c-1)&255,s=!1):c=~c&255),o+=c*Math.pow(256,a)}return r&&(o=-o),o}function eve(e,t){let n=t.dataView,i=e*8,o=BigInt(0),r=(n.getUint8(i+7)&128)>0,s=!0;for(let a=0;a<8;++a){let c=n.getUint8(i+a);r&&(s?c!==0&&(c=~(c-1)&255,s=!1):c=~c&255),o+=BigInt(c)*(BigInt(1)<0;){let u=t.pop();if(Y.equals(u.color,a.color))d=NO(n,s,d,i,o,u.batchIds,r),a.batchIds=a.batchIds.concat(u.batchIds),a.count=d-a.offset;else{let m=d;d=NO(n,s,d,i,o,u.batchIds,r),u.offset=m,u.count=d-m,c.push(u),a=u}}e._va.indexBuffer.copyFromArrayView(s),e._indices=s,e._batchedIndices=c}function UO(e,t,n,i,o,r,s){let a=e.bytesPerIndex,c=r.length;for(let d=0;d0;){let m=t.pop();if(Y.equals(m.color,r.color))d=UO(a,c,d,n,i,m.batchIds,o),r.batchIds=r.batchIds.concat(m.batchIds),r.count=d-r.offset;else{let p=d;d=UO(a,c,d,n,i,m.batchIds,o),m.offset=p,m.count=d-p,s.push(m),r=m}}let u=e._va;e._va=e._vaSwap,e._vaSwap=u,e._batchedIndices=s}function $2e(e,t){return t.color.toRgba()-e.color.toRgba()}function ePe(e,t){if(!e._batchDirty)return!1;let n=e._batchedIndices,i=n.length,o=!1,r={};for(let s=0;s=x&&s{e.isDestroyed()||(e._error=f)}):void 0}}function bPe(e){l(e._primitive)||(e._primitive=new Fx({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:y(e._pickObject,e)}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0)}md.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};md.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};md.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};md.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};md.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=pPe(this)),l(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};md.prototype.isDestroyed=function(){return!1};md.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};var Ip=md;function $h(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,this._geometries=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,xPe(this,i,o)}Object.defineProperties($h.prototype,{featuresLength:{get:function(){return l(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return l(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},batchTable:{get:function(){return this._batchTable}},group:{get:function(){return this._group},set:function(e){this._group=e}}});function gPe(e){return function(t,n){l(e._geometries)&&e._geometries.updateCommands(t,n)}}function yPe(e,t){let n,i,o,r,s,a=y(e.BOXES_LENGTH,0),c=y(e.CYLINDERS_LENGTH,0),d=y(e.ELLIPSOIDS_LENGTH,0),u=y(e.SPHERES_LENGTH,0);if(a>0&&l(e.BOX_BATCH_IDS)){let f=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,f,a)}if(c>0&&l(e.CYLINDER_BATCH_IDS)){let f=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,f,c)}if(d>0&&l(e.ELLIPSOID_BATCH_IDS)){let f=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,f,d)}if(u>0&&l(e.SPHERE_BATCH_IDS)){let f=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,f,u)}let m=l(n)||l(i)||l(o)||l(r),p=a>0&&!l(n)||c>0&&!l(i)||d>0&&!l(o)||u>0&&!l(r);if(m&&p)throw new ue("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(o)&&!l(r)){let f=0;if(!l(n)&&a>0)for(n=new Uint16Array(a),s=0;s0)for(i=new Uint16Array(c),s=0;s0)for(o=new Uint16Array(d),s=0;s0)for(r=new Uint16Array(u),s=0;s0&&(g=Eo(i,n,d),n+=d,u>0&&(f=new Uint8Array(t,n,u),f=new Uint8Array(f)));let x=y(m.BOXES_LENGTH,0),_=y(m.CYLINDERS_LENGTH,0),C=y(m.ELLIPSOIDS_LENGTH,0),V=y(m.SPHERES_LENGTH,0),Z=x+_+C+V,R=new Ep(e,Z,g,f,gPe(e));if(e._batchTable=R,Z===0)return;let G=e.tile.computedTransform,W;l(m.RTC_CENTER)&&(W=h.unpack(m.RTC_CENTER),A.multiplyByPoint(G,W,W));let v=yPe(m,p);if(x>0||_>0||C>0||V>0){let P,F,M,b;if(x>0){let L=p.byteOffset+m.BOXES.byteOffset;P=new Float32Array(p.buffer,L,Ip.packedBoxLength*x)}if(_>0){let L=p.byteOffset+m.CYLINDERS.byteOffset;F=new Float32Array(p.buffer,L,Ip.packedCylinderLength*_)}if(C>0){let L=p.byteOffset+m.ELLIPSOIDS.byteOffset;M=new Float32Array(p.buffer,L,Ip.packedEllipsoidLength*C)}if(V>0){let L=p.byteOffset+m.SPHERES.byteOffset;b=new Float32Array(p.buffer,L,Ip.packedSphereLength*V)}return e._geometries=new Ip({boxes:P,boxBatchIds:v.boxes,cylinders:F,cylinderBatchIds:v.cylinders,ellipsoids:M,ellipsoidBatchIds:v.ellipsoids,spheres:b,sphereBatchIds:v.spheres,center:W,modelMatrix:G,batchTable:R,boundingVolume:e.tile.boundingVolume.boundingVolume}),e}return Promise.resolve(e)}function hie(e){let t=e.featuresLength;if(!l(e._features)&&t>0){let n=new Array(t);l(e._geometries)&&e._geometries.createFeatures(e,n),e._features=n}}$h.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};$h.prototype.getFeature=function(e){return hie(this),this._features[e]};$h.prototype.applyDebugSettings=function(e,t){l(this._geometries)&&this._geometries.applyDebugSettings(e,t)};$h.prototype.applyStyle=function(e){hie(this),l(this._geometries)&&this._geometries.applyStyle(e,this._features)};$h.prototype.update=function(e,t){l(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),l(this._batchTable)&&this._geometries.ready&&(this._batchTable.update(e,t),this._ready=!0)};$h.prototype.pick=function(e,t,n){};$h.prototype.isDestroyed=function(){return!1};$h.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),me(this)};var iW=$h;var $cn=S(T(),1);var Sen=S(T(),1);var kO={};kO.encode2D=function(e,t,n){let i=Math.pow(2,e),o={x:t,y:n},r,s,a,c=BigInt(0);for(a=i/2;a>0;a/=2)r=(o.x&a)>0?1:0,s=(o.y&a)>0?1:0,c+=BigInt((3*r^s)*a*a),fie(i,o,r,s);return c};kO.decode2D=function(e,t){let n=Math.pow(2,e),i={x:0,y:0},o,r,s,a;for(s=1,a=t;s>>0,DO=2*Mx+1,k0=4,gie=[],yie=[],TPe=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],D0=1,oC=2,UN=[D0,0,0,D0|oC];function Or(e){if(!Yt.supportsBigInt())throw new ue("S2 required BigInt support");this._cellId=e,this._level=Or.getLevel(e)}Or.fromToken=function(e){return new Or(Or.getIdFromToken(e))};Or.isValidId=function(e){return!(e<=0||e>>BigInt(DO)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))};Or.isValidToken=function(e){return/^[0-9a-fA-F]{1,16}$/.test(e)?Or.isValidId(Or.getIdFromToken(e)):!1};Or.getIdFromToken=function(e){return BigInt("0x"+e+"0".repeat(16-e.length))};Or.getTokenFromId=function(e){let t=Math.floor(XPe(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n};Or.getLevel=function(e){let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e=e>>BigInt(1);return Mx-(t>>1)};Or.prototype.getChild=function(e){let t=Sie(this._cellId)>>BigInt(2),n=this._cellId+BigInt(2*e+1-4)*t;return new Or(n)};Or.prototype.getParent=function(){let e=Sie(this._cellId)<>1&1;return _ie(i[0],o[0][r^n&1],o[1][r])}function ZPe(e,t){let n=xie(e),i=n[0],o=n[1],r=n[2],s=t===30,a=!s&&(BigInt(o)^e>>BigInt(2))&BigInt(1),c=s?1:a?2:0,d=(o<<1)+c,u=(r<<1)+c;return[i,d,u]}function xie(e){gie.length===0&&EPe();let t=Number(e>>BigInt(DO)),n=t&D0,i=(1<=0;s--){let c=(1<<2*(s===7?Mx-7*k0:k0))-1;n+=Number(e>>BigInt(s*2*k0+1)&BigInt(c))<<2,n=yie[n];let d=s*k0;o+=n>>k0+2<>2&i)<=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function pie(e){return 1/SPe*e}function RPe(e,t){let n=[[],[]],i=GPe(t);for(let o=0;o<2;++o){let r=e[o]&-i,s=r+i;n[o][0]=kN(bie(r)),n[o][1]=kN(bie(s))}return n}function GPe(e){return 1<>>0}function bie(e){return 1/_Pe*e}function B0(e,t,n,i,o,r){if(e===k0){let s=(t<>1),n+(s[0]&1),i,o,r^UN[0]),B0(e,t+(s[1]>>1),n+(s[1]&1),i,o+1,r^UN[1]),B0(e,t+(s[2]>>1),n+(s[2]&1),i,o+2,r^UN[2]),B0(e,t+(s[3]>>1),n+(s[3]&1),i,o+3,r^UN[3])}}function EPe(){B0(0,0,0,0,0,0),B0(0,0,0,D0,0,D0),B0(0,0,0,oC,0,oC),B0(0,0,0,D0|oC,0,D0|oC)}function Sie(e){return e&~e+BigInt(1)}function WPe(e){return BigInt(1)<>3,r=i%8;n+=e[o]>>r&1}return n}Object.defineProperties(BO.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}});BO.prototype.getBit=function(e){if(l(this._constant))return this._constant;let t=e>>3,n=e%8;return(this._bitstream[t]>>n&1)===1};var rC=BO;var Uen=S(T(),1);function Pp(e){e=y(e,y.EMPTY_OBJECT);let t=e.metadataTable,n=e.class,i=e.entityId,o=e.propertyTableJson;this._class=n,this._metadataTable=t,this._entityId=i,this._extensions=o.extensions,this._extras=o.extras}Object.defineProperties(Pp.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Pp.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)};Pp.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)};Pp.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)};Pp.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)};Pp.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)};Pp.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)};Pp.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)};var sC=Pp;var Den=S(T(),1);var DN={QUADTREE:"QUADTREE",OCTREE:"OCTREE"};DN.getBranchingFactor=function(e){switch(e){case DN.OCTREE:return 8;case DN.QUADTREE:return 4}};var zr=Object.freeze(DN);var qen=S(T(),1);var Ken=S(T(),1);function ea(){}Object.defineProperties(ea.prototype,{class:{get:function(){fe.throwInstantiationError()}}});ea.prototype.hasProperty=function(e){fe.throwInstantiationError()};ea.prototype.hasPropertyBySemantic=function(e){fe.throwInstantiationError()};ea.prototype.getPropertyIds=function(e){fe.throwInstantiationError()};ea.prototype.getProperty=function(e){fe.throwInstantiationError()};ea.prototype.setProperty=function(e,t){fe.throwInstantiationError()};ea.prototype.getPropertyBySemantic=function(e){fe.throwInstantiationError()};ea.prototype.setPropertyBySemantic=function(e,t){fe.throwInstantiationError()};ea.hasProperty=function(e,t,n){if(l(t[e]))return!0;let i=n.properties;if(!l(i))return!1;let o=i[e];return!!(l(o)&&l(o.default))};ea.hasPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return!1;let o=i[e];return l(o)};ea.getPropertyIds=function(e,t,n){n=l(n)?n:[],n.length=0;for(let o in e)e.hasOwnProperty(o)&&l(e[o])&&n.push(o);let i=t.properties;if(l(i))for(let o in i)i.hasOwnProperty(o)&&!l(e[o])&&l(i[o].default)&&n.push(o);return n};ea.getProperty=function(e,t,n){let i=n.properties[e],o=t[e];Array.isArray(o)&&(o=o.slice());let r=!0;if(o=i.handleNoData(o),!l(o)&&l(i.default))return o=Oe(i.default,!0),i.unpackVectorAndMatrixTypes(o,r);if(l(o))return o=i.normalize(o),o=i.applyValueTransform(o),i.unpackVectorAndMatrixTypes(o,r)};ea.setProperty=function(e,t,n,i){if(!l(n[e]))return!1;Array.isArray(t)&&(t=t.slice());let o,r=i.properties;return l(r)&&(o=r[e]),l(o)&&(t=o.packVectorAndMatrixTypes(t,!0),t=o.unapplyValueTransform(t),t=o.unnormalize(t)),n[e]=t,!0};ea.getPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return;let o=i[e];if(l(o))return ea.getProperty(o.id,t,n)};ea.setPropertyBySemantic=function(e,t,n,i){let o=i.propertiesBySemantic;if(!l(o))return!1;let r=i.propertiesBySemantic[e];return l(r)?ea.setProperty(r.id,t,n,i):!1};var Mn=ea;function vp(e){e=y(e,y.EMPTY_OBJECT);let t=e.subtreeMetadata,n=e.class,i=l(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(vp.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});vp.prototype.hasProperty=function(e){return Mn.hasProperty(e,this._properties,this._class)};vp.prototype.hasPropertyBySemantic=function(e){return Mn.hasPropertyBySemantic(e,this._properties,this._class)};vp.prototype.getPropertyIds=function(e){return Mn.getPropertyIds(this._properties,this._class,e)};vp.prototype.getProperty=function(e){return Mn.getProperty(e,this._properties,this._class)};vp.prototype.setProperty=function(e,t){return Mn.setProperty(e,t,this._properties,this._class)};vp.prototype.getPropertyBySemantic=function(e){return Mn.getPropertyBySemantic(e,this._properties,this._class)};vp.prototype.setPropertyBySemantic=function(e,t){return Mn.setPropertyBySemantic(e,t,this._properties,this._class)};var oW=vp;var Btn=S(T(),1);var Ftn=S(T(),1);var itn=S(T(),1);var vt={INT8:"INT8",UINT8:"UINT8",INT16:"INT16",UINT16:"UINT16",INT32:"INT32",UINT32:"UINT32",INT64:"INT64",UINT64:"UINT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"};vt.getMinimum=function(e){switch(e){case vt.INT8:return-128;case vt.UINT8:return 0;case vt.INT16:return-32768;case vt.UINT16:return 0;case vt.INT32:return-2147483648;case vt.UINT32:return 0;case vt.INT64:return Yt.supportsBigInt()?BigInt("-9223372036854775808"):-Math.pow(2,63);case vt.UINT64:return Yt.supportsBigInt()?BigInt(0):0;case vt.FLOAT32:return-34028234663852886e22;case vt.FLOAT64:return-Number.MAX_VALUE}};vt.getMaximum=function(e){switch(e){case vt.INT8:return 127;case vt.UINT8:return 255;case vt.INT16:return 32767;case vt.UINT16:return 65535;case vt.INT32:return 2147483647;case vt.UINT32:return 4294967295;case vt.INT64:return Yt.supportsBigInt()?BigInt("9223372036854775807"):Math.pow(2,63)-1;case vt.UINT64:return Yt.supportsBigInt()?BigInt("18446744073709551615"):Math.pow(2,64)-1;case vt.FLOAT32:return 34028234663852886e22;case vt.FLOAT64:return Number.MAX_VALUE}};vt.isIntegerType=function(e){switch(e){case vt.INT8:case vt.UINT8:case vt.INT16:case vt.UINT16:case vt.INT32:case vt.UINT32:case vt.INT64:case vt.UINT64:return!0;default:return!1}};vt.isUnsignedIntegerType=function(e){switch(e){case vt.UINT8:case vt.UINT16:case vt.UINT32:case vt.UINT64:return!0;default:return!1}};vt.isVectorCompatible=function(e){switch(e){case vt.INT8:case vt.UINT8:case vt.INT16:case vt.UINT16:case vt.INT32:case vt.UINT32:case vt.FLOAT32:case vt.FLOAT64:return!0;default:return!1}};vt.normalize=function(e,t){return Math.max(Number(e)/Number(vt.getMaximum(t)),-1)};vt.unnormalize=function(e,t){let n=vt.getMaximum(t),i=vt.isUnsignedIntegerType(t)?0:-n;return e=X.sign(e)*Math.round(Math.abs(e)*Number(n)),(t===vt.INT64||t===vt.UINT64)&&Yt.supportsBigInt()&&(e=BigInt(e)),e>n?n:e1;if(!n&&o===1)return e;if(!n)return new Array(o).fill(e);if(!r)return new Array(i).fill(e);if(!t)return new Array(this._arrayLength*o).fill(e);let s=new Array(o).fill(e);return new Array(this._arrayLength).fill(s)};La.prototype.handleNoData=function(e){let t=this._noData;if(!l(t))return e;if(!Zie(e,t))return e};function Zie(e,t){if(!Array.isArray(e))return e===t;if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n1;return l(n)?t&&r?e.map(function(s){return n.unpack(s)}):i?n.unpackArray(e):n.unpack(e):e};La.prototype.packVectorAndMatrixTypes=function(e,t){t=y(t,!1);let n=Kt.getMathType(this._type),i=this._isArray,o=Kt.getComponentCount(this._type),r=i&&o>1;return l(n)?t&&r?e.map(function(s){return n.pack(s,[])}):i?n.packArray(e,[]):n.pack(e,[]):e};La.prototype.validate=function(e){if(!(!l(e)&&l(this._default)))return this._required&&!l(e)?"required property must have a value":this._isArray?APe(this,e):Lie(this,e)};function APe(e,t){if(!Array.isArray(t))return`value ${t} must be an array`;let n=t.length;if(!e._isVariableLengthArray&&n!==e._arrayLength)return"Array length does not match property.arrayLength";for(let i=0;i1?Tie(e,t,n):void 0}if(ean.getMaximum(t))return Tie(e,t,n)}function Vie(e,t){return`value ${e} of type ${t} must be finite`}function YO(e,t,n){if(!Array.isArray(e))return n(e,t);for(let i=0;i>3,i=e%8;return(t.typedArray[n]>>i&1)===1}function HPe(e,t,n){let i=e>>3,o=e%8;n?t.typedArray[i]|=1<0,s=!0;for(let a=0;a<8;++a){let c=n.getUint8(i+a);r&&(s?c!==0&&(c=~(c-1)&255,s=!1):c=~c&255),o+=c*Math.pow(256,a)}return r&&(o=-o),o}function QPe(e,t){let n=t.dataView,i=e*8,o=BigInt(0),r=(n.getUint8(i+7)&128)>0,s=!0;for(let a=0;a<8;++a){let c=n.getUint8(i+a);r&&(s?c!==0&&(c=~(c-1)&255,s=!1):c=~c&255),o+=BigInt(c)*(BigInt(1)<96?_-97:_>64?_-39:_+4}for(var C=0,x=0;x=3),c(n.exports.meshopt_spatialSortRemap,g,g.length/f,f*4)},encodeVertexBuffer:function(g,f,x){r(x>0&&x<=256),r(x%4==0);var _=n.exports.meshopt_encodeVertexBufferBound(f,x);return d(n.exports.meshopt_encodeVertexBuffer,_,g,f,x)},encodeIndexBuffer:function(g,f,x){r(x==2||x==4),r(f%3==0);var _=m(g,x),C=n.exports.meshopt_encodeIndexBufferBound(f,u(_)+1);return d(n.exports.meshopt_encodeIndexBuffer,C,_,f,4)},encodeIndexSequence:function(g,f,x){r(x==2||x==4);var _=m(g,x),C=n.exports.meshopt_encodeIndexSequenceBound(f,u(_)+1);return d(n.exports.meshopt_encodeIndexSequence,C,_,f,4)},encodeGltfBuffer:function(g,f,x,_){var C={ATTRIBUTES:this.encodeVertexBuffer,TRIANGLES:this.encodeIndexBuffer,INDICES:this.encodeIndexSequence};return r(C[_]),C[_](g,f,x)},encodeFilterOct:function(g,f,x,_){return r(x==4||x==8),r(_>=1&&_<=16),p(n.exports.meshopt_encodeFilterOct,g,f,x,_,16)},encodeFilterQuat:function(g,f,x,_){return r(x==8),r(_>=4&&_<=16),p(n.exports.meshopt_encodeFilterQuat,g,f,x,_,16)},encodeFilterExp:function(g,f,x,_,C){r(x>0&&x%4==0),r(_>=1&&_<=24);var V={Separate:0,SharedVector:1,SharedComponent:2};return p(n.exports.meshopt_encodeFilterExp,g,f,x,_,x,C?V[C]:1)}}}();var hnn=T(S()),Gie=function(){var e="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq;d8Yqdbk:yzeHu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhlaicefhodnadTmbalc;WFbGglcjdalcjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfglcl4cifcd4hxdndndndnalc9WGgmTmbcbhPcehsawcjdfhzaohHinaraH9Rax6midnaraHaxfgo9RcK6mbczhlcbhOinalgic9WfgAawcj;cbffhldndndndndnaHaAco4fRbbaOcoG4ciGPlbedibkal9cb83ibalcwf9cb83ibxikalaoRblaoRbbgAco4gCaCciSgCE86bbawcj;cbfaifglcGfaoclfaCfgCRbbaAcl4ciGgXaXciSgXE86bbalcVfaCaXfgCRbbaAcd4ciGgXaXciSgXE86bbalc7faCaXfgCRbbaAciGgAaAciSgAE86bbalctfaCaAfgCRbbaoRbegAco4gXaXciSgXE86bbalc91faCaXfgCRbbaAcl4ciGgXaXciSgXE86bbalc4faCaXfgCRbbaAcd4ciGgXaXciSgXE86bbalc93faCaXfgCRbbaAciGgAaAciSgAE86bbalc94faCaAfgCRbbaoRbdgAco4gXaXciSgXE86bbalc95faCaXfgCRbbaAcl4ciGgXaXciSgXE86bbalc96faCaXfgCRbbaAcd4ciGgXaXciSgXE86bbalc97faCaXfgCRbbaAciGgAaAciSgAE86bbalc98faCaAfgARbbaoRbigoco4gCaCciSgCE86bbalc99faAaCfgARbbaocl4ciGgCaCciSgCE86bbalc9:faAaCfgARbbaocd4ciGgCaCciSgCE86bbalcufaAaCfglRbbaociGgoaociSgoE86bbalaofhoxdkalaoRbwaoRbbgAcl4gCaCcsSgCE86bbawcj;cbfaifglcGfaocwfaCfgCRbbaAcsGgAaAcsSgAE86bbalcVfaCaAfgARbbaoRbegCcl4gXaXcsSgXE86bbalc7faAaXfgARbbaCcsGgCaCcsSgCE86bbalctfaAaCfgARbbaoRbdgCcl4gXaXcsSgXE86bbalc91faAaXfgARbbaCcsGgCaCcsSgCE86bbalc4faAaCfgARbbaoRbigCcl4gXaXcsSgXE86bbalc93faAaXfgARbbaCcsGgCaCcsSgCE86bbalc94faAaCfgARbbaoRblgCcl4gXaXcsSgXE86bbalc95faAaXfgARbbaCcsGgCaCcsSgCE86bbalc96faAaCfgARbbaoRbvgCcl4gXaXcsSgXE86bbalc97faAaXfgARbbaCcsGgCaCcsSgCE86bbalc98faAaCfgARbbaoRbogCcl4gXaXcsSgXE86bbalc99faAaXfgARbbaCcsGgCaCcsSgCE86bbalc9:faAaCfgARbbaoRbrgocl4gCaCcsSgCE86bbalcufaAaCfglRbbaocsGgoaocsSgoE86bbalaofhoxekalao8Pbb83bbalcwfaocwf8Pbb83bbaoczfhokdnaiam9pmbaOcdfhOaiczfhlarao9RcL0mekkaiam6miaoTmidnakTmbawaPfRbbhOawcj;cbfhlazhiakhAinaialRbbgHce4cbaHceG9R7aOfgO86bbaiadfhialcefhlaAcufgAmbkkazcefhzaPcefgPad6hsaohHaPad9hmexvkkcbhoasceGmdxikaoaxad2fhXdnakTmbcbhmcehsawcjdfhCinarao9Rax6miaoTmdaoaxfhoawamfRbbhOawcj;cbfhlaChiakhAinaialRbbgHce4cbaHceG9R7aOfgO86bbaiadfhialcefhlaAcufgAmbkaCcefhCamcefgmad6hsamad9hmbkaXhoxikcbhlcehsinarao9Rax6mdaoTmeaoaxfhoalcefglad6hsadal9hmbkaXhoxdkcbhoasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqaombkc9:hoxekcbc99arao9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;xzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfalaDcu7gPcl4fcsGcitfgsydlhzasydbhHdnaDcsGgDak9pmbavaiaPfcsGcdtfydbaxaDEhsaDThDdndnadcd9hmbabarcetfgPaH87ebaPcdfaz87ebaPclfas87ebxekabarcdtfgPaHBdbaPclfazBdbaPcwfasBdbkaxaDfhxavc;abfalcitfgPasBdbaPazBdlavaicdtfasBdbavc;abfalcefcsGglcitfgPaHBdbaPasBdlaiaDfhialcefhlxdkdndnaDcsSmbamaDfaDc987fcefhmxekaocefhDao8SbbgscFeGhPdndnascu9mmbaDhoxekaocvfhoaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhokaPce4cbaPceG9R7amfhmkdndnadcd9hmbabarcetfgDaH87ebaDcdfaz87ebaDclfam87ebxekabarcdtfgDaHBdbaDclfazBdbaDcwfamBdbkavc;abfalcitfgDamBdbaDazBdlavaicdtfamBdbavc;abfalcefcsGglcitfgDaHBdbaDamBdlaicefhialcefhlxekdnaDcpe0mbaxcefgOavaiaqaDcsGfRbbgscl49RcsGcdtfydbascz6gPEhDavaias9RcsGcdtfydbaOaPfgzascsGgOEhsaOThOdndnadcd9hmbabarcetfgHax87ebaHcdfaD87ebaHclfas87ebxekabarcdtfgHaxBdbaHclfaDBdbaHcwfasBdbkavaicdtfaxBdbavc;abfalcitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfalcefcsGcitfgHasBdbaHaDBdlavaiaPfcsGgicdtfasBdbavc;abfalcdfcsGglcitfgDaxBdbaDasBdlalcefhlaiaOfhiazaOfhxxekaxcbaoRbbgHEgAaDc;:eSgDfhzaHcsGhCaHcl4hXdndnaHcs0mbazcefhOxekazhOavaiaX9RcsGcdtfydbhzkdndnaCmbaOcefhxxekaOhxavaiaH9RcsGcdtfydbhOkdndnaDTmbaocefhDxekaocdfhDao8SbegPcFeGhsdnaPcu9kmbaocofhAascFbGhscrhodninaD8SbbgPcFbGaotasVhsaPcu9kmeaDcefhDaocrfgoc8J9hmbkaAhDxekaDcefhDkasce4cbasceG9R7amfgmhAkdndnaXcsSmbaDhsxekaDcefhsaD8SbbgocFeGhPdnaocu9kmbaDcvfhzaPcFbGhPcrhodninas8SbbgDcFbGaotaPVhPaDcu9kmeascefhsaocrfgoc8J9hmbkazhsxekascefhskaPce4cbaPceG9R7amfgmhzkdndnaCcsSmbashoxekascefhoas8SbbgDcFeGhPdnaDcu9kmbascvfhOaPcFbGhPcrhDdninao8SbbgscFbGaDtaPVhPascu9kmeaocefhoaDcrfgDc8J9hmbkaOhoxekaocefhokaPce4cbaPceG9R7amfgmhOkdndnadcd9hmbabarcetfgDaA87ebaDcdfaz87ebaDclfaO87ebxekabarcdtfgDaABdbaDclfazBdbaDcwfaOBdbkavc;abfalcitfgDazBdbaDaABdlavaicdtfaABdbavc;abfalcefcsGcitfgDaOBdbaDazBdlavaicefgicsGcdtfazBdbavc;abfalcdfcsGcitfgDaABdbaDaOBdlavaiaHcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiarcifgrae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabaiavcefciGfcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabaiavcdfciGfcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabaiavcufciGfcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabaiavciGfcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb",t="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;b9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;e8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincbhHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAcd0hHalhOaAcefgAclSmdxekkcbhlaHceGTmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;tzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfalaDcu7gPcl4fcsGcitfgsydlhzasydbhHdnaDcsGgDak9pmbavaiaPfcsGcdtfydbaxaDEhsaDThDdndnadcd9hmbabarcetfgPaH87ebaPcdfaz87ebaPclfas87ebxekabarcdtfgPaHBdbaPclfazBdbaPcwfasBdbkaxaDfhxavc;abfalcitfgPasBdbaPazBdlavaicdtfasBdbavc;abfalcefcsGglcitfgPaHBdbaPasBdlaiaDfhialcefhlxdkdndnaDcsSmbamaDfaDc987fcefhmxekaocefhDao8SbbgscFeGhPdndnascu9mmbaDhoxekaocvfhoaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhokaPce4cbaPceG9R7amfhmkdndnadcd9hmbabarcetfgDaH87ebaDcdfaz87ebaDclfam87ebxekabarcdtfgDaHBdbaDclfazBdbaDcwfamBdbkavc;abfalcitfgDamBdbaDazBdlavaicdtfamBdbavc;abfalcefcsGglcitfgDaHBdbaDamBdlaicefhialcefhlxekdnaDcpe0mbaxcefgOavaiaqaDcsGfRbbgscl49RcsGcdtfydbascz6gPEhDavaias9RcsGcdtfydbaOaPfgzascsGgOEhsaOThOdndnadcd9hmbabarcetfgHax87ebaHcdfaD87ebaHclfas87ebxekabarcdtfgHaxBdbaHclfaDBdbaHcwfasBdbkavaicdtfaxBdbavc;abfalcitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfalcefcsGcitfgHasBdbaHaDBdlavaiaPfcsGgicdtfasBdbavc;abfalcdfcsGglcitfgDaxBdbaDasBdlalcefhlaiaOfhiazaOfhxxekaxcbaoRbbgHEgAaDc;:eSgDfhzaHcsGhCaHcl4hXdndnaHcs0mbazcefhOxekazhOavaiaX9RcsGcdtfydbhzkdndnaCmbaOcefhxxekaOhxavaiaH9RcsGcdtfydbhOkdndnaDTmbaocefhDxekaocdfhDao8SbegPcFeGhsdnaPcu9kmbaocofhAascFbGhscrhodninaD8SbbgPcFbGaotasVhsaPcu9kmeaDcefhDaocrfgoc8J9hmbkaAhDxekaDcefhDkasce4cbasceG9R7amfgmhAkdndnaXcsSmbaDhsxekaDcefhsaD8SbbgocFeGhPdnaocu9kmbaDcvfhzaPcFbGhPcrhodninas8SbbgDcFbGaotaPVhPaDcu9kmeascefhsaocrfgoc8J9hmbkazhsxekascefhskaPce4cbaPceG9R7amfgmhzkdndnaCcsSmbashoxekascefhoas8SbbgDcFeGhPdnaDcu9kmbascvfhOaPcFbGhPcrhDdninao8SbbgscFbGaDtaPVhPascu9kmeaocefhoaDcrfgDc8J9hmbkaOhoxekaocefhokaPce4cbaPceG9R7amfgmhOkdndnadcd9hmbabarcetfgDaA87ebaDcdfaz87ebaDclfaO87ebxekabarcdtfgDaABdbaDclfazBdbaDcwfaOBdbkavc;abfalcitfgDazBdbaDaABdlavaicdtfaABdbavc;abfalcefcsGcitfgDaOBdbaDazBdlavaicefgicsGcdtfazBdbavc;abfalcdfcsGcitfgDaABdbaDaOBdlavaiaHcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiarcifgrae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:wPliuo97eue978Jjjjjbca9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskdnalTmbcbhvabhdinadczfgxaxpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabalcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnaval9pmbaialciGgecdtgdVcbc;abad9R;8kbaiabavcdtfgvad;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkavaiad;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb",n=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var o=WebAssembly.validate(n)?t:e,r,s=WebAssembly.instantiate(a(o),{}).then(function(C){r=C.instance,r.exports.__wasm_call_ctors()});function a(C){for(var V=new Uint8Array(C.length),L=0;L96?Z-97:Z>64?Z-39:Z+4}for(var G=0,L=0;L0?x(C,V,L,u[Z],d[G]):s.then(function(){var X=new Uint8Array(C*V);return c(r,r.exports[u[Z]],X,C,V,L,r.exports[d[G]]),X})}}}();var bnn=T(S()),fnn=function(){var e="b9H79Tebbbe9Ek9Geueu9Geub9Gbb9GPuuuuuuuuuuu99uueu9Gvuuuuub9Gluuuub9Gquuuuuuu99uueu9Gwuuuuuu99ueu9Giuuue999Gluuuueu9GiuuueuizsdilvoirwDbqqbeqlve9Weiiviebeoweuec:G;jekr:Tewo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bbz9TW79O9V9Wt9F79P9T9W29P9M95bl8E9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9OcttV9P9I91tW7bvQ9TW79O9V9Wt9F79P9T9W29P9M959q9V9P9Ut7boX9TW79O9V9Wt9F79P9T9W29P9M959t9J9H2Wbra9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9Wbwl79IV9RbDDwebcekdxmq::9Usdbk;i6iKuY99Ou8Jjjjjbc;W;ab9RgP8KjjjjbaPcwfcbc;Kbz:ljjjb8AaPcualcefgscdtascFFFFi0Ecbyd1:jjjbHjjjjbbgzBdwaPceBd9OaPazBdbaPcuadcitadcFFFFe0Ecbyd1:jjjbHjjjjbbgHBdxaPcdBd9OaPaHBdlaPaeadalcbz:cjjjbaPcualcdtgOalcFFFFi0EgAcbyd1:jjjbHjjjjbbgCBdzaPciBd9OaPaAcbyd1:jjjbHjjjjbbgXBdCaPclBd9Oalcd4alfhQcehLinaLgscethLasaQ6mbkcbhKaPcuascdtgLascFFFFi0Ecbyd1:jjjbHjjjjbbgQBdKaPcvBd9OaQcFeaLz:ljjjbhYdnalTmbavcd4h8AascufhEinaiaKa8A2cdtfg3ydlgscH4as7c:F:b:DD2a3ydbgscH4as7c;D;O:B8J27a3ydwgscH4as7c:3F;N8N27hQcbhsdndninaYaQaEGgQcdtfg5ydbgLcuSmeaiaLa8A2cdtfa3cxz:ojjjbTmdascefgsaQfhQasaE9nmbxdkka5aKBdbaKhLkaCaKcdtfaLBdbaKcefgKal9hmbkcbhsaXhLinaLasBdbaLclfhLalascefgs9hmbkcbhsaChLaXhQindnasaLydbgESmbaQaXaEcdtfgEydbBdbaEasBdbkaLclfhLaQclfhQalascefgs9hmbkkcbh8EaYcbyd:m:jjjbH:bjjjbbaPclBd9OaPalcbyd1:jjjbHjjjjbbgEBdKaPcvBd9OaPaAcbyd1:jjjbHjjjjbbgsBd3aPcoBd9OaPaAcbyd1:jjjbHjjjjbbgLBdaaPcrBd9OascFeaOz:ljjjbh8FaLcFeaOz:ljjjbhadnalTmbaHcwfhhindnaza8EgQcefg8Ecdtfydbg3azaQcdtgsfydbgLSmba3aL9RhOaHaLcitfhgaaasfh8Ja8FasfhKcbh8Aindndnaga8Acitfydbg5aQ9hmbaKaQBdba8JaQBdbxekdnaza5cdtg8KfgsclfydbgLasydbgsSmbaHascitg3fydbaQSmeaLas9Rh8Lascu7aLfhYaha3fhLcbhsinaYasSmeascefhsaLydbh3aLcwfhLa3aQ9hmbkasa8L6mekaaa8KfgsaQa5asydbcuSEBdbaKa5aQaKydbcuSEBdbka8Acefg8AaO9hmbkka8Eal9hmbkaChLaXhQaah3a8Fh8AcbhsindndnasaLydbg59hmbdnasaQydbg59hmba8Aydbh5dna3ydbgYcu9hmba5cu9hmbaEasfcb86bbxikaEasfhKdnasaYSmbasa5SmbaKce86bbxikaKcl86bbxdkdnasaXa5cdtgYfydb9hmbdna3ydbgKcuSmbasaKSmba8AydbgOcuSmbasaOSmbaaaYfydbggcuSmbaga5Smba8FaYfydbgYcuSmbaYa5SmbdnaCaKcdtfydbaCaYcdtfydb9hmbaCaOcdtfydbaCagcdtfydb9hmbaEasfcd86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dbasIdbMUdbasclfg8AaQclfIdba8AIdbMUdbascwfg8AaQcwfIdba8AIdbMUdbascxfgsaQcxfIdbasIdbMUdbaLczfhLa3cufg3mbkawaOaD2cltfh5cbhLaDh3ina5aLfgsaPc;WbfaLfgQIdbasIdbMUdbasclfg8AaQclfIdba8AIdbMUdbascwfg8AaQcwfIdba8AIdbMUdbascxfgsaQcxfIdbasIdbMUdbaLczfhLa3cufg3mbkaYcifgYad6mbkkdnabaeSmbabaeadcdtz:kjjjb8AkaPydbhZcbhsdnalTmbaZclfhsaZydbh3aEhLalh8AcbhQincbasydbg5a39RaLRbbcpeGEaQfhQaLcefhLasclfhsa5h3a8Acufg8AmbkaQce4hskcuadas9Rcifgrcx2arc;v:Q;v:Qe0Ecbyd1:jjjbHjjjjbbh8LaPcwfaPyd9Ogscdtfa8LBdbaPascefgLBd9OaPcwfaLcdtfcuarcdtarcFFFFi0Ecbyd1:jjjbHjjjjbbgxBdbaPascdfgLBd9OaPcwfaLcdtfaAcbyd1:jjjbHjjjjbbgHBdbaPascifgLBd9OaPcwfaLcdtfalcbyd1:jjjbHjjjjbbgnBdbaPasclfBd9OJbbbbh8Ydnadaq9nmbdnarci6mbakakNh8VaDclthca8Lcwfh9cJbbbbh8YinaPabadghalaCz:cjjjbabhOcbhzcbhKincbhsindnaCaOasfydbgQcdtgYfydbg8AaCabasc;m1jjbfydbaKfcdtfydbgLcdtfydbg5SmbaEaLfRbbgecv2aEaQfRbbg3fc;G1jjbfRbbg8Ka3cv2aefggc;G1jjbfRbbgiVcFeGTmbdnagc:W1jjbfRbbTmba5a8A0mekdna3ae9hmba3cufcFeGce0mba8FaYfydbaL9hmeka8Lazcx2fg3aLaQaicFeGg8AEBdla3aQaLa8AEBdba3a8Aa8KGcb9hBdwazcefhzkasclfgscx9hmbkdnaKcifgKah9pmbaOcxfhOazcifar9nmekkdnazmbahhdxikcbheinJbbbbJbbjZa8EaCa8Laecx2fg3ydlg8Aa3ydbg5a3ydwgLEgKcdtfydb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dlasIdlMUdlasaLIdwasIdwMUdwasaLIdxasIdxMUdxasaLIdzasIdzMUdzasaLIdCasIdCMUdCasaLIdKasIdKMUdKasaLId3asId3MUd3asaLIdaasIdaMUdaasaLId8KasId8KMUd8KasaLIdyasIdyMUdyaca9n2heaca32hYawhLaDh8AinaLaYfgsaLaefgQIdbasIdbMUdbasclfg5aQclfIdba5IdbMUdbascwfg5aQcwfIdba5IdbMUdbascxfgsaQcxfIdbasIdbMUdbaLczfhLa8Acufg8AmbkkaOcwfhLdndndndnaEaKfgQRbbc9:fPdebdkaKhsinaHascdtgsfa3BdbaXasfydbgsaK9hmbxikkaXa9kfydbhsaXa9mfydbhKaHa9mfa6Bdbash6kaHaKcdtfa6Bdbka9oce86bba0ce86bbaLIdbg8Pa8Ya8Ya8P9DEh8Ya9ecefh9ececdaQRbbceSEaifhikagcefggaz9hmbkkdna9embahhdxikdnalTmbcbhLa8FhsindnasydbgQcuSmbdnaLaHaQcdtg3fydbgQ9hmba8Fa3fydbhQkasaQBdbkasclfhsalaLcefgL9hmbkcbhLaahsindnasydbgQcuSmbdnaLaHaQcdtg3fydbgQ9hmbaaa3fydbhQkasaQBdbkasclfhsalaLcefgL9hmbkkcbhdabhscbh8AindnaHasydbcdtfydbgLaHasclfydbcdtfydbgQSmbaLaHascwfydbcdtfydbg3SmbaQa3Smbabadcdtfg5aLBdba5clfaQBdba5cwfa3Bdbadcifhdkascxfhsa8Acifg8Aah6mbkadaq9nmdxbkkaPabadalaCz:cjjjbkdnamTmbama8Y:rUdbkaPyd9OgscdtaPcwffc98fhCdninasTmeaCydbcbyd:m:jjjbH:bjjjbbaCc98fhCascufhsxbkkaPc;W;abf8Kjjjjbadk;:ieouabydlhvabydbclfcbaicdtz:ljjjbhoadci9UhrdnadTmbdnalTmbaehwadhDinaoalawydbcdtfydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbxdkkaehwadhDinaoawydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbkkdnaiTmbcbhDaohwinawydbhqawaDBdbawclfhwaqaDfhDaicufgimbkkdnadci6mbarcearce0EhdinaecwfydbhwaeclfydbhDaeydbhidnalTmbalawcdtfydbhwalaDcdtfydbhDalaicdtfydbhikavaoaicdtfgqydbcitfaDBdbavaqydbcitfawBdlaqaqydbcefBdbavaoaDcdtfgqydbcitfawBdbavaqydbcitfaiBdlaqaqydbcefBdbavaoawcdtfgwydbcitfaiBdbavawydbcitfaDBdlawawydbcefBdbaecxfheadcufgdmbkkabydbcbBdbk:Zldouv998Jjjjjbca9Rglczfcwfcbyd11jjbBdbalcb8Pdj1jjb83izalcwfcbydN1jjbBdbalcb8Pd:m1jjb83ibdnadTmbaicd4hvdnabTmbavcdthocbhraehwinabarcx2fgiaearav2cdtfgDIdbUdbaiaDIdlUdlaiaDIdwUdwcbhiinalczfaifgDawaifIdbgqaDIdbgkakaq9EEUdbalaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkawaofhwarcefgrad9hmbxdkkavcdthrcbhwincbhiinalczfaifgDaeaifIdbgqaDIdbgkakaq9EEUdbalaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkaearfheawcefgwad9hmbkkdnabTmbadTmbJbbbbJbbjZalIdbalIdzgk:tJbbbb:xgqalIdlalIdCgx:tgmamaq9DEgqalIdwalIdKgm:tgPaPaq9DEgq:vaqJbbbb9BEhqinabaqabIdbak:tNUdbabclfgiaqaiIdbax:tNUdbabcwfgiaqaiIdbam:tNUdbabcxfhbadcufgdmbkkk8KbabaeadaialavcbcbcbcbaoarawaDz:bjjjbk8KbabaeadaialavaoarawaDaqakaxamz:bjjjbk;lOowud99wue99iul998Jjjjjbc;Wb9Rgw8KjjjjbdndnarmbcbhDxekawcwfcbc;Kbz:ljjjb8Aawcuadcx2adc;v:Q;v:Qe0Ecbyd1:jjjbHjjjjbbgqBdwawceBd9Oaqaeadaiz:djjjbawcuadcdtadcFFFFi0Egkcbyd1:jjjbHjjjjbbgxBdxawcdBd9Oadcd4adfhmceheinaegicetheaiam6mbkcbhmawcuaicdtgPaicFFFFi0Ecbyd1:jjjbHjjjjbbgsBdzawciBd9Odndnar:Zgz:rJbbbZMgH:lJbbb9p9DTmbaH:Ohexekcjjjj94hekaicufhOc:bwhAcbhCcbhXadhQinaChLaeaAgKcufaeaK9iEamgDcefaeaD9kEhYdndnadTmbaYcuf:YhHaqhiaxheadhmindndnaiIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhAxekcjjjj94hAkaAcCthAdndnaiclfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaCcqtaAVhAdndnaicwfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaeaAaCVBdbaicxfhiaeclfheamcufgmmbkascFeaPz:ljjjbhEcbh3cbh5indnaEaxa5cdtfydbgAcm4aA7c:v;t;h;Ev2gics4ai7aOGgmcdtfgCydbgecuSmbaeaASmbcehiinaEamaifaOGgmcdtfgCydbgecuSmeaicefhiaeaA9hmbkkaCaABdba3aecuSfh3a5cefg5ad9hmbxdkkascFeaPz:ljjjb8Acbh3kaDaYa3ar0giEhmaLa3aiEhCdna3arSmbaYaKaiEgAam9Rcd9imbdndnaXcl0mbdnaQ:ZgHaL:Zg8A:taY:Yg8EaD:Y:tg8Fa8EaK:Y:tgaa3:Zghaz:tNNNaHaz:taaNa8Aah:tNa8Aaz:ta8FNahaH:tNM:va8EMJbbbZMgH:lJbbb9p9DTmbaH:Ohexdkcjjjj94hexekamaAfcd9Theka3aQaiEhQaXcefgXcs9hmekkdndnaCmbcihicbhDxekcbhiawakcbyd1:jjjbHjjjjbbg5BdCawclBd9OdndnadTmbamcuf:YhHaqhiaxheadhmindndnaiIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhAxekcjjjj94hAkaAcCthAdndnaiclfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaCcqtaAVhAdndnaicwfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaeaAaCVBdbaicxfhiaeclfheamcufgmmbkascFeaPz:ljjjbhEcbhDcbh3inaxa3cdtgYfydbgAcm4aA7c:v;t;h;Ev2gics4ai7hecbhidndninaEaeaOGgmcdtfgCydbgecuSmednaxaecdtgCfydbaASmbaicefgiamfheaiaO9nmekka5aCfydbhixekaCa3BdbaDhiaDcefhDka5aYfaiBdba3cefg3ad9hmbkcuaDc32giaDc;j:KM;jb0EhexekascFeaPz:ljjjb8AcbhDcbhekawaecbyd1:jjjbHjjjjbbgeBdKawcvBd9Oaecbaiz:ljjjbhOavcd4hxdnadTmbaxcdth3a5hmalhAaqheadhEinaOamydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiaAc;81jjbalEgCIdbaiIdxMUdxaiaCIdlaiIdzMUdzaiaCIdwaiIdCMUdCaiaiIdKJbbjZMUdKamclfhmaAa3fhAaecxfheaEcufgEmbkkdnaDTmbaOcxfhiaDheinaictfgmamIdbJbbbbJbbjZaicxfIdbgH:vaHJbbbb9BEgHNUdbaic94fgmaHamIdbNUdbaic98fgmaHamIdbNUdbaiaHaiIdbNUdbaiclfgmaHamIdbNUdbaicwfgmaHamIdbNUdbaic3fhiaecufgembkkcbhAawcuaDcdtgYaDcFFFFi0Egicbyd1:jjjbHjjjjbbgeBd3awcoBd9Oawaicbyd1:jjjbHjjjjbbgEBdaaecFeaYz:ljjjbh3dnadTmbaoaoNh8Aaxcdthxalheina8Aaec;81jjbalEgmIdwaOa5ydbgCc32fgiIdC:tgHaHNamIdbaiIdx:tgHaHNamIdlaiIdz:tgHaHNMMNaqcwfIdbaiIdw:tgHaHNaqIdbaiIdb:tgHaHNaqclfIdbaiIdl:tgHaHNMMMhHdndna3aCcdtgifgmydbcuSmbaEaifIdbaH9ETmekamaABdbaEaifaHUdbka5clfh5aeaxfheaqcxfhqadaAcefgA9hmbkkaba3aYz:kjjjb8AcrhikaicdthiinaiTmeaic98fgiawcwffydbcbyd:m:jjjbH:bjjjbbxbkkawc;Wbf8KjjjjbaDk:Qdidui99ducbhi8Jjjjjbca9Rglczfcwfcbyd11jjbBdbalcb8Pdj1jjb83izalcwfcbydN1jjbBdbalcb8Pd:m1jjb83ibdndnaembJbbjFhvJbbjFhoJbbjFhrxekadcd4cdthwincbhdinalczfadfgDabadfIdbgoaDIdbgrarao9EEUdbaladfgDaoaDIdbgrarao9DEUdbadclfgdcx9hmbkabawfhbaicefgiae9hmbkalIdwalIdK:thralIdlalIdC:thoalIdbalIdz:thvkavJbbbb:xgvaoaoav9DEgoararao9DEk9DeeuabcFeaicdtz:ljjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk9teiucbcbyd:q:jjjbgeabcifc98GfgbBd:q:jjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:q:jjjbgeabcrfc94GfgbBd:q:jjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd:q:jjjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd:q:jjjbfgdBd:q:jjjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akk6eiucbhidnadTmbdninabRbbglaeRbbgv9hmeaecefheabcefhbadcufgdmbxdkkalav9Rhikaikk:Iedbcjwk1eFFuuFFuuFFuuFFuFFFuFFFuFbbbbbbbbebbbdbbbbbbbebbbeeebeebebbeeebebbbbbebebbbbbebbbdbbbbbbbbbbbbbbbeeeeebebbbbbebbbbbeebbbbbbbbbbbbbbbbbbbbbc1Dkxebbbdbbb:G9Kbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(o(e),{}).then(function(f){n=f.instance,n.exports.__wasm_call_ctors()});function o(f){for(var x=new Uint8Array(f.length),_=0;_96?C-97:C>64?C-39:C+4}for(var V=0,_=0;_=3),r(C>=0&&C<=f.length),r(C%3==0),r(V>=0&&V<=1);for(var Z=0,G=0;G<(L?L.length:0);++G)Z|=g[L[G]];var X=f.BYTES_PER_ELEMENT==4?f:new Uint32Array(f),v=d(n.exports.meshopt_simplify,X,f.length,x,x.length/_,_*4,C,V,Z);return v[0]=f instanceof Uint32Array?v[0]:new f.constructor(v[0]),v},simplifyWithAttributes:function(f,x,_,C,V,L,Z,G,X){r(this.useExperimentalFeatures),r(f instanceof Uint32Array||f instanceof Int32Array||f instanceof Uint16Array||f instanceof Int16Array),r(f.length%3==0),r(x instanceof Float32Array),r(x.length%_==0),r(_>=3),r(C instanceof Float32Array),r(C.length%V==0),r(V>=0),r(Z>=0&&Z<=f.length),r(Z%3==0),r(G>=0&&G<=1),r(Array.isArray(L)),r(V>=L.length),r(L.length<=16);for(var v=0,P=0;P<(X?X.length:0);++P)v|=g[X[P]];var F=f.BYTES_PER_ELEMENT==4?f:new Uint32Array(f),A=u(n.exports.meshopt_simplifyWithAttributes,F,f.length,x,x.length/_,_*4,C,V*4,new Float32Array(L),Z,G,v);return A[0]=f instanceof Uint32Array?A[0]:new f.constructor(A[0]),A},getScale:function(f,x){return r(f instanceof Float32Array),r(f.length%x==0),r(x>=3),m(n.exports.meshopt_simplifyScale,f,f.length/x,x*4)},simplifyPoints:function(f,x,_,C,V,L){return r(this.useExperimentalFeatures),r(f instanceof Float32Array),r(f.length%x==0),r(x>=3),r(_>=0&&_<=f.length/x),C?(r(C instanceof Float32Array),r(C.length%V==0),r(V>=3),r(f.length/x==C.length/V),p(n.exports.meshopt_simplifyPoints,f,f.length/x,x*4,C,V*4,L,_)):p(n.exports.meshopt_simplifyPoints,f,f.length/x,x*4,void 0,0,0,_)}}}();function Ux(e){e=y(e,y.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.bufferViewId,o=e.gltfResource,r=e.baseResource,s=e.cacheKey,a=n.bufferViews[i],c=a.buffer,d=a.byteOffset,u=a.byteLength,m=!1,p,g,f,x;if(oi(a,"EXT_meshopt_compression")){let C=a.extensions.EXT_meshopt_compression;c=C.buffer,d=y(C.byteOffset,0),u=C.byteLength,m=!0,p=C.byteStride,g=C.count,f=C.mode,x=y(C.filter,"NONE")}let _=n.buffers[c];this._hasMeshopt=m,this._meshoptByteStride=p,this._meshoptCount=g,this._meshoptMode=f,this._meshoptFilter=x,this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._buffer=_,this._bufferId=c,this._byteOffset=d,this._byteLength=u,this._cacheKey=s,this._bufferLoader=void 0,this._typedArray=void 0,this._state=Xt.UNLOADED,this._promise=void 0}l(Object.create)&&(Ux.prototype=Object.create(eo.prototype),Ux.prototype.constructor=Ux);Object.defineProperties(Ux.prototype,{cacheKey:{get:function(){return this._cacheKey}},typedArray:{get:function(){return this._typedArray}}});async function uve(e){try{let t=mve(e);if(e._bufferLoader=t,await t.load(),e.isDestroyed())return;let n=t.typedArray,i=new Uint8Array(n.buffer,n.byteOffset+e._byteOffset,e._byteLength);if(e.unload(),e._typedArray=i,e._hasMeshopt){let o=e._meshoptCount,r=e._meshoptByteStride,s=new Uint8Array(o*r);Gie.decodeGltfBuffer(s,o,r,e._typedArray,e._meshoptMode,e._meshoptFilter),e._typedArray=s}return e._state=Xt.READY,e}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=Xt.FAILED,e.getError("Failed to load buffer view",t)}}Ux.prototype.load=async function(){return l(this._promise)?this._promise:(this._state=Xt.LOADING,this._promise=uve(this),this._promise)};function mve(e){let t=e._resourceCache,n=e._buffer;if(l(n.uri)){let o=e._baseResource.getDerivedResource({url:n.uri});return t.getExternalBufferLoader({resource:o})}return t.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:e._bufferId})}Ux.prototype.unload=function(){l(this._bufferLoader)&&!this._bufferLoader.isDestroyed()&&this._resourceCache.unload(this._bufferLoader),this._bufferLoader=void 0,this._typedArray=void 0};var cC=Ux;var Dnn=T(S(),1);var wnn=T(S(),1);function Vr(){}Vr._maxDecodingConcurrency=Math.max(Yt.hardwareConcurrency-1,1);Vr._decoderTaskProcessor=void 0;Vr._taskProcessorReady=!1;Vr._error=void 0;Vr._getDecoderTaskProcessor=function(){if(!l(Vr._decoderTaskProcessor)){let e=new pi("decodeDraco",Vr._maxDecodingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}).then(function(t){t?Vr._taskProcessorReady=!0:Vr._error=new ue("Draco decoder could not be initialized.")}).catch(t=>{Vr._error=t}),Vr._decoderTaskProcessor=e}return Vr._decoderTaskProcessor};Vr.decodePointCloud=function(e){let t=Vr._getDecoderTaskProcessor();if(l(Vr._error))throw Vr._error;if(Vr._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])};Vr.decodeBufferView=function(e){let t=Vr._getDecoderTaskProcessor();if(l(Vr._error))throw Vr._error;if(Vr._taskProcessorReady)return t.scheduleTask(e,[e.array.buffer])};var Ap=Vr;function zb(e){e=y(e,y.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.draco,o=e.gltfResource,r=e.baseResource,s=e.cacheKey;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._draco=i,this._cacheKey=s,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=Xt.UNLOADED,this._promise=void 0,this._dracoError=void 0}l(Object.create)&&(zb.prototype=Object.create(eo.prototype),zb.prototype.constructor=zb);Object.defineProperties(zb.prototype,{cacheKey:{get:function(){return this._cacheKey}},decodedData:{get:function(){return this._decodedData}}});async function hve(e){let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._draco.bufferView,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=Xt.PROCESSING,e)}catch(n){if(e.isDestroyed())return;Eie(e,n)}}zb.prototype.load=async function(){return l(this._promise)?this._promise:(this._state=Xt.LOADING,this._promise=hve(this),this._promise)};function Eie(e,t){throw e.unload(),e._state=Xt.FAILED,e.getError("Failed to load Draco",t)}async function fve(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={indices:n.indexArray,vertexAttributes:n.attributeData},e._state=Xt.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._dracoError=n}}zb.prototype.process=function(e){if(this._state===Xt.READY)return!0;if(this._state!==Xt.PROCESSING||(l(this._dracoError)&&Eie(this,this._dracoError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let t=this._draco,i=this._gltf.bufferViews,o=t.bufferView,r=i[o],s=t.attributes,a={array:new Uint8Array(this._bufferViewTypedArray),bufferView:r,compressedAttributes:s,dequantizeInShader:!0},c=Ap.decodeBufferView(a);if(!l(c))return!1;this._decodePromise=fve(this,c)};zb.prototype.unload=function(){l(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0};var lC=zb;var nin=T(S(),1);var znn=T(S(),1);function pve(e){let t=e.uint8Array,n=e.format,i=e.request,o=y(e.flipY,!1),r=y(e.skipColorSpaceConversion,!1),s=new Blob([t],{type:n}),a;return Ee.supportsImageBitmapOptions().then(function(c){return c?Promise.resolve(Ee.createImageBitmapFromBlob(s,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:r})):(a=window.URL.createObjectURL(s),new Ee({url:a,request:i}).fetchImage({flipY:o,skipColorSpaceConversion:r}))}).then(function(c){return l(a)&&window.URL.revokeObjectURL(a),c}).catch(function(c){return l(a)&&window.URL.revokeObjectURL(a),Promise.reject(c)})}var Dx=pve;function Mp(e){e=y(e,y.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.imageId,o=e.gltfResource,r=e.baseResource,s=e.cacheKey,a=n.images[i],c=a.bufferView,d=a.uri;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._bufferViewId=c,this._uri=d,this._cacheKey=s,this._bufferViewLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._state=Xt.UNLOADED,this._promise=void 0}l(Object.create)&&(Mp.prototype=Object.create(eo.prototype),Mp.prototype.constructor=Mp);Object.defineProperties(Mp.prototype,{cacheKey:{get:function(){return this._cacheKey}},image:{get:function(){return this._image}},mipLevels:{get:function(){return this._mipLevels}}});Mp.prototype.load=function(){return l(this._promise)?this._promise:l(this._bufferViewId)?(this._promise=bve(this),this._promise):(this._promise=gve(this),this._promise)};function Xie(e){let t;return Array.isArray(e)&&(t=e.slice(1,e.length).map(function(n){return n.bufferView}),e=e[0]),{image:e,mipLevels:t}}async function bve(e){e._state=Xt.LOADING;let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=n,await n.load(),e.isDestroyed())return;let i=n.typedArray,o=await xve(i);if(e.isDestroyed())return;let r=Xie(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=Xt.READY,e}catch(n){return e.isDestroyed()?void 0:Iie(e,n,"Failed to load embedded image")}}async function gve(e){e._state=Xt.LOADING;let t=e._baseResource,n=e._uri,i=t.getDerivedResource({url:n});try{let o=await Tve(i);if(e.isDestroyed())return;let r=Xie(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=Xt.READY,e}catch(o){return e.isDestroyed()?void 0:Iie(e,o,`Failed to load image: ${n}`)}}function Iie(e,t,n){return e.unload(),e._state=Xt.FAILED,Promise.reject(e.getError(n,t))}function yve(e){let t=e.subarray(0,2),n=e.subarray(0,4),i=e.subarray(8,12);if(t[0]===255&&t[1]===216)return"image/jpeg";if(t[0]===137&&t[1]===80)return"image/png";if(t[0]===171&&t[1]===75)return"image/ktx2";if(n[0]===82&&n[1]===73&&n[2]===70&&n[3]===70&&i[0]===87&&i[1]===69&&i[2]===66&&i[3]===80)return"image/webp";throw new ue("Image format is not recognized")}async function xve(e){let t=yve(e);if(t==="image/ktx2"){let n=new Uint8Array(e);return yl(n)}return Mp._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})}var _ve=/(^data:image\/ktx2)|(\.ktx2$)/i;function Tve(e){let t=e.getUrlComponent(!1,!0);return _ve.test(t)?yl(e):e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}Mp.prototype.unload=function(){l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._uri=void 0,this._image=void 0,this._mipLevels=void 0,this._gltf=void 0};Mp._loadImageFromTypedArray=Dx;var dC=Mp;var bin=T(S(),1);var oin=T(S(),1),Sve={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},Ra=Object.freeze(Sve);function Kb(e){e=y(e,y.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.accessorId,o=e.gltfResource,r=e.baseResource,s=e.draco,a=e.cacheKey,c=y(e.asynchronous,!0),d=y(e.loadBuffer,!1),u=y(e.loadTypedArray,!1),m=n.accessors[i].componentType;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._accessorId=i,this._indexDatatype=m,this._draco=s,this._cacheKey=a,this._asynchronous=c,this._loadBuffer=d,this._loadTypedArray=u,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=Xt.UNLOADED,this._promise=void 0}l(Object.create)&&(Kb.prototype=Object.create(eo.prototype),Kb.prototype.constructor=Kb);Object.defineProperties(Kb.prototype,{cacheKey:{get:function(){return this._cacheKey}},buffer:{get:function(){return this._buffer}},typedArray:{get:function(){return this._typedArray}},indexDatatype:{get:function(){return this._indexDatatype}}});var Cve=new HO;Kb.prototype.load=async function(){return l(this._promise)?this._promise:l(this._draco)?(this._promise=Vve(this),this._promise):(this._promise=Lve(this),this._promise)};async function Vve(e){e._state=Xt.LOADING;let t=e._resourceCache;try{let n=t.getDracoLoader({gltf:e._gltf,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=Xt.LOADED,e)}catch(n){if(e.isDestroyed())return;OO(e,n)}}async function Lve(e){let t=e._gltf,n=e._accessorId,o=t.accessors[n].bufferView;e._state=Xt.LOADING;let r=e._resourceCache;try{let s=r.getBufferViewLoader({gltf:t,bufferViewId:o,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=s,await s.load(),e.isDestroyed())return;let a=s.typedArray;return e._typedArray=Rve(e,a),e._state=Xt.PROCESSING,e}catch(s){if(e.isDestroyed())return;OO(e,s)}}function Rve(e,t){let n=e._gltf,i=e._accessorId,o=n.accessors[i],r=o.count,s=o.componentType,a=Me.getSizeInBytes(s),c=t.buffer,d=t.byteOffset+o.byteOffset;if(d%a!==0){let m=r*a,p=new Uint8Array(c,d,m);c=new Uint8Array(p).buffer,d=0,Is("index-buffer-unaligned",`The index array is not aligned to a ${a}-byte boundary.`)}let u;return s===Me.UNSIGNED_BYTE?u=new Uint8Array(c,d,r):s===Me.UNSIGNED_SHORT?u=new Uint16Array(c,d,r):s===Me.UNSIGNED_INT&&(u=new Uint32Array(c,d,r)),u}function OO(e,t){throw e.unload(),e._state=Xt.FAILED,e.getError("Failed to load index buffer",t)}function HO(){this.typedArray=void 0,this.indexDatatype=void 0,this.context=void 0,this.buffer=void 0}HO.prototype.set=function(e,t,n){this.typedArray=e,this.indexDatatype=t,this.context=n};HO.prototype.execute=function(){this.buffer=Wie(this.typedArray,this.indexDatatype,this.context)};function Wie(e,t,n){let i=ft.createIndexBuffer({typedArray:e,context:n,usage:Ne.STATIC_DRAW,indexDatatype:t});return i.vertexArrayDestroyable=!1,i}Kb.prototype.process=function(e){if(this._state===Xt.READY)return!0;if(this._state!==Xt.LOADED&&this._state!==Xt.PROCESSING)return!1;let t=this._typedArray,n=this._indexDatatype;if(l(this._dracoLoader))try{this._dracoLoader.process(e)&&(t=this._dracoLoader.decodedData.indices.typedArray,this._typedArray=t,n=Q.fromTypedArray(t),this._indexDatatype=n)}catch(o){OO(this,o)}if(!l(t))return!1;let i;if(this._loadBuffer&&this._asynchronous){let o=Cve;if(o.set(t,n,e.context),!e.jobScheduler.execute(o,Ra.BUFFER))return!1;i=o.buffer}else this._loadBuffer&&(i=Wie(t,n,e.context));return this.unload(),this._buffer=i,this._typedArray=this._loadTypedArray?t:void 0,this._state=Xt.READY,this._resourceCache.statistics.addGeometryLoader(this),!0};Kb.prototype.unload=function(){l(this._buffer)&&this._buffer.destroy();let e=this._resourceCache;l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&e.unload(this._bufferViewLoader),l(this._dracoLoader)&&e.unload(this._dracoLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0};var uC=Kb;var Zsn=T(S(),1);var Uin=T(S(),1);var xin=T(S(),1);function Zve(e,t,n){if(n=y(n,!1),n){let i=e.indexOf(t);if(i>-1)return i}return e.push(t),e.length-1}var hs=Zve;var Rin=T(S(),1);var Sin=T(S(),1);function Gve(e,t){return l(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}var ir=Gve;function Jt(){}Jt.objectLegacy=function(e,t){if(l(e)){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let i=e[n],o=t(i,n);if(l(o))return o}}};Jt.object=function(e,t){if(l(e)){let n=e.length;for(let i=0;i0)return i.byteStride}return Q.getSizeInBytes(t.componentType)*fd(t.type)}var El=Xve;function Ive(e){Ie.accessor(e,function(n){l(n.bufferView)&&(n.byteOffset=y(n.byteOffset,0))}),Ie.bufferView(e,function(n){l(n.buffer)&&(n.byteOffset=y(n.byteOffset,0))}),Ie.mesh(e,function(n){Ie.meshPrimitive(n,function(i){if(i.mode=y(i.mode,ne.TRIANGLES),!l(i.material)){l(e.materials)||(e.materials=[]);let o={name:"default"};i.material=hs(e.materials,o)}})}),Ie.accessorContainingVertexAttributeData(e,function(n){let i=e.accessors[n],o=i.bufferView;if(i.normalized=y(i.normalized,!1),l(o)){let r=e.bufferViews[o];r.byteStride=El(e,i),r.target=ne.ARRAY_BUFFER}}),Ie.accessorContainingIndexData(e,function(n){let o=e.accessors[n].bufferView;if(l(o)){let r=e.bufferViews[o];r.target=ne.ELEMENT_ARRAY_BUFFER}}),Ie.material(e,function(n){let i=y(n.extensions,y.EMPTY_OBJECT),o=i.KHR_materials_common;if(l(o)){let c=o.technique,d=l(o.values)?o.values:{};o.values=d,d.ambient=l(d.ambient)?d.ambient:[0,0,0,1],d.emission=l(d.emission)?d.emission:[0,0,0,1],d.transparency=y(d.transparency,1),c!=="CONSTANT"&&(d.diffuse=l(d.diffuse)?d.diffuse:[0,0,0,1],c!=="LAMBERT"&&(d.specular=l(d.specular)?d.specular:[0,0,0,1],d.shininess=y(d.shininess,0))),o.transparent=y(o.transparent,!1),o.doubleSided=y(o.doubleSided,!1);return}n.emissiveFactor=y(n.emissiveFactor,[0,0,0]),n.alphaMode=y(n.alphaMode,"OPAQUE"),n.doubleSided=y(n.doubleSided,!1),n.alphaMode==="MASK"&&(n.alphaCutoff=y(n.alphaCutoff,.5));let r=i.KHR_techniques_webgl;l(r)&&Ie.materialValue(n,function(c){l(c.index)&&Bx(c)}),Bx(n.emissiveTexture),Bx(n.normalTexture),Bx(n.occlusionTexture);let s=n.pbrMetallicRoughness;l(s)&&(s.baseColorFactor=y(s.baseColorFactor,[1,1,1,1]),s.metallicFactor=y(s.metallicFactor,1),s.roughnessFactor=y(s.roughnessFactor,1),Bx(s.baseColorTexture),Bx(s.metallicRoughnessTexture));let a=i.KHR_materials_pbrSpecularGlossiness;l(a)&&(a.diffuseFactor=y(a.diffuseFactor,[1,1,1,1]),a.specularFactor=y(a.specularFactor,[1,1,1]),a.glossinessFactor=y(a.glossinessFactor,1),Bx(a.specularGlossinessTexture))}),Ie.animation(e,function(n){Ie.animationSampler(n,function(i){i.interpolation=y(i.interpolation,"LINEAR")})});let t=Wve(e);return Ie.node(e,function(n,i){l(t[i])||l(n.translation)||l(n.rotation)||l(n.scale)?(n.translation=y(n.translation,[0,0,0]),n.rotation=y(n.rotation,[0,0,0,1]),n.scale=y(n.scale,[1,1,1])):n.matrix=y(n.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}),Ie.sampler(e,function(n){n.wrapS=y(n.wrapS,ne.REPEAT),n.wrapT=y(n.wrapT,ne.REPEAT)}),l(e.scenes)&&!l(e.scene)&&(e.scene=0),e}function Wve(e){let t={};return Ie.animation(e,function(n){Ie.animationChannel(n,function(i){let o=i.target,r=o.node,s=o.path;(s==="translation"||s==="rotation"||s==="scale")&&(t[r]=!0)})}),t}function Bx(e){l(e)&&(e.texCoord=y(e.texCoord,0))}var aX=Ive;var Oin=T(S(),1);function Pve(e){return Ie.shader(e,function(t){BN(t)}),Ie.buffer(e,function(t){BN(t)}),Ie.image(e,function(t){BN(t)}),BN(e),e}function BN(e){e.extras=l(e.extras)?e.extras:{},e.extras._pipeline=l(e.extras._pipeline)?e.extras._pipeline:{}}var Jb=Pve;var aon=T(S(),1);var qin=T(S(),1);var Kin=T(S(),1);function vve(e,t){let n=e.extensionsRequired;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),n.length===0&&delete e.extensionsRequired}}var cX=vve;function wve(e,t){let n=e.extensionsUsed;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),cX(e,t),n.length===0&&delete e.extensionsUsed}}var Yx=wve;var Fve=4;function Ave(e){if(Zm(e)!=="glTF")throw new ue("File is not valid binary glTF");let n=Pie(e,0,5),i=n[1];if(i!==1&&i!==2)throw new ue("Binary glTF version is not 1 or 2");return i===1?Mve(e,n):Nve(e,n)}function Pie(e,t,n){let i=new DataView(e.buffer),o=new Array(n);for(let r=0;r0){let m=y(u.binary_glTF,u.KHR_binary_glTF);l(m)&&(m.extras._pipeline.source=d,delete m.uri)}return Yx(c,"KHR_binary_glTF"),c}function Nve(e,t){let n=t[2],i=12,o,r;for(;i0){let a=s[0];a.extras._pipeline.source=r}}return o}var lX=Ave;var uon=T(S(),1);function kve(e){return Ie.shader(e,function(t){YN(t)}),Ie.buffer(e,function(t){YN(t)}),Ie.image(e,function(t){YN(t)}),YN(e),e}function YN(e){l(e.extras)&&(l(e.extras._pipeline)&&delete e.extras._pipeline,Object.keys(e.extras).length===0&&delete e.extras)}var dX=kve;var Hrn=T(S(),1);var pon=T(S(),1);function Uve(e,t){let n=e.extensionsUsed;l(n)||(n=[],e.extensionsUsed=n),hs(n,t,!0)}var pu=Uve;var Lon=T(S(),1);var yon=T(S(),1);function Dve(e){switch(e){case Q.BYTE:return function(t,n,i,o,r){for(let s=0;s-1:!1}var Hve=[ne.ZERO,ne.ONE,ne.SRC_COLOR,ne.ONE_MINUS_SRC_COLOR,ne.SRC_ALPHA,ne.ONE_MINUS_SRC_ALPHA,ne.DST_ALPHA,ne.ONE_MINUS_DST_ALPHA,ne.DST_COLOR,ne.ONE_MINUS_DST_COLOR];function zve(e,t){if(!l(e))return t;for(let n=0;n<4;n++)if(Hve.indexOf(e[n])===-1)return t;return e}function Kve(e){let t={},n={},i=e.techniques;return l(i)&&(Ie.technique(e,function(o,r){let s=o.states;if(l(s)){let a=n[r]={};if(vie(s,ne.BLEND)){a.alphaMode="BLEND";let c=s.functions;l(c)&&(l(c.blendEquationSeparate)||l(c.blendFuncSeparate))&&(t[r]={blendEquation:y(c.blendEquationSeparate,Yve),blendFactors:zve(c.blendFuncSeparate,Ove)})}vie(s,ne.CULL_FACE)||(a.doubleSided=!0),delete o.states}}),Object.keys(t).length>0&&(l(e.extensions)||(e.extensions={}),pu(e,"KHR_blend")),Ie.material(e,function(o){if(l(o.technique)){let r=n[o.technique];Ie.objectLegacy(r,function(a,c){o[c]=a});let s=t[o.technique];l(s)&&(l(o.extensions)||(o.extensions={}),o.extensions.KHR_blend=s)}})),e}var uX=Kve;var Yon=T(S(),1);var Aon=T(S(),1);function Jve(e,t){let n=e.extensionsRequired;l(n)||(n=[],e.extensionsRequired=n),hs(n,t,!0),pu(e,t)}var mX=Jve;function Qve(e){let t=e.techniques,n={},i={},o={};if(l(t)){let r={programs:[],shaders:[],techniques:[]},s=e.glExtensionsUsed;delete e.glExtensionsUsed,Ie.technique(e,function(a,c){let d={name:a.name,program:void 0,attributes:{},uniforms:{}},u;if(Ie.techniqueAttribute(a,function(m,p){u=a.parameters[m],d.attributes[p]={semantic:u.semantic}}),Ie.techniqueUniform(a,function(m,p){u=a.parameters[m],d.uniforms[p]={count:u.count,node:u.node,type:u.type,semantic:u.semantic,value:u.value},l(n[c])||(n[c]={}),n[c][m]=p}),l(o[a.program]))d.program=o[a.program];else{let m=e.programs[a.program],p={name:m.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:s},g=e.shaders[m.fragmentShader];p.fragmentShader=hs(r.shaders,g,!0);let f=e.shaders[m.vertexShader];p.vertexShader=hs(r.shaders,f,!0),d.program=hs(r.programs,p),o[a.program]=d.program}i[c]=hs(r.techniques,d)}),r.techniques.length>0&&(l(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,pu(e,"KHR_techniques_webgl"),mX(e,"KHR_techniques_webgl"))}return Ie.material(e,function(r){if(l(r.technique)){let s={technique:i[r.technique]};Ie.objectLegacy(r.values,function(a,c){l(s.values)||(s.values={});let d=n[r.technique][c];l(d)&&(s.values[d]=a)}),l(r.extensions)||(r.extensions={}),r.extensions.KHR_techniques_webgl=s}delete r.technique,delete r.values}),delete e.techniques,delete e.programs,delete e.shaders,e}var hX=Qve;var nrn=T(S(),1);var Jon=T(S(),1);function jve(e,t){po.typeOf.object("material",e),po.defined("handler",t);let n=e.pbrMetallicRoughness;if(l(n)){if(l(n.baseColorTexture)){let r=n.baseColorTexture,s=t(r.index,r);if(l(s))return s}if(l(n.metallicRoughnessTexture)){let r=n.metallicRoughnessTexture,s=t(r.index,r);if(l(s))return s}}let{extensions:i}=e;if(l(i)){let r=i.KHR_materials_pbrSpecularGlossiness;if(l(r)){if(l(r.diffuseTexture)){let c=r.diffuseTexture,d=t(c.index,c);if(l(d))return d}if(l(r.specularGlossinessTexture)){let c=r.specularGlossinessTexture,d=t(c.index,c);if(l(d))return d}}let s=i.KHR_materials_specular;if(l(s)){let{specularTexture:c,specularColorTexture:d}=s;if(l(c)){let u=t(c.index,c);if(l(u))return u}if(l(d)){let u=t(d.index,d);if(l(u))return u}}let a=i.KHR_materials_common;if(l(a)&&l(a.values)){let{diffuse:c,ambient:d,emission:u,specular:m}=a.values;if(l(c)&&l(c.index)){let p=t(c.index,c);if(l(p))return p}if(l(d)&&l(d.index)){let p=t(d.index,d);if(l(p))return p}if(l(u)&&l(u.index)){let p=t(u.index,u);if(l(p))return p}if(l(m)&&l(m.index)){let p=t(m.index,m);if(l(p))return p}}}let o=Ie.materialValue(e,function(r){if(l(r.index)){let s=t(r.index,r);if(l(s))return s}});if(l(o))return o;if(l(e.emissiveTexture)){let r=e.emissiveTexture,s=t(r.index,r);if(l(s))return s}if(l(e.normalTexture)){let r=e.normalTexture,s=t(r.index,r);if(l(s))return s}if(l(e.occlusionTexture)){let r=e.occlusionTexture,s=t(r.index,r);if(l(s))return s}}var mC=jve;var wie=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"];function qve(e,t){return t=y(t,wie),wie.forEach(function(n){t.indexOf(n)>-1&&ewe(e,n)}),e}var $ve={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function ewe(e,t){let n=$ve[t],i=e[n];if(l(i)){let o=0,r=nf[t](e),s=i.length;for(let a=0;at&&o.attributes[c]--}),Ie.meshPrimitiveTarget(o,function(a){Ie.meshPrimitiveTargetAttribute(a,function(c,d){c>t&&a[d]--})});let r=o.indices;l(r)&&r>t&&o.indices--;let s=o.extensions;l(s)&&l(s.CESIUM_primitive_outline)&&s.CESIUM_primitive_outline.indices>t&&--s.CESIUM_primitive_outline.indices})}),Ie.skin(e,function(i){l(i.inverseBindMatrices)&&i.inverseBindMatrices>t&&i.inverseBindMatrices--}),Ie.animation(e,function(i){Ie.animationSampler(i,function(o){l(o.input)&&o.input>t&&o.input--,l(o.output)&&o.output>t&&o.output--})})};tf.buffer=function(e,t){e.buffers.splice(t,1),Ie.bufferView(e,function(i){l(i.buffer)&&i.buffer>t&&i.buffer--,l(i.extensions)&&l(i.extensions.EXT_meshopt_compression)&&i.extensions.EXT_meshopt_compression.buffer--})};tf.bufferView=function(e,t){if(e.bufferViews.splice(t,1),Ie.accessor(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Ie.shader(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Ie.image(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),ir(e,"KHR_draco_mesh_compression")&&Ie.mesh(e,function(i){Ie.meshPrimitive(i,function(o){l(o.extensions)&&l(o.extensions.KHR_draco_mesh_compression)&&o.extensions.KHR_draco_mesh_compression.bufferView>t&&o.extensions.KHR_draco_mesh_compression.bufferView--})}),ir(e,"EXT_feature_metadata")){let o=e.extensions.EXT_feature_metadata.featureTables;for(let r in o)if(o.hasOwnProperty(r)){let a=o[r].properties;if(l(a)){for(let c in a)if(a.hasOwnProperty(c)){let d=a[c];l(d.bufferView)&&d.bufferView>t&&d.bufferView--,l(d.arrayOffsetBufferView)&&d.arrayOffsetBufferView>t&&d.arrayOffsetBufferView--,l(d.stringOffsetBufferView)&&d.stringOffsetBufferView>t&&d.stringOffsetBufferView--}}}}if(ir(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTables;if(l(o)){let r=o.length;for(let s=0;st&&u.values--,l(u.arrayOffsets)&&u.arrayOffsets>t&&u.arrayOffsets--,l(u.stringOffsets)&&u.stringOffsets>t&&u.stringOffsets--}}}}};tf.image=function(e,t){e.images.splice(t,1),Ie.texture(e,function(i){l(i.source)&&i.source>t&&--i.source;let o=i.extensions;l(o)&&l(o.EXT_texture_webp)&&o.EXT_texture_webp.source>t?--i.extensions.EXT_texture_webp.source:l(o)&&l(o.KHR_texture_basisu)&&o.KHR_texture_basisu.source>t&&--i.extensions.KHR_texture_basisu.source})};tf.mesh=function(e,t){e.meshes.splice(t,1),Ie.node(e,function(i){l(i.mesh)&&(i.mesh>t?i.mesh--:i.mesh===t&&delete i.mesh)})};tf.node=function(e,t){e.nodes.splice(t,1),Ie.skin(e,function(i){l(i.skeleton)&&i.skeleton>t&&i.skeleton--,i.joints=i.joints.map(function(o){return o>t?o-1:o})}),Ie.animation(e,function(i){Ie.animationChannel(i,function(o){l(o.target)&&l(o.target.node)&&o.target.node>t&&o.target.node--})}),Ie.technique(e,function(i){Ie.techniqueUniform(i,function(o){l(o.node)&&o.node>t&&o.node--})}),Ie.node(e,function(i){l(i.children)&&(i.children=i.children.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o}))}),Ie.scene(e,function(i){i.nodes=i.nodes.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o})})};tf.material=function(e,t){e.materials.splice(t,1),Ie.mesh(e,function(i){Ie.meshPrimitive(i,function(o){l(o.material)&&o.material>t&&o.material--})})};tf.sampler=function(e,t){e.samplers.splice(t,1),Ie.texture(e,function(i){l(i.sampler)&&i.sampler>t&&--i.sampler})};tf.texture=function(e,t){if(e.textures.splice(t,1),Ie.material(e,function(i){mC(i,function(o,r){r.index>t&&--r.index})}),ir(e,"EXT_feature_metadata")){Ie.mesh(e,function(r){Ie.meshPrimitive(r,function(s){let a=s.extensions;if(l(a)&&l(a.EXT_feature_metadata)){let d=a.EXT_feature_metadata.featureIdTextures;if(l(d)){let u=d.length;for(let m=0;mt&&--g.index}}}})});let o=e.extensions.EXT_feature_metadata.featureTextures;for(let r in o)if(o.hasOwnProperty(r)){let a=o[r].properties;if(l(a)){for(let c in a)if(a.hasOwnProperty(c)){let u=a[c].texture;u.index>t&&--u.index}}}}if(ir(e,"EXT_mesh_features")&&Ie.mesh(e,function(i){Ie.meshPrimitive(i,function(o){let r=o.extensions;if(l(r)&&l(r.EXT_mesh_features)){let a=r.EXT_mesh_features.featureIds;if(l(a)){let c=a.length;for(let d=0;dt&&--u.texture.index}}}})}),ir(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTextures;if(l(o)){let r=o.length;for(let s=0;st&&--u.index}}}}};function nf(){}nf.accessor=function(e){let t={};return Ie.mesh(e,function(n){Ie.meshPrimitive(n,function(i){Ie.meshPrimitiveAttribute(i,function(r){t[r]=!0}),Ie.meshPrimitiveTarget(i,function(r){Ie.meshPrimitiveTargetAttribute(r,function(s){t[s]=!0})});let o=i.indices;l(o)&&(t[o]=!0)})}),Ie.skin(e,function(n){l(n.inverseBindMatrices)&&(t[n.inverseBindMatrices]=!0)}),Ie.animation(e,function(n){Ie.animationSampler(n,function(i){l(i.input)&&(t[i.input]=!0),l(i.output)&&(t[i.output]=!0)})}),ir(e,"EXT_mesh_gpu_instancing")&&Ie.node(e,function(n){l(n.extensions)&&l(n.extensions.EXT_mesh_gpu_instancing)&&Object.keys(n.extensions.EXT_mesh_gpu_instancing.attributes).forEach(function(i){let o=n.extensions.EXT_mesh_gpu_instancing.attributes[i];t[o]=!0})}),ir(e,"CESIUM_primitive_outline")&&Ie.mesh(e,function(n){Ie.meshPrimitive(n,function(i){let o=i.extensions;if(l(o)&&l(o.CESIUM_primitive_outline)){let s=o.CESIUM_primitive_outline.indices;l(s)&&(t[s]=!0)}})}),t};nf.buffer=function(e){let t={};return Ie.bufferView(e,function(n){l(n.buffer)&&(t[n.buffer]=!0),l(n.extensions)&&l(n.extensions.EXT_meshopt_compression)&&(t[n.extensions.EXT_meshopt_compression.buffer]=!0)}),t};nf.bufferView=function(e){let t={};if(Ie.accessor(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Ie.shader(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Ie.image(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),ir(e,"KHR_draco_mesh_compression")&&Ie.mesh(e,function(n){Ie.meshPrimitive(n,function(i){l(i.extensions)&&l(i.extensions.KHR_draco_mesh_compression)&&(t[i.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),ir(e,"EXT_feature_metadata")){let i=e.extensions.EXT_feature_metadata.featureTables;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o].properties;if(l(s)){for(let a in s)if(s.hasOwnProperty(a)){let c=s[a];l(c.bufferView)&&(t[c.bufferView]=!0),l(c.arrayOffsetBufferView)&&(t[c.arrayOffsetBufferView]=!0),l(c.stringOffsetBufferView)&&(t[c.stringOffsetBufferView]=!0)}}}}if(ir(e,"EXT_structural_metadata")){let i=e.extensions.EXT_structural_metadata.propertyTables;if(l(i)){let o=i.length;for(let r=0;r0&&(t[n.mesh]=!0)}}),t};function Fie(e,t,n){let i=e.nodes[t];return l(i.mesh)||l(i.camera)||l(i.skin)||l(i.weights)||l(i.extras)||l(i.extensions)&&Object.keys(i.extensions).length!==0||l(n[t])?!1:!l(i.children)||i.children.filter(function(o){return!Fie(e,o,n)}).length===0}nf.node=function(e){let t={};return Ie.skin(e,function(n){l(n.skeleton)&&(t[n.skeleton]=!0),Ie.skinJoint(n,function(i){t[i]=!0})}),Ie.animation(e,function(n){Ie.animationChannel(n,function(i){l(i.target)&&l(i.target.node)&&(t[i.target.node]=!0)})}),Ie.technique(e,function(n){Ie.techniqueUniform(n,function(i){l(i.node)&&(t[i.node]=!0)})}),Ie.node(e,function(n,i){Fie(e,i,t)||(t[i]=!0)}),t};nf.material=function(e){let t={};return Ie.mesh(e,function(n){Ie.meshPrimitive(n,function(i){l(i.material)&&(t[i.material]=!0)})}),t};nf.texture=function(e){let t={};if(Ie.material(e,function(n){mC(n,function(i){t[i]=!0})}),ir(e,"EXT_feature_metadata")){Ie.mesh(e,function(o){Ie.meshPrimitive(o,function(r){let s=r.extensions;if(l(s)&&l(s.EXT_feature_metadata)){let c=s.EXT_feature_metadata.featureIdTextures;if(l(c)){let d=c.length;for(let u=0;u0)for(s.mesh=n.meshes[c[0]],t=1;t0&&l(s.skin)){let u=e.skins[s.skin];u.skeleton=n.nodes[c[0]]}delete s.skeletons}l(s.jointName)&&delete s.jointName}),Ie.skin(e,function(s){l(s.inverseBindMatrices)&&(s.inverseBindMatrices=n.accessors[s.inverseBindMatrices]);let a=s.jointNames;if(l(a)){let c=[],d=a.length;for(t=0;t=0&&(a=r.substring(0,s),c=r.substring(s));let d,u=Cwe[a];l(u)?(d=u+c,t[r]=d):l(Swe[a])||(d=`_${r}`,t[r]=d)}});for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o],s=i.attributes[o];l(s)&&(delete i.attributes[o],i.attributes[r]=s)}})}),Ie.technique(e,function(n){Ie.techniqueParameter(n,function(i){let o=t[i.semantic];l(o)&&(i.semantic=o)})})}function Lwe(e){Ie.camera(e,function(t){let n=t.perspective;if(l(n)){let i=n.aspectRatio;l(i)&&i===0&&delete n.aspectRatio;let o=n.yfov;l(o)&&o===0&&(n.yfov=1)}})}function JO(e,t){return l(t.byteStride)&&t.byteStride!==0?t.byteStride:El(e,t)}function Rwe(e){Ie.buffer(e,function(t){l(t.byteLength)||(t.byteLength=t.extras._pipeline.source.length)}),Ie.accessor(e,function(t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n],o=JO(e,t),r=t.byteOffset+t.count*o;i.byteLength=Math.max(y(i.byteLength,0),r)}})}function Zwe(e){let t,n,i,o=e.bufferViews,r={};Ie.accessorContainingVertexAttributeData(e,function(a){let c=e.accessors[a];l(c.bufferView)&&(r[c.bufferView]=!0)});let s={};Ie.accessor(e,function(a){l(a.bufferView)&&(s[a.bufferView]=y(s[a.bufferView],[]),s[a.bufferView].push(a))});for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){i=o[a];let c=s[a];c.sort(function(p,g){return p.byteOffset-g.byteOffset});let d=0,u=0,m=c.length;for(t=0;t=0;--r)if(i[r]===t){i.splice(r,1);return}}}),Ie.node(e,function(n,i){if(l(n.children)){let o=n.children.indexOf(t);o>-1&&(n.children.splice(o,1),kie(n)&&Uie(e,i))}}),delete e.nodes[t]}function Ewe(e){return Ie.node(e,function(t,n){kie(t)&&Uie(e,n)}),e}function Xwe(e){Ie.animation(e,function(t){Ie.animationSampler(t,function(n){let i=e.accessors[n.input];if(!l(i.min)||!l(i.max)){let o=Ox(e,i);i.min=o.min,i.max=o.max}})})}function Iwe(e){Ie.accessor(e,function(t){if(l(t.min)||l(t.max)){let n=Ox(e,t);l(t.min)&&(t.min=n.min),l(t.max)&&(t.max=n.max)}})}function Wwe(e){e.asset=y(e.asset,{}),e.asset.version="2.0",Nie(e),mwe(e),Ewe(e),hwe(e),fwe(e),bwe(e),ywe(e),Rwe(e),Zwe(e),Gwe(e),Xwe(e),Iwe(e),xwe(e),_we(e),Twe(e),Vwe(e),gX(e),Lwe(e),uX(e),hX(e),pwe(e)}var Pwe=["u_tex","u_diffuse","u_emission","u_diffuse_tex"],vwe=["u_diffuse","u_diffuse_mat"];function QO(e){e.pbrMetallicRoughness=l(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{},e.pbrMetallicRoughness.roughnessFactor=1,e.pbrMetallicRoughness.metallicFactor=0}function jO(e){return l(e.index)}function qO(e){return Array.isArray(e)&&e.length===4}function Die(e){let t=new Array(4);t[3]=e[3];for(let n=0;n<3;n++){let i=e[n];i<=.04045?t[n]=e[n]*.07739938080495357:t[n]=Math.pow((i+.055)*.9478672985781991,2.4)}return t}function wwe(e,t){t=y(t,y.EMPTY_OBJECT);let n=y(t.baseColorTextureNames,Pwe),i=y(t.baseColorFactorNames,vwe);Ie.material(e,function(o){Ie.materialValue(o,function(r,s){n.indexOf(s)!==-1&&jO(r)?(QO(o),o.pbrMetallicRoughness.baseColorTexture=r):i.indexOf(s)!==-1&&qO(r)&&(QO(o),o.pbrMetallicRoughness.baseColorFactor=Die(r))})}),Hx(e,"KHR_techniques_webgl"),Hx(e,"KHR_blend")}function KO(e,t){l(t)&&(qO(t)?e.pbrMetallicRoughness.baseColorFactor=Die(t):jO(t)&&(e.pbrMetallicRoughness.baseColorTexture=t))}function Mie(e,t){l(t)&&(qO(t)?e.emissiveFactor=t.slice(0,3):jO(t)&&(e.emissiveTexture=t))}function Fwe(e){Ie.material(e,function(t){let n=y(t.extensions,y.EMPTY_OBJECT).KHR_materials_common;if(!l(n))return;let i=y(n.values,{}),o=i.ambient,r=i.diffuse,s=i.emission,a=i.transparency,c=n.doubleSided,d=n.transparent;QO(t),n.technique==="CONSTANT"?(pu(e,"KHR_materials_unlit"),t.extensions=l(t.extensions)?t.extensions:{},t.extensions.KHR_materials_unlit={},KO(t,s),KO(t,o)):(KO(t,r),Mie(t,o),Mie(t,s)),l(c)&&(t.doubleSided=c),l(a)&&(l(t.pbrMetallicRoughness.baseColorFactor)?t.pbrMetallicRoughness.baseColorFactor[3]*=a:t.pbrMetallicRoughness.baseColorFactor=[1,1,1,a]),l(d)&&(t.alphaMode=d?"BLEND":"OPAQUE")}),Hx(e,"KHR_materials_common")}var yX=swe;var csn=T(S(),1);var Jrn=T(S(),1);var ri={POSITION:"POSITION",NORMAL:"NORMAL",TANGENT:"TANGENT",TEXCOORD:"TEXCOORD",COLOR:"COLOR",JOINTS:"JOINTS",WEIGHTS:"WEIGHTS",FEATURE_ID:"_FEATURE_ID"};function Awe(e){switch(e){case ri.POSITION:return"positionMC";case ri.NORMAL:return"normalMC";case ri.TANGENT:return"tangentMC";case ri.TEXCOORD:return"texCoord";case ri.COLOR:return"color";case ri.JOINTS:return"joints";case ri.WEIGHTS:return"weights";case ri.FEATURE_ID:return"featureId"}}ri.hasSetIndex=function(e){switch(e){case ri.POSITION:case ri.NORMAL:case ri.TANGENT:return!1;case ri.TEXCOORD:case ri.COLOR:case ri.JOINTS:case ri.WEIGHTS:case ri.FEATURE_ID:return!0}};ri.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"POSITION":return ri.POSITION;case"NORMAL":return ri.NORMAL;case"TANGENT":return ri.TANGENT;case"TEXCOORD":return ri.TEXCOORD;case"COLOR":return ri.COLOR;case"JOINTS":return ri.JOINTS;case"WEIGHTS":return ri.WEIGHTS;case"_FEATURE_ID":return ri.FEATURE_ID}};ri.fromPntsSemantic=function(e){switch(e){case"POSITION":case"POSITION_QUANTIZED":return ri.POSITION;case"RGBA":case"RGB":case"RGB565":return ri.COLOR;case"NORMAL":case"NORMAL_OCT16P":return ri.NORMAL;case"BATCH_ID":return ri.FEATURE_ID}};ri.getGlslType=function(e){switch(e){case ri.POSITION:case ri.NORMAL:case ri.TANGENT:return"vec3";case ri.TEXCOORD:return"vec2";case ri.COLOR:return"vec4";case ri.JOINTS:return"ivec4";case ri.WEIGHTS:return"vec4";case ri.FEATURE_ID:return"int"}};ri.getVariableName=function(e,t){let n=Awe(e);return l(t)&&(n+=`_${t}`),n};var Tt=Object.freeze(ri);function nc(){}nc.getError=function(e,t,n){let i=`Failed to load ${e}: ${t}`;l(n)&&l(n.message)&&(i+=` +${n.stack}`),n};O0.prototype.isDestroyed=function(){return!1};O0.prototype.destroy=function(){return this.unload(),me(this)};var eo=O0;var jtn=S(T(),1),rve={UNLOADED:0,LOADING:1,LOADED:2,PROCESSING:3,READY:4,FAILED:5},Wt=Object.freeze(rve);function wp(e){e=y(e,y.EMPTY_OBJECT);let t=e.typedArray,n=e.resource,i=e.cacheKey;this._typedArray=t,this._resource=n,this._cacheKey=i,this._state=Wt.UNLOADED,this._promise=void 0}l(Object.create)&&(wp.prototype=Object.create(eo.prototype),wp.prototype.constructor=wp);Object.defineProperties(wp.prototype,{cacheKey:{get:function(){return this._cacheKey}},typedArray:{get:function(){return this._typedArray}}});wp.prototype.load=async function(){return l(this._promise)?this._promise:l(this._typedArray)?(this._promise=Promise.resolve(this),this._promise):(this._promise=sve(this),this._promise)};async function sve(e){let t=e._resource;e._state=Wt.LOADING;try{let n=await wp._fetchArrayBuffer(t);return e.isDestroyed()?void 0:(e._typedArray=new Uint8Array(n),e._state=Wt.READY,e)}catch(n){if(e.isDestroyed())return;e._state=Wt.FAILED;let i=`Failed to load external buffer: ${t.url}`;throw e.getError(i,n)}}wp._fetchArrayBuffer=function(e){return e.fetchArrayBuffer()};wp.prototype.unload=function(){this._typedArray=void 0};var Nx=wp;var Vnn=S(T(),1);var hnn=S(T());var snn=S(T()),onn=function(){var e="b9H79TebbbeJq9Geueu9Geub9Gbb9Gvuuuuueu9Gduueu9Gluuuueu9Gvuuuuub9Gouuuuuub9Gluuuub9GiuuueuiKLdilevlevlooroowwvwbDDbelve9Weiiviebeoweuec:G;kekr;RiOo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWVbe8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9c9V919U9KbdE9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949wWV79P9V9UbiY9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWVbl8E9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWV9c9V919U9Kbv8A9TW79O9V9Wt9FW9U9J9V9KW69U9KW949wWV79P9V9UboE9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JWbra9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JW9c9V919U9KbwL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9p9JtbDK9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9r919HtbqL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVT949WbkE9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OWbPa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OW9ttV9P9Wbsa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9WbzK9TW79O9V9Wt9F79W9Ht9P9H29t9VVt9sW9T9H9WbHl79IV9RbODwebcekdQXq;C9oLdbk;GqeKu8Jjjjjbcjo9Rgv8Kjjjjbcbhodnalcefae0mbabcbRbN:kjjbc:GeV86bbavcjdfcbcjdzNjjjb8AdnaiTmbavcjdfadalz:tjjjb8Akabaefhrabcefhwavalfcbcbcjdal9RalcFe0EzNjjjb8Aavavcjdfalz:tjjjbhDcj;abal9Uc;WFbGgecjdaecjd6Ehqcbhkindndnaiak9nmbaDcjlfcbcjdzNjjjb8Aaqaiak9Rakaqfai6Egxcsfgecl4cifcd4hmadakal2fhPdndndnaec9WGgsTmbcbhzaPhHawhOxekdnaxmbalheinaraw9Ram6miawcbamzNjjjbamfhwaecufgembxvkkcbhAaPhOinaDaAfRbbhCaDcjlfheaOhoaxhXinaeaoRbbgQaC9RgCcetaC;acr4786bbaoalfhoaecefheaQhCaXcufgXmbkaraw9Ram6mdaOcefhOawcbamzNjjjbamfhwaAcefgAal9hmbxlkkindnaxTmbaDazfRbbhCaDcjlfheaHhoaxhXinaeaoRbbgQaC9RgCcetaC;acr4786bbaoalfhoaecefheaQhCaXcufgXmbkkaraO9Ram6mearaOcbamzNjjjbgLamfgw9RcK6mecbhKaDcjlfhOinaDcjlfaKfhYcwhAczhQceheindndnaegXce9hmbcuhoaYRbbmecbhodninaogecsSmeaecefhoaOaefcefRbbTmbkkcucbaecs6EhoxekaXcethocuaXtc;:bGcFb7hCcbheinaoaCaOaefRbb9nfhoaecefgecz9hmbkkaoaQaoaQ6geEhQaXaAaeEhAaXcetheaXcl6mbkdndndndnaAcufPdiebkaLaKco4fgeaeRbbcdciaAclSEaKci4coGtV86bbaAcw9hmeawaY8Pbb83bbawcwfaYcwf8Pbb83bbawczfhwxdkaLaKco4fgeaeRbbceaKci4coGtV86bbkdncwaA9Tg8Ambinawcb86bbawcefhwxbkkcuaAtcu7hYcbhEaOh3ina3hea8AhCcbhoinaeRbbgQaYcFeGgXaQaX6EaoaAtVhoaecefheaCcufgCmbkawao86bba3a8Afh3awcefhwaEa8AfgEcz6mbkcbheindnaOaefRbbgoaX6mbawao86bbawcefhwkaecefgecz9hmbkkdnaKczfgKas9pmbaOczfhOaraw9RcL0mekkaKas6meawTmeaHcefhHawhOazcefgzalSmixbkkcbhoxikcbhoaraw9Ralcaalca0E6mddnalc8F0mbawcbcaal9RgezNjjjbaefhwkawaDcjdfalz:tjjjbalfab9RhoxdkaDaPaxcufal2falz:tjjjb8Aaxakfhkawmbkcbhokavcjof8Kjjjjbaok9heeuaecaaeca0Eabcj;abae9Uc;WFbGgdcjdadcjd6Egdfcufad9Uae2adcl4cifcd4adV2fcefkmbcbabBdN:kjjbk:zse5u8Jjjjjbc;ae9Rgl8Kjjjjbcbhvdnaici9UgocHfae0mbabcbyd:e:kjjbgrc;GeV86bbalc;abfcFecjezNjjjb8AalcUfgw9cu83ibalc8WfgD9cu83ibalcyfgq9cu83ibalcafgk9cu83ibalcKfgx9cu83ibalczfgm9cu83ibal9cu83iwal9cu83ibabaefc9WfhPabcefgsaofhednaiTmbcmcsarcb9kgzEhHcbhOcbhAcbhCcbhXcbhQindnaeaP9nmbcbhvxikaQcufhvadaCcdtfgLydbhKaLcwfydbhYaLclfydbh8AcbhEdndndninalc;abfavcsGcitfgoydlh3dndndnaoydbgoaK9hmba3a8ASmekdnaoa8A9hmba3aY9hmbaEcefhExekaoaY9hmea3aK9hmeaEcdfhEkaEc870mdaXcufhvaLaEciGcx2goc:y1jjbfydbcdtfydbh3aLaocN1jjbfydbcdtfydbh8AaLaoc:q1jjbfydbcdtfydbhKcbhodnindnalavcsGcdtfydba39hmbaohYxdkcuhYavcufhvaocefgocz9hmbkkaOa3aOSgvaYce9iaYaH9oVgoGfhOdndndncbcsavEaYaoEgvcs9hmbarce9imba3a3aAa3cefaASgvEgAcefSmecmcsavEhvkasavaEcdtc;WeGV86bbavcs9hmea3aA9Rgvcetavc8F917hvinaeavcFb0crtavcFbGV86bbaecefheavcje6hoavcr4hvaoTmbka3hAxvkcPhvasaEcdtcPV86bba3hAkavTmiavaH9omicdhocehEaQhYxlkavcufhvaEclfgEc;ab9hmbkkdnaLceaYaOSceta8AaOSEcx2gvc:q1jjbfydbcdtfydbgKTaLavcN1jjbfydbcdtfydbg8AceSGaLavc:y1jjbfydbcdtfydbg3cdSGaOcb9hGazGg5ce9hmbaw9cu83ibaD9cu83ibaq9cu83ibak9cu83ibax9cu83ibam9cu83ibal9cu83iwal9cu83ibcbhOkcbhEaXcufgvhodnindnalaocsGcdtfydba8A9hmbaEhYxdkcuhYaocufhoaEcefgEcz9hmbkkcbhodnindnalavcsGcdtfydba39hmbaohExdkcuhEavcufhvaocefgocz9hmbkkaOaKaOSg8EfhLdndnaYcm0mbaYcefhYxekcbcsa8AaLSgvEhYaLavfhLkdndnaEcm0mbaEcefhExekcbcsa3aLSgvEhEaLavfhLkc9:cua8EEh8FcbhvaEaYcltVgacFeGhodndndninavcj1jjbfRbbaoSmeavcefgvcz9hmbxdkka5aKaO9havcm0VVmbasavc;WeV86bbxekasa8F86bbaeaa86bbaecefhekdna8EmbaKaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombkaKhAkdnaYcs9hmba8AaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka8AhAkdnaEcs9hmba3aA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka3hAkalaXcdtfaKBdbaXcefcsGhvdndnaYPzbeeeeeeeeeeeeeebekalavcdtfa8ABdbaXcdfcsGhvkdndnaEPzbeeeeeeeeeeeeeebekalavcdtfa3BdbavcefcsGhvkcihoalc;abfaQcitfgEaKBdlaEa8ABdbaQcefcsGhYcdhEavhXaLhOxekcdhoalaXcdtfa3BdbcehEaXcefcsGhXaQhYkalc;abfaYcitfgva8ABdlava3Bdbalc;abfaQaEfcsGcitfgva3BdlavaKBdbascefhsaQaofcsGhQaCcifgCai6mbkkcbhvaeaP0mbcbhvinaeavfavcj1jjbfRbb86bbavcefgvcz9hmbkaeab9Ravfhvkalc;aef8KjjjjbavkZeeucbhddninadcefgdc8F0meceadtae6mbkkadcrfcFeGcr9Uci2cdfabci9U2cHfkmbcbabBd:e:kjjbk:ydewu8Jjjjjbcz9Rhlcbhvdnaicvfae0mbcbhvabcbRb:e:kjjbc;qeV86bbal9cb83iwabcefhoabaefc98fhrdnaiTmbcbhwcbhDindnaoar6mbcbskadaDcdtfydbgqalcwfawaqav9Rgvavc8F91gv7av9Rc507gwcdtfgkydb9Rgvc8E91c9:Gavcdt7awVhvinaoavcFb0gecrtavcFbGV86bbavcr4hvaocefhoaembkakaqBdbaqhvaDcefgDai9hmbkkcbhvaoar0mbaocbBbbaoab9RclfhvkavkBeeucbhddninadcefgdc8F0meceadtae6mbkkadcwfcFeGcr9Uab2cvfk:bvli99dui99ludnaeTmbcuadcetcuftcu7:Yhvdndncuaicuftcu7:YgoJbbbZMgr:lJbbb9p9DTmbar:Ohwxekcjjjj94hwkcbhicbhDinalclfIdbgrJbbbbJbbjZalIdbgq:lar:lMalcwfIdbgk:lMgr:varJbbbb9BEgrNhxaqarNhrdndnakJbbbb9GTmbaxhqxekJbbjZar:l:tgqaq:maxJbbbb9GEhqJbbjZax:l:tgxax:marJbbbb9GEhrkdndnalcxfIdbgxJbbj:;axJbbj:;9GEgkJbbjZakJbbjZ9FEavNJbbbZJbbb:;axJbbbb9GEMgx:lJbbb9p9DTmbax:Ohmxekcjjjj94hmkdndnaqJbbj:;aqJbbj:;9GEgxJbbjZaxJbbjZ9FEaoNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:OhPxekcjjjj94hPkdndnarJbbj:;arJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;arJbbbb9GEMgr:lJbbb9p9DTmbar:Ohsxekcjjjj94hskdndnadcl9hmbabaifgzas86bbazcifam86bbazcdfaw86bbazcefaP86bbxekabaDfgzas87ebazcofam87ebazclfaw87ebazcdfaP87ebkalczfhlaiclfhiaDcwfhDaecufgembkkk;hlld99eud99eudnaeTmbdndncuaicuftcu7:YgvJbbbZMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikaic;8FiGhrinabcofcicdalclfIdb:lalIdb:l9EgialcwfIdb:lalaicdtfIdb:l9EEgialcxfIdb:lalaicdtfIdb:l9EEgiarV87ebdndnJbbj:;JbbjZalaicdtfIdbJbbbb9DEgoalaicd7cdtfIdbJ;Zl:1ZNNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabcdfaq87ebdndnalaicefciGcdtfIdbJ;Zl:1ZNaoNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabaq87ebdndnaoalaicufciGcdtfIdbJ;Zl:1ZNNgoJbbj:;aoJbbj:;9GEgwJbbjZawJbbjZ9FEavNJbbbZJbbb:;aoJbbbb9GEMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikabclfai87ebabcwfhbalczfhlaecufgembkkk:dvdxue998Jjjjjbcjd9Rgo8Kjjjjbadcd4hrdndndndnavcd9hmbadcl6meaohwarhDinawc:CuBdbawclfhwaDcufgDmbkaeTmiadcl6mdarcdthqalhkcbhxinaohwakhDarhminawawydbgPaDydbgscL4cFeGc:cufcbasEgsaPas9kEBdbaDclfhDawclfhwamcufgmmbkakaqfhkaxcefgxaeSmixbkkaeTmdxekaeTmekavcb9hadcl6gqVhzarcdthxavce9hhHcbhdindndndnaHmbaqmdc:CuhDalhwarhminaDawydbgPcL4cFeGc:cufcbaPEgPaDaP9kEhDawclfhwamcufgmmbxdkkc:CuhDazmbaohwalhmarhPinawamydbgscL4cFeGgkc8Aakc8A9kEc:cufcbasEBdbamclfhmawclfhwaPcufgPmbkkaqmbcbhwarhPinaDhmdnavceSmbaoawfydbhmkdndnalawfIdbgOcjjj;8iamai9RcefgmcLt9R::NJbbbZJbbb:;aOJbbbb9GEMgO:lJbbb9p9DTmbaO:Ohsxekcjjjj94hskabawfascFFFrGamcKtVBdbawclfhwaPcufgPmbkkabaxfhbalaxfhladcefgdae9hmbkkaocjdf8Kjjjjbk;HqdCui998Jjjjjbc:qd9Rgv8Kjjjjbavc:Sefcbc;KbzNjjjb8AcbhodnadTmbcbhoaiTmbdnabae9hmbavcuadcdtgradcFFFFi0Ecbyd:m:kjjbHjjjjbbgeBd:SeavceBd:mdaeabarz:tjjjb8Akavc:GefcwfcbBdbav9cb83i:Geavc:Gefaeadaiavc:Sefz:njjjbavyd:Gehwadci9UgDcbyd:m:kjjbHjjjjbbhravc:Sefavyd:mdgqcdtfarBdbavaqcefgkBd:mdarcbaDzNjjjbhxavc:SefakcdtfcuaicdtaicFFFFi0Ecbyd:m:kjjbHjjjjbbgmBdbavaqcdfgPBd:mdawhramhkinakalIdbalarydbgscwascw6Ecdtfc;ebfIdbMUdbarclfhrakclfhkaicufgimbkavc:SefaPcdtfcuaDcdtadcFFFF970Ecbyd:m:kjjbHjjjjbbgPBdbdnadci6mbaehraPhkaDhiinakamarydbcdtfIdbamarclfydbcdtfIdbMamarcwfydbcdtfIdbMUdbarcxfhrakclfhkaicufgimbkkaqcifhoavc;qbfhzavhravyd:KehHavyd:OehOcbhscbhkcbhAcehCinarhXcihQaeakci2gLcdtfgrydbhdarclfydbhqabaAcx2fgicwfarcwfydbgKBdbaiclfaqBdbaiadBdbaxakfce86bbazaKBdwazaqBdlazadBdbaPakcdtfcbBdbdnasTmbcihQaXhiinazaQcdtfaiydbgrBdbaQaraK9harad9haraq9hGGfhQaiclfhiascufgsmbkkaAcefhAcbhsinaOaHaeasaLfcdtfydbcdtgifydbcdtfgKhrawaifgqydbgdhidnadTmbdninarydbakSmearclfhraicufgiTmdxbkkaraKadcdtfc98fydbBdbaqaqydbcufBdbkascefgsci9hmbkdndnaQTmbcuhkJbbbbhYcbhqavyd:KehKavyd:OehLindndnawazaqcdtfydbcdtgsfydbgrmbaqcefhqxekaqcs0hiamasfgdIdbh8AadalcbaqcefgqaiEcdtfIdbalarcwarcw6Ecdtfc;ebfIdbMgEUdbaEa8A:thEarcdthiaLaKasfydbcdtfhrinaParydbgscdtfgdaEadIdbMg8AUdba8AaYaYa8A9DgdEhYasakadEhkarclfhraic98fgimbkkaqaQ9hmbkakcu9hmekaCaD9pmdindnaxaCfRbbmbaChkxdkaDaCcefgC9hmbxikkaQczaQcz6EhsazhraXhzakcu9hmbkkaocdtavc:Seffc98fhrdninaoTmearydbcbyd1:kjjbH:bjjjbbarc98fhraocufhoxbkkavc:qdf8Kjjjjbk;IlevucuaicdtgvaicFFFFi0Egocbyd:m:kjjbHjjjjbbhralalyd9GgwcdtfarBdbalawcefBd9GabarBdbaocbyd:m:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdlcuadcdtadcFFFFi0Ecbyd:m:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdwabydbcbavzNjjjb8Aadci9UhDdnadTmbabydbhoaehladhrinaoalydbcdtfgvavydbcefBdbalclfhlarcufgrmbkkdnaiTmbabydbhlabydlhrcbhvaihoinaravBdbarclfhralydbavfhvalclfhlaocufgombkkdnadci6mbabydlhrabydwhvcbhlinaecwfydbhoaeclfydbhdaraeydbcdtfgwawydbgwcefBdbavawcdtfalBdbaradcdtfgdadydbgdcefBdbavadcdtfalBdbaraocdtfgoaoydbgocefBdbavaocdtfalBdbaecxfheaDalcefgl9hmbkkdnaiTmbabydlheabydbhlinaeaeydbalydb9RBdbalclfhlaeclfheaicufgimbkkkQbabaeadaic:01jjbz:mjjjbkQbabaeadaic:C:jjjbz:mjjjbk9DeeuabcFeaicdtzNjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk;Wkivuo99lu8Jjjjjbc;W;Gb9Rgl8Kjjjjbcbhvalcj;Gbfcbc;KbzNjjjb8AalcuadcdtadcFFFFi0Egocbyd:m:kjjbHjjjjbbgrBdj9GalceBd;G9GalcFFF;7rBdwal9cFFF;7;3FF:;Fb83dbalcFFF97Bd;S9Gal9cFFF;7FFF:;u83d;K9Gaicd4hwdndnadmbJFFuFhDJFFuuhqJFFuuhkJFFuFhxJFFuuhmJFFuFhPxekawcdthsaehzincbhiinalaifgHazaifIdbgDaHIdbgxaxaD9EEUdbalc;K;GbfaifgHaDaHIdbgxaxaD9DEUdbaiclfgicx9hmbkazasfhzavcefgvad9hmbkalIdwhqalId;S9GhDalIdlhkalId;O9GhxalIdbhmalId;K9GhPkdndnadTmbJbbbbJbbjZJbbbbaPam:tgPaPJbbbb9DEgPaxak:tgxaxaP9DEgxaDaq:tgDaDax9DEgD:vaDJbbbb9BEhDawcdthsarhHadhzindndnaDaeIdbam:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcv2c;j:KM;jbGhvdndnaDaeclfIdbak:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcq2cM;j:KMeGavVhvdndnaDaecwfIdbaq:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaHavaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcC2c:KM;j:KdGVBdbaeasfheaHclfhHazcufgzmbkalcbcj;GbzNjjjbhiarhHadheinaiaHydbgzcFrGcx2fgvavydbcefBdbaiazcq4cFrGcx2fgvavydlcefBdlaiazcC4cFrGcx2fgzazydwcefBdwaHclfhHaecufgembxdkkalcbcj;GbzNjjjb8AkcbhHcbhzcbhecbhvinalaHfgiydbhsaiazBdbaicwfgwydbhOawavBdbaiclfgiydbhwaiaeBdbasazfhzaOavfhvawaefheaHcxfgHcj;Gb9hmbkcbhHalaocbyd:m:kjjbHjjjjbbgiBd:e9GdnadTmbabhzinazaHBdbazclfhzadaHcefgH9hmbkabhHadhzinalaraHydbgecdtfydbcFrGcx2fgvavydbgvcefBdbaiavcdtfaeBdbaHclfhHazcufgzmbkaihHadhzinalaraHydbgecdtfydbcq4cFrGcx2fgvavydlgvcefBdlabavcdtfaeBdbaHclfhHazcufgzmbkabhHadhzinalaraHydbgecdtfydbcC4cFrGcx2fgvavydwgvcefBdwaiavcdtfaeBdbaHclfhHazcufgzmbkcbhHinabaiydbcdtfaHBdbaiclfhiadaHcefgH9hmbkkclhidninaic98Smealcj;Gbfaifydbcbyd1:kjjbH:bjjjbbaic98fhixbkkalc;W;Gbf8Kjjjjbk9teiucbcbyd:q:kjjbgeabcifc98GfgbBd:q:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:q:kjjbgeabcrfc94GfgbBd:q:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd:q:kjjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd:q:kjjbfgdBd:q:kjjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akkk:Iddbcjwk:edb4:h9w9N94:P:gW:j9O:ye9Pbbbbbbebbbdbbbebbbdbbbbbbbdbbbbbbbebbbbbbb:l29hZ;69:9kZ;N;76Z;rg97Z;z;o9xZ8J;B85Z;:;u9yZ;b;k9HZ:2;Z9DZ9e:l9mZ59A8KZ:r;T3Z:A:zYZ79OHZ;j4::8::Y:D9V8:bbbb9s:49:Z8R:hBZ9M9M;M8:L;z;o8:;8:PG89q;x:J878R:hQ8::M:B;e87bbbbbbjZbbjZbbjZ:E;V;N8::Y:DsZ9i;H;68:xd;R8:;h0838:;W:NoZbbbb:WV9O8:uf888:9i;H;68:9c9G;L89;n;m9m89;D8Ko8:bbbbf:8tZ9m836ZS:2AZL;zPZZ818EZ9e:lxZ;U98F8:819E;68:bc:eqkzebbbebbbdbbbaWbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(o(e),{}).then(function(g){n=g.instance,n.exports.__wasm_call_ctors(),n.exports.meshopt_encodeVertexVersion(0),n.exports.meshopt_encodeIndexVersion(1)});function o(g){for(var f=new Uint8Array(g.length),x=0;x96?_-97:_>64?_-39:_+4}for(var C=0,x=0;x=3),c(n.exports.meshopt_spatialSortRemap,g,g.length/f,f*4)},encodeVertexBuffer:function(g,f,x){r(x>0&&x<=256),r(x%4==0);var _=n.exports.meshopt_encodeVertexBufferBound(f,x);return d(n.exports.meshopt_encodeVertexBuffer,_,g,f,x)},encodeIndexBuffer:function(g,f,x){r(x==2||x==4),r(f%3==0);var _=m(g,x),C=n.exports.meshopt_encodeIndexBufferBound(f,u(_)+1);return d(n.exports.meshopt_encodeIndexBuffer,C,_,f,4)},encodeIndexSequence:function(g,f,x){r(x==2||x==4);var _=m(g,x),C=n.exports.meshopt_encodeIndexSequenceBound(f,u(_)+1);return d(n.exports.meshopt_encodeIndexSequence,C,_,f,4)},encodeGltfBuffer:function(g,f,x,_){var C={ATTRIBUTES:this.encodeVertexBuffer,TRIANGLES:this.encodeIndexBuffer,INDICES:this.encodeIndexSequence};return r(C[_]),C[_](g,f,x)},encodeFilterOct:function(g,f,x,_){return r(x==4||x==8),r(_>=1&&_<=16),p(n.exports.meshopt_encodeFilterOct,g,f,x,_,16)},encodeFilterQuat:function(g,f,x,_){return r(x==8),r(_>=4&&_<=16),p(n.exports.meshopt_encodeFilterQuat,g,f,x,_,16)},encodeFilterExp:function(g,f,x,_,C){r(x>0&&x%4==0),r(_>=1&&_<=24);var V={Separate:0,SharedVector:1,SharedComponent:2};return p(n.exports.meshopt_encodeFilterExp,g,f,x,_,x,C?V[C]:1)}}}();var cnn=S(T()),Iie=function(){var e="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq;w8Wqdbk;esezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9Uc;WFbGgocjdaocjd6EhDaicefhocbhqdnindndndnaeaq9nmbaDaeaq9RaqaDfae6Egkcsfglcl4cifcd4hxalc9WGgmTmecbhPawcjdfhsaohzinaraz9Rax6mvarazaxfgo9RcK6mvczhlcbhHinalgic9WfgOawcj;cbffhldndndndndnazaOco4fRbbaHcoG4ciGPlbedibkal9cb83ibalcwf9cb83ibxikalaoRblaoRbbgOco4gAaAciSgAE86bbawcj;cbfaifglcGfaoclfaAfgARbbaOcl4ciGgCaCciSgCE86bbalcVfaAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc7faAaCfgARbbaOciGgOaOciSgOE86bbalctfaAaOfgARbbaoRbegOco4gCaCciSgCE86bbalc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc93faAaCfgARbbaOciGgOaOciSgOE86bbalc94faAaOfgARbbaoRbdgOco4gCaCciSgCE86bbalc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc97faAaCfgARbbaOciGgOaOciSgOE86bbalc98faAaOfgORbbaoRbigoco4gAaAciSgAE86bbalc99faOaAfgORbbaocl4ciGgAaAciSgAE86bbalc9:faOaAfgORbbaocd4ciGgAaAciSgAE86bbalcufaOaAfglRbbaociGgoaociSgoE86bbalaofhoxdkalaoRbwaoRbbgOcl4gAaAcsSgAE86bbawcj;cbfaifglcGfaocwfaAfgARbbaOcsGgOaOcsSgOE86bbalcVfaAaOfgORbbaoRbegAcl4gCaCcsSgCE86bbalc7faOaCfgORbbaAcsGgAaAcsSgAE86bbalctfaOaAfgORbbaoRbdgAcl4gCaCcsSgCE86bbalc91faOaCfgORbbaAcsGgAaAcsSgAE86bbalc4faOaAfgORbbaoRbigAcl4gCaCcsSgCE86bbalc93faOaCfgORbbaAcsGgAaAcsSgAE86bbalc94faOaAfgORbbaoRblgAcl4gCaCcsSgCE86bbalc95faOaCfgORbbaAcsGgAaAcsSgAE86bbalc96faOaAfgORbbaoRbvgAcl4gCaCcsSgCE86bbalc97faOaCfgORbbaAcsGgAaAcsSgAE86bbalc98faOaAfgORbbaoRbogAcl4gCaCcsSgCE86bbalc99faOaCfgORbbaAcsGgAaAcsSgAE86bbalc9:faOaAfgORbbaoRbrgocl4gAaAcsSgAE86bbalcufaOaAfglRbbaocsGgoaocsSgoE86bbalaofhoxekalao8Pbb83bbalcwfaocwf8Pbb83bbaoczfhokdnaiam9pmbaHcdfhHaiczfhlarao9RcL0mekkaiam6mvaoTmvdnakTmbawaPfRbbhHawcj;cbfhlashiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkkascefhsaohzaPcefgPad9hmbxikkcbc99arao9Radcaadca0ESEhoxlkaoaxad2fhCdnakmbadhlinaoTmlarao9Rax6mlaoaxfhoalcufglmbkaChoxekcbhmawcjdfhAinarao9Rax6miawamfRbbhHawcj;cbfhlaAhiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkaAcefhAaoaxfhoamcefgmad9hmbkaChokabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqaombkc9:hoxekc9:hokavcj;ebf8Kjjjjbaok;cseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;oiliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabaiavcefciGfcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavciGfgkcd7cetfaD87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavcufciGfcetfaD87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohvxekcjjjj94hvkabakcetfav87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb",t="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq:p9sqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk:N8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhlaicefhodnaeTmbadTmbalc;WFbGglcjdalcjd6EhwcbhDinawaeaD9RaDawfae6Egqcsfglc9WGgkci2hxakcethmalcl4cifcd4hPabaDad2fhsakc;ab6hzcbhHincbhOaohAdndninaraA9RaP6meavcj;cbfaOak2fhCaAaPfhocbhidnazmbarao9Rc;Gb6mbcbhlinaCalfhidndndndndnaAalco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklbaoczfhokdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklzaoczfhokdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklaaoczfhokdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaoclfaYpQbfaXc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaocwfaYpQbfaXc:q:yjjbfRbbfhoxekaiaopbbbpkl8Waoczfhokalc;abfhialcjefak0meaihlarao9Rc;Fb0mbkkdnaiak9pmbaici4hlinarao9RcK6miaCaifhXdndndndndnaAaico4fRbbalcoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpkbbxikaXaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaXaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaXaopbbbpkbbaoczfhokalcdfhlaiczfgiak6mbkkaoTmeaohAaOcefgOclSmdxbkkc9:hoxlkdnakTmbavcjdfaHfhiavaHfpbdbhYcbhXinaiavcj;cbfaXfglpblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLalakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEalamfpblbg3cep9Ta3aQp9op9Hp9rg3alaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfhiaXczfgXak6mbkkaHclfgHad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfgDae6mbkkcbc99arao9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk::seHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:wPliuo97eue978Jjjjjbca9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalaeSmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskdnalTmbcbhvabhdinadczfgxaxpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oaoarpmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalaeSmbaiaeciGgvcitgdfcbcaad9R;8kbaiabalcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oaoarpmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalaeSmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnavalSmbaialciGgecdtgdVcbc;abad9R;8kbaiabavcdtfgvad;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkavaiad;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb",n=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var o=WebAssembly.validate(n)?a(t):a(e),r,s=WebAssembly.instantiate(o,{}).then(function(C){r=C.instance,r.exports.__wasm_call_ctors()});function a(C){for(var V=new Uint8Array(C.length),Z=0;Z96?R-97:R>64?R-39:R+4}for(var G=0,Z=0;Z0?x(C,V,Z,u[R],d[G]):s.then(function(){var W=new Uint8Array(C*V);return c(r,r.exports[u[R]],W,C,V,Z,r.exports[d[G]]),W})}}}();var unn=S(T()),lnn=function(){var e="b9H79Tebbbe9Hk9Geueu9Geub9Gbb9Gsuuuuuuuuuuuu99uueu9Gvuuuuub9Gvuuuuue999Gquuuuuuu99uueu9Gwuuuuuu99ueu9Giuuue999Gluuuueu9GiuuueuizsdilvoirwDbqqbeqlve9Weiiviebeoweuecj;jekr:Tewo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bbz9TW79O9V9Wt9F79P9T9W29P9M95bl8E9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9OcttV9P9I91tW7bvQ9TW79O9V9Wt9F79P9T9W29P9M959q9V9P9Ut7boX9TW79O9V9Wt9F79P9T9W29P9M959t9J9H2Wbra9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9Wbwl79IV9RbDDwebcekdmxq:f97sdbk:39si8Au8A99zu8Jjjjjbc;W;ab9Rgs8Kjjjjbcbhzascxfcbc;Kbz:ljjjb8AdnabaeSmbabaeadcdtz:kjjjb8AkdndnamcdGmbcbhHxekasalcrfci4gecbyd;S1jjbHjjjjbbgOBdxasceBd2aOcbaez:ljjjbhAcbhlcbhednadTmbcbhlabheadhOinaAaeydbgCci4fgXaXRbbgXceaCcrGgCtV86bbaXcu7aC4ceGalfhlaeclfheaOcufgOmbkcualcdtalcFFFFi0Ehekasaecbyd;S1jjbHjjjjbbgHBdzascdBd2alcd4alfhCcehOinaOgecethOaeaC6mbkcdhzcbhQascuaecdtgOaecFFFFi0Ecbyd;S1jjbHjjjjbbgCBdCasciBd2aCcFeaOz:ljjjbhLdnadTmbaecufhXcbhKinabaQcdtfgYydbgAc:v;t;h;Ev2hCcbhedndninaLaCaXGgCcdtfg8AydbgOcuSmeaHaOcdtfydbaASmdaecefgeaCfhCaeaX9nmbxdkkaHaKcdtfaABdba8AaKBdbaKhOaKcefhKkaYaOBdbaQcefgQad9hmbkkaLcbyd;O1jjbH:bjjjbbascdBd2kascxfazcdtfcualcefgecdtaecFFFFi0Ecbyd;S1jjbHjjjjbbgEBdbasaEBdlasazceVgeBd2ascxfaecdtfcuadcitadcFFFFe0Ecbyd;S1jjbHjjjjbbg3Bdbasa3BdwasazcdfgeBd2asclfabadalcbz:cjjjbascxfaecdtfcualcdtg5alcFFFFi0Eg8Ecbyd;S1jjbHjjjjbbgOBdbasazcifgeBd2ascxfaecdtfa8Ecbyd;S1jjbHjjjjbbg8FBdbasazclVgaBd2alcd4alfhXcehCinaCgecethCaeaX6mbkcbhKascxfaacdtfghcuaecdtgCaecFFFFi0Ecbyd;S1jjbHjjjjbbgXBdbasazcvVggBd2aXcFeaCz:ljjjbhQdnalTmbavcd4hAaecufhCinaKhednaHTmbaHaKcdtfydbhekaiaeaA2cdtfgeydlgXcH4aX7c:F:b:DD2aeydbgXcH4aX7c;D;O:B8J27aeydwgecH4ae7c:3F;N8N27aCGheaKcdth8JdndndndndnaHTmbaHa8JfhYcbhXinaQaecdtfgLydbg8AcuSmlaiaHa8AcdtfydbaA2cdtfaiaYydbaA2cdtfcxz:ojjjbTmiaXcefgXaefaCGheaXaC9nmbxdkkaiaKaA2cdtfhYcbhXinaQaecdtfgLydbg8AcuSmiaia8AaA2cdtfaYcxz:ojjjbTmdaXcefgXaefaCGheaXaC9nmbkkcbhLkaLydbgecu9hmekaLaKBdbaKhekaOa8JfaeBdbaKcefgKal9hmbkcbhea8FhCinaCaeBdbaCclfhCalaecefge9hmbkcbheaOhCa8FhXindnaeaCydbgASmbaXa8FaAcdtfgAydbBdbaAaeBdbkaCclfhCaXclfhXalaecefge9hmbkkcbh8KaQcbyd;O1jjbH:bjjjbbasaaBd2ahalcbyd;S1jjbHjjjjbbgABdbasagBd2ascxfagcdtfa8Ecbyd;S1jjbHjjjjbbgeBdbasazcofgCBd2ascxfaCcdtfa8Ecbyd;S1jjbHjjjjbbgCBdbasazcrfg8LBd2aecFea5z:ljjjbh8MaCcFea5z:ljjjbh8NdnalTmba3cwfhyindnaEa8KgXcefg8Kcdtfydbg8AaEaXcdtgefydbgCSmba8AaC9Rh8Ja3aCcitfh5a8Naefhga8MaefhKcbhLindndna5aLcitfydbgQaX9hmbaKaXBdbagaXBdbxekdnaEaQcdtgafgeclfydbgCaeydbgeSmba3aecitg8AfydbaXSmeaCae9Rhhaecu7aCfhYaya8AfhCcbheinaYaeSmeaecefheaCydbh8AaCcwfhCa8AaX9hmbkaeah6meka8NaafgeaXaQaeydbcuSEBdbaKaQaXaKydbcuSEBdbkaLcefgLa8J9hmbkka8Kal9hmbkaOhCaHhLa8FhXa8Nh8Aa8MhQcbheindndnaeaCydbgY9hmbdnaqTmbaehYdnaHTmbaLydbhYkaqaYfRbbTmbaAaefcl86bbxdkdnaeaXydbgY9hmbaQydbhYdna8AydbgKcu9hmbaYcu9hmbaAaefcb86bbxikaAaefh8JdnaeaKSmbaeaYSmba8Jce86bbxika8Jcl86bbxdkdnaea8FaYcdtgKfydb9hmbdna8Aydbg8JcuSmbaea8JSmbaQydbg5cuSmbaea5Smba8NaKfydbgacuSmbaaaYSmba8MaKfydbgKcuSmbaKaYSmbdnaOa8JcdtfydbaOaKcdtfydb9hmbaOa5cdtfydbaOaacdtfydb9hmbaAaefcd86bbxlkaAaefcl86bbxikaAaefcl86bbxdkaAaefcl86bbxekaAaefaAaYfRbb86bbkaCclfhCaLclfhLaXclfhXa8Aclfh8AaQclfhQalaecefge9hmbkamceGTmbaAheal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eIdbMUdbaeclfgLaXclfIdbaLIdbMUdbaecwfgLaXcwfIdbaLIdbMUdbaecxfgeaXcxfIdbaeIdbMUdbaCczfhCa8Acufg8AmbkawaiaD2cltfhQcbhCaDh8AinaQaCfgeasc;WbfaCfgXIdbaeIdbMUdbaeclfgLaXclfIdbaLIdbMUdbaecwfgLaXcwfIdbaLIdbMUdbaecxfgeaXcxfIdbaeIdbMUdbaCczfhCa8Acufg8AmbkaYcifgYad6mbkkasydlhJcbhednalTmbaJclfheaJydbh8AaAhCalhLcbhXincbaeydbgQa8A9RaCRbbcpeGEaXfhXaCcefhCaeclfheaQh8AaLcufgLmbkaXce4hekcuadae9Rcifg8Lcx2a8Lc;v:Q;v:Qe0Ecbyd;S1jjbHjjjjbbhhascxfasyd2gecdtfahBdbasaecefgCBd2ascxfaCcdtfcua8Lcdta8LcFFFFi0Ecbyd;S1jjbHjjjjbbgzBdbasaecdfgCBd2ascxfaCcdtfa8Ecbyd;S1jjbHjjjjbbg3BdbasaecifgCBd2ascxfaCcdtfalcbyd;S1jjbHjjjjbbg9eBdbasaeclfBd2a8PJbbjZamclGEhcJbbbbh83dnadak9nmbdna8Lci6mbaxaxNacacN:vhBaDclthTahcwfhSJbbbbh83inasclfabadgoalaOz:cjjjbabhicbhEcbhyinabaycdtfh8JcbheindnaOaiaefydbgXcdtgKfydbg8AaOa8Jaec:S1jjbfydbcdtfydbgCcdtfydbgLSmbaAaCfRbbgYcv2aAaXfRbbgQfc;a1jjbfRbbgaaQcv2aYfg5c;a1jjbfRbbgdVcFeGTmbdnaLa8A9nmba5c:q1jjbfRbbcFeGmekdnaQaY9hmbaQcufcFeGce0mba8MaKfydbaC9hmekahaEcx2fg8AaCaXadcFeGgLEBdla8AaXaCaLEBdba8AaLaaGcb9hBdwaEcefhEkaeclfgecx9hmbkdnaycifgyao9pmbaicxfhiaEcifa8L9nmekkdnaEmbaohdxikcbhYinJbbbbJbbjZa8KaOahaYcx2fg8AydlgLa8AydbgQa8AydwgCEg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Ud8KaeaCIdyaeIdyMUdydnaDTmbaqaXfgeaqaLfgCIdbaeIdbMUdbaeaCIdlaeIdlMUdlaeaCIdwaeIdwMUdwaeaCIdxaeIdxMUdxaeaCIdzaeIdzMUdzaeaCIdCaeIdCMUdCaeaCIdKaeIdKMUdKaeaCId3aeId3MUd3aeaCIdaaeIdaMUdaaeaCId8KaeId8KMUd8KaeaCIdyaeIdyMUdyaTa9r2hYaTa8A2hKawhCaDhLinaCaKfgeaCaYfgXIdbaeIdbMUdbaeclfgQaXclfIdbaQIdbMUdbaecwfgQaXcwfIdbaQIdbMUdbaecxfgeaXcxfIdbaeIdbMUdbaCczfhCaLcufgLmbkka8JcwfhCdndndndnaAaifgXRbbc9:fPdebdkaiheina3aecdtgefa8ABdba8Faefydbgeai9hmbxikka8Fa9ofydbhea8Fa9qfydbhia3a9qfa9nBdbaeh9nka3aicdtfa9nBdbka9sce86bba9pce86bbaCIdbgRa83a83aR9DEh83a9icefh9icecdaXRbbceSEadfhdka5cefg5aE9hmbkkdna9imbaohdxikdnalTmbcbhCa8MheindnaeydbgXcuSmbdnaCa3aXcdtg8AfydbgX9hmba8Ma8AfydbhXkaeaXBdbkaeclfhealaCcefgC9hmbkcbhCa8NheindnaeydbgXcuSmbdnaCa3aXcdtg8AfydbgX9hmba8Na8AfydbhXkaeaXBdbkaeclfhealaCcefgC9hmbkkcbhdabhecbhLindna3aeydbcdtfydbgCa3aeclfydbcdtfydbgXSmbaCa3aecwfydbcdtfydbg8ASmbaXa8ASmbabadcdtfgQaCBdbaQcwfa8ABdbaQclfaXBdbadcifhdkaecxfheaLcifgLao6mbkadak9nmdxbkkasclfabadalaOz:cjjjbkdnaHTmbadTmbadheinabaHabydbcdtfydbBdbabclfhbaecufgembkkdnaPTmbaPaca83:rNUdbkasyd2gecdtascxffc98fhOdninaeTmeaOydbcbyd;O1jjbH:bjjjbbaOc98fhOaecufhexbkkasc;W;abf8Kjjjjbadk;Yieouabydlhvabydbclfcbaicdtz:ljjjbhoadci9UhrdnadTmbdnalTmbaehwadhDinaoalawydbcdtfydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbxdkkaehwadhDinaoawydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbkkdnaiTmbcbhDaohwinawydbhqawaDBdbawclfhwaqaDfhDaicufgimbkkdnadci6mbinaecwfydbhwaeclfydbhDaeydbhidnalTmbalawcdtfydbhwalaDcdtfydbhDalaicdtfydbhikavaoaicdtfgqydbcitfaDBdbavaqydbcitfawBdlaqaqydbcefBdbavaoaDcdtfgqydbcitfawBdbavaqydbcitfaiBdlaqaqydbcefBdbavaoawcdtfgwydbcitfaiBdbavawydbcitfaDBdlawawydbcefBdbaecxfhearcufgrmbkkabydbcbBdbk;Podvuv998Jjjjjbca9RgvcFFF;7rBd3av9cFFF;7;3FF:;Fb83dCavcFFF97Bdzav9cFFF;7FFF:;u83dwdnadTmbaicd4hodnabmbdnalTmbcbhrinaealarcdtfydbao2cdtfhwcbhiinavcCfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkarcefgrad9hmbxikkaocdthrcbhwincbhiinavcCfaifgDaeaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkaearfheawcefgwad9hmbxdkkdnalTmbcbhrinabarcx2fgiaealarcdtfydbao2cdtfgwIdbUdbaiawIdlUdlaiawIdwUdwcbhiinavcCfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkarcefgrad9hmbxdkkaocdthlcbhraehwinabarcx2fgiaearao2cdtfgDIdbUdbaiaDIdlUdlaiaDIdwUdwcbhiinavcCfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkawalfhwarcefgrad9hmbkkJbbbbavIdwavIdCgk:tgqaqJbbbb9DEgqavIdxavIdKgx:tgmamaq9DEgqavIdzavId3gm:tgPaPaq9DEhPdnabTmbadTmbJbbbbJbbjZaP:vaPJbbbb9BEhqinabaqabIdbak:tNUdbabclfgvaqavIdbax:tNUdbabcwfgvaqavIdbam:tNUdbabcxfhbadcufgdmbkkaPk8MbabaeadaialavcbcbcbcbcbaoarawaDz:bjjjbk8MbabaeadaialavaoarawaDaqakaxamaPz:bjjjbk;3Aowud99wue99iul998Jjjjjbc;Wb9Rgw8KjjjjbdndnarmbcbhDxekawcxfcbc;Kbz:ljjjb8Aawcuadcx2adc;v:Q;v:Qe0Ecbyd;S1jjbHjjjjbbgqBdxawceBd2aqaeadaicbz:djjjb8AawcuadcdtadcFFFFi0Egkcbyd;S1jjbHjjjjbbgxBdzawcdBd2adcd4adfhmceheinaegicetheaiam6mbkcbhmawcuaicdtgPaicFFFFi0Ecbyd;S1jjbHjjjjbbgsBdCawciBd2dndnar:Zgz:rJbbbZMgH:lJbbb9p9DTmbaH:Ohexekcjjjj94hekaicufhOc:bwhAcbhCcbhXadhQinaChLaeaAgKcufaeaK9iEamgDcefaeaD9kEhYdndnadTmbaYcuf:YhHaqhiaxheadhmindndnaiIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhAxekcjjjj94hAkaAcCthAdndnaiclfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaCcqtaAVhAdndnaicwfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaeaAaCVBdbaicxfhiaeclfheamcufgmmbkascFeaPz:ljjjbhEcbh3cbh5indnaEaxa5cdtfydbgAcm4aA7c:v;t;h;Ev2gics4ai7aOGgmcdtfgCydbgecuSmbaeaASmbcehiinaEamaifaOGgmcdtfgCydbgecuSmeaicefhiaeaA9hmbkkaCaABdba3aecuSfh3a5cefg5ad9hmbxdkkascFeaPz:ljjjb8Acbh3kaDaYa3ar0giEhmaLa3aiEhCdna3arSmbaYaKaiEgAam9Rcd9imbdndnaXcl0mbdnaQ:ZgHaL:Zg8A:taY:Yg8EaD:Y:tg8Fa8EaK:Y:tgaa3:Zghaz:tNNNaHaz:taaNa8Aah:tNa8Aaz:ta8FNahaH:tNM:va8EMJbbbZMgH:lJbbb9p9DTmbaH:Ohexdkcjjjj94hexekamaAfcd9Theka3aQaiEhQaXcefgXcs9hmekkdndnaCmbcihicbhDxekcbhiawakcbyd;S1jjbHjjjjbbg5BdKawclBd2dndnadTmbamcuf:YhHaqhiaxheadhmindndnaiIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhAxekcjjjj94hAkaAcCthAdndnaiclfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaCcqtaAVhAdndnaicwfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaeaAaCVBdbaicxfhiaeclfheamcufgmmbkascFeaPz:ljjjbhEcbhDcbh3inaxa3cdtgYfydbgAcm4aA7c:v;t;h;Ev2gics4ai7hecbhidndninaEaeaOGgmcdtfgCydbgecuSmednaxaecdtgCfydbaASmbaicefgiamfheaiaO9nmekka5aCfydbhixekaCa3BdbaDhiaDcefhDka5aYfaiBdba3cefg3ad9hmbkcuaDc32giaDc;j:KM;jb0EhexekascFeaPz:ljjjb8AcbhDcbhekawaecbyd;S1jjbHjjjjbbgeBd3awcvBd2aecbaiz:ljjjbhCavcd4hxdnadTmbdnalTmbaxcdthEa5hAalheaqhmadhOinaCaAydbc32fgiamIdbaiIdbMUdbaiamclfIdbaiIdlMUdlaiamcwfIdbaiIdwMUdwaiaeIdbaiIdxMUdxaiaeclfIdbaiIdzMUdzaiaecwfIdbaiIdCMUdCaiaiIdKJbbjZMUdKaAclfhAaeaEfheamcxfhmaOcufgOmbxdkka5hmaqheadhAinaCamydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiaiIdxJbbbbMUdxaiaiIdzJbbbbMUdzaiaiIdCJbbbbMUdCaiaiIdKJbbjZMUdKamclfhmaecxfheaAcufgAmbkkdnaDTmbaChiaDheinaiaiIdbJbbbbJbbjZaicKfIdbgH:vaHJbbbb9BEgHNUdbaiclfgmaHamIdbNUdbaicwfgmaHamIdbNUdbaicxfgmaHamIdbNUdbaiczfgmaHamIdbNUdbaicCfgmaHamIdbNUdbaic3fhiaecufgembkkcbhAawcuaDcdtgYaDcFFFFi0Egicbyd;S1jjbHjjjjbbgeBdaawcoBd2awaicbyd;S1jjbHjjjjbbgEBd8KaecFeaYz:ljjjbh3dnadTmbaoaoNh8Aaxcdthxalheina8Aaec;C1jjbalEgmIdwaCa5ydbgOc32fgiIdC:tgHaHNamIdbaiIdx:tgHaHNamIdlaiIdz:tgHaHNMMNaqcwfIdbaiIdw:tgHaHNaqIdbaiIdb:tgHaHNaqclfIdbaiIdl:tgHaHNMMMhHdndna3aOcdtgifgmydbcuSmbaEaifIdbaH9ETmekamaABdbaEaifaHUdbka5clfh5aeaxfheaqcxfhqadaAcefgA9hmbkkaba3aYz:kjjjb8AcrhikaicdthiinaiTmeaic98fgiawcxffydbcbyd;O1jjbH:bjjjbbxbkkawc;Wbf8KjjjjbaDk:Odieui99iu8Jjjjjbca9RgicFFF;7rBd3ai9cFFF;7;3FF:;Fb83dCaicFFF97Bdzai9cFFF;7FFF:;u83dwdndnaembJbbjFhlJbbjFhvJbbjFhoxekadcd4cdthrcbhwincbhdinaicCfadfgDabadfIdbglaDIdbgvaval9EEUdbaicwfadfgDalaDIdbgvaval9DEUdbadclfgdcx9hmbkabarfhbawcefgwae9hmbkaiIdzaiId3:thoaiIdxaiIdK:thvaiIdwaiIdC:thlkJbbbbalalJbbbb9DEglavaval9DEglaoaoal9DEk9DeeuabcFeaicdtz:ljjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk9teiucbcbyd;W1jjbgeabcifc98GfgbBd;W1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;W1jjbgeabcrfc94GfgbBd;W1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd;W1jjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd;W1jjbfgdBd;W1jjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akk6eiucbhidnadTmbdninabRbbglaeRbbgv9hmeaecefheabcefhbadcufgdmbxdkkalav9Rhikaikk:bedbcjwk9Oebbbdbbbbbbbebbbeeebeebebbeeebebbbbbebebbbbbebbbdbbbbbbbbbbbbbbbeeeeebebbbbbebbbbbeebbbbbbbbbbbbbbbbbbbbbc;Owkxebbbdbbbj9Kbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(o(e),{}).then(function(f){n=f.instance,n.exports.__wasm_call_ctors()});function o(f){for(var x=new Uint8Array(f.length),_=0;_96?C-97:C>64?C-39:C+4}for(var V=0,_=0;_=3),r(C>=0&&C<=f.length),r(C%3==0),r(V>=0);for(var R=0,G=0;G<(Z?Z.length:0);++G)r(Z[G]in g),R|=g[Z[G]];var W=f.BYTES_PER_ELEMENT==4?f:new Uint32Array(f),v=d(n.exports.meshopt_simplify,W,f.length,x,x.length/_,_*4,C,V,R);return v[0]=f instanceof Uint32Array?v[0]:new f.constructor(v[0]),v},simplifyWithAttributes:function(f,x,_,C,V,Z,R,G,W,v){r(this.useExperimentalFeatures),r(f instanceof Uint32Array||f instanceof Int32Array||f instanceof Uint16Array||f instanceof Int16Array),r(f.length%3==0),r(x instanceof Float32Array),r(x.length%_==0),r(_>=3),r(C instanceof Float32Array),r(C.length%V==0),r(V>=0),r(R==null||R.length==x.length),r(G>=0&&G<=f.length),r(G%3==0),r(W>=0),r(Array.isArray(Z)),r(V>=Z.length),r(Z.length<=16);for(var P=0,F=0;F<(v?v.length:0);++F)r(v[F]in g),P|=g[v[F]];var M=f.BYTES_PER_ELEMENT==4?f:new Uint32Array(f),b=u(n.exports.meshopt_simplifyWithAttributes,M,f.length,x,x.length/_,_*4,C,V*4,new Float32Array(Z),R?new Uint8Array(R):null,G,W,P);return b[0]=f instanceof Uint32Array?b[0]:new f.constructor(b[0]),b},getScale:function(f,x){return r(f instanceof Float32Array),r(f.length%x==0),r(x>=3),m(n.exports.meshopt_simplifyScale,f,f.length/x,x*4)},simplifyPoints:function(f,x,_,C,V,Z){return r(this.useExperimentalFeatures),r(f instanceof Float32Array),r(f.length%x==0),r(x>=3),r(_>=0&&_<=f.length/x),C?(r(C instanceof Float32Array),r(C.length%V==0),r(V>=3),r(f.length/x==C.length/V),p(n.exports.meshopt_simplifyPoints,f,f.length/x,x*4,C,V*4,Z,_)):p(n.exports.meshopt_simplifyPoints,f,f.length/x,x*4,void 0,0,0,_)}}}();function Ux(e){e=y(e,y.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.bufferViewId,o=e.gltfResource,r=e.baseResource,s=e.cacheKey,a=n.bufferViews[i],c=a.buffer,d=a.byteOffset,u=a.byteLength,m=!1,p,g,f,x;if(oi(a,"EXT_meshopt_compression")){let C=a.extensions.EXT_meshopt_compression;c=C.buffer,d=y(C.byteOffset,0),u=C.byteLength,m=!0,p=C.byteStride,g=C.count,f=C.mode,x=y(C.filter,"NONE")}let _=n.buffers[c];this._hasMeshopt=m,this._meshoptByteStride=p,this._meshoptCount=g,this._meshoptMode=f,this._meshoptFilter=x,this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._buffer=_,this._bufferId=c,this._byteOffset=d,this._byteLength=u,this._cacheKey=s,this._bufferLoader=void 0,this._typedArray=void 0,this._state=Wt.UNLOADED,this._promise=void 0}l(Object.create)&&(Ux.prototype=Object.create(eo.prototype),Ux.prototype.constructor=Ux);Object.defineProperties(Ux.prototype,{cacheKey:{get:function(){return this._cacheKey}},typedArray:{get:function(){return this._typedArray}}});async function ave(e){try{let t=cve(e);if(e._bufferLoader=t,await t.load(),e.isDestroyed())return;let n=t.typedArray,i=new Uint8Array(n.buffer,n.byteOffset+e._byteOffset,e._byteLength);if(e.unload(),e._typedArray=i,e._hasMeshopt){let o=e._meshoptCount,r=e._meshoptByteStride,s=new Uint8Array(o*r);Iie.decodeGltfBuffer(s,o,r,e._typedArray,e._meshoptMode,e._meshoptFilter),e._typedArray=s}return e._state=Wt.READY,e}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=Wt.FAILED,e.getError("Failed to load buffer view",t)}}Ux.prototype.load=async function(){return l(this._promise)?this._promise:(this._state=Wt.LOADING,this._promise=ave(this),this._promise)};function cve(e){let t=e._resourceCache,n=e._buffer;if(l(n.uri)){let o=e._baseResource.getDerivedResource({url:n.uri});return t.getExternalBufferLoader({resource:o})}return t.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:e._bufferId})}Ux.prototype.unload=function(){l(this._bufferLoader)&&!this._bufferLoader.isDestroyed()&&this._resourceCache.unload(this._bufferLoader),this._bufferLoader=void 0,this._typedArray=void 0};var aC=Ux;var Ann=S(T(),1);var Wnn=S(T(),1);function Zr(){}Zr._maxDecodingConcurrency=Math.max(Yt.hardwareConcurrency-1,1);Zr._decoderTaskProcessor=void 0;Zr._taskProcessorReady=!1;Zr._error=void 0;Zr._getDecoderTaskProcessor=function(){if(!l(Zr._decoderTaskProcessor)){let e=new bi("decodeDraco",Zr._maxDecodingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}).then(function(t){t?Zr._taskProcessorReady=!0:Zr._error=new ue("Draco decoder could not be initialized.")}).catch(t=>{Zr._error=t}),Zr._decoderTaskProcessor=e}return Zr._decoderTaskProcessor};Zr.decodePointCloud=function(e){let t=Zr._getDecoderTaskProcessor();if(l(Zr._error))throw Zr._error;if(Zr._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])};Zr.decodeBufferView=function(e){let t=Zr._getDecoderTaskProcessor();if(l(Zr._error))throw Zr._error;if(Zr._taskProcessorReady)return t.scheduleTask(e,[e.array.buffer])};var Fp=Zr;function z0(e){e=y(e,y.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.draco,o=e.gltfResource,r=e.baseResource,s=e.cacheKey;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._draco=i,this._cacheKey=s,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=Wt.UNLOADED,this._promise=void 0,this._dracoError=void 0}l(Object.create)&&(z0.prototype=Object.create(eo.prototype),z0.prototype.constructor=z0);Object.defineProperties(z0.prototype,{cacheKey:{get:function(){return this._cacheKey}},decodedData:{get:function(){return this._decodedData}}});async function lve(e){let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._draco.bufferView,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=Wt.PROCESSING,e)}catch(n){if(e.isDestroyed())return;Xie(e,n)}}z0.prototype.load=async function(){return l(this._promise)?this._promise:(this._state=Wt.LOADING,this._promise=lve(this),this._promise)};function Xie(e,t){throw e.unload(),e._state=Wt.FAILED,e.getError("Failed to load Draco",t)}async function dve(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={indices:n.indexArray,vertexAttributes:n.attributeData},e._state=Wt.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._dracoError=n}}z0.prototype.process=function(e){if(this._state===Wt.READY)return!0;if(this._state!==Wt.PROCESSING||(l(this._dracoError)&&Xie(this,this._dracoError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let t=this._draco,i=this._gltf.bufferViews,o=t.bufferView,r=i[o],s=t.attributes,a={array:new Uint8Array(this._bufferViewTypedArray),bufferView:r,compressedAttributes:s,dequantizeInShader:!0},c=Fp.decodeBufferView(a);if(!l(c))return!1;this._decodePromise=dve(this,c)};z0.prototype.unload=function(){l(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0};var cC=z0;var jnn=S(T(),1);var Dnn=S(T(),1);function uve(e){let t=e.uint8Array,n=e.format,i=e.request,o=y(e.flipY,!1),r=y(e.skipColorSpaceConversion,!1),s=new Blob([t],{type:n}),a;return Ee.supportsImageBitmapOptions().then(function(c){return c?Promise.resolve(Ee.createImageBitmapFromBlob(s,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:r})):(a=window.URL.createObjectURL(s),new Ee({url:a,request:i}).fetchImage({flipY:o,skipColorSpaceConversion:r}))}).then(function(c){return l(a)&&window.URL.revokeObjectURL(a),c}).catch(function(c){return l(a)&&window.URL.revokeObjectURL(a),Promise.reject(c)})}var kx=uve;function Ap(e){e=y(e,y.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.imageId,o=e.gltfResource,r=e.baseResource,s=e.cacheKey,a=n.images[i],c=a.bufferView,d=a.uri;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._bufferViewId=c,this._uri=d,this._cacheKey=s,this._bufferViewLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._state=Wt.UNLOADED,this._promise=void 0}l(Object.create)&&(Ap.prototype=Object.create(eo.prototype),Ap.prototype.constructor=Ap);Object.defineProperties(Ap.prototype,{cacheKey:{get:function(){return this._cacheKey}},image:{get:function(){return this._image}},mipLevels:{get:function(){return this._mipLevels}}});Ap.prototype.load=function(){return l(this._promise)?this._promise:l(this._bufferViewId)?(this._promise=mve(this),this._promise):(this._promise=hve(this),this._promise)};function Pie(e){let t;return Array.isArray(e)&&(t=e.slice(1,e.length).map(function(n){return n.bufferView}),e=e[0]),{image:e,mipLevels:t}}async function mve(e){e._state=Wt.LOADING;let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=n,await n.load(),e.isDestroyed())return;let i=n.typedArray,o=await pve(i);if(e.isDestroyed())return;let r=Pie(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=Wt.READY,e}catch(n){return e.isDestroyed()?void 0:vie(e,n,"Failed to load embedded image")}}async function hve(e){e._state=Wt.LOADING;let t=e._baseResource,n=e._uri,i=t.getDerivedResource({url:n});try{let o=await gve(i);if(e.isDestroyed())return;let r=Pie(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=Wt.READY,e}catch(o){return e.isDestroyed()?void 0:vie(e,o,`Failed to load image: ${n}`)}}function vie(e,t,n){return e.unload(),e._state=Wt.FAILED,Promise.reject(e.getError(n,t))}function fve(e){let t=e.subarray(0,2),n=e.subarray(0,4),i=e.subarray(8,12);if(t[0]===255&&t[1]===216)return"image/jpeg";if(t[0]===137&&t[1]===80)return"image/png";if(t[0]===171&&t[1]===75)return"image/ktx2";if(n[0]===82&&n[1]===73&&n[2]===70&&n[3]===70&&i[0]===87&&i[1]===69&&i[2]===66&&i[3]===80)return"image/webp";throw new ue("Image format is not recognized")}async function pve(e){let t=fve(e);if(t==="image/ktx2"){let n=new Uint8Array(e);return gl(n)}return Ap._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})}var bve=/(^data:image\/ktx2)|(\.ktx2$)/i;function gve(e){let t=e.getUrlComponent(!1,!0);return bve.test(t)?gl(e):e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}Ap.prototype.unload=function(){l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._uri=void 0,this._image=void 0,this._mipLevels=void 0,this._gltf=void 0};Ap._loadImageFromTypedArray=kx;var lC=Ap;var uin=S(T(),1);var $nn=S(T(),1),yve={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},Ra=Object.freeze(yve);function K0(e){e=y(e,y.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.accessorId,o=e.gltfResource,r=e.baseResource,s=e.draco,a=e.cacheKey,c=y(e.asynchronous,!0),d=y(e.loadBuffer,!1),u=y(e.loadTypedArray,!1),m=n.accessors[i].componentType;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._accessorId=i,this._indexDatatype=m,this._draco=s,this._cacheKey=a,this._asynchronous=c,this._loadBuffer=d,this._loadTypedArray=u,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=Wt.UNLOADED,this._promise=void 0}l(Object.create)&&(K0.prototype=Object.create(eo.prototype),K0.prototype.constructor=K0);Object.defineProperties(K0.prototype,{cacheKey:{get:function(){return this._cacheKey}},buffer:{get:function(){return this._buffer}},typedArray:{get:function(){return this._typedArray}},indexDatatype:{get:function(){return this._indexDatatype}}});var xve=new KO;K0.prototype.load=async function(){return l(this._promise)?this._promise:l(this._draco)?(this._promise=_ve(this),this._promise):(this._promise=Sve(this),this._promise)};async function _ve(e){e._state=Wt.LOADING;let t=e._resourceCache;try{let n=t.getDracoLoader({gltf:e._gltf,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=Wt.LOADED,e)}catch(n){if(e.isDestroyed())return;zO(e,n)}}async function Sve(e){let t=e._gltf,n=e._accessorId,o=t.accessors[n].bufferView;e._state=Wt.LOADING;let r=e._resourceCache;try{let s=r.getBufferViewLoader({gltf:t,bufferViewId:o,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=s,await s.load(),e.isDestroyed())return;let a=s.typedArray;return e._typedArray=Tve(e,a),e._state=Wt.PROCESSING,e}catch(s){if(e.isDestroyed())return;zO(e,s)}}function Tve(e,t){let n=e._gltf,i=e._accessorId,o=n.accessors[i],r=o.count,s=o.componentType,a=Me.getSizeInBytes(s),c=t.buffer,d=t.byteOffset+o.byteOffset;if(d%a!==0){let m=r*a,p=new Uint8Array(c,d,m);c=new Uint8Array(p).buffer,d=0,Yr("index-buffer-unaligned",`The index array is not aligned to a ${a}-byte boundary.`)}let u;return s===Me.UNSIGNED_BYTE?u=new Uint8Array(c,d,r):s===Me.UNSIGNED_SHORT?u=new Uint16Array(c,d,r):s===Me.UNSIGNED_INT&&(u=new Uint32Array(c,d,r)),u}function zO(e,t){throw e.unload(),e._state=Wt.FAILED,e.getError("Failed to load index buffer",t)}function KO(){this.typedArray=void 0,this.indexDatatype=void 0,this.context=void 0,this.buffer=void 0}KO.prototype.set=function(e,t,n){this.typedArray=e,this.indexDatatype=t,this.context=n};KO.prototype.execute=function(){this.buffer=wie(this.typedArray,this.indexDatatype,this.context)};function wie(e,t,n){let i=ft.createIndexBuffer({typedArray:e,context:n,usage:Ne.STATIC_DRAW,indexDatatype:t});return i.vertexArrayDestroyable=!1,i}K0.prototype.process=function(e){if(this._state===Wt.READY)return!0;if(this._state!==Wt.LOADED&&this._state!==Wt.PROCESSING)return!1;let t=this._typedArray,n=this._indexDatatype;if(l(this._dracoLoader))try{this._dracoLoader.process(e)&&(t=this._dracoLoader.decodedData.indices.typedArray,this._typedArray=t,n=Q.fromTypedArray(t),this._indexDatatype=n)}catch(o){zO(this,o)}if(!l(t))return!1;let i;if(this._loadBuffer&&this._asynchronous){let o=xve;if(o.set(t,n,e.context),!e.jobScheduler.execute(o,Ra.BUFFER))return!1;i=o.buffer}else this._loadBuffer&&(i=wie(t,n,e.context));return this.unload(),this._buffer=i,this._typedArray=this._loadTypedArray?t:void 0,this._state=Wt.READY,this._resourceCache.statistics.addGeometryLoader(this),!0};K0.prototype.unload=function(){l(this._buffer)&&this._buffer.destroy();let e=this._resourceCache;l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&e.unload(this._bufferViewLoader),l(this._dracoLoader)&&e.unload(this._dracoLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0};var dC=K0;var Tsn=S(T(),1);var Fin=S(T(),1);var fin=S(T(),1);function Cve(e,t,n){if(n=y(n,!1),n){let i=e.indexOf(t);if(i>-1)return i}return e.push(t),e.length-1}var ps=Cve;var Sin=S(T(),1);var gin=S(T(),1);function Vve(e,t){return l(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}var or=Vve;function Jt(){}Jt.objectLegacy=function(e,t){if(l(e)){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let i=e[n],o=t(i,n);if(l(o))return o}}};Jt.object=function(e,t){if(l(e)){let n=e.length;for(let i=0;i0)return i.byteStride}return Q.getSizeInBytes(t.componentType)*hd(t.type)}var Gl=Lve;function Rve(e){Ie.accessor(e,function(n){l(n.bufferView)&&(n.byteOffset=y(n.byteOffset,0))}),Ie.bufferView(e,function(n){l(n.buffer)&&(n.byteOffset=y(n.byteOffset,0))}),Ie.mesh(e,function(n){Ie.meshPrimitive(n,function(i){if(i.mode=y(i.mode,ie.TRIANGLES),!l(i.material)){l(e.materials)||(e.materials=[]);let o={name:"default"};i.material=ps(e.materials,o)}})}),Ie.accessorContainingVertexAttributeData(e,function(n){let i=e.accessors[n],o=i.bufferView;if(i.normalized=y(i.normalized,!1),l(o)){let r=e.bufferViews[o];r.byteStride=Gl(e,i),r.target=ie.ARRAY_BUFFER}}),Ie.accessorContainingIndexData(e,function(n){let o=e.accessors[n].bufferView;if(l(o)){let r=e.bufferViews[o];r.target=ie.ELEMENT_ARRAY_BUFFER}}),Ie.material(e,function(n){let i=y(n.extensions,y.EMPTY_OBJECT),o=i.KHR_materials_common;if(l(o)){let c=o.technique,d=l(o.values)?o.values:{};o.values=d,d.ambient=l(d.ambient)?d.ambient:[0,0,0,1],d.emission=l(d.emission)?d.emission:[0,0,0,1],d.transparency=y(d.transparency,1),c!=="CONSTANT"&&(d.diffuse=l(d.diffuse)?d.diffuse:[0,0,0,1],c!=="LAMBERT"&&(d.specular=l(d.specular)?d.specular:[0,0,0,1],d.shininess=y(d.shininess,0))),o.transparent=y(o.transparent,!1),o.doubleSided=y(o.doubleSided,!1);return}n.emissiveFactor=y(n.emissiveFactor,[0,0,0]),n.alphaMode=y(n.alphaMode,"OPAQUE"),n.doubleSided=y(n.doubleSided,!1),n.alphaMode==="MASK"&&(n.alphaCutoff=y(n.alphaCutoff,.5));let r=i.KHR_techniques_webgl;l(r)&&Ie.materialValue(n,function(c){l(c.index)&&Dx(c)}),Dx(n.emissiveTexture),Dx(n.normalTexture),Dx(n.occlusionTexture);let s=n.pbrMetallicRoughness;l(s)&&(s.baseColorFactor=y(s.baseColorFactor,[1,1,1,1]),s.metallicFactor=y(s.metallicFactor,1),s.roughnessFactor=y(s.roughnessFactor,1),Dx(s.baseColorTexture),Dx(s.metallicRoughnessTexture));let a=i.KHR_materials_pbrSpecularGlossiness;l(a)&&(a.diffuseFactor=y(a.diffuseFactor,[1,1,1,1]),a.specularFactor=y(a.specularFactor,[1,1,1]),a.glossinessFactor=y(a.glossinessFactor,1),Dx(a.specularGlossinessTexture))}),Ie.animation(e,function(n){Ie.animationSampler(n,function(i){i.interpolation=y(i.interpolation,"LINEAR")})});let t=Gve(e);return Ie.node(e,function(n,i){l(t[i])||l(n.translation)||l(n.rotation)||l(n.scale)?(n.translation=y(n.translation,[0,0,0]),n.rotation=y(n.rotation,[0,0,0,1]),n.scale=y(n.scale,[1,1,1])):n.matrix=y(n.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}),Ie.sampler(e,function(n){n.wrapS=y(n.wrapS,ie.REPEAT),n.wrapT=y(n.wrapT,ie.REPEAT)}),l(e.scenes)&&!l(e.scene)&&(e.scene=0),e}function Gve(e){let t={};return Ie.animation(e,function(n){Ie.animationChannel(n,function(i){let o=i.target,r=o.node,s=o.path;(s==="translation"||s==="rotation"||s==="scale")&&(t[r]=!0)})}),t}function Dx(e){l(e)&&(e.texCoord=y(e.texCoord,0))}var aW=Rve;var Uin=S(T(),1);function Eve(e){return Ie.shader(e,function(t){YN(t)}),Ie.buffer(e,function(t){YN(t)}),Ie.image(e,function(t){YN(t)}),YN(e),e}function YN(e){e.extras=l(e.extras)?e.extras:{},e.extras._pipeline=l(e.extras._pipeline)?e.extras._pipeline:{}}var H0=Eve;var non=S(T(),1);var Kin=S(T(),1);var Bin=S(T(),1);function Wve(e,t){let n=e.extensionsRequired;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),n.length===0&&delete e.extensionsRequired}}var cW=Wve;function Ive(e,t){let n=e.extensionsUsed;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),cW(e,t),n.length===0&&delete e.extensionsUsed}}var Bx=Ive;var Xve=4;function Pve(e){if(Lm(e)!=="glTF")throw new ue("File is not valid binary glTF");let n=Fie(e,0,5),i=n[1];if(i!==1&&i!==2)throw new ue("Binary glTF version is not 1 or 2");return i===1?vve(e,n):wve(e,n)}function Fie(e,t,n){let i=new DataView(e.buffer),o=new Array(n);for(let r=0;r0){let m=y(u.binary_glTF,u.KHR_binary_glTF);l(m)&&(m.extras._pipeline.source=d,delete m.uri)}return Bx(c,"KHR_binary_glTF"),c}function wve(e,t){let n=t[2],i=12,o,r;for(;i0){let a=s[0];a.extras._pipeline.source=r}}return o}var lW=Pve;var son=S(T(),1);function Fve(e){return Ie.shader(e,function(t){ON(t)}),Ie.buffer(e,function(t){ON(t)}),Ie.image(e,function(t){ON(t)}),ON(e),e}function ON(e){l(e.extras)&&(l(e.extras._pipeline)&&delete e.extras._pipeline,Object.keys(e.extras).length===0&&delete e.extras)}var dW=Fve;var krn=S(T(),1);var don=S(T(),1);function Ave(e,t){let n=e.extensionsUsed;l(n)||(n=[],e.extensionsUsed=n),ps(n,t,!0)}var fu=Ave;var _on=S(T(),1);var hon=S(T(),1);function Mve(e){switch(e){case Q.BYTE:return function(t,n,i,o,r){for(let s=0;s-1:!1}var Dve=[ie.ZERO,ie.ONE,ie.SRC_COLOR,ie.ONE_MINUS_SRC_COLOR,ie.SRC_ALPHA,ie.ONE_MINUS_SRC_ALPHA,ie.DST_ALPHA,ie.ONE_MINUS_DST_ALPHA,ie.DST_COLOR,ie.ONE_MINUS_DST_COLOR];function Bve(e,t){if(!l(e))return t;for(let n=0;n<4;n++)if(Dve.indexOf(e[n])===-1)return t;return e}function Yve(e){let t={},n={},i=e.techniques;return l(i)&&(Ie.technique(e,function(o,r){let s=o.states;if(l(s)){let a=n[r]={};if(Aie(s,ie.BLEND)){a.alphaMode="BLEND";let c=s.functions;l(c)&&(l(c.blendEquationSeparate)||l(c.blendFuncSeparate))&&(t[r]={blendEquation:y(c.blendEquationSeparate,Uve),blendFactors:Bve(c.blendFuncSeparate,kve)})}Aie(s,ie.CULL_FACE)||(a.doubleSided=!0),delete o.states}}),Object.keys(t).length>0&&(l(e.extensions)||(e.extensions={}),fu(e,"KHR_blend")),Ie.material(e,function(o){if(l(o.technique)){let r=n[o.technique];Ie.objectLegacy(r,function(a,c){o[c]=a});let s=t[o.technique];l(s)&&(l(o.extensions)||(o.extensions={}),o.extensions.KHR_blend=s)}})),e}var uW=Yve;var Non=S(T(),1);var Xon=S(T(),1);function Ove(e,t){let n=e.extensionsRequired;l(n)||(n=[],e.extensionsRequired=n),ps(n,t,!0),fu(e,t)}var mW=Ove;function zve(e){let t=e.techniques,n={},i={},o={};if(l(t)){let r={programs:[],shaders:[],techniques:[]},s=e.glExtensionsUsed;delete e.glExtensionsUsed,Ie.technique(e,function(a,c){let d={name:a.name,program:void 0,attributes:{},uniforms:{}},u;if(Ie.techniqueAttribute(a,function(m,p){u=a.parameters[m],d.attributes[p]={semantic:u.semantic}}),Ie.techniqueUniform(a,function(m,p){u=a.parameters[m],d.uniforms[p]={count:u.count,node:u.node,type:u.type,semantic:u.semantic,value:u.value},l(n[c])||(n[c]={}),n[c][m]=p}),l(o[a.program]))d.program=o[a.program];else{let m=e.programs[a.program],p={name:m.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:s},g=e.shaders[m.fragmentShader];p.fragmentShader=ps(r.shaders,g,!0);let f=e.shaders[m.vertexShader];p.vertexShader=ps(r.shaders,f,!0),d.program=ps(r.programs,p),o[a.program]=d.program}i[c]=ps(r.techniques,d)}),r.techniques.length>0&&(l(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,fu(e,"KHR_techniques_webgl"),mW(e,"KHR_techniques_webgl"))}return Ie.material(e,function(r){if(l(r.technique)){let s={technique:i[r.technique]};Ie.objectLegacy(r.values,function(a,c){l(s.values)||(s.values={});let d=n[r.technique][c];l(d)&&(s.values[d]=a)}),l(r.extensions)||(r.extensions={}),r.extensions.KHR_techniques_webgl=s}delete r.technique,delete r.values}),delete e.techniques,delete e.programs,delete e.shaders,e}var hW=zve;var jon=S(T(),1);var Yon=S(T(),1);function Kve(e,t){po.typeOf.object("material",e),po.defined("handler",t);let n=e.pbrMetallicRoughness;if(l(n)){if(l(n.baseColorTexture)){let r=n.baseColorTexture,s=t(r.index,r);if(l(s))return s}if(l(n.metallicRoughnessTexture)){let r=n.metallicRoughnessTexture,s=t(r.index,r);if(l(s))return s}}let{extensions:i}=e;if(l(i)){let r=i.KHR_materials_pbrSpecularGlossiness;if(l(r)){if(l(r.diffuseTexture)){let c=r.diffuseTexture,d=t(c.index,c);if(l(d))return d}if(l(r.specularGlossinessTexture)){let c=r.specularGlossinessTexture,d=t(c.index,c);if(l(d))return d}}let s=i.KHR_materials_specular;if(l(s)){let{specularTexture:c,specularColorTexture:d}=s;if(l(c)){let u=t(c.index,c);if(l(u))return u}if(l(d)){let u=t(d.index,d);if(l(u))return u}}let a=i.KHR_materials_common;if(l(a)&&l(a.values)){let{diffuse:c,ambient:d,emission:u,specular:m}=a.values;if(l(c)&&l(c.index)){let p=t(c.index,c);if(l(p))return p}if(l(d)&&l(d.index)){let p=t(d.index,d);if(l(p))return p}if(l(u)&&l(u.index)){let p=t(u.index,u);if(l(p))return p}if(l(m)&&l(m.index)){let p=t(m.index,m);if(l(p))return p}}}let o=Ie.materialValue(e,function(r){if(l(r.index)){let s=t(r.index,r);if(l(s))return s}});if(l(o))return o;if(l(e.emissiveTexture)){let r=e.emissiveTexture,s=t(r.index,r);if(l(s))return s}if(l(e.normalTexture)){let r=e.normalTexture,s=t(r.index,r);if(l(s))return s}if(l(e.occlusionTexture)){let r=e.occlusionTexture,s=t(r.index,r);if(l(s))return s}}var uC=Kve;var Mie=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"];function Hve(e,t){return t=y(t,Mie),Mie.forEach(function(n){t.indexOf(n)>-1&&Qve(e,n)}),e}var Jve={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function Qve(e,t){let n=Jve[t],i=e[n];if(l(i)){let o=0,r=tf[t](e),s=i.length;for(let a=0;at&&o.attributes[c]--}),Ie.meshPrimitiveTarget(o,function(a){Ie.meshPrimitiveTargetAttribute(a,function(c,d){c>t&&a[d]--})});let r=o.indices;l(r)&&r>t&&o.indices--;let s=o.extensions;l(s)&&l(s.CESIUM_primitive_outline)&&s.CESIUM_primitive_outline.indices>t&&--s.CESIUM_primitive_outline.indices})}),Ie.skin(e,function(i){l(i.inverseBindMatrices)&&i.inverseBindMatrices>t&&i.inverseBindMatrices--}),Ie.animation(e,function(i){Ie.animationSampler(i,function(o){l(o.input)&&o.input>t&&o.input--,l(o.output)&&o.output>t&&o.output--})})};ef.buffer=function(e,t){e.buffers.splice(t,1),Ie.bufferView(e,function(i){l(i.buffer)&&i.buffer>t&&i.buffer--,l(i.extensions)&&l(i.extensions.EXT_meshopt_compression)&&i.extensions.EXT_meshopt_compression.buffer--})};ef.bufferView=function(e,t){if(e.bufferViews.splice(t,1),Ie.accessor(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Ie.shader(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Ie.image(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),or(e,"KHR_draco_mesh_compression")&&Ie.mesh(e,function(i){Ie.meshPrimitive(i,function(o){l(o.extensions)&&l(o.extensions.KHR_draco_mesh_compression)&&o.extensions.KHR_draco_mesh_compression.bufferView>t&&o.extensions.KHR_draco_mesh_compression.bufferView--})}),or(e,"EXT_feature_metadata")){let o=e.extensions.EXT_feature_metadata.featureTables;for(let r in o)if(o.hasOwnProperty(r)){let a=o[r].properties;if(l(a)){for(let c in a)if(a.hasOwnProperty(c)){let d=a[c];l(d.bufferView)&&d.bufferView>t&&d.bufferView--,l(d.arrayOffsetBufferView)&&d.arrayOffsetBufferView>t&&d.arrayOffsetBufferView--,l(d.stringOffsetBufferView)&&d.stringOffsetBufferView>t&&d.stringOffsetBufferView--}}}}if(or(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTables;if(l(o)){let r=o.length;for(let s=0;st&&u.values--,l(u.arrayOffsets)&&u.arrayOffsets>t&&u.arrayOffsets--,l(u.stringOffsets)&&u.stringOffsets>t&&u.stringOffsets--}}}}};ef.image=function(e,t){e.images.splice(t,1),Ie.texture(e,function(i){l(i.source)&&i.source>t&&--i.source;let o=i.extensions;l(o)&&l(o.EXT_texture_webp)&&o.EXT_texture_webp.source>t?--i.extensions.EXT_texture_webp.source:l(o)&&l(o.KHR_texture_basisu)&&o.KHR_texture_basisu.source>t&&--i.extensions.KHR_texture_basisu.source})};ef.mesh=function(e,t){e.meshes.splice(t,1),Ie.node(e,function(i){l(i.mesh)&&(i.mesh>t?i.mesh--:i.mesh===t&&delete i.mesh)})};ef.node=function(e,t){e.nodes.splice(t,1),Ie.skin(e,function(i){l(i.skeleton)&&i.skeleton>t&&i.skeleton--,i.joints=i.joints.map(function(o){return o>t?o-1:o})}),Ie.animation(e,function(i){Ie.animationChannel(i,function(o){l(o.target)&&l(o.target.node)&&o.target.node>t&&o.target.node--})}),Ie.technique(e,function(i){Ie.techniqueUniform(i,function(o){l(o.node)&&o.node>t&&o.node--})}),Ie.node(e,function(i){l(i.children)&&(i.children=i.children.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o}))}),Ie.scene(e,function(i){i.nodes=i.nodes.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o})})};ef.material=function(e,t){e.materials.splice(t,1),Ie.mesh(e,function(i){Ie.meshPrimitive(i,function(o){l(o.material)&&o.material>t&&o.material--})})};ef.sampler=function(e,t){e.samplers.splice(t,1),Ie.texture(e,function(i){l(i.sampler)&&i.sampler>t&&--i.sampler})};ef.texture=function(e,t){if(e.textures.splice(t,1),Ie.material(e,function(i){uC(i,function(o,r){r.index>t&&--r.index})}),or(e,"EXT_feature_metadata")){Ie.mesh(e,function(r){Ie.meshPrimitive(r,function(s){let a=s.extensions;if(l(a)&&l(a.EXT_feature_metadata)){let d=a.EXT_feature_metadata.featureIdTextures;if(l(d)){let u=d.length;for(let m=0;mt&&--g.index}}}})});let o=e.extensions.EXT_feature_metadata.featureTextures;for(let r in o)if(o.hasOwnProperty(r)){let a=o[r].properties;if(l(a)){for(let c in a)if(a.hasOwnProperty(c)){let u=a[c].texture;u.index>t&&--u.index}}}}if(or(e,"EXT_mesh_features")&&Ie.mesh(e,function(i){Ie.meshPrimitive(i,function(o){let r=o.extensions;if(l(r)&&l(r.EXT_mesh_features)){let a=r.EXT_mesh_features.featureIds;if(l(a)){let c=a.length;for(let d=0;dt&&--u.texture.index}}}})}),or(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTextures;if(l(o)){let r=o.length;for(let s=0;st&&--u.index}}}}};function tf(){}tf.accessor=function(e){let t={};return Ie.mesh(e,function(n){Ie.meshPrimitive(n,function(i){Ie.meshPrimitiveAttribute(i,function(r){t[r]=!0}),Ie.meshPrimitiveTarget(i,function(r){Ie.meshPrimitiveTargetAttribute(r,function(s){t[s]=!0})});let o=i.indices;l(o)&&(t[o]=!0)})}),Ie.skin(e,function(n){l(n.inverseBindMatrices)&&(t[n.inverseBindMatrices]=!0)}),Ie.animation(e,function(n){Ie.animationSampler(n,function(i){l(i.input)&&(t[i.input]=!0),l(i.output)&&(t[i.output]=!0)})}),or(e,"EXT_mesh_gpu_instancing")&&Ie.node(e,function(n){l(n.extensions)&&l(n.extensions.EXT_mesh_gpu_instancing)&&Object.keys(n.extensions.EXT_mesh_gpu_instancing.attributes).forEach(function(i){let o=n.extensions.EXT_mesh_gpu_instancing.attributes[i];t[o]=!0})}),or(e,"CESIUM_primitive_outline")&&Ie.mesh(e,function(n){Ie.meshPrimitive(n,function(i){let o=i.extensions;if(l(o)&&l(o.CESIUM_primitive_outline)){let s=o.CESIUM_primitive_outline.indices;l(s)&&(t[s]=!0)}})}),t};tf.buffer=function(e){let t={};return Ie.bufferView(e,function(n){l(n.buffer)&&(t[n.buffer]=!0),l(n.extensions)&&l(n.extensions.EXT_meshopt_compression)&&(t[n.extensions.EXT_meshopt_compression.buffer]=!0)}),t};tf.bufferView=function(e){let t={};if(Ie.accessor(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Ie.shader(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Ie.image(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),or(e,"KHR_draco_mesh_compression")&&Ie.mesh(e,function(n){Ie.meshPrimitive(n,function(i){l(i.extensions)&&l(i.extensions.KHR_draco_mesh_compression)&&(t[i.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),or(e,"EXT_feature_metadata")){let i=e.extensions.EXT_feature_metadata.featureTables;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o].properties;if(l(s)){for(let a in s)if(s.hasOwnProperty(a)){let c=s[a];l(c.bufferView)&&(t[c.bufferView]=!0),l(c.arrayOffsetBufferView)&&(t[c.arrayOffsetBufferView]=!0),l(c.stringOffsetBufferView)&&(t[c.stringOffsetBufferView]=!0)}}}}if(or(e,"EXT_structural_metadata")){let i=e.extensions.EXT_structural_metadata.propertyTables;if(l(i)){let o=i.length;for(let r=0;r0&&(t[n.mesh]=!0)}}),t};function Nie(e,t,n){let i=e.nodes[t];return l(i.mesh)||l(i.camera)||l(i.skin)||l(i.weights)||l(i.extras)||l(i.extensions)&&Object.keys(i.extensions).length!==0||l(n[t])?!1:!l(i.children)||i.children.filter(function(o){return!Nie(e,o,n)}).length===0}tf.node=function(e){let t={};return Ie.skin(e,function(n){l(n.skeleton)&&(t[n.skeleton]=!0),Ie.skinJoint(n,function(i){t[i]=!0})}),Ie.animation(e,function(n){Ie.animationChannel(n,function(i){l(i.target)&&l(i.target.node)&&(t[i.target.node]=!0)})}),Ie.technique(e,function(n){Ie.techniqueUniform(n,function(i){l(i.node)&&(t[i.node]=!0)})}),Ie.node(e,function(n,i){Nie(e,i,t)||(t[i]=!0)}),t};tf.material=function(e){let t={};return Ie.mesh(e,function(n){Ie.meshPrimitive(n,function(i){l(i.material)&&(t[i.material]=!0)})}),t};tf.texture=function(e){let t={};if(Ie.material(e,function(n){uC(n,function(i){t[i]=!0})}),or(e,"EXT_feature_metadata")){Ie.mesh(e,function(o){Ie.meshPrimitive(o,function(r){let s=r.extensions;if(l(s)&&l(s.EXT_feature_metadata)){let c=s.EXT_feature_metadata.featureIdTextures;if(l(c)){let d=c.length;for(let u=0;u0)for(s.mesh=n.meshes[c[0]],t=1;t0&&l(s.skin)){let u=e.skins[s.skin];u.skeleton=n.nodes[c[0]]}delete s.skeletons}l(s.jointName)&&delete s.jointName}),Ie.skin(e,function(s){l(s.inverseBindMatrices)&&(s.inverseBindMatrices=n.accessors[s.inverseBindMatrices]);let a=s.jointNames;if(l(a)){let c=[],d=a.length;for(t=0;t=0&&(a=r.substring(0,s),c=r.substring(s));let d,u=xwe[a];l(u)?(d=u+c,t[r]=d):l(ywe[a])||(d=`_${r}`,t[r]=d)}});for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o],s=i.attributes[o];l(s)&&(delete i.attributes[o],i.attributes[r]=s)}})}),Ie.technique(e,function(n){Ie.techniqueParameter(n,function(i){let o=t[i.semantic];l(o)&&(i.semantic=o)})})}function Swe(e){Ie.camera(e,function(t){let n=t.perspective;if(l(n)){let i=n.aspectRatio;l(i)&&i===0&&delete n.aspectRatio;let o=n.yfov;l(o)&&o===0&&(n.yfov=1)}})}function QO(e,t){return l(t.byteStride)&&t.byteStride!==0?t.byteStride:Gl(e,t)}function Twe(e){Ie.buffer(e,function(t){l(t.byteLength)||(t.byteLength=t.extras._pipeline.source.length)}),Ie.accessor(e,function(t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n],o=QO(e,t),r=t.byteOffset+t.count*o;i.byteLength=Math.max(y(i.byteLength,0),r)}})}function Cwe(e){let t,n,i,o=e.bufferViews,r={};Ie.accessorContainingVertexAttributeData(e,function(a){let c=e.accessors[a];l(c.bufferView)&&(r[c.bufferView]=!0)});let s={};Ie.accessor(e,function(a){l(a.bufferView)&&(s[a.bufferView]=y(s[a.bufferView],[]),s[a.bufferView].push(a))});for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){i=o[a];let c=s[a];c.sort(function(p,g){return p.byteOffset-g.byteOffset});let d=0,u=0,m=c.length;for(t=0;t=0;--r)if(i[r]===t){i.splice(r,1);return}}}),Ie.node(e,function(n,i){if(l(n.children)){let o=n.children.indexOf(t);o>-1&&(n.children.splice(o,1),Bie(n)&&Yie(e,i))}}),delete e.nodes[t]}function Zwe(e){return Ie.node(e,function(t,n){Bie(t)&&Yie(e,n)}),e}function Lwe(e){Ie.animation(e,function(t){Ie.animationSampler(t,function(n){let i=e.accessors[n.input];if(!l(i.min)||!l(i.max)){let o=Yx(e,i);i.min=o.min,i.max=o.max}})})}function Rwe(e){Ie.accessor(e,function(t){if(l(t.min)||l(t.max)){let n=Yx(e,t);l(t.min)&&(t.min=n.min),l(t.max)&&(t.max=n.max)}})}function Gwe(e){e.asset=y(e.asset,{}),e.asset.version="2.0",Die(e),cwe(e),Zwe(e),lwe(e),dwe(e),mwe(e),fwe(e),Twe(e),Cwe(e),Vwe(e),Lwe(e),Rwe(e),pwe(e),bwe(e),gwe(e),_we(e),gW(e),Swe(e),uW(e),hW(e),uwe(e)}var Ewe=["u_tex","u_diffuse","u_emission","u_diffuse_tex"],Wwe=["u_diffuse","u_diffuse_mat"];function jO(e){e.pbrMetallicRoughness=l(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{},e.pbrMetallicRoughness.roughnessFactor=1,e.pbrMetallicRoughness.metallicFactor=0}function qO(e){return l(e.index)}function $O(e){return Array.isArray(e)&&e.length===4}function Oie(e){let t=new Array(4);t[3]=e[3];for(let n=0;n<3;n++){let i=e[n];i<=.04045?t[n]=e[n]*.07739938080495357:t[n]=Math.pow((i+.055)*.9478672985781991,2.4)}return t}function Iwe(e,t){t=y(t,y.EMPTY_OBJECT);let n=y(t.baseColorTextureNames,Ewe),i=y(t.baseColorFactorNames,Wwe);Ie.material(e,function(o){Ie.materialValue(o,function(r,s){n.indexOf(s)!==-1&&qO(r)?(jO(o),o.pbrMetallicRoughness.baseColorTexture=r):i.indexOf(s)!==-1&&$O(r)&&(jO(o),o.pbrMetallicRoughness.baseColorFactor=Oie(r))})}),Ox(e,"KHR_techniques_webgl"),Ox(e,"KHR_blend")}function JO(e,t){l(t)&&($O(t)?e.pbrMetallicRoughness.baseColorFactor=Oie(t):qO(t)&&(e.pbrMetallicRoughness.baseColorTexture=t))}function kie(e,t){l(t)&&($O(t)?e.emissiveFactor=t.slice(0,3):qO(t)&&(e.emissiveTexture=t))}function Xwe(e){Ie.material(e,function(t){let n=y(t.extensions,y.EMPTY_OBJECT).KHR_materials_common;if(!l(n))return;let i=y(n.values,{}),o=i.ambient,r=i.diffuse,s=i.emission,a=i.transparency,c=n.doubleSided,d=n.transparent;jO(t),n.technique==="CONSTANT"?(fu(e,"KHR_materials_unlit"),t.extensions=l(t.extensions)?t.extensions:{},t.extensions.KHR_materials_unlit={},JO(t,s),JO(t,o)):(JO(t,r),kie(t,o),kie(t,s)),l(c)&&(t.doubleSided=c),l(a)&&(l(t.pbrMetallicRoughness.baseColorFactor)?t.pbrMetallicRoughness.baseColorFactor[3]*=a:t.pbrMetallicRoughness.baseColorFactor=[1,1,1,a]),l(d)&&(t.alphaMode=d?"BLEND":"OPAQUE")}),Ox(e,"KHR_materials_common")}var yW=nwe;var isn=S(T(),1);var Yrn=S(T(),1);var ri={POSITION:"POSITION",NORMAL:"NORMAL",TANGENT:"TANGENT",TEXCOORD:"TEXCOORD",COLOR:"COLOR",JOINTS:"JOINTS",WEIGHTS:"WEIGHTS",FEATURE_ID:"_FEATURE_ID"};function Pwe(e){switch(e){case ri.POSITION:return"positionMC";case ri.NORMAL:return"normalMC";case ri.TANGENT:return"tangentMC";case ri.TEXCOORD:return"texCoord";case ri.COLOR:return"color";case ri.JOINTS:return"joints";case ri.WEIGHTS:return"weights";case ri.FEATURE_ID:return"featureId"}}ri.hasSetIndex=function(e){switch(e){case ri.POSITION:case ri.NORMAL:case ri.TANGENT:return!1;case ri.TEXCOORD:case ri.COLOR:case ri.JOINTS:case ri.WEIGHTS:case ri.FEATURE_ID:return!0}};ri.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"POSITION":return ri.POSITION;case"NORMAL":return ri.NORMAL;case"TANGENT":return ri.TANGENT;case"TEXCOORD":return ri.TEXCOORD;case"COLOR":return ri.COLOR;case"JOINTS":return ri.JOINTS;case"WEIGHTS":return ri.WEIGHTS;case"_FEATURE_ID":return ri.FEATURE_ID}};ri.fromPntsSemantic=function(e){switch(e){case"POSITION":case"POSITION_QUANTIZED":return ri.POSITION;case"RGBA":case"RGB":case"RGB565":return ri.COLOR;case"NORMAL":case"NORMAL_OCT16P":return ri.NORMAL;case"BATCH_ID":return ri.FEATURE_ID}};ri.getGlslType=function(e){switch(e){case ri.POSITION:case ri.NORMAL:case ri.TANGENT:return"vec3";case ri.TEXCOORD:return"vec2";case ri.COLOR:return"vec4";case ri.JOINTS:return"ivec4";case ri.WEIGHTS:return"vec4";case ri.FEATURE_ID:return"int"}};ri.getVariableName=function(e,t){let n=Pwe(e);return l(t)&&(n+=`_${t}`),n};var St=Object.freeze(ri);function ic(){}ic.getError=function(e,t,n){let i=`Failed to load ${e}: ${t}`;l(n)&&l(n.message)&&(i+=` ${n.message}`);let o=new ue(i);return l(n)&&(o.stack=`Original stack: ${n.stack} Handler stack: -${o.stack}`),o};nc.getNodeTransform=function(e){return l(e.matrix)?e.matrix:M.fromTranslationQuaternionRotationScale(l(e.translation)?e.translation:h.ZERO,l(e.rotation)?e.rotation:we.IDENTITY,l(e.scale)?e.scale:h.ONE)};nc.getAttributeBySemantic=function(e,t,n){let i=e.attributes,o=i.length;for(let r=0;r>t};ea.fromSubtreeJson=async function(e,t,n,i,o){let r=new ea(e,i,o),s;l(t)?s={json:t,binary:void 0}:s=ZFe(n);let a=s.json;r._subtreeJson=a;let c;if(oi(a,"3DTILES_metadata"))c=a.extensions["3DTILES_metadata"];else if(l(a.tileMetadata)){let V=a.tileMetadata;c=a.propertyTables[V]}let d=[];if(l(a.contentMetadata)){let V=a.contentMetadata.length;for(let L=0;L0;u=u||m;for(let p=0;p>BigInt(61)),d=c%2===0?oC.encode2D(i,o,r):oC.encode2D(i,r,o),u=Pp.fromFacePositionLevel(c,BigInt(d),i),m,p;if(l(s)){let g=(a.maximumHeight+a.minimumHeight)/2;m=n<4?a.minimumHeight:g,p=n<4?g:a.maximumHeight}else m=a.minimumHeight,p=a.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:Pp.getTokenFromId(u._cellId),minimumHeight:m,maximumHeight:p}}}}var JFe=new h,QFe=new h,sH=new h,jFe=new $;function noe(e,t,n,i,o){if(t===0)return e;let r=h.unpack(e,0,QFe),s=$.unpack(e,3,jFe),a=Math.pow(2,-t),c=-1+(2*n+1)*a,d=-1+(2*i+1)*a,u=0,m=h.fromElements(a,a,1,JFe);l(o)&&(u=-1+(2*o+1)*a,m.z=a);let p=h.fromElements(c,d,u,sH);p=$.multiplyByVector(s,p,sH),p=h.add(p,r,sH);let g=$.clone(s);g=$.multiplyByScale(g,m,g);let f=new Array(12);return h.pack(p,f),$.pack(g,f,3),f}var qFe=new ce;function ioe(e,t,n,i,o){if(t===0)return e.slice();let r=ce.unpack(e,0,qFe),s=e[4],a=e[5],c=Math.pow(2,-t),d=c*r.width,u=W.negativePiToPi(r.west+n*d),m=W.negativePiToPi(u+d),p=c*r.height,g=W.negativePiToPi(r.south+i*p),f=W.negativePiToPi(g+p),x=s,_=a;if(l(o)){let C=c*(a-s);x+=o*C,_=x+C}return[u,g,m,f,x,_]}function $Fe(e,t,n){let i=e._implicitTileset,o=t.implicitCoordinates.getChildCoordinates(n),r=eoe(i,o,n,!1,t),s=$ie(void 0,i,o),a=i.subtreeUriTemplate.getDerivedResource({templateValues:o.getTemplateValues()}).url,c={boundingVolume:r,geometricError:s,refine:i.refine,contents:[{uri:a}]},d=ooe(e,i.baseResource,c,t);return d.implicitTileset=i,d.implicitCoordinates=o,d}function ooe(e,t,n,i){let o=e._tile.constructor;return new o(e._tileset,t,n,i)}Bc.prototype.hasProperty=function(e,t){return!1};Bc.prototype.getFeature=function(e){};Bc.prototype.applyDebugSettings=function(e,t){};Bc.prototype.applyStyle=function(e){};Bc.prototype.update=function(e,t){};Bc.prototype.pick=function(e,t,n){};Bc.prototype.isDestroyed=function(){return!1};Bc.prototype.destroy=function(){return this._implicitSubtree=this._implicitSubtree&&this._implicitSubtree.destroy(),me(this)};Bc._deriveBoundingBox=noe;Bc._deriveBoundingRegion=ioe;Bc._deriveBoundingVolumeS2=toe;var yC=Bc;var xEn=T(S(),1);var sln=T(S(),1),e9e={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},Wl=Object.freeze(e9e);var lEn=T(S(),1);var Xln=T(S(),1);var dln=T(S(),1);function xC(e,t){this._distance=t,this._normal=new roe(e,this),this.onChangeCallback=void 0,this.index=-1}Object.defineProperties(xC.prototype,{distance:{get:function(){return this._distance},set:function(e){l(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){l(this.onChangeCallback)&&!h.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),h.clone(e,this._normal._cartesian3)}}});xC.fromPlane=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance):t=new xC(e.normal,e.distance),t};xC.clone=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance,t):new xC(e.normal,e.distance)};function roe(e,t){this._clippingPlane=t,this._cartesian3=h.clone(e)}Object.defineProperties(roe.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}});var qx=xC;function ic(e){e=y(e,y.EMPTY_OBJECT),this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=y(e.enabled,!0),this.modelMatrix=M.clone(y(e.modelMatrix,M.IDENTITY)),this.edgeColor=Y.clone(y(e.edgeColor,Y.WHITE)),this.edgeWidth=y(e.edgeWidth,0),this.planeAdded=new ge,this.planeRemoved=new ge,this._owner=void 0;let t=y(e.unionClippingRegions,!1);this._unionClippingRegions=t,this._testIntersection=t?doe:uoe,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;let n=e.planes;if(l(n)){let i=n.length;for(let o=0;o0&&(r=Kt.OUTSIDE);for(let s=0;s0?os.COUNTER_CLOCKWISE:os.CLOCKWISE};tg.triangulate=function(e,t){let n=D.packArray(e);return(0,Soe.default)(n,t,2)};var Coe=new h,Voe=new h,Loe=new h,xoe=new h,_oe=new h,Toe=new h,kp=new h,Roe=new D,Zoe=new D,Goe=new D,TC=new D;tg.computeSubdivision=function(e,t,n,i,o){o=y(o,W.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,d=new Array(c*3),u=new Array(c*2),m=0,p=0;for(a=0;a0;){let L=s.pop(),Z=s.pop(),G=s.pop(),X=h.fromArray(d,G*3,Coe),v=h.fromArray(d,Z*3,Voe),P=h.fromArray(d,L*3,Loe),F,A,b;r&&(F=D.fromArray(u,G*2,Roe),A=D.fromArray(u,Z*2,Zoe),b=D.fromArray(u,L*2,Goe));let R=h.multiplyByScalar(h.normalize(X,xoe),x,xoe),E=h.multiplyByScalar(h.normalize(v,_oe),x,_oe),I=h.multiplyByScalar(h.normalize(P,Toe),x,Toe),w=h.magnitudeSquared(h.subtract(R,E,kp)),N=h.magnitudeSquared(h.subtract(E,I,kp)),B=h.magnitudeSquared(h.subtract(I,R,kp)),U=Math.max(w,N,B),O,k,J;U>C?w===U?(O=`${Math.min(G,Z)} ${Math.max(G,Z)}`,a=f[O],l(a)||(k=h.add(X,v,kp),h.multiplyByScalar(k,.5,k),d.push(k.x,k.y,k.z),a=d.length/3-1,f[O]=a,r&&(J=D.add(F,A,TC),D.multiplyByScalar(J,.5,J),u.push(J.x,J.y))),s.push(G,a,L),s.push(a,Z,L)):N===U?(O=`${Math.min(Z,L)} ${Math.max(Z,L)}`,a=f[O],l(a)||(k=h.add(v,P,kp),h.multiplyByScalar(k,.5,k),d.push(k.x,k.y,k.z),a=d.length/3-1,f[O]=a,r&&(J=D.add(A,b,TC),D.multiplyByScalar(J,.5,J),u.push(J.x,J.y))),s.push(Z,a,G),s.push(a,L,G)):B===U&&(O=`${Math.min(L,G)} ${Math.max(L,G)}`,a=f[O],l(a)||(k=h.add(P,X,kp),h.multiplyByScalar(k,.5,k),d.push(k.x,k.y,k.z),a=d.length/3-1,f[O]=a,r&&(J=D.add(b,F,TC),D.multiplyByScalar(J,.5,J),u.push(J.x,J.y))),s.push(L,a,Z),s.push(a,G,Z)):(g.push(G),g.push(Z),g.push(L))}let V={attributes:{position:new Ge({componentDatatype:Q.DOUBLE,componentsPerAttribute:3,values:d})},indices:g,primitiveType:Fe.TRIANGLES};return r&&(V.attributes.st=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:u})),new ut(V)};var S9e=new he,C9e=new he,V9e=new he,mH=new he;tg.computeRhumbLineSubdivision=function(e,t,n,i,o){o=y(o,W.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,d=new Array(c*3),u=new Array(c*2),m=0,p=0;for(a=0;a0;){let G=s.pop(),X=s.pop(),v=s.pop(),P=h.fromArray(d,v*3,Coe),F=h.fromArray(d,X*3,Voe),A=h.fromArray(d,G*3,Loe),b,R,E;r&&(b=D.fromArray(u,v*2,Roe),R=D.fromArray(u,X*2,Zoe),E=D.fromArray(u,G*2,Goe));let I=e.cartesianToCartographic(P,S9e),w=e.cartesianToCartographic(F,C9e),N=e.cartesianToCartographic(A,V9e);C.setEndPoints(I,w);let B=C.surfaceDistance;V.setEndPoints(w,N);let U=V.surfaceDistance;L.setEndPoints(N,I);let O=L.surfaceDistance,k=Math.max(B,U,O),J,H,ee,z,j;k>_?B===k?(J=`${Math.min(v,X)} ${Math.max(v,X)}`,a=f[J],l(a)||(H=C.interpolateUsingFraction(.5,mH),ee=(I.height+w.height)*.5,z=h.fromRadians(H.longitude,H.latitude,ee,e,kp),d.push(z.x,z.y,z.z),a=d.length/3-1,f[J]=a,r&&(j=D.add(b,R,TC),D.multiplyByScalar(j,.5,j),u.push(j.x,j.y))),s.push(v,a,G),s.push(a,X,G)):U===k?(J=`${Math.min(X,G)} ${Math.max(X,G)}`,a=f[J],l(a)||(H=V.interpolateUsingFraction(.5,mH),ee=(w.height+N.height)*.5,z=h.fromRadians(H.longitude,H.latitude,ee,e,kp),d.push(z.x,z.y,z.z),a=d.length/3-1,f[J]=a,r&&(j=D.add(R,E,TC),D.multiplyByScalar(j,.5,j),u.push(j.x,j.y))),s.push(X,a,v),s.push(a,G,v)):O===k&&(J=`${Math.min(G,v)} ${Math.max(G,v)}`,a=f[J],l(a)||(H=L.interpolateUsingFraction(.5,mH),ee=(N.height+I.height)*.5,z=h.fromRadians(H.longitude,H.latitude,ee,e,kp),d.push(z.x,z.y,z.z),a=d.length/3-1,f[J]=a,r&&(j=D.add(E,b,TC),D.multiplyByScalar(j,.5,j),u.push(j.x,j.y))),s.push(G,a,X),s.push(a,v,X)):(g.push(v),g.push(X),g.push(G))}let Z={attributes:{position:new Ge({componentDatatype:Q.DOUBLE,componentsPerAttribute:3,values:d})},indices:g,primitiveType:Fe.TRIANGLES};return r&&(Z.attributes.st=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:u})),new ut(Z)};tg.scaleToGeodeticHeight=function(e,t,n,i){n=y(n,ie.WGS84);let o=_9e,r=T9e;if(t=y(t,0),i=y(i,!0),l(e)){let s=e.length;for(let a=0;a10&&t*2>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n};ng.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};ng.prototype.contains=function(e){return this._array.indexOf(e)!==-1};ng.prototype.clear=function(){this._array.length=this._offset=this._length=0};ng.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var ig=ng;var Jo={};Jo.computeHierarchyPackedLength=function(e,t){let n=0,i=[e];for(;i.length>0;){let o=i.pop();if(!l(o))continue;n+=2;let r=o.positions,s=o.holes;if(l(r)&&r.length>0&&(n+=r.length*t.packedLength),l(s)){let a=s.length;for(let c=0;c0;){let r=o.pop();if(!l(r))continue;let s=r.positions,a=r.holes;if(t[n++]=l(s)?s.length:0,t[n++]=l(a)?a.length:0,l(s)){let c=s.length;for(let d=0;d0?new Array(o):void 0;for(let a=0;aW.PI){let c=s;s=a,a=c}if(!(r.longitudea))return n.cartographicToCartesian(r)}function v9e(e,t,n,i){if(i===$t.RHUMB)return P9e(e,t,n);let o=jn.lineSegmentPlane(e,t,dn.ORIGIN_XY_PLANE);if(l(o))return n.scaleToGeodeticSurface(o,o)}var w9e=new he;function F9e(e,t,n){let i=[],o,r,s,a,c,d=0;for(;dt.cartesianToCartographic(m,w9e).longitude;if(s===0)i.push({position:d,type:s,visited:!1,next:a,theta:u(o)});else if(a!==0){if(c=v9e(o,r,t,n),++d,!l(c))continue;e.splice(d,0,c),i.push({position:d,type:s,visited:!1,next:a,theta:u(c)})}++d}return i}function Woe(e,t,n,i,o,r,s){let a=[],c=r,d=m=>p=>p.position===m,u=[];do{let m=n[c];a.push(m);let p=i.findIndex(d(c)),g=i[p];if(!l(g)){++c;continue}let{visited:f,type:x,next:_}=g;if(g.visited=!0,x===0){if(_===0){let Z=i[p-(s?1:-1)];if(Z?.position===c+1)Z.visited=!0;else{++c;continue}}if(!f&&s&&_>0||r===c&&!s&&_<0){++c;continue}}if(!(s?x>=0:x<=0)){++c;continue}f||u.push(c);let V=p+(s?1:-1),L=i[V];if(!l(L)){++c;continue}c=L.position}while(c=0&&c!==r&&a.lengthd.theta-u.theta);let c=s[0].z>=0;o=Woe(i,o,s,a,1,0,c)}return i};Jo.polygonsFromHierarchy=function(e,t,n,i,o,r){let s=[],a=[],c=new ig;c.enqueue(e);let d=l(r);for(;c.length!==0;){let u=c.dequeue(),m=u.positions,p=u.holes,g,f;if(i)for(f=m.length,g=0;g1){for(let v of X)c.enqueue(new Va(v,p));continue}}let V=m.slice(),L=l(p)?p.length:0,Z=[],G;for(g=0;gMath.PI&&(e-=W.TWO_PI),e}}});var SC=new he,B9e=new h;Rr.prototype.getLatitude=function(e){l(e)||(e=ie.WGS84),SC.latitude=this.conformalLatitude,SC.longitude=this.longitude,SC.height=0;let t=this.ellipsoid.cartographicToCartesian(SC,B9e);return e.cartesianToCartographic(t,SC),SC.latitude};var Y9e=new pn,O9e=new h,H9e=new h;Rr.fromCartesian=function(e,t){let n=W.signNotZero(e.z),i=Rr.NORTH_POLE_TANGENT_PLANE,o=Rr.SOUTH_POLE;n<0&&(i=Rr.SOUTH_POLE_TANGENT_PLANE,o=Rr.NORTH_POLE);let r=Y9e;r.origin=i.ellipsoid.scaleToGeocentricSurface(e,r.origin),r.direction=h.subtract(r.origin,o,O9e),h.normalize(r.direction,r.direction);let s=jn.rayPlane(r,i.plane,H9e),a=h.subtract(s,o,s),c=h.dot(i.xAxis,a),d=n*h.dot(i.yAxis,a);return l(t)?(t.position=new D(c,d),t.tangentPlane=i,t):new Rr(new D(c,d),i)};Rr.fromCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i=0?s:s+W.TWO_PI;o.westOverIdl=Math.min(o.westOverIdl,a),o.eastOverIdl=Math.max(o.eastOverIdl,a),r.west=Math.min(r.west,s),r.east=Math.max(r.east,s);let c=e.getLatitude(n),d=c;if(r.south=Math.min(r.south,c),r.north=Math.max(r.north,c),i!==$t.RHUMB){let p=D.subtract(t.position,e.position,dAe),g=D.dot(t.position,p)/D.dot(p,p);if(g>0&&g<1){let f=D.add(t.position,D.multiplyByScalar(p,-g,p),uAe),x=oc.clone(t,mAe);x.position=f;let _=x.getLatitude(n);r.south=Math.min(r.south,_),r.north=Math.max(r.north,_),Math.abs(c)>Math.abs(_)&&(d=_)}}let u=t.x*e.y-e.x*t.y,m=Math.sign(u);m!==0&&(m*=D.angleBetween(t.position,e.position)),d>=0&&(o.northAngle+=m),d<=0&&(o.southAngle+=m)}var Moe=new oc,hAe=new oc,bu={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};gu.computeRectangleFromPositions=function(e,t,n,i){if(l(i)||(i=new ce),e.length<3)return i;i.west=Number.POSITIVE_INFINITY,i.east=Number.NEGATIVE_INFINITY,i.south=Number.POSITIVE_INFINITY,i.north=Number.NEGATIVE_INFINITY,bu.northAngle=0,bu.southAngle=0,bu.westOverIdl=Number.POSITIVE_INFINITY,bu.eastOverIdl=Number.NEGATIVE_INFINITY;let o=e.length,r=oc.fromCartesian(e[0],hAe);for(let s=1;sbu.eastOverIdl-bu.westOverIdl&&(i.west=bu.westOverIdl,i.east=bu.eastOverIdl,i.east>W.PI&&(i.east=i.east-W.TWO_PI),i.west>W.PI&&(i.west=i.west-W.TWO_PI)),W.equalsEpsilon(Math.abs(bu.northAngle),W.TWO_PI,W.EPSILON10)&&(i.north=W.PI_OVER_TWO,i.east=W.PI,i.west=-W.PI),W.equalsEpsilon(Math.abs(bu.southAngle),W.TWO_PI,W.EPSILON10)&&(i.south=-W.PI_OVER_TWO,i.east=W.PI,i.west=-W.PI),i};var fAe=new oc;function pAe(e,t,n){return e.height>=W.PI||e.width>=W.PI?oc.fromCartesian(t[0],fAe).tangentPlane:Ur.fromPoints(t,n)}var Noe=new he;function bAe(e,t,n){return(i,o)=>{if(e.height>=W.PI||e.width>=W.PI){if(e.south<0&&e.north>0){l(o)||(o=[]);for(let s=0;s=W.PI||e.width>=W.PI)return(o,r)=>{if(e.south<0&&e.north>0){let s=n.cartesianToCartographic(o,Noe);return l(r)||(r=new D),r.x=s.longitude/W.PI,r.y=s.latitude/W.PI_OVER_TWO,r}return oc.fromCartesian(o,r)};let i=Ur.fromPoints(t,n);return(o,r)=>i.projectPointsOntoPlane(o,r)}function yAe(e,t,n,i){return(o,r)=>!i&&(e.height>=W.PI_OVER_TWO||e.width>=2*W.PI_OVER_THREE)?Dn.splitPolygonsOnEquator(o,t,n,r):o}function xAe(e,t,n,i){if(t.height>=W.PI||t.width>=W.PI)return He.fromRectangle(t,void 0,voe);let o=e,r=Ur.fromPoints(o,n);return Dn.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),o,i,voe)}gu.createGeometry=function(e){let t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,o=e._stRotation,r=e._polygonHierarchy,s=e._perPositionHeight,a=e._closeTop,c=e._closeBottom,d=e._arcType,u=e._textureCoordinates,m=l(u),p=r.positions;if(p.length<3)return;let g=e.rectangle,f=Dn.polygonsFromHierarchy(r,m,bAe(g,p,n),!s,n,yAe(g,n,d,s)),x=f.hierarchy,_=f.polygons,C=function(I){return I},V=m?Dn.polygonsFromHierarchy(u,!0,C,!1,n).polygons:void 0;if(x.length===0)return;let L=x[0].outerRing,Z=xAe(L,g,n,o),G=[],X=e._height,v=e._extrudedHeight,P=e._perPositionHeightExtrude||!W.equalsEpsilon(X,v,0,W.EPSILON2),F={perPositionHeight:s,vertexFormat:t,geometry:void 0,rotationAxis:pAe(g,L,n).plane.normal,projectTo2d:gAe(g,L,n),boundingRectangle:Z,ellipsoid:n,stRotation:o,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:d},A;if(P)for(F.extrude=!0,F.top=a,F.bottom=c,F.shadowVolume=e._shadowVolume,F.offsetAttribute=e._offsetAttribute,A=0;A<_.length;A++){let I=sAe(n,_[A],m?V[A]:void 0,i,x[A],s,a,c,t,d),w;a&&c?(w=I.topAndBottom,F.geometry=Dn.scaleToGeodeticHeightExtruded(w.geometry,X,v,n,s)):a?(w=I.topAndBottom,w.geometry.attributes.position.values=si.scaleToGeodeticHeight(w.geometry.attributes.position.values,X,n,!s),F.geometry=w.geometry):c&&(w=I.topAndBottom,w.geometry.attributes.position.values=si.scaleToGeodeticHeight(w.geometry.attributes.position.values,v,n,!0),F.geometry=w.geometry),(a||c)&&(F.wall=!1,w.geometry=hH(F),G.push(w));let N=I.walls;F.wall=!0;for(let B=0;B>t};ta.fromSubtreeJson=async function(e,t,n,i,o){let r=new ta(e,i,o),s;l(t)?s={json:t,binary:void 0}:s=CFe(n);let a=s.json;r._subtreeJson=a;let c;if(oi(a,"3DTILES_metadata"))c=a.extensions["3DTILES_metadata"];else if(l(a.tileMetadata)){let V=a.tileMetadata;c=a.propertyTables[V]}let d=[];if(l(a.contentMetadata)){let V=a.contentMetadata.length;for(let Z=0;Z0;u=u||m;for(let p=0;p>BigInt(61)),d=c%2===0?iC.encode2D(i,o,r):iC.encode2D(i,r,o),u=Xp.fromFacePositionLevel(c,BigInt(d),i),m,p;if(l(s)){let g=(a.maximumHeight+a.minimumHeight)/2;m=n<4?a.minimumHeight:g,p=n<4?g:a.maximumHeight}else m=a.minimumHeight,p=a.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:Xp.getTokenFromId(u._cellId),minimumHeight:m,maximumHeight:p}}}}var OFe=new h,zFe=new h,az=new h,KFe=new $;function roe(e,t,n,i,o){if(t===0)return e;let r=h.unpack(e,0,zFe),s=$.unpack(e,3,KFe),a=Math.pow(2,-t),c=-1+(2*n+1)*a,d=-1+(2*i+1)*a,u=0,m=h.fromElements(a,a,1,OFe);l(o)&&(u=-1+(2*o+1)*a,m.z=a);let p=h.fromElements(c,d,u,az);p=$.multiplyByVector(s,p,az),p=h.add(p,r,az);let g=$.clone(s);g=$.multiplyByScale(g,m,g);let f=new Array(12);return h.pack(p,f),$.pack(g,f,3),f}var HFe=new ce;function soe(e,t,n,i,o){if(t===0)return e.slice();let r=ce.unpack(e,0,HFe),s=e[4],a=e[5],c=Math.pow(2,-t),d=c*r.width,u=X.negativePiToPi(r.west+n*d),m=X.negativePiToPi(u+d),p=c*r.height,g=X.negativePiToPi(r.south+i*p),f=X.negativePiToPi(g+p),x=s,_=a;if(l(o)){let C=c*(a-s);x+=o*C,_=x+C}return[u,g,m,f,x,_]}function JFe(e,t,n){let i=e._implicitTileset,o=t.implicitCoordinates.getChildCoordinates(n),r=ioe(i,o,n,!1,t),s=noe(void 0,i,o),a=i.subtreeUriTemplate.getDerivedResource({templateValues:o.getTemplateValues()}).url,c={boundingVolume:r,geometricError:s,refine:i.refine,contents:[{uri:a}]},d=aoe(e,i.baseResource,c,t);return d.implicitTileset=i,d.implicitCoordinates=o,d}function aoe(e,t,n,i){let o=e._tile.constructor;return new o(e._tileset,t,n,i)}Dc.prototype.hasProperty=function(e,t){return!1};Dc.prototype.getFeature=function(e){};Dc.prototype.applyDebugSettings=function(e,t){};Dc.prototype.applyStyle=function(e){};Dc.prototype.update=function(e,t){};Dc.prototype.pick=function(e,t,n){};Dc.prototype.isDestroyed=function(){return!1};Dc.prototype.destroy=function(){return this._implicitSubtree=this._implicitSubtree&&this._implicitSubtree.destroy(),me(this)};Dc._deriveBoundingBox=roe;Dc._deriveBoundingRegion=soe;Dc._deriveBoundingVolumeS2=ooe;var gC=Dc;var pEn=S(T(),1);var tln=S(T(),1),QFe={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},Il=Object.freeze(QFe);var rEn=S(T(),1);var Zln=S(T(),1);var rln=S(T(),1);function yC(e,t){this._distance=t,this._normal=new coe(e,this),this.onChangeCallback=void 0,this.index=-1}Object.defineProperties(yC.prototype,{distance:{get:function(){return this._distance},set:function(e){l(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){l(this.onChangeCallback)&&!h.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),h.clone(e,this._normal._cartesian3)}}});yC.fromPlane=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance):t=new yC(e.normal,e.distance),t};yC.clone=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance,t):new yC(e.normal,e.distance)};function coe(e,t){this._clippingPlane=t,this._cartesian3=h.clone(e)}Object.defineProperties(coe.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}});var jx=yC;function oc(e){e=y(e,y.EMPTY_OBJECT),this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=y(e.enabled,!0),this.modelMatrix=A.clone(y(e.modelMatrix,A.IDENTITY)),this.edgeColor=Y.clone(y(e.edgeColor,Y.WHITE)),this.edgeWidth=y(e.edgeWidth,0),this.planeAdded=new ge,this.planeRemoved=new ge,this._owner=void 0;let t=y(e.unionClippingRegions,!1);this._unionClippingRegions=t,this._testIntersection=t?hoe:foe,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;let n=e.planes;if(l(n)){let i=n.length;for(let o=0;o0&&(r=Ht.OUTSIDE);for(let s=0;s0?rs.COUNTER_CLOCKWISE:rs.CLOCKWISE};eg.triangulate=function(e,t){let n=D.packArray(e);return(0,Zoe.default)(n,t,2)};var Loe=new h,Roe=new h,Goe=new h,Toe=new h,Coe=new h,Voe=new h,Np=new h,Eoe=new D,Woe=new D,Ioe=new D,_C=new D;eg.computeSubdivision=function(e,t,n,i,o){o=y(o,X.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,d=new Array(c*3),u=new Array(c*2),m=0,p=0;for(a=0;a0;){let Z=s.pop(),R=s.pop(),G=s.pop(),W=h.fromArray(d,G*3,Loe),v=h.fromArray(d,R*3,Roe),P=h.fromArray(d,Z*3,Goe),F,M,b;r&&(F=D.fromArray(u,G*2,Eoe),M=D.fromArray(u,R*2,Woe),b=D.fromArray(u,Z*2,Ioe));let L=h.multiplyByScalar(h.normalize(W,Toe),x,Toe),E=h.multiplyByScalar(h.normalize(v,Coe),x,Coe),I=h.multiplyByScalar(h.normalize(P,Voe),x,Voe),w=h.magnitudeSquared(h.subtract(L,E,Np)),N=h.magnitudeSquared(h.subtract(E,I,Np)),B=h.magnitudeSquared(h.subtract(I,L,Np)),k=Math.max(w,N,B),O,U,J;k>C?w===k?(O=`${Math.min(G,R)} ${Math.max(G,R)}`,a=f[O],l(a)||(U=h.add(W,v,Np),h.multiplyByScalar(U,.5,U),d.push(U.x,U.y,U.z),a=d.length/3-1,f[O]=a,r&&(J=D.add(F,M,_C),D.multiplyByScalar(J,.5,J),u.push(J.x,J.y))),s.push(G,a,Z),s.push(a,R,Z)):N===k?(O=`${Math.min(R,Z)} ${Math.max(R,Z)}`,a=f[O],l(a)||(U=h.add(v,P,Np),h.multiplyByScalar(U,.5,U),d.push(U.x,U.y,U.z),a=d.length/3-1,f[O]=a,r&&(J=D.add(M,b,_C),D.multiplyByScalar(J,.5,J),u.push(J.x,J.y))),s.push(R,a,G),s.push(a,Z,G)):B===k&&(O=`${Math.min(Z,G)} ${Math.max(Z,G)}`,a=f[O],l(a)||(U=h.add(P,W,Np),h.multiplyByScalar(U,.5,U),d.push(U.x,U.y,U.z),a=d.length/3-1,f[O]=a,r&&(J=D.add(b,F,_C),D.multiplyByScalar(J,.5,J),u.push(J.x,J.y))),s.push(Z,a,R),s.push(a,G,R)):(g.push(G),g.push(R),g.push(Z))}let V={attributes:{position:new Ge({componentDatatype:Q.DOUBLE,componentsPerAttribute:3,values:d})},indices:g,primitiveType:Fe.TRIANGLES};return r&&(V.attributes.st=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:u})),new ut(V)};var y9e=new he,x9e=new he,_9e=new he,hz=new he;eg.computeRhumbLineSubdivision=function(e,t,n,i,o){o=y(o,X.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,d=new Array(c*3),u=new Array(c*2),m=0,p=0;for(a=0;a0;){let G=s.pop(),W=s.pop(),v=s.pop(),P=h.fromArray(d,v*3,Loe),F=h.fromArray(d,W*3,Roe),M=h.fromArray(d,G*3,Goe),b,L,E;r&&(b=D.fromArray(u,v*2,Eoe),L=D.fromArray(u,W*2,Woe),E=D.fromArray(u,G*2,Ioe));let I=e.cartesianToCartographic(P,y9e),w=e.cartesianToCartographic(F,x9e),N=e.cartesianToCartographic(M,_9e);C.setEndPoints(I,w);let B=C.surfaceDistance;V.setEndPoints(w,N);let k=V.surfaceDistance;Z.setEndPoints(N,I);let O=Z.surfaceDistance,U=Math.max(B,k,O),J,z,ee,K,j;U>_?B===U?(J=`${Math.min(v,W)} ${Math.max(v,W)}`,a=f[J],l(a)||(z=C.interpolateUsingFraction(.5,hz),ee=(I.height+w.height)*.5,K=h.fromRadians(z.longitude,z.latitude,ee,e,Np),d.push(K.x,K.y,K.z),a=d.length/3-1,f[J]=a,r&&(j=D.add(b,L,_C),D.multiplyByScalar(j,.5,j),u.push(j.x,j.y))),s.push(v,a,G),s.push(a,W,G)):k===U?(J=`${Math.min(W,G)} ${Math.max(W,G)}`,a=f[J],l(a)||(z=V.interpolateUsingFraction(.5,hz),ee=(w.height+N.height)*.5,K=h.fromRadians(z.longitude,z.latitude,ee,e,Np),d.push(K.x,K.y,K.z),a=d.length/3-1,f[J]=a,r&&(j=D.add(L,E,_C),D.multiplyByScalar(j,.5,j),u.push(j.x,j.y))),s.push(W,a,v),s.push(a,G,v)):O===U&&(J=`${Math.min(G,v)} ${Math.max(G,v)}`,a=f[J],l(a)||(z=Z.interpolateUsingFraction(.5,hz),ee=(N.height+I.height)*.5,K=h.fromRadians(z.longitude,z.latitude,ee,e,Np),d.push(K.x,K.y,K.z),a=d.length/3-1,f[J]=a,r&&(j=D.add(E,b,_C),D.multiplyByScalar(j,.5,j),u.push(j.x,j.y))),s.push(G,a,W),s.push(a,v,W)):(g.push(v),g.push(W),g.push(G))}let R={attributes:{position:new Ge({componentDatatype:Q.DOUBLE,componentsPerAttribute:3,values:d})},indices:g,primitiveType:Fe.TRIANGLES};return r&&(R.attributes.st=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:u})),new ut(R)};eg.scaleToGeodeticHeight=function(e,t,n,i){n=y(n,te.default);let o=b9e,r=g9e;if(t=y(t,0),i=y(i,!0),l(e)){let s=e.length;for(let a=0;a10&&t*2>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n};tg.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};tg.prototype.contains=function(e){return this._array.indexOf(e)!==-1};tg.prototype.clear=function(){this._array.length=this._offset=this._length=0};tg.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var ng=tg;var Qo={};Qo.computeHierarchyPackedLength=function(e,t){let n=0,i=[e];for(;i.length>0;){let o=i.pop();if(!l(o))continue;n+=2;let r=o.positions,s=o.holes;if(l(r)&&r.length>0&&(n+=r.length*t.packedLength),l(s)){let a=s.length;for(let c=0;c0;){let r=o.pop();if(!l(r))continue;let s=r.positions,a=r.holes;if(t[n++]=l(s)?s.length:0,t[n++]=l(a)?a.length:0,l(s)){let c=s.length;for(let d=0;d0?new Array(o):void 0;for(let a=0;aX.PI){let c=s;s=a,a=c}if(!(r.longitudea))return n.cartographicToCartesian(r)}function W9e(e,t,n,i){if(i===$t.RHUMB)return E9e(e,t,n);let o=jn.lineSegmentPlane(e,t,dn.ORIGIN_XY_PLANE);if(l(o))return n.scaleToGeodeticSurface(o,o)}var I9e=new he;function X9e(e,t,n){let i=[],o,r,s,a,c,d=0;for(;dt.cartesianToCartographic(m,I9e).longitude;if(s===0)i.push({position:d,type:s,visited:!1,next:a,theta:u(o)});else if(a!==0){if(c=W9e(o,r,t,n),++d,!l(c))continue;e.splice(d,0,c),i.push({position:d,type:s,visited:!1,next:a,theta:u(c)})}++d}return i}function woe(e,t,n,i,o,r,s){let a=[],c=r,d=m=>p=>p.position===m,u=[];do{let m=n[c];a.push(m);let p=i.findIndex(d(c)),g=i[p];if(!l(g)){++c;continue}let{visited:f,type:x,next:_}=g;if(g.visited=!0,x===0){if(_===0){let R=i[p-(s?1:-1)];if(R?.position===c+1)R.visited=!0;else{++c;continue}}if(!f&&s&&_>0||r===c&&!s&&_<0){++c;continue}}if(!(s?x>=0:x<=0)){++c;continue}f||u.push(c);let V=p+(s?1:-1),Z=i[V];if(!l(Z)){++c;continue}c=Z.position}while(c=0&&c!==r&&a.lengthd.theta-u.theta);let c=s[0].z>=0;o=woe(i,o,s,a,1,0,c)}return i};Qo.polygonsFromHierarchy=function(e,t,n,i,o,r){let s=[],a=[],c=new ng;c.enqueue(e);let d=l(r);for(;c.length!==0;){let u=c.dequeue(),m=u.positions,p=u.holes,g,f;if(i)for(f=m.length,g=0;g1){for(let v of W)c.enqueue(new Za(v,p));continue}}let V=m.slice(),Z=l(p)?p.length:0,R=[],G;for(g=0;gMath.PI&&(e-=X.TWO_PI),e}}});var SC=new he,N9e=new h;Rr.prototype.getLatitude=function(e){l(e)||(e=te.default),SC.latitude=this.conformalLatitude,SC.longitude=this.longitude,SC.height=0;let t=this.ellipsoid.cartographicToCartesian(SC,N9e);return e.cartesianToCartographic(t,SC),SC.latitude};var U9e=new pn,k9e=new h,D9e=new h;Rr.fromCartesian=function(e,t){let n=X.signNotZero(e.z),i=Rr.NORTH_POLE_TANGENT_PLANE,o=Rr.SOUTH_POLE;n<0&&(i=Rr.SOUTH_POLE_TANGENT_PLANE,o=Rr.NORTH_POLE);let r=U9e;r.origin=i.ellipsoid.scaleToGeocentricSurface(e,r.origin),r.direction=h.subtract(r.origin,o,k9e),h.normalize(r.direction,r.direction);let s=jn.rayPlane(r,i.plane,D9e),a=h.subtract(s,o,s),c=h.dot(i.xAxis,a),d=n*h.dot(i.yAxis,a);return l(t)?(t.position=new D(c,d),t.tangentPlane=i,t):new Rr(new D(c,d),i)};Rr.fromCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i=0?s:s+X.TWO_PI;o.westOverIdl=Math.min(o.westOverIdl,a),o.eastOverIdl=Math.max(o.eastOverIdl,a),r.west=Math.min(r.west,s),r.east=Math.max(r.east,s);let c=e.getLatitude(n),d=c;if(r.south=Math.min(r.south,c),r.north=Math.max(r.north,c),i!==$t.RHUMB){let p=D.subtract(t.position,e.position,sAe),g=D.dot(t.position,p)/D.dot(p,p);if(g>0&&g<1){let f=D.add(t.position,D.multiplyByScalar(p,-g,p),aAe),x=rc.clone(t,cAe);x.position=f;let _=x.getLatitude(n);r.south=Math.min(r.south,_),r.north=Math.max(r.north,_),Math.abs(c)>Math.abs(_)&&(d=_)}}let u=t.x*e.y-e.x*t.y,m=Math.sign(u);m!==0&&(m*=D.angleBetween(t.position,e.position)),d>=0&&(o.northAngle+=m),d<=0&&(o.southAngle+=m)}var koe=new rc,lAe=new rc,pu={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};bu.computeRectangleFromPositions=function(e,t,n,i){if(l(i)||(i=new ce),e.length<3)return i;i.west=Number.POSITIVE_INFINITY,i.east=Number.NEGATIVE_INFINITY,i.south=Number.POSITIVE_INFINITY,i.north=Number.NEGATIVE_INFINITY,pu.northAngle=0,pu.southAngle=0,pu.westOverIdl=Number.POSITIVE_INFINITY,pu.eastOverIdl=Number.NEGATIVE_INFINITY;let o=e.length,r=rc.fromCartesian(e[0],lAe);for(let s=1;spu.eastOverIdl-pu.westOverIdl&&(i.west=pu.westOverIdl,i.east=pu.eastOverIdl,i.east>X.PI&&(i.east=i.east-X.TWO_PI),i.west>X.PI&&(i.west=i.west-X.TWO_PI)),X.equalsEpsilon(Math.abs(pu.northAngle),X.TWO_PI,X.EPSILON10)&&(i.north=X.PI_OVER_TWO,i.east=X.PI,i.west=-X.PI),X.equalsEpsilon(Math.abs(pu.southAngle),X.TWO_PI,X.EPSILON10)&&(i.south=-X.PI_OVER_TWO,i.east=X.PI,i.west=-X.PI),i};var dAe=new rc;function uAe(e,t,n){return e.height>=X.PI||e.width>=X.PI?rc.fromCartesian(t[0],dAe).tangentPlane:Dr.fromPoints(t,n)}var Doe=new he;function mAe(e,t,n){return(i,o)=>{if(e.height>=X.PI||e.width>=X.PI){if(e.south<0&&e.north>0){l(o)||(o=[]);for(let s=0;s=X.PI||e.width>=X.PI)return(o,r)=>{if(e.south<0&&e.north>0){let s=n.cartesianToCartographic(o,Doe);return l(r)||(r=new D),r.x=s.longitude/X.PI,r.y=s.latitude/X.PI_OVER_TWO,r}return rc.fromCartesian(o,r)};let i=Dr.fromPoints(t,n);return(o,r)=>i.projectPointsOntoPlane(o,r)}function fAe(e,t,n,i){return(o,r)=>!i&&(e.height>=X.PI_OVER_TWO||e.width>=2*X.PI_OVER_THREE)?Dn.splitPolygonsOnEquator(o,t,n,r):o}function pAe(e,t,n,i){if(t.height>=X.PI||t.width>=X.PI)return ze.fromRectangle(t,void 0,Aoe);let o=e,r=Dr.fromPoints(o,n);return Dn.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),o,i,Aoe)}bu.createGeometry=function(e){let t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,o=e._stRotation,r=e._polygonHierarchy,s=e._perPositionHeight,a=e._closeTop,c=e._closeBottom,d=e._arcType,u=e._textureCoordinates,m=l(u),p=r.positions;if(p.length<3)return;let g=e.rectangle,f=Dn.polygonsFromHierarchy(r,m,mAe(g,p,n),!s,n,fAe(g,n,d,s)),x=f.hierarchy,_=f.polygons,C=function(I){return I},V=m?Dn.polygonsFromHierarchy(u,!0,C,!1,n).polygons:void 0;if(x.length===0)return;let Z=x[0].outerRing,R=pAe(Z,g,n,o),G=[],W=e._height,v=e._extrudedHeight,P=e._perPositionHeightExtrude||!X.equalsEpsilon(W,v,0,X.EPSILON2),F={perPositionHeight:s,vertexFormat:t,geometry:void 0,rotationAxis:uAe(g,Z,n).plane.normal,projectTo2d:hAe(g,Z,n),boundingRectangle:R,ellipsoid:n,stRotation:o,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:d},M;if(P)for(F.extrude=!0,F.top=a,F.bottom=c,F.shadowVolume=e._shadowVolume,F.offsetAttribute=e._offsetAttribute,M=0;M<_.length;M++){let I=nAe(n,_[M],m?V[M]:void 0,i,x[M],s,a,c,t,d),w;a&&c?(w=I.topAndBottom,F.geometry=Dn.scaleToGeodeticHeightExtruded(w.geometry,W,v,n,s)):a?(w=I.topAndBottom,w.geometry.attributes.position.values=si.scaleToGeodeticHeight(w.geometry.attributes.position.values,W,n,!s),F.geometry=w.geometry):c&&(w=I.topAndBottom,w.geometry.attributes.position.values=si.scaleToGeodeticHeight(w.geometry.attributes.position.values,v,n,!0),F.geometry=w.geometry),(a||c)&&(F.wall=!1,w.geometry=fz(F),G.push(w));let N=I.walls;F.wall=!0;for(let B=0;BVC.equals(t,e))};Or.prototype.remove=function(e){let t=this._polygons,n=t.findIndex(i=>VC.equals(i,e));return n===-1?!1:(t.splice(n,1),this.polygonRemoved.raiseEvent(e,n),!0)};var SAe=new ce;function CAe(e){let t=[],n=[],i=e.length;for(let r=0;rce.union(e[_].computeSphericalExtents(SAe),x,x),a),t[p]=void 0,n[p]=void 0,c=Math.max(a.height*2.5,.001),d=Math.max(a.width*2.5,.001),u=ce.clone(a,u),u.south-=c,u.west-=d,u.north+=c,u.east+=d,u.south=Math.max(u.south,-Math.PI),u.west=Math.max(u.west,-Math.PI),u.north=Math.min(u.north,Math.PI),u.east=Math.min(u.east,Math.PI),p=-1}}t.push(u),n.push(m)}let o=new Map;return n.filter(l).forEach((r,s)=>r.forEach(a=>o.set(a,s))),{extentsList:t.filter(l),extentsIndexByPolygon:o}}Or.prototype.removeAll=function(){let e=this._polygons,t=e.length;for(let n=0;ns+a.length,0);if(n===this.totalPositions||(this._totalPositions=n,this.length===0))return;l(this._signedDistanceComputeCommand)&&(this._signedDistanceComputeCommand.canceled=!0,this._signedDistanceComputeCommand=void 0);let i=this._polygonsTexture,o=this._extentsTexture,r=this._signedDistanceTexture;if(l(i)){let s=i.width*i.height;(s{e._signedDistanceComputeCommand=void 0}})}var Uoe=new ce,RAe=new ce;Or.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._polygons,i=n.length,o=Kt.OUTSIDE;this.inverse&&(o=Kt.INSIDE);for(let r=0;r=r;)C=o[C-r];o.push(C),s[x]=_}_>JAe&&(t instanceof Uint16Array||t instanceof Uint8Array)?t=new Uint32Array(t):_>QAe&&t instanceof Uint8Array&&(t=new Uint16Array(t)),x===c?(c=_,t[a]=_):x===d?(d=_,t[a+1]=_):(u=_,t[a+2]=_),x=Ooe(i,c,d,u,p,g,f)}}e._triangleIndices=t,e._outlineCoordinatesTypedArray=new Float32Array(i)}function Ooe(e,t,n,i,o,r,s){let a=s?1:0,c=o?1:0,d=0,u=yH(e,t,a,c,d);if(u===0)return t;let m=0,p=o?1:0,g=r?1:0,f=yH(e,n,m,p,g);if(f===0)return n;let x=s?1:0,_=0,C=r?1:0,V=yH(e,i,x,_,C);if(V===0)return i;let L=u&f&V,Z,G,X;if(L&1)Z=0,G=1,X=2;else if(L&2)Z=0,X=1,G=2;else if(L&4)G=0,Z=1,X=2;else if(L&8)G=0,X=1,Z=2;else if(L&16)X=0,Z=1,G=2;else if(L&32)X=0,G=1,Z=2;else{let A=xH(u),b=xH(f),R=xH(V);return A>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}a5.prototype.updateAttribute=function(e){let t=this._extraVertices,n=e.length,i=n/this._originalVertexCount,o=t.length,r=e.constructor,s=new r(e.length+o*i);s.set(e);for(let a=0;a1;)i>>=1,r.push(Hoe(i));let s=new Et({context:e,source:{arrayBufferView:o,mipLevels:r},width:n,height:1,pixelFormat:at.LUMINANCE,sampler:new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.LINEAR_MIPMAP_LINEAR,magnificationFilter:di.LINEAR})});return t.outlineTexture=s,s};function Hoe(e){let t=new Uint8Array(e);return t[e-1]=192,e===8?t[e-1]=96:e===4?t[e-1]=48:e===2?t[e-1]=24:e===1&&(t[e-1]=12),t}function zoe(e,t){this._originalVertexCount=t,this._edges=new Set;for(let n=0;n{this._resourcesLoaded=!0}).catch(o=>{this._processError=o})),l(this._processError)){this._state=Xo.FAILED;let o=this._processError;this._processError=void 0,l5(this,o)}let t=this._textureErrors.pop();if(l(t)){let o=this.getError("Failed to load glTF texture",t);throw o.name="TextureError",o}if(this._state===Xo.FAILED)return!1;let n=!1;try{n=this._process(e)}catch(o){this._state=Xo.FAILED,l5(this,o)}let i=!1;try{i=this._processTextures(e)}catch(o){this._textureState=Xo.FAILED,l5(this,o)}return this._incrementallyLoadTextures?n:n&&i};function IMe(e,t,n,i,o,r,s){let a=e.gltfJson,d=a.accessors[t].bufferView;return Ni.getVertexBufferLoader({gltf:a,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:s,bufferViewId:d,draco:i,attributeSemantic:n,accessorId:t,asynchronous:e._asynchronous,loadBuffer:o,loadTypedArray:r})}function WMe(e,t,n,i,o,r){return Ni.getIndexBufferLoader({gltf:e.gltfJson,accessorId:t,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:r,draco:n,asynchronous:e._asynchronous,loadBuffer:i,loadTypedArray:o})}function PMe(e,t){let n=Ni.getBufferViewLoader({gltf:e.gltfJson,bufferViewId:t,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoaders.push(n),n}function qoe(e,t,n){let i=t.byteOffset,o=El(e,t),r=t.count,s=fd(t.type),a=t.componentType,c=Q.getSizeInBytes(a),d=c*s,u=r*s;if(o===d)return n=new Uint8Array(n),Q.createArrayBufferView(a,n.buffer,n.byteOffset+i,u);let m=Q.createTypedArray(a,u),p=new DataView(n.buffer),g=new Array(s),f=Np(t.componentType);i=n.byteOffset+i;for(let x=0;x{l(i)&&l(i.attributes)&&l(i.attributes[u])?OMe(x,_,o,r):HMe(a,c,x,_,o,r)},x}function tre(e,t,n,i,o,r,s){let a=n.modelSemantic,c=a===Tt.POSITION,d=a===Tt.FEATURE_ID,u=c&&!o&&e._loadAttributesFor2D&&!s.scene3DOnly,m=c&&e._enablePick&&!s.context.webgl2,p=e._loadForClassification&&d,g=e._loadAttributesAsTypedArray,f=!g,x=g||u||m||p,V=ere(e,t,n,i,r?!1:f,r?!0:x,s),L=new r_.AttributeLoadPlan(V);return L.loadBuffer=f,L.loadTypedArray=x,L}function zMe(e,t,n,i,o){let r=e.gltfJson.accessors,s=l(n.ROTATION),a=l(n.TRANSLATION)&&l(r[n.TRANSLATION].min)&&l(r[n.TRANSLATION].max),c=SH(e,Hr,i),d=c.modelSemantic,u=d===Hr.TRANSLATION||d===Hr.ROTATION||d===Hr.SCALE,m=d===Hr.TRANSLATION,p=e._loadAttributesAsTypedArray||s&&u||!o.context.instancedArrays,g=e._enablePick&&!o.context.webgl2,f=!p,x=e._loadAttributesFor2D&&!o.scene3DOnly;return ere(e,t,c,void 0,f,p||m&&(!a||x||g),o)}function KMe(e,t,n,i,o,r){let s=e.gltfJson.accessors[t],a=s.bufferView;if(!l(n)&&!l(a))return;let c=new sMe;c.count=s.count;let d=e._loadAttributesAsTypedArray,u=(e._loadIndicesForWireframe||e._enablePick)&&!r.context.webgl2,m=e._loadForClassification&&i,g=!d,f=d||u||m,C=WMe(e,t,n,o?!1:g,o?!0:f,r),V=e._geometryLoaders.length;e._geometryLoaders.push(C);let L=C.load();e._loaderPromises.push(L),e._geometryCallbacks[V]=()=>{c.indexDatatype=C.indexDatatype,c.buffer=C.buffer,c.typedArray=C.typedArray};let Z=new r_.IndicesLoadPlan(c);return Z.loadBuffer=g,Z.loadTypedArray=f,Z}function Oc(e,t,n,i){let o=e.gltfJson,r=Xl.getImageIdFromTexture({gltf:o,textureId:t.index,supportedImageFormats:e._supportedImageFormats});if(!l(r))return;let s=Ni.getTextureLoader({gltf:o,textureInfo:t,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:n,asynchronous:e._asynchronous}),a=Xl.createModelTextureReader({textureInfo:t}),c=e._textureLoaders.length;e._textureLoaders.push(s);let d=s.load().catch(u=>{if(!e.isDestroyed()){if(!e._incrementallyLoadTextures)throw u;e._textureState=Xo.FAILED,e._textureErrors.push(u)}});return e._texturesPromises.push(d),e._textureCallbacks[c]=()=>{a.texture=s.texture,l(i)&&(a.texture.sampler=i)},a}function JMe(e,t,n){let{diffuseTexture:i,specularGlossinessTexture:o,diffuseFactor:r,specularFactor:s,glossinessFactor:a}=t,c=new CMe;return l(i)&&(c.diffuseTexture=Oc(e,i,n)),l(o)&&(c.specularGlossinessTexture=Oc(e,o,n)),c.diffuseFactor=pd(se,r),c.specularFactor=pd(h,s),c.glossinessFactor=a,c}function QMe(e,t,n){let{baseColorTexture:i,metallicRoughnessTexture:o,baseColorFactor:r,metallicFactor:s,roughnessFactor:a}=t,c=new SMe;return l(i)&&(c.baseColorTexture=Oc(e,i,n)),l(o)&&(c.metallicRoughnessTexture=Oc(e,o,n)),c.baseColorFactor=pd(se,r),c.metallicFactor=s,c.roughnessFactor=a,c}function jMe(e,t,n){let{specularFactor:i,specularTexture:o,specularColorFactor:r,specularColorTexture:s}=t,a=new VMe;return l(o)&&(a.specularTexture=Oc(e,o,n)),l(s)&&(a.specularColorTexture=Oc(e,s,n)),a.specularFactor=i,a.specularColorFactor=pd(h,r),a}function qMe(e,t,n){let{anisotropyStrength:i=_H.DEFAULT_ANISOTROPY_STRENGTH,anisotropyRotation:o=_H.DEFAULT_ANISOTROPY_ROTATION,anisotropyTexture:r}=t,s=new _H;return l(r)&&(s.anisotropyTexture=Oc(e,r,n)),s.anisotropyStrength=i,s.anisotropyRotation=o,s}function $Me(e,t,n){let{clearcoatFactor:i=TH.DEFAULT_CLEARCOAT_FACTOR,clearcoatTexture:o,clearcoatRoughnessFactor:r=TH.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,clearcoatRoughnessTexture:s,clearcoatNormalTexture:a}=t,c=new TH;return l(o)&&(c.clearcoatTexture=Oc(e,o,n)),l(s)&&(c.clearcoatRoughnessTexture=Oc(e,s,n)),l(a)&&(c.clearcoatNormalTexture=Oc(e,a,n)),c.clearcoatFactor=i,c.clearcoatRoughnessFactor=r,c}function eNe(e,t,n){let i=new LMe,o=y(t.extensions,y.EMPTY_OBJECT),r=o.KHR_materials_pbrSpecularGlossiness,s=o.KHR_materials_specular,a=o.KHR_materials_anisotropy,c=o.KHR_materials_clearcoat,d=t.pbrMetallicRoughness;return i.unlit=l(o.KHR_materials_unlit),l(r)?i.specularGlossiness=JMe(e,r,n):(l(d)&&(i.metallicRoughness=QMe(e,d,n)),l(s)&&!i.unlit&&(i.specular=jMe(e,s,n)),l(a)&&!i.unlit&&(i.anisotropy=qMe(e,a,n)),l(c)&&!i.unlit&&(i.clearcoat=$Me(e,c,n))),l(t.emissiveTexture)&&(i.emissiveTexture=Oc(e,t.emissiveTexture,n)),l(t.normalTexture)&&!e._loadForClassification&&(i.normalTexture=Oc(e,t.normalTexture,n)),l(t.occlusionTexture)&&(i.occlusionTexture=Oc(e,t.occlusionTexture,n)),i.emissiveFactor=pd(h,t.emissiveFactor),i.alphaMode=t.alphaMode,i.alphaCutoff=t.alphaCutoff,i.doubleSided=t.doubleSided,i}function nre(e,t){let n=new Joe;return n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.propertyTableId=e.propertyTable,n.setIndex=e.attribute,n.label=e.label,n.positionalLabel=t,n}function ire(e,t,n,i){let o=new Joe,r=e.featureIds;return o.featureCount=n,o.propertyTableId=t,o.setIndex=$oe(r.attribute),o.positionalLabel=i,o}function ore(e,t){let n=new joe;return n.propertyTableId=e.propertyTable,n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.label=e.label,n.positionalLabel=t,n.offset=0,n.repeat=1,n}function rre(e,t,n,i){let o=new joe,r=e.featureIds;o.propertyTableId=t,o.featureCount=n,o.offset=y(r.constant,0);let s=y(r.divisor,0);return o.repeat=s===0?void 0:s,o.positionalLabel=i,o}function tNe(e,t,n,i){let o=new Qoe;o.featureCount=t.featureCount,o.nullFeatureId=t.nullFeatureId,o.propertyTableId=t.propertyTable,o.label=t.label,o.positionalLabel=i;let r=t.texture;o.textureReader=Oc(e,r,n,rn.NEAREST);let a=(l(r.channels)?r.channels:[0]).map(function(c){return"rgba".charAt(c)}).join("");return o.textureReader.channels=a,o}function nNe(e,t,n,i,o,r){let s=new Qoe,a=t.featureIds,c=a.texture;return s.featureCount=o,s.propertyTableId=n,s.textureReader=Oc(e,c,i,rn.NEAREST),s.textureReader.channels=a.channels,s.positionalLabel=r,s}function iNe(e,t,n,i,o){let r=new aMe,s=void 0,a=!1;for(let c in t){if(!t.hasOwnProperty(c))continue;let d=t[c],u=SH(e,Tt,c),m=tre(e,d,u,s,a,n,o);r.attributes.push(m.attribute),i.attributePlans.push(m)}return r}function oNe(e,t,n,i){let o=new cMe,r=new r_(o);e._primitiveLoadPlans.push(r);let s=t.material;l(s)&&(o.material=eNe(e,e.gltfJson.materials[s],i));let a=y(t.extensions,y.EMPTY_OBJECT),c=!1,d=a.CESIUM_primitive_outline;e._loadPrimitiveOutline&&l(d)&&(c=!0,r.needsOutlines=!0,r.outlineIndices=rNe(e,d,r));let u=e._loadForClassification,m=a.KHR_draco_mesh_compression,p=!1,g=t.attributes;if(l(g))for(let G in g){if(!g.hasOwnProperty(G))continue;let X=g[G],v=SH(e,Tt,G),P=v.modelSemantic;if(u&&!YMe(P))continue;P===Tt.FEATURE_ID&&(p=!0);let F=tre(e,X,v,m,n,c,i);r.attributePlans.push(F),o.attributes.push(F.attribute)}let f=t.targets;if(l(f)&&!u)for(let G=0;Gn[s]);let r=t.inverseBindMatrices;if(l(r)){let s=e.gltfJson.accessors[r];i.inverseBindMatrices=d5(e,s)}else i.inverseBindMatrices=new Array(o.length).fill(M.IDENTITY);return i}function bNe(e,t){let n=e.gltfJson.skins;if(e._loadForClassification||!l(n))return[];let i=n.map(function(r,s){let a=pNe(e,r,t);return a.index=s,a}),o=e.gltfJson.nodes;for(let r=0;r0&&(i|=n.COLOR_BUFFER_BIT),l(this._colorFramebuffer.depthStencilTexture)&&(i|=n.DEPTH_BUFFER_BIT|(t?n.STENCIL_BUFFER_BIT:0)),n.blitFramebuffer(0,0,this._width,this._height,0,0,this._width,this._height,i,n.NEAREST),n.bindFramebuffer(n.READ_FRAMEBUFFER,null),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null)};RC.prototype.isDestroyed=function(){return!1};RC.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),me(this)};var DX=RC;var Efn=T(S(),1);var Sfn=T(S(),1);var Pl={RGBA4:ne.RGBA4,RGBA8:ne.RGBA8,RGBA16F:ne.RGBA16F,RGBA32F:ne.RGBA32F,RGB5_A1:ne.RGB5_A1,RGB565:ne.RGB565,DEPTH_COMPONENT16:ne.DEPTH_COMPONENT16,STENCIL_INDEX8:ne.STENCIL_INDEX8,DEPTH_STENCIL:ne.DEPTH_STENCIL,DEPTH24_STENCIL8:ne.DEPTH24_STENCIL8,validate:function(e){return e===Pl.RGBA4||e===Pl.RGBA8||e===Pl.RGBA16F||e===Pl.RGBA32F||e===Pl.RGB5_A1||e===Pl.RGB565||e===Pl.DEPTH_COMPONENT16||e===Pl.STENCIL_INDEX8||e===Pl.DEPTH_STENCIL||e===Pl.DEPTH24_STENCIL8},getColorFormat:function(e){return e===ne.FLOAT?Pl.RGBA32F:e===ne.HALF_FLOAT_OES?Pl.RGBA16F:Pl.RGBA8}},Hc=Object.freeze(Pl);function BX(e){e=y(e,y.EMPTY_OBJECT);let n=e.context._gl,i=Mt.maximumRenderbufferSize,o=y(e.format,Hc.RGBA4),r=l(e.width)?e.width:n.drawingBufferWidth,s=l(e.height)?e.height:n.drawingBufferHeight,a=y(e.numSamples,1);this._gl=n,this._format=o,this._width=r,this._height=s,this._renderbuffer=this._gl.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,this._renderbuffer),a>1?n.renderbufferStorageMultisample(n.RENDERBUFFER,a,o,r,s):n.renderbufferStorage(n.RENDERBUFFER,o,r,s),n.bindRenderbuffer(n.RENDERBUFFER,null)}Object.defineProperties(BX.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});BX.prototype._getRenderbuffer=function(){return this._renderbuffer};BX.prototype.isDestroyed=function(){return!1};BX.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),me(this)};var bd=BX;function fs(e){e=y(e,y.EMPTY_OBJECT),this._numSamples=y(e.numSamples,1),this._colorAttachmentsLength=y(e.colorAttachmentsLength,1),this._color=y(e.color,!0),this._depth=y(e.depth,!1),this._depthStencil=y(e.depthStencil,!1),this._supportsDepthTexture=y(e.supportsDepthTexture,!1),this._createColorAttachments=y(e.createColorAttachments,!0),this._createDepthAttachments=y(e.createDepthAttachments,!0),this._pixelDatatype=e.pixelDatatype,this._pixelFormat=e.pixelFormat,this._width=void 0,this._height=void 0,this._framebuffer=void 0,this._multisampleFramebuffer=void 0,this._colorTextures=void 0,this._color&&(this._colorTextures=new Array(this._colorAttachmentsLength),this._colorRenderbuffers=new Array(this._colorAttachmentsLength)),this._colorRenderbuffer=void 0,this._depthStencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthRenderbuffer=void 0,this._depthTexture=void 0,this._attachmentsDirty=!1}Object.defineProperties(fs.prototype,{framebuffer:{get:function(){return this._numSamples>1?this._multisampleFramebuffer.getRenderFramebuffer():this._framebuffer}},numSamples:{get:function(){return this._numSamples}},status:{get:function(){return this.framebuffer.status}}});fs.prototype.isDirty=function(e,t,n,i,o){n=y(n,1);let r=this._width!==e||this._height!==t,s=this._numSamples!==n,a=l(i)&&this._pixelDatatype!==i||l(o)&&this._pixelFormat!==o,c=n===1?l(this._framebuffer):l(this._multisampleFramebuffer);return this._attachmentsDirty||r||s||a||!c||this._color&&!l(this._colorTextures[0])};fs.prototype.update=function(e,t,n,i,o,r){if(i=e.msaa?y(i,1):1,o=y(o,this._color?y(this._pixelDatatype,ze.UNSIGNED_BYTE):void 0),r=y(r,this._color?y(this._pixelFormat,at.RGBA):void 0),this.isDirty(t,n,i,o,r)){if(this.destroy(),this._width=t,this._height=n,this._numSamples=i,this._pixelDatatype=o,this._pixelFormat=r,this._attachmentsDirty=!1,this._color&&this._createColorAttachments){for(let s=0;s1){let a=Hc.getColorFormat(o);this._colorRenderbuffers[s]=new bd({context:e,width:t,height:n,format:a,numSamples:this._numSamples})}}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new Et({context:e,width:t,height:n,pixelFormat:at.DEPTH_STENCIL,pixelDatatype:ze.UNSIGNED_INT_24_8,sampler:rn.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new bd({context:e,width:t,height:n,format:Hc.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new bd({context:e,width:t,height:n,format:Hc.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new Et({context:e,width:t,height:n,pixelFormat:at.DEPTH_COMPONENT,pixelDatatype:ze.UNSIGNED_INT,sampler:rn.NEAREST}):this._depthRenderbuffer=new bd({context:e,width:t,height:n,format:Hc.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new DX({context:e,width:this._width,height:this._height,colorTextures:this._colorTextures,colorRenderbuffers:this._colorRenderbuffers,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}):this._framebuffer=new ta({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}};fs.prototype.getColorTexture=function(e){return e=y(e,0),this._colorTextures[e]};fs.prototype.setColorTexture=function(e,t){t=y(t,0),this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e};fs.prototype.getColorRenderbuffer=function(e){return e=y(e,0),this._colorRenderbuffers[e]};fs.prototype.setColorRenderbuffer=function(e,t){t=y(t,0),this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e};fs.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer};fs.prototype.setDepthRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e};fs.prototype.getDepthTexture=function(){return this._depthTexture};fs.prototype.setDepthTexture=function(e){this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e};fs.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer};fs.prototype.setDepthStencilRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e};fs.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture};fs.prototype.setDepthStencilTexture=function(e){this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e};fs.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)};fs.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,n),t.framebuffer=i};fs.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()};fs.prototype.destroy=function(){if(this._color){let e,t=this._colorTextures.length;for(e=0;eCC.equals(t,e))};Kr.prototype.remove=function(e){let t=this._polygons,n=t.findIndex(i=>CC.equals(i,e));return n===-1?!1:(t.splice(n,1),this.polygonRemoved.raiseEvent(e,n),!0)};var yAe=new ce;function xAe(e){let t=[],n=[],i=e.length;for(let r=0;rce.union(e[_].computeSphericalExtents(yAe),x,x),a),t[p]=void 0,n[p]=void 0,c=Math.max(a.height*2.5,.001),d=Math.max(a.width*2.5,.001),u=ce.clone(a,u),u.south-=c,u.west-=d,u.north+=c,u.east+=d,u.south=Math.max(u.south,-Math.PI),u.west=Math.max(u.west,-Math.PI),u.north=Math.min(u.north,Math.PI),u.east=Math.min(u.east,Math.PI),p=-1}}t.push(u),n.push(m)}let o=new Map;return n.filter(l).forEach((r,s)=>r.forEach(a=>o.set(a,s))),{extentsList:t.filter(l),extentsIndexByPolygon:o}}Kr.prototype.removeAll=function(){let e=this._polygons,t=e.length;for(let n=0;ns+a.length,0);if(n===this.totalPositions||(this._totalPositions=n,this.length===0))return;l(this._signedDistanceComputeCommand)&&(this._signedDistanceComputeCommand.canceled=!0,this._signedDistanceComputeCommand=void 0);let i=this._polygonsTexture,o=this._extentsTexture,r=this._signedDistanceTexture;if(l(i)){let s=i.width*i.height;(s{e._signedDistanceComputeCommand=void 0}})}var Yoe=new ce,TAe=new ce;Kr.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._polygons,i=n.length,o=Ht.OUTSIDE;this.inverse&&(o=Ht.INSIDE);for(let r=0;r=r;)C=o[C-r];o.push(C),s[x]=_}_>OAe&&(t instanceof Uint16Array||t instanceof Uint8Array)?t=new Uint32Array(t):_>zAe&&t instanceof Uint8Array&&(t=new Uint16Array(t)),x===c?(c=_,t[a]=_):x===d?(d=_,t[a+1]=_):(u=_,t[a+2]=_),x=Hoe(i,c,d,u,p,g,f)}}e._triangleIndices=t,e._outlineCoordinatesTypedArray=new Float32Array(i)}function Hoe(e,t,n,i,o,r,s){let a=s?1:0,c=o?1:0,d=0,u=xz(e,t,a,c,d);if(u===0)return t;let m=0,p=o?1:0,g=r?1:0,f=xz(e,n,m,p,g);if(f===0)return n;let x=s?1:0,_=0,C=r?1:0,V=xz(e,i,x,_,C);if(V===0)return i;let Z=u&f&V,R,G,W;if(Z&1)R=0,G=1,W=2;else if(Z&2)R=0,W=1,G=2;else if(Z&4)G=0,R=1,W=2;else if(Z&8)G=0,W=1,R=2;else if(Z&16)W=0,R=1,G=2;else if(Z&32)W=0,G=1,R=2;else{let M=_z(u),b=_z(f),L=_z(V);return M>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}c5.prototype.updateAttribute=function(e){let t=this._extraVertices,n=e.length,i=n/this._originalVertexCount,o=t.length,r=e.constructor,s=new r(e.length+o*i);s.set(e);for(let a=0;a1;)i>>=1,r.push(Joe(i));let s=new Et({context:e,source:{arrayBufferView:o,mipLevels:r},width:n,height:1,pixelFormat:at.LUMINANCE,sampler:new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.LINEAR_MIPMAP_LINEAR,magnificationFilter:di.LINEAR})});return t.outlineTexture=s,s};function Joe(e){let t=new Uint8Array(e);return t[e-1]=192,e===8?t[e-1]=96:e===4?t[e-1]=48:e===2?t[e-1]=24:e===1&&(t[e-1]=12),t}function Qoe(e,t){this._originalVertexCount=t,this._edges=new Set;for(let n=0;n{this._resourcesLoaded=!0}).catch(o=>{this._processError=o})),l(this._processError)){this._state=Wo.FAILED;let o=this._processError;this._processError=void 0,d5(this,o)}let t=this._textureErrors.pop();if(l(t)){let o=this.getError("Failed to load glTF texture",t);throw o.name="TextureError",o}if(this._state===Wo.FAILED)return!1;let n=!1;try{n=this._process(e)}catch(o){this._state=Wo.FAILED,d5(this,o)}let i=!1;try{i=this._processTextures(e)}catch(o){this._textureState=Wo.FAILED,d5(this,o)}return this._incrementallyLoadTextures?n:n&&i};function RMe(e,t,n,i,o,r,s){let a=e.gltfJson,d=a.accessors[t].bufferView;return Ui.getVertexBufferLoader({gltf:a,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:s,bufferViewId:d,draco:i,attributeSemantic:n,accessorId:t,asynchronous:e._asynchronous,loadBuffer:o,loadTypedArray:r})}function GMe(e,t,n,i,o,r){return Ui.getIndexBufferLoader({gltf:e.gltfJson,accessorId:t,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:r,draco:n,asynchronous:e._asynchronous,loadBuffer:i,loadTypedArray:o})}function EMe(e,t){let n=Ui.getBufferViewLoader({gltf:e.gltfJson,bufferViewId:t,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoaders.push(n),n}function tre(e,t,n){let i=t.byteOffset,o=Gl(e,t),r=t.count,s=hd(t.type),a=t.componentType,c=Q.getSizeInBytes(a),d=c*s,u=r*s;if(o===d)return n=new Uint8Array(n),Q.createArrayBufferView(a,n.buffer,n.byteOffset+i,u);let m=Q.createTypedArray(a,u),p=new DataView(n.buffer),g=new Array(s),f=Mp(t.componentType);i=n.byteOffset+i;for(let x=0;x{l(i)&&l(i.attributes)&&l(i.attributes[u])?kMe(x,_,o,r):DMe(a,c,x,_,o,r)},x}function ore(e,t,n,i,o,r,s){let a=n.modelSemantic,c=a===St.POSITION,d=a===St.FEATURE_ID,u=c&&!o&&e._loadAttributesFor2D&&!s.scene3DOnly,m=c&&e._enablePick&&!s.context.webgl2,p=e._loadForClassification&&d,g=e._loadAttributesAsTypedArray,f=!g,x=g||u||m||p,V=ire(e,t,n,i,r?!1:f,r?!0:x,s),Z=new o_.AttributeLoadPlan(V);return Z.loadBuffer=f,Z.loadTypedArray=x,Z}function BMe(e,t,n,i,o){let r=e.gltfJson.accessors,s=l(n.ROTATION),a=l(n.TRANSLATION)&&l(r[n.TRANSLATION].min)&&l(r[n.TRANSLATION].max),c=Cz(e,Hr,i),d=c.modelSemantic,u=d===Hr.TRANSLATION||d===Hr.ROTATION||d===Hr.SCALE,m=d===Hr.TRANSLATION,p=e._loadAttributesAsTypedArray||s&&u||!o.context.instancedArrays,g=e._enablePick&&!o.context.webgl2,f=!p,x=e._loadAttributesFor2D&&!o.scene3DOnly;return ire(e,t,c,void 0,f,p||m&&(!a||x||g),o)}function YMe(e,t,n,i,o,r){let s=e.gltfJson.accessors[t],a=s.bufferView;if(!l(n)&&!l(a))return;let c=new nMe;c.count=s.count;let d=e._loadAttributesAsTypedArray,u=(e._loadIndicesForWireframe||e._enablePick)&&!r.context.webgl2,m=e._loadForClassification&&i,g=!d,f=d||u||m,C=GMe(e,t,n,o?!1:g,o?!0:f,r),V=e._geometryLoaders.length;e._geometryLoaders.push(C);let Z=C.load();e._loaderPromises.push(Z),e._geometryCallbacks[V]=()=>{c.indexDatatype=C.indexDatatype,c.buffer=C.buffer,c.typedArray=C.typedArray};let R=new o_.IndicesLoadPlan(c);return R.loadBuffer=g,R.loadTypedArray=f,R}function Yc(e,t,n,i){let o=e.gltfJson,r=El.getImageIdFromTexture({gltf:o,textureId:t.index,supportedImageFormats:e._supportedImageFormats});if(!l(r))return;let s=Ui.getTextureLoader({gltf:o,textureInfo:t,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:n,asynchronous:e._asynchronous}),a=El.createModelTextureReader({textureInfo:t}),c=e._textureLoaders.length;e._textureLoaders.push(s);let d=s.load().catch(u=>{if(!e.isDestroyed()){if(!e._incrementallyLoadTextures)throw u;e._textureState=Wo.FAILED,e._textureErrors.push(u)}});return e._texturesPromises.push(d),e._textureCallbacks[c]=()=>{a.texture=s.texture,l(i)&&(a.texture.sampler=i)},a}function OMe(e,t,n){let{diffuseTexture:i,specularGlossinessTexture:o,diffuseFactor:r,specularFactor:s,glossinessFactor:a}=t,c=new xMe;return l(i)&&(c.diffuseTexture=Yc(e,i,n)),l(o)&&(c.specularGlossinessTexture=Yc(e,o,n)),c.diffuseFactor=fd(se,r),c.specularFactor=fd(h,s),c.glossinessFactor=a,c}function zMe(e,t,n){let{baseColorTexture:i,metallicRoughnessTexture:o,baseColorFactor:r,metallicFactor:s,roughnessFactor:a}=t,c=new yMe;return l(i)&&(c.baseColorTexture=Yc(e,i,n)),l(o)&&(c.metallicRoughnessTexture=Yc(e,o,n)),c.baseColorFactor=fd(se,r),c.metallicFactor=s,c.roughnessFactor=a,c}function KMe(e,t,n){let{specularFactor:i,specularTexture:o,specularColorFactor:r,specularColorTexture:s}=t,a=new _Me;return l(o)&&(a.specularTexture=Yc(e,o,n)),l(s)&&(a.specularColorTexture=Yc(e,s,n)),a.specularFactor=i,a.specularColorFactor=fd(h,r),a}function HMe(e,t,n){let{anisotropyStrength:i=Sz.DEFAULT_ANISOTROPY_STRENGTH,anisotropyRotation:o=Sz.DEFAULT_ANISOTROPY_ROTATION,anisotropyTexture:r}=t,s=new Sz;return l(r)&&(s.anisotropyTexture=Yc(e,r,n)),s.anisotropyStrength=i,s.anisotropyRotation=o,s}function JMe(e,t,n){let{clearcoatFactor:i=Tz.DEFAULT_CLEARCOAT_FACTOR,clearcoatTexture:o,clearcoatRoughnessFactor:r=Tz.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,clearcoatRoughnessTexture:s,clearcoatNormalTexture:a}=t,c=new Tz;return l(o)&&(c.clearcoatTexture=Yc(e,o,n)),l(s)&&(c.clearcoatRoughnessTexture=Yc(e,s,n)),l(a)&&(c.clearcoatNormalTexture=Yc(e,a,n)),c.clearcoatFactor=i,c.clearcoatRoughnessFactor=r,c}function QMe(e,t,n){let i=new SMe,o=y(t.extensions,y.EMPTY_OBJECT),r=o.KHR_materials_pbrSpecularGlossiness,s=o.KHR_materials_specular,a=o.KHR_materials_anisotropy,c=o.KHR_materials_clearcoat,d=t.pbrMetallicRoughness;return i.unlit=l(o.KHR_materials_unlit),l(r)?i.specularGlossiness=OMe(e,r,n):(l(d)&&(i.metallicRoughness=zMe(e,d,n)),l(s)&&!i.unlit&&(i.specular=KMe(e,s,n)),l(a)&&!i.unlit&&(i.anisotropy=HMe(e,a,n)),l(c)&&!i.unlit&&(i.clearcoat=JMe(e,c,n))),l(t.emissiveTexture)&&(i.emissiveTexture=Yc(e,t.emissiveTexture,n)),l(t.normalTexture)&&!e._loadForClassification&&(i.normalTexture=Yc(e,t.normalTexture,n)),l(t.occlusionTexture)&&(i.occlusionTexture=Yc(e,t.occlusionTexture,n)),i.emissiveFactor=fd(h,t.emissiveFactor),i.alphaMode=t.alphaMode,i.alphaCutoff=t.alphaCutoff,i.doubleSided=t.doubleSided,i}function rre(e,t){let n=new qoe;return n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.propertyTableId=e.propertyTable,n.setIndex=e.attribute,n.label=e.label,n.positionalLabel=t,n}function sre(e,t,n,i){let o=new qoe,r=e.featureIds;return o.featureCount=n,o.propertyTableId=t,o.setIndex=nre(r.attribute),o.positionalLabel=i,o}function are(e,t){let n=new ere;return n.propertyTableId=e.propertyTable,n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.label=e.label,n.positionalLabel=t,n.offset=0,n.repeat=1,n}function cre(e,t,n,i){let o=new ere,r=e.featureIds;o.propertyTableId=t,o.featureCount=n,o.offset=y(r.constant,0);let s=y(r.divisor,0);return o.repeat=s===0?void 0:s,o.positionalLabel=i,o}function jMe(e,t,n,i){let o=new $oe;o.featureCount=t.featureCount,o.nullFeatureId=t.nullFeatureId,o.propertyTableId=t.propertyTable,o.label=t.label,o.positionalLabel=i;let r=t.texture;o.textureReader=Yc(e,r,n,rn.NEAREST);let a=(l(r.channels)?r.channels:[0]).map(function(c){return"rgba".charAt(c)}).join("");return o.textureReader.channels=a,o}function qMe(e,t,n,i,o,r){let s=new $oe,a=t.featureIds,c=a.texture;return s.featureCount=o,s.propertyTableId=n,s.textureReader=Yc(e,c,i,rn.NEAREST),s.textureReader.channels=a.channels,s.positionalLabel=r,s}function $Me(e,t,n,i,o){let r=new iMe,s=void 0,a=!1;for(let c in t){if(!t.hasOwnProperty(c))continue;let d=t[c],u=Cz(e,St,c),m=ore(e,d,u,s,a,n,o);r.attributes.push(m.attribute),i.attributePlans.push(m)}return r}function eNe(e,t,n,i){let o=new oMe,r=new o_(o);e._primitiveLoadPlans.push(r);let s=t.material;l(s)&&(o.material=QMe(e,e.gltfJson.materials[s],i));let a=y(t.extensions,y.EMPTY_OBJECT),c=!1,d=a.CESIUM_primitive_outline;e._loadPrimitiveOutline&&l(d)&&(c=!0,r.needsOutlines=!0,r.outlineIndices=tNe(e,d,r));let u=e._loadForClassification,m=a.KHR_draco_mesh_compression,p=!1,g=t.attributes;if(l(g))for(let G in g){if(!g.hasOwnProperty(G))continue;let W=g[G],v=Cz(e,St,G),P=v.modelSemantic;if(u&&!UMe(P))continue;P===St.FEATURE_ID&&(p=!0);let F=ore(e,W,v,m,n,c,i);r.attributePlans.push(F),o.attributes.push(F.attribute)}let f=t.targets;if(l(f)&&!u)for(let G=0;Gn[s]);let r=t.inverseBindMatrices;if(l(r)){let s=e.gltfJson.accessors[r];i.inverseBindMatrices=u5(e,s)}else i.inverseBindMatrices=new Array(o.length).fill(A.IDENTITY);return i}function mNe(e,t){let n=e.gltfJson.skins;if(e._loadForClassification||!l(n))return[];let i=n.map(function(r,s){let a=uNe(e,r,t);return a.index=s,a}),o=e.gltfJson.nodes;for(let r=0;r0&&(i|=n.COLOR_BUFFER_BIT),l(this._colorFramebuffer.depthStencilTexture)&&(i|=n.DEPTH_BUFFER_BIT|(t?n.STENCIL_BUFFER_BIT:0)),n.blitFramebuffer(0,0,this._width,this._height,0,0,this._width,this._height,i,n.NEAREST),n.bindFramebuffer(n.READ_FRAMEBUFFER,null),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null)};ZC.prototype.isDestroyed=function(){return!1};ZC.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),me(this)};var DW=ZC;var Vfn=S(T(),1);var gfn=S(T(),1);var Xl={RGBA4:ie.RGBA4,RGBA8:ie.RGBA8,RGBA16F:ie.RGBA16F,RGBA32F:ie.RGBA32F,RGB5_A1:ie.RGB5_A1,RGB565:ie.RGB565,DEPTH_COMPONENT16:ie.DEPTH_COMPONENT16,STENCIL_INDEX8:ie.STENCIL_INDEX8,DEPTH_STENCIL:ie.DEPTH_STENCIL,DEPTH24_STENCIL8:ie.DEPTH24_STENCIL8,validate:function(e){return e===Xl.RGBA4||e===Xl.RGBA8||e===Xl.RGBA16F||e===Xl.RGBA32F||e===Xl.RGB5_A1||e===Xl.RGB565||e===Xl.DEPTH_COMPONENT16||e===Xl.STENCIL_INDEX8||e===Xl.DEPTH_STENCIL||e===Xl.DEPTH24_STENCIL8},getColorFormat:function(e){return e===ie.FLOAT?Xl.RGBA32F:e===ie.HALF_FLOAT_OES?Xl.RGBA16F:Xl.RGBA8}},Oc=Object.freeze(Xl);function BW(e){e=y(e,y.EMPTY_OBJECT);let n=e.context._gl,i=Mt.maximumRenderbufferSize,o=y(e.format,Oc.RGBA4),r=l(e.width)?e.width:n.drawingBufferWidth,s=l(e.height)?e.height:n.drawingBufferHeight,a=y(e.numSamples,1);this._gl=n,this._format=o,this._width=r,this._height=s,this._renderbuffer=this._gl.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,this._renderbuffer),a>1?n.renderbufferStorageMultisample(n.RENDERBUFFER,a,o,r,s):n.renderbufferStorage(n.RENDERBUFFER,o,r,s),n.bindRenderbuffer(n.RENDERBUFFER,null)}Object.defineProperties(BW.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});BW.prototype._getRenderbuffer=function(){return this._renderbuffer};BW.prototype.isDestroyed=function(){return!1};BW.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),me(this)};var pd=BW;function bs(e){e=y(e,y.EMPTY_OBJECT),this._numSamples=y(e.numSamples,1),this._colorAttachmentsLength=y(e.colorAttachmentsLength,1),this._color=y(e.color,!0),this._depth=y(e.depth,!1),this._depthStencil=y(e.depthStencil,!1),this._supportsDepthTexture=y(e.supportsDepthTexture,!1),this._createColorAttachments=y(e.createColorAttachments,!0),this._createDepthAttachments=y(e.createDepthAttachments,!0),this._pixelDatatype=e.pixelDatatype,this._pixelFormat=e.pixelFormat,this._width=void 0,this._height=void 0,this._framebuffer=void 0,this._multisampleFramebuffer=void 0,this._colorTextures=void 0,this._color&&(this._colorTextures=new Array(this._colorAttachmentsLength),this._colorRenderbuffers=new Array(this._colorAttachmentsLength)),this._colorRenderbuffer=void 0,this._depthStencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthRenderbuffer=void 0,this._depthTexture=void 0,this._attachmentsDirty=!1}Object.defineProperties(bs.prototype,{framebuffer:{get:function(){return this._numSamples>1?this._multisampleFramebuffer.getRenderFramebuffer():this._framebuffer}},numSamples:{get:function(){return this._numSamples}},status:{get:function(){return this.framebuffer.status}}});bs.prototype.isDirty=function(e,t,n,i,o){n=y(n,1);let r=this._width!==e||this._height!==t,s=this._numSamples!==n,a=l(i)&&this._pixelDatatype!==i||l(o)&&this._pixelFormat!==o,c=n===1?l(this._framebuffer):l(this._multisampleFramebuffer);return this._attachmentsDirty||r||s||a||!c||this._color&&!l(this._colorTextures[0])};bs.prototype.update=function(e,t,n,i,o,r){if(i=e.msaa?y(i,1):1,o=y(o,this._color?y(this._pixelDatatype,Ke.UNSIGNED_BYTE):void 0),r=y(r,this._color?y(this._pixelFormat,at.RGBA):void 0),this.isDirty(t,n,i,o,r)){if(this.destroy(),this._width=t,this._height=n,this._numSamples=i,this._pixelDatatype=o,this._pixelFormat=r,this._attachmentsDirty=!1,this._color&&this._createColorAttachments){for(let s=0;s1){let a=Oc.getColorFormat(o);this._colorRenderbuffers[s]=new pd({context:e,width:t,height:n,format:a,numSamples:this._numSamples})}}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new Et({context:e,width:t,height:n,pixelFormat:at.DEPTH_STENCIL,pixelDatatype:Ke.UNSIGNED_INT_24_8,sampler:rn.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new pd({context:e,width:t,height:n,format:Oc.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new pd({context:e,width:t,height:n,format:Oc.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new Et({context:e,width:t,height:n,pixelFormat:at.DEPTH_COMPONENT,pixelDatatype:Ke.UNSIGNED_INT,sampler:rn.NEAREST}):this._depthRenderbuffer=new pd({context:e,width:t,height:n,format:Oc.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new DW({context:e,width:this._width,height:this._height,colorTextures:this._colorTextures,colorRenderbuffers:this._colorRenderbuffers,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}):this._framebuffer=new na({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}};bs.prototype.getColorTexture=function(e){return e=y(e,0),this._colorTextures[e]};bs.prototype.setColorTexture=function(e,t){t=y(t,0),this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e};bs.prototype.getColorRenderbuffer=function(e){return e=y(e,0),this._colorRenderbuffers[e]};bs.prototype.setColorRenderbuffer=function(e,t){t=y(t,0),this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e};bs.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer};bs.prototype.setDepthRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e};bs.prototype.getDepthTexture=function(){return this._depthTexture};bs.prototype.setDepthTexture=function(e){this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e};bs.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer};bs.prototype.setDepthStencilRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e};bs.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture};bs.prototype.setDepthStencilTexture=function(e){this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e};bs.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)};bs.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,n),t.framebuffer=i};bs.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()};bs.prototype.destroy=function(){if(this._color){let e,t=this._colorTextures.length;for(e=0;e=s.clientWidth)d=!0;else{if(L.x>s.clientWidth*.5){a.width=L.x,c.frustum.right=p.x-C,cc=OX(r,n,c,cc),Ga.clipToGLWindowCoordinates(a,cc,LH),a.x+=L.x,c.position.x=-c.position.x;let Z=c.frustum.right;c.frustum.right=-c.frustum.left,c.frustum.left=-Z,cc=OX(r,n,c,cc),Ga.clipToGLWindowCoordinates(a,cc,RH)}else{a.x+=L.x,a.width-=L.x,c.frustum.left=-p.x-C,cc=OX(r,n,c,cc),Ga.clipToGLWindowCoordinates(a,cc,LH),a.x=a.x-a.width,c.position.x=-c.position.x;let Z=c.frustum.left;c.frustum.left=-c.frustum.right,c.frustum.right=-Z,cc=OX(r,n,c,cc),Ga.clipToGLWindowCoordinates(a,cc,RH)}h.clone(g,c.position),c.frustum=f.clone(),i=D.clone(LH,i),(i.x<0||i.x>s.clientWidth)&&(i.x=RH.x)}}if(o.mode!==oe.SCENE2D||d){if(cc=OX(r,n,c,cc),cc.z<0&&!(c.frustum instanceof sn)&&!(c.frustum instanceof Cr))return;i=Ga.clipToGLWindowCoordinates(a,cc,i)}return i.y=s.clientHeight-i.y,i};Ga.wgs84ToDrawingBufferCoordinates=function(e,t,n){if(n=Ga.wgs84ToWindowCoordinates(e,t,n),!!l(n))return Ga.transformWindowToDrawingBuffer(e,n,n)};var Op=new h,BNe=new he;Ga.computeActualWgs84Position=function(e,t,n){let i=e.mode;if(i===oe.SCENE3D)return h.clone(t,n);let o=e.mapProjection,r=o.ellipsoid.cartesianToCartographic(t,BNe);if(!l(r))return;if(o.project(r,Op),i===oe.COLUMBUS_VIEW)return h.fromElements(Op.z,Op.x,Op.y,n);if(i===oe.SCENE2D)return h.fromElements(0,Op.x,Op.y,n);let s=e.morphTime;return h.fromElements(W.lerp(Op.z,t.x,s),W.lerp(Op.x,t.y,s),W.lerp(Op.y,t.z,s),n)};var ure=new h,mre=new h,hre=new M;Ga.clipToGLWindowCoordinates=function(e,t,n){return h.divideByScalar(t,t.w,ure),M.computeViewportTransformation(e,0,1,hre),M.multiplyByPoint(hre,ure,mre),D.fromCartesian3(mre,n)};Ga.transformWindowToDrawingBuffer=function(e,t,n){let i=e.canvas,o=e.drawingBufferWidth/i.clientWidth,r=e.drawingBufferHeight/i.clientHeight;return D.fromElements(t.x*o,t.y*r,n)};var YNe=new se,fre=new se;Ga.drawingBufferToWgs84Coordinates=function(e,t,n,i){let r=e.context.uniformState,s=r.currentFrustum,a=s.x,c=s.y;if(e.frameState.useLogDepth){let g=n*r.log2FarDepthFromNearPlusOne,f=Math.pow(2,g)-1;n=c*(1-a/(f+a))/(c-a)}let d=e.view.passState.viewport,u=se.clone(se.UNIT_W,YNe);u.x=(t.x-d.x)/d.width*2-1,u.y=(t.y-d.y)/d.height*2-1,u.z=n*2-1,u.w=1;let m,p=e.camera.frustum;if(l(p.fovy)){m=M.multiplyByVector(r.inverseViewProjection,u,fre);let g=1/m.w;h.multiplyByScalar(m,g,m)}else{let g=p.offCenterFrustum;l(g)&&(p=g),m=fre,m.x=(u.x*(p.right-p.left)+p.left+p.right)*.5,m.y=(u.y*(p.top-p.bottom)+p.bottom+p.top)*.5,m.z=(u.z*(a-c)-a-c)*.5,m.w=1,m=M.multiplyByVector(r.inverseView,m,m)}return h.fromCartesian4(m,i)};var ki=Ga;var Lpn=T(S(),1),ONe={LEFT:-1,NONE:0,RIGHT:1},zc=Object.freeze(ONe);var _0n=T(S(),1);var Ipn=T(S(),1);var GC={};GC._deprecationWarning=Is;var Hp=Uint32Array.BYTES_PER_ELEMENT;GC.parse=function(e,t){let n=y(t,0);t=n;let i=new Uint8Array(e),o=new DataView(e);t+=Hp;let r=o.getUint32(t,!0);if(r!==1)throw new ue(`Only Batched 3D Model version 1 is supported. Version ${r} is not.`);t+=Hp;let s=o.getUint32(t,!0);t+=Hp;let a=o.getUint32(t,!0);t+=Hp;let c=o.getUint32(t,!0);t+=Hp;let d=o.getUint32(t,!0);t+=Hp;let u=o.getUint32(t,!0);t+=Hp;let m;d>=570425344?(t-=Hp*2,m=a,d=c,u=0,a=0,c=0,GC._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel.")):u>=570425344&&(t-=Hp,m=d,d=a,u=c,a=0,c=0,GC._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel."));let p;a===0?p={BATCH_LENGTH:y(m,0)}:(p=Eo(i,t,a),t+=a);let g=new Uint8Array(e,t,c);t+=c;let f,x;d>0&&(f=Eo(i,t,d),t+=d,u>0&&(x=new Uint8Array(e,t,u),x=new Uint8Array(x),t+=u));let _=n+s-t;if(_===0)throw new ue("glTF byte length must be greater than 0.");let C;return t%4===0?C=new Uint8Array(e,t,_):(GC._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),C=new Uint8Array(i.subarray(t,t+_))),{batchLength:m,featureTableJson:p,featureTableBinary:g,batchTableJson:f,batchTableBinary:x,gltf:C}};var HX=GC;var Fpn=T(S(),1);function zX(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function pre(e,t,n,i,o,r){let s=e._cachedTypedArrays,a=s[t];return l(a)||(a=Q.createArrayBufferView(n,e.buffer.buffer,e.buffer.byteOffset+r,o*i),s[t]=a),a}function HNe(e,t,n,i){let o=e._cachedTypedArrays,r=o[t];return l(r)||(r=Q.createTypedArray(n,i),o[t]=r),r}zX.prototype.getGlobalProperty=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(t=y(t,Q.UNSIGNED_INT),n=y(n,1),pre(this,e,t,n,1,i.byteOffset)):i};zX.prototype.hasProperty=function(e){return l(this.json[e])};zX.prototype.getPropertyArray=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(l(i.componentType)&&(t=Q.fromName(i.componentType)),pre(this,e,t,n,this.featuresLength,i.byteOffset)):HNe(this,e,t,i)};zX.prototype.getProperty=function(e,t,n,i,o){let r=this.json[e];if(!l(r))return;let s=this.getPropertyArray(e,t,n);if(n===1)return s[i];for(let a=0;a0&&(f=Eo(i,t,d),t+=d,u>0&&(x=new Uint8Array(e,t,u),x=new Uint8Array(x),t+=u));let _=n+s-t;if(_===0)throw new ue("glTF byte length must be greater than 0.");let C;return t%4===0?C=new Uint8Array(e,t,_):(h5._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),C=new Uint8Array(i.subarray(t,t+_))),{gltfFormat:m,featureTableJson:p,featureTableBinary:g,batchTableJson:f,batchTableBinary:x,gltf:C}};var jX=h5;var Kp={NOT_LOADED:0,LOADING:1,PROCESSING:2,POST_PROCESSING:3,READY:4,FAILED:5,UNLOADED:6},f5=_n.Attribute,h5e=_n.FeatureIdAttribute,Tre=_n.Instances;function Jp(e){e=y(e,y.EMPTY_OBJECT);let t=e.i3dmResource,n=e.arrayBuffer,i=e.baseResource,o=y(e.byteOffset,0),r=y(e.releaseGltfJson,!1),s=y(e.asynchronous,!0),a=y(e.incrementallyLoadTextures,!0),c=y(e.upAxis,Go.Y),d=y(e.forwardAxis,Go.X),u=y(e.loadAttributesAsTypedArray,!1),m=y(e.loadIndicesForWireframe,!1),p=y(e.loadPrimitiveOutline,!0),g=y(e.enablePick,!1);i=l(i)?i:t.clone(),this._i3dmResource=t,this._baseResource=i,this._arrayBuffer=n,this._byteOffset=o,this._releaseGltfJson=r,this._asynchronous=s,this._incrementallyLoadTextures=a,this._upAxis=c,this._forwardAxis=d,this._loadAttributesAsTypedArray=u,this._loadIndicesForWireframe=m,this._loadPrimitiveOutline=p,this._enablePick=g,this._state=Kp.NOT_LOADED,this._promise=void 0,this._gltfLoader=void 0,this._buffers=[],this._components=void 0,this._transform=M.IDENTITY,this._batchTable=void 0,this._featureTable=void 0,this._instancesLength=0}l(Object.create)&&(Jp.prototype=Object.create(eo.prototype),Jp.prototype.constructor=Jp);Object.defineProperties(Jp.prototype,{texturesLoaded:{get:function(){return this._gltfLoader?.texturesLoaded}},cacheKey:{get:function(){}},components:{get:function(){return this._components}}});Jp.prototype.load=function(){if(l(this._promise))return this._promise;let e=jX.parse(this._arrayBuffer,this._byteOffset),t=e.featureTableJson,n=e.featureTableBinary,i=e.batchTableJson,o=e.batchTableBinary,r=e.gltfFormat,s=new Mm(t,n);this._featureTable=s;let a=s.getGlobalProperty("INSTANCES_LENGTH");if(s.featuresLength=a,!l(a))throw new ue("Feature table global property: INSTANCES_LENGTH must be defined");this._instancesLength=a;let c=s.getGlobalProperty("RTC_CENTER",Q.FLOAT,3);l(c)&&(this._transform=M.fromTranslation(h.fromArray(c))),this._batchTable={json:i,binary:o};let d={upAxis:this._upAxis,forwardAxis:this._forwardAxis,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline};if(r===0){let m=Ll(e.gltf);m=m.replace(/[\s\0]+$/,"");let p=this._baseResource.getDerivedResource({url:m});d.gltfResource=p,d.baseResource=p}else d.gltfResource=this._i3dmResource,d.typedArray=e.gltf;let u=new Bp(d);return this._gltfLoader=u,this._state=Kp.LOADING,this._promise=u.load().then(()=>{if(!this.isDestroyed())return this._state=Kp.PROCESSING,this}).catch(m=>{if(!this.isDestroyed())throw f5e(this,m)}),this._promise};function f5e(e,t){return e.unload(),e._state=Kp.FAILED,e.getError("Failed to load i3dm",t)}Jp.prototype.process=function(e){if(this._state===Kp.READY)return!0;let t=this._gltfLoader,n=!1;if(this._state===Kp.PROCESSING&&(n=t.process(e)),!n)return!1;let i=t.components;return i.transform=M.multiplyTransformation(this._transform,i.transform,i.transform),g5e(this,i,e),p5e(this,i),this._components=i,this._arrayBuffer=void 0,this._state=Kp.READY,!0};function p5e(e,t){let n=e._batchTable,i=e._instancesLength;if(i===0)return;let o;if(l(n.json))o=zp({count:i,batchTable:n.json,binaryBody:n.binary});else{let r=new Yc({name:Xm.BATCH_TABLE_CLASS_NAME,count:i});o=new Za({schema:{},propertyTables:[r]})}t.structuralMetadata=o}var p5=new h,EH=new Array(4),b5e=new M;function g5e(e,t,n){let i,o=e._featureTable,r=e._instancesLength;if(r===0)return;let s=o.getGlobalProperty("RTC_CENTER",Q.FLOAT,3),a=o.getGlobalProperty("EAST_NORTH_UP"),c=o.hasProperty("NORMAL_UP")||o.hasProperty("NORMAL_UP_OCT32P")||a,d=o.hasProperty("SCALE")||o.hasProperty("SCALE_NON_UNIFORM"),u=x5e(o,r),m;c&&(m=new Float32Array(4*r));let p;d&&(p=new Float32Array(3*r));let g=new Float32Array(r),f=h.unpackArray(u),x=new h,_=new h,C=new h,V=new h,L=new $,Z=new we,G=new Array(4),X=new h,v=new Array(3),P=new M;if(!l(s)||h.equals(h.unpack(s),h.ZERO)){let U=le.fromPoints(f);for(i=0;i0&&(U.instances=B?y5e(F):F,B=!0)}}function y5e(e){let t=new Tre;t.transformInWorldSpace=e.transformInWorldSpace;let n=e.attributes,i=n.length;for(let o=0;o=n[t]){if(t+1=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o=n[o]&&e=0&&!(e>=n[o]&&en&&(r=Math.floor((e-n)/o)+1,e-=r*o),e};EC.prototype.clampTime=function(e){let t=this.times;return W.clamp(e,t[0],t[t.length-1])};var to=EC;function XC(e){this._value=e,this._valueType=to.getPointType(e)}Object.defineProperties(XC.prototype,{value:{get:function(){return this._value}}});XC.prototype.findTimeInterval=function(e){};XC.prototype.wrapTime=function(e){return 0};XC.prototype.clampTime=function(e){return 0};XC.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var $X=XC;var tgn=T(S(),1);var Dbn=T(S(),1);function IC(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=to.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(IC.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});IC.prototype.findTimeInterval=to.prototype.findTimeInterval;IC.prototype.wrapTime=to.prototype.wrapTime;IC.prototype.clampTime=to.prototype.clampTime;IC.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);return this._pointType===Number?(1-r)*n[o]+r*n[o+1]:(l(t)||(t=new h),h.lerp(n[o],n[o+1],r,t))};var lg=IC;var Obn=T(S(),1);var Sre={};Sre.solve=function(e,t,n,i){let o=new Array(n.length),r=new Array(i.length),s=new Array(i.length),a;for(a=0;a=0;--a)s[a]=h.subtract(r[a],h.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s};var WC=Sre;var Cre=[],Vre=[],Lre=[],Rre=[];function V5e(e,t,n){let i=Cre,o=Lre,r=Vre,s=Rre;i.length=o.length=e.length-1,r.length=s.length=e.length;let a;i[0]=r[0]=1,o[0]=0;let c=s[0];for(l(c)||(c=s[0]=new h),h.clone(t,c),a=1;a0&&e.afterRender.push(a._raiseStartEvent)),a.loop===Wl.REPEAT)g=g-Math.floor(g);else if(a.loop===Wl.MIRRORED_REPEAT){let C=Math.floor(g),V=g-C;g=C%2===1?1-V:V}a.reverse&&(g=1-g);let _=g*d*a.multiplier;_=W.clamp(_,a.localStartTime,a.localStopTime),a.animate(_),a.update.numberOfListeners>0&&(a._updateEventTime=_,e.afterRender.push(a._raiseUpdateEvent)),i=!0,x||(a._state=Nm.STOPPED,a.stop.numberOfListeners>0&&e.afterRender.push(a._raiseStopEvent),a.removeOnStop&&b5.push(a))}}n=b5.length;for(let s=0;s=s.clientWidth)d=!0;else{if(Z.x>s.clientWidth*.5){a.width=Z.x,c.frustum.right=p.x-C,lc=OW(r,n,c,lc),cs.clipToGLWindowCoordinates(a,lc,Lz),a.x+=Z.x,c.position.x=-c.position.x;let R=c.frustum.right;c.frustum.right=-c.frustum.left,c.frustum.left=-R,lc=OW(r,n,c,lc),cs.clipToGLWindowCoordinates(a,lc,Rz)}else{a.x+=Z.x,a.width-=Z.x,c.frustum.left=-p.x-C,lc=OW(r,n,c,lc),cs.clipToGLWindowCoordinates(a,lc,Lz),a.x=a.x-a.width,c.position.x=-c.position.x;let R=c.frustum.left;c.frustum.left=-c.frustum.right,c.frustum.right=-R,lc=OW(r,n,c,lc),cs.clipToGLWindowCoordinates(a,lc,Rz)}h.clone(g,c.position),c.frustum=f.clone(),i=D.clone(Lz,i),(i.x<0||i.x>s.clientWidth)&&(i.x=Rz.x)}}if(o.mode!==oe.SCENE2D||d){if(lc=OW(r,n,c,lc),lc.z<0&&!(c.frustum instanceof sn)&&!(c.frustum instanceof Vr))return;i=cs.clipToGLWindowCoordinates(a,lc,i)}return i.y=s.clientHeight-i.y,i};cs.worldToDrawingBufferCoordinates=function(e,t,n){if(n=cs.worldToWindowCoordinates(e,t,n),!!l(n))return cs.transformWindowToDrawingBuffer(e,n,n)};cs.wgs84ToDrawingBufferCoordinates=function(e,t,n){return Yr("SceneTransforms.wgs84ToDrawingBufferCoordinates","SceneTransforms.wgs84ToDrawingBufferCoordinates has been deprecated. It will be removed in 1.21. Use SceneTransforms.worldToDrawingBufferCoordinates instead."),cs.worldToDrawingBufferCoordinates(e,t,n)};var Yp=new h,NNe=new he;cs.computeActualEllipsoidPosition=function(e,t,n){let i=e.mode;if(i===oe.SCENE3D)return h.clone(t,n);let o=e.mapProjection,r=o.ellipsoid.cartesianToCartographic(t,NNe);if(!l(r))return;if(o.project(r,Yp),i===oe.COLUMBUS_VIEW)return h.fromElements(Yp.z,Yp.x,Yp.y,n);if(i===oe.SCENE2D)return h.fromElements(0,Yp.x,Yp.y,n);let s=e.morphTime;return h.fromElements(X.lerp(Yp.z,t.x,s),X.lerp(Yp.x,t.y,s),X.lerp(Yp.y,t.z,s),n)};var fre=new h,pre=new h,bre=new A;cs.clipToGLWindowCoordinates=function(e,t,n){return h.divideByScalar(t,t.w,fre),A.computeViewportTransformation(e,0,1,bre),A.multiplyByPoint(bre,fre,pre),D.fromCartesian3(pre,n)};cs.transformWindowToDrawingBuffer=function(e,t,n){let i=e.canvas,o=e.drawingBufferWidth/i.clientWidth,r=e.drawingBufferHeight/i.clientHeight;return D.fromElements(t.x*o,t.y*r,n)};var UNe=new se,gre=new se;cs.drawingBufferToWorldCoordinates=function(e,t,n,i){let r=e.context.uniformState,s=r.currentFrustum,a=s.x,c=s.y;if(e.frameState.useLogDepth){let g=n*r.log2FarDepthFromNearPlusOne,f=Math.pow(2,g)-1;n=c*(1-a/(f+a))/(c-a)}let d=e.view.passState.viewport,u=se.clone(se.UNIT_W,UNe);u.x=(t.x-d.x)/d.width*2-1,u.y=(t.y-d.y)/d.height*2-1,u.z=n*2-1,u.w=1;let m,p=e.camera.frustum;if(l(p.fovy)){m=A.multiplyByVector(r.inverseViewProjection,u,gre);let g=1/m.w;h.multiplyByScalar(m,g,m)}else{let g=p.offCenterFrustum;l(g)&&(p=g),m=gre,m.x=(u.x*(p.right-p.left)+p.left+p.right)*.5,m.y=(u.y*(p.top-p.bottom)+p.bottom+p.top)*.5,m.z=(u.z*(a-c)-a-c)*.5,m.w=1,m=A.multiplyByVector(r.inverseView,m,m)}return h.fromCartesian4(m,i)};var ki=cs;var Spn=S(T(),1),kNe={LEFT:-1,NONE:0,RIGHT:1},zc=Object.freeze(kNe);var bbn=S(T(),1);var Rpn=S(T(),1);var RC={};RC._deprecationWarning=Yr;var Op=Uint32Array.BYTES_PER_ELEMENT;RC.parse=function(e,t){let n=y(t,0);t=n;let i=new Uint8Array(e),o=new DataView(e);t+=Op;let r=o.getUint32(t,!0);if(r!==1)throw new ue(`Only Batched 3D Model version 1 is supported. Version ${r} is not.`);t+=Op;let s=o.getUint32(t,!0);t+=Op;let a=o.getUint32(t,!0);t+=Op;let c=o.getUint32(t,!0);t+=Op;let d=o.getUint32(t,!0);t+=Op;let u=o.getUint32(t,!0);t+=Op;let m;d>=570425344?(t-=Op*2,m=a,d=c,u=0,a=0,c=0,RC._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel.")):u>=570425344&&(t-=Op,m=d,d=a,u=c,a=0,c=0,RC._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel."));let p;a===0?p={BATCH_LENGTH:y(m,0)}:(p=Eo(i,t,a),t+=a);let g=new Uint8Array(e,t,c);t+=c;let f,x;d>0&&(f=Eo(i,t,d),t+=d,u>0&&(x=new Uint8Array(e,t,u),x=new Uint8Array(x),t+=u));let _=n+s-t;if(_===0)throw new ue("glTF byte length must be greater than 0.");let C;return t%4===0?C=new Uint8Array(e,t,_):(RC._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),C=new Uint8Array(i.subarray(t,t+_))),{batchLength:m,featureTableJson:p,featureTableBinary:g,batchTableJson:f,batchTableBinary:x,gltf:C}};var zW=RC;var Xpn=S(T(),1);function KW(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function yre(e,t,n,i,o,r){let s=e._cachedTypedArrays,a=s[t];return l(a)||(a=Q.createArrayBufferView(n,e.buffer.buffer,e.buffer.byteOffset+r,o*i),s[t]=a),a}function DNe(e,t,n,i){let o=e._cachedTypedArrays,r=o[t];return l(r)||(r=Q.createTypedArray(n,i),o[t]=r),r}KW.prototype.getGlobalProperty=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(t=y(t,Q.UNSIGNED_INT),n=y(n,1),yre(this,e,t,n,1,i.byteOffset)):i};KW.prototype.hasProperty=function(e){return l(this.json[e])};KW.prototype.getPropertyArray=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(l(i.componentType)&&(t=Q.fromName(i.componentType)),yre(this,e,t,n,this.featuresLength,i.byteOffset)):DNe(this,e,t,i)};KW.prototype.getProperty=function(e,t,n,i,o){let r=this.json[e];if(!l(r))return;let s=this.getPropertyArray(e,t,n);if(n===1)return s[i];for(let a=0;a0&&(f=Eo(i,t,d),t+=d,u>0&&(x=new Uint8Array(e,t,u),x=new Uint8Array(x),t+=u));let _=n+s-t;if(_===0)throw new ue("glTF byte length must be greater than 0.");let C;return t%4===0?C=new Uint8Array(e,t,_):(f5._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),C=new Uint8Array(i.subarray(t,t+_))),{gltfFormat:m,featureTableJson:p,featureTableBinary:g,batchTableJson:f,batchTableBinary:x,gltf:C}};var jW=f5;var Kp={NOT_LOADED:0,LOADING:1,PROCESSING:2,POST_PROCESSING:3,READY:4,FAILED:5,UNLOADED:6},p5=_n.Attribute,l5e=_n.FeatureIdAttribute,Vre=_n.Instances;function Hp(e){e=y(e,y.EMPTY_OBJECT);let t=e.i3dmResource,n=e.arrayBuffer,i=e.baseResource,o=y(e.byteOffset,0),r=y(e.releaseGltfJson,!1),s=y(e.asynchronous,!0),a=y(e.incrementallyLoadTextures,!0),c=y(e.upAxis,Go.Y),d=y(e.forwardAxis,Go.X),u=y(e.loadAttributesAsTypedArray,!1),m=y(e.loadIndicesForWireframe,!1),p=y(e.loadPrimitiveOutline,!0),g=y(e.enablePick,!1);i=l(i)?i:t.clone(),this._i3dmResource=t,this._baseResource=i,this._arrayBuffer=n,this._byteOffset=o,this._releaseGltfJson=r,this._asynchronous=s,this._incrementallyLoadTextures=a,this._upAxis=c,this._forwardAxis=d,this._loadAttributesAsTypedArray=u,this._loadIndicesForWireframe=m,this._loadPrimitiveOutline=p,this._enablePick=g,this._state=Kp.NOT_LOADED,this._promise=void 0,this._gltfLoader=void 0,this._buffers=[],this._components=void 0,this._transform=A.IDENTITY,this._batchTable=void 0,this._featureTable=void 0,this._instancesLength=0}l(Object.create)&&(Hp.prototype=Object.create(eo.prototype),Hp.prototype.constructor=Hp);Object.defineProperties(Hp.prototype,{texturesLoaded:{get:function(){return this._gltfLoader?.texturesLoaded}},cacheKey:{get:function(){}},components:{get:function(){return this._components}}});Hp.prototype.load=function(){if(l(this._promise))return this._promise;let e=jW.parse(this._arrayBuffer,this._byteOffset),t=e.featureTableJson,n=e.featureTableBinary,i=e.batchTableJson,o=e.batchTableBinary,r=e.gltfFormat,s=new Am(t,n);this._featureTable=s;let a=s.getGlobalProperty("INSTANCES_LENGTH");if(s.featuresLength=a,!l(a))throw new ue("Feature table global property: INSTANCES_LENGTH must be defined");this._instancesLength=a;let c=s.getGlobalProperty("RTC_CENTER",Q.FLOAT,3);l(c)&&(this._transform=A.fromTranslation(h.fromArray(c))),this._batchTable={json:i,binary:o};let d={upAxis:this._upAxis,forwardAxis:this._forwardAxis,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline};if(r===0){let m=Vl(e.gltf);m=m.replace(/[\s\0]+$/,"");let p=this._baseResource.getDerivedResource({url:m});d.gltfResource=p,d.baseResource=p}else d.gltfResource=this._i3dmResource,d.typedArray=e.gltf;let u=new Dp(d);return this._gltfLoader=u,this._state=Kp.LOADING,this._promise=u.load().then(()=>{if(!this.isDestroyed())return this._state=Kp.PROCESSING,this}).catch(m=>{if(!this.isDestroyed())throw d5e(this,m)}),this._promise};function d5e(e,t){return e.unload(),e._state=Kp.FAILED,e.getError("Failed to load i3dm",t)}Hp.prototype.process=function(e){if(this._state===Kp.READY)return!0;let t=this._gltfLoader,n=!1;if(this._state===Kp.PROCESSING&&(n=t.process(e)),!n)return!1;let i=t.components;return i.transform=A.multiplyTransformation(this._transform,i.transform,i.transform),h5e(this,i,e),u5e(this,i),this._components=i,this._arrayBuffer=void 0,this._state=Kp.READY,!0};function u5e(e,t){let n=e._batchTable,i=e._instancesLength;if(i===0)return;let o;if(l(n.json))o=zp({count:i,batchTable:n.json,binaryBody:n.binary});else{let r=new Bc({name:Em.BATCH_TABLE_CLASS_NAME,count:i});o=new Ga({schema:{},propertyTables:[r]})}t.structuralMetadata=o}var b5=new h,Wz=new Array(4),m5e=new A;function h5e(e,t,n){let i,o=e._featureTable,r=e._instancesLength;if(r===0)return;let s=o.getGlobalProperty("RTC_CENTER",Q.FLOAT,3),a=o.getGlobalProperty("EAST_NORTH_UP"),c=o.hasProperty("NORMAL_UP")||o.hasProperty("NORMAL_UP_OCT32P")||a,d=o.hasProperty("SCALE")||o.hasProperty("SCALE_NON_UNIFORM"),u=p5e(o,r),m;c&&(m=new Float32Array(4*r));let p;d&&(p=new Float32Array(3*r));let g=new Float32Array(r),f=h.unpackArray(u),x=new h,_=new h,C=new h,V=new h,Z=new $,R=new we,G=new Array(4),W=new h,v=new Array(3),P=new A;if(!l(s)||h.equals(h.unpack(s),h.ZERO)){let k=le.fromPoints(f);for(i=0;i0&&(k.instances=B?f5e(F):F,B=!0)}}function f5e(e){let t=new Vre;t.transformInWorldSpace=e.transformInWorldSpace;let n=e.attributes,i=n.length;for(let o=0;o=n[t]){if(t+1=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o=n[o]&&e=0&&!(e>=n[o]&&en&&(r=Math.floor((e-n)/o)+1,e-=r*o),e};GC.prototype.clampTime=function(e){let t=this.times;return X.clamp(e,t[0],t[t.length-1])};var to=GC;function EC(e){this._value=e,this._valueType=to.getPointType(e)}Object.defineProperties(EC.prototype,{value:{get:function(){return this._value}}});EC.prototype.findTimeInterval=function(e){};EC.prototype.wrapTime=function(e){return 0};EC.prototype.clampTime=function(e){return 0};EC.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var $W=EC;var j0n=S(T(),1);var M0n=S(T(),1);function WC(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=to.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(WC.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});WC.prototype.findTimeInterval=to.prototype.findTimeInterval;WC.prototype.wrapTime=to.prototype.wrapTime;WC.prototype.clampTime=to.prototype.clampTime;WC.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);return this._pointType===Number?(1-r)*n[o]+r*n[o+1]:(l(t)||(t=new h),h.lerp(n[o],n[o+1],r,t))};var cg=WC;var k0n=S(T(),1);var Zre={};Zre.solve=function(e,t,n,i){let o=new Array(n.length),r=new Array(i.length),s=new Array(i.length),a;for(a=0;a=0;--a)s[a]=h.subtract(r[a],h.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s};var IC=Zre;var Lre=[],Rre=[],Gre=[],Ere=[];function _5e(e,t,n){let i=Lre,o=Gre,r=Rre,s=Ere;i.length=o.length=e.length-1,r.length=s.length=e.length;let a;i[0]=r[0]=1,o[0]=0;let c=s[0];for(l(c)||(c=s[0]=new h),h.clone(t,c),a=1;a0&&e.afterRender.push(a._raiseStartEvent)),a.loop===Il.REPEAT)g=g-Math.floor(g);else if(a.loop===Il.MIRRORED_REPEAT){let C=Math.floor(g),V=g-C;g=C%2===1?1-V:V}a.reverse&&(g=1-g);let _=g*d*a.multiplier;_=X.clamp(_,a.localStartTime,a.localStopTime),a.animate(_),a.update.numberOfListeners>0&&(a._updateEventTime=_,e.afterRender.push(a._raiseUpdateEvent)),i=!0,x||(a._state=Mm.STOPPED,a.stop.numberOfListeners>0&&e.afterRender.push(a._raiseStopEvent),a.removeOnStop&&g5.push(a))}}n=g5.length;for(let s=0;ss||o<-s&&r>-s}function AC(e,t){if(!l(t))return;let n=jp.clone(t),i=et.shallowClone(t.command);return i.modelMatrix=e._modelMatrix2D,i.boundingVolume=e._boundingVolume2D,n.command=i,n.updateShadows=!1,n.is2D=!0,t.derivedCommand2D=n,e._derivedCommands.push(n),n}function K5e(e){AC(e,e._originalCommand),AC(e,e._translucentCommand),AC(e,e._skipLodBackfaceCommand),AC(e,e._skipLodStencilCommand),AC(e,e._silhouetteModelCommand),AC(e,e._silhouetteColorCommand)}function J5e(e){let t=et.shallowClone(e);t.pass=Re.TRANSLUCENT;let n=Oe(e.renderState,!0);return n.cull.enabled=!1,n.depthMask=!1,n.blending=un.ALPHA_BLEND,t.renderState=De.fromCache(n),t}function Q5e(e,t){let n=t._silhouetteId%255,i=et.shallowClone(e),o=Oe(e.renderState,!0);return o.stencilTest={enabled:!0,frontFunction:ne.ALWAYS,backFunction:ne.ALWAYS,reference:n,mask:-1,frontOperation:{fail:ne.KEEP,zFail:ne.KEEP,zPass:ne.REPLACE},backOperation:{fail:ne.KEEP,zFail:ne.KEEP,zPass:ne.REPLACE}},t.isInvisible()&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),i.renderState=De.fromCache(o),i}function j5e(e,t){let n=t._silhouetteId%255,i=et.shallowClone(e),o=Oe(e.renderState,!0);o.cull.enabled=!1,(e.pass===Re.TRANSLUCENT||t.silhouetteColor.alpha<1)&&(i.pass=Re.TRANSLUCENT,o.depthMask=!1,o.blending=un.ALPHA_BLEND),o.stencilTest={enabled:!0,frontFunction:ne.NOTEQUAL,backFunction:ne.NOTEQUAL,reference:n,mask:-1,frontOperation:{fail:ne.KEEP,zFail:ne.KEEP,zPass:ne.KEEP},backOperation:{fail:ne.KEEP,zFail:ne.KEEP,zPass:ne.KEEP}};let s=Oe(e.uniformMap);return s.model_silhouettePass=function(){return!0},i.renderState=De.fromCache(o),i.uniformMap=s,i.castShadows=!1,i.receiveShadows=!1,i}function q5e(e,t,n){let i=e._skipLodStencilCommand,o=i.command,r=t._selectionDepth,s=$5e(o);if(r!==s){let a=eke(r),c=Oe(o.renderState,!0);c.stencilTest.reference=a,o.renderState=De.fromCache(c),n&&(i.derivedCommand2D.renderState=c)}}function $5e(e){return(e.renderState.stencilTest.reference&Nt.SKIP_LOD_MASK)>>>Nt.SKIP_LOD_BIT_SHIFT}function eke(e){return Nt.CESIUM_3D_TILE_MASK|e<s||o<-s&&r>-s}function FC(e,t){if(!l(t))return;let n=Qp.clone(t),i=tt.shallowClone(t.command);return i.modelMatrix=e._modelMatrix2D,i.boundingVolume=e._boundingVolume2D,n.command=i,n.updateShadows=!1,n.is2D=!0,t.derivedCommand2D=n,e._derivedCommands.push(n),n}function Y5e(e){FC(e,e._originalCommand),FC(e,e._translucentCommand),FC(e,e._skipLodBackfaceCommand),FC(e,e._skipLodStencilCommand),FC(e,e._silhouetteModelCommand),FC(e,e._silhouetteColorCommand)}function O5e(e){let t=tt.shallowClone(e);t.pass=Le.TRANSLUCENT;let n=Oe(e.renderState,!0);return n.cull.enabled=!1,n.depthMask=!1,n.blending=un.ALPHA_BLEND,t.renderState=De.fromCache(n),t}function z5e(e,t){let n=t._silhouetteId%255,i=tt.shallowClone(e),o=Oe(e.renderState,!0);return o.stencilTest={enabled:!0,frontFunction:ie.ALWAYS,backFunction:ie.ALWAYS,reference:n,mask:-1,frontOperation:{fail:ie.KEEP,zFail:ie.KEEP,zPass:ie.REPLACE},backOperation:{fail:ie.KEEP,zFail:ie.KEEP,zPass:ie.REPLACE}},t.isInvisible()&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),i.renderState=De.fromCache(o),i}function K5e(e,t){let n=t._silhouetteId%255,i=tt.shallowClone(e),o=Oe(e.renderState,!0);o.cull.enabled=!1,(e.pass===Le.TRANSLUCENT||t.silhouetteColor.alpha<1)&&(i.pass=Le.TRANSLUCENT,o.depthMask=!1,o.blending=un.ALPHA_BLEND),o.stencilTest={enabled:!0,frontFunction:ie.NOTEQUAL,backFunction:ie.NOTEQUAL,reference:n,mask:-1,frontOperation:{fail:ie.KEEP,zFail:ie.KEEP,zPass:ie.KEEP},backOperation:{fail:ie.KEEP,zFail:ie.KEEP,zPass:ie.KEEP}};let s=Oe(e.uniformMap);return s.model_silhouettePass=function(){return!0},i.renderState=De.fromCache(o),i.uniformMap=s,i.castShadows=!1,i.receiveShadows=!1,i}function H5e(e,t,n){let i=e._skipLodStencilCommand,o=i.command,r=t._selectionDepth,s=J5e(o);if(r!==s){let a=Q5e(r),c=Oe(o.renderState,!0);c.stencilTest.reference=a,o.renderState=De.fromCache(c),n&&(i.derivedCommand2D.renderState=c)}}function J5e(e){return(e.renderState.stencilTest.reference&Nt.SKIP_LOD_MASK)>>>Nt.SKIP_LOD_BIT_SHIFT}function Q5e(e){return Nt.CESIUM_3D_TILE_MASK|e<W.EPSILON3}};var gI=Pre;var Mxn=T(S(),1);var Ixn=T(S(),1),yI=`/** +`;var Fre={name:"AtmospherePipelineStage"};Fre.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_ATMOSPHERE",void 0,xe.BOTH),i.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,xe.BOTH),i.addVarying("vec3","v_atmosphereRayleighColor"),i.addVarying("vec3","v_atmosphereMieColor"),i.addVarying("float","v_atmosphereOpacity"),i.addVertexLines([bI]),i.addFragmentLines([pI]),i.addUniform("bool","u_isInFog",xe.FRAGMENT),e.uniformMap.u_isInFog=function(){let o=h.distance(n.camera.positionWC,t.boundingSphere.center);return X.fog(o,n.fog.density)>X.EPSILON3}};var gI=Fre;var vxn=S(T(),1);var Rxn=S(T(),1),yI=`/** * Compute some metrics for a procedural sky lighting model * * @param {vec3} positionWC The position of the fragment in world coordinates. @@ -6953,14 +6955,14 @@ vec3 textureIBL( return diffuseContribution + specularContribution; } #endif -`;var vre={name:"ImageBasedLightingPipelineStage"};vre.process=function(e,t,n){let i=t.imageBasedLighting,o=e.shaderBuilder;o.addDefine("USE_IBL_LIGHTING",void 0,xe.FRAGMENT),o.addUniform("vec2","model_iblFactor",xe.FRAGMENT),Lm.isSupported(n.context)&&((i.useSphericalHarmonics||i.useSpecularEnvironmentMaps||i.enabled)&&o.addUniform("mat3","model_iblReferenceFrameMatrix",xe.FRAGMENT),l(i.sphericalHarmonicCoefficients)?(o.addDefine("DIFFUSE_IBL",void 0,xe.FRAGMENT),o.addDefine("CUSTOM_SPHERICAL_HARMONICS",void 0,xe.FRAGMENT),o.addUniform("vec3","model_sphericalHarmonicCoefficients[9]",xe.FRAGMENT)):i.useDefaultSphericalHarmonics&&o.addDefine("DIFFUSE_IBL",void 0,xe.FRAGMENT),l(i.specularEnvironmentMapAtlas)&&i.specularEnvironmentMapAtlas.ready?(o.addDefine("SPECULAR_IBL",void 0,xe.FRAGMENT),o.addDefine("CUSTOM_SPECULAR_IBL",void 0,xe.FRAGMENT),o.addUniform("sampler2D","model_specularEnvironmentMaps",xe.FRAGMENT),o.addUniform("vec2","model_specularEnvironmentMapsSize",xe.FRAGMENT),o.addUniform("float","model_specularEnvironmentMapsMaximumLOD",xe.FRAGMENT)):t.useDefaultSpecularMaps&&o.addDefine("SPECULAR_IBL",void 0,xe.FRAGMENT)),l(i.luminanceAtZenith)&&(o.addDefine("USE_SUN_LUMINANCE",void 0,xe.FRAGMENT),o.addUniform("float","model_luminanceAtZenith",xe.FRAGMENT)),o.addFragmentLines(yI);let r={model_iblFactor:function(){return i.imageBasedLightingFactor},model_iblReferenceFrameMatrix:function(){return t._iblReferenceFrameMatrix},model_luminanceAtZenith:function(){return i.luminanceAtZenith},model_sphericalHarmonicCoefficients:function(){return i.sphericalHarmonicCoefficients},model_specularEnvironmentMaps:function(){return i.specularEnvironmentMapAtlas.texture},model_specularEnvironmentMapsSize:function(){return i.specularEnvironmentMapAtlas.texture.dimensions},model_specularEnvironmentMapsMaximumLOD:function(){return i.specularEnvironmentMapAtlas.maximumMipmapLevel}};e.uniformMap=xt(r,e.uniformMap)};var xI=vre;var qxn=T(S(),1);var Hxn=T(S(),1);var rke=W.EPSILON16;function FH(e){e=y(e,y.EMPTY_OBJECT);let t=e.stage,n=e.runtimeArticulation;this._stage=t,this._runtimeArticulation=n,this._name=t.name,this._type=t.type,this._minimumValue=t.minimumValue,this._maximumValue=t.maximumValue,this._currentValue=t.initialValue}Object.defineProperties(FH.prototype,{stage:{get:function(){return this._stage}},runtimeArticulation:{get:function(){return this._runtimeArticulation}},name:{get:function(){return this._name}},type:{get:function(){return this._type}},minimumValue:{get:function(){return this._minimumValue}},maximumValue:{get:function(){return this._maximumValue}},currentValue:{get:function(){return this._currentValue},set:function(e){e=W.clamp(e,this.minimumValue,this.maximumValue),W.equalsEpsilon(this._currentValue,e,rke)||(this._currentValue=e,this.runtimeArticulation._dirty=!0)}}});var ske=new h,wH=new $;FH.prototype.applyStageToMatrix=function(e){let t=this.type,n=this.currentValue,i=ske,o;switch(t){case sc.XROTATE:o=$.fromRotationX(W.toRadians(n),wH),e=M.multiplyByMatrix3(e,o,e);break;case sc.YROTATE:o=$.fromRotationY(W.toRadians(n),wH),e=M.multiplyByMatrix3(e,o,e);break;case sc.ZROTATE:o=$.fromRotationZ(W.toRadians(n),wH),e=M.multiplyByMatrix3(e,o,e);break;case sc.XTRANSLATE:i.x=n,i.y=0,i.z=0,e=M.multiplyByTranslation(e,i,e);break;case sc.YTRANSLATE:i.x=0,i.y=n,i.z=0,e=M.multiplyByTranslation(e,i,e);break;case sc.ZTRANSLATE:i.x=0,i.y=0,i.z=n,e=M.multiplyByTranslation(e,i,e);break;case sc.XSCALE:i.x=n,i.y=1,i.z=1,e=M.multiplyByScale(e,i,e);break;case sc.YSCALE:i.x=1,i.y=n,i.z=1,e=M.multiplyByScale(e,i,e);break;case sc.ZSCALE:i.x=1,i.y=1,i.z=n,e=M.multiplyByScale(e,i,e);break;case sc.UNIFORMSCALE:e=M.multiplyByUniformScale(e,n,e);break;default:break}return e};var _I=FH;function y5(e){e=y(e,y.EMPTY_OBJECT);let t=e.articulation,n=e.sceneGraph;this._articulation=t,this._sceneGraph=n,this._name=t.name,this._runtimeStages=[],this._runtimeStagesByName={},this._runtimeNodes=[],this._dirty=!0,ake(this)}Object.defineProperties(y5.prototype,{articulation:{get:function(){return this._articulation}},sceneGraph:{get:function(){return this._sceneGraph}},name:{get:function(){return this._name}},runtimeStages:{get:function(){return this._runtimeStages}},runtimeNodes:{get:function(){return this._runtimeNodes}}});function ake(e){let n=e.articulation.stages,i=n.length,o=e._runtimeStages,r=e._runtimeStagesByName;for(let s=0;s=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=a.setIndex+1),i.push({index:e.attributeIndex++,vertexBuffer:a.buffer,componentsPerAttribute:nn.getNumberOfComponents(a.type),componentDatatype:a.componentDatatype,normalize:!1,offsetInBytes:a.byteOffset,strideInBytes:a.byteStride,instanceDivisor:1}),r.addAttribute("float",`a_instanceFeatureId_${a.setIndex}`))}}var PI=Nre;var lTn=T(S(),1);var kH={};kH.name="ModelMatrixUpdateStage";kH.update=function(e,t,n){let i=n.mode!==oe.SCENE3D;if(!(i&&t._model._projectTo2D)&&e._transformDirty){let o=i?t._computedModelMatrix2D:t._computedModelMatrix;Ore(e,t,o,e.transformToRoot),e._transformDirty=!1}};function Ore(e,t,n,i){let o;i=M.multiplyTransformation(i,e.transform,new M),e.updateComputedTransform();let r=e.runtimePrimitives.length;for(o=0;o1&&(i.addDefine("MULTILINE_BATCH_TEXTURE"),i.addUniform("vec2","model_textureDimensions"),o.model_textureDimensions=function(){return c.textureDimensions}),e.uniformMap=xt(o,e.uniformMap)};var MI=Qre;var UTn=T(S(),1);var jre={name:"ClassificationPipelineStage"};jre.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_CLASSIFICATION",void 0,xe.BOTH);let o=e.runtimePrimitive;l(o.batchLengths)||Wke(t,o)};function Wke(e,t){let n=jt.getAttributeBySemantic(e,Tt.POSITION);if(!l(n))throw new ue("Primitives must have a position attribute to be used for classification.");let i,o=e.indices,r=l(o);r&&(i=o.typedArray,o.typedArray=void 0);let s=r?o.count:n.count,a=jt.getAttributeBySemantic(e,Tt.FEATURE_ID,0);if(!l(a)){t.batchLengths=[s],t.batchOffsets=[0];return}let c=a.typedArray;a.typedArray=void 0;let d=[],u=[0],m=r?i[0]:0,p=c[m],g=0;for(let x=1;x=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=a.setIndex+1),i.push({index:e.attributeIndex++,vertexBuffer:a.buffer,componentsPerAttribute:nn.getNumberOfComponents(a.type),componentDatatype:a.componentDatatype,normalize:!1,offsetInBytes:a.byteOffset,strideInBytes:a.byteStride,instanceDivisor:1}),r.addAttribute("float",`a_instanceFeatureId_${a.setIndex}`))}}var PI=Dre;var rSn=S(T(),1);var kz={};kz.name="ModelMatrixUpdateStage";kz.update=function(e,t,n){let i=n.mode!==oe.SCENE3D;if(!(i&&t._model._projectTo2D)&&e._transformDirty){let o=i?t._computedModelMatrix2D:t._computedModelMatrix;Hre(e,t,o,e.transformToRoot),e._transformDirty=!1}};function Hre(e,t,n,i){let o;i=A.multiplyTransformation(i,e.transform,new A),e.updateComputedTransform();let r=e.runtimePrimitives.length;for(o=0;o1&&(i.addDefine("MULTILINE_BATCH_TEXTURE"),i.addUniform("vec2","model_textureDimensions"),o.model_textureDimensions=function(){return c.textureDimensions}),e.uniformMap=xt(o,e.uniformMap)};var MI=$re;var ASn=S(T(),1);var ese={name:"ClassificationPipelineStage"};ese.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_CLASSIFICATION",void 0,xe.BOTH);let o=e.runtimePrimitive;l(o.batchLengths)||GUe(t,o)};function GUe(e,t){let n=jt.getAttributeBySemantic(e,St.POSITION);if(!l(n))throw new ue("Primitives must have a position attribute to be used for classification.");let i,o=e.indices,r=l(o);r&&(i=o.typedArray,o.typedArray=void 0);let s=r?o.count:n.count,a=jt.getAttributeBySemantic(e,St.FEATURE_ID,0);if(!l(a)){t.batchLengths=[s],t.batchOffsets=[0];return}let c=a.typedArray;a.typedArray=void 0;let d=[],u=[0],m=r?i[0]:0,p=c[m],g=0;for(let x=1;xDke(i,t,n)):[]}function Dke(e,t,n){let{getAttributeByName:i,getAttributeInfo:o,sanitizeGlslIdentifier:r}=jt,s=e.class.id,a=n?.classes[s],c=Object.entries(e.properties),d=new Array(c.length);for(let u=0;uYke(n,t)):[]}function Yke(e,t){let{sanitizeGlslIdentifier:n}=jt,i=e.class.id,o=t?.classes[i],r=Object.entries(e.properties).filter(([a,c])=>c.isGpuCompatible()),s=new Array(r.length);for(let a=0;au),n.addStructField(xi.STRUCT_ID_METADATA_FS,r,o);let g=`attributes.texCoord_${a}`,f=g;if(l(m)&&!$.equals(m,$.IDENTITY)){let L=`${p}Transform`;n.addUniform("mat3",L,xe.FRAGMENT),i[L]=function(){return m},f=`vec2(${L} * vec3(${g}, 1.0))`}let x=`texture(${p}, ${f}).${c}`,_=s.unpackInShader(x),C=rse({valueExpression:_,renderResources:e,glslType:r,metadataVariable:o,shaderDestination:xe.FRAGMENT,property:s}),V=`metadata.${o} = ${C};`;n.addFunctionLines(xi.FUNCTION_ID_INITIALIZE_METADATA_FS,[V])}function nse(e,t){let{classProperty:n}=t.property,{metadataVariable:i,glslType:o,shaderDestination:r}=t,s=ose(xi.METADATA_CLASS_FIELDS,n,`metadataClass.${i}`,o),a=`${o}MetadataClass`;e.addStructField(xi.STRUCT_ID_METADATA_CLASS_FS,a,i),e.addFunctionLines(xi.FUNCTION_ID_INITIALIZE_METADATA_FS,s),xe.includesVertexShader(r)&&(e.addStructField(xi.STRUCT_ID_METADATA_CLASS_VS,a,i),e.addFunctionLines(xi.FUNCTION_ID_INITIALIZE_METADATA_VS,s))}function ise(e,t){let{propertyStatistics:n}=t;if(!l(n))return;let{metadataVariable:i,type:o,glslType:r}=t;if(o===zt.ENUM)return;let s=xi.METADATA_STATISTICS_FIELDS,a=`metadataStatistics.${i}`,c=ose(s,n,a,r),d=`${r}MetadataStatistics`;e.addStructField(xi.STRUCT_ID_METADATA_STATISTICS_FS,d,i),e.addFunctionLines(xi.FUNCTION_ID_INITIALIZE_METADATA_FS,c),xe.includesVertexShader(t.shaderDestination)&&(e.addStructField(xi.STRUCT_ID_METADATA_STATISTICS_VS,d,i),e.addFunctionLines(xi.FUNCTION_ID_INITIALIZE_METADATA_VS,c))}function ose(e,t,n,i){function o(r){let s=t[r.specName];if(l(s))return`${n}.${r.shaderName} = ${i}(${s});`}return l(t)?e.map(o).filter(l):[]}function rse(e){let{valueExpression:t,property:n}=e;if(!n.hasValueTransform)return t;let i=e.metadataVariable,o=`u_${i}_offset`,r=`u_${i}_scale`,{shaderBuilder:s,uniformMap:a}=e.renderResources,{glslType:c,shaderDestination:d}=e;s.addUniform(c,o,d),s.addUniform(c,r,d);let{offset:u,scale:m}=n;return a[o]=()=>u,a[r]=()=>m,`czm_valueTransform(${o}, ${r}, ${t})`}var yu=xi;var NSn=T(S(),1),$ke={INHERIT:0,OPAQUE:1,TRANSLUCENT:2},fg=Object.freeze($ke);var na={name:"CustomShaderPipelineStage",STRUCT_ID_ATTRIBUTES_VS:"AttributesVS",STRUCT_ID_ATTRIBUTES_FS:"AttributesFS",STRUCT_NAME_ATTRIBUTES:"Attributes",STRUCT_ID_VERTEX_INPUT:"VertexInput",STRUCT_NAME_VERTEX_INPUT:"VertexInput",STRUCT_ID_FRAGMENT_INPUT:"FragmentInput",STRUCT_NAME_FRAGMENT_INPUT:"FragmentInput",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS:"initializeInputStructVS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS:"void initializeInputStruct(out VertexInput vsInput, ProcessedAttributes attributes)",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS:"initializeInputStructFS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS:"void initializeInputStruct(out FragmentInput fsInput, ProcessedAttributes attributes)",_oneTimeWarning:At};na.process=function(e,t,n){let{shaderBuilder:i,model:o,alphaOptions:r}=e,{customShader:s}=o,{lightingModel:a,translucencyMode:c}=s;l(a)&&(e.lightingOptions.lightingModel=a),c===fg.TRANSLUCENT?r.pass=Re.TRANSLUCENT:c===fg.OPAQUE&&(r.pass=void 0);let d=aUe(s,t);if(!d.customShaderEnabled)return;if(uUe(i,s,d),d.shouldComputePositionWC&&i.addDefine("COMPUTE_POSITION_WC_CUSTOM_SHADER",void 0,xe.BOTH),l(s.vertexShaderText)&&i.addDefine("HAS_CUSTOM_VERTEX_SHADER",void 0,xe.VERTEX),l(s.fragmentShaderText)){i.addDefine("HAS_CUSTOM_FRAGMENT_SHADER",void 0,xe.FRAGMENT);let p=qp.getDefineName(s.mode);i.addDefine(p,void 0,xe.FRAGMENT)}let u=s.uniforms;for(let p in u)if(u.hasOwnProperty(p)){let g=u[p];i.addUniform(g.type,p)}let m=s.varyings;for(let p in m)if(m.hasOwnProperty(p)){let g=m[p];i.addVarying(g,p)}e.uniformMap=xt(e.uniformMap,s.uniformMap)};function eUe(e){let t={};for(let n=0;nMUe(i,t,n)):[]}function MUe(e,t,n){let{getAttributeByName:i,getAttributeInfo:o,sanitizeGlslIdentifier:r}=jt,s=e.class.id,a=n?.classes[s],c=Object.entries(e.properties),d=new Array(c.length);for(let u=0;uUUe(n,t)):[]}function UUe(e,t){let{sanitizeGlslIdentifier:n}=jt,i=e.class.id,o=t?.classes[i],r=Object.entries(e.properties).filter(([a,c])=>c.isGpuCompatible()),s=new Array(r.length);for(let a=0;au),n.addStructField(_i.STRUCT_ID_METADATA_FS,r,o);let g=`attributes.texCoord_${a}`,f=g;if(l(m)&&!$.equals(m,$.IDENTITY)){let Z=`${p}Transform`;n.addUniform("mat3",Z,xe.FRAGMENT),i[Z]=function(){return m},f=`vec2(${Z} * vec3(${g}, 1.0))`}let x=`texture(${p}, ${f}).${c}`,_=s.unpackInShader(x),C=cse({valueExpression:_,renderResources:e,glslType:r,metadataVariable:o,shaderDestination:xe.FRAGMENT,property:s}),V=`metadata.${o} = ${C};`;n.addFunctionLines(_i.FUNCTION_ID_INITIALIZE_METADATA_FS,[V])}function rse(e,t){let{classProperty:n}=t.property,{metadataVariable:i,glslType:o,shaderDestination:r}=t,s=ase(_i.METADATA_CLASS_FIELDS,n,`metadataClass.${i}`,o),a=`${o}MetadataClass`;e.addStructField(_i.STRUCT_ID_METADATA_CLASS_FS,a,i),e.addFunctionLines(_i.FUNCTION_ID_INITIALIZE_METADATA_FS,s),xe.includesVertexShader(r)&&(e.addStructField(_i.STRUCT_ID_METADATA_CLASS_VS,a,i),e.addFunctionLines(_i.FUNCTION_ID_INITIALIZE_METADATA_VS,s))}function sse(e,t){let{propertyStatistics:n}=t;if(!l(n))return;let{metadataVariable:i,type:o,glslType:r}=t;if(o===Kt.ENUM)return;let s=_i.METADATA_STATISTICS_FIELDS,a=`metadataStatistics.${i}`,c=ase(s,n,a,r),d=`${r}MetadataStatistics`;e.addStructField(_i.STRUCT_ID_METADATA_STATISTICS_FS,d,i),e.addFunctionLines(_i.FUNCTION_ID_INITIALIZE_METADATA_FS,c),xe.includesVertexShader(t.shaderDestination)&&(e.addStructField(_i.STRUCT_ID_METADATA_STATISTICS_VS,d,i),e.addFunctionLines(_i.FUNCTION_ID_INITIALIZE_METADATA_VS,c))}function ase(e,t,n,i){function o(r){let s=t[r.specName];if(l(s))return`${n}.${r.shaderName} = ${i}(${s});`}return l(t)?e.map(o).filter(l):[]}function cse(e){let{valueExpression:t,property:n}=e;if(!n.hasValueTransform)return t;let i=e.metadataVariable,o=`u_${i}_offset`,r=`u_${i}_scale`,{shaderBuilder:s,uniformMap:a}=e.renderResources,{glslType:c,shaderDestination:d}=e;s.addUniform(c,o,d),s.addUniform(c,r,d);let{offset:u,scale:m}=n;return a[o]=()=>u,a[r]=()=>m,`czm_valueTransform(${o}, ${r}, ${t})`}var gu=_i;var wTn=S(T(),1),JUe={INHERIT:0,OPAQUE:1,TRANSLUCENT:2},hg=Object.freeze(JUe);var ia={name:"CustomShaderPipelineStage",STRUCT_ID_ATTRIBUTES_VS:"AttributesVS",STRUCT_ID_ATTRIBUTES_FS:"AttributesFS",STRUCT_NAME_ATTRIBUTES:"Attributes",STRUCT_ID_VERTEX_INPUT:"VertexInput",STRUCT_NAME_VERTEX_INPUT:"VertexInput",STRUCT_ID_FRAGMENT_INPUT:"FragmentInput",STRUCT_NAME_FRAGMENT_INPUT:"FragmentInput",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS:"initializeInputStructVS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS:"void initializeInputStruct(out VertexInput vsInput, ProcessedAttributes attributes)",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS:"initializeInputStructFS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS:"void initializeInputStruct(out FragmentInput fsInput, ProcessedAttributes attributes)",_oneTimeWarning:At};ia.process=function(e,t,n){let{shaderBuilder:i,model:o,alphaOptions:r}=e,{customShader:s}=o,{lightingModel:a,translucencyMode:c}=s;l(a)&&(e.lightingOptions.lightingModel=a),c===hg.TRANSLUCENT?r.pass=Le.TRANSLUCENT:c===hg.OPAQUE&&(r.pass=void 0);let d=ike(s,t);if(!d.customShaderEnabled)return;if(ake(i,s,d),d.shouldComputePositionWC&&i.addDefine("COMPUTE_POSITION_WC_CUSTOM_SHADER",void 0,xe.BOTH),l(s.vertexShaderText)&&i.addDefine("HAS_CUSTOM_VERTEX_SHADER",void 0,xe.VERTEX),l(s.fragmentShaderText)){i.addDefine("HAS_CUSTOM_FRAGMENT_SHADER",void 0,xe.FRAGMENT);let p=jp.getDefineName(s.mode);i.addDefine(p,void 0,xe.FRAGMENT)}let u=s.uniforms;for(let p in u)if(u.hasOwnProperty(p)){let g=u[p];i.addUniform(g.type,p)}let m=s.varyings;for(let p in m)if(m.hasOwnProperty(p)){let g=m[p];i.addVarying(g,p)}e.uniformMap=xt(e.uniformMap,s.uniformMap)};function QUe(e){let t={};for(let n=0;n1?(g=e.attributeIndex,e.attributeIndex+=m):p&&!a?g=0:g=e.attributeIndex++,yUe(e,u,g,m,r,s)}ZUe(i,t.attributes),t.primitiveType===Fe.POINTS&&i.addDefine("PRIMITIVE_TYPE_POINTS"),i.addVertexLines($I),i.addFragmentLines(qI)};function yUe(e,t,n,i,o,r){let s=e.shaderBuilder,a=jt.getAttributeInfo(t),c=o&&!r;i>1?TUe(e,t,n,i):_Ue(e,t,n,c),CUe(s,a,c),SUe(s,a),l(t.semantic)&&xUe(s,t),VUe(s,a,o),LUe(s,a,c),RUe(s,a)}function xUe(e,t){let{semantic:n,setIndex:i}=t;switch(n){case Tt.NORMAL:e.addDefine("HAS_NORMALS");break;case Tt.TANGENT:e.addDefine("HAS_TANGENTS");break;case Tt.FEATURE_ID:e.addDefine(`HAS${n}_${i}`);break;case Tt.TEXCOORD:case Tt.COLOR:e.addDefine(`HAS_${n}_${i}`)}}function _Ue(e,t,n,i){let{quantization:o,semantic:r,setIndex:s}=t,{type:a,componentDatatype:c}=l(o)?o:t;r===Tt.FEATURE_ID&&s>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=s+1);let d=r===Tt.POSITION,u=d?0:n,m=nn.getNumberOfComponents(a),p={index:u,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:m,componentDatatype:c,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};if(e.attributes.push(p),!d||!i)return;let g=e.runtimePrimitive.positionBuffer2D,f={index:n,vertexBuffer:g,count:t.count,componentsPerAttribute:m,componentDatatype:Q.FLOAT,offsetInBytes:0,strideInBytes:void 0,normalize:t.normalized};e.attributes.push(f)}function TUe(e,t,n,i){let{quantization:o,normalized:r}=t,{type:s,componentDatatype:a}=l(o)?o:t,d=nn.getNumberOfComponents(s)/i,u=Q.getSizeInBytes(a),m=d*u,p=t.byteStride;for(let g=0;g1?(g=e.attributeIndex,e.attributeIndex+=m):p&&!a?g=0:g=e.attributeIndex++,fke(e,u,g,m,r,s)}Cke(i,t.attributes),t.primitiveType===Fe.POINTS&&i.addDefine("PRIMITIVE_TYPE_POINTS"),i.addVertexLines($I),i.addFragmentLines(qI)};function fke(e,t,n,i,o,r){let s=e.shaderBuilder,a=jt.getAttributeInfo(t),c=o&&!r;i>1?gke(e,t,n,i):bke(e,t,n,c),xke(s,a,c),yke(s,a),l(t.semantic)&&pke(s,t),_ke(s,a,o),Ske(s,a,c),Tke(s,a)}function pke(e,t){let{semantic:n,setIndex:i}=t;switch(n){case St.NORMAL:e.addDefine("HAS_NORMALS");break;case St.TANGENT:e.addDefine("HAS_TANGENTS");break;case St.FEATURE_ID:e.addDefine(`HAS${n}_${i}`);break;case St.TEXCOORD:case St.COLOR:e.addDefine(`HAS_${n}_${i}`)}}function bke(e,t,n,i){let{quantization:o,semantic:r,setIndex:s}=t,{type:a,componentDatatype:c}=l(o)?o:t;r===St.FEATURE_ID&&s>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=s+1);let d=r===St.POSITION,u=d?0:n,m=nn.getNumberOfComponents(a),p={index:u,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:m,componentDatatype:c,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};if(e.attributes.push(p),!d||!i)return;let g=e.runtimePrimitive.positionBuffer2D,f={index:n,vertexBuffer:g,count:t.count,componentsPerAttribute:m,componentDatatype:Q.FLOAT,offsetInBytes:0,strideInBytes:void 0,normalize:t.normalized};e.attributes.push(f)}function gke(e,t,n,i){let{quantization:o,normalized:r}=t,{type:s,componentDatatype:a}=l(o)?o:t,d=nn.getNumberOfComponents(s)/i,u=Q.getSizeInBytes(a),m=d*u,p=t.byteStride;for(let g=0;g0,d=!l(a)&&c;if(l(r)&&!d){let x=jUe(a),_=qUe(r,x);$Ue(i,_);let V=eDe(_).indexOf("normalMC")>=0,L=jt.getAttributeBySemantic(t,Tt.NORMAL);if(V&&!L)throw new ue("Style references the NORMAL semantic but the point cloud does not have normals");i.addDefine("COMPUTE_POSITION_WC_STYLE",void 0,xe.VERTEX),_.styleTranslucent&&(e.alphaOptions.pass=Re.TRANSLUCENT)}let u=o.pointCloudShading;u.attenuation&&i.addDefine("HAS_POINT_CLOUD_ATTENUATION",void 0,xe.VERTEX),u.backFaceCulling&&i.addDefine("HAS_POINT_CLOUD_BACK_FACE_CULLING",void 0,xe.VERTEX);let m,p,g;or.is3DTiles(o.type)&&(p=!0,m=o.content,g=m.tile.refine===vo.ADD),i.addUniform("vec4","model_pointCloudParameters",xe.VERTEX),i.addVertexLines(lW);let f=e.uniformMap;f.model_pointCloudParameters=function(){let x=zUe,_=1;p&&(_=g?5:m.tileset.memoryAdjustedScreenSpaceError),x.x=y(u.maximumAttenuation,_),x.x*=n.pixelRatio;let C=KUe(e,t,u,m);x.y=C*u.geometricErrorScale;let V=n.context,L=n.camera.frustum,Z;return n.mode===oe.SCENE2D||L instanceof sn?Z=Number.POSITIVE_INFINITY:Z=V.drawingBufferHeight/n.camera.frustum.sseDenominator,x.z=Z,p&&(x.w=m.tileset.timeSinceLoad),x}};var xse=new h;function KUe(e,t,n,i){if(l(i)){let u=i.tile.geometricError;if(u>0)return u}if(l(n.baseResolution))return n.baseResolution;let o=jt.getAttributeBySemantic(t,Tt.POSITION),r=o.count,s=e.runtimeNode.transform,a=h.subtract(o.max,o.min,xse);a=M.multiplyByPointAsVector(s,a,xse);let c=a.x*a.y*a.z;return W.cbrt(c/r)}var JUe={colorStyleFunction:void 0,showStyleFunction:void 0,pointSizeStyleFunction:void 0,styleTranslucent:!1},QUe={POSITION:"attributes.positionMC",POSITION_ABSOLUTE:"v_positionWC",COLOR:"attributes.color_0",NORMAL:"attributes.normalMC"};function jUe(e){let t=Oe(QUe);if(!l(e))return t;for(let n=0;n0,d=!l(a)&&c;if(l(r)&&!d){let x=Hke(a),_=Jke(r,x);Qke(i,_);let V=jke(_).indexOf("normalMC")>=0,Z=jt.getAttributeBySemantic(t,St.NORMAL);if(V&&!Z)throw new ue("Style references the NORMAL semantic but the point cloud does not have normals");i.addDefine("COMPUTE_POSITION_WC_STYLE",void 0,xe.VERTEX),_.styleTranslucent&&(e.alphaOptions.pass=Le.TRANSLUCENT)}let u=o.pointCloudShading;u.attenuation&&i.addDefine("HAS_POINT_CLOUD_ATTENUATION",void 0,xe.VERTEX),u.backFaceCulling&&i.addDefine("HAS_POINT_CLOUD_BACK_FACE_CULLING",void 0,xe.VERTEX);let m,p,g;rr.is3DTiles(o.type)&&(p=!0,m=o.content,g=m.tile.refine===wo.ADD),i.addUniform("vec4","model_pointCloudParameters",xe.VERTEX),i.addVertexLines(lX);let f=e.uniformMap;f.model_pointCloudParameters=function(){let x=Yke,_=1;p&&(_=g?5:m.tileset.memoryAdjustedScreenSpaceError),x.x=y(u.maximumAttenuation,_),x.x*=n.pixelRatio;let C=Oke(e,t,u,m);x.y=C*u.geometricErrorScale;let V=n.context,Z=n.camera.frustum,R;return n.mode===oe.SCENE2D||Z instanceof sn?R=Number.POSITIVE_INFINITY:R=V.drawingBufferHeight/n.camera.frustum.sseDenominator,x.z=R,p&&(x.w=m.tileset.timeSinceLoad),x}};var Tse=new h;function Oke(e,t,n,i){if(l(i)){let u=i.tile.geometricError;if(u>0)return u}if(l(n.baseResolution))return n.baseResolution;let o=jt.getAttributeBySemantic(t,St.POSITION),r=o.count,s=e.runtimeNode.transform,a=h.subtract(o.max,o.min,Tse);a=A.multiplyByPointAsVector(s,a,Tse);let c=a.x*a.y*a.z;return X.cbrt(c/r)}var zke={colorStyleFunction:void 0,showStyleFunction:void 0,pointSizeStyleFunction:void 0,styleTranslucent:!1},Kke={POSITION:"attributes.positionMC",POSITION_ABSOLUTE:"v_positionWC",COLOR:"attributes.color_0",NORMAL:"attributes.normalMC"};function Hke(e){let t=Oe(Kke);if(!l(e))return t;for(let n=0;n0,p=l(i.skin),g=l(r),x=!(g&&l(r.fragmentShaderText))||r.mode!==qp.REPLACE_MATERIAL,_=jt.hasQuantizedAttributes(n.attributes),C=o.debugWireframe&&Fe.isTriangles(n.primitiveType)&&(o._enableDebugWireframe||a),V=o.pointCloudShading,L=l(V)&&V.attenuation,Z=l(V)&&V.backFaceCulling,G=n.primitiveType===Fe.POINTS&&(l(s)||L||Z),X=o._enableShowOutline&&l(n.outlineCoordinates),v=SDe(o,i,n),P=l(o.classificationType);d&&t.push(pW),t.push(tW),C&&t.push(_W),P&&t.push(NI),m&&t.push(aW),p&&t.push(gW),G&&t.push(dW),_&&t.push(jI),x&&t.push(rW),t.push(hg),t.push(yu),v.hasPropertyTable&&(t.push(pg),t.push(MI),t.push(DI)),u&&t.push(xW),g&&t.push(JI),t.push(iW),o.allowPicking&&t.push(cW),X&&t.push(hW),t.push(AI),t.push(fW)};function SDe(e,t,n){let i;return l(t.instances)&&(i=jt.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(i))?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:(i=jt.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),l(i)?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:{hasFeatureIds:!1,hasPropertyTable:!1})}var TW=Pse;var NLn=T(S(),1);function zH(e){e=y(e,y.EMPTY_OBJECT),this._sceneGraph=e.sceneGraph;let t=e.skin;this._skin=t,this._inverseBindMatrices=void 0,this._joints=[],this._jointMatrices=[],CDe(this)}Object.defineProperties(zH.prototype,{skin:{get:function(){return this._skin}},sceneGraph:{get:function(){return this._sceneGraph}},inverseBindMatrices:{get:function(){return this._inverseBindMatrices}},joints:{get:function(){return this._joints}},jointMatrices:{get:function(){return this._jointMatrices}}});function CDe(e){let t=e.skin,n=t.inverseBindMatrices;e._inverseBindMatrices=n;let i=t.joints,o=i.length,r=e.sceneGraph._runtimeNodes,s=e.joints,a=e._jointMatrices;for(let c=0;c0,p=l(i.skin),g=l(r),x=!(g&&l(r.fragmentShaderText))||r.mode!==jp.REPLACE_MATERIAL,_=jt.hasQuantizedAttributes(n.attributes),C=o.debugWireframe&&Fe.isTriangles(n.primitiveType)&&(o._enableDebugWireframe||a),V=o.pointCloudShading,Z=l(V)&&V.attenuation,R=l(V)&&V.backFaceCulling,G=n.primitiveType===Fe.POINTS&&(l(s)||Z||R),W=o._enableShowOutline&&l(n.outlineCoordinates),v=xDe(o,i,n),P=l(o.classificationType);d&&t.push(pX),t.push(tX),C&&t.push(_X),P&&t.push(NI),m&&t.push(aX),p&&t.push(gX),G&&t.push(dX),_&&t.push(jI),x&&t.push(rX),t.push(mg),t.push(gu),v.hasPropertyTable&&(t.push(fg),t.push(MI),t.push(DI)),u&&t.push(xX),g&&t.push(JI),t.push(iX),o.allowPicking&&t.push(cX),W&&t.push(hX),t.push(AI),t.push(fX)};function xDe(e,t,n){let i;return l(t.instances)&&(i=jt.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(i))?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:(i=jt.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),l(i)?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:{hasFeatureIds:!1,hasPropertyTable:!1})}var SX=Fse;var wZn=S(T(),1);function Hz(e){e=y(e,y.EMPTY_OBJECT),this._sceneGraph=e.sceneGraph;let t=e.skin;this._skin=t,this._inverseBindMatrices=void 0,this._joints=[],this._jointMatrices=[],_De(this)}Object.defineProperties(Hz.prototype,{skin:{get:function(){return this._skin}},sceneGraph:{get:function(){return this._sceneGraph}},inverseBindMatrices:{get:function(){return this._inverseBindMatrices}},joints:{get:function(){return this._joints}},jointMatrices:{get:function(){return this._jointMatrices}}});function _De(e){let t=e.skin,n=t.inverseBindMatrices;e._inverseBindMatrices=n;let i=t.joints,o=i.length,r=e.sceneGraph._runtimeNodes,s=e.joints,a=e._jointMatrices;for(let c=0;c 0.0 && gl_FragCoord.x < czm_splitPosition) discard; #endif } -`;var T5={name:"ModelSplitterPipelineStage",SPLIT_DIRECTION_UNIFORM_NAME:"model_splitDirection"};T5.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_SPLITTER",void 0,xe.FRAGMENT),i.addFragmentLines(XW);let o={};i.addUniform("float",T5.SPLIT_DIRECTION_UNIFORM_NAME,xe.FRAGMENT),o[T5.SPLIT_DIRECTION_UNIFORM_NAME]=function(){return t.splitDirection},e.uniformMap=xt(o,e.uniformMap)};var IW=T5;var GRn=T(S(),1);function EDe(e,t){this.model=e.model,this.shaderBuilder=e.shaderBuilder.clone(),this.uniformMap=Oe(e.uniformMap),this.alphaOptions=Oe(e.alphaOptions),this.renderStateOptions=Oe(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.runtimeNode=t,this.attributes=[],this.attributeIndex=1,this.featureIdVertexAttributeSetIndex=0,this.instanceCount=0}var WW=EDe;var kRn=T(S(),1);var WRn=T(S(),1);function XDe(e){e=y(e,y.EMPTY_OBJECT),this.lightingModel=y(e.lightingModel,af.UNLIT)}var PW=XDe;function IDe(e,t){this.model=e.model,this.runtimeNode=e.runtimeNode,this.attributes=e.attributes.slice(),this.attributeIndex=e.attributeIndex,this.featureIdVertexAttributeSetIndex=e.featureIdVertexAttributeSetIndex,this.uniformMap=Oe(e.uniformMap),this.alphaOptions=Oe(e.alphaOptions),this.renderStateOptions=Oe(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.shaderBuilder=e.shaderBuilder.clone(),this.instanceCount=e.instanceCount,this.runtimePrimitive=t;let n=t.primitive;this.count=l(n.indices)?n.indices.count:jt.getAttributeBySemantic(n,"POSITION").count,this.hasPropertyTable=!1,this.indices=n.indices,this.wireframeIndexBuffer=void 0,this.primitiveType=n.primitiveType;let i=jt.getPositionMinMax(n,this.runtimeNode.instancingTranslationMin,this.runtimeNode.instancingTranslationMax);this.positionMin=h.clone(i.min,new h),this.positionMax=h.clone(i.max,new h),this.boundingSphere=le.fromCornerPoints(this.positionMin,this.positionMax,new le),this.lightingOptions=new PW,this.pickId=void 0}var vW=IDe;function gd(e){e=y(e,y.EMPTY_OBJECT);let t=e.modelComponents;this._model=e.model,this._components=t,this._pipelineStages=[],this._updateStages=[],this._runtimeNodes=[],this._rootNodes=[],this._skinnedNodes=[],this._runtimeSkins=[],this.modelPipelineStages=[],this._boundingSphere=void 0,this._boundingSphere2D=void 0,this._computedModelMatrix=M.clone(M.IDENTITY),this._computedModelMatrix2D=M.clone(M.IDENTITY),this._axisCorrectionMatrix=jt.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new M),this._runtimeArticulations={},WDe(this)}Object.defineProperties(gd.prototype,{components:{get:function(){return this._components}},computedModelMatrix:{get:function(){return this._computedModelMatrix}},axisCorrectionMatrix:{get:function(){return this._axisCorrectionMatrix}},boundingSphere:{get:function(){return this._boundingSphere}}});function WDe(e){let t=e._components,n=t.scene,o=e._model.modelMatrix;wse(e,o);let r=t.articulations,s=r.length,a=e._runtimeArticulations;for(let V=0;V0&&(m=Eo(n,t,a),t+=a,c>0&&(p=new Uint8Array(e,t,c),t+=c));let g=new Mm(d,u),f=g.getGlobalProperty("POINTS_LENGTH");if(g.featuresLength=f,!l(f))throw new ue("Feature table global property: POINTS_LENGTH must be defined");let x=g.getGlobalProperty("RTC_CENTER",Q.FLOAT,3);l(x)&&(x=h.unpack(x));let _=zDe(g,m);if(_.rtcCenter=x,_.pointsLength=f,!_.hasPositions){let C=KDe(g);_.positions=C,_.hasPositions=_.hasPositions||l(C)}if(!_.hasPositions)throw new ue("Either POSITION or POSITION_QUANTIZED must be defined.");if(!_.hasNormals){let C=QDe(g);_.normals=C,_.hasNormals=_.hasNormals||l(C)}if(!_.hasColors){let C=JDe(g);_.colors=C,_.hasColors=_.hasColors||l(C),_.hasConstantColor=l(_.constantColor),_.isTranslucent=l(C)&&C.isTranslucent}if(!_.hasBatchIds){let C=jDe(g);_.batchIds=C,_.hasBatchIds=_.hasBatchIds||l(C)}if(_.hasBatchIds){let C=g.getGlobalProperty("BATCH_LENGTH");if(!l(C))throw new ue("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");_.batchLength=C}return l(p)&&(p=new Uint8Array(p),_.batchTableJson=m,_.batchTableBinary=p),_};function zDe(e,t){let n=e.json,i,o,r,s=l(n.extensions)?n.extensions["3DTILES_draco_point_compression"]:void 0,a=l(t)&&l(t.extensions)?t.extensions["3DTILES_draco_point_compression"]:void 0;l(a)&&(r=a.properties);let c,d,u,m,p;if(l(s)){o=s.properties;let f=s.byteOffset,x=s.byteLength;if(!l(o)||!l(f)||!l(x))throw new ue("Draco properties, byteOffset, and byteLength must be defined");i=e.buffer.slice(f,f+x),c=l(o.POSITION),d=l(o.RGB)||l(o.RGBA),u=l(o.NORMAL),m=l(o.BATCH_ID),p=l(o.RGBA)}let g;return l(i)&&(g={buffer:i,featureTableProperties:o,batchTableProperties:r,properties:xt(o,r),dequantizeInShader:!0}),{draco:g,hasPositions:c,hasColors:d,isTranslucent:p,hasNormals:u,hasBatchIds:m}}function KDe(e){let t=e.json,n;if(l(t.POSITION))return n=e.getPropertyArray("POSITION",Q.FLOAT,3),{name:Tt.POSITION,semantic:Tt.POSITION,typedArray:n,isQuantized:!1,componentDatatype:Q.FLOAT,type:nn.VEC3};if(l(t.POSITION_QUANTIZED)){n=e.getPropertyArray("POSITION_QUANTIZED",Q.UNSIGNED_SHORT,3);let i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Q.FLOAT,3);if(!l(i))throw new ue("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let o=65535,r=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Q.FLOAT,3);if(!l(r))throw new ue("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");return{name:Tt.POSITION,semantic:Tt.POSITION,typedArray:n,isQuantized:!0,componentDatatype:Q.FLOAT,type:nn.VEC3,quantizedRange:o,quantizedVolumeOffset:h.unpack(r),quantizedVolumeScale:h.unpack(i),quantizedComponentDatatype:Q.UNSIGNED_SHORT,quantizedType:nn.VEC3}}}function JDe(e){let t=e.json,n;if(l(t.RGBA))return n=e.getPropertyArray("RGBA",Q.UNSIGNED_BYTE,4),{name:Tt.COLOR,semantic:Tt.COLOR,setIndex:0,typedArray:n,componentDatatype:Q.UNSIGNED_BYTE,type:nn.VEC4,normalized:!0,isRGB565:!1,isTranslucent:!0};if(l(t.RGB))return n=e.getPropertyArray("RGB",Q.UNSIGNED_BYTE,3),{name:"COLOR",semantic:Tt.COLOR,setIndex:0,typedArray:n,componentDatatype:Q.UNSIGNED_BYTE,type:nn.VEC3,normalized:!0,isRGB565:!1,isTranslucent:!1};if(l(t.RGB565))return n=e.getPropertyArray("RGB565",Q.UNSIGNED_SHORT,1),{name:"COLOR",semantic:Tt.COLOR,setIndex:0,typedArray:n,componentDatatype:Q.FLOAT,type:nn.VEC3,normalized:!1,isRGB565:!0,isTranslucent:!1};if(l(t.CONSTANT_RGBA)){let i=e.getGlobalProperty("CONSTANT_RGBA",Q.UNSIGNED_BYTE,4),o=i[3],r=Y.fromBytes(i[0],i[1],i[2],o),s=o<255;return{name:Tt.COLOR,semantic:Tt.COLOR,setIndex:0,constantColor:r,componentDatatype:Q.FLOAT,type:nn.VEC4,isQuantized:!1,isTranslucent:s}}}function QDe(e){let t=e.json,n;if(l(t.NORMAL))return n=e.getPropertyArray("NORMAL",Q.FLOAT,3),{name:Tt.NORMAL,semantic:Tt.NORMAL,typedArray:n,octEncoded:!1,octEncodedZXY:!1,componentDatatype:Q.FLOAT,type:nn.VEC3};if(l(t.NORMAL_OCT16P))return n=e.getPropertyArray("NORMAL_OCT16P",Q.UNSIGNED_BYTE,2),{name:Tt.NORMAL,semantic:Tt.NORMAL,typedArray:n,octEncoded:!0,octEncodedZXY:!1,quantizedRange:(1<<8)-1,quantizedType:nn.VEC2,quantizedComponentDatatype:Q.UNSIGNED_BYTE,componentDatatype:Q.FLOAT,type:nn.VEC3}}function jDe(e){let t=e.json;if(l(t.BATCH_ID)){let n=e.getPropertyArray("BATCH_ID",Q.UNSIGNED_SHORT,1);return{name:Tt.FEATURE_ID,semantic:Tt.FEATURE_ID,setIndex:0,typedArray:n,componentDatatype:Q.fromTypedArray(n),type:nn.SCALAR}}}var m_=Nse;var qDe=_n.Components,$De=_n.Scene,e3e=_n.Node,t3e=_n.Primitive,n3e=_n.Attribute,kse=_n.Quantization,i3e=_n.FeatureIdAttribute,o3e=_n.Material,r3e=_n.MetallicRoughness;function bg(e){e=y(e,y.EMPTY_OBJECT);let t=e.arrayBuffer,n=y(e.byteOffset,0);this._arrayBuffer=t,this._byteOffset=n,this._loadAttributesFor2D=y(e.loadAttributesFor2D,!1),this._parsedContent=void 0,this._decodePromise=void 0,this._decodedAttributes=void 0,this._promise=void 0,this._error=void 0,this._state=Xt.UNLOADED,this._buffers=[],this._components=void 0,this._transform=M.IDENTITY}l(Object.create)&&(bg.prototype=Object.create(eo.prototype),bg.prototype.constructor=bg);Object.defineProperties(bg.prototype,{cacheKey:{get:function(){}},components:{get:function(){return this._components}},transform:{get:function(){return this._transform}}});bg.prototype.load=function(){if(l(this._promise))return this._promise;this._parsedContent=m_.parse(this._arrayBuffer,this._byteOffset),this._state=Xt.PROCESSING,this._promise=Promise.resolve(this)};bg.prototype.process=function(e){if(l(this._error)){let t=this._error;throw this._error=void 0,t}if(this._state===Xt.READY)return!0;if(this._state===Xt.PROCESSING){if(l(this._decodePromise))return!1;this._decodePromise=s3e(this,e.context)}return!1};function s3e(e,t){let i=e._parsedContent.draco,o;if(l(i)?o=Ap.decodePointCloud(i,t):o=Promise.resolve(),!!l(o))return e._decodePromise=o,o.then(function(r){if(!e.isDestroyed())return l(r)&&a3e(e,i,r),y3e(e,t),e._state=Xt.READY,e}).catch(function(r){e.unload(),e._state=Xt.FAILED;let s="Failed to load Draco pnts";e._error=e.getError(s,r)})}function a3e(e,t,n){e._state=Xt.READY;let i=e._parsedContent,o;if(l(n.POSITION)){if(o={name:"POSITION",semantic:Tt.POSITION,typedArray:n.POSITION.array,componentDatatype:Q.FLOAT,type:nn.VEC3,isQuantized:!1},l(n.POSITION.data.quantization)){let a=n.POSITION.data.quantization,c=a.range,d=h.fromElements(c,c,c),u=h.unpack(a.minValues),m=(1<0&&x3e(e,a,m,t),l(n.rtcCenter)&&(u.transform=M.multiplyByTranslation(u.transform,n.rtcCenter,u.transform));let p=n.positions;l(p)&&p.isQuantized&&(u.transform=M.multiplyByTranslation(u.transform,p.quantizedVolumeOffset,u.transform)),e._components=u,e._parsedContent=void 0,e._arrayBuffer=void 0}function x3e(e,t,n,i){let o=t.attributes,r=n.length;for(let s=0;s=0&&(a=ye)}}}}if(a!==Number.MAX_VALUE){if(s=pn.getPoint(t,a,s),n.mode!==oe.SCENE3D){h.fromElements(s.y,s.z,s.x,s);let u=n.mapProjection,m=u.ellipsoid,p=u.unproject(s,R3e);m.cartographicToCartesian(p,s)}return s}}function QH(e,t,n,i,o,r,s,a,c,d){let u=n+t*i;if(d.x=e[u],d.y=e[u+1],d.z=e[u+2],l(o))if(o.octEncoded){if(d=wn.octDecodeInRange(d,o.normalizationRange,d),o.octEncodedZXY){let m=d.x;d.x=d.z,d.z=d.y,d.y=m}}else d=h.multiplyComponents(d,o.quantizedVolumeStepSize,d),d=h.add(d,o.quantizedVolumeOffset,d);return d=M.multiplyByPoint(r,d,d),s!==1&&hr.getPosition(d,c,s,a,d),d}function lo(e){e=y(e,y.EMPTY_OBJECT),this._loader=e.loader,this._resource=e.resource,this.type=y(e.type,or.GLTF),this.modelMatrix=M.clone(y(e.modelMatrix,M.IDENTITY)),this._modelMatrix=M.clone(this.modelMatrix),this._scale=y(e.scale,1),this._minimumPixelSize=y(e.minimumPixelSize,0),this._maximumScale=e.maximumScale,this._clampedScale=l(this._maximumScale)?Math.min(this._scale,this._maximumScale):this._scale,this._computedScale=this._clampedScale,this._updateModelMatrix=!1,this.referenceMatrix=void 0,this._iblReferenceFrameMatrix=$.clone($.IDENTITY),this._resourcesLoaded=!1,this._drawCommandsBuilt=!1,this._ready=!1,this._customShader=e.customShader,this._content=e.content,this._texturesLoaded=!1,this._defaultTexture=void 0,this._activeAnimations=new oI(this),this._clampAnimations=y(e.clampAnimations,!0),this._userAnimationDirty=!1,this._id=e.id,this._idDirty=!1,this._color=Y.clone(e.color),this._colorBlendMode=y(e.colorBlendMode,rc.HIGHLIGHT),this._colorBlendAmount=y(e.colorBlendAmount,.5);let t=y(e.silhouetteColor,Y.RED);this._silhouetteColor=Y.clone(t),this._silhouetteSize=y(e.silhouetteSize,0),this._silhouetteDirty=!1,this._silhouetteId=void 0,this._cull=y(e.cull,!0),this._opaquePass=y(e.opaquePass,Re.OPAQUE),this._allowPicking=y(e.allowPicking,!0),this._show=y(e.show,!0),this._style=void 0,this._styleDirty=!1,this._styleCommandsNeeded=void 0;let n=y(e.featureIdLabel,"featureId_0");typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=y(e.instanceFeatureIdLabel,"instanceFeatureId_0");typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i,this._featureTables=[],this._featureTableId=void 0,this._featureTableIdDirty=!0,this._pipelineResources=[],this._modelResources=[],this._pickIds=[],this._boundingSphere=new le,this._initialRadius=void 0,this._heightReference=y(e.heightReference,Je.NONE),this._heightDirty=this._heightReference!==Je.NONE,this._removeUpdateHeightCallback=void 0,this._verticalExaggerationOn=!1,this._clampedModelMatrix=void 0;let o=e.scene;l(o)&&l(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener(()=>{this._heightDirty=!0})),this._scene=o,this._distanceDisplayCondition=e.distanceDisplayCondition;let r=new sf(e.pointCloudShading);this._pointCloudShading=r,this._attenuation=r.attenuation,this._pointCloudBackFaceCulling=r.backFaceCulling;let s=e.clippingPlanes;l(s)&&s.owner===void 0?ss.setOwner(s,this,"_clippingPlanes"):this._clippingPlanes=s,this._clippingPlanesState=0,this._clippingPlanesMatrix=M.clone(M.IDENTITY);let a=e.clippingPolygons;l(a)&&a.owner===void 0?vm.setOwner(a,this,"_clippingPolygons"):this._clippingPolygons=a,this._clippingPolygonsState=0,this._lightColor=h.clone(e.lightColor),this._imageBasedLighting=l(e.imageBasedLighting)?e.imageBasedLighting:new Wx,this._shouldDestroyImageBasedLighting=!l(e.imageBasedLighting),this._backFaceCulling=y(e.backFaceCulling,!0),this._backFaceCullingDirty=!1,this._shadows=y(e.shadows,xn.ENABLED),this._shadowsDirty=!1,this._debugShowBoundingVolumeDirty=!1,this._debugShowBoundingVolume=y(e.debugShowBoundingVolume,!1),this._enableDebugWireframe=y(e.enableDebugWireframe,!1),this._enableShowOutline=y(e.enableShowOutline,!0),this._debugWireframe=y(e.debugWireframe,!1),this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===or.GLTF&&At("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltf, otherwise debugWireframe will be ignored.");let c=e.credit;typeof c=="string"&&(c=new Vt(c)),this._credits=[],this._credit=c,this._resourceCredits=[],this._gltfCredits=[],this._showCreditsOnScreen=y(e.showCreditsOnScreen,!1),this._showCreditsOnScreenDirty=!0,this._splitDirection=y(e.splitDirection,zc.NONE),this._enableShowOutline=y(e.enableShowOutline,!0),this.showOutline=y(e.showOutline,!0),this.outlineColor=y(e.outlineColor,Y.BLACK),this._classificationType=e.classificationType,this._statistics=new FW,this._sceneMode=void 0,this._projectTo2D=y(e.projectTo2D,!1),this._enablePick=y(e.enablePick,!1),this._fogRenderable=void 0,this._skipLevelOfDetail=!1,this._ignoreCommands=y(e.ignoreCommands,!1),this._errorEvent=new ge,this._readyEvent=new ge,this._texturesReadyEvent=new ge,this._sceneGraph=void 0,this._nodesByName={},this.pickObject=e.pickObject}function jH(e,t){if(e._errorEvent.numberOfListeners>0){e._errorEvent.raiseEvent(t);return}console.log(t)}function G3e(e,t){let n=e._featureTables,i=t.propertyTables,o=i.length;for(let r=0;r0&&t===0||e===0&&t>0;this._silhouetteDirty=this._silhouetteDirty||n,this._backFaceCullingDirty=this._backFaceCullingDirty||n}this._silhouetteSize=e}},boundingSphere:{get:function(){let e=l(this._clampedModelMatrix)?this._clampedModelMatrix:this.modelMatrix;return Ose(this,e),this._boundingSphere}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolumeDirty=!0),this._debugShowBoundingVolume=e}},debugWireframe:{get:function(){return this._debugWireframe},set:function(e){this._debugWireframe!==e&&this.resetDrawCommands(),this._debugWireframe=e,this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===or.GLTF&&At("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltfAsync, otherwise debugWireframe will be ignored.")}},show:{get:function(){return this._show},set:function(e){this._show=e}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){typeof e=="number"&&(e=`featureId_${e}`),e!==this._featureIdLabel&&(this._featureTableIdDirty=!0),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){typeof e=="number"&&(e=`instanceFeatureId_${e}`),e!==this._instanceFeatureIdLabel&&(this._featureTableIdDirty=!0),this._instanceFeatureIdLabel=e}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&(ss.setOwner(e,this,"_clippingPlanes"),this.resetDrawCommands())}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){e!==this._clippingPolygons&&(vm.setOwner(e,this,"_clippingPolygons"),this.resetDrawCommands())}},lightColor:{get:function(){return this._lightColor},set:function(e){l(e)!==l(this._lightColor)&&this.resetDrawCommands(),this._lightColor=h.clone(e,this._lightColor)}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1,this.resetDrawCommands())}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){e!==this._backFaceCulling&&(this._backFaceCullingDirty=!0),this._backFaceCulling=e}},scale:{get:function(){return this._scale},set:function(e){e!==this._scale&&(this._updateModelMatrix=!0),this._scale=e}},computedScale:{get:function(){return this._computedScale}},minimumPixelSize:{get:function(){return this._minimumPixelSize},set:function(e){e!==this._minimumPixelSize&&(this._updateModelMatrix=!0),this._minimumPixelSize=e}},maximumScale:{get:function(){return this._maximumScale},set:function(e){e!==this._maximumScale&&(this._updateModelMatrix=!0),this._maximumScale=e}},shadows:{get:function(){return this._shadows},set:function(e){e!==this._shadows&&(this._shadowsDirty=!0),this._shadows=e}},credit:{get:function(){return this._credit}},showCreditsOnScreen:{get:function(){return this._showCreditsOnScreen},set:function(e){this._showCreditsOnScreen!==e&&(this._showCreditsOnScreenDirty=!0),this._showCreditsOnScreen=e}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&this.resetDrawCommands(),this._splitDirection=e}},classificationType:{get:function(){return this._classificationType}},pickIds:{get:function(){return this._pickIds}},styleCommandsNeeded:{get:function(){return this._styleCommandsNeeded}}});lo.prototype.getNode=function(e){return this._nodesByName[e]};lo.prototype.setArticulationStage=function(e,t){this._sceneGraph.setArticulationStage(e,t)};lo.prototype.applyArticulations=function(){this._sceneGraph.applyArticulations()};lo.prototype.makeStyleDirty=function(){this._styleDirty=!0};lo.prototype.resetDrawCommands=function(){this._drawCommandsBuilt=!1};var X3e=new M,I3e=new $,W3e=new M;lo.prototype.update=function(e){let t=!1;try{t=P3e(this,e)}catch(n){if(!this._loader.incrementallyLoadTextures&&n.name==="TextureError")jH(this,n);else{let i=jt.getError("model",this._resource,n);jH(this,i)}}if(v3e(this,e),w3e(this,e),!this._resourcesLoaded&&t){this._resourcesLoaded=!0;let n=this._loader.components;if(!l(n)){if(this._loader.isUnloaded())return;let r=jt.getError("model",this._resource,new ue("Failed to load model."));jH(r),this._rejectLoad=this._rejectLoad&&this._rejectLoad(r)}let i=n.structuralMetadata;l(i)&&i.propertyTableCount>0&&G3e(this,i);let o=new wW({model:this,modelComponents:n});this._sceneGraph=o,this._gltfCredits=o.components.asset.credits}if(!(!this._resourcesLoaded||e.mode===oe.MORPHING)){if(F3e(this),A3e(this),M3e(this,e),N3e(this),k3e(this,e),U3e(this,e),D3e(this,e),B3e(this,e),Y3e(this,e),O3e(this,e),H3e(this,e),this._defaultTexture=e.context.defaultTexture,z3e(this,e),K3e(this,e),J3e(this),Q3e(this,e),eBe(this,e),!this._ready){e.afterRender.push(()=>{this._ready=!0,this._readyEvent.raiseEvent(this)});return}this._loader.incrementallyLoadTextures&&!this._texturesLoaded&&this._loader.texturesLoaded&&(this.resetDrawCommands(),this._texturesLoaded=!0,this._texturesReadyEvent.raiseEvent(this)),q3e(this),tBe(this,e),nBe(this),iBe(this,e)}};function P3e(e,t){return!e._resourcesLoaded||e._loader.incrementallyLoadTextures&&!e._texturesLoaded?(t.afterRender.push(()=>!0),e._loader.process(t)):!0}function v3e(e,t){l(e._customShader)&&e._customShader.update(t)}function w3e(e,t){e._imageBasedLighting.update(t),e._imageBasedLighting.shouldRegenerateShaders&&e.resetDrawCommands()}function F3e(e){if(!e._featureTableIdDirty)return;e._featureTableIdDirty=!1;let t=e._sceneGraph.components,n=t.structuralMetadata;l(n)&&n.propertyTableCount>0&&(e.featureTableId=E3e(t,e),e._styleDirty=!0,e.resetDrawCommands())}function A3e(e){e._styleDirty&&(e.applyStyle(e._style),e._styleDirty=!1)}function M3e(e,t){let n=e._featureTables,i=n.length,o=!1;for(let r=0;r=i&&r<=o}function aBe(e,t){let n=t.creditDisplay,i=e._credits,o=i.length;for(let r=0;r0&&e.alpha<1};lo.prototype.isInvisible=function(){let e=this.color;return l(e)&&e.alpha===0};function Hse(e){return e.context.stencilBuffer}lo.prototype.hasSilhouette=function(e){return Hse(e)&&this._silhouetteSize>0&&this._silhouetteColor.alpha>0&&!l(this._classificationType)};lo.prototype.hasSkipLevelOfDetail=function(e){if(!or.is3DTiles(this.type))return!1;let t=e.context.stencilBuffer,n=this._content.tileset;return t&&n.isSkippingLevelOfDetail};lo.prototype.isClippingEnabled=function(){let e=this._clippingPlanes;return l(e)&&e.enabled&&e.length!==0};lo.prototype.pick=function(e,t,n,i,o){return YC(this,e,t,n,i,o)};lo.prototype.isClippingPolygonsEnabled=function(){let e=this._clippingPolygons;return l(e)&&e.enabled&&e.length!==0};lo.prototype.isDestroyed=function(){return!1};lo.prototype.destroy=function(){let e=this._loader;l(e)&&e.destroy();let t=this._featureTables;if(l(t)){let o=t.length;for(let r=0;r0,i=l(this.structuralMetadata)?this.structuralMetadata.propertyAttributes:void 0,o=l(i)&&l(i[0]);if(t&&(!n||o)){this.resetDrawCommands();return}n?(this.featureTables[this.featureTableId].applyStyle(e),Yse(this,e)):(this.applyColorAndShow(e),this._styleCommandsNeeded=void 0)};function NW(e,t,n){return{loader:e,type:t,resource:n.resource,show:n.show,modelMatrix:n.modelMatrix,scale:n.scale,minimumPixelSize:n.minimumPixelSize,maximumScale:n.maximumScale,id:n.id,allowPicking:n.allowPicking,clampAnimations:n.clampAnimations,shadows:n.shadows,debugShowBoundingVolume:n.debugShowBoundingVolume,enableDebugWireframe:n.enableDebugWireframe,debugWireframe:n.debugWireframe,cull:n.cull,opaquePass:n.opaquePass,customShader:n.customShader,content:n.content,heightReference:n.heightReference,scene:n.scene,distanceDisplayCondition:n.distanceDisplayCondition,color:n.color,colorBlendAmount:n.colorBlendAmount,colorBlendMode:n.colorBlendMode,silhouetteColor:n.silhouetteColor,silhouetteSize:n.silhouetteSize,enableShowOutline:n.enableShowOutline,showOutline:n.showOutline,outlineColor:n.outlineColor,clippingPlanes:n.clippingPlanes,clippingPolygons:n.clippingPolygons,lightColor:n.lightColor,imageBasedLighting:n.imageBasedLighting,backFaceCulling:n.backFaceCulling,credit:n.credit,showCreditsOnScreen:n.showCreditsOnScreen,splitDirection:n.splitDirection,projectTo2D:n.projectTo2D,enablePick:n.enablePick,featureIdLabel:n.featureIdLabel,instanceFeatureIdLabel:n.instanceFeatureIdLabel,pointCloudShading:n.pointCloudShading,classificationType:n.classificationType,pickObject:n.pickObject}}var Um=lo;function ps(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this._model=void 0,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(ps.prototype,{featuresLength:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;return l(t)&&l(t[n])?t[n].featuresLength:0}},pointsLength:{get:function(){return this._model.statistics.pointsLength}},trianglesLength:{get:function(){return this._model.statistics.trianglesLength}},geometryByteLength:{get:function(){return this._model.statistics.geometryByteLength}},texturesByteLength:{get:function(){return this._model.statistics.texturesByteLength}},batchTableByteLength:{get:function(){let e=this._model.statistics;return e.propertyTablesByteLength+e.batchTexturesByteLength}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;if(l(t)&&l(t[n]))return t[n]}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});ps.prototype.getFeature=function(e){let t=this._model,n=t.featureTableId;return t.featureTables[n].getFeature(e)};ps.prototype.hasProperty=function(e,t){let n=this._model,i=n.featureTableId;return l(i)?n.featureTables[i].hasProperty(e,t):!1};ps.prototype.applyDebugSettings=function(e,t){t=e?t:Y.WHITE,this.featuresLength===0?this._model.color=t:l(this.batchTable)&&this.batchTable.setAllColor(t)};ps.prototype.applyStyle=function(e){this._model.style=e};ps.prototype.update=function(e,t){let n=this._model,i=this._tile;n.colorBlendAmount=e.colorBlendAmount,n.colorBlendMode=e.colorBlendMode,n.modelMatrix=i.computedTransform,n.customShader=e.customShader,n.featureIdLabel=e.featureIdLabel,n.instanceFeatureIdLabel=e.instanceFeatureIdLabel,n.lightColor=e.lightColor,n.imageBasedLighting=e.imageBasedLighting,n.backFaceCulling=e.backFaceCulling,n.shadows=e.shadows,n.showCreditsOnScreen=e.showCreditsOnScreen,n.splitDirection=e.splitDirection,n.debugWireframe=e.debugWireframe,n.showOutline=e.showOutline,n.outlineColor=e.outlineColor,n.pointCloudShading=e.pointCloudShading;let o=e.clippingPlanes;n.referenceMatrix=e.clippingPlanesOriginMatrix,l(o)&&i.clippingPlanesDirty&&(n._clippingPlanes=o.enabled&&i._isClipped?o:void 0),l(o)&&l(n._clippingPlanes)&&n._clippingPlanes!==o&&(n._clippingPlanes=o,n._clippingPlanesState=0);let r=e.clippingPolygons;l(r)&&i.clippingPolygonsDirty&&(n._clippingPolygons=r.enabled&&i._isClippedByPolygon?r:void 0),l(r)&&l(n._clippingPolygons)&&n._clippingPolygons!==r&&(n._clippingPolygons=r,n._clippingPolygonsState=0),n.update(t),!this._ready&&n.ready&&(n.activeAnimations.addAll({loop:Wl.REPEAT}),this._ready=!0)};ps.prototype.isDestroyed=function(){return!1};ps.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),me(this)};ps.fromGltf=async function(e,t,n,i){let o=new ps(e,t,n),s=kW(e,t,o,{gltf:i,basePath:n}),a=e.vectorClassificationOnly?void 0:e.classificationType;s.classificationType=a;let c=await Um.fromGltfAsync(s);return o._model=c,o};ps.fromB3dm=async function(e,t,n,i,o){let r=new ps(e,t,n),a=kW(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=e.vectorClassificationOnly?void 0:e.classificationType;a.classificationType=c;let d=await Um.fromB3dm(a);return r._model=d,r};ps.fromI3dm=async function(e,t,n,i,o){let r=new ps(e,t,n),a=kW(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=await Um.fromI3dm(a);return r._model=c,r};ps.fromPnts=async function(e,t,n,i,o){let r=new ps(e,t,n),a=kW(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=await Um.fromPnts(a);return r._model=c,r};ps.fromGeoJson=async function(e,t,n,i){let o=new ps(e,t,n),s=kW(e,t,o,{geoJson:i,resource:n}),a=await Um.fromGeoJson(s);return o._model=a,o};ps.prototype.pick=function(e,t,n){if(!l(this._model)||!this._ready)return;let i=t.verticalExaggeration,o=t.verticalExaggerationRelativeHeight;return this._model.pick(e,t,i,o,ie.WGS84,n)};function kW(e,t,n,i){let o={cull:!1,releaseGltfJson:!0,opaquePass:Re.CESIUM_3D_TILE,modelMatrix:t.computedTransform,upAxis:e._modelUpAxis,forwardAxis:e._modelForwardAxis,incrementallyLoadTextures:!1,customShader:e.customShader,content:n,colorBlendMode:e.colorBlendMode,colorBlendAmount:e.colorBlendAmount,lightColor:e.lightColor,imageBasedLighting:e.imageBasedLighting,featureIdLabel:e.featureIdLabel,instanceFeatureIdLabel:e.instanceFeatureIdLabel,pointCloudShading:e.pointCloudShading,clippingPlanes:e.clippingPlanes,backFaceCulling:e.backFaceCulling,shadows:e.shadows,showCreditsOnScreen:e.showCreditsOnScreen,splitDirection:e.splitDirection,enableDebugWireframe:e._enableDebugWireframe,debugWireframe:e.debugWireframe,projectTo2D:e._projectTo2D,enablePick:e._enablePick,enableShowOutline:e._enableShowOutline,showOutline:e.showOutline,outlineColor:e.outlineColor};return xt(i,o)}var cf=ps;var SEn=T(S(),1);function xu(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(xu.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});xu.fromJson=function(e,t,n,i){let o=new xu(e,t,n);return o._tileset.loadTileset(o._resource,i,o._tile),o._ready=!0,o};xu.prototype.hasProperty=function(e,t){return!1};xu.prototype.getFeature=function(e){};xu.prototype.applyDebugSettings=function(e,t){};xu.prototype.applyStyle=function(e){};xu.prototype.update=function(e,t){};xu.prototype.pick=function(e,t,n){};xu.prototype.isDestroyed=function(){return!1};xu.prototype.destroy=function(){return me(this)};var UW=xu;var Fvn=T(S(),1);var w2n=T(S(),1);var nIn=T(S(),1);var WEn=T(S(),1);function ws(e,t,n,i){let o=ws._verifyAttributes(t);n=y(n,0);let r=[],s={},a,c,d=o.length;for(let m=0;m0?Q.getSizeInBytes(e[0].componentDatatype):0,o=i>0?t%i:0,r=o===0?0:i-o;return t+=r,t};ws._createArrayViews=function(e,t){let n=[],i=0,o=e.length;for(let r=0;r0){let n=new ArrayBuffer(t*e.vertexSizeInBytes);if(l(e.arrayBuffer)){let r=new Uint8Array(n),s=new Uint8Array(e.arrayBuffer),a=s.length;for(let c=0;c0){t.needsCommit=!1;let n=t.vertexBuffer,i=e._size*t.vertexSizeInBytes,o=l(n);if(!o||n.sizeInBytes0){let i=e.vertexSizeInBytes*t,o=e.vertexSizeInBytes*n;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,i,o),i)}}ws.prototype.endSubCommits=function(){let e=this._allBuffers;for(let t=0,n=e.length;t0&&(m=Eo(n,t,a),t+=a,c>0&&(p=new Uint8Array(e,t,c),t+=c));let g=new Am(d,u),f=g.getGlobalProperty("POINTS_LENGTH");if(g.featuresLength=f,!l(f))throw new ue("Feature table global property: POINTS_LENGTH must be defined");let x=g.getGlobalProperty("RTC_CENTER",Q.FLOAT,3);l(x)&&(x=h.unpack(x));let _=YDe(g,m);if(_.rtcCenter=x,_.pointsLength=f,!_.hasPositions){let C=ODe(g);_.positions=C,_.hasPositions=_.hasPositions||l(C)}if(!_.hasPositions)throw new ue("Either POSITION or POSITION_QUANTIZED must be defined.");if(!_.hasNormals){let C=KDe(g);_.normals=C,_.hasNormals=_.hasNormals||l(C)}if(!_.hasColors){let C=zDe(g);_.colors=C,_.hasColors=_.hasColors||l(C),_.hasConstantColor=l(_.constantColor),_.isTranslucent=l(C)&&C.isTranslucent}if(!_.hasBatchIds){let C=HDe(g);_.batchIds=C,_.hasBatchIds=_.hasBatchIds||l(C)}if(_.hasBatchIds){let C=g.getGlobalProperty("BATCH_LENGTH");if(!l(C))throw new ue("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");_.batchLength=C}return l(p)&&(p=new Uint8Array(p),_.batchTableJson=m,_.batchTableBinary=p),_};function YDe(e,t){let n=e.json,i,o,r,s=l(n.extensions)?n.extensions["3DTILES_draco_point_compression"]:void 0,a=l(t)&&l(t.extensions)?t.extensions["3DTILES_draco_point_compression"]:void 0;l(a)&&(r=a.properties);let c,d,u,m,p;if(l(s)){o=s.properties;let f=s.byteOffset,x=s.byteLength;if(!l(o)||!l(f)||!l(x))throw new ue("Draco properties, byteOffset, and byteLength must be defined");i=e.buffer.slice(f,f+x),c=l(o.POSITION),d=l(o.RGB)||l(o.RGBA),u=l(o.NORMAL),m=l(o.BATCH_ID),p=l(o.RGBA)}let g;return l(i)&&(g={buffer:i,featureTableProperties:o,batchTableProperties:r,properties:xt(o,r),dequantizeInShader:!0}),{draco:g,hasPositions:c,hasColors:d,isTranslucent:p,hasNormals:u,hasBatchIds:m}}function ODe(e){let t=e.json,n;if(l(t.POSITION))return n=e.getPropertyArray("POSITION",Q.FLOAT,3),{name:St.POSITION,semantic:St.POSITION,typedArray:n,isQuantized:!1,componentDatatype:Q.FLOAT,type:nn.VEC3};if(l(t.POSITION_QUANTIZED)){n=e.getPropertyArray("POSITION_QUANTIZED",Q.UNSIGNED_SHORT,3);let i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Q.FLOAT,3);if(!l(i))throw new ue("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let o=65535,r=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Q.FLOAT,3);if(!l(r))throw new ue("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");return{name:St.POSITION,semantic:St.POSITION,typedArray:n,isQuantized:!0,componentDatatype:Q.FLOAT,type:nn.VEC3,quantizedRange:o,quantizedVolumeOffset:h.unpack(r),quantizedVolumeScale:h.unpack(i),quantizedComponentDatatype:Q.UNSIGNED_SHORT,quantizedType:nn.VEC3}}}function zDe(e){let t=e.json,n;if(l(t.RGBA))return n=e.getPropertyArray("RGBA",Q.UNSIGNED_BYTE,4),{name:St.COLOR,semantic:St.COLOR,setIndex:0,typedArray:n,componentDatatype:Q.UNSIGNED_BYTE,type:nn.VEC4,normalized:!0,isRGB565:!1,isTranslucent:!0};if(l(t.RGB))return n=e.getPropertyArray("RGB",Q.UNSIGNED_BYTE,3),{name:"COLOR",semantic:St.COLOR,setIndex:0,typedArray:n,componentDatatype:Q.UNSIGNED_BYTE,type:nn.VEC3,normalized:!0,isRGB565:!1,isTranslucent:!1};if(l(t.RGB565))return n=e.getPropertyArray("RGB565",Q.UNSIGNED_SHORT,1),{name:"COLOR",semantic:St.COLOR,setIndex:0,typedArray:n,componentDatatype:Q.FLOAT,type:nn.VEC3,normalized:!1,isRGB565:!0,isTranslucent:!1};if(l(t.CONSTANT_RGBA)){let i=e.getGlobalProperty("CONSTANT_RGBA",Q.UNSIGNED_BYTE,4),o=i[3],r=Y.fromBytes(i[0],i[1],i[2],o),s=o<255;return{name:St.COLOR,semantic:St.COLOR,setIndex:0,constantColor:r,componentDatatype:Q.FLOAT,type:nn.VEC4,isQuantized:!1,isTranslucent:s}}}function KDe(e){let t=e.json,n;if(l(t.NORMAL))return n=e.getPropertyArray("NORMAL",Q.FLOAT,3),{name:St.NORMAL,semantic:St.NORMAL,typedArray:n,octEncoded:!1,octEncodedZXY:!1,componentDatatype:Q.FLOAT,type:nn.VEC3};if(l(t.NORMAL_OCT16P))return n=e.getPropertyArray("NORMAL_OCT16P",Q.UNSIGNED_BYTE,2),{name:St.NORMAL,semantic:St.NORMAL,typedArray:n,octEncoded:!0,octEncodedZXY:!1,quantizedRange:(1<<8)-1,quantizedType:nn.VEC2,quantizedComponentDatatype:Q.UNSIGNED_BYTE,componentDatatype:Q.FLOAT,type:nn.VEC3}}function HDe(e){let t=e.json;if(l(t.BATCH_ID)){let n=e.getPropertyArray("BATCH_ID",Q.UNSIGNED_SHORT,1);return{name:St.FEATURE_ID,semantic:St.FEATURE_ID,setIndex:0,typedArray:n,componentDatatype:Q.fromTypedArray(n),type:nn.SCALAR}}}var u_=Dse;var JDe=_n.Components,QDe=_n.Scene,jDe=_n.Node,qDe=_n.Primitive,$De=_n.Attribute,Bse=_n.Quantization,eBe=_n.FeatureIdAttribute,tBe=_n.Material,nBe=_n.MetallicRoughness;function pg(e){e=y(e,y.EMPTY_OBJECT);let t=e.arrayBuffer,n=y(e.byteOffset,0);this._arrayBuffer=t,this._byteOffset=n,this._loadAttributesFor2D=y(e.loadAttributesFor2D,!1),this._parsedContent=void 0,this._decodePromise=void 0,this._decodedAttributes=void 0,this._promise=void 0,this._error=void 0,this._state=Wt.UNLOADED,this._buffers=[],this._components=void 0,this._transform=A.IDENTITY}l(Object.create)&&(pg.prototype=Object.create(eo.prototype),pg.prototype.constructor=pg);Object.defineProperties(pg.prototype,{cacheKey:{get:function(){}},components:{get:function(){return this._components}},transform:{get:function(){return this._transform}}});pg.prototype.load=function(){if(l(this._promise))return this._promise;this._parsedContent=u_.parse(this._arrayBuffer,this._byteOffset),this._state=Wt.PROCESSING,this._promise=Promise.resolve(this)};pg.prototype.process=function(e){if(l(this._error)){let t=this._error;throw this._error=void 0,t}if(this._state===Wt.READY)return!0;if(this._state===Wt.PROCESSING){if(l(this._decodePromise))return!1;this._decodePromise=iBe(this,e.context)}return!1};function iBe(e,t){let i=e._parsedContent.draco,o;if(l(i)?o=Fp.decodePointCloud(i,t):o=Promise.resolve(),!!l(o))return e._decodePromise=o,o.then(function(r){if(!e.isDestroyed())return l(r)&&oBe(e,i,r),pBe(e,t),e._state=Wt.READY,e}).catch(function(r){e.unload(),e._state=Wt.FAILED;let s="Failed to load Draco pnts";e._error=e.getError(s,r)})}function oBe(e,t,n){e._state=Wt.READY;let i=e._parsedContent,o;if(l(n.POSITION)){if(o={name:"POSITION",semantic:St.POSITION,typedArray:n.POSITION.array,componentDatatype:Q.FLOAT,type:nn.VEC3,isQuantized:!1},l(n.POSITION.data.quantization)){let a=n.POSITION.data.quantization,c=a.range,d=h.fromElements(c,c,c),u=h.unpack(a.minValues),m=(1<0&&bBe(e,a,m,t),l(n.rtcCenter)&&(u.transform=A.multiplyByTranslation(u.transform,n.rtcCenter,u.transform));let p=n.positions;l(p)&&p.isQuantized&&(u.transform=A.multiplyByTranslation(u.transform,p.quantizedVolumeOffset,u.transform)),e._components=u,e._parsedContent=void 0,e._arrayBuffer=void 0}function bBe(e,t,n,i){let o=t.attributes,r=n.length;for(let s=0;s=0&&(a=ye)}}}}if(a!==Number.MAX_VALUE){if(s=pn.getPoint(t,a,s),n.mode!==oe.SCENE3D){h.fromElements(s.y,s.z,s.x,s);let u=n.mapProjection,m=u.ellipsoid,p=u.unproject(s,CBe);m.cartographicToCartesian(p,s)}return s}}function jz(e,t,n,i,o,r,s,a,c,d){let u=n+t*i;if(d.x=e[u],d.y=e[u+1],d.z=e[u+2],l(o))if(o.octEncoded){if(d=wn.octDecodeInRange(d,o.normalizationRange,d),o.octEncodedZXY){let m=d.x;d.x=d.z,d.z=d.y,d.y=m}}else d=h.multiplyComponents(d,o.quantizedVolumeStepSize,d),d=h.add(d,o.quantizedVolumeOffset,d);return d=A.multiplyByPoint(r,d,d),s!==1&&fr.getPosition(d,c,s,a,d),d}function lo(e){e=y(e,y.EMPTY_OBJECT),this._loader=e.loader,this._resource=e.resource,this.type=y(e.type,rr.GLTF),this.modelMatrix=A.clone(y(e.modelMatrix,A.IDENTITY)),this._modelMatrix=A.clone(this.modelMatrix),this._scale=y(e.scale,1),this._minimumPixelSize=y(e.minimumPixelSize,0),this._maximumScale=e.maximumScale,this._clampedScale=l(this._maximumScale)?Math.min(this._scale,this._maximumScale):this._scale,this._computedScale=this._clampedScale,this._updateModelMatrix=!1,this.referenceMatrix=void 0,this._iblReferenceFrameMatrix=$.clone($.IDENTITY),this._resourcesLoaded=!1,this._drawCommandsBuilt=!1,this._ready=!1,this._customShader=e.customShader,this._content=e.content,this._texturesLoaded=!1,this._defaultTexture=void 0,this._activeAnimations=new oI(this),this._clampAnimations=y(e.clampAnimations,!0),this._userAnimationDirty=!1,this._id=e.id,this._idDirty=!1,this._color=Y.clone(e.color),this._colorBlendMode=y(e.colorBlendMode,sc.HIGHLIGHT),this._colorBlendAmount=y(e.colorBlendAmount,.5);let t=y(e.silhouetteColor,Y.RED);this._silhouetteColor=Y.clone(t),this._silhouetteSize=y(e.silhouetteSize,0),this._silhouetteDirty=!1,this._silhouetteId=void 0,this._cull=y(e.cull,!0),this._opaquePass=y(e.opaquePass,Le.OPAQUE),this._allowPicking=y(e.allowPicking,!0),this._show=y(e.show,!0),this._style=void 0,this._styleDirty=!1,this._styleCommandsNeeded=void 0;let n=y(e.featureIdLabel,"featureId_0");typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=y(e.instanceFeatureIdLabel,"instanceFeatureId_0");typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i,this._featureTables=[],this._featureTableId=void 0,this._featureTableIdDirty=!0,this._pipelineResources=[],this._modelResources=[],this._pickIds=[],this._boundingSphere=new le,this._initialRadius=void 0,this._heightReference=y(e.heightReference,Je.NONE),this._heightDirty=this._heightReference!==Je.NONE,this._removeUpdateHeightCallback=void 0,this._verticalExaggerationOn=!1,this._clampedModelMatrix=void 0;let o=e.scene;l(o)&&l(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener(()=>{this._heightDirty=!0})),this._scene=o,this._distanceDisplayCondition=e.distanceDisplayCondition;let r=new rf(e.pointCloudShading);this._pointCloudShading=r,this._attenuation=r.attenuation,this._pointCloudBackFaceCulling=r.backFaceCulling;let s=e.clippingPlanes;l(s)&&s.owner===void 0?as.setOwner(s,this,"_clippingPlanes"):this._clippingPlanes=s,this._clippingPlanesState=0,this._clippingPlanesMatrix=A.clone(A.IDENTITY);let a=e.clippingPolygons;l(a)&&a.owner===void 0?Pm.setOwner(a,this,"_clippingPolygons"):this._clippingPolygons=a,this._clippingPolygonsState=0,this._lightColor=h.clone(e.lightColor),this._imageBasedLighting=l(e.imageBasedLighting)?e.imageBasedLighting:new Ix,this._shouldDestroyImageBasedLighting=!l(e.imageBasedLighting),this._backFaceCulling=y(e.backFaceCulling,!0),this._backFaceCullingDirty=!1,this._shadows=y(e.shadows,xn.ENABLED),this._shadowsDirty=!1,this._debugShowBoundingVolumeDirty=!1,this._debugShowBoundingVolume=y(e.debugShowBoundingVolume,!1),this._enableDebugWireframe=y(e.enableDebugWireframe,!1),this._enableShowOutline=y(e.enableShowOutline,!0),this._debugWireframe=y(e.debugWireframe,!1),this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===rr.GLTF&&At("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltf, otherwise debugWireframe will be ignored.");let c=e.credit;typeof c=="string"&&(c=new Vt(c)),this._credits=[],this._credit=c,this._resourceCredits=[],this._gltfCredits=[],this._showCreditsOnScreen=y(e.showCreditsOnScreen,!1),this._showCreditsOnScreenDirty=!0,this._splitDirection=y(e.splitDirection,zc.NONE),this._enableShowOutline=y(e.enableShowOutline,!0),this.showOutline=y(e.showOutline,!0),this.outlineColor=y(e.outlineColor,Y.BLACK),this._classificationType=e.classificationType,this._statistics=new FX,this._sceneMode=void 0,this._projectTo2D=y(e.projectTo2D,!1),this._enablePick=y(e.enablePick,!1),this._fogRenderable=void 0,this._skipLevelOfDetail=!1,this._ignoreCommands=y(e.ignoreCommands,!1),this._errorEvent=new ge,this._readyEvent=new ge,this._texturesReadyEvent=new ge,this._sceneGraph=void 0,this._nodesByName={},this.pickObject=e.pickObject}function qz(e,t){if(e._errorEvent.numberOfListeners>0){e._errorEvent.raiseEvent(t);return}console.log(t)}function ZBe(e,t){let n=e._featureTables,i=t.propertyTables,o=i.length;for(let r=0;r0&&t===0||e===0&&t>0;this._silhouetteDirty=this._silhouetteDirty||n,this._backFaceCullingDirty=this._backFaceCullingDirty||n}this._silhouetteSize=e}},boundingSphere:{get:function(){let e=l(this._clampedModelMatrix)?this._clampedModelMatrix:this.modelMatrix;return Hse(this,e),this._boundingSphere}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolumeDirty=!0),this._debugShowBoundingVolume=e}},debugWireframe:{get:function(){return this._debugWireframe},set:function(e){this._debugWireframe!==e&&this.resetDrawCommands(),this._debugWireframe=e,this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===rr.GLTF&&At("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltfAsync, otherwise debugWireframe will be ignored.")}},show:{get:function(){return this._show},set:function(e){this._show=e}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){typeof e=="number"&&(e=`featureId_${e}`),e!==this._featureIdLabel&&(this._featureTableIdDirty=!0),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){typeof e=="number"&&(e=`instanceFeatureId_${e}`),e!==this._instanceFeatureIdLabel&&(this._featureTableIdDirty=!0),this._instanceFeatureIdLabel=e}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&(as.setOwner(e,this,"_clippingPlanes"),this.resetDrawCommands())}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){e!==this._clippingPolygons&&(Pm.setOwner(e,this,"_clippingPolygons"),this.resetDrawCommands())}},lightColor:{get:function(){return this._lightColor},set:function(e){l(e)!==l(this._lightColor)&&this.resetDrawCommands(),this._lightColor=h.clone(e,this._lightColor)}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1,this.resetDrawCommands())}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){e!==this._backFaceCulling&&(this._backFaceCullingDirty=!0),this._backFaceCulling=e}},scale:{get:function(){return this._scale},set:function(e){e!==this._scale&&(this._updateModelMatrix=!0),this._scale=e}},computedScale:{get:function(){return this._computedScale}},minimumPixelSize:{get:function(){return this._minimumPixelSize},set:function(e){e!==this._minimumPixelSize&&(this._updateModelMatrix=!0),this._minimumPixelSize=e}},maximumScale:{get:function(){return this._maximumScale},set:function(e){e!==this._maximumScale&&(this._updateModelMatrix=!0),this._maximumScale=e}},shadows:{get:function(){return this._shadows},set:function(e){e!==this._shadows&&(this._shadowsDirty=!0),this._shadows=e}},credit:{get:function(){return this._credit}},showCreditsOnScreen:{get:function(){return this._showCreditsOnScreen},set:function(e){this._showCreditsOnScreen!==e&&(this._showCreditsOnScreenDirty=!0),this._showCreditsOnScreen=e}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&this.resetDrawCommands(),this._splitDirection=e}},classificationType:{get:function(){return this._classificationType}},pickIds:{get:function(){return this._pickIds}},styleCommandsNeeded:{get:function(){return this._styleCommandsNeeded}}});lo.prototype.getNode=function(e){return this._nodesByName[e]};lo.prototype.setArticulationStage=function(e,t){this._sceneGraph.setArticulationStage(e,t)};lo.prototype.applyArticulations=function(){this._sceneGraph.applyArticulations()};lo.prototype.makeStyleDirty=function(){this._styleDirty=!0};lo.prototype.resetDrawCommands=function(){this._drawCommandsBuilt=!1};var RBe=new A,GBe=new $,EBe=new A;lo.prototype.update=function(e){let t=!1;try{t=WBe(this,e)}catch(n){if(!this._loader.incrementallyLoadTextures&&n.name==="TextureError")qz(this,n);else{let i=jt.getError("model",this._resource,n);qz(this,i)}}if(IBe(this,e),XBe(this,e),!this._resourcesLoaded&&t){this._resourcesLoaded=!0;let n=this._loader.components;if(!l(n)){if(this._loader.isUnloaded())return;let r=jt.getError("model",this._resource,new ue("Failed to load model."));qz(r),this._rejectLoad=this._rejectLoad&&this._rejectLoad(r)}let i=n.structuralMetadata;l(i)&&i.propertyTableCount>0&&ZBe(this,i);let o=new wX({model:this,modelComponents:n});this._sceneGraph=o,this._gltfCredits=o.components.asset.credits}if(!(!this._resourcesLoaded||e.mode===oe.MORPHING)){if(PBe(this),vBe(this),wBe(this,e),FBe(this),ABe(this,e),MBe(this,e),NBe(this,e),UBe(this,e),kBe(this,e),DBe(this,e),BBe(this,e),this._defaultTexture=e.context.defaultTexture,YBe(this,e),OBe(this,e),zBe(this),KBe(this,e),jBe(this,e),!this._ready){e.afterRender.push(()=>{this._ready=!0,this._readyEvent.raiseEvent(this)});return}this._loader.incrementallyLoadTextures&&!this._texturesLoaded&&this._loader.texturesLoaded&&(this.resetDrawCommands(),this._texturesLoaded=!0,this._texturesReadyEvent.raiseEvent(this)),JBe(this),qBe(this,e),$Be(this),eYe(this,e)}};function WBe(e,t){return!e._resourcesLoaded||e._loader.incrementallyLoadTextures&&!e._texturesLoaded?(t.afterRender.push(()=>!0),e._loader.process(t)):!0}function IBe(e,t){l(e._customShader)&&e._customShader.update(t)}function XBe(e,t){e._imageBasedLighting.update(t),e._imageBasedLighting.shouldRegenerateShaders&&e.resetDrawCommands()}function PBe(e){if(!e._featureTableIdDirty)return;e._featureTableIdDirty=!1;let t=e._sceneGraph.components,n=t.structuralMetadata;l(n)&&n.propertyTableCount>0&&(e.featureTableId=LBe(t,e),e._styleDirty=!0,e.resetDrawCommands())}function vBe(e){e._styleDirty&&(e.applyStyle(e._style),e._styleDirty=!1)}function wBe(e,t){let n=e._featureTables,i=n.length,o=!1;for(let r=0;r=i&&r<=o}function oYe(e,t){let n=t.creditDisplay,i=e._credits,o=i.length;for(let r=0;r0&&e.alpha<1};lo.prototype.isInvisible=function(){let e=this.color;return l(e)&&e.alpha===0};function Jse(e){return e.context.stencilBuffer}lo.prototype.hasSilhouette=function(e){return Jse(e)&&this._silhouetteSize>0&&this._silhouetteColor.alpha>0&&!l(this._classificationType)};lo.prototype.hasSkipLevelOfDetail=function(e){if(!rr.is3DTiles(this.type))return!1;let t=e.context.stencilBuffer,n=this._content.tileset;return t&&n.isSkippingLevelOfDetail};lo.prototype.isClippingEnabled=function(){let e=this._clippingPlanes;return l(e)&&e.enabled&&e.length!==0};lo.prototype.pick=function(e,t,n,i,o){return BC(this,e,t,n,i,o)};lo.prototype.isClippingPolygonsEnabled=function(){let e=this._clippingPolygons;return l(e)&&e.enabled&&e.length!==0};lo.prototype.isDestroyed=function(){return!1};lo.prototype.destroy=function(){let e=this._loader;l(e)&&e.destroy();let t=this._featureTables;if(l(t)){let o=t.length;for(let r=0;r0,i=l(this.structuralMetadata)?this.structuralMetadata.propertyAttributes:void 0,o=l(i)&&l(i[0]);if(t&&(!n||o)){this.resetDrawCommands();return}n?(this.featureTables[this.featureTableId].applyStyle(e),Kse(this,e)):(this.applyColorAndShow(e),this._styleCommandsNeeded=void 0)};function NX(e,t,n){return{loader:e,type:t,resource:n.resource,show:n.show,modelMatrix:n.modelMatrix,scale:n.scale,minimumPixelSize:n.minimumPixelSize,maximumScale:n.maximumScale,id:n.id,allowPicking:n.allowPicking,clampAnimations:n.clampAnimations,shadows:n.shadows,debugShowBoundingVolume:n.debugShowBoundingVolume,enableDebugWireframe:n.enableDebugWireframe,debugWireframe:n.debugWireframe,cull:n.cull,opaquePass:n.opaquePass,customShader:n.customShader,content:n.content,heightReference:n.heightReference,scene:n.scene,distanceDisplayCondition:n.distanceDisplayCondition,color:n.color,colorBlendAmount:n.colorBlendAmount,colorBlendMode:n.colorBlendMode,silhouetteColor:n.silhouetteColor,silhouetteSize:n.silhouetteSize,enableShowOutline:n.enableShowOutline,showOutline:n.showOutline,outlineColor:n.outlineColor,clippingPlanes:n.clippingPlanes,clippingPolygons:n.clippingPolygons,lightColor:n.lightColor,imageBasedLighting:n.imageBasedLighting,backFaceCulling:n.backFaceCulling,credit:n.credit,showCreditsOnScreen:n.showCreditsOnScreen,splitDirection:n.splitDirection,projectTo2D:n.projectTo2D,enablePick:n.enablePick,featureIdLabel:n.featureIdLabel,instanceFeatureIdLabel:n.instanceFeatureIdLabel,pointCloudShading:n.pointCloudShading,classificationType:n.classificationType,pickObject:n.pickObject}}var Um=lo;function gs(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this._model=void 0,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(gs.prototype,{featuresLength:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;return l(t)&&l(t[n])?t[n].featuresLength:0}},pointsLength:{get:function(){return this._model.statistics.pointsLength}},trianglesLength:{get:function(){return this._model.statistics.trianglesLength}},geometryByteLength:{get:function(){return this._model.statistics.geometryByteLength}},texturesByteLength:{get:function(){return this._model.statistics.texturesByteLength}},batchTableByteLength:{get:function(){let e=this._model.statistics;return e.propertyTablesByteLength+e.batchTexturesByteLength}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;if(l(t)&&l(t[n]))return t[n]}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});gs.prototype.getFeature=function(e){let t=this._model,n=t.featureTableId;return t.featureTables[n].getFeature(e)};gs.prototype.hasProperty=function(e,t){let n=this._model,i=n.featureTableId;return l(i)?n.featureTables[i].hasProperty(e,t):!1};gs.prototype.applyDebugSettings=function(e,t){t=e?t:Y.WHITE,this.featuresLength===0?this._model.color=t:l(this.batchTable)&&this.batchTable.setAllColor(t)};gs.prototype.applyStyle=function(e){this._model.style=e};gs.prototype.update=function(e,t){let n=this._model,i=this._tile;n.colorBlendAmount=e.colorBlendAmount,n.colorBlendMode=e.colorBlendMode,n.modelMatrix=i.computedTransform,n.customShader=e.customShader,n.featureIdLabel=e.featureIdLabel,n.instanceFeatureIdLabel=e.instanceFeatureIdLabel,n.lightColor=e.lightColor,n.imageBasedLighting=e.imageBasedLighting,n.backFaceCulling=e.backFaceCulling,n.shadows=e.shadows,n.showCreditsOnScreen=e.showCreditsOnScreen,n.splitDirection=e.splitDirection,n.debugWireframe=e.debugWireframe,n.showOutline=e.showOutline,n.outlineColor=e.outlineColor,n.pointCloudShading=e.pointCloudShading;let o=e.clippingPlanes;n.referenceMatrix=e.clippingPlanesOriginMatrix,l(o)&&i.clippingPlanesDirty&&(n._clippingPlanes=o.enabled&&i._isClipped?o:void 0),l(o)&&l(n._clippingPlanes)&&n._clippingPlanes!==o&&(n._clippingPlanes=o,n._clippingPlanesState=0);let r=e.clippingPolygons;l(r)&&i.clippingPolygonsDirty&&(n._clippingPolygons=r.enabled&&i._isClippedByPolygon?r:void 0),l(r)&&l(n._clippingPolygons)&&n._clippingPolygons!==r&&(n._clippingPolygons=r,n._clippingPolygonsState=0),n.update(t),!this._ready&&n.ready&&(n.activeAnimations.addAll({loop:Il.REPEAT}),this._ready=!0)};gs.prototype.isDestroyed=function(){return!1};gs.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),me(this)};gs.fromGltf=async function(e,t,n,i){let o=new gs(e,t,n),s=UX(e,t,o,{gltf:i,basePath:n}),a=e.vectorClassificationOnly?void 0:e.classificationType;s.classificationType=a;let c=await Um.fromGltfAsync(s);return o._model=c,o};gs.fromB3dm=async function(e,t,n,i,o){let r=new gs(e,t,n),a=UX(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=e.vectorClassificationOnly?void 0:e.classificationType;a.classificationType=c;let d=await Um.fromB3dm(a);return r._model=d,r};gs.fromI3dm=async function(e,t,n,i,o){let r=new gs(e,t,n),a=UX(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=await Um.fromI3dm(a);return r._model=c,r};gs.fromPnts=async function(e,t,n,i,o){let r=new gs(e,t,n),a=UX(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=await Um.fromPnts(a);return r._model=c,r};gs.fromGeoJson=async function(e,t,n,i){let o=new gs(e,t,n),s=UX(e,t,o,{geoJson:i,resource:n}),a=await Um.fromGeoJson(s);return o._model=a,o};gs.prototype.pick=function(e,t,n){if(!l(this._model)||!this._ready)return;let i=t.verticalExaggeration,o=t.verticalExaggerationRelativeHeight;return this._model.pick(e,t,i,o,te.WGS84,n)};function UX(e,t,n,i){let o={cull:!1,releaseGltfJson:!0,opaquePass:Le.CESIUM_3D_TILE,modelMatrix:t.computedTransform,upAxis:e._modelUpAxis,forwardAxis:e._modelForwardAxis,incrementallyLoadTextures:!1,customShader:e.customShader,content:n,colorBlendMode:e.colorBlendMode,colorBlendAmount:e.colorBlendAmount,lightColor:e.lightColor,imageBasedLighting:e.imageBasedLighting,featureIdLabel:e.featureIdLabel,instanceFeatureIdLabel:e.instanceFeatureIdLabel,pointCloudShading:e.pointCloudShading,clippingPlanes:e.clippingPlanes,backFaceCulling:e.backFaceCulling,shadows:e.shadows,showCreditsOnScreen:e.showCreditsOnScreen,splitDirection:e.splitDirection,enableDebugWireframe:e._enableDebugWireframe,debugWireframe:e.debugWireframe,projectTo2D:e._projectTo2D,enablePick:e._enablePick,enableShowOutline:e._enableShowOutline,showOutline:e.showOutline,outlineColor:e.outlineColor};return xt(i,o)}var af=gs;var yEn=S(T(),1);function yu(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(yu.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});yu.fromJson=function(e,t,n,i){let o=new yu(e,t,n);return o._tileset.loadTileset(o._resource,i,o._tile),o._ready=!0,o};yu.prototype.hasProperty=function(e,t){return!1};yu.prototype.getFeature=function(e){};yu.prototype.applyDebugSettings=function(e,t){};yu.prototype.applyStyle=function(e){};yu.prototype.update=function(e,t){};yu.prototype.pick=function(e,t,n){};yu.prototype.isDestroyed=function(){return!1};yu.prototype.destroy=function(){return me(this)};var kX=yu;var Xvn=S(T(),1);var I2n=S(T(),1);var qWn=S(T(),1);var GEn=S(T(),1);function Fs(e,t,n,i){let o=Fs._verifyAttributes(t);n=y(n,0);let r=[],s={},a,c,d=o.length;for(let m=0;m0?Q.getSizeInBytes(e[0].componentDatatype):0,o=i>0?t%i:0,r=o===0?0:i-o;return t+=r,t};Fs._createArrayViews=function(e,t){let n=[],i=0,o=e.length;for(let r=0;r0){let n=new ArrayBuffer(t*e.vertexSizeInBytes);if(l(e.arrayBuffer)){let r=new Uint8Array(n),s=new Uint8Array(e.arrayBuffer),a=s.length;for(let c=0;c0){t.needsCommit=!1;let n=t.vertexBuffer,i=e._size*t.vertexSizeInBytes,o=l(n);if(!o||n.sizeInBytes0){let i=e.vertexSizeInBytes*t,o=e.vertexSizeInBytes*n;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,i,o),i)}}Fs.prototype.endSubCommits=function(){let e=this._allBuffers;for(let t=0,n=e.length;t!0)}if(l(n)&&(o=e.addImage(t,n)),l(i)&&(o=e.addSubRegion(t,i)),this._imageIndexPromise=o,!l(o))return;let a=e.getImageIndex(t);if(l(a)&&!l(i)){s(a);return}o.then(s).catch(function(c){console.error(`Error loading image for billboard: ${c}`),r._imageIndexPromise=void 0})};_i.prototype.setImage=function(e,t){this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,l(this._billboardCollection._textureAtlas)&&this._loadImage())};_i.prototype.setImageSubRegion=function(e,t){this._imageId===e&&He.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=He.clone(t),l(this._billboardCollection._textureAtlas)&&this._loadImage())};_i.prototype._setTranslate=function(e){let t=this._translate;D.equals(t,e)||(D.clone(e,t),wo(this,jse))};_i.prototype._getActualPosition=function(){return l(this._clampedPosition)?this._clampedPosition:this._actualPosition};_i.prototype._setActualPosition=function(e){l(this._clampedPosition)||h.clone(e,this._actualPosition),wo(this,R5)};var Qse=new se;_i._computeActualPosition=function(e,t,n,i){return l(e._clampedPosition)?(n.mode!==e._mode&&e._updateClamping(),e._clampedPosition):n.mode===oe.SCENE3D?t:(M.multiplyByPoint(i,t,Qse),ki.computeActualWgs84Position(n,Qse))};var qse=new h;_i._computeScreenSpacePosition=function(e,t,n,i,o,r){let s=M.multiplyByPoint(e,t,qse),a=ki.wgs84WithEyeOffsetToWindowCoordinates(o,s,n,r);if(l(a))return D.add(a,i,a),a};var L5=new D(0,0);_i.prototype.computeScreenSpacePosition=function(e,t){let n=this._billboardCollection;l(t)||(t=new D),D.clone(this._pixelOffset,L5),D.add(L5,this._translate,L5);let i=n.modelMatrix,o=this._position;if(l(this._clampedPosition)&&(o=this._clampedPosition,e.mode!==oe.SCENE3D)){let s=e.mapProjection,a=s.ellipsoid,c=s.unproject(o,G5);o=a.cartographicToCartesian(c,qse),i=M.IDENTITY}return _i._computeScreenSpacePosition(i,o,this._eyeOffset,L5,e,t)};_i.getScreenSpaceBoundingBox=function(e,t,n){let i=e.width,o=e.height,r=e.scale;i*=r,o*=r;let s=t.x;e.horizontalOrigin===hi.RIGHT?s-=i:e.horizontalOrigin===hi.CENTER&&(s-=i*.5);let a=t.y;return e.verticalOrigin===Pn.BOTTOM||e.verticalOrigin===Pn.BASELINE?a-=o:e.verticalOrigin===Pn.CENTER&&(a-=o*.5),l(n)||(n=new He),n.x=s,n.y=a,n.width=i,n.height=o,n};_i.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&h.equals(this._position,e._position)&&this._imageId===e._imageId&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&He.equals(this._imageSubRegion,e._imageSubRegion)&&Y.equals(this._color,e._color)&&D.equals(this._pixelOffset,e._pixelOffset)&&D.equals(this._translate,e._translate)&&h.equals(this._eyeOffset,e._eyeOffset)&&Ft.equals(this._scaleByDistance,e._scaleByDistance)&&Ft.equals(this._translucencyByDistance,e._translucencyByDistance)&&Ft.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Wt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance};_i.prototype._destroy=function(){l(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),l(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0};var uo=_i;var rXn=T(S(),1),CBe={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},To=Object.freeze(CBe);var aXn=T(S(),1),VBe={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},Fs=Object.freeze(VBe);var _Xn=T(S(),1);function e0(e,t,n,i,o){this.bottomLeft=y(e,D.ZERO),this.topRight=y(t,D.ZERO),this.childNode1=n,this.childNode2=i,this.imageIndex=o}var LBe=new D(16,16);function yg(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.borderWidthInPixels,1),n=y(e.initialSize,LBe);this._context=e.context,this._pixelFormat=y(e.pixelFormat,at.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=Bn(),this._idHash={},this._indexHash={},this._initialSize=n,this._root=void 0}Object.defineProperties(yg.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},textureCoordinates:{get:function(){return this._textureCoordinates}},texture:{get:function(){return l(this._texture)||(this._texture=new Et({context:this._context,width:this._initialSize.x,height:this._initialSize.y,pixelFormat:this._pixelFormat})),this._texture}},numberOfImages:{get:function(){return this._textureCoordinates.length}},guid:{get:function(){return this._guid}}});function RBe(e,t){let n=e._context,i=e.numberOfImages,o=2,r=e._borderWidthInPixels;if(i>0){let s=e._texture.width,a=e._texture.height,c=o*(s+t.width+r),d=o*(a+t.height+r),u=s/c,m=a/d,p=new e0(new D(s+r,r),new D(c,a)),g=new e0(new D,new D(c,a),e._root,p),f=new e0(new D(r,a+r),new D(c,d)),x=new e0(new D,new D(c,d),g,f);for(let V=0;Vs){t.childNode1=new e0(new D(t.bottomLeft.x,t.bottomLeft.y),new D(t.bottomLeft.x+n.width,t.topRight.y));let a=t.bottomLeft.x+n.width+e._borderWidthInPixels;a0)&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1));let p,g;if(l(o._labelDimensions))g=o._labelDimensions.x,p=o._labelDimensions.y;else{let C=0,V=0,L=o._imageIndex;if(L!==-1){let G=n[L];C=G.height,V=G.width}p=Math.round(y(o.height,e._textureAtlas.texture.dimensions.y*C));let Z=e._textureAtlas.texture.width;g=Math.round(y(o.width,Z*V))}let f=Math.floor(W.clamp(g,0,oz)),x=Math.floor(W.clamp(p,0,oz)),_=f*oz+x;e._instanced?(r=o._index,s(r,a,c,u,_)):(r=o._index*4,s(r+0,a,c,u,_),s(r+1,a,c,u,_),s(r+2,a,c,u,_),s(r+3,a,c,u,_))}function Tae(e,t,n,i,o){if(ou(o.heightReference)){let f=e._scene,x=t.context,_=t.globeTranslucencyState.translucent,C=l(f.globe)&&f.globe.depthTestAgainstTerrain;e._shaderClampToGround=x.depthTexture&&!_&&C}let r,s=i[yo.textureCoordinateBoundsOrLabelTranslate];if(Mt.maximumVertexTextureImageUnits>0){let f=0,x=0;l(o._labelTranslate)&&(f=o._labelTranslate.x,x=o._labelTranslate.y),e._instanced?(r=o._index,s(r,f,x,0,0)):(r=o._index*4,s(r+0,f,x,0,0),s(r+1,f,x,0,0),s(r+2,f,x,0,0),s(r+3,f,x,0,0));return}let a=0,c=0,d=0,u=0,m=o._imageIndex;if(m!==-1){let f=n[m];a=f.x,c=f.y,d=f.width,u=f.height}let p=a+d,g=c+u;e._instanced?(r=o._index,s(r,a,c,p,g)):(r=o._index*4,s(r+0,a,c,p,g),s(r+1,a,c,p,g),s(r+2,a,c,p,g),s(r+3,a,c,p,g))}function OBe(e,t,n,i,o){if(!l(e._batchTable))return;let r=i[yo.a_batchId],s=o._batchIndex,a;e._instanced?(a=o._index,r(a,s)):(a=o._index*4,r(a+0,s),r(a+1,s),r(a+2,s),r(a+3,s))}function Sae(e,t,n,i,o){if(!e._sdf)return;let r,s=i[yo.sdf],a=o.outlineColor,c=o.outlineWidth,d=Y.floatToByte(a.red),u=Y.floatToByte(a.green),m=Y.floatToByte(a.blue),p=d*OC+u*lf+m,g=c/Fs.RADIUS,f=Y.floatToByte(a.alpha)*OC+Y.floatToByte(g)*lf;e._instanced?(r=o._index,s(r,p,f)):(r=o._index*4,s(r+0,p+mae,f),s(r+1,p+hae,f),s(r+2,p+fae,f),s(r+3,p+pae,f))}function HBe(e,t,n,i,o){dae(e,t,n,i,o),bae(e,t,n,i,o),gae(e,t,n,i,o),sz(e,t,n,i,o),az(e,t,n,i,o),yae(e,t,n,i,o),xae(e,t,n,i,o),_ae(e,t,n,i,o),Tae(e,t,n,i,o),OBe(e,t,n,i,o),Sae(e,t,n,i,o)}function rz(e,t,n,i,o,r){let s;i.mode===oe.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let c=0;c!0)}if(l(n)&&(o=e.addImage(t,n)),l(i)&&(o=e.addSubRegion(t,i)),this._imageIndexPromise=o,!l(o))return;let a=e.getImageIndex(t);if(l(a)&&!l(i)){s(a);return}o.then(s).catch(function(c){console.error(`Error loading image for billboard: ${c}`),r._imageIndexPromise=void 0})};Si.prototype.setImage=function(e,t){this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,l(this._billboardCollection._textureAtlas)&&this._loadImage())};Si.prototype.setImageSubRegion=function(e,t){this._imageId===e&&ze.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=ze.clone(t),l(this._billboardCollection._textureAtlas)&&this._loadImage())};Si.prototype._setTranslate=function(e){let t=this._translate;D.equals(t,e)||(D.clone(e,t),Fo(this,eae))};Si.prototype._getActualPosition=function(){return l(this._clampedPosition)?this._clampedPosition:this._actualPosition};Si.prototype._setActualPosition=function(e){l(this._clampedPosition)||h.clone(e,this._actualPosition),Fo(this,R5)};var $se=new se;Si._computeActualPosition=function(e,t,n,i){return l(e._clampedPosition)?(n.mode!==e._mode&&e._updateClamping(),e._clampedPosition):n.mode===oe.SCENE3D?t:(A.multiplyByPoint(i,t,$se),ki.computeActualEllipsoidPosition(n,$se))};var tae=new h;Si._computeScreenSpacePosition=function(e,t,n,i,o,r){let s=A.multiplyByPoint(e,t,tae),a=ki.worldWithEyeOffsetToWindowCoordinates(o,s,n,r);if(l(a))return D.add(a,i,a),a};var L5=new D(0,0);Si.prototype.computeScreenSpacePosition=function(e,t){let n=this._billboardCollection;l(t)||(t=new D),D.clone(this._pixelOffset,L5),D.add(L5,this._translate,L5);let i=n.modelMatrix,o=this._position;if(l(this._clampedPosition)&&(o=this._clampedPosition,e.mode!==oe.SCENE3D)){let s=e.mapProjection,a=s.ellipsoid,c=s.unproject(o,E5);o=a.cartographicToCartesian(c,tae),i=A.IDENTITY}return Si._computeScreenSpacePosition(i,o,this._eyeOffset,L5,e,t)};Si.getScreenSpaceBoundingBox=function(e,t,n){let i=e.width,o=e.height,r=e.scale;i*=r,o*=r;let s=t.x;e.horizontalOrigin===fi.RIGHT?s-=i:e.horizontalOrigin===fi.CENTER&&(s-=i*.5);let a=t.y;return e.verticalOrigin===Pn.BOTTOM||e.verticalOrigin===Pn.BASELINE?a-=o:e.verticalOrigin===Pn.CENTER&&(a-=o*.5),l(n)||(n=new ze),n.x=s,n.y=a,n.width=i,n.height=o,n};Si.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&h.equals(this._position,e._position)&&this._imageId===e._imageId&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&ze.equals(this._imageSubRegion,e._imageSubRegion)&&Y.equals(this._color,e._color)&&D.equals(this._pixelOffset,e._pixelOffset)&&D.equals(this._translate,e._translate)&&h.equals(this._eyeOffset,e._eyeOffset)&&Ft.equals(this._scaleByDistance,e._scaleByDistance)&&Ft.equals(this._translucencyByDistance,e._translucencyByDistance)&&Ft.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Xt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance};Si.prototype._destroy=function(){l(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),l(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0};var uo=Si;var tWn=S(T(),1),_Ye={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},So=Object.freeze(_Ye);var iWn=S(T(),1),SYe={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},As=Object.freeze(SYe);var bWn=S(T(),1);function $p(e,t,n,i,o){this.bottomLeft=y(e,D.ZERO),this.topRight=y(t,D.ZERO),this.childNode1=n,this.childNode2=i,this.imageIndex=o}var TYe=new D(16,16);function gg(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.borderWidthInPixels,1),n=y(e.initialSize,TYe);this._context=e.context,this._pixelFormat=y(e.pixelFormat,at.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=Bn(),this._idHash={},this._indexHash={},this._initialSize=n,this._root=void 0}Object.defineProperties(gg.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},textureCoordinates:{get:function(){return this._textureCoordinates}},texture:{get:function(){return l(this._texture)||(this._texture=new Et({context:this._context,width:this._initialSize.x,height:this._initialSize.y,pixelFormat:this._pixelFormat})),this._texture}},numberOfImages:{get:function(){return this._textureCoordinates.length}},guid:{get:function(){return this._guid}}});function CYe(e,t){let n=e._context,i=e.numberOfImages,o=2,r=e._borderWidthInPixels;if(i>0){let s=e._texture.width,a=e._texture.height,c=o*(s+t.width+r),d=o*(a+t.height+r),u=s/c,m=a/d,p=new $p(new D(s+r,r),new D(c,a)),g=new $p(new D,new D(c,a),e._root,p),f=new $p(new D(r,a+r),new D(c,d)),x=new $p(new D,new D(c,d),g,f);for(let V=0;Vs){t.childNode1=new $p(new D(t.bottomLeft.x,t.bottomLeft.y),new D(t.bottomLeft.x+n.width,t.topRight.y));let a=t.bottomLeft.x+n.width+e._borderWidthInPixels;a0)&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1));let p,g;if(l(o._labelDimensions))g=o._labelDimensions.x,p=o._labelDimensions.y;else{let C=0,V=0,Z=o._imageIndex;if(Z!==-1){let G=n[Z];C=G.height,V=G.width}p=Math.round(y(o.height,e._textureAtlas.texture.dimensions.y*C));let R=e._textureAtlas.texture.width;g=Math.round(y(o.width,R*V))}let f=Math.floor(X.clamp(g,0,rK)),x=Math.floor(X.clamp(p,0,rK)),_=f*rK+x;e._instanced?(r=o._index,s(r,a,c,u,_)):(r=o._index*4,s(r+0,a,c,u,_),s(r+1,a,c,u,_),s(r+2,a,c,u,_),s(r+3,a,c,u,_))}function Vae(e,t,n,i,o){if(iu(o.heightReference)){let f=e._scene,x=t.context,_=t.globeTranslucencyState.translucent,C=l(f.globe)&&f.globe.depthTestAgainstTerrain;e._shaderClampToGround=x.depthTexture&&!_&&C}let r,s=i[yo.textureCoordinateBoundsOrLabelTranslate];if(Mt.maximumVertexTextureImageUnits>0){let f=0,x=0;l(o._labelTranslate)&&(f=o._labelTranslate.x,x=o._labelTranslate.y),e._instanced?(r=o._index,s(r,f,x,0,0)):(r=o._index*4,s(r+0,f,x,0,0),s(r+1,f,x,0,0),s(r+2,f,x,0,0),s(r+3,f,x,0,0));return}let a=0,c=0,d=0,u=0,m=o._imageIndex;if(m!==-1){let f=n[m];a=f.x,c=f.y,d=f.width,u=f.height}let p=a+d,g=c+u;e._instanced?(r=o._index,s(r,a,c,p,g)):(r=o._index*4,s(r+0,a,c,p,g),s(r+1,a,c,p,g),s(r+2,a,c,p,g),s(r+3,a,c,p,g))}function DYe(e,t,n,i,o){if(!l(e._batchTable))return;let r=i[yo.a_batchId],s=o._batchIndex,a;e._instanced?(a=o._index,r(a,s)):(a=o._index*4,r(a+0,s),r(a+1,s),r(a+2,s),r(a+3,s))}function Zae(e,t,n,i,o){if(!e._sdf)return;let r,s=i[yo.sdf],a=o.outlineColor,c=o.outlineWidth,d=Y.floatToByte(a.red),u=Y.floatToByte(a.green),m=Y.floatToByte(a.blue),p=d*YC+u*cf+m,g=c/As.RADIUS,f=Y.floatToByte(a.alpha)*YC+Y.floatToByte(g)*cf;e._instanced?(r=o._index,s(r,p,f)):(r=o._index*4,s(r+0,p+pae,f),s(r+1,p+bae,f),s(r+2,p+gae,f),s(r+3,p+yae,f))}function BYe(e,t,n,i,o){hae(e,t,n,i,o),xae(e,t,n,i,o),_ae(e,t,n,i,o),aK(e,t,n,i,o),cK(e,t,n,i,o),Sae(e,t,n,i,o),Tae(e,t,n,i,o),Cae(e,t,n,i,o),Vae(e,t,n,i,o),DYe(e,t,n,i,o),Zae(e,t,n,i,o)}function sK(e,t,n,i,o,r){let s;i.mode===oe.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let c=0;c0){this._vaf=kBe(i,n,this._buffersUsage,this._instanced,this._batchTable,this._sdf),m=this._vaf.writers;for(let P=0;P0){let P=QBe;P.length=0,(c[OW]||c[IBe]||c[XBe])&&P.push(dae),(c[YW]||c[tae]||c[GBe]||c[EBe]||c[ZBe])&&(P.push(bae),this._instanced&&P.push(az)),(c[YW]||c[WBe]||c[rae])&&(P.push(gae),P.push(sz)),(c[YW]||c[iae])&&P.push(sz),c[nae]&&P.push(az),c[oae]&&P.push(yae),c[sae]&&P.push(xae),(c[aae]||c[PBe]||c[YW]||c[OW])&&P.push(_ae),(c[YW]||c[OW])&&P.push(Tae),c[cae]&&P.push(Sae);let F=P.length;if(m=this._vaf.writers,a/n>.1){for(let A=0;An*1.5&&(s.length=n),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,le.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let f,x=M.IDENTITY;e.mode===oe.SCENE3D?(x=this.modelMatrix,f=le.clone(this._baseVolumeWC,this._boundingVolume)):f=le.clone(this._baseVolume2D,this._boundingVolume),KBe(this,e,f);let _=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,_){this._blendOption===To.OPAQUE||this._blendOption===To.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=De.fromCache({depthTest:{enabled:!0,func:ne.LESS},depthMask:!0}):this._rsOpaque=void 0;let P=this._blendOption===To.TRANSLUCENT;this._blendOption===To.TRANSLUCENT||this._blendOption===To.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=De.fromCache({depthTest:{enabled:!0,func:P?ne.LEQUAL:ne.LESS},depthMask:P,blending:un.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let C,V,L,Z,G,X=Mt.maximumVertexTextureImageUnits>0;if(_||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF){C=BW,V=DW,G=[],l(this._batchTable)&&(G.push("VECTOR_TILE"),C=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(C),V=this._batchTable.getFragmentShaderCallback(!1,void 0)(V)),L=new Ye({defines:G,sources:[C]}),this._instanced&&L.defines.push("INSTANCED"),this._shaderRotation&&L.defines.push("ROTATION"),this._shaderAlignedAxis&&L.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&L.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&L.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&L.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&L.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&L.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(X?L.defines.push("VERTEX_DEPTH_CHECK"):L.defines.push("FRAGMENT_DEPTH_CHECK"));let P=1-Fs.CUTOFF;this._sdf&&L.defines.push("SDF");let F=l(this._batchTable)?"VECTOR_TILE":"";this._blendOption===To.OPAQUE_AND_TRANSLUCENT&&(Z=new Ye({defines:["OPAQUE",F],sources:[V]}),this._shaderClampToGround&&(X?Z.defines.push("VERTEX_DEPTH_CHECK"):Z.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(Z.defines.push("SDF"),Z.defines.push(`SDF_EDGE ${P}`)),this._sp=qt.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:L,fragmentShaderSource:Z,attributeLocations:yo}),Z=new Ye({defines:["TRANSLUCENT",F],sources:[V]}),this._shaderClampToGround&&(X?Z.defines.push("VERTEX_DEPTH_CHECK"):Z.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(Z.defines.push("SDF"),Z.defines.push(`SDF_EDGE ${P}`)),this._spTranslucent=qt.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:L,fragmentShaderSource:Z,attributeLocations:yo})),this._blendOption===To.OPAQUE&&(Z=new Ye({defines:[F],sources:[V]}),this._shaderClampToGround&&(X?Z.defines.push("VERTEX_DEPTH_CHECK"):Z.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(Z.defines.push("SDF"),Z.defines.push(`SDF_EDGE ${P}`)),this._sp=qt.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:L,fragmentShaderSource:Z,attributeLocations:yo})),this._blendOption===To.TRANSLUCENT&&(Z=new Ye({defines:[F],sources:[V]}),this._shaderClampToGround&&(X?Z.defines.push("VERTEX_DEPTH_CHECK"):Z.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(Z.defines.push("SDF"),Z.defines.push(`SDF_EDGE ${P}`)),this._spTranslucent=qt.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:L,fragmentShaderSource:Z,attributeLocations:yo})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf}let v=e.commandList;if(p.render||p.pick){let P=this._colorCommands,F=this._blendOption===To.OPAQUE,A=this._blendOption===To.OPAQUE_AND_TRANSLUCENT,b=this._vaf.va,R=b.length,E=this._uniforms,I;l(this._batchTable)?(E=this._batchTable.getUniformMapCallback()(E),I=this._batchTable.getPickId()):I="v_pickColor",P.length=R;let w=A?R*2:R;for(let N=0;N0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){l(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){let t=y(this._heightOffset,0),n=this._content.tileset.ellipsoid,i=n.cartesianToCartographic(this._billboard.position,qBe);i.height=i.height-t+e;let o=n.cartographicToCartesian(i);this._billboard.position=o,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],o],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=Y.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){let t=this._billboardImage!==e;this._billboardImage=e,t&&HC(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){let e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}});ia.defaultColor=Y.WHITE;ia.defaultPointOutlineColor=Y.BLACK;ia.defaultPointOutlineWidth=0;ia.defaultPointSize=8;function HC(e){let t=e._billboard;if(l(e._billboardImage)&&e._billboardImage!==t.image){t.image=e._billboardImage;return}if(l(e._billboardImage))return;let n=y(e._color,ia.defaultColor),i=y(e._pointOutlineColor,ia.defaultPointOutlineColor),o=y(e._pointOutlineWidth,ia.defaultPointOutlineWidth),r=y(e._pointSize,ia.defaultPointSize),s=e._billboardColor,a=e._billboardOutlineColor,c=e._billboardOutlineWidth,d=e._billboardSize;if(Y.equals(n,s)&&Y.equals(i,a)&&o===c&&r===d)return;e._billboardColor=Y.clone(n,e._billboardColor),e._billboardOutlineColor=Y.clone(i,e._billboardOutlineColor),e._billboardOutlineWidth=o,e._billboardSize=r;let u=n.alpha,m=n.toCssColorString(),p=i.toCssColorString(),g=JSON.stringify([m,r,p,o]);t.setImage(g,h_(u,m,p,o,r))}ia.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};ia.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};ia.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};ia.prototype.getPropertyInherited=function(e){return Ws.getPropertyInherited(this._content,this._batchId,e)};ia.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};ia.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};ia.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};ia.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var t0=ia;var oWn=T(S(),1);var gIn=T(S(),1);function $Be(e,t,n,i,o){let r=e.measureText(t);if(!!/\S/.test(t)){let a=document.defaultView.getComputedStyle(e.canvas).getPropertyValue("font-size").replace("px",""),c=document.createElement("canvas"),d=100,u=r.width+d|0,m=3*a,p=m/2;c.width=u,c.height=m;let g=c.getContext("2d");g.font=n,g.fillStyle="white",g.fillRect(0,0,c.width+1,c.height+1),i&&(g.strokeStyle="black",g.lineWidth=e.lineWidth,g.strokeText(t,d/2,p)),o&&(g.fillStyle="black",g.fillText(t,d/2,p));let f=g.getImageData(0,0,u,m).data,x=f.length,_=u*4,C,V,L,Z;for(C=0;C=0;--C)if(f[C]!==255){Z=C/_|0;break}let G=-1;for(C=0;C]/,o=[],r="",s=as.LTR,a="",c=e.length;for(let d=0;d";case">":return"<"}}var lYe="\u05D0-\u05EA",dYe="\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF",Eae=new RegExp(`[${lYe}${dYe}]`);function uYe(e){let t=e.split(` -`),n="";for(let i=0;id+1?s[d+1].Type===as.RTL?(c=m+c,a=0):(c=JW(c,a,u.Word),a+=u.Word.length):c=JW(c,0,m)):u.Type===as.RTL?c=JW(c,a,m):u.Type===as.LTR?(c+=u.Word,a=c.length):(u.Type===as.WEAK||u.Type===as.BRACKETS)&&(d>0&&s[d-1].Type===as.RTL?s.length>d+1?s[d+1].Type===as.RTL?c=JW(c,a,m):(c+=u.Word,a=c.length):c+=u.Word:(c+=u.Word,a=c.length))}n+=c,i0,m=t._backgroundBillboard,p=e._backgroundBillboardCollection;u?(l(m)||(m=p.add({collection:e,image:wae,imageSubRegion:bYe}),t._backgroundBillboard=m),m.color=t._backgroundColor,m.show=t._show,m.position=t._position,m.eyeOffset=t._eyeOffset,m.pixelOffset=t._pixelOffset,m.horizontalOrigin=hi.LEFT,m.verticalOrigin=t._verticalOrigin,m.heightReference=t._heightReference,m.scale=t.totalScale,m.pickPrimitive=t,m.id=t._id,m.translucencyByDistance=t._translucencyByDistance,m.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,m.scaleByDistance=t._scaleByDistance,m.distanceDisplayCondition=t._distanceDisplayCondition,m.disableDepthTestDistance=t._disableDepthTestDistance,m.clusterShow=t.clusterShow):l(m)&&(p.remove(m),t._backgroundBillboard=m=void 0);let g=e._glyphTextureCache;for(d=0;d0&&L.height>0){let Z=(0,Pae.default)(L,{cutoff:Fs.CUTOFF,radius:Fs.RADIUS}),G=L.getContext("2d"),X=L.width,v=L.height,P=G.getImageData(0,0,X,v);for(let F=0;F0?V=L.pop():(V=e._billboardCollection.add({collection:e}),V._labelDimensions=new D,V._labelTranslate=new D),a.billboard=V),V.show=t._show,V.position=t._position,V.eyeOffset=t._eyeOffset,V.pixelOffset=t._pixelOffset,V.horizontalOrigin=hi.LEFT,V.verticalOrigin=t._verticalOrigin,V.heightReference=t._heightReference,V.scale=t.totalScale,V.pickPrimitive=t,V.id=t._id,V.image=_,V.translucencyByDistance=t._translucencyByDistance,V.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,V.scaleByDistance=t._scaleByDistance,V.distanceDisplayCondition=t._distanceDisplayCondition,V.disableDepthTestDistance=t._disableDepthTestDistance,V._batchIndex=t._batchIndex,V.outlineColor=t.outlineColor,t.style===Fo.FILL_AND_OUTLINE?(V.color=t._fillColor,V.outlineWidth=t.outlineWidth):t.style===Fo.FILL?(V.color=t._fillColor,V.outlineWidth=0):t.style===Fo.OUTLINE&&(V.color=Y.TRANSPARENT,V.outlineWidth=t.outlineWidth)}}t._repositionAllGlyphs=!0}function Wae(e,t,n){return t===hi.CENTER?-e/2:t===hi.RIGHT?-(e+n.x):n.x}var rr=new D,SYe=new D;function CYe(e){let t=e._glyphs,n=e._renderedText,i,o,r=0,s=0,a=[],c=Number.NEGATIVE_INFINITY,d=0,u=1,m,p=t.length,g=e._backgroundBillboard,f=D.clone(l(g)?e._backgroundPadding:D.ZERO,SYe);for(f.x/=e._relativeSize,f.y/=e._relativeSize,m=0;m0&&(C===hi.CENTER?G=-s/2-f.x:C===hi.RIGHT?G=-(s+f.x*2):G=0,rr.x=G*_,V===Pn.TOP?rr.y=x-d-c:V===Pn.CENTER?rr.y=(x-d)/2-c:V===Pn.BASELINE?rr.y=-f.y-c:rr.y=0,rr.y=rr.y*_,g.width=P,g.height=F,g._setTranslate(rr),g._labelTranslate=D.clone(rr,g._labelTranslate)),ou(e.heightReference))for(m=0;m0?To.TRANSLUCENT:this.blendOption;t.blendOption=r,n.blendOption=r,t._highlightColor=this._highlightColor,n._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,n.update(e),t.update(e)};df.prototype.isDestroyed=function(){return!1};df.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),this._backgroundTextureAtlas=this._backgroundTextureAtlas&&this._backgroundTextureAtlas.destroy(),me(this)};var uf=df;var b2n=T(S(),1);var sWn=T(S(),1),QW=`in vec3 position3DHigh; +`,{uniformMap:{billboard_texture:function(){return e._textureAtlas.texture}}});return i.pass=Le.OVERLAY,i}var KYe=[];Su.prototype.update=function(e){if(dK(this),!this.show)return;let t=this._billboards,n=t.length,i=e.context;this._instanced=i.instancedArrays,yo=this._instanced?PYe:XYe,iK=this._instanced?wYe:vYe;let o=this._textureAtlas;if(!l(o)){o=this._textureAtlas=new yg({context:i});for(let P=0;P0){this._vaf=AYe(i,n,this._buffersUsage,this._instanced,this._batchTable,this._sdf),m=this._vaf.writers;for(let P=0;P0){let P=KYe;P.length=0,(c[OX]||c[GYe]||c[RYe])&&P.push(hae),(c[YX]||c[oae]||c[ZYe]||c[LYe]||c[VYe])&&(P.push(xae),this._instanced&&P.push(cK)),(c[YX]||c[EYe]||c[cae])&&(P.push(_ae),P.push(aK)),(c[YX]||c[sae])&&P.push(aK),c[rae]&&P.push(cK),c[aae]&&P.push(Sae),c[lae]&&P.push(Tae),(c[dae]||c[WYe]||c[YX]||c[OX])&&P.push(Cae),(c[YX]||c[OX])&&P.push(Vae),c[uae]&&P.push(Zae);let F=P.length;if(m=this._vaf.writers,a/n>.1){for(let M=0;Mn*1.5&&(s.length=n),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,le.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let f,x=A.IDENTITY;e.mode===oe.SCENE3D?(x=this.modelMatrix,f=le.clone(this._baseVolumeWC,this._boundingVolume)):f=le.clone(this._baseVolume2D,this._boundingVolume),OYe(this,e,f);let _=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,_){this._blendOption===So.OPAQUE||this._blendOption===So.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=De.fromCache({depthTest:{enabled:!0,func:ie.LESS},depthMask:!0}):this._rsOpaque=void 0;let P=this._blendOption===So.TRANSLUCENT;this._blendOption===So.TRANSLUCENT||this._blendOption===So.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=De.fromCache({depthTest:{enabled:!0,func:P?ie.LEQUAL:ie.LESS},depthMask:P,blending:un.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let C,V,Z,R,G,W=Mt.maximumVertexTextureImageUnits>0;if(_||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF){C=BX,V=DX,G=[],l(this._batchTable)&&(G.push("VECTOR_TILE"),C=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(C),V=this._batchTable.getFragmentShaderCallback(!1,void 0)(V)),Z=new Ye({defines:G,sources:[C]}),this._instanced&&Z.defines.push("INSTANCED"),this._shaderRotation&&Z.defines.push("ROTATION"),this._shaderAlignedAxis&&Z.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&Z.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&Z.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&Z.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&Z.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&Z.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(W?Z.defines.push("VERTEX_DEPTH_CHECK"):Z.defines.push("FRAGMENT_DEPTH_CHECK"));let P=1-As.CUTOFF;this._sdf&&Z.defines.push("SDF");let F=l(this._batchTable)?"VECTOR_TILE":"";this._blendOption===So.OPAQUE_AND_TRANSLUCENT&&(R=new Ye({defines:["OPAQUE",F],sources:[V]}),this._shaderClampToGround&&(W?R.defines.push("VERTEX_DEPTH_CHECK"):R.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(R.defines.push("SDF"),R.defines.push(`SDF_EDGE ${P}`)),this._sp=qt.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:Z,fragmentShaderSource:R,attributeLocations:yo}),R=new Ye({defines:["TRANSLUCENT",F],sources:[V]}),this._shaderClampToGround&&(W?R.defines.push("VERTEX_DEPTH_CHECK"):R.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(R.defines.push("SDF"),R.defines.push(`SDF_EDGE ${P}`)),this._spTranslucent=qt.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:Z,fragmentShaderSource:R,attributeLocations:yo})),this._blendOption===So.OPAQUE&&(R=new Ye({defines:[F],sources:[V]}),this._shaderClampToGround&&(W?R.defines.push("VERTEX_DEPTH_CHECK"):R.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(R.defines.push("SDF"),R.defines.push(`SDF_EDGE ${P}`)),this._sp=qt.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:Z,fragmentShaderSource:R,attributeLocations:yo})),this._blendOption===So.TRANSLUCENT&&(R=new Ye({defines:[F],sources:[V]}),this._shaderClampToGround&&(W?R.defines.push("VERTEX_DEPTH_CHECK"):R.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(R.defines.push("SDF"),R.defines.push(`SDF_EDGE ${P}`)),this._spTranslucent=qt.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:Z,fragmentShaderSource:R,attributeLocations:yo})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf}let v=e.commandList;if(p.render||p.pick){let P=this._colorCommands,F=this._blendOption===So.OPAQUE,M=this._blendOption===So.OPAQUE_AND_TRANSLUCENT,b=this._vaf.va,L=b.length,E=this._uniforms,I;l(this._batchTable)?(E=this._batchTable.getUniformMapCallback()(E),I=this._batchTable.getPickId()):I="v_pickColor",P.length=L;let w=M?L*2:L;for(let N=0;N0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){l(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){let t=y(this._heightOffset,0),n=this._content.tileset.ellipsoid,i=n.cartesianToCartographic(this._billboard.position,JYe);i.height=i.height-t+e;let o=n.cartographicToCartesian(i);this._billboard.position=o,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],o],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=Y.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){let t=this._billboardImage!==e;this._billboardImage=e,t&&OC(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){let e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}});oa.defaultColor=Y.WHITE;oa.defaultPointOutlineColor=Y.BLACK;oa.defaultPointOutlineWidth=0;oa.defaultPointSize=8;function OC(e){let t=e._billboard;if(l(e._billboardImage)&&e._billboardImage!==t.image){t.image=e._billboardImage;return}if(l(e._billboardImage))return;let n=y(e._color,oa.defaultColor),i=y(e._pointOutlineColor,oa.defaultPointOutlineColor),o=y(e._pointOutlineWidth,oa.defaultPointOutlineWidth),r=y(e._pointSize,oa.defaultPointSize),s=e._billboardColor,a=e._billboardOutlineColor,c=e._billboardOutlineWidth,d=e._billboardSize;if(Y.equals(n,s)&&Y.equals(i,a)&&o===c&&r===d)return;e._billboardColor=Y.clone(n,e._billboardColor),e._billboardOutlineColor=Y.clone(i,e._billboardOutlineColor),e._billboardOutlineWidth=o,e._billboardSize=r;let u=n.alpha,m=n.toCssColorString(),p=i.toCssColorString(),g=JSON.stringify([m,r,p,o]);t.setImage(g,m_(u,m,p,o,r))}oa.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};oa.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};oa.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};oa.prototype.getPropertyInherited=function(e){return Ps.getPropertyInherited(this._content,this._batchId,e)};oa.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};oa.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};oa.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};oa.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var eb=oa;var eXn=S(T(),1);var hIn=S(T(),1);function QYe(e,t,n,i,o){let r=e.measureText(t);if(!!/\S/.test(t)){let a=document.defaultView.getComputedStyle(e.canvas).getPropertyValue("font-size").replace("px",""),c=document.createElement("canvas"),d=100,u=r.width+d|0,m=3*a,p=m/2;c.width=u,c.height=m;let g=c.getContext("2d");g.font=n,g.fillStyle="white",g.fillRect(0,0,c.width+1,c.height+1),i&&(g.strokeStyle="black",g.lineWidth=e.lineWidth,g.strokeText(t,d/2,p)),o&&(g.fillStyle="black",g.fillText(t,d/2,p));let f=g.getImageData(0,0,u,m).data,x=f.length,_=u*4,C,V,Z,R;for(C=0;C=0;--C)if(f[C]!==255){R=C/_|0;break}let G=-1;for(C=0;C]/,o=[],r="",s=ls.LTR,a="",c=e.length;for(let d=0;d";case">":return"<"}}var s3e="\u05D0-\u05EA",a3e="\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF",Xae=new RegExp(`[${s3e}${a3e}]`);function c3e(e){let t=e.split(` +`),n="";for(let i=0;id+1?s[d+1].Type===ls.RTL?(c=m+c,a=0):(c=JX(c,a,u.Word),a+=u.Word.length):c=JX(c,0,m)):u.Type===ls.RTL?c=JX(c,a,m):u.Type===ls.LTR?(c+=u.Word,a=c.length):(u.Type===ls.WEAK||u.Type===ls.BRACKETS)&&(d>0&&s[d-1].Type===ls.RTL?s.length>d+1?s[d+1].Type===ls.RTL?c=JX(c,a,m):(c+=u.Word,a=c.length):c+=u.Word:(c+=u.Word,a=c.length))}n+=c,i0,m=t._backgroundBillboard,p=e._backgroundBillboardCollection;u?(l(m)||(m=p.add({collection:e,image:Mae,imageSubRegion:h3e}),t._backgroundBillboard=m),m.color=t._backgroundColor,m.show=t._show,m.position=t._position,m.eyeOffset=t._eyeOffset,m.pixelOffset=t._pixelOffset,m.horizontalOrigin=fi.LEFT,m.verticalOrigin=t._verticalOrigin,m.heightReference=t._heightReference,m.scale=t.totalScale,m.pickPrimitive=t,m.id=t._id,m.translucencyByDistance=t._translucencyByDistance,m.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,m.scaleByDistance=t._scaleByDistance,m.distanceDisplayCondition=t._distanceDisplayCondition,m.disableDepthTestDistance=t._disableDepthTestDistance,m.clusterShow=t.clusterShow):l(m)&&(p.remove(m),t._backgroundBillboard=m=void 0);let g=e._glyphTextureCache;for(d=0;d0&&Z.height>0){let R=(0,Fae.default)(Z,{cutoff:As.CUTOFF,radius:As.RADIUS}),G=Z.getContext("2d"),W=Z.width,v=Z.height,P=G.getImageData(0,0,W,v);for(let F=0;F0?V=Z.pop():(V=e._billboardCollection.add({collection:e}),V._labelDimensions=new D,V._labelTranslate=new D),a.billboard=V),V.show=t._show,V.position=t._position,V.eyeOffset=t._eyeOffset,V.pixelOffset=t._pixelOffset,V.horizontalOrigin=fi.LEFT,V.verticalOrigin=t._verticalOrigin,V.heightReference=t._heightReference,V.scale=t.totalScale,V.pickPrimitive=t,V.id=t._id,V.image=_,V.translucencyByDistance=t._translucencyByDistance,V.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,V.scaleByDistance=t._scaleByDistance,V.distanceDisplayCondition=t._distanceDisplayCondition,V.disableDepthTestDistance=t._disableDepthTestDistance,V._batchIndex=t._batchIndex,V.outlineColor=t.outlineColor,t.style===Ao.FILL_AND_OUTLINE?(V.color=t._fillColor,V.outlineWidth=t.outlineWidth):t.style===Ao.FILL?(V.color=t._fillColor,V.outlineWidth=0):t.style===Ao.OUTLINE&&(V.color=Y.TRANSPARENT,V.outlineWidth=t.outlineWidth)}}t._repositionAllGlyphs=!0}function wae(e,t,n){return t===fi.CENTER?-e/2:t===fi.RIGHT?-(e+n.x):n.x}var sr=new D,x3e=new D;function _3e(e){let t=e._glyphs,n=e._renderedText,i,o,r=0,s=0,a=[],c=Number.NEGATIVE_INFINITY,d=0,u=1,m,p=t.length,g=e._backgroundBillboard,f=D.clone(l(g)?e._backgroundPadding:D.ZERO,x3e);for(f.x/=e._relativeSize,f.y/=e._relativeSize,m=0;m0&&(C===fi.CENTER?G=-s/2-f.x:C===fi.RIGHT?G=-(s+f.x*2):G=0,sr.x=G*_,V===Pn.TOP?sr.y=x-d-c:V===Pn.CENTER?sr.y=(x-d)/2-c:V===Pn.BASELINE?sr.y=-f.y-c:sr.y=0,sr.y=sr.y*_,g.width=P,g.height=F,g._setTranslate(sr),g._labelTranslate=D.clone(sr,g._labelTranslate)),iu(e.heightReference))for(m=0;m0?So.TRANSLUCENT:this.blendOption;t.blendOption=r,n.blendOption=r,t._highlightColor=this._highlightColor,n._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,n.update(e),t.update(e)};lf.prototype.isDestroyed=function(){return!1};lf.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),this._backgroundTextureAtlas=this._backgroundTextureAtlas&&this._backgroundTextureAtlas.destroy(),me(this)};var df=lf;var m2n=S(T(),1);var nXn=S(T(),1),QX=`in vec3 position3DHigh; in vec3 position3DLow; in vec3 position2DHigh; in vec3 position2DLow; @@ -8986,8 +8997,8 @@ void main() v_pickColor = pickColor; v_polylineAngle = polylineAngle; } -`;var IWn=T(S(),1);var xWn=T(S(),1);var Jc={};Jc.numberOfPoints=function(e,t,n){let i=h.distance(e,t);return Math.ceil(i/n)};Jc.numberOfPointsRhumbLine=function(e,t,n){let i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))};var VYe=new he;Jc.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let o=0;o0){t=y(t,M.IDENTITY);let o=M.inverseTransformation(t,LYe),r=M.multiplyByPoint(o,h.ZERO,RYe),s=h.normalize(M.multiplyByPointAsVector(o,h.UNIT_Y,Aae),Aae),a=dn.fromPointNormal(r,s,ZYe),c=h.normalize(M.multiplyByPointAsVector(o,h.UNIT_X,Mae),Mae),d=dn.fromPointNormal(r,c,GYe),u=1;n.push(h.clone(e[0]));let m=n[0],p=e.length;for(let g=1;g2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(h.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id;let i;l(t)&&(i=M.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=Li.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(Dae),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=le.fromPoints(this._actualPositions),this._boundingVolumeWC=le.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new le}var Uae=xd.POSITION_INDEX=0,wYe=xd.SHOW_INDEX=1,FYe=xd.WIDTH_INDEX=2,AYe=xd.MATERIAL_INDEX=3,qW=xd.POSITION_SIZE_INDEX=4,MYe=xd.DISTANCE_DISPLAY_CONDITION=5,Dae=xd.NUMBER_OF_PROPERTIES=6;function i0(e,t){++e._propertiesChanged[t];let n=e._polylineCollection;l(n)&&(n._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(xd.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e,i0(this,wYe))}},positions:{get:function(){return this._positions},set:function(e){let t=go(e,h.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(h.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&i0(this,qW),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=le.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=le.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),i0(this,Uae),this.update()}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,i0(this,AYe))}},width:{get:function(){return this._width},set:function(e){let t=this._width;e!==t&&(this._width=e,i0(this,FYe))}},loop:{get:function(){return this._loop},set:function(e){if(e!==this._loop){let t=this._actualPositions;e?t.length>2&&!h.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(h.clone(t[0]))):t.length>2&&h.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,i0(this,qW)}}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},isDestroyed:{get:function(){return!l(this._polylineCollection)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){Wt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=Wt.clone(e,this._distanceDisplayCondition),i0(this,MYe))}}});xd.prototype.update=function(){let e=M.IDENTITY;l(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);let t=this._segments.positions.length,n=this._segments.lengths,i=this._propertiesChanged[Uae]>0||this._propertiesChanged[qW]>0;if((!M.equals(e,this._modelMatrix)||i)&&(this._segments=Li.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=le.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=M.clone(e,this._modelMatrix),this._segments.positions.length!==t)i0(this,qW);else{let o=n.length;for(let r=0;r2){if(o[bz]||o[Bae]){let f=e.mode===oe.SCENE2D?i._boundingVolume2D:i._boundingVolumeWC,x=Yn.fromCartesian(f.center,jae),_=se.fromElements(x.low.x,x.low.y,x.low.z,f.radius,qae);this._batchTable.setBatchedAttribute(i._index,2,x.high),this._batchTable.setBatchedAttribute(i._index,3,_)}if(o[DYe]){let f=$ae;f.x=0,f.y=Number.MAX_VALUE;let x=i.distanceDisplayCondition;l(x)&&(f.x=x.near,f.y=x.far),this._batchTable.setBatchedAttribute(i._index,4,f)}}i._clean()}}c.length=0,this._polylinesUpdated=!1}o=this._propertiesChanged;for(let c=0;c0){let O=F.isTranslucent();a>=s?(b=new et({owner:e}),n.push(b)):b=n[a],++a,R=xt(p(F._uniforms),e._uniformMap),b.boundingVolume=le.clone($W,b.boundingVolume),b.modelMatrix=i,b.shaderProgram=G,b.vertexArray=x.va,b.renderState=O?e._translucentRS:e._opaqueRS,b.pass=O?Re.TRANSLUCENT:Re.OPAQUE,b.debugShowBoundingVolume=u,b.pickId="v_pickColor",b.uniformMap=R,b.count=A,b.offset=Z,Z+=A,A=0,c=!0,r.push(b)}F=I._material,F.update(o),P=w}let N=I._locatorBuckets,B=N.length;for(let O=0;O0&&(a>=s?(b=new et({owner:e}),n.push(b)):b=n[a],++a,R=xt(p(F._uniforms),e._uniformMap),b.boundingVolume=le.clone($W,b.boundingVolume),b.modelMatrix=i,b.shaderProgram=G,b.vertexArray=x.va,b.renderState=F.isTranslucent()?e._translucentRS:e._opaqueRS,b.pass=F.isTranslucent()?Re.TRANSLUCENT:Re.OPAQUE,b.debugShowBoundingVolume=u,b.pickId="v_pickColor",b.uniformMap=R,b.count=A,b.offset=Z,c=!0,r.push(b)),P=void 0}}n.length=a}Dm.prototype.isDestroyed=function(){return!1};Dm.prototype.destroy=function(){return ece(this),yz(this),tce(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),me(this)};function OYe(e){let t=!1,n=e._propertiesChanged,i=e._positionBufferUsage;return n[bz]?(i.bufferUsage!==Ne.STREAM_DRAW&&(t=!0,i.bufferUsage=Ne.STREAM_DRAW),i.frameCount=100):i.bufferUsage!==Ne.STATIC_DRAW&&(i.frameCount===0?(t=!0,i.bufferUsage=Ne.STATIC_DRAW):i.frameCount--),t}var Oae=[0,0,0];function Hae(e,t,n){e._createVertexArray=!1,yz(e),ece(e),KYe(e);let i=[[]],o=i[0],r=e._batchTable,s=e._useHighlightColor,a=[0],c=0,d=[[]],u=0,m=e._polylineBuckets,p,g;for(p in m)m.hasOwnProperty(p)&&(g=m[p],g.updateShader(t,r,s),u+=g.lengthOfPositions);if(u>0){let f=e._mode,x=new Float32Array(6*u*3),_=new Float32Array(u*4),C,V=0,L=0,Z=0;for(p in m)if(m.hasOwnProperty(p)){g=m[p],g.write(x,_,V,L,Z,r,t,n),f===oe.MORPHING&&(l(C)||(C=new Float32Array(6*u*3)),g.writeForMorph(C,V));let R=g.lengthOfPositions;V+=6*R*3,L+=R*4,Z+=R*4,c=g.updateIndices(i,a,d,c)}let G=e._positionBufferUsage.bufferUsage,X=Ne.STATIC_DRAW;e._positionBuffer=ft.createVertexBuffer({context:t,typedArray:x,usage:G});let v;l(C)&&(v=ft.createVertexBuffer({context:t,typedArray:C,usage:G})),e._texCoordExpandAndBatchIndexBuffer=ft.createVertexBuffer({context:t,typedArray:_,usage:X});let P=3*Float32Array.BYTES_PER_ELEMENT,F=4*Float32Array.BYTES_PER_ELEMENT,A=0,b=i.length;for(let R=0;R0){let E=new Uint16Array(o),I=ft.createIndexBuffer({context:t,typedArray:E,usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT});A+=a[R];let w=6*(R*(P*W.SIXTY_FOUR_KILOBYTES)-A*P),N=P+w,B=P+N,U=P+B,O=P+U,k=P+O,J=R*(F*W.SIXTY_FOUR_KILOBYTES)-A*F,H=[{index:Fl.position3DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:w,strideInBytes:6*P},{index:Fl.position3DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:N,strideInBytes:6*P},{index:Fl.position2DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:w,strideInBytes:6*P},{index:Fl.position2DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:N,strideInBytes:6*P},{index:Fl.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:B,strideInBytes:6*P},{index:Fl.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:U,strideInBytes:6*P},{index:Fl.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:B,strideInBytes:6*P},{index:Fl.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:U,strideInBytes:6*P},{index:Fl.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:O,strideInBytes:6*P},{index:Fl.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:k,strideInBytes:6*P},{index:Fl.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:O,strideInBytes:6*P},{index:Fl.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:k,strideInBytes:6*P},{index:Fl.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:Q.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:J}],ee,z,j,q;f===oe.SCENE3D?(z=e._positionBuffer,ee="vertexBuffer",j=Oae,q="value"):f===oe.SCENE2D||f===oe.COLUMBUS_VIEW?(z=Oae,ee="value",j=e._positionBuffer,q="vertexBuffer"):(z=v,ee="vertexBuffer",j=e._positionBuffer,q="vertexBuffer"),H[0][ee]=z,H[1][ee]=z,H[2][q]=j,H[3][q]=j,H[4][ee]=z,H[5][ee]=z,H[6][q]=j,H[7][q]=j,H[8][ee]=z,H[9][ee]=z,H[10][q]=j,H[11][q]=j;let be=new ei({context:t,attributes:H,indexBuffer:I});e._vertexArrays.push({va:be,buckets:d[R]})}}}function HYe(e,t){return t instanceof Et?t.id:t}var P5=[];function zYe(e){let t=Ai._uniformList[e.type],n=t.length;P5.length=2*n;let i=0;for(let o=0;o1){a.update();let c=a.material,d=i[c.type];l(d)||(d=i[c.type]=new mf(c,t,n)),d.addPolyline(a)}}}function JYe(e,t){let n=t.mode;(e._mode!==n||!M.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=n,e._modelMatrix=M.clone(e.modelMatrix),e._createVertexArray=!0)}function gz(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;let t=[],n=[],i=0,o,r=e._polylines.length;for(let s=0;s0,_=g._index,C=this.getSegments(g,a),V=C.positions,L=C.lengths,Z=V.length,G=g.getPickId(s).color,X=0,v=0,P;for(let B=0;B0||bs.x>0&&Lu.x<0)&&h.clone(bs,Lu),(bs.x<0&&Ru.x>0||bs.x>0&&Ru.x<0)&&h.clone(bs,Ru));let J=O?2:0,H=k?2:4;for(let ee=J;ee2&&(r.setBatchedAttribute(_,2,E),r.setBatchedAttribute(_,3,I),r.setBatchedAttribute(_,4,w))}};var qYe=new h,$Ye=new h,eOe=new h,zae=new h;mf.prototype.writeForMorph=function(e,t){let n=this.modelMatrix,i=this.polylines,o=i.length;for(let r=0;r0&&(c=a[a.length-1]+1);let d=this.polylines,u=d.length;for(let m=0;m0)g[0]=x;else continue}else g=p._segments.lengths;let f=g.length;if(f>0){let x=0;for(let _=0;_W.SIXTY_FOUR_KILOBYTES&&(p._locatorBuckets.push({locator:r,count:x}),x=0,t.push(4),a=[],e.push(a),c=0,r.count=s,s=0,i=0,r=new pz(0,0,this),n[++o]=[r]),a.push(c,c+2,c+1),a.push(c+1,c+2,c+3),x+=6,s+=6,i+=6,c+=4}p._locatorBuckets.push({locator:r,count:x}),c+4>W.SIXTY_FOUR_KILOBYTES&&(t.push(0),a=[],e.push(a),c=0,r.count=s,i=0,s=0,r=new pz(0,0,this),n[++o]=[r])}p._clean()}return r.count=s,i};mf.prototype.getPolylineStartIndex=function(e){let t=this.polylines,n=0,i=t.length;for(let o=0;o0){e._boundingVolume2D=le.fromPoints(o,e._boundingVolume2D);let d=e._boundingVolume2D.center;e._boundingVolume2D.center=new h(d.z,d.x,d.y)}return zC.positions=o,zC.lengths=e._segments.lengths,zC};var Jae;mf.prototype.writeUpdate=function(e,t,n,i){let o=this.mode,r=i.ellipsoid.maximumRadius*W.PI,s=t._actualLength;if(s){e+=this.getPolylineStartIndex(t);let a=Jae,c=6*s*3;!l(a)||a.lengthc&&(a=new Float32Array(a.buffer,0,c));let d=this.getSegments(t,i),u=d.positions,m=d.lengths,p=0,g=0,f=0,x;s=u.length;for(let _=0;_0||bs.x>0&&Lu.x<0)&&h.clone(bs,Lu),(bs.x<0&&Ru.x>0||bs.x>0&&Ru.x<0)&&h.clone(bs,Ru));let Z=V?2:0,G=L?2:4;for(let X=Z;X{if(e.isDestroyed())return;e._positions=new Float64Array(a.positions);let c=e._billboardCollection,d=e._labelCollection,u=e._polylineCollection;n=e._positions;let m=e._batchIds,p=n.length/3;for(let g=0;g{e.isDestroyed()||(e._error=a)})}Sg.prototype.createFeatures=function(e,t){let n=this._billboardCollection,i=this._labelCollection,o=this._polylineCollection,r=this._batchIds,s=r.length;for(let a=0;a{if(e.isDestroyed())return;e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;let f=new Float64Array(g.packedBuffer),x=f[0];bOe(e,f),e._indices=Me.getSizeInBytes(x)===2?new Uint16Array(g.indices):new Uint32Array(g.indices),e._indexOffsets=new Uint32Array(g.indexOffsets),e._indexCounts=new Uint32Array(g.indexCounts),e._batchedPositions=new Float32Array(g.positions),e._vertexBatchIds=new Uint16Array(g.batchIds),_Oe(e),e._ready=!0}).catch(g=>{e.isDestroyed()||(e._error=g)})}function _Oe(e){l(e._primitive)||(e._primitive=new Ax({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0)}o0.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};o0.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};o0.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};o0.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};o0.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=xOe(this)),l(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};o0.prototype.isDestroyed=function(){return!1};o0.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};var i2=o0;var VPn=T(S(),1);var q2n=T(S(),1),o2=`in vec4 currentPosition; +`;var RXn=S(T(),1);var pXn=S(T(),1);var Hc={};Hc.numberOfPoints=function(e,t,n){let i=h.distance(e,t);return Math.ceil(i/n)};Hc.numberOfPointsRhumbLine=function(e,t,n){let i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))};var S3e=new he;Hc.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let o=0;o0){t=y(t,A.IDENTITY);let o=A.inverseTransformation(t,T3e),r=A.multiplyByPoint(o,h.ZERO,C3e),s=h.normalize(A.multiplyByPointAsVector(o,h.UNIT_Y,Uae),Uae),a=dn.fromPointNormal(r,s,V3e),c=h.normalize(A.multiplyByPointAsVector(o,h.UNIT_X,kae),kae),d=dn.fromPointNormal(r,c,Z3e),u=1;n.push(h.clone(e[0]));let m=n[0],p=e.length;for(let g=1;g2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(h.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id;let i;l(t)&&(i=A.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=Li.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(Oae),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=le.fromPoints(this._actualPositions),this._boundingVolumeWC=le.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new le}var Yae=yd.POSITION_INDEX=0,X3e=yd.SHOW_INDEX=1,P3e=yd.WIDTH_INDEX=2,v3e=yd.MATERIAL_INDEX=3,qX=yd.POSITION_SIZE_INDEX=4,w3e=yd.DISTANCE_DISPLAY_CONDITION=5,Oae=yd.NUMBER_OF_PROPERTIES=6;function nb(e,t){++e._propertiesChanged[t];let n=e._polylineCollection;l(n)&&(n._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(yd.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e,nb(this,X3e))}},positions:{get:function(){return this._positions},set:function(e){let t=go(e,h.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(h.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&nb(this,qX),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=le.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=le.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),nb(this,Yae),this.update()}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,nb(this,v3e))}},width:{get:function(){return this._width},set:function(e){let t=this._width;e!==t&&(this._width=e,nb(this,P3e))}},loop:{get:function(){return this._loop},set:function(e){if(e!==this._loop){let t=this._actualPositions;e?t.length>2&&!h.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(h.clone(t[0]))):t.length>2&&h.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,nb(this,qX)}}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},isDestroyed:{get:function(){return!l(this._polylineCollection)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){Xt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=Xt.clone(e,this._distanceDisplayCondition),nb(this,w3e))}}});yd.prototype.update=function(){let e=A.IDENTITY;l(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);let t=this._segments.positions.length,n=this._segments.lengths,i=this._propertiesChanged[Yae]>0||this._propertiesChanged[qX]>0;if((!A.equals(e,this._modelMatrix)||i)&&(this._segments=Li.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=le.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=A.clone(e,this._modelMatrix),this._segments.positions.length!==t)nb(this,qX);else{let o=n.length;for(let r=0;r2){if(o[gK]||o[zae]){let f=e.mode===oe.SCENE2D?i._boundingVolume2D:i._boundingVolumeWC,x=Yn.fromCartesian(f.center,ece),_=se.fromElements(x.low.x,x.low.y,x.low.z,f.radius,tce);this._batchTable.setBatchedAttribute(i._index,2,x.high),this._batchTable.setBatchedAttribute(i._index,3,_)}if(o[N3e]){let f=nce;f.x=0,f.y=Number.MAX_VALUE;let x=i.distanceDisplayCondition;l(x)&&(f.x=x.near,f.y=x.far),this._batchTable.setBatchedAttribute(i._index,4,f)}}i._clean()}}c.length=0,this._polylinesUpdated=!1}o=this._propertiesChanged;for(let c=0;c<$ae;++c)o[c]=0;let r=A.IDENTITY;e.mode===oe.SCENE3D&&(r=this.modelMatrix);let s=e.passes,a=e.morphTime!==0;if((!l(this._opaqueRS)||this._opaqueRS.depthTest.enabled!==a)&&(this._opaqueRS=De.fromCache({depthMask:a,depthTest:{enabled:a}})),(!l(this._translucentRS)||this._translucentRS.depthTest.enabled!==a)&&(this._translucentRS=De.fromCache({blending:un.ALPHA_BLEND,depthMask:!a,depthTest:{enabled:a}})),this._batchTable.update(e),s.render||s.pick){let c=this._colorCommands;k3e(this,e,c,r)}};var $X=new le,Kae=new le;function k3e(e,t,n,i){let o=t.context,r=t.commandList,s=n.length,a=0,c=!0,d=e._vertexArrays,u=e.debugShowBoundingVolume,p=e._batchTable.getUniformMapCallback(),g=d.length;for(let f=0;f0){let O=F.isTranslucent();a>=s?(b=new tt({owner:e}),n.push(b)):b=n[a],++a,L=xt(p(F._uniforms),e._uniformMap),b.boundingVolume=le.clone($X,b.boundingVolume),b.modelMatrix=i,b.shaderProgram=G,b.vertexArray=x.va,b.renderState=O?e._translucentRS:e._opaqueRS,b.pass=O?Le.TRANSLUCENT:Le.OPAQUE,b.debugShowBoundingVolume=u,b.pickId="v_pickColor",b.uniformMap=L,b.count=M,b.offset=R,R+=M,M=0,c=!0,r.push(b)}F=I._material,F.update(o),P=w}let N=I._locatorBuckets,B=N.length;for(let O=0;O0&&(a>=s?(b=new tt({owner:e}),n.push(b)):b=n[a],++a,L=xt(p(F._uniforms),e._uniformMap),b.boundingVolume=le.clone($X,b.boundingVolume),b.modelMatrix=i,b.shaderProgram=G,b.vertexArray=x.va,b.renderState=F.isTranslucent()?e._translucentRS:e._opaqueRS,b.pass=F.isTranslucent()?Le.TRANSLUCENT:Le.OPAQUE,b.debugShowBoundingVolume=u,b.pickId="v_pickColor",b.uniformMap=L,b.count=M,b.offset=R,c=!0,r.push(b)),P=void 0}}n.length=a}km.prototype.isDestroyed=function(){return!1};km.prototype.destroy=function(){return ice(this),xK(this),oce(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),me(this)};function D3e(e){let t=!1,n=e._propertiesChanged,i=e._positionBufferUsage;return n[gK]?(i.bufferUsage!==Ne.STREAM_DRAW&&(t=!0,i.bufferUsage=Ne.STREAM_DRAW),i.frameCount=100):i.bufferUsage!==Ne.STATIC_DRAW&&(i.frameCount===0?(t=!0,i.bufferUsage=Ne.STATIC_DRAW):i.frameCount--),t}var Hae=[0,0,0];function Jae(e,t,n){e._createVertexArray=!1,xK(e),ice(e),O3e(e);let i=[[]],o=i[0],r=e._batchTable,s=e._useHighlightColor,a=[0],c=0,d=[[]],u=0,m=e._polylineBuckets,p,g;for(p in m)m.hasOwnProperty(p)&&(g=m[p],g.updateShader(t,r,s),u+=g.lengthOfPositions);if(u>0){let f=e._mode,x=new Float32Array(6*u*3),_=new Float32Array(u*4),C,V=0,Z=0,R=0;for(p in m)if(m.hasOwnProperty(p)){g=m[p],g.write(x,_,V,Z,R,r,t,n),f===oe.MORPHING&&(l(C)||(C=new Float32Array(6*u*3)),g.writeForMorph(C,V));let L=g.lengthOfPositions;V+=6*L*3,Z+=L*4,R+=L*4,c=g.updateIndices(i,a,d,c)}let G=e._positionBufferUsage.bufferUsage,W=Ne.STATIC_DRAW;e._positionBuffer=ft.createVertexBuffer({context:t,typedArray:x,usage:G});let v;l(C)&&(v=ft.createVertexBuffer({context:t,typedArray:C,usage:G})),e._texCoordExpandAndBatchIndexBuffer=ft.createVertexBuffer({context:t,typedArray:_,usage:W});let P=3*Float32Array.BYTES_PER_ELEMENT,F=4*Float32Array.BYTES_PER_ELEMENT,M=0,b=i.length;for(let L=0;L0){let E=new Uint16Array(o),I=ft.createIndexBuffer({context:t,typedArray:E,usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT});M+=a[L];let w=6*(L*(P*X.SIXTY_FOUR_KILOBYTES)-M*P),N=P+w,B=P+N,k=P+B,O=P+k,U=P+O,J=L*(F*X.SIXTY_FOUR_KILOBYTES)-M*F,z=[{index:wl.position3DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:w,strideInBytes:6*P},{index:wl.position3DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:N,strideInBytes:6*P},{index:wl.position2DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:w,strideInBytes:6*P},{index:wl.position2DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:N,strideInBytes:6*P},{index:wl.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:B,strideInBytes:6*P},{index:wl.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:k,strideInBytes:6*P},{index:wl.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:B,strideInBytes:6*P},{index:wl.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:k,strideInBytes:6*P},{index:wl.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:O,strideInBytes:6*P},{index:wl.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:U,strideInBytes:6*P},{index:wl.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:O,strideInBytes:6*P},{index:wl.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:Q.FLOAT,offsetInBytes:U,strideInBytes:6*P},{index:wl.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:Q.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:J}],ee,K,j,q;f===oe.SCENE3D?(K=e._positionBuffer,ee="vertexBuffer",j=Hae,q="value"):f===oe.SCENE2D||f===oe.COLUMBUS_VIEW?(K=Hae,ee="value",j=e._positionBuffer,q="vertexBuffer"):(K=v,ee="vertexBuffer",j=e._positionBuffer,q="vertexBuffer"),z[0][ee]=K,z[1][ee]=K,z[2][q]=j,z[3][q]=j,z[4][ee]=K,z[5][ee]=K,z[6][q]=j,z[7][q]=j,z[8][ee]=K,z[9][ee]=K,z[10][q]=j,z[11][q]=j;let be=new ei({context:t,attributes:z,indexBuffer:I});e._vertexArrays.push({va:be,buckets:d[L]})}}}function B3e(e,t){return t instanceof Et?t.id:t}var v5=[];function Y3e(e){let t=Mi._uniformList[e.type],n=t.length;v5.length=2*n;let i=0;for(let o=0;o1){a.update();let c=a.material,d=i[c.type];l(d)||(d=i[c.type]=new uf(c,t,n)),d.addPolyline(a)}}}function z3e(e,t){let n=t.mode;(e._mode!==n||!A.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=n,e._modelMatrix=A.clone(e.modelMatrix),e._createVertexArray=!0)}function yK(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;let t=[],n=[],i=0,o,r=e._polylines.length;for(let s=0;s0,_=g._index,C=this.getSegments(g,a),V=C.positions,Z=C.lengths,R=V.length,G=g.getPickId(s).color,W=0,v=0,P;for(let B=0;B0||ys.x>0&&Vu.x<0)&&h.clone(ys,Vu),(ys.x<0&&Zu.x>0||ys.x>0&&Zu.x<0)&&h.clone(ys,Zu));let J=O?2:0,z=U?2:4;for(let ee=J;ee2&&(r.setBatchedAttribute(_,2,E),r.setBatchedAttribute(_,3,I),r.setBatchedAttribute(_,4,w))}};var J3e=new h,Q3e=new h,j3e=new h,Qae=new h;uf.prototype.writeForMorph=function(e,t){let n=this.modelMatrix,i=this.polylines,o=i.length;for(let r=0;r0&&(c=a[a.length-1]+1);let d=this.polylines,u=d.length;for(let m=0;m0)g[0]=x;else continue}else g=p._segments.lengths;let f=g.length;if(f>0){let x=0;for(let _=0;_X.SIXTY_FOUR_KILOBYTES&&(p._locatorBuckets.push({locator:r,count:x}),x=0,t.push(4),a=[],e.push(a),c=0,r.count=s,s=0,i=0,r=new bK(0,0,this),n[++o]=[r]),a.push(c,c+2,c+1),a.push(c+1,c+2,c+3),x+=6,s+=6,i+=6,c+=4}p._locatorBuckets.push({locator:r,count:x}),c+4>X.SIXTY_FOUR_KILOBYTES&&(t.push(0),a=[],e.push(a),c=0,r.count=s,i=0,s=0,r=new bK(0,0,this),n[++o]=[r])}p._clean()}return r.count=s,i};uf.prototype.getPolylineStartIndex=function(e){let t=this.polylines,n=0,i=t.length;for(let o=0;o0){e._boundingVolume2D=le.fromPoints(o,e._boundingVolume2D);let d=e._boundingVolume2D.center;e._boundingVolume2D.center=new h(d.z,d.x,d.y)}return zC.positions=o,zC.lengths=e._segments.lengths,zC};var qae;uf.prototype.writeUpdate=function(e,t,n,i){let o=this.mode,r=i.ellipsoid.maximumRadius*X.PI,s=t._actualLength;if(s){e+=this.getPolylineStartIndex(t);let a=qae,c=6*s*3;!l(a)||a.lengthc&&(a=new Float32Array(a.buffer,0,c));let d=this.getSegments(t,i),u=d.positions,m=d.lengths,p=0,g=0,f=0,x;s=u.length;for(let _=0;_0||ys.x>0&&Vu.x<0)&&h.clone(ys,Vu),(ys.x<0&&Zu.x>0||ys.x>0&&Zu.x<0)&&h.clone(ys,Zu));let R=V?2:0,G=Z?2:4;for(let W=R;W{if(e.isDestroyed())return;e._positions=new Float64Array(a.positions);let c=e._billboardCollection,d=e._labelCollection,u=e._polylineCollection;n=e._positions;let m=e._batchIds,p=n.length/3;for(let g=0;g{e.isDestroyed()||(e._error=a)})}Sg.prototype.createFeatures=function(e,t){let n=this._billboardCollection,i=this._labelCollection,o=this._polylineCollection,r=this._batchIds,s=r.length;for(let a=0;a{if(e.isDestroyed())return;e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;let f=new Float64Array(g.packedBuffer),x=f[0];hOe(e,f),e._indices=Me.getSizeInBytes(x)===2?new Uint16Array(g.indices):new Uint32Array(g.indices),e._indexOffsets=new Uint32Array(g.indexOffsets),e._indexCounts=new Uint32Array(g.indexCounts),e._batchedPositions=new Float32Array(g.positions),e._vertexBatchIds=new Uint16Array(g.batchIds),gOe(e),e._ready=!0}).catch(g=>{e.isDestroyed()||(e._error=g)})}function gOe(e){l(e._primitive)||(e._primitive=new Fx({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0)}ib.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};ib.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};ib.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};ib.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};ib.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=bOe(this)),l(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};ib.prototype.isDestroyed=function(){return!1};ib.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};var i2=ib;var _Pn=S(T(),1);var H2n=S(T(),1),o2=`in vec4 currentPosition; in vec4 previousPosition; in vec4 nextPosition; in vec2 expandAndWidth; @@ -9009,12 +9020,12 @@ void main() vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle); gl_Position = czm_viewportOrthographic * positionWC; } -`;function Ym(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=y(e.ellipsoid,ie.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=Y.clone(Y.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(Ym.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function TOe(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+ce.packedLength+ie.packedLength+h.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,ce.pack(t,a,c),c+=ce.packedLength,ie.pack(o,a,c),c+=ie.packedLength,h.pack(r,a,c),a}var SOe=new pi("createVectorTilePolylines",5),KC={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function COe(e,t){if(l(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,s=e._packedBuffer;l(s)||(n=e._positions=n.slice(),i=e._widths=i.slice(),o=e._counts=o.slice(),r=e._transferrableBatchIds=e._batchIds.slice(),s=e._packedBuffer=TOe(e));let a=[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer],c={positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},d=SOe.scheduleTask(c,a);if(l(d))return d.then(function(u){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(u.decodedPositions),e._decodedPositionOffsets=new Uint32Array(u.decodedPositionOffsets)),e._currentPositions=new Float32Array(u.currentPositions),e._previousPositions=new Float32Array(u.previousPositions),e._nextPositions=new Float32Array(u.nextPositions),e._expandAndWidth=new Float32Array(u.expandAndWidth),e._vertexBatchIds=new Uint16Array(u.batchIds);let m=u.indexDatatype;e._indices=m===Me.UNSIGNED_SHORT?new Uint16Array(u.indices):new Uint32Array(u.indices),VOe(e,t),e._ready=!0}).catch(u=>{e.isDestroyed()||(e._error=u)})}function VOe(e,t){if(!l(e._va)){let n=e._currentPositions,i=e._previousPositions,o=e._nextPositions,r=e._expandAndWidth,s=e._vertexBatchIds,a=e._indices,c=i.byteLength+n.byteLength+o.byteLength;c+=r.byteLength+s.byteLength+a.byteLength,e._trianglesLength=a.length/3,e._geometryByteLength=c;let d=ft.createVertexBuffer({context:t,typedArray:i,usage:Ne.STATIC_DRAW}),u=ft.createVertexBuffer({context:t,typedArray:n,usage:Ne.STATIC_DRAW}),m=ft.createVertexBuffer({context:t,typedArray:o,usage:Ne.STATIC_DRAW}),p=ft.createVertexBuffer({context:t,typedArray:r,usage:Ne.STATIC_DRAW}),g=ft.createVertexBuffer({context:t,typedArray:s,usage:Ne.STATIC_DRAW}),f=ft.createIndexBuffer({context:t,typedArray:a,usage:Ne.STATIC_DRAW,indexDatatype:a.BYTES_PER_ELEMENT===2?Me.UNSIGNED_SHORT:Me.UNSIGNED_INT}),x=[{index:KC.previousPosition,vertexBuffer:d,componentDatatype:Q.FLOAT,componentsPerAttribute:3},{index:KC.currentPosition,vertexBuffer:u,componentDatatype:Q.FLOAT,componentsPerAttribute:3},{index:KC.nextPosition,vertexBuffer:m,componentDatatype:Q.FLOAT,componentsPerAttribute:3},{index:KC.expandAndWidth,vertexBuffer:p,componentDatatype:Q.FLOAT,componentsPerAttribute:2},{index:KC.a_batchId,vertexBuffer:g,componentDatatype:Q.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new ei({context:t,attributes:x,indexBuffer:f}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var r2=new M,ice=new h;function LOe(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return M.clone(n,r2),M.multiplyByPoint(r2,e._center,ice),M.setTranslation(r2,ice,r2),r2},u_highlightColor:function(){return e._highlightColor}})}function ROe(e){if(l(e._rs))return;let t={enabled:!0,factor:-5,units:-5};e._rs=De.fromCache({blending:un.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:t})}var ZOe=`uniform vec4 u_highlightColor; +`;function Bm(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=y(e.ellipsoid,te.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=Y.clone(Y.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(Bm.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function yOe(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+ce.packedLength+te.packedLength+h.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,ce.pack(t,a,c),c+=ce.packedLength,te.pack(o,a,c),c+=te.packedLength,h.pack(r,a,c),a}var xOe=new bi("createVectorTilePolylines",5),KC={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function _Oe(e,t){if(l(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,s=e._packedBuffer;l(s)||(n=e._positions=n.slice(),i=e._widths=i.slice(),o=e._counts=o.slice(),r=e._transferrableBatchIds=e._batchIds.slice(),s=e._packedBuffer=yOe(e));let a=[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer],c={positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},d=xOe.scheduleTask(c,a);if(l(d))return d.then(function(u){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(u.decodedPositions),e._decodedPositionOffsets=new Uint32Array(u.decodedPositionOffsets)),e._currentPositions=new Float32Array(u.currentPositions),e._previousPositions=new Float32Array(u.previousPositions),e._nextPositions=new Float32Array(u.nextPositions),e._expandAndWidth=new Float32Array(u.expandAndWidth),e._vertexBatchIds=new Uint16Array(u.batchIds);let m=u.indexDatatype;e._indices=m===Me.UNSIGNED_SHORT?new Uint16Array(u.indices):new Uint32Array(u.indices),SOe(e,t),e._ready=!0}).catch(u=>{e.isDestroyed()||(e._error=u)})}function SOe(e,t){if(!l(e._va)){let n=e._currentPositions,i=e._previousPositions,o=e._nextPositions,r=e._expandAndWidth,s=e._vertexBatchIds,a=e._indices,c=i.byteLength+n.byteLength+o.byteLength;c+=r.byteLength+s.byteLength+a.byteLength,e._trianglesLength=a.length/3,e._geometryByteLength=c;let d=ft.createVertexBuffer({context:t,typedArray:i,usage:Ne.STATIC_DRAW}),u=ft.createVertexBuffer({context:t,typedArray:n,usage:Ne.STATIC_DRAW}),m=ft.createVertexBuffer({context:t,typedArray:o,usage:Ne.STATIC_DRAW}),p=ft.createVertexBuffer({context:t,typedArray:r,usage:Ne.STATIC_DRAW}),g=ft.createVertexBuffer({context:t,typedArray:s,usage:Ne.STATIC_DRAW}),f=ft.createIndexBuffer({context:t,typedArray:a,usage:Ne.STATIC_DRAW,indexDatatype:a.BYTES_PER_ELEMENT===2?Me.UNSIGNED_SHORT:Me.UNSIGNED_INT}),x=[{index:KC.previousPosition,vertexBuffer:d,componentDatatype:Q.FLOAT,componentsPerAttribute:3},{index:KC.currentPosition,vertexBuffer:u,componentDatatype:Q.FLOAT,componentsPerAttribute:3},{index:KC.nextPosition,vertexBuffer:m,componentDatatype:Q.FLOAT,componentsPerAttribute:3},{index:KC.expandAndWidth,vertexBuffer:p,componentDatatype:Q.FLOAT,componentsPerAttribute:2},{index:KC.a_batchId,vertexBuffer:g,componentDatatype:Q.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new ei({context:t,attributes:x,indexBuffer:f}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var r2=new A,sce=new h;function TOe(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return A.clone(n,r2),A.multiplyByPoint(r2,e._center,sce),A.setTranslation(r2,sce,r2),r2},u_highlightColor:function(){return e._highlightColor}})}function COe(e){if(l(e._rs))return;let t={enabled:!0,factor:-5,units:-5};e._rs=De.fromCache({blending:un.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:t})}var VOe=`uniform vec4 u_highlightColor; void main() { out_FragColor = u_highlightColor; } -`;function GOe(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(o2),o=n.getFragmentShaderCallback(!1,void 0,!1)(ZOe),r=new Ye({defines:["VECTOR_TILE",Yt.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[ld,i]}),s=new Ye({defines:["VECTOR_TILE"],sources:[o]});e._sp=qt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:KC})}function EOe(e,t){if(!l(e._command)){let n=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new et({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:n,boundingVolume:e._boundingVolume,pass:Re.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}Ym.getPolylinePositions=function(e,t){let n=e._batchIds,i=e._decodedPositions,o=e._decodedPositionOffsets;if(!l(n)||!l(i))return;let r,s,a=n.length,c=0,d=0;for(r=0;r{e.isDestroyed()||(e._error=u)})}function MOe(e,t){if(!l(e._va)){let n=e._startEllipsoidNormals,i=e._endEllipsoidNormals,o=e._startPositionAndHeights,r=e._endPositionAndHeights,s=e._startFaceNormalAndVertexCornerIds,a=e._endFaceNormalAndHalfWidths,c=e._vertexBatchIds,d=e._indices,u=n.byteLength+i.byteLength;u+=o.byteLength+r.byteLength,u+=s.byteLength+a.byteLength,u+=c.byteLength+d.byteLength,e._trianglesLength=d.length/3,e._geometryByteLength=u;let m=ft.createVertexBuffer({context:t,typedArray:n,usage:Ne.STATIC_DRAW}),p=ft.createVertexBuffer({context:t,typedArray:i,usage:Ne.STATIC_DRAW}),g=ft.createVertexBuffer({context:t,typedArray:o,usage:Ne.STATIC_DRAW}),f=ft.createVertexBuffer({context:t,typedArray:r,usage:Ne.STATIC_DRAW}),x=ft.createVertexBuffer({context:t,typedArray:s,usage:Ne.STATIC_DRAW}),_=ft.createVertexBuffer({context:t,typedArray:a,usage:Ne.STATIC_DRAW}),C=ft.createVertexBuffer({context:t,typedArray:c,usage:Ne.STATIC_DRAW}),V=ft.createIndexBuffer({context:t,typedArray:d,usage:Ne.STATIC_DRAW,indexDatatype:d.BYTES_PER_ELEMENT===2?Me.UNSIGNED_SHORT:Me.UNSIGNED_INT}),L=[{index:Cg.startEllipsoidNormal,vertexBuffer:m,componentDatatype:Q.FLOAT,componentsPerAttribute:3},{index:Cg.endEllipsoidNormal,vertexBuffer:p,componentDatatype:Q.FLOAT,componentsPerAttribute:3},{index:Cg.startPositionAndHeight,vertexBuffer:g,componentDatatype:Q.FLOAT,componentsPerAttribute:4},{index:Cg.endPositionAndHeight,vertexBuffer:f,componentDatatype:Q.FLOAT,componentsPerAttribute:4},{index:Cg.startFaceNormalAndVertexCorner,vertexBuffer:x,componentDatatype:Q.FLOAT,componentsPerAttribute:4},{index:Cg.endFaceNormalAndHalfWidth,vertexBuffer:_,componentDatatype:Q.FLOAT,componentsPerAttribute:4},{index:Cg.a_batchId,vertexBuffer:C,componentDatatype:Q.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new ei({context:t,attributes:L,indexBuffer:V}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._startEllipsoidNormals=void 0,e._endEllipsoidNormals=void 0,e._startPositionAndHeights=void 0,e._startFaceNormalAndVertexCornerIds=void 0,e._endPositionAndHeights=void 0,e._endFaceNormalAndHalfWidths=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var c2=new M,oce=new h;function NOe(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return M.clone(n,c2),M.multiplyByPoint(c2,e._center,oce),M.setTranslation(c2,oce,c2),c2},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})}function rce(e){return De.fromCache({cull:{enabled:!0,face:fi.FRONT},blending:un.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:Un.EQUAL,frontOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.KEEP},backFunction:Un.EQUAL,backOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.KEEP},reference:Nt.CESIUM_3D_TILE_MASK,mask:Nt.CESIUM_3D_TILE_MASK}})}function kOe(e){l(e._rs)||(e._rs=rce(!1),e._rs3DTiles=rce(!0))}function UOe(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(s2),o=n.getFragmentShaderCallback(!1,void 0,!0)(a2),r=new Ye({defines:["VECTOR_TILE",Yt.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[ld,i]}),s=new Ye({defines:["VECTOR_TILE"],sources:[o]});e._sp=qt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:Cg})}function DOe(e,t){let n=e._command;if(!l(e._command)){let o=e._batchTable.getUniformMapCallback()(e._uniformMap);n=e._command=new et({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:o,boundingVolume:e._boundingVolume,pass:Re.TERRAIN_CLASSIFICATION,pickId:e._batchTable.getPickId()});let r=et.shallowClone(n,n.derivedCommands.tileset);r.renderState=e._rs3DTiles,r.pass=Re.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=r}let i=e._classificationType;(i===kn.TERRAIN||i===kn.BOTH)&&t.commandList.push(n),(i===kn.CESIUM_3D_TILE||i===kn.BOTH)&&t.commandList.push(n.derivedCommands.tileset)}r0.prototype.getPositions=function(e){return g_.getPolylinePositions(this,e)};r0.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o{e.isDestroyed()||(e._error=t)})}r0.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=zOe(this).then(AOe(this,t))),l(this._error)){let i=this._error;throw this._error=void 0,i}return}NOe(this,t),UOe(this,t),kOe(this);let n=e.passes;(n.render||n.pick)&&DOe(this,e)};r0.prototype.isDestroyed=function(){return!1};r0.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),me(this)};var l2=r0;var bvn=T(S(),1);var _z=32767,KOe=new he,JOe=new h;function QOe(e,t,n,i,o){let r=e.length/3,s=e.subarray(0,r),a=e.subarray(r,2*r),c=e.subarray(2*r,3*r);wn.zigZagDeltaDecode(s,a,c);let d=new Float64Array(e.length);for(let u=0;u0&&l(e.POLYGON_BATCH_IDS)){let p=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,p,s)}if(a>0&&l(e.POLYLINE_BATCH_IDS)){let p=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,p,a)}if(c>0&&l(e.POINT_BATCH_IDS)){let p=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,p,c)}let d=l(n)||l(i)||l(o),u=s>0&&!l(n)||a>0&&!l(i)||c>0&&!l(o);if(d&&u)throw new ue("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(o)){let p=0;if(!l(n)&&s>0)for(n=new Uint16Array(s),r=0;r0)for(i=new Uint16Array(a),r=0;r0)for(o=new Uint16Array(c),r=0;r0&&(C=Eo(i,n,d),n+=d,u>0&&(V=new Uint8Array(t,n,u),V=new Uint8Array(V),n+=u));let L=y(x.POLYGONS_LENGTH,0),Z=y(x.POLYLINES_LENGTH,0),G=y(x.POINTS_LENGTH,0),X=L+Z+G,v=new Xp(e,X,C,V,jOe(e));if(e._batchTable=v,X===0)return;let P=new Mm(x,_),F=P.getGlobalProperty("REGION");if(!l(F))throw new ue("Feature table global property: REGION must be defined");let A=ce.unpack(F),b=F[4],R=F[5],E=e._tile.computedTransform,I=P.getGlobalProperty("RTC_CENTER",Q.FLOAT,3);l(I)?(I=h.unpack(I),M.multiplyByPoint(E,I,I)):(I=ce.center(A),I.height=W.lerp(b,R,.5),I=ie.WGS84.cartographicToCartesian(I));let w=qOe(x,_);if(n+=(4-n%4)%4,L>0){P.featuresLength=L;let N=y(P.getPropertyArray("POLYGON_COUNTS",Q.UNSIGNED_INT,1),P.getPropertyArray("POLYGON_COUNT",Q.UNSIGNED_INT,1));if(!l(N))throw new ue("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let B=y(P.getPropertyArray("POLYGON_INDEX_COUNTS",Q.UNSIGNED_INT,1),P.getPropertyArray("POLYGON_INDEX_COUNT",Q.UNSIGNED_INT,1));if(!l(B))throw new ue("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let U=N.reduce(function(z,j){return z+j*2},0),O=B.reduce(function(z,j){return z+j},0),k=new Uint32Array(t,n,O);n+=m;let J=new Uint16Array(t,n,U);n+=p;let H,ee;l(x.POLYGON_MINIMUM_HEIGHTS)&&l(x.POLYGON_MAXIMUM_HEIGHTS)&&(H=P.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",Q.FLOAT,1),ee=P.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",Q.FLOAT,1)),e._polygons=new i2({positions:J,counts:N,indexCounts:B,indices:k,minimumHeight:b,maximumHeight:R,polygonMinimumHeights:H,polygonMaximumHeights:ee,center:I,rectangle:A,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:v,batchIds:w.polygons,modelMatrix:E})}if(Z>0){P.featuresLength=Z;let N=y(P.getPropertyArray("POLYLINE_COUNTS",Q.UNSIGNED_INT,1),P.getPropertyArray("POLYLINE_COUNT",Q.UNSIGNED_INT,1));if(!l(N))throw new ue("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");let B=P.getPropertyArray("POLYLINE_WIDTHS",Q.UNSIGNED_SHORT,1);if(!l(B)){B=new Uint16Array(Z);for(let ee=0;ee0){let N=new Uint16Array(t,n,G*3);n+=f,e._points=new n2({positions:N,batchIds:w.points,minimumHeight:b,maximumHeight:R,rectangle:A,batchTable:v})}}function Tz(e){let t=e.featuresLength;if(!l(e._features)&&t>0){let n=new Array(t);l(e._polygons)&&e._polygons.createFeatures(e,n),l(e._polylines)&&e._polylines.createFeatures(e,n),l(e._points)&&e._points.createFeatures(e,n),e._features=n}}Hm.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};Hm.prototype.getFeature=function(e){return l(this._features)||Tz(this),this._features[e]};Hm.prototype.applyDebugSettings=function(e,t){l(this._polygons)&&this._polygons.applyDebugSettings(e,t),l(this._polylines)&&this._polylines.applyDebugSettings(e,t),l(this._points)&&this._points.applyDebugSettings(e,t)};Hm.prototype.applyStyle=function(e){l(this._features)||Tz(this),l(this._polygons)&&this._polygons.applyStyle(e,this._features),l(this._polylines)&&this._polylines.applyStyle(e,this._features),l(this._points)&&this._points.applyStyle(e,this._features)};Hm.prototype.update=function(e,t){let n=!0;l(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),n=n&&this._polygons.ready),l(this._polylines)&&(this._polylines.update(t),n=n&&this._polylines.ready),l(this._points)&&(this._points.update(t),n=n&&this._points.ready),l(this._batchTable)&&n&&(l(this._features)||Tz(this),this._batchTable.update(e,t),this._ready=!0)};Hm.prototype.pick=function(e,t,n){};Hm.prototype.getPolylinePositions=function(e){let t=this._polylines;if(l(t))return t.getPositions(e)};Hm.prototype.isDestroyed=function(){return!1};Hm.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),me(this)};function nHe(e,t,n,i,o,r){let s=t.length,a=0;for(let c=0;c=0?i[r]:void 0}var __=rHe;var Gwn=T(S(),1);var Twn=T(S(),1);function c0(e){e=y(e,y.EMPTY_OBJECT);let t=e.tile,n=e.class;this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(c0.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});c0.prototype.hasProperty=function(e){return Mn.hasProperty(e,this._properties,this._class)};c0.prototype.hasPropertyBySemantic=function(e){return Mn.hasPropertyBySemantic(e,this._properties,this._class)};c0.prototype.getPropertyIds=function(e){return Mn.getPropertyIds(this._properties,this._class,e)};c0.prototype.getProperty=function(e){return Mn.getProperty(e,this._properties,this._class)};c0.prototype.setProperty=function(e,t){return Mn.setProperty(e,t,this._properties,this._class)};c0.prototype.getPropertyBySemantic=function(e){return Mn.getPropertyBySemantic(e,this._properties,this._class)};c0.prototype.setPropertyBySemantic=function(e,t){return Mn.setPropertyBySemantic(e,t,this._properties,this._class)};var h2=c0;function Cz(e,t){let n=oi(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){Cz._oneTimeWarning("findTileMetadata-missing-root-schema","Could not find a metadata schema for tile metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");return}let i=y(e.schema.classes,y.EMPTY_OBJECT);if(l(n.class)){let o=i[n.class];return new h2({tile:n,class:o})}}Cz._oneTimeWarning=At;var f2=Cz;var jwn=T(S(),1);var wwn=T(S(),1);function sHe(e){let t=new Uint8Array(e),n=Zm(t);if(n==="glTF"&&(n="glb"),gs.isBinaryFormat(n))return{contentType:n,binaryPayload:t};let i=aHe(t);if(l(i.root))return{contentType:gs.EXTERNAL_TILESET,jsonPayload:i};if(l(i.asset))return{contentType:gs.GLTF,jsonPayload:i};if(l(i.tileAvailability))return{contentType:gs.IMPLICIT_SUBTREE_JSON,jsonPayload:i};if(l(i.type))return{contentType:gs.GEOJSON,jsonPayload:i};if(l(i.voxelTable))return{contentType:gs.VOXEL_JSON,jsonPayload:i};throw new ue("Invalid tile content.")}function aHe(e){let t;try{t=Eo(e)}catch{throw new ue("Invalid tile content.")}return t}var ff=sHe;function Gu(e,t,n,i){this._tileset=e,this._tile=t,this._tilesetResource=n,this._contents=[],this._contentsCreated=!1;let o=l(i.contents)?i.contents:i.content;this._innerContentHeaders=o,this._requestsInFlight=0,this._cancelCount=0;let r=this._innerContentHeaders.length;this._arrayFetchPromises=new Array(r),this._requests=new Array(r),this._ready=!1,this._innerContentResources=new Array(r),this._serverKeys=new Array(r);for(let s=0;suHe(e,r,s)),o=await Promise.all(i);return e._contentsCreated=!0,e._contents=o.filter(l),o}async function uHe(e,t,n){if(l(t))try{let i=ff(t);if(i.contentType===gs.EXTERNAL_TILESET)throw new ue("External tilesets are disallowed inside multiple contents");e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||i.contentType===gs.GEOMETRY||i.contentType===gs.VECTOR;let o=e._tileset,r=e._innerContentResources[n],s=e._tile,a,c=y_[i.contentType];l(i.binaryPayload)?a=await Promise.resolve(c(o,s,r,i.binaryPayload.buffer,0)):a=await Promise.resolve(c(o,s,r,i.jsonPayload));let d=e._innerContentHeaders[n];if(s.hasImplicitContentMetadata){let m=s.implicitSubtree,p=s.implicitCoordinates;a.metadata=m.getContentMetadataView(p,n)}else s.hasImplicitContent||(a.metadata=x_(o,d));let u=__(o,d);return l(u)&&(a.group=new Px({metadata:u})),a}catch(i){cce(e,n,i)}}function cce(e,t,n){let i=e._tileset,o=e._innerContentResources[t].url,r=l(n.message)?n.message:n.toString();i.tileFailed.numberOfListeners>0?i.tileFailed.raiseEvent({url:o,message:r}):(console.log(`A content failed to load: ${o}`),console.log(`Error: ${r}`))}Gu.prototype.cancelRequests=function(){for(let e=0;ea?g=W.TWO_PI-c+a:g=a-c;let x=Math.ceil(g/t)+1,_=Math.ceil(f/t)+1,C=g/(x-1),V=f/(_-1),L=ce.northwest(e,r),Z=ce.center(e,fHe);(n!==0||i!==0)&&(Z.longitude=0;f--)ys.computePosition(t,n,!1,g,f,x),m[p++]=x.x,m[p++]=x.y,m[p++]=x.z;for(f=0,g=i-2;g>0;g--)ys.computePosition(t,n,!1,g,f,x),m[p++]=x.x,m[p++]=x.y,m[p++]=x.z;let _=m.length/3*2,C=Me.createTypedArray(m.length/3,_),V=0;for(let Z=0;Z0){Xu.longitude=(t.west+t.east)*.5,Xu.latitude=d;let x=n.cartographicToCartesian(Xu,qC.origin);h.clone(c,qC.direction);let _=dn.fromPointNormal(e.southwestCornerCartesian,e.westNormal,gce);jn.rayPlane(qC,_,e.southwestCornerCartesian),u=n.geodeticSurfaceNormal(x,F5)}else u=n.geodeticSurfaceNormalCartographic(ce.southeast(t),F5);let m=h.cross(u,a,bce);h.normalize(m,e.southNormal);let p=t.north,g;if(p<0){Xu.longitude=(t.west+t.east)*.5,Xu.latitude=p;let x=n.cartographicToCartesian(Xu,qC.origin);h.negate(c,qC.direction);let _=dn.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,gce);jn.rayPlane(qC,_,e.northeastCornerCartesian),g=n.geodeticSurfaceNormal(x,F5)}else g=n.geodeticSurfaceNormalCartographic(ce.northwest(t),F5);let f=h.cross(a,g,bce);h.normalize(f,e.northNormal)}var RHe=new h,ZHe=new h,GHe=new h(0,-1,0),EHe=new h(0,0,-1),yce=new h;function XHe(e,t){let n=t.camera,i=n.positionWC,o=n.positionCartographic,r=0;if(!ce.contains(e.rectangle,o)){let d=e.southwestCornerCartesian,u=e.northeastCornerCartesian,m=e.westNormal,p=e.southNormal,g=e.eastNormal,f=e.northNormal;t.mode!==oe.SCENE3D&&(d=t.mapProjection.project(ce.southwest(e.rectangle),RHe),d.z=d.y,d.y=d.x,d.x=0,u=t.mapProjection.project(ce.northeast(e.rectangle),ZHe),u.z=u.y,u.y=u.x,u.x=0,m=GHe,g=h.UNIT_Y,p=EHe,f=h.UNIT_Z);let x=h.subtract(i,d,yce),_=h.dot(x,m),C=h.dot(x,p),V=h.subtract(i,u,yce),L=h.dot(V,g),Z=h.dot(V,f);_>0?r+=_*_:L>0&&(r+=L*L),C>0?r+=C*C:Z>0&&(r+=Z*Z)}let s,a,c;if(t.mode===oe.SCENE3D?(s=o.height,a=e.minimumHeight,c=e.maximumHeight):(s=i.x,a=0,c=0),s>c){let d=s-c;r+=d*d}else if(s0?(n.push(0),i.push(this._planeVertices[0]),o=this._edgeNormals[0]):dn.getPointDistance(this._boundingPlanes[1],t)>0&&(n.push(1),i.push(this._planeVertices[1]),o=this._edgeNormals[1]);let r,s;for(r=0;r<4;r++)s=2+r,dn.getPointDistance(this._boundingPlanes[s],t)>0&&(n.push(s),i.push(this._planeVertices[s]),o=this._edgeNormals[s]);if(n.length===0)return 0;let a,c;if(n.length===1)return c=this._boundingPlanes[n[0]],a=Fz(dn.projectPointOntoPlane(c,t,wz),i[0],c,o),h.distance(a,t);if(n.length===2){if(n[0]===0){let p=[this._vertices[4*n[0]+(n[1]-2)],this._vertices[4*n[0]+(n[1]-2+1)%4]];return a=Lce(t,p[0],p[1]),h.distance(a,t)}let u=Number.MAX_VALUE,m;for(r=0;r<2;r++)c=this._boundingPlanes[n[r]],a=Fz(dn.projectPointOntoPlane(c,t,wz),i[r],c,this._edgeNormals[n[r]]),m=h.distanceSquared(a,t),m3)return a=Fz(dn.projectPointOntoPlane(this._boundingPlanes[1],t,wz),this._planeVertices[1],this._boundingPlanes[1],this._edgeNormals[1]),h.distance(a,t);let d=n[1]===2&&n[2]===5?0:1;return n[0]===0?h.distance(t,this._vertices[(n[1]-2+d)%4]):h.distance(t,this._vertices[4+(n[1]-2+d)%4])};var zHe=new h,KHe=new h;function Lce(e,t,n){let i=h.subtract(n,t,zHe),o=h.subtract(e,t,KHe),r=h.dot(i,o);if(r<=0)return t;let s=h.dot(i,i);return r>=s?n:(r=r/s,new h((1-r)*t.x+r*n.x,(1-r)*t.y+r*n.y,(1-r)*t.z+r*n.z))}var JHe=new dn(h.UNIT_X,0);function Fz(e,t,n,i){let o=Number.MAX_VALUE,r,s,a;for(let c=0;c0&&(f=!0,m+=d),s1||oi(n,"3DTILES_multiple_contents"),s=o&&!r?n.contents[0]:n.content;this._contentHeader=s,this.transform=l(n.transform)?M.unpack(n.transform):M.clone(M.IDENTITY);let a=l(i)?i.computedTransform:e.modelMatrix,c=M.multiply(a,this.transform,new M),d=l(i)?i._initialTransform:M.IDENTITY;this._initialTransform=M.multiply(d,this.transform,new M),this.computedTransform=c,this.metadata=f2(e,n),this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._boundingVolume=this.createBoundingVolume(n.boundingVolume,c),this._boundingVolume2D=void 0;let u;l(s)&&l(s.boundingVolume)&&(u=this.createBoundingVolume(s.boundingVolume,c)),this._contentBoundingVolume=u,this._contentBoundingVolume2D=void 0;let m;l(n.viewerRequestVolume)&&(m=this.createBoundingVolume(n.viewerRequestVolume,c)),this._viewerRequestVolume=m,this.geometricError=n.geometricError,this._geometricError=n.geometricError,l(this._geometricError)||(this._geometricError=l(i)?i._geometricError:e._geometricError,Qo._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale();let p;l(n.refine)?((n.refine==="replace"||n.refine==="add")&&Qo._deprecationWarning("lowercase-refine",`This tile uses a lowercase refine "${n.refine}". Instead use "${n.refine.toUpperCase()}".`),p=n.refine.toUpperCase()==="REPLACE"?vo.REPLACE:vo.ADD):l(i)?p=i.refine:p=vo.REPLACE,this.refine=p,this.children=[],this.parent=i;let g,f=!1,x,_,C;if(t=Ee.createIfNeeded(t),r)x=Ao.UNLOADED,_=t.clone();else if(l(s)){let G=s.uri;l(s.url)&&(Qo._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),G=s.url),G===""?(Qo._deprecationWarning("contentUriEmpty","content.uri property is an empty string, which creates a circular dependency, making this tileset invalid. Omit the content property instead"),g=new JC(e,this),f=!0,x=Ao.READY):(x=Ao.UNLOADED,_=t.getDerivedResource({url:G}),C=Ha.getServerKey(_.getUrlComponent()))}else g=new JC(e,this),f=!0,x=Ao.READY;this._content=g,this._contentResource=_,this._contentState=x,this._expiredContent=void 0,this._serverKey=C,this.hasEmptyContent=f,this.hasTilesetContent=!1,this.hasImplicitContent=!1,this.hasImplicitContentMetadata=!1,this.hasMultipleContents=r,this.cacheNode=void 0;let V=n.expire,L,Z;l(V)&&(L=V.duration,l(V.date)&&(Z=te.fromIso8601(V.date))),this.expireDuration=L,this.expireDate=Z,this.lastStyleTime=0,this._optimChildrenWithinParent=Zu.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1,this.priorityDeferred=!1,this.implicitTileset=void 0,this.implicitCoordinates=void 0,this.implicitSubtree=void 0,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._wasSelectedLastFrame=!1,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._isClippedByPolygon=!1,this._clippingPlanesState=0,this._clippingPolygonsState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=Y.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new te,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Qo._deprecationWarning=Is;Object.defineProperties(Qo.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return y(this._contentBoundingVolume,this._boundingVolume)}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},isVisible:{get:function(){return this._visible&&this._inRequestVolume}},extras:{get:function(){return this._header.extras}},color:{get:function(){return l(this._color)||(this._color=new Y),Y.clone(this._color)},set:function(e){this._color=Y.clone(e,this._color),this._colorDirty=!0}},hasRenderableContent:{get:function(){return!this.hasEmptyContent&&!this.hasTilesetContent&&!this.hasImplicitContent}},contentAvailable:{get:function(){return this.contentReady&&this.hasRenderableContent||l(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===Ao.READY}},contentUnloaded:{get:function(){return this._contentState===Ao.UNLOADED}},hasUnloadedRenderableContent:{get:function(){return this.hasRenderableContent&&this.contentUnloaded}},contentExpired:{get:function(){return this._contentState===Ao.EXPIRED}},contentFailed:{get:function(){return this._contentState===Ao.FAILED}},commandsLength:{get:function(){return this._commandsLength}}});var Lg=new h;function nze(e,t){let{tileset:n,boundingSphere:i}=e,{radius:o,center:r}=i,{camera:s}=t,a=h.multiplyByScalar(s.directionWC,e._centerZDepth,Lg),c=h.add(s.positionWC,a,Lg),d=h.subtract(c,r,Lg);if(h.magnitude(d)>o){let Z=h.normalize(d,Lg),G=h.multiplyByScalar(Z,o,Lg),X=h.add(r,G,Lg),v=h.subtract(X,s.positionWC,Lg),P=h.normalize(v,Lg);e._foveatedFactor=1-Math.abs(h.dot(s.directionWC,P))}else e._foveatedFactor=0;let p=e.refine===vo.REPLACE,g=n.isSkippingLevelOfDetail;if(p&&!g||!n.foveatedScreenSpaceError||n.foveatedConeSize===1||e._priorityProgressiveResolution&&p&&g||n._pass===Io.PRELOAD_FLIGHT||n._pass===Io.PRELOAD)return!1;let f=1-Math.cos(s.frustum.fov*.5),x=n.foveatedConeSize*f;if(e._foveatedFactor<=x)return!1;let _=f-x,C=W.clamp((e._foveatedFactor-x)/_,0,1),V=n.foveatedInterpolationCallback(n.foveatedMinimumScreenSpaceErrorRelaxation,n.memoryAdjustedScreenSpaceError,C),L=e._screenSpaceError===0&&l(e.parent)?e.parent._screenSpaceError*.5:e._screenSpaceError;return n.memoryAdjustedScreenSpaceError-V<=L}var Wce=new te;Qo.prototype.getScreenSpaceError=function(e,t,n){let i=this._tileset,o=y(n,1),r=l(this.parent)?this.parent.geometricError:i._scaledGeometricError,s=t?r:this.geometricError;if(s===0)return 0;let{camera:a,context:c}=e,d=a.frustum,u=c.drawingBufferWidth,m=c.drawingBufferHeight*o,p;if(e.mode===oe.SCENE2D||d instanceof sn){let g=d.offCenterFrustum;l(g)&&(d=g);let f=Math.max(d.top-d.bottom,d.right-d.left)/Math.max(u,m);p=s/f}else{let g=Math.max(this._distanceToCamera,W.EPSILON7),f=d.sseDenominator;if(p=s*m/(g*f),i.dynamicScreenSpaceError){let x=i._dynamicScreenSpaceErrorComputedDensity,_=i.dynamicScreenSpaceErrorFactor,C=W.fog(g,x)*_;p-=C}}return p/=e.pixelRatio,p};function ize(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;let n=e.memoryAdjustedScreenSpaceError,i=t._screenSpaceErrorProgressiveResolution>n;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;let o=t.parent,r=t._screenSpaceErrorProgressiveResolution<=n,s=l(o)&&o._screenSpaceErrorProgressiveResolution>n;return r&&s&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function oze(e,t){let n=t.parent,o=l(n)&&(!e.isSkippingLevelOfDetail||t._screenSpaceError===0||n.hasTilesetContent||n.hasImplicitContent)?n._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-o}Qo.prototype.updateVisibility=function(e){let{parent:t,tileset:n}=this;if(this._updatedVisibilityFrame===n._updatedVisibilityFrame)return;let i=l(t)?t.computedTransform:n.modelMatrix,o=l(t)?t._visibilityPlaneMask:rs.MASK_INDETERMINATE;this.updateTransform(i,e),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,n.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,o),this._visible=this._visibilityPlaneMask!==rs.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=oze(n,this),this._priorityProgressiveResolution=ize(n,this),this.priorityDeferred=nze(this,e),this._updatedVisibilityFrame=n._updatedVisibilityFrame};Qo.prototype.updateExpiration=function(){if(l(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){let e=te.now(Wce);te.lessThan(this.expireDate,e)&&(this._contentState=Ao.EXPIRED,this._expiredContent=this._content)}};function rze(e){if(!l(e.expireDuration))return;let t=te.now(Wce);te.addSeconds(t,e.expireDuration,t),l(e.expireDate)?te.lessThan(e.expireDate,t)&&te.clone(t,e.expireDate):e.expireDate=te.clone(t)}function sze(e){return function(){return e._priority}}Qo.prototype.requestContent=function(){if(!this.hasEmptyContent)return this.hasMultipleContents?aze(this):lze(this)};function aze(e){let t=e._content,n=e._tileset;if(!l(t)){let o=oi(e._header,"3DTILES_multiple_contents")?e._header.extensions["3DTILES_multiple_contents"]:e._header;t=new p2(n,e,e._contentResource.clone(),o),e._content=t}let i=t.requestInnerContents();if(l(i))return e._contentState=Ao.LOADING,i.then(o=>{if(!e.isDestroyed()&&l(o))return e._contentState=Ao.PROCESSING,t}).catch(o=>{if(!e.isDestroyed())throw e._contentState=Ao.FAILED,o})}async function cze(e,t,n,i,o){let r=e._contentState;e._contentState=Ao.LOADING,++t.statistics.numberOfPendingRequests;let s;try{s=await o}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;if(n.cancelled||n.state===Qn.CANCELLED){e._contentState=r,++t.statistics.numberOfAttemptedRequests;return}throw e._contentState=Ao.FAILED,a}if(e.isDestroyed()){--t.statistics.numberOfPendingRequests;return}if(n.cancelled||n.state===Qn.CANCELLED){e._contentState=r,--t.statistics.numberOfPendingRequests,++t.statistics.numberOfAttemptedRequests;return}try{let a=await dze(e,s);return--t.statistics.numberOfPendingRequests,e.isDestroyed()?void 0:(i&&(e.expireDate=void 0),e._content=a,e._contentState=Ao.PROCESSING,a)}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;throw e._contentState=Ao.FAILED,a}}function lze(e){let t=e._contentResource.clone(),n=e.contentExpired;n&&t.setQueryParameters({expired:e.expireDate.toString()});let i=new Yo({throttle:!0,throttleByServer:!0,type:ns.TILES3D,priorityFunction:sze(e),serverKey:e._serverKey});e._request=i,t.request=i;let o=e._tileset,r=t.fetchArrayBuffer();if(!l(r)){++o.statistics.numberOfAttemptedRequests;return}return cze(e,o,i,n,r)}async function dze(e,t){let n=ff(t),i=e._tileset;i._disableSkipLevelOfDetail=i._disableSkipLevelOfDetail||n.contentType===gs.GEOMETRY||n.contentType===gs.VECTOR,(n.contentType===gs.IMPLICIT_SUBTREE||n.contentType===gs.IMPLICIT_SUBTREE_JSON)&&(e.hasImplicitContent=!0),n.contentType===gs.EXTERNAL_TILESET&&(e.hasTilesetContent=!0);let o,r=y_[n.contentType];if(e.isDestroyed())return;l(n.binaryPayload)?o=await Promise.resolve(r(i,e,e._contentResource,n.binaryPayload.buffer,0)):o=await Promise.resolve(r(i,e,e._contentResource,n.jsonPayload));let s=e._contentHeader;if(e.hasImplicitContentMetadata){let c=e.implicitSubtree,d=e.implicitCoordinates;o.metadata=c.getContentMetadataView(d,0)}else e.hasImplicitContent||(o.metadata=x_(i,s));let a=__(i,s);return l(a)&&(o.group=new Px({metadata:a})),o}Qo.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()};Qo.prototype.unloadContent=function(){this.hasRenderableContent&&(this._content=this._content&&this._content.destroy(),this._contentState=Ao.UNLOADED,this.lastStyleTime=0,this.clippingPlanesDirty=this._clippingPlanesState===0,this._clippingPlanesState=0,this.clippingPolygonsDirty=this._clippingPolygonsState===0,this._clippingPolygonsState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var Pce=new le;function Nz(e,t){if(t.mode!==oe.SCENE3D&&!l(e._boundingVolume2D)){let n=e._boundingVolume.boundingSphere,i=le.projectTo2D(n,t.mapProjection,Pce);e._boundingVolume2D=new m0(i.center,i.radius)}return t.mode!==oe.SCENE3D?e._boundingVolume2D:e._boundingVolume}function uze(e,t){if(t.mode!==oe.SCENE3D&&!l(e._contentBoundingVolume2D)){let n=e._contentBoundingVolume.boundingSphere,i=le.projectTo2D(n,t.mapProjection,Pce);e._contentBoundingVolume2D=new m0(i.center,i.radius)}return t.mode!==oe.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}Qo.prototype.visibility=function(e,t){let n=e.cullingVolume,i=Nz(this,e),o=this._tileset,r=o.clippingPlanes;if(l(r)&&r.enabled){let a=r.computeIntersectionWithBoundingVolume(i,o.clippingPlanesOriginMatrix);if(this._isClipped=a!==Kt.INSIDE,a===Kt.OUTSIDE)return rs.MASK_OUTSIDE}let s=o.clippingPolygons;if(l(s)&&s.enabled){let a=s.computeIntersectionWithBoundingVolume(i);this._isClippedByPolygon=a!==Kt.OUTSIDE}return n.computeVisibilityWithPlaneMask(i,t)};Qo.prototype.contentVisibility=function(e){if(!l(this._contentBoundingVolume))return Kt.INSIDE;if(this._visibilityPlaneMask===rs.MASK_INSIDE)return Kt.INSIDE;let t=e.cullingVolume,n=uze(this,e),i=this._tileset,o=i.clippingPlanes;if(l(o)&&o.enabled){let s=o.computeIntersectionWithBoundingVolume(n,i.clippingPlanesOriginMatrix);if(this._isClipped=s!==Kt.INSIDE,s===Kt.OUTSIDE)return Kt.OUTSIDE}let r=i.clippingPolygons;if(l(r)&&r.enabled){let s=r.computeIntersectionWithBoundingVolume(n);if(this._isClippedByPolygon=s!==Kt.OUTSIDE,s===Kt.INSIDE)return Kt.OUTSIDE}return t.computeVisibility(n)};Qo.prototype.distanceToTile=function(e){return Nz(this,e).distanceToCamera(e)};var mze=new h;Qo.prototype.distanceToTileCenter=function(e){let n=Nz(this,e).boundingVolume,i=h.subtract(n.center,e.camera.positionWC,mze);return h.dot(e.camera.directionWC,i)};Qo.prototype.insideViewerRequestVolume=function(e){let t=this._viewerRequestVolume;return!l(t)||t.distanceToCamera(e)===0};var vce=new $,wce=new h,hze=new $,kz=new h,Fce=new ce,Ace=new Gn,Mz=new M;function fze(e,t,n){let i=h.fromElements(e[0],e[1],e[2],kz),o=$.fromArray(e,3,hze);i=M.multiplyByPoint(t,i,i);let r=M.getMatrix3(t,vce);return o=$.multiply(r,o,o),l(n)?(n.update(i,o),n):new Td(i,o)}function pze(e,t,n,i){let o=ce.unpack(e,0,Fce),r=e[4],s=e[5],a=Gn.fromRectangle(o,r,s,ie.WGS84,Ace),c=a.center,d=a.halfAxes;t=M.multiplyTransformation(t,M.inverseTransformation(n,Mz),Mz),c=M.multiplyByPoint(t,c,c);let u=M.getMatrix3(t,vce);return d=$.multiply(u,d,d),l(i)&&i instanceof Td?(i.update(c,d),i):new Td(c,d)}function bze(e,t,n,i){if(!M.equalsEpsilon(t,n,W.EPSILON8))return pze(e,t,n,i);let o=ce.unpack(e,0,Fce);return l(i)?(i.rectangle=ce.clone(o,i.rectangle),i.minimumHeight=e[4],i.maximumHeight=e[5],i.computeBoundingVolumes(ie.WGS84),i):new Iu({rectangle:o,minimumHeight:e[4],maximumHeight:e[5]})}function gze(e,t,n){let i=h.fromElements(e[0],e[1],e[2],kz),o=e[3];i=M.multiplyByPoint(t,i,i);let r=M.getScale(t,wce),s=h.maximumComponent(r);return o*=s,l(n)?(n.update(i,o),n):new m0(i,o)}Qo.prototype.createBoundingVolume=function(e,t,n){let i=this.metadata,o;if(l(i)&&(o=jx.parseBoundingVolumeSemantic("TILE",i)),l(o)&&(e=o),!l(e))throw new ue("boundingVolume must be defined");if(oi(e,"3DTILES_bounding_volume_S2"))return new y2(e.extensions["3DTILES_bounding_volume_S2"]);let{box:r,region:s,sphere:a}=e;if(l(r)){let c=fze(r,t,n);return this._verticalExaggeration!==1&&Ece(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c}if(l(s)){let c=bze(s,t,this._initialTransform,n);return this._verticalExaggeration===1||(c instanceof Td?Ece(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight):(c.minimumHeight=hr.getHeight(c.minimumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.maximumHeight=hr.getHeight(c.maximumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.computeBoundingVolumes(ie.WGS84))),c}if(l(a)){let c=gze(a,t,n);if(this._verticalExaggeration!==1){let d=hr.getPosition(c.center,ie.WGS84,this._verticalExaggeration,this._verticalExaggerationRelativeHeight,kz),u=c.radius*this._verticalExaggeration;c.update(d,u)}return c}throw new ue("boundingVolume must contain a sphere, region, or box")};var yze=h.unpackArray(new Array(8*3).fill(0));function Ece(e,t,n){let i=e.boundingVolume.computeCorners(yze).map(r=>hr.getPosition(r,ie.WGS84,t,n,r)),o=Gn.fromPoints(i,Ace);e.update(o.center,o.halfAxes)}Qo.prototype.updateTransform=function(e,t){e=y(e,M.IDENTITY);let n=M.multiplyTransformation(e,this.transform,Mz),i=!M.equals(n,this.computedTransform),o=l(t)&&(this._verticalExaggeration!==t.verticalExaggeration||this._verticalExaggerationRelativeHeight!==t.verticalExaggerationRelativeHeight);if(!i&&!o)return;i&&M.clone(n,this.computedTransform),o&&(this._verticalExaggeration=t.verticalExaggeration,this._verticalExaggerationRelativeHeight=t.verticalExaggerationRelativeHeight);let r=this._header,s=this._contentHeader;this._boundingVolume=this.createBoundingVolume(r.boundingVolume,this.computedTransform,this._boundingVolume),l(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(s.boundingVolume,this.computedTransform,this._contentBoundingVolume)),l(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(r.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()};Qo.prototype.updateGeometricErrorScale=function(){let e=M.getScale(this.computedTransform,wce),t=h.maximumComponent(e);if(this.geometricError=this._geometricError*t,!l(this.parent)){let n=this._tileset;n._scaledGeometricError=n._geometricError*t}};function xze(e,t,n,i){if(!i.isRender)return;let o=l(e._contentHeader)&&l(e._contentHeader.boundingVolume),r=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!o;if(r){let c;e._finalResolution?e.hasRenderableContent?c=Y.WHITE:c=Y.DARKGRAY:c=Y.YELLOW,l(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(c)),e._debugBoundingVolume.update(n);let d=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");d.color=Ht.toValue(c,d.color)}else!r&&l(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&o?(l(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(Y.BLUE)),e._debugContentBoundingVolume.update(n)):!t.debugShowContentBoundingVolume&&l(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&l(e._viewerRequestVolume)?(l(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(Y.YELLOW)),e._debugViewerRequestVolume.update(n)):!t.debugShowViewerRequestVolume&&l(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());let s=t.debugColorizeTiles&&!e._debugColorizeTiles||l(t._heatmap.tilePropertyName),a=!t.debugColorizeTiles&&e._debugColorizeTiles;s?(t._heatmap.colorize(e,n),e._debugColorizeTiles=!0,e.color=e._debugColor):a&&(e._debugColorizeTiles=!1,e.color=Y.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),a&&t.makeStyleDirty()}function _ze(e,t,n){let i=e._expiredContent;if(!e.hasMultipleContents&&l(i)){if(!e.contentReady){try{i.update(t,n)}catch{}return}e._expiredContent.destroy(),e._expiredContent=void 0}if(l(e.content))try{e.content.update(t,n)}catch(o){throw e._contentState=Ao.FAILED,o}}function Tze(e,t){let n=t.clippingPlanes,i=0;l(n)&&e._isClipped&&n.enabled&&(i=n.clippingPlanesState),i!==e._clippingPlanesState&&(e._clippingPlanesState=i,e.clippingPlanesDirty=!0)}function Sze(e,t){let n=t.clippingPolygons,i=0;l(n)&&e._isClippedByPolygon&&n.enabled&&(i=n.clippingPolygonsState),i!==e._clippingPolygonsState&&(e._clippingPolygonsState=i,e.clippingPolygonsDirty=!0)}Qo.prototype.update=function(e,t,n){let{commandList:i}=t,o=i.length;Tze(this,e),Sze(this,e),xze(this,e,t,n),_ze(this,e,t);let r=i.length;this._commandsLength=r-o;for(let s=o;se.cacheBytes||n);){let s=r.item;r=r.next,this.unloadTile(e,s,t)}};E_.prototype.trim=function(){this._trimTiles=!0};var C2=E_;var qMn=T(S(),1);function U5(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function Dz(e,t){let n;return t==="_loadTimestamp"?n=te.toDate(e).getTime():n=e,n}U5.prototype.setReferenceMinimumMaximum=function(e,t,n){this._referenceMinimum[n]=Dz(e,n),this._referenceMaximum[n]=Dz(t,n)};function Lze(e,t){let n=e.tilePropertyName;if(l(n)){let i=Dz(t[n],n);return l(i)?(e._maximum=Math.max(i,e._maximum),e._minimum=Math.min(i,e._minimum),i):(e.tilePropertyName=void 0,i)}}var Uz=[new Y(.1,.1,.1,1),new Y(.153,.278,.878,1),new Y(.827,.231,.49,1),new Y(.827,.188,.22,1),new Y(1,.592,.259,1),new Y(1,.843,0,1)];U5.prototype.colorize=function(e,t){let n=this.tilePropertyName;if(!l(n)||!e.contentAvailable||e._selectedFrame!==t.frameNumber)return;let i=Lze(this,e),o=this._previousMinimum,r=this._previousMaximum;if(o===Number.MAX_VALUE||r===-Number.MAX_VALUE)return;let s=r-o+W.EPSILON7,c=W.clamp(i-o,0,s)/s,d=Uz.length-1,u=c*d,m=Math.floor(u),p=Math.ceil(u),g=u-m,f=Uz[m],x=Uz[p],_=Y.clone(Y.WHITE);_.red=W.lerp(f.red,x.red,g),_.green=W.lerp(f.green,x.green,g),_.blue=W.lerp(f.blue,x.blue,g),e._debugColor=_};U5.prototype.resetMinimumMaximum=function(){let e=this.tilePropertyName;if(l(e)){let t=this._referenceMinimum[e],n=this._referenceMaximum[e],i=l(t)&&l(n);this._previousMinimum=i?t:this._minimum,this._previousMaximum=i?n:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}};var V2=U5;var tNn=T(S(),1);function s1(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.batchTableByteLength=0}s1.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0};function D5(e,t,n,i){let o=t.innerContents,r=t.pointsLength,s=t.trianglesLength,a=t.featuresLength,c=t.geometryByteLength,d=t.texturesByteLength,u=t.batchTableByteLength;if(i?(e.numberOfFeaturesLoaded+=n?-a:a,e.numberOfPointsLoaded+=n?-r:r,e.geometryByteLength+=n?-c:c,e.texturesByteLength+=n?-d:d,e.batchTableByteLength+=n?-u:u):(e.numberOfFeaturesSelected+=n?-a:a,e.numberOfPointsSelected+=n?-r:r,e.numberOfTrianglesSelected+=n?-s:s),l(o)){let m=o.length;for(let p=0;p>1)&858993459,e=(e^e>>2)&252645135,e=(e^e>>4)&16711935,e=(e^e>>8)&65535,e}function Yz(e){return e&=153391689,e=(e^e>>2)&51130563,e=(e^e>>4)&50393103,e=(e^e>>8)&4278190335,e=(e^e>>16)&1023,e}Z2.encode2D=function(e,t){return(Uce(e)|Uce(t)<<1)>>>0};Z2.decode2D=function(e,t){return l(t)||(t=new Array(2)),t[0]=Dce(e),t[1]=Dce(e>>1),t};Z2.encode3D=function(e,t,n){return Bz(e)|Bz(t)<<1|Bz(n)<<2};Z2.decode3D=function(e,t){return l(t)||(t=new Array(3)),t[0]=Yz(e),t[1]=Yz(e>>1),t[2]=Yz(e>>2),t};var Rg=Z2;function Mo(e){this.subdivisionScheme=e.subdivisionScheme,this.subtreeLevels=e.subtreeLevels,this.level=e.level,this.x=e.x,this.y=e.y,this.z=void 0,e.subdivisionScheme===Yr.OCTREE&&(this.z=e.z)}Object.defineProperties(Mo.prototype,{childIndex:{get:function(){let e=0;return e|=this.x&1,e|=(this.y&1)<<1,this.subdivisionScheme===Yr.OCTREE&&(e|=(this.z&1)<<2),e}},mortonIndex:{get:function(){return this.subdivisionScheme===Yr.OCTREE?Rg.encode3D(this.x,this.y,this.z):Rg.encode2D(this.x,this.y)}},tileIndex:{get:function(){let e=this.subdivisionScheme===Yr.OCTREE?((1<<3*this.level)-1)/7:((1<<2*this.level)-1)/3,t=this.mortonIndex;return e+t}}});Mo.prototype.getDescendantCoordinates=function(e){let t=this.level+e.level,n=(this.x<>t,i=e.y>>t,o=this.x===n,r=this.y===i;if(this.subdivisionScheme===Yr.OCTREE){let s=e.z>>t,a=this.z===s;return o&&r&&a}return o&&r};Mo.prototype.isEqual=function(e){return this.subdivisionScheme===e.subdivisionScheme&&this.subtreeLevels===e.subtreeLevels&&this.level===e.level&&this.x===e.x&&this.y===e.y&&(this.subdivisionScheme===Yr.OCTREE?this.z===e.z:!0)};Mo.prototype.isImplicitTilesetRoot=function(){return this.level===0};Mo.prototype.isSubtreeRoot=function(){return this.level%this.subtreeLevels===0};Mo.prototype.isBottomOfSubtree=function(){return this.level%this.subtreeLevels===this.subtreeLevels-1};Mo.prototype.getTemplateValues=function(){let e={level:this.level,x:this.x,y:this.y};return this.subdivisionScheme===Yr.OCTREE&&(e.z=this.z),e};var Bce=[0,0,0];Mo.fromMortonIndex=function(e,t,n,i){let o;return e===Yr.OCTREE?(o=Rg.decode3D(i,Bce),new Mo({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1],z:o[2]})):(o=Rg.decode2D(i,Bce),new Mo({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1]}))};Mo.fromTileIndex=function(e,t,n){let i,o,r;return e===Yr.OCTREE?(i=Math.floor(W.log2(7*n+1)/3),o=((1<<3*i)-1)/7,r=n-o):(i=Math.floor(W.log2(3*n+1)/2),o=((1<<2*i)-1)/3,r=n-o),Mo.fromMortonIndex(e,t,i,r)};var I_=Mo;var PNn=T(S(),1);var ZNn=T(S(),1);function b0(){}b0.selectTiles=function(e,t){fe.throwInstantiationError()};b0.sortChildrenByDistanceToCamera=function(e,t){return t._distanceToCamera===0&&e._distanceToCamera===0?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera};b0.canTraverse=function(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:e._screenSpaceError>e.tileset.memoryAdjustedScreenSpaceError};b0.selectTile=function(e,t){if(e.contentVisibility(t)===Kt.OUTSIDE)return;e._wasSelectedLastFrame=!0;let{content:n,tileset:i}=e;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,e.lastStyleTime=0,i._selectedTilesToStyle.push(e)):e._selectedFrame0;if((e.hasTilesetContent||e.hasImplicitContent)&&n){let r=e.children[0];Yce(r,t),e._visible=r._visible;return}if(Xze(e,t)){e._visible=!1;return}let i=e.refine===vo.REPLACE,o=e._optimChildrenWithinParent===Zu.USE_OPTIMIZATION;if(i&&o&&n&&!Ize(e,t)){++e.tileset._statistics.numberOfTilesCulledWithChildrenUnion,e._visible=!1;return}}function Xze(e,t){let{parent:n,tileset:i}=e;return!l(n)||n.hasTilesetContent||n.hasImplicitContent||n.refine!==vo.ADD?!1:e.getScreenSpaceError(t,!0)<=i.memoryAdjustedScreenSpaceError}function Ize(e,t){let n=!1,i=e.children;for(let o=0;o0;){G2.stackMaximumLength=Math.max(G2.stackMaximumLength,s.length);let a=s.pop(),c=a.refine===vo.ADD,d=a.refine===vo.REPLACE,u=Pze(a);u&&vze(a,s,t),(c||d&&!u)&&(wze(e,a),o(a,t),Fze(a,t),a.hasRenderableContent&&!a.contentAvailable&&(n=!1)),r(a,t)}return G2.stack.trim(G2.stackMaximumLength),n};function Pze(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:(e.hasEmptyContent,!0)}function vze(e,t,n){let{children:i}=e;for(let o=0;o0;){X2.stackMaximumLength=Math.max(X2.stackMaximumLength,a.length);let c=a.pop(),d=c.parent,u=!l(d)||d._refines;c._refines=i(c)?Aze(c,a,t)&&u:!1;let m=!c._refines&&u;c.hasRenderableContent?c.refine===vo.ADD?(Oz(c,t),o(c,t)):c.refine===vo.REPLACE&&(o(c,t),m&&Oz(c,t)):(n._emptyTiles.push(c),o(c,t),m&&Oz(c,t)),r(c,t),s(c,t)}}function Nze(e,t){let{canTraverse:n,updateTile:i,loadTile:o,touchTile:r}=Ms,s=!0,a=I2.stack;for(a.push(e);a.length>0;){I2.stackMaximumLength=Math.max(I2.stackMaximumLength,a.length);let c=a.pop(),d=c.children,u=d.length,m=!c.hasRenderableContent&&n(c);if(!m&&!c.contentAvailable&&(s=!1),i(c,t),c.isVisible||(o(c,t),r(c,t)),m)for(let p=0;p0;){v2.stackMaximumLength=Math.max(v2.stackMaximumLength,r.length);let a=r.pop().children;for(let c=0;cn._depth+e.skipLevels)}function Yze(e,t,n){let{tileset:i,children:o}=e,{updateTile:r,loadTile:s,touchTile:a}=Ms;for(let d=0;dt:e._screenSpaceError>t:!0}function Hze(e,t){let{tileset:n}=e,i=n.immediatelyLoadDesiredLevelOfDetail?Number.MAX_VALUE:Math.max(n.baseScreenSpaceError,n.memoryAdjustedScreenSpaceError),{canTraverse:o,loadTile:r,visitTile:s,touchTile:a}=Ms,c=P2.stack;for(c.push(e);c.length>0;){P2.stackMaximumLength=Math.max(P2.stackMaximumLength,c.length);let d=c.pop();Dze(d,t);let u=d.parent,m=!l(u)||u._refines;d._refines=o(d)?Yze(d,c,t)&&m:!1;let p=!d._refines&&m;d.hasRenderableContent?d.refine===vo.ADD?(B5(d,t),r(d,t)):d.refine===vo.REPLACE&&(Oze(d,i)?(r(d,t),p&&B5(d,t)):p?(B5(d,t),r(d,t)):Bze(n,d)&&r(d,t)):(n._emptyTiles.push(d),r(d,t),p&&B5(d,t)),s(d,t),a(d,t)}}function zze(e,t){let{selectTile:n,canTraverse:i}=Ms,{stack:o,ancestorStack:r}=g0,s;for(o.push(e);o.length>0||r.length>0;){if(g0.stackMaximumLength=Math.max(g0.stackMaximumLength,o.length),g0.ancestorStackMaximumLength=Math.max(g0.ancestorStackMaximumLength,r.length),r.length>0){let d=r.peek();if(d._stackLength===o.length){r.pop(),d!==s&&(d._finalResolution=!1),n(d,t);continue}}let a=o.pop();if(!l(a))continue;let c=i(a);if(a._shouldSelect)if(a.refine===vo.ADD)n(a,t);else{if(a._selectionDepth=r.length,a._selectionDepth>0&&(a.tileset.hasMixedContent=!0),s=a,!c){n(a,t);continue}r.push(a),a._stackLength=o.length}if(c){let d=a.children;for(let u=0;uci._defaultMinTerrainHeight&&(s._initialClippingPlanesOriginMatrix=Gt.eastNorthUpToFixedFrame(p)),s._clippingPlanesOriginMatrix=M.clone(s._initialClippingPlanesOriginMatrix),s};jo.loadJson=function(e){return Ee.createIfNeeded(e).fetchJson()};jo.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()};jo.prototype.loadTileset=function(e,t,n){let i=t.asset;if(!l(i))throw new ue("Tileset must have an asset property.");if(i.version!=="0.0"&&i.version!=="1.0"&&i.version!=="1.1")throw new ue("The tileset must be 3D Tiles version 0.0, 1.0, or 1.1");l(t.extensionsRequired)&&jo.checkSupportedExtensions(t.extensionsRequired);let o=this._statistics,r=i.tilesetVersion;l(r)&&(this._basePath+=`?v=${r}`,e=e.clone(),e.setQueryParameters({v:r}));let s=Kce(this,e,t.root,n);l(n)&&(n.children.push(s),s._depth=n._depth+1);let a=[];for(a.push(s);a.length>0;){let c=a.pop();++o.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&c.refine===vo.ADD;let d=c._header.children;if(l(d))for(let u=0;u_.minimumRadius){let L=he.fromCartesian(V,_,Jze);n=h.normalize(a.positionWC,Jce),i=a.directionWC,o=a.positionCartographic.height,r=0,s=L.height*2}else{let L=M.multiplyByPoint(x,a.positionWC,qze);if(n=h.UNIT_Z,i=M.multiplyByPointAsVector(x,a.directionWC,$ze),i=h.normalize(i,i),o=L.z,d instanceof Td){let Z=$.getColumn(C.halfAxes,2,eKe),G=h.magnitude(Z);r=V.z-G,s=V.z+G}else if(d instanceof m0){let Z=C.radius;r=V.z-Z,s=V.z+Z}}}let u=e.dynamicScreenSpaceErrorHeightFalloff,m=r+(s-r)*u,p=s,g=W.clamp((o-m)/(p-m),0,1),f=1-Math.abs(h.dot(i,n));f=f*(1-g),e._dynamicScreenSpaceErrorComputedDensity=e.dynamicScreenSpaceErrorDensity*f}function nKe(e,t){if(t.hasEmptyContent)return;let{statistics:n}=e,i=t.contentExpired,o=t.requestContent();l(o)&&(o.then(r=>{!l(r)||t.isDestroyed()||e.isDestroyed()||(e._processingQueue.push(t),++n.numberOfTilesProcessing)}).catch(r=>{qce(r,e,t)}),i&&(t.hasTilesetContent||t.hasImplicitContent?bKe(e,t):(n.decrementLoadCounts(t.content),--n.numberOfTilesWithContentReady)),e._requestedTilesInFlight.push(t))}function jce(e,t){return e._priority-t._priority}jo.prototype.postPassesUpdate=function(e){l(this._root)&&(iKe(this,e),yKe(this,e),this._cache.unloadTiles(this,ele),this._styleApplied&&this._styleEngine.resetDirty(),this._styleApplied=!1)};jo.prototype.prePassesUpdate=function(e){if(!l(this._root))return;dKe(this,e);let t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,l(t)&&t.enabled&&t.update(e);let n=this._clippingPolygons;l(n)&&n.enabled&&n.update(e),l(this._loadTimestamp)||(this._loadTimestamp=te.clone(e.time)),this._timeSinceLoad=Math.max(te.secondsDifference(e.time,this._loadTimestamp)*1e3,0),this.dynamicScreenSpaceError&&tKe(this,e),e.newFrame&&this._cache.reset()};function iKe(e,t){let n=e._requestedTilesInFlight,i=0;for(let o=0;o=1;if(r._contentState!==Ao.LOADING){++i;continue}else if(s){r.cancelRequests(),++i;continue}i>0&&(n[o-i]=r)}n.length-=i}function oKe(e){let t=e._requestedTiles;t.sort(jce);for(let n=0;n0?t.tileFailed.raiseEvent({url:i,message:o}):(console.log(`A 3D tile failed to load: ${i}`),console.log(`Error: ${o}`))}function rKe(e){let t=e._processingQueue,n=0;for(let i=0;i0&&(t[i-n]=o)}t.length-=n}var sKe=new he,aKe=new he,cKe=new h;function lKe(e,t,n){if(!e.enableCollision||!e.show)return;let i=e._addHeightCallbacks,o=t.boundingSphere;for(let r of i){if(r.invoked||t._wasSelectedLastFrame)continue;let s=r.ellipsoid,a=he.clone(r.positionCartographic,sKe),c=he.fromCartesian(o.center,s,aKe);l(c)&&(a.height=c.height);let d=he.toCartesian(a,s,cKe);h.distance(d,o.center)<=o.radius&&n.afterRender.push(()=>{l(r.callback)&&r.callback(a),r.invoked=!1})}}function dKe(e,t){rKe(e);let n=e._processingQueue,{cacheBytes:i,maximumCacheOverflowBytes:o,statistics:r}=e,s=i+o,a=!1;for(let c=0;cs){a=!0;break}let d=n[c];try{d.process(e,t),d.contentReady&&(--r.numberOfTilesProcessing,e.tileLoad.raiseEvent(d))}catch(u){--r.numberOfTilesProcessing,qce(u,e,d)}}e.totalMemoryUsageInBytes0&&uKe(e)}function uKe(e){e._memoryAdjustedScreenSpaceError*=1.02;let t=e._processingQueue;for(let n=0;n{e.isDestroyed()||(e._error=u)})}function wOe(e,t){if(!l(e._va)){let n=e._startEllipsoidNormals,i=e._endEllipsoidNormals,o=e._startPositionAndHeights,r=e._endPositionAndHeights,s=e._startFaceNormalAndVertexCornerIds,a=e._endFaceNormalAndHalfWidths,c=e._vertexBatchIds,d=e._indices,u=n.byteLength+i.byteLength;u+=o.byteLength+r.byteLength,u+=s.byteLength+a.byteLength,u+=c.byteLength+d.byteLength,e._trianglesLength=d.length/3,e._geometryByteLength=u;let m=ft.createVertexBuffer({context:t,typedArray:n,usage:Ne.STATIC_DRAW}),p=ft.createVertexBuffer({context:t,typedArray:i,usage:Ne.STATIC_DRAW}),g=ft.createVertexBuffer({context:t,typedArray:o,usage:Ne.STATIC_DRAW}),f=ft.createVertexBuffer({context:t,typedArray:r,usage:Ne.STATIC_DRAW}),x=ft.createVertexBuffer({context:t,typedArray:s,usage:Ne.STATIC_DRAW}),_=ft.createVertexBuffer({context:t,typedArray:a,usage:Ne.STATIC_DRAW}),C=ft.createVertexBuffer({context:t,typedArray:c,usage:Ne.STATIC_DRAW}),V=ft.createIndexBuffer({context:t,typedArray:d,usage:Ne.STATIC_DRAW,indexDatatype:d.BYTES_PER_ELEMENT===2?Me.UNSIGNED_SHORT:Me.UNSIGNED_INT}),Z=[{index:Tg.startEllipsoidNormal,vertexBuffer:m,componentDatatype:Q.FLOAT,componentsPerAttribute:3},{index:Tg.endEllipsoidNormal,vertexBuffer:p,componentDatatype:Q.FLOAT,componentsPerAttribute:3},{index:Tg.startPositionAndHeight,vertexBuffer:g,componentDatatype:Q.FLOAT,componentsPerAttribute:4},{index:Tg.endPositionAndHeight,vertexBuffer:f,componentDatatype:Q.FLOAT,componentsPerAttribute:4},{index:Tg.startFaceNormalAndVertexCorner,vertexBuffer:x,componentDatatype:Q.FLOAT,componentsPerAttribute:4},{index:Tg.endFaceNormalAndHalfWidth,vertexBuffer:_,componentDatatype:Q.FLOAT,componentsPerAttribute:4},{index:Tg.a_batchId,vertexBuffer:C,componentDatatype:Q.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new ei({context:t,attributes:Z,indexBuffer:V}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._startEllipsoidNormals=void 0,e._endEllipsoidNormals=void 0,e._startPositionAndHeights=void 0,e._startFaceNormalAndVertexCornerIds=void 0,e._endPositionAndHeights=void 0,e._endFaceNormalAndHalfWidths=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var c2=new A,ace=new h;function FOe(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return A.clone(n,c2),A.multiplyByPoint(c2,e._center,ace),A.setTranslation(c2,ace,c2),c2},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})}function cce(e){return De.fromCache({cull:{enabled:!0,face:pi.FRONT},blending:un.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:kn.EQUAL,frontOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.KEEP},backFunction:kn.EQUAL,backOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.KEEP},reference:Nt.CESIUM_3D_TILE_MASK,mask:Nt.CESIUM_3D_TILE_MASK}})}function AOe(e){l(e._rs)||(e._rs=cce(!1),e._rs3DTiles=cce(!0))}function MOe(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(s2),o=n.getFragmentShaderCallback(!1,void 0,!0)(a2),r=new Ye({defines:["VECTOR_TILE",Yt.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[cd,i]}),s=new Ye({defines:["VECTOR_TILE"],sources:[o]});e._sp=qt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:Tg})}function NOe(e,t){let n=e._command;if(!l(e._command)){let o=e._batchTable.getUniformMapCallback()(e._uniformMap);n=e._command=new tt({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:o,boundingVolume:e._boundingVolume,pass:Le.TERRAIN_CLASSIFICATION,pickId:e._batchTable.getPickId()});let r=tt.shallowClone(n,n.derivedCommands.tileset);r.renderState=e._rs3DTiles,r.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=r}let i=e._classificationType;(i===Un.TERRAIN||i===Un.BOTH)&&t.commandList.push(n),(i===Un.CESIUM_3D_TILE||i===Un.BOTH)&&t.commandList.push(n.derivedCommands.tileset)}ob.prototype.getPositions=function(e){return b_.getPolylinePositions(this,e)};ob.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o{e.isDestroyed()||(e._error=t)})}ob.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=YOe(this).then(vOe(this,t))),l(this._error)){let i=this._error;throw this._error=void 0,i}return}FOe(this,t),MOe(this,t),AOe(this);let n=e.passes;(n.render||n.pick)&&NOe(this,e)};ob.prototype.isDestroyed=function(){return!1};ob.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),me(this)};var l2=ob;var mvn=S(T(),1);var SK=32767,OOe=new he,zOe=new h;function KOe(e,t,n,i,o){let r=e.length/3,s=e.subarray(0,r),a=e.subarray(r,2*r),c=e.subarray(2*r,3*r);wn.zigZagDeltaDecode(s,a,c);let d=new Float64Array(e.length);for(let u=0;u0&&l(e.POLYGON_BATCH_IDS)){let p=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,p,s)}if(a>0&&l(e.POLYLINE_BATCH_IDS)){let p=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,p,a)}if(c>0&&l(e.POINT_BATCH_IDS)){let p=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,p,c)}let d=l(n)||l(i)||l(o),u=s>0&&!l(n)||a>0&&!l(i)||c>0&&!l(o);if(d&&u)throw new ue("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(o)){let p=0;if(!l(n)&&s>0)for(n=new Uint16Array(s),r=0;r0)for(i=new Uint16Array(a),r=0;r0)for(o=new Uint16Array(c),r=0;r0&&(C=Eo(i,n,d),n+=d,u>0&&(V=new Uint8Array(t,n,u),V=new Uint8Array(V),n+=u));let Z=y(x.POLYGONS_LENGTH,0),R=y(x.POLYLINES_LENGTH,0),G=y(x.POINTS_LENGTH,0),W=Z+R+G,v=new Ep(e,W,C,V,HOe(e));if(e._batchTable=v,W===0)return;let P=new Am(x,_),F=P.getGlobalProperty("REGION");if(!l(F))throw new ue("Feature table global property: REGION must be defined");let M=ce.unpack(F),b=F[4],L=F[5],E=e._tile.computedTransform,I=P.getGlobalProperty("RTC_CENTER",Q.FLOAT,3);l(I)?(I=h.unpack(I),A.multiplyByPoint(E,I,I)):(I=ce.center(M),I.height=X.lerp(b,L,.5),I=te.WGS84.cartographicToCartesian(I));let w=JOe(x,_);if(n+=(4-n%4)%4,Z>0){P.featuresLength=Z;let N=y(P.getPropertyArray("POLYGON_COUNTS",Q.UNSIGNED_INT,1),P.getPropertyArray("POLYGON_COUNT",Q.UNSIGNED_INT,1));if(!l(N))throw new ue("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let B=y(P.getPropertyArray("POLYGON_INDEX_COUNTS",Q.UNSIGNED_INT,1),P.getPropertyArray("POLYGON_INDEX_COUNT",Q.UNSIGNED_INT,1));if(!l(B))throw new ue("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let k=N.reduce(function(K,j){return K+j*2},0),O=B.reduce(function(K,j){return K+j},0),U=new Uint32Array(t,n,O);n+=m;let J=new Uint16Array(t,n,k);n+=p;let z,ee;l(x.POLYGON_MINIMUM_HEIGHTS)&&l(x.POLYGON_MAXIMUM_HEIGHTS)&&(z=P.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",Q.FLOAT,1),ee=P.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",Q.FLOAT,1)),e._polygons=new i2({positions:J,counts:N,indexCounts:B,indices:U,minimumHeight:b,maximumHeight:L,polygonMinimumHeights:z,polygonMaximumHeights:ee,center:I,rectangle:M,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:v,batchIds:w.polygons,modelMatrix:E})}if(R>0){P.featuresLength=R;let N=y(P.getPropertyArray("POLYLINE_COUNTS",Q.UNSIGNED_INT,1),P.getPropertyArray("POLYLINE_COUNT",Q.UNSIGNED_INT,1));if(!l(N))throw new ue("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");let B=P.getPropertyArray("POLYLINE_WIDTHS",Q.UNSIGNED_SHORT,1);if(!l(B)){B=new Uint16Array(R);for(let ee=0;ee0){let N=new Uint16Array(t,n,G*3);n+=f,e._points=new n2({positions:N,batchIds:w.points,minimumHeight:b,maximumHeight:L,rectangle:M,batchTable:v})}}function TK(e){let t=e.featuresLength;if(!l(e._features)&&t>0){let n=new Array(t);l(e._polygons)&&e._polygons.createFeatures(e,n),l(e._polylines)&&e._polylines.createFeatures(e,n),l(e._points)&&e._points.createFeatures(e,n),e._features=n}}Om.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};Om.prototype.getFeature=function(e){return l(this._features)||TK(this),this._features[e]};Om.prototype.applyDebugSettings=function(e,t){l(this._polygons)&&this._polygons.applyDebugSettings(e,t),l(this._polylines)&&this._polylines.applyDebugSettings(e,t),l(this._points)&&this._points.applyDebugSettings(e,t)};Om.prototype.applyStyle=function(e){l(this._features)||TK(this),l(this._polygons)&&this._polygons.applyStyle(e,this._features),l(this._polylines)&&this._polylines.applyStyle(e,this._features),l(this._points)&&this._points.applyStyle(e,this._features)};Om.prototype.update=function(e,t){let n=!0;l(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),n=n&&this._polygons.ready),l(this._polylines)&&(this._polylines.update(t),n=n&&this._polylines.ready),l(this._points)&&(this._points.update(t),n=n&&this._points.ready),l(this._batchTable)&&n&&(l(this._features)||TK(this),this._batchTable.update(e,t),this._ready=!0)};Om.prototype.pick=function(e,t,n){};Om.prototype.getPolylinePositions=function(e){let t=this._polylines;if(l(t))return t.getPositions(e)};Om.prototype.isDestroyed=function(){return!1};Om.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),me(this)};function $Oe(e,t,n,i,o,r){let s=t.length,a=0;for(let c=0;c=0?i[r]:void 0}var x_=nze;var Vwn=S(T(),1);var gwn=S(T(),1);function ab(e){e=y(e,y.EMPTY_OBJECT);let t=e.tile,n=e.class;this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(ab.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});ab.prototype.hasProperty=function(e){return Mn.hasProperty(e,this._properties,this._class)};ab.prototype.hasPropertyBySemantic=function(e){return Mn.hasPropertyBySemantic(e,this._properties,this._class)};ab.prototype.getPropertyIds=function(e){return Mn.getPropertyIds(this._properties,this._class,e)};ab.prototype.getProperty=function(e){return Mn.getProperty(e,this._properties,this._class)};ab.prototype.setProperty=function(e,t){return Mn.setProperty(e,t,this._properties,this._class)};ab.prototype.getPropertyBySemantic=function(e){return Mn.getPropertyBySemantic(e,this._properties,this._class)};ab.prototype.setPropertyBySemantic=function(e,t){return Mn.setPropertyBySemantic(e,t,this._properties,this._class)};var h2=ab;function VK(e,t){let n=oi(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){VK._oneTimeWarning("findTileMetadata-missing-root-schema","Could not find a metadata schema for tile metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");return}let i=y(e.schema.classes,y.EMPTY_OBJECT);if(l(n.class)){let o=i[n.class];return new h2({tile:n,class:o})}}VK._oneTimeWarning=At;var f2=VK;var Kwn=S(T(),1);var Iwn=S(T(),1);function ize(e){let t=new Uint8Array(e),n=Lm(t);if(n==="glTF"&&(n="glb"),xs.isBinaryFormat(n))return{contentType:n,binaryPayload:t};let i=oze(t);if(l(i.root))return{contentType:xs.EXTERNAL_TILESET,jsonPayload:i};if(l(i.asset))return{contentType:xs.GLTF,jsonPayload:i};if(l(i.tileAvailability))return{contentType:xs.IMPLICIT_SUBTREE_JSON,jsonPayload:i};if(l(i.type))return{contentType:xs.GEOJSON,jsonPayload:i};if(l(i.voxelTable))return{contentType:xs.VOXEL_JSON,jsonPayload:i};throw new ue("Invalid tile content.")}function oze(e){let t;try{t=Eo(e)}catch{throw new ue("Invalid tile content.")}return t}var hf=ize;function Ru(e,t,n,i){this._tileset=e,this._tile=t,this._tilesetResource=n,this._contents=[],this._contentsCreated=!1;let o=l(i.contents)?i.contents:i.content;this._innerContentHeaders=o,this._requestsInFlight=0,this._cancelCount=0;let r=this._innerContentHeaders.length;this._arrayFetchPromises=new Array(r),this._requests=new Array(r),this._ready=!1,this._innerContentResources=new Array(r),this._serverKeys=new Array(r);for(let s=0;scze(e,r,s)),o=await Promise.all(i);return e._contentsCreated=!0,e._contents=o.filter(l),o}async function cze(e,t,n){if(l(t))try{let i=hf(t);if(i.contentType===xs.EXTERNAL_TILESET)throw new ue("External tilesets are disallowed inside multiple contents");e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||i.contentType===xs.GEOMETRY||i.contentType===xs.VECTOR;let o=e._tileset,r=e._innerContentResources[n],s=e._tile,a,c=g_[i.contentType];l(i.binaryPayload)?a=await Promise.resolve(c(o,s,r,i.binaryPayload.buffer,0)):a=await Promise.resolve(c(o,s,r,i.jsonPayload));let d=e._innerContentHeaders[n];if(s.hasImplicitContentMetadata){let m=s.implicitSubtree,p=s.implicitCoordinates;a.metadata=m.getContentMetadataView(p,n)}else s.hasImplicitContent||(a.metadata=y_(o,d));let u=x_(o,d);return l(u)&&(a.group=new Xx({metadata:u})),a}catch(i){uce(e,n,i)}}function uce(e,t,n){let i=e._tileset,o=e._innerContentResources[t].url,r=l(n.message)?n.message:n.toString();i.tileFailed.numberOfListeners>0?i.tileFailed.raiseEvent({url:o,message:r}):(console.log(`A content failed to load: ${o}`),console.log(`Error: ${r}`))}Ru.prototype.cancelRequests=function(){for(let e=0;ea?g=X.TWO_PI-c+a:g=a-c;let x=Math.ceil(g/t)+1,_=Math.ceil(f/t)+1,C=g/(x-1),V=f/(_-1),Z=ce.northwest(e,r),R=ce.center(e,uze);(n!==0||i!==0)&&(R.longitude=0;f--)_s.computePosition(t,n,!1,g,f,x),m[p++]=x.x,m[p++]=x.y,m[p++]=x.z;for(f=0,g=i-2;g>0;g--)_s.computePosition(t,n,!1,g,f,x),m[p++]=x.x,m[p++]=x.y,m[p++]=x.z;let _=m.length/3*2,C=Me.createTypedArray(m.length/3,_),V=0;for(let R=0;R0){Eu.longitude=(t.west+t.east)*.5,Eu.latitude=d;let x=n.cartographicToCartesian(Eu,jC.origin);h.clone(c,jC.direction);let _=dn.fromPointNormal(e.southwestCornerCartesian,e.westNormal,_ce);jn.rayPlane(jC,_,e.southwestCornerCartesian),u=n.geodeticSurfaceNormal(x,A5)}else u=n.geodeticSurfaceNormalCartographic(ce.southeast(t),A5);let m=h.cross(u,a,xce);h.normalize(m,e.southNormal);let p=t.north,g;if(p<0){Eu.longitude=(t.west+t.east)*.5,Eu.latitude=p;let x=n.cartographicToCartesian(Eu,jC.origin);h.negate(c,jC.direction);let _=dn.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,_ce);jn.rayPlane(jC,_,e.northeastCornerCartesian),g=n.geodeticSurfaceNormal(x,A5)}else g=n.geodeticSurfaceNormalCartographic(ce.northwest(t),A5);let f=h.cross(a,g,xce);h.normalize(f,e.northNormal)}var Cze=new h,Vze=new h,Zze=new h(0,-1,0),Lze=new h(0,0,-1),Sce=new h;function Rze(e,t){let n=t.camera,i=n.positionWC,o=n.positionCartographic,r=0;if(!ce.contains(e.rectangle,o)){let d=e.southwestCornerCartesian,u=e.northeastCornerCartesian,m=e.westNormal,p=e.southNormal,g=e.eastNormal,f=e.northNormal;t.mode!==oe.SCENE3D&&(d=t.mapProjection.project(ce.southwest(e.rectangle),Cze),d.z=d.y,d.y=d.x,d.x=0,u=t.mapProjection.project(ce.northeast(e.rectangle),Vze),u.z=u.y,u.y=u.x,u.x=0,m=Zze,g=h.UNIT_Y,p=Lze,f=h.UNIT_Z);let x=h.subtract(i,d,Sce),_=h.dot(x,m),C=h.dot(x,p),V=h.subtract(i,u,Sce),Z=h.dot(V,g),R=h.dot(V,f);_>0?r+=_*_:Z>0&&(r+=Z*Z),C>0?r+=C*C:R>0&&(r+=R*R)}let s,a,c;if(t.mode===oe.SCENE3D?(s=o.height,a=e.minimumHeight,c=e.maximumHeight):(s=i.x,a=0,c=0),s>c){let d=s-c;r+=d*d}else if(s0?(n.push(0),i.push(this._planeVertices[0]),o=this._edgeNormals[0]):dn.getPointDistance(this._boundingPlanes[1],t)>0&&(n.push(1),i.push(this._planeVertices[1]),o=this._edgeNormals[1]);let r,s;for(r=0;r<4;r++)s=2+r,dn.getPointDistance(this._boundingPlanes[s],t)>0&&(n.push(s),i.push(this._planeVertices[s]),o=this._edgeNormals[s]);if(n.length===0)return 0;let a,c;if(n.length===1)return c=this._boundingPlanes[n[0]],a=FK(dn.projectPointOntoPlane(c,t,wK),i[0],c,o),h.distance(a,t);if(n.length===2){if(n[0]===0){let p=[this._vertices[4*n[0]+(n[1]-2)],this._vertices[4*n[0]+(n[1]-2+1)%4]];return a=Gce(t,p[0],p[1]),h.distance(a,t)}let u=Number.MAX_VALUE,m;for(r=0;r<2;r++)c=this._boundingPlanes[n[r]],a=FK(dn.projectPointOntoPlane(c,t,wK),i[r],c,this._edgeNormals[n[r]]),m=h.distanceSquared(a,t),m3)return a=FK(dn.projectPointOntoPlane(this._boundingPlanes[1],t,wK),this._planeVertices[1],this._boundingPlanes[1],this._edgeNormals[1]),h.distance(a,t);let d=n[1]===2&&n[2]===5?0:1;return n[0]===0?h.distance(t,this._vertices[(n[1]-2+d)%4]):h.distance(t,this._vertices[4+(n[1]-2+d)%4])};var Yze=new h,Oze=new h;function Gce(e,t,n){let i=h.subtract(n,t,Yze),o=h.subtract(e,t,Oze),r=h.dot(i,o);if(r<=0)return t;let s=h.dot(i,i);return r>=s?n:(r=r/s,new h((1-r)*t.x+r*n.x,(1-r)*t.y+r*n.y,(1-r)*t.z+r*n.z))}var zze=new dn(h.UNIT_X,0);function FK(e,t,n,i){let o=Number.MAX_VALUE,r,s,a;for(let c=0;c0&&(f=!0,m+=d),s1||oi(n,"3DTILES_multiple_contents"),s=o&&!r?n.contents[0]:n.content;this._contentHeader=s,this.transform=l(n.transform)?A.unpack(n.transform):A.clone(A.IDENTITY);let a=l(i)?i.computedTransform:e.modelMatrix,c=A.multiply(a,this.transform,new A),d=l(i)?i._initialTransform:A.IDENTITY;this._initialTransform=A.multiply(d,this.transform,new A),this.computedTransform=c,this.metadata=f2(e,n),this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._boundingVolume=this.createBoundingVolume(n.boundingVolume,c),this._boundingVolume2D=void 0;let u;l(s)&&l(s.boundingVolume)&&(u=this.createBoundingVolume(s.boundingVolume,c)),this._contentBoundingVolume=u,this._contentBoundingVolume2D=void 0;let m;l(n.viewerRequestVolume)&&(m=this.createBoundingVolume(n.viewerRequestVolume,c)),this._viewerRequestVolume=m,this.geometricError=n.geometricError,this._geometricError=n.geometricError,l(this._geometricError)||(this._geometricError=l(i)?i._geometricError:e._geometricError,jo._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale();let p;l(n.refine)?((n.refine==="replace"||n.refine==="add")&&jo._deprecationWarning("lowercase-refine",`This tile uses a lowercase refine "${n.refine}". Instead use "${n.refine.toUpperCase()}".`),p=n.refine.toUpperCase()==="REPLACE"?wo.REPLACE:wo.ADD):l(i)?p=i.refine:p=wo.REPLACE,this.refine=p,this.children=[],this.parent=i;let g,f=!1,x,_,C;if(t=Ee.createIfNeeded(t),r)x=Mo.UNLOADED,_=t.clone();else if(l(s)){let G=s.uri;l(s.url)&&(jo._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),G=s.url),G===""?(jo._deprecationWarning("contentUriEmpty","content.uri property is an empty string, which creates a circular dependency, making this tileset invalid. Omit the content property instead"),g=new HC(e,this),f=!0,x=Mo.READY):(x=Mo.UNLOADED,_=t.getDerivedResource({url:G}),C=Ka.getServerKey(_.getUrlComponent()))}else g=new HC(e,this),f=!0,x=Mo.READY;this._content=g,this._contentResource=_,this._contentState=x,this._expiredContent=void 0,this._serverKey=C,this.hasEmptyContent=f,this.hasTilesetContent=!1,this.hasImplicitContent=!1,this.hasImplicitContentMetadata=!1,this.hasMultipleContents=r,this.cacheNode=void 0;let V=n.expire,Z,R;l(V)&&(Z=V.duration,l(V.date)&&(R=ne.fromIso8601(V.date))),this.expireDuration=Z,this.expireDate=R,this.lastStyleTime=0,this._optimChildrenWithinParent=Lu.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1,this.priorityDeferred=!1,this.implicitTileset=void 0,this.implicitCoordinates=void 0,this.implicitSubtree=void 0,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._wasSelectedLastFrame=!1,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._isClippedByPolygon=!1,this._clippingPlanesState=0,this._clippingPolygonsState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=Y.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new ne,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}jo._deprecationWarning=Yr;Object.defineProperties(jo.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return y(this._contentBoundingVolume,this._boundingVolume)}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},isVisible:{get:function(){return this._visible&&this._inRequestVolume}},extras:{get:function(){return this._header.extras}},color:{get:function(){return l(this._color)||(this._color=new Y),Y.clone(this._color)},set:function(e){this._color=Y.clone(e,this._color),this._colorDirty=!0}},hasRenderableContent:{get:function(){return!this.hasEmptyContent&&!this.hasTilesetContent&&!this.hasImplicitContent}},contentAvailable:{get:function(){return this.contentReady&&this.hasRenderableContent||l(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===Mo.READY}},contentUnloaded:{get:function(){return this._contentState===Mo.UNLOADED}},hasUnloadedRenderableContent:{get:function(){return this.hasRenderableContent&&this.contentUnloaded}},contentExpired:{get:function(){return this._contentState===Mo.EXPIRED}},contentFailed:{get:function(){return this._contentState===Mo.FAILED}},commandsLength:{get:function(){return this._commandsLength}}});var Vg=new h;function $ze(e,t){let{tileset:n,boundingSphere:i}=e,{radius:o,center:r}=i,{camera:s}=t,a=h.multiplyByScalar(s.directionWC,e._centerZDepth,Vg),c=h.add(s.positionWC,a,Vg),d=h.subtract(c,r,Vg);if(h.magnitude(d)>o){let R=h.normalize(d,Vg),G=h.multiplyByScalar(R,o,Vg),W=h.add(r,G,Vg),v=h.subtract(W,s.positionWC,Vg),P=h.normalize(v,Vg);e._foveatedFactor=1-Math.abs(h.dot(s.directionWC,P))}else e._foveatedFactor=0;let p=e.refine===wo.REPLACE,g=n.isSkippingLevelOfDetail;if(p&&!g||!n.foveatedScreenSpaceError||n.foveatedConeSize===1||e._priorityProgressiveResolution&&p&&g||n._pass===Io.PRELOAD_FLIGHT||n._pass===Io.PRELOAD)return!1;let f=1-Math.cos(s.frustum.fov*.5),x=n.foveatedConeSize*f;if(e._foveatedFactor<=x)return!1;let _=f-x,C=X.clamp((e._foveatedFactor-x)/_,0,1),V=n.foveatedInterpolationCallback(n.foveatedMinimumScreenSpaceErrorRelaxation,n.memoryAdjustedScreenSpaceError,C),Z=e._screenSpaceError===0&&l(e.parent)?e.parent._screenSpaceError*.5:e._screenSpaceError;return n.memoryAdjustedScreenSpaceError-V<=Z}var wce=new ne;jo.prototype.getScreenSpaceError=function(e,t,n){let i=this._tileset,o=y(n,1),r=l(this.parent)?this.parent.geometricError:i._scaledGeometricError,s=t?r:this.geometricError;if(s===0)return 0;let{camera:a,context:c}=e,d=a.frustum,u=c.drawingBufferWidth,m=c.drawingBufferHeight*o,p;if(e.mode===oe.SCENE2D||d instanceof sn){let g=d.offCenterFrustum;l(g)&&(d=g);let f=Math.max(d.top-d.bottom,d.right-d.left)/Math.max(u,m);p=s/f}else{let g=Math.max(this._distanceToCamera,X.EPSILON7),f=d.sseDenominator;if(p=s*m/(g*f),i.dynamicScreenSpaceError){let x=i._dynamicScreenSpaceErrorComputedDensity,_=i.dynamicScreenSpaceErrorFactor,C=X.fog(g,x)*_;p-=C}}return p/=e.pixelRatio,p};function eKe(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;let n=e.memoryAdjustedScreenSpaceError,i=t._screenSpaceErrorProgressiveResolution>n;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;let o=t.parent,r=t._screenSpaceErrorProgressiveResolution<=n,s=l(o)&&o._screenSpaceErrorProgressiveResolution>n;return r&&s&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function tKe(e,t){let n=t.parent,o=l(n)&&(!e.isSkippingLevelOfDetail||t._screenSpaceError===0||n.hasTilesetContent||n.hasImplicitContent)?n._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-o}jo.prototype.updateVisibility=function(e){let{parent:t,tileset:n}=this;if(this._updatedVisibilityFrame===n._updatedVisibilityFrame)return;let i=l(t)?t.computedTransform:n.modelMatrix,o=l(t)?t._visibilityPlaneMask:ss.MASK_INDETERMINATE;this.updateTransform(i,e),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,n.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,o),this._visible=this._visibilityPlaneMask!==ss.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=tKe(n,this),this._priorityProgressiveResolution=eKe(n,this),this.priorityDeferred=$ze(this,e),this._updatedVisibilityFrame=n._updatedVisibilityFrame};jo.prototype.updateExpiration=function(){if(l(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){let e=ne.now(wce);ne.lessThan(this.expireDate,e)&&(this._contentState=Mo.EXPIRED,this._expiredContent=this._content)}};function nKe(e){if(!l(e.expireDuration))return;let t=ne.now(wce);ne.addSeconds(t,e.expireDuration,t),l(e.expireDate)?ne.lessThan(e.expireDate,t)&&ne.clone(t,e.expireDate):e.expireDate=ne.clone(t)}function iKe(e){return function(){return e._priority}}jo.prototype.requestContent=function(){if(!this.hasEmptyContent)return this.hasMultipleContents?oKe(this):sKe(this)};function oKe(e){let t=e._content,n=e._tileset;if(!l(t)){let o=oi(e._header,"3DTILES_multiple_contents")?e._header.extensions["3DTILES_multiple_contents"]:e._header;t=new p2(n,e,e._contentResource.clone(),o),e._content=t}let i=t.requestInnerContents();if(l(i))return e._contentState=Mo.LOADING,i.then(o=>{if(!e.isDestroyed()&&l(o))return e._contentState=Mo.PROCESSING,t}).catch(o=>{if(!e.isDestroyed())throw e._contentState=Mo.FAILED,o})}async function rKe(e,t,n,i,o){let r=e._contentState;e._contentState=Mo.LOADING,++t.statistics.numberOfPendingRequests;let s;try{s=await o}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;if(n.cancelled||n.state===Qn.CANCELLED){e._contentState=r,++t.statistics.numberOfAttemptedRequests;return}throw e._contentState=Mo.FAILED,a}if(e.isDestroyed()){--t.statistics.numberOfPendingRequests;return}if(n.cancelled||n.state===Qn.CANCELLED){e._contentState=r,--t.statistics.numberOfPendingRequests,++t.statistics.numberOfAttemptedRequests;return}try{let a=await aKe(e,s);return--t.statistics.numberOfPendingRequests,e.isDestroyed()?void 0:(i&&(e.expireDate=void 0),e._content=a,e._contentState=Mo.PROCESSING,a)}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;throw e._contentState=Mo.FAILED,a}}function sKe(e){let t=e._contentResource.clone(),n=e.contentExpired;n&&t.setQueryParameters({expired:e.expireDate.toString()});let i=new Oo({throttle:!0,throttleByServer:!0,type:is.TILES3D,priorityFunction:iKe(e),serverKey:e._serverKey});e._request=i,t.request=i;let o=e._tileset,r=t.fetchArrayBuffer();if(!l(r)){++o.statistics.numberOfAttemptedRequests;return}return rKe(e,o,i,n,r)}async function aKe(e,t){let n=hf(t),i=e._tileset;i._disableSkipLevelOfDetail=i._disableSkipLevelOfDetail||n.contentType===xs.GEOMETRY||n.contentType===xs.VECTOR,(n.contentType===xs.IMPLICIT_SUBTREE||n.contentType===xs.IMPLICIT_SUBTREE_JSON)&&(e.hasImplicitContent=!0),n.contentType===xs.EXTERNAL_TILESET&&(e.hasTilesetContent=!0);let o,r=g_[n.contentType];if(e.isDestroyed())return;l(n.binaryPayload)?o=await Promise.resolve(r(i,e,e._contentResource,n.binaryPayload.buffer,0)):o=await Promise.resolve(r(i,e,e._contentResource,n.jsonPayload));let s=e._contentHeader;if(e.hasImplicitContentMetadata){let c=e.implicitSubtree,d=e.implicitCoordinates;o.metadata=c.getContentMetadataView(d,0)}else e.hasImplicitContent||(o.metadata=y_(i,s));let a=x_(i,s);return l(a)&&(o.group=new Xx({metadata:a})),o}jo.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()};jo.prototype.unloadContent=function(){this.hasRenderableContent&&(this._content=this._content&&this._content.destroy(),this._contentState=Mo.UNLOADED,this.lastStyleTime=0,this.clippingPlanesDirty=this._clippingPlanesState===0,this._clippingPlanesState=0,this.clippingPolygonsDirty=this._clippingPolygonsState===0,this._clippingPolygonsState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var Fce=new le;function NK(e,t){if(t.mode!==oe.SCENE3D&&!l(e._boundingVolume2D)){let n=e._boundingVolume.boundingSphere,i=le.projectTo2D(n,t.mapProjection,Fce);e._boundingVolume2D=new ub(i.center,i.radius)}return t.mode!==oe.SCENE3D?e._boundingVolume2D:e._boundingVolume}function cKe(e,t){if(t.mode!==oe.SCENE3D&&!l(e._contentBoundingVolume2D)){let n=e._contentBoundingVolume.boundingSphere,i=le.projectTo2D(n,t.mapProjection,Fce);e._contentBoundingVolume2D=new ub(i.center,i.radius)}return t.mode!==oe.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}jo.prototype.visibility=function(e,t){let n=e.cullingVolume,i=NK(this,e),o=this._tileset,r=o.clippingPlanes;if(l(r)&&r.enabled){let a=r.computeIntersectionWithBoundingVolume(i,o.clippingPlanesOriginMatrix);if(this._isClipped=a!==Ht.INSIDE,a===Ht.OUTSIDE)return ss.MASK_OUTSIDE}let s=o.clippingPolygons;if(l(s)&&s.enabled){let a=s.computeIntersectionWithBoundingVolume(i);this._isClippedByPolygon=a!==Ht.OUTSIDE}return n.computeVisibilityWithPlaneMask(i,t)};jo.prototype.contentVisibility=function(e){if(!l(this._contentBoundingVolume))return Ht.INSIDE;if(this._visibilityPlaneMask===ss.MASK_INSIDE)return Ht.INSIDE;let t=e.cullingVolume,n=cKe(this,e),i=this._tileset,o=i.clippingPlanes;if(l(o)&&o.enabled){let s=o.computeIntersectionWithBoundingVolume(n,i.clippingPlanesOriginMatrix);if(this._isClipped=s!==Ht.INSIDE,s===Ht.OUTSIDE)return Ht.OUTSIDE}let r=i.clippingPolygons;if(l(r)&&r.enabled){let s=r.computeIntersectionWithBoundingVolume(n);if(this._isClippedByPolygon=s!==Ht.OUTSIDE,s===Ht.INSIDE)return Ht.OUTSIDE}return t.computeVisibility(n)};jo.prototype.distanceToTile=function(e){return NK(this,e).distanceToCamera(e)};var lKe=new h;jo.prototype.distanceToTileCenter=function(e){let n=NK(this,e).boundingVolume,i=h.subtract(n.center,e.camera.positionWC,lKe);return h.dot(e.camera.directionWC,i)};jo.prototype.insideViewerRequestVolume=function(e){let t=this._viewerRequestVolume;return!l(t)||t.distanceToCamera(e)===0};var Ace=new $,Mce=new h,dKe=new $,UK=new h,Nce=new ce,Uce=new Gn,MK=new A;function uKe(e,t,n){let i=h.fromElements(e[0],e[1],e[2],UK),o=$.fromArray(e,3,dKe);i=A.multiplyByPoint(t,i,i);let r=A.getMatrix3(t,Ace);return o=$.multiply(r,o,o),l(n)?(n.update(i,o),n):new _d(i,o)}function mKe(e,t,n,i){let o=ce.unpack(e,0,Nce),r=e[4],s=e[5],a=Gn.fromRectangle(o,r,s,te.WGS84,Uce),c=a.center,d=a.halfAxes;t=A.multiplyTransformation(t,A.inverseTransformation(n,MK),MK),c=A.multiplyByPoint(t,c,c);let u=A.getMatrix3(t,Ace);return d=$.multiply(u,d,d),l(i)&&i instanceof _d?(i.update(c,d),i):new _d(c,d)}function hKe(e,t,n,i){if(!A.equalsEpsilon(t,n,X.EPSILON8))return mKe(e,t,n,i);let o=ce.unpack(e,0,Nce);return l(i)?(i.rectangle=ce.clone(o,i.rectangle),i.minimumHeight=e[4],i.maximumHeight=e[5],i.computeBoundingVolumes(te.WGS84),i):new Wu({rectangle:o,minimumHeight:e[4],maximumHeight:e[5]})}function fKe(e,t,n){let i=h.fromElements(e[0],e[1],e[2],UK),o=e[3];i=A.multiplyByPoint(t,i,i);let r=A.getScale(t,Mce),s=h.maximumComponent(r);return o*=s,l(n)?(n.update(i,o),n):new ub(i,o)}jo.prototype.createBoundingVolume=function(e,t,n){let i=this.metadata,o;if(l(i)&&(o=Qx.parseBoundingVolumeSemantic("TILE",i)),l(o)&&(e=o),!l(e))throw new ue("boundingVolume must be defined");if(oi(e,"3DTILES_bounding_volume_S2"))return new x2(e.extensions["3DTILES_bounding_volume_S2"]);let{box:r,region:s,sphere:a}=e;if(l(r)){let c=uKe(r,t,n);return this._verticalExaggeration!==1&&Xce(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c}if(l(s)){let c=hKe(s,t,this._initialTransform,n);return this._verticalExaggeration===1||(c instanceof _d?Xce(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight):(c.minimumHeight=fr.getHeight(c.minimumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.maximumHeight=fr.getHeight(c.maximumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.computeBoundingVolumes(te.WGS84))),c}if(l(a)){let c=fKe(a,t,n);if(this._verticalExaggeration!==1){let d=fr.getPosition(c.center,te.WGS84,this._verticalExaggeration,this._verticalExaggerationRelativeHeight,UK),u=c.radius*this._verticalExaggeration;c.update(d,u)}return c}throw new ue("boundingVolume must contain a sphere, region, or box")};var pKe=h.unpackArray(new Array(8*3).fill(0));function Xce(e,t,n){let i=e.boundingVolume.computeCorners(pKe).map(r=>fr.getPosition(r,te.WGS84,t,n,r)),o=Gn.fromPoints(i,Uce);e.update(o.center,o.halfAxes)}jo.prototype.updateTransform=function(e,t){e=y(e,A.IDENTITY);let n=A.multiplyTransformation(e,this.transform,MK),i=!A.equals(n,this.computedTransform),o=l(t)&&(this._verticalExaggeration!==t.verticalExaggeration||this._verticalExaggerationRelativeHeight!==t.verticalExaggerationRelativeHeight);if(!i&&!o)return;i&&A.clone(n,this.computedTransform),o&&(this._verticalExaggeration=t.verticalExaggeration,this._verticalExaggerationRelativeHeight=t.verticalExaggerationRelativeHeight);let r=this._header,s=this._contentHeader;this._boundingVolume=this.createBoundingVolume(r.boundingVolume,this.computedTransform,this._boundingVolume),l(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(s.boundingVolume,this.computedTransform,this._contentBoundingVolume)),l(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(r.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()};jo.prototype.updateGeometricErrorScale=function(){let e=A.getScale(this.computedTransform,Mce),t=h.maximumComponent(e);if(this.geometricError=this._geometricError*t,!l(this.parent)){let n=this._tileset;n._scaledGeometricError=n._geometricError*t}};function bKe(e,t,n,i){if(!i.isRender)return;let o=l(e._contentHeader)&&l(e._contentHeader.boundingVolume),r=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!o;if(r){let c;e._finalResolution?e.hasRenderableContent?c=Y.WHITE:c=Y.DARKGRAY:c=Y.YELLOW,l(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(c)),e._debugBoundingVolume.update(n);let d=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");d.color=zt.toValue(c,d.color)}else!r&&l(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&o?(l(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(Y.BLUE)),e._debugContentBoundingVolume.update(n)):!t.debugShowContentBoundingVolume&&l(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&l(e._viewerRequestVolume)?(l(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(Y.YELLOW)),e._debugViewerRequestVolume.update(n)):!t.debugShowViewerRequestVolume&&l(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());let s=t.debugColorizeTiles&&!e._debugColorizeTiles||l(t._heatmap.tilePropertyName),a=!t.debugColorizeTiles&&e._debugColorizeTiles;s?(t._heatmap.colorize(e,n),e._debugColorizeTiles=!0,e.color=e._debugColor):a&&(e._debugColorizeTiles=!1,e.color=Y.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),a&&t.makeStyleDirty()}function gKe(e,t,n){let i=e._expiredContent;if(!e.hasMultipleContents&&l(i)){if(!e.contentReady){try{i.update(t,n)}catch{}return}e._expiredContent.destroy(),e._expiredContent=void 0}if(l(e.content))try{e.content.update(t,n)}catch(o){throw e._contentState=Mo.FAILED,o}}function yKe(e,t){let n=t.clippingPlanes,i=0;l(n)&&e._isClipped&&n.enabled&&(i=n.clippingPlanesState),i!==e._clippingPlanesState&&(e._clippingPlanesState=i,e.clippingPlanesDirty=!0)}function xKe(e,t){let n=t.clippingPolygons,i=0;l(n)&&e._isClippedByPolygon&&n.enabled&&(i=n.clippingPolygonsState),i!==e._clippingPolygonsState&&(e._clippingPolygonsState=i,e.clippingPolygonsDirty=!0)}jo.prototype.update=function(e,t,n){let{commandList:i}=t,o=i.length;yKe(this,e),xKe(this,e),bKe(this,e,t,n),gKe(this,e,t);let r=i.length;this._commandsLength=r-o;for(let s=o;se.cacheBytes||n);){let s=r.item;r=r.next,this.unloadTile(e,s,t)}};G_.prototype.trim=function(){this._trimTiles=!0};var V2=G_;var JMn=S(T(),1);function D5(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function DK(e,t){let n;return t==="_loadTimestamp"?n=ne.toDate(e).getTime():n=e,n}D5.prototype.setReferenceMinimumMaximum=function(e,t,n){this._referenceMinimum[n]=DK(e,n),this._referenceMaximum[n]=DK(t,n)};function TKe(e,t){let n=e.tilePropertyName;if(l(n)){let i=DK(t[n],n);return l(i)?(e._maximum=Math.max(i,e._maximum),e._minimum=Math.min(i,e._minimum),i):(e.tilePropertyName=void 0,i)}}var kK=[new Y(.1,.1,.1,1),new Y(.153,.278,.878,1),new Y(.827,.231,.49,1),new Y(.827,.188,.22,1),new Y(1,.592,.259,1),new Y(1,.843,0,1)];D5.prototype.colorize=function(e,t){let n=this.tilePropertyName;if(!l(n)||!e.contentAvailable||e._selectedFrame!==t.frameNumber)return;let i=TKe(this,e),o=this._previousMinimum,r=this._previousMaximum;if(o===Number.MAX_VALUE||r===-Number.MAX_VALUE)return;let s=r-o+X.EPSILON7,c=X.clamp(i-o,0,s)/s,d=kK.length-1,u=c*d,m=Math.floor(u),p=Math.ceil(u),g=u-m,f=kK[m],x=kK[p],_=Y.clone(Y.WHITE);_.red=X.lerp(f.red,x.red,g),_.green=X.lerp(f.green,x.green,g),_.blue=X.lerp(f.blue,x.blue,g),e._debugColor=_};D5.prototype.resetMinimumMaximum=function(){let e=this.tilePropertyName;if(l(e)){let t=this._referenceMinimum[e],n=this._referenceMaximum[e],i=l(t)&&l(n);this._previousMinimum=i?t:this._minimum,this._previousMaximum=i?n:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}};var Z2=D5;var qMn=S(T(),1);function r1(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.batchTableByteLength=0}r1.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0};function B5(e,t,n,i){let o=t.innerContents,r=t.pointsLength,s=t.trianglesLength,a=t.featuresLength,c=t.geometryByteLength,d=t.texturesByteLength,u=t.batchTableByteLength;if(i?(e.numberOfFeaturesLoaded+=n?-a:a,e.numberOfPointsLoaded+=n?-r:r,e.geometryByteLength+=n?-c:c,e.texturesByteLength+=n?-d:d,e.batchTableByteLength+=n?-u:u):(e.numberOfFeaturesSelected+=n?-a:a,e.numberOfPointsSelected+=n?-r:r,e.numberOfTrianglesSelected+=n?-s:s),l(o)){let m=o.length;for(let p=0;p>1)&858993459,e=(e^e>>2)&252645135,e=(e^e>>4)&16711935,e=(e^e>>8)&65535,e}function YK(e){return e&=153391689,e=(e^e>>2)&51130563,e=(e^e>>4)&50393103,e=(e^e>>8)&4278190335,e=(e^e>>16)&1023,e}G2.encode2D=function(e,t){return(Yce(e)|Yce(t)<<1)>>>0};G2.decode2D=function(e,t){return l(t)||(t=new Array(2)),t[0]=Oce(e),t[1]=Oce(e>>1),t};G2.encode3D=function(e,t,n){return BK(e)|BK(t)<<1|BK(n)<<2};G2.decode3D=function(e,t){return l(t)||(t=new Array(3)),t[0]=YK(e),t[1]=YK(e>>1),t[2]=YK(e>>2),t};var Zg=G2;function No(e){this.subdivisionScheme=e.subdivisionScheme,this.subtreeLevels=e.subtreeLevels,this.level=e.level,this.x=e.x,this.y=e.y,this.z=void 0,e.subdivisionScheme===zr.OCTREE&&(this.z=e.z)}Object.defineProperties(No.prototype,{childIndex:{get:function(){let e=0;return e|=this.x&1,e|=(this.y&1)<<1,this.subdivisionScheme===zr.OCTREE&&(e|=(this.z&1)<<2),e}},mortonIndex:{get:function(){return this.subdivisionScheme===zr.OCTREE?Zg.encode3D(this.x,this.y,this.z):Zg.encode2D(this.x,this.y)}},tileIndex:{get:function(){let e=this.subdivisionScheme===zr.OCTREE?((1<<3*this.level)-1)/7:((1<<2*this.level)-1)/3,t=this.mortonIndex;return e+t}}});No.prototype.getDescendantCoordinates=function(e){let t=this.level+e.level,n=(this.x<>t,i=e.y>>t,o=this.x===n,r=this.y===i;if(this.subdivisionScheme===zr.OCTREE){let s=e.z>>t,a=this.z===s;return o&&r&&a}return o&&r};No.prototype.isEqual=function(e){return this.subdivisionScheme===e.subdivisionScheme&&this.subtreeLevels===e.subtreeLevels&&this.level===e.level&&this.x===e.x&&this.y===e.y&&(this.subdivisionScheme===zr.OCTREE?this.z===e.z:!0)};No.prototype.isImplicitTilesetRoot=function(){return this.level===0};No.prototype.isSubtreeRoot=function(){return this.level%this.subtreeLevels===0};No.prototype.isBottomOfSubtree=function(){return this.level%this.subtreeLevels===this.subtreeLevels-1};No.prototype.getTemplateValues=function(){let e={level:this.level,x:this.x,y:this.y};return this.subdivisionScheme===zr.OCTREE&&(e.z=this.z),e};var zce=[0,0,0];No.fromMortonIndex=function(e,t,n,i){let o;return e===zr.OCTREE?(o=Zg.decode3D(i,zce),new No({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1],z:o[2]})):(o=Zg.decode2D(i,zce),new No({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1]}))};No.fromTileIndex=function(e,t,n){let i,o,r;return e===zr.OCTREE?(i=Math.floor(X.log2(7*n+1)/3),o=((1<<3*i)-1)/7,r=n-o):(i=Math.floor(X.log2(3*n+1)/2),o=((1<<2*i)-1)/3,r=n-o),No.fromMortonIndex(e,t,i,r)};var W_=No;var WNn=S(T(),1);var VNn=S(T(),1);function pb(){}pb.selectTiles=function(e,t){fe.throwInstantiationError()};pb.sortChildrenByDistanceToCamera=function(e,t){return t._distanceToCamera===0&&e._distanceToCamera===0?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera};pb.canTraverse=function(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:e._screenSpaceError>e.tileset.memoryAdjustedScreenSpaceError};pb.selectTile=function(e,t){if(e.contentVisibility(t)===Ht.OUTSIDE)return;e._wasSelectedLastFrame=!0;let{content:n,tileset:i}=e;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,e.lastStyleTime=0,i._selectedTilesToStyle.push(e)):e._selectedFrame0;if((e.hasTilesetContent||e.hasImplicitContent)&&n){let r=e.children[0];Kce(r,t),e._visible=r._visible;return}if(RKe(e,t)){e._visible=!1;return}let i=e.refine===wo.REPLACE,o=e._optimChildrenWithinParent===Lu.USE_OPTIMIZATION;if(i&&o&&n&&!GKe(e,t)){++e.tileset._statistics.numberOfTilesCulledWithChildrenUnion,e._visible=!1;return}}function RKe(e,t){let{parent:n,tileset:i}=e;return!l(n)||n.hasTilesetContent||n.hasImplicitContent||n.refine!==wo.ADD?!1:e.getScreenSpaceError(t,!0)<=i.memoryAdjustedScreenSpaceError}function GKe(e,t){let n=!1,i=e.children;for(let o=0;o0;){E2.stackMaximumLength=Math.max(E2.stackMaximumLength,s.length);let a=s.pop(),c=a.refine===wo.ADD,d=a.refine===wo.REPLACE,u=WKe(a);u&&IKe(a,s,t),(c||d&&!u)&&(XKe(e,a),o(a,t),PKe(a,t),a.hasRenderableContent&&!a.contentAvailable&&(n=!1)),r(a,t)}return E2.stack.trim(E2.stackMaximumLength),n};function WKe(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:(e.hasEmptyContent,!0)}function IKe(e,t,n){let{children:i}=e;for(let o=0;o0;){I2.stackMaximumLength=Math.max(I2.stackMaximumLength,a.length);let c=a.pop(),d=c.parent,u=!l(d)||d._refines;c._refines=i(c)?vKe(c,a,t)&&u:!1;let m=!c._refines&&u;c.hasRenderableContent?c.refine===wo.ADD?(OK(c,t),o(c,t)):c.refine===wo.REPLACE&&(o(c,t),m&&OK(c,t)):(n._emptyTiles.push(c),o(c,t),m&&OK(c,t)),r(c,t),s(c,t)}}function FKe(e,t){let{canTraverse:n,updateTile:i,loadTile:o,touchTile:r}=Ns,s=!0,a=X2.stack;for(a.push(e);a.length>0;){X2.stackMaximumLength=Math.max(X2.stackMaximumLength,a.length);let c=a.pop(),d=c.children,u=d.length,m=!c.hasRenderableContent&&n(c);if(!m&&!c.contentAvailable&&(s=!1),i(c,t),c.isVisible||(o(c,t),r(c,t)),m)for(let p=0;p0;){w2.stackMaximumLength=Math.max(w2.stackMaximumLength,r.length);let a=r.pop().children;for(let c=0;cn._depth+e.skipLevels)}function kKe(e,t,n){let{tileset:i,children:o}=e,{updateTile:r,loadTile:s,touchTile:a}=Ns;for(let d=0;dt:e._screenSpaceError>t:!0}function BKe(e,t){let{tileset:n}=e,i=n.immediatelyLoadDesiredLevelOfDetail?Number.MAX_VALUE:Math.max(n.baseScreenSpaceError,n.memoryAdjustedScreenSpaceError),{canTraverse:o,loadTile:r,visitTile:s,touchTile:a}=Ns,c=v2.stack;for(c.push(e);c.length>0;){v2.stackMaximumLength=Math.max(v2.stackMaximumLength,c.length);let d=c.pop();NKe(d,t);let u=d.parent,m=!l(u)||u._refines;d._refines=o(d)?kKe(d,c,t)&&m:!1;let p=!d._refines&&m;d.hasRenderableContent?d.refine===wo.ADD?(Y5(d,t),r(d,t)):d.refine===wo.REPLACE&&(DKe(d,i)?(r(d,t),p&&Y5(d,t)):p?(Y5(d,t),r(d,t)):UKe(n,d)&&r(d,t)):(n._emptyTiles.push(d),r(d,t),p&&Y5(d,t)),s(d,t),a(d,t)}}function YKe(e,t){let{selectTile:n,canTraverse:i}=Ns,{stack:o,ancestorStack:r}=bb,s;for(o.push(e);o.length>0||r.length>0;){if(bb.stackMaximumLength=Math.max(bb.stackMaximumLength,o.length),bb.ancestorStackMaximumLength=Math.max(bb.ancestorStackMaximumLength,r.length),r.length>0){let d=r.peek();if(d._stackLength===o.length){r.pop(),d!==s&&(d._finalResolution=!1),n(d,t);continue}}let a=o.pop();if(!l(a))continue;let c=i(a);if(a._shouldSelect)if(a.refine===wo.ADD)n(a,t);else{if(a._selectionDepth=r.length,a._selectionDepth>0&&(a.tileset.hasMixedContent=!0),s=a,!c){n(a,t);continue}r.push(a),a._stackLength=o.length}if(c){let d=a.children;for(let u=0;uci._defaultMinTerrainHeight&&(s._initialClippingPlanesOriginMatrix=Gt.eastNorthUpToFixedFrame(p)),s._clippingPlanesOriginMatrix=A.clone(s._initialClippingPlanesOriginMatrix),s};qo.loadJson=function(e){return Ee.createIfNeeded(e).fetchJson()};qo.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()};qo.prototype.loadTileset=function(e,t,n){let i=t.asset;if(!l(i))throw new ue("Tileset must have an asset property.");if(i.version!=="0.0"&&i.version!=="1.0"&&i.version!=="1.1")throw new ue("The tileset must be 3D Tiles version 0.0, 1.0, or 1.1");l(t.extensionsRequired)&&qo.checkSupportedExtensions(t.extensionsRequired);let o=this._statistics,r=i.tilesetVersion;l(r)&&(this._basePath+=`?v=${r}`,e=e.clone(),e.setQueryParameters({v:r}));let s=jce(this,e,t.root,n);l(n)&&(n.children.push(s),s._depth=n._depth+1);let a=[];for(a.push(s);a.length>0;){let c=a.pop();++o.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&c.refine===wo.ADD;let d=c._header.children;if(l(d))for(let u=0;u_.minimumRadius){let Z=he.fromCartesian(V,_,zKe);n=h.normalize(a.positionWC,qce),i=a.directionWC,o=a.positionCartographic.height,r=0,s=Z.height*2}else{let Z=A.multiplyByPoint(x,a.positionWC,JKe);if(n=h.UNIT_Z,i=A.multiplyByPointAsVector(x,a.directionWC,QKe),i=h.normalize(i,i),o=Z.z,d instanceof _d){let R=$.getColumn(C.halfAxes,2,jKe),G=h.magnitude(R);r=V.z-G,s=V.z+G}else if(d instanceof ub){let R=C.radius;r=V.z-R,s=V.z+R}}}let u=e.dynamicScreenSpaceErrorHeightFalloff,m=r+(s-r)*u,p=s,g=X.clamp((o-m)/(p-m),0,1),f=1-Math.abs(h.dot(i,n));f=f*(1-g),e._dynamicScreenSpaceErrorComputedDensity=e.dynamicScreenSpaceErrorDensity*f}function $Ke(e,t){if(t.hasEmptyContent)return;let{statistics:n}=e,i=t.contentExpired,o=t.requestContent();l(o)&&(o.then(r=>{!l(r)||t.isDestroyed()||e.isDestroyed()||(e._processingQueue.push(t),++n.numberOfTilesProcessing)}).catch(r=>{tle(r,e,t)}),i&&(t.hasTilesetContent||t.hasImplicitContent?hHe(e,t):(n.decrementLoadCounts(t.content),--n.numberOfTilesWithContentReady)),e._requestedTilesInFlight.push(t))}function ele(e,t){return e._priority-t._priority}qo.prototype.postPassesUpdate=function(e){l(this._root)&&(eHe(this,e),pHe(this,e),this._cache.unloadTiles(this,ile),this._styleApplied&&this._styleEngine.resetDirty(),this._styleApplied=!1)};qo.prototype.prePassesUpdate=function(e){if(!l(this._root))return;aHe(this,e);let t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,l(t)&&t.enabled&&t.update(e);let n=this._clippingPolygons;l(n)&&n.enabled&&n.update(e),l(this._loadTimestamp)||(this._loadTimestamp=ne.clone(e.time)),this._timeSinceLoad=Math.max(ne.secondsDifference(e.time,this._loadTimestamp)*1e3,0),this.dynamicScreenSpaceError&&qKe(this,e),e.newFrame&&this._cache.reset()};function eHe(e,t){let n=e._requestedTilesInFlight,i=0;for(let o=0;o=1;if(r._contentState!==Mo.LOADING){++i;continue}else if(s){r.cancelRequests(),++i;continue}i>0&&(n[o-i]=r)}n.length-=i}function tHe(e){let t=e._requestedTiles;t.sort(ele);for(let n=0;n0?t.tileFailed.raiseEvent({url:i,message:o}):(console.log(`A 3D tile failed to load: ${i}`),console.log(`Error: ${o}`))}function nHe(e){let t=e._processingQueue,n=0;for(let i=0;i0&&(t[i-n]=o)}t.length-=n}var iHe=new he,oHe=new he,rHe=new h;function sHe(e,t,n){if(!e.enableCollision||!e.show)return;let i=e._addHeightCallbacks,o=t.boundingSphere;for(let r of i){if(r.invoked||t._wasSelectedLastFrame)continue;let s=r.ellipsoid,a=he.clone(r.positionCartographic,iHe),c=he.fromCartesian(o.center,s,oHe);l(c)&&(a.height=c.height);let d=he.toCartesian(a,s,rHe);h.distance(d,o.center)<=o.radius&&n.afterRender.push(()=>{l(r.callback)&&r.callback(a),r.invoked=!1})}}function aHe(e,t){nHe(e);let n=e._processingQueue,{cacheBytes:i,maximumCacheOverflowBytes:o,statistics:r}=e,s=i+o,a=!1;for(let c=0;cs){a=!0;break}let d=n[c];try{d.process(e,t),d.contentReady&&(--r.numberOfTilesProcessing,e.tileLoad.raiseEvent(d))}catch(u){--r.numberOfTilesProcessing,tle(u,e,d)}}e.totalMemoryUsageInBytes0&&cHe(e)}function cHe(e){e._memoryAdjustedScreenSpaceError*=1.02;let t=e._processingQueue;for(let n=0;n0&&(i+=` Points: ${e.content.pointsLength}`,o++),e.content.trianglesLength>0&&(i+=` Triangles: ${e.content.trianglesLength}`,o++),i+=` Features: ${e.content.featuresLength}`,o++),t.debugShowMemoryUsage&&(i+=` -Texture Memory: ${Qce(e.content.texturesByteLength)}`,i+=` -Geometry Memory: ${Qce(e.content.geometryByteLength)}`,o+=2),t.debugShowUrl)if(e.hasMultipleContents){i+=` +Texture Memory: ${$ce(e.content.texturesByteLength)}`,i+=` +Geometry Memory: ${$ce(e.content.geometryByteLength)}`,o+=2),t.debugShowUrl)if(e.hasMultipleContents){i+=` Urls:`;let s=e.content.innerContentUrls;for(let a=0;a0;e._backfaceCommands.length=0,a&&(l(e._stencilClearCommand)||(e._stencilClearCommand=new ii({stencil:0,pass:Re.CESIUM_3D_TILE,renderState:De.fromCache({stencilMask:Nt.SKIP_LOD_MASK})})),i.push(e._stencilClearCommand));let{statistics:c,tileVisible:d}=e,u=n.isRender,m=i.length;for(let f=0;f=0;--_)i[m+x+_]=i[m+_];for(let _=0;_0&&e._pointCloudEyeDomeLighting.update(t,r,e.pointCloudShading,e.boundingSphere),e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(l(e._tileDebugLabels)||(e._tileDebugLabels=new uf),fKe(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var $ce=[];function bKe(e,t){let n=t,i=$ce;for(i.push(t);i.length>0;){t=i.pop();let o=t.children;for(let r=0;r{t.push(Vt.clone(i))});let n=e.asset.extras;if(l(n)&&l(n.cesium)&&l(n.cesium.credits)){let i=n.cesium.credits;for(let o=0;oi.showOnScreen=i.showOnScreen||e._showCreditsOnScreen),e._credits=t}jo.prototype.getTraversal=function(e){let{pass:t}=e;return t===Io.MOST_DETAILED_PRELOAD||t===Io.MOST_DETAILED_PICK?E2:this.isSkippingLevelOfDetail?w2:W2};jo.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)};jo.prototype.updateForPass=function(e,t){let n=t.pass;if(n===Io.PRELOAD&&(!this.preloadWhenHidden||this.show)||n===Io.PRELOAD_FLIGHT&&(!this.preloadFlightDestinations||!this.show&&!this.preloadWhenHidden)||n===Io.REQUEST_RENDER_MODE_DEFER_CHECK&&(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))return;let i=e.commandList,o=e.camera,r=e.cullingVolume;t.ready=!1;let s=Io.getPassOptions(n),a=s.ignoreCommands,c=y(t.commandList,i),d=c.length;e.commandList=c,e.camera=y(t.camera,o),e.cullingVolume=y(t.cullingVolume,r);let u=this._clippingPolygons;l(u)&&u.enabled&&u.queueCommands(e);let m=this._statisticsPerPass[n];(this.show||a)&&(this._pass=n,t.ready=TKe(this,e,m,s)),a&&(c.length=d),e.commandList=i,e.camera=o,e.cullingVolume=r};jo.prototype.hasExtension=function(e){return l(this._extensionsUsed)?this._extensionsUsed.indexOf(e)>-1:!1};jo.prototype.isDestroyed=function(){return!1};jo.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),l(this._root)){let e=$ce;for(e.push(this._root);e.length>0;){let t=e.pop();t.destroy();let n=t.children;for(let i=0;i{let r=this._addHeightCallbacks,s=r.length;for(let a=0;a{let u=le.distanceSquaredTo(c.contentBoundingVolume.boundingSphere,e.origin),m=le.distanceSquaredTo(d.contentBoundingVolume.boundingSphere,e.origin);return u-m});let a;for(let c=0;c-1;i--)Kz(this,e[i],t,n);return me(this)};Zg.prototype.getBoundingSphere=function(e,t){let n=this._tilesetHash[e.id];if(!l(n)||n.loadFail)return mt.FAILED;let i=n.tilesetPrimitive;return l(i)?i.show?(le.clone(i.boundingSphere,t),mt.DONE):mt.FAILED:mt.PENDING};Zg.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._entitiesToVisualize,a=this._tilesetHash,c=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],l(r._tileset)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],l(r._tileset)?s.set(r.id,r):(Kz(this,r,a,c),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],Kz(this,r,a,c),s.remove(r.id)};function Kz(e,t,n,i){let o=n[t.id];l(o)&&(l(o.tilesetPrimitive)&&i.removeAndDestroy(o.tilesetPrimitive),delete n[t.id])}async function GKe(e,t,n,i){t[n.id]={url:e.url,loadFail:!1};try{let o=await oa.fromUrl(e);if(o.id=n,i.add(o),!l(t[n.id]))return;t[n.id].tilesetPrimitive=o}catch(o){console.error(o),t[n.id].loadFail=!0}}var F2=Zg;var Tkn=T(S(),1);var EKe=Y.WHITE,XKe=Y.BLACK,IKe=new D(2,2);function a1(e){e=y(e,y.EMPTY_OBJECT),this._definitionChanged=new ge,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(a1.prototype,{isConstant:{get:function(){return K.isConstant(this._evenColor)&&K.isConstant(this._oddColor)&&K.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:de("evenColor"),oddColor:de("oddColor"),repeat:de("repeat")});a1.prototype.getType=function(e){return"Checkerboard"};a1.prototype.getValue=function(e,t){return l(t)||(t={}),t.lightColor=K.getValueOrClonedDefault(this._evenColor,e,EKe,t.lightColor),t.darkColor=K.getValueOrClonedDefault(this._oddColor,e,XKe,t.darkColor),t.repeat=K.getValueOrDefault(this._repeat,e,IKe),t};a1.prototype.equals=function(e){return this===e||e instanceof a1&&K.equals(this._evenColor,e._evenColor)&&K.equals(this._oddColor,e._oddColor)&&K.equals(this._repeat,e._repeat)};var c1=a1;var Nkn=T(S(),1);var Wkn=T(S(),1);var nle={id:void 0};function A2(e){if(e._firing){e._refire=!0;return}if(e._suspendCount===0){let t=e._addedEntities,n=e._removedEntities,i=e._changedEntities;if(i.length!==0||t.length!==0||n.length!==0){e._firing=!0;do{e._refire=!1;let o=t.values.slice(0),r=n.values.slice(0),s=i.values.slice(0);t.removeAll(),n.removeAll(),i.removeAll(),e._collectionChanged.raiseEvent(e,o,r,s)}while(e._refire);e._firing=!1}}}function lc(e){this._owner=e,this._entities=new Ct,this._addedEntities=new Ct,this._removedEntities=new Ct,this._changedEntities=new Ct,this._suspendCount=0,this._collectionChanged=new ge,this._id=Bn(),this._show=!0,this._firing=!1,this._refire=!1}lc.prototype.suspendEvents=function(){this._suspendCount++};lc.prototype.resumeEvents=function(){this._suspendCount--,A2(this)};Object.defineProperties(lc.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(e===this._show)return;this.suspendEvents();let t,n=[],i=this._entities.values,o=i.length;for(t=0;t-1;c--)s=a[c],ole(e,p,g,s);for(r=n-1;r>=0;r--)for(d=t[r],d.collectionChanged.addEventListener(Gr.prototype._onCollectionChanged,e),a=d.values,g=d.id,c=a.length-1;c>-1;c--){s=a[c],ile(e,p,g,s);let x=m.getById(s.id);l(x)||(x=u.getById(s.id),l(x)?Jz(x):(O5.id=s.id,x=new Ko(O5)),m.add(x)),x.merge(s)}e._collectionsCopy=t.slice(0),u.suspendEvents(),u.removeAll();let f=m.values;for(r=0;r=0;a--)c=i[a].getById(x),l(c)&&(l(d)||(d=r.getById(x),Jz(d)),d.merge(c));l(d)||r.removeById(x),d=void 0}let g=t.length;for(s=0;s=0;a--)c=i[a].getById(x),l(c)&&(l(d)||(d=r.getById(x),l(d)?Jz(d):(O5.id=x,d=new Ko(O5),r.add(d))),d.merge(c));d=void 0}r.resumeEvents()};Gr.prototype._onDefinitionChanged=function(e,t,n,i){let o=this._collections,r=this._composite,s=o.length,a=e.id,c=r.getById(a),d=c[t],u=!l(d),m=!0;for(let p=s-1;p>=0;p--){let g=o[p].getById(e.id);if(l(g)){let f=g[t];if(l(f)){if(m)if(m=!1,l(f.merge)&&l(f.clone))d=f.clone(d);else{d=f;break}d.merge(f)}}}u&&c.propertyNames.indexOf(t)===-1&&c.addProperty(t),c[t]=d};var Qz=Gr;var uUn=T(S(),1);var rUn=T(S(),1);var Ukn=T(S(),1);function jz(){this._removalFunctions=[]}jz.prototype.add=function(e,t,n){let i=e.addEventListener(t,n);this._removalFunctions.push(i);let o=this;return function(){i();let r=o._removalFunctions;r.splice(r.indexOf(i),1)}};jz.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))};Xr.prototype.findIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t]:void 0};Xr.prototype.findDataForIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0};Xr.prototype.contains=function(e){return this.indexOf(e)>=0};var qz=new Sn;Xr.prototype.indexOf=function(e){let t=this._intervals;qz.start=e,qz.stop=e;let n=Ro(t,qz,eK);return n>=0?t[n].isStartIncluded?n:n>0&&t[n-1].stop.equals(e)&&t[n-1].isStopIncluded?n-1:~n:(n=~n,n>0&&n-10&&e.isStartIncluded&&n[i-1].isStartIncluded&&n[i-1].start.equals(e.start)?--i:i0&&(o=te.compare(n[i-1].stop,e.start),(o>0||o===0&&(n[i-1].isStopIncluded||e.isStartIncluded))&&((l(t)?t(n[i-1].data,e.data):n[i-1].data===e.data)?(te.greaterThan(e.stop,n[i-1].stop)?e=new Sn({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):e=new Sn({start:n[i-1].start,stop:n[i-1].stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:n[i-1].isStopIncluded||e.stop.equals(n[i-1].stop)&&e.isStopIncluded,data:e.data}),n.splice(i-1,1),--i):(o=te.compare(n[i-1].stop,e.stop),(o>0||o===0&&n[i-1].isStopIncluded&&!e.isStopIncluded)&&n.splice(i,0,new Sn({start:e.stop,stop:n[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i-1].isStopIncluded,data:n[i-1].data})),n[i-1]=new Sn({start:n[i-1].start,stop:e.start,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:n[i-1].data}))));i0||o===0&&(e.isStopIncluded||n[i].isStartIncluded));)if(l(t)?t(n[i].data,e.data):n[i].data===e.data)e=new Sn({start:e.start,stop:te.greaterThan(n[i].stop,e.stop)?n[i].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:te.greaterThan(n[i].stop,e.stop)?n[i].isStopIncluded:e.isStopIncluded,data:e.data}),n.splice(i,1);else if(n[i]=new Sn({start:e.stop,stop:n[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i].isStopIncluded,data:n[i].data}),n[i].isEmpty)n.splice(i,1);else break;n.splice(i,0,e),this._changedEvent.raiseEvent(this)};Xr.prototype.removeInterval=function(e){if(e.isEmpty)return!1;let t=this._intervals,n=Ro(t,e,eK);n<0&&(n=~n);let i=!1;for(n>0&&(te.greaterThan(t[n-1].stop,e.start)||t[n-1].stop.equals(e.start)&&t[n-1].isStopIncluded&&e.isStartIncluded)&&(i=!0,(te.greaterThan(t[n-1].stop,e.stop)||t[n-1].isStopIncluded&&!e.isStopIncluded&&t[n-1].stop.equals(e.stop))&&t.splice(n,0,new Sn({start:e.stop,stop:t[n-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n-1].isStopIncluded,data:t[n-1].data})),t[n-1]=new Sn({start:t[n-1].start,stop:e.start,isStartIncluded:t[n-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[n-1].data})),n=1e3&&(o+=Math.floor(i/1e3),i=i%1e3),o>=60&&(r+=Math.floor(o/60),o=o%60),r>=60&&(s+=Math.floor(r/60),r=r%60),s>=24&&(a+=Math.floor(s/24),s=s%24),M2[2]=um(d)?29:28;a>M2[c]||c>=13;)a>M2[c]&&(a-=M2[c],++c),c>=13&&(--c,d+=Math.floor(c/12),c=c%12,++c),M2[2]=um(d)?29:28;return dc.millisecond=i,dc.second=o,dc.minute=r,dc.hour=s,dc.day=a,dc.month=c,dc.year=d,te.fromGregorianDate(dc,n)}var WKe=new te,PKe=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function sle(e,t){if(!l(e)||e.length===0)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,e[0]==="P"){let n=e.match(PKe);if(!l(n))return!1;if(l(n[1])&&(t.year=Number(n[1].replace(",","."))),l(n[2])&&(t.month=Number(n[2].replace(",","."))),l(n[3])&&(t.day=Number(n[3].replace(",","."))*7),l(n[4])&&(t.day+=Number(n[4].replace(",","."))),l(n[5])&&(t.hour=Number(n[5].replace(",","."))),l(n[6])&&(t.minute=Number(n[6].replace(",","."))),l(n[7])){let i=Number(n[7].replace(",","."));t.second=Math.floor(i),t.millisecond=i%1*1e3}}else e[e.length-1]!=="Z"&&(e+="Z"),te.toGregorianDate(te.fromIso8601(e,WKe),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var N2=new op;Xr.fromIso8601=function(e,t){let n=e.iso8601.split("/"),i=te.fromIso8601(n[0]),o=te.fromIso8601(n[1]),r=[];if(!sle(n[2],N2))r.push(i,o);else{let s=te.clone(i);for(r.push(s);te.compare(s,o)<0;)s=$z(s,N2),te.compare(o,s)<=0&&te.clone(o,s),r.push(s)}return Xr.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Xr.fromIso8601DateArray=function(e,t){return Xr.fromJulianDateArray({julianDates:e.iso8601Dates.map(function(n){return te.fromIso8601(n)}),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Xr.fromIso8601DurationArray=function(e,t){let n=e.epoch,i=e.iso8601Durations,o=y(e.relativeToPrevious,!1),r=[],s,a,c=i.length;for(let d=0;d=0?-a:a}var zKe=new h(-1,0,0),P_=new M,KKe=new M,iK=new $,JKe=$.IDENTITY.clone(),QKe=new h,jKe=new se,ale=new h;function y0(e,t,n,i,o,r,s,a){let c=QKe,d=jKe;P_=Gt.eastNorthUpToFixedFrame(e,o,P_),c=M.multiplyByPointAsVector(P_,zKe,c),c=h.normalize(c,c);let u=HKe(c,t,e,o);iK=$.fromRotationZ(u,iK),ale.z=r,P_=M.multiplyTransformation(P_,M.fromRotationTranslation(iK,ale,KKe),P_);let m=JKe;m[0]=s;for(let p=0;p0){let x=d?2:1;for(let _=0;_=0};var eJe=new h,tJe=new h;k2.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,s=OKe(e,r),a=i._granularity,c=i._cornerType,d=o?$Ke(t,n):cle(t,n),u=o?cle(t,n):void 0,m=n.height/2,p=n.width/2,g=e.length,f=[],x=o?[]:void 0,_=FKe,C=AKe,V=MKe,L=NKe,Z=kKe,G=UKe,X=DKe,v=BKe,P=YKe,F=e[0],A=e[1];L=r.geodeticSurfaceNormal(F,L),_=h.subtract(A,F,_),_=h.normalize(_,_),v=h.cross(L,_,v),v=h.normalize(v,v);let b=s[0],R=s[1];o&&(x=y0(F,v,u,x,r,b+m,1,1)),P=h.clone(F,P),F=A,C=h.negate(_,C);let E,I;for(let B=1;BLe;p--)Se=W.PI_OVER_TWO-p*ye,q[ae++]=1-be*(1+Math.cos(Se)),q[ae++]=.5*(1+Math.sin(Se));for(p=Le;p>0;p--)Se=W.PI_OVER_TWO-ye*p,q[ae++]=1-Te*(1+Math.cos(Se)),q[ae++]=.5*(1+Math.sin(Se));for(p=u-_;p>0;p--)q[ae++]=p*Te,q[ae++]=1;for(p=1;p0;p--)q[ae++]=(p-1)*Te,q[ae++]=1}c.st=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:q})}return t.normal&&(c.normal=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:X.normals})),t.tangent&&(c.tangent=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:X.tangents})),t.bitangent&&(c.bitangent=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:X.bitangents})),{attributes:c,indices:U}}function fJe(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);let r=e.position.values.length/18,s=r*3,a=r*2,c=s*2,d;if(t.normal||t.bitangent||t.tangent){let u=t.normal?new Float32Array(s*6):void 0,m=t.tangent?new Float32Array(s*6):void 0,p=t.bitangent?new Float32Array(s*6):void 0,g=Cle,f=Vle,x=j5,_=q5,C=hJe,V=Lle,L=c;for(d=0;d-t?(o=TJe,o.x=this._cameraPosition.x/(n.radii.x+t),o.y=this._cameraPosition.y/(n.radii.y+t),o.z=this._cameraPosition.z/(n.radii.z+t),i=o.x*o.x+o.y*o.y+o.z*o.z-1):(o=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),lK(e,o,i)};bf.prototype.computeHorizonCullingPoint=function(e,t,n){return Dle(this._ellipsoid,e,t,n)};var kle=ie.clone(ie.UNIT_SPHERE);bf.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let o=Ule(this._ellipsoid,n,kle);return Dle(o,e,t,i)};bf.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return Ble(this._ellipsoid,e,t,n,i,o)};bf.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){let s=Ule(this._ellipsoid,o,kle);return Ble(s,e,t,n,i,r)};var SJe=[];bf.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){let i=ce.subsample(e,t,0,SJe),o=le.fromPoints(i);if(!(h.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};var CJe=new h;function Ule(e,t,n){if(l(t)&&t<0&&e.minimumRadius>-t){let i=h.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,CJe);e=ie.fromCartesian3(i,n)}return e}function Dle(e,t,n,i){l(i)||(i=new h);let o=Hle(e,t),r=0;for(let s=0,a=n.length;s0:s>o&&s*s/h.magnitudeSquared(r)>o)}var VJe=new h,LJe=new h;function Yle(e,t,n){let i=e.transformPositionToScaledSpace(t,VJe),o=h.magnitudeSquared(i),r=Math.sqrt(o),s=h.divideByScalar(i,r,LJe);o=Math.max(1,o),r=Math.max(1,r);let a=h.dot(s,n),c=h.magnitude(h.cross(s,n,s)),d=1/r,u=Math.sqrt(o-1)*d;return 1/(a*d-c*u)}function Ole(e,t,n){if(!(t<=0||t===1/0||t!==t))return h.multiplyByScalar(e,t,n)}var cK=new h;function Hle(e,t){return h.equals(t,h.ZERO)?t:(e.transformPositionToScaledSpace(t,cK),h.normalize(cK,cK))}var T0=bf;var k3n=T(S(),1);function Pr(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.translucencyByDistance,i=e.scaleByDistance,o=e.distanceDisplayCondition;l(n)&&(n=Ft.clone(n)),l(i)&&(i=Ft.clone(i)),l(o)&&(o=Wt.clone(o)),this._show=y(e.show,!0),this._position=h.clone(y(e.position,h.ZERO)),this._actualPosition=h.clone(this._position),this._color=Y.clone(y(e.color,Y.WHITE)),this._outlineColor=Y.clone(y(e.outlineColor,Y.TRANSPARENT)),this._outlineWidth=y(e.outlineWidth,0),this._pixelSize=y(e.pixelSize,10),this._scaleByDistance=i,this._translucencyByDistance=n,this._distanceDisplayCondition=o,this._disableDepthTestDistance=y(e.disableDepthTestDistance,0),this._id=e.id,this._collection=y(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}var zle=Pr.SHOW_INDEX=0,Qle=Pr.POSITION_INDEX=1,RJe=Pr.COLOR_INDEX=2,ZJe=Pr.OUTLINE_COLOR_INDEX=3,GJe=Pr.OUTLINE_WIDTH_INDEX=4,EJe=Pr.PIXEL_SIZE_INDEX=5,XJe=Pr.SCALE_BY_DISTANCE_INDEX=6,IJe=Pr.TRANSLUCENCY_BY_DISTANCE_INDEX=7,WJe=Pr.DISTANCE_DISPLAY_CONDITION_INDEX=8,PJe=Pr.DISABLE_DEPTH_DISTANCE_INDEX=9;Pr.NUMBER_OF_PROPERTIES=10;function Fu(e,t){let n=e._pointPrimitiveCollection;l(n)&&(n._updatePointPrimitive(e,t),e._dirty=!0)}Object.defineProperties(Pr.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,Fu(this,zle))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),h.clone(e,this._actualPosition),Fu(this,Qle))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;Ft.equals(t,e)||(this._scaleByDistance=Ft.clone(e,t),Fu(this,XJe))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;Ft.equals(t,e)||(this._translucencyByDistance=Ft.clone(e,t),Fu(this,IJe))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){this._pixelSize!==e&&(this._pixelSize=e,Fu(this,EJe))}},color:{get:function(){return this._color},set:function(e){let t=this._color;Y.equals(t,e)||(Y.clone(e,t),Fu(this,RJe))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;Y.equals(t,e)||(Y.clone(e,t),Fu(this,ZJe))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Fu(this,GJe))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){Wt.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=Wt.clone(e,this._distanceDisplayCondition),Fu(this,WJe))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Fu(this,PJe))}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,Fu(this,zle))}}});Pr.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId};Pr.prototype._getActualPosition=function(){return this._actualPosition};Pr.prototype._setActualPosition=function(e){h.clone(e,this._actualPosition),Fu(this,Qle)};var Kle=new se;Pr._computeActualPosition=function(e,t,n){return t.mode===oe.SCENE3D?e:(M.multiplyByPoint(n,e,Kle),ki.computeActualWgs84Position(t,Kle))};var Jle=new se;Pr._computeScreenSpacePosition=function(e,t,n,i){let o=M.multiplyByVector(e,se.fromElements(t.x,t.y,t.z,1,Jle),Jle);return ki.wgs84ToWindowCoordinates(n,o,i)};Pr.prototype.computeScreenSpacePosition=function(e,t){let n=this._pointPrimitiveCollection;l(t)||(t=new D);let i=n.modelMatrix,o=Pr._computeScreenSpacePosition(i,this._actualPosition,e,t);if(l(o))return o.y=e.canvas.clientHeight-o.y,o};Pr.getScreenSpaceBoundingBox=function(e,t,n){let i=e.pixelSize,o=i*.5,r=t.x-o,s=t.y-o,a=i,c=i;return l(n)||(n=new He),n.x=r,n.y=s,n.width=a,n.height=c,n};Pr.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&h.equals(this._position,e._position)&&Y.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&Y.equals(this._outlineColor,e._outlineColor)&&Ft.equals(this._scaleByDistance,e._scaleByDistance)&&Ft.equals(this._translucencyByDistance,e._translucencyByDistance)&&Wt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance};Pr.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var ks=Pr;var gBn=T(S(),1);var D3n=T(S(),1),Pg=`in vec4 v_color; +Url: ${e._contentHeader.uri}`,o++;let r={text:i.substring(1),position:n,font:`${19-o}px sans-serif`,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(r)}function uHe(e,t){let n=e._selectedTiles,i=n.length,o=e._emptyTiles,r=o.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(l(e.debugPickedTile)){let s=l(e.debugPickPosition)?e.debugPickPosition:zK(e.debugPickedTile),a=KK(e.debugPickedTile,e,s);a.pixelOffset=new D(15,-15)}}else{for(let s=0;s0;e._backfaceCommands.length=0,a&&(l(e._stencilClearCommand)||(e._stencilClearCommand=new ii({stencil:0,pass:Le.CESIUM_3D_TILE,renderState:De.fromCache({stencilMask:Nt.SKIP_LOD_MASK})})),i.push(e._stencilClearCommand));let{statistics:c,tileVisible:d}=e,u=n.isRender,m=i.length;for(let f=0;f=0;--_)i[m+x+_]=i[m+_];for(let _=0;_0&&e._pointCloudEyeDomeLighting.update(t,r,e.pointCloudShading,e.boundingSphere),e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(l(e._tileDebugLabels)||(e._tileDebugLabels=new df),uHe(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var nle=[];function hHe(e,t){let n=t,i=nle;for(i.push(t);i.length>0;){t=i.pop();let o=t.children;for(let r=0;r{t.push(Vt.clone(i))});let n=e.asset.extras;if(l(n)&&l(n.cesium)&&l(n.cesium.credits)){let i=n.cesium.credits;for(let o=0;oi.showOnScreen=i.showOnScreen||e._showCreditsOnScreen),e._credits=t}qo.prototype.getTraversal=function(e){let{pass:t}=e;return t===Io.MOST_DETAILED_PRELOAD||t===Io.MOST_DETAILED_PICK?W2:this.isSkippingLevelOfDetail?F2:P2};qo.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)};qo.prototype.updateForPass=function(e,t){let n=t.pass;if(n===Io.PRELOAD&&(!this.preloadWhenHidden||this.show)||n===Io.PRELOAD_FLIGHT&&(!this.preloadFlightDestinations||!this.show&&!this.preloadWhenHidden)||n===Io.REQUEST_RENDER_MODE_DEFER_CHECK&&(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))return;let i=e.commandList,o=e.camera,r=e.cullingVolume;t.ready=!1;let s=Io.getPassOptions(n),a=s.ignoreCommands,c=y(t.commandList,i),d=c.length;e.commandList=c,e.camera=y(t.camera,o),e.cullingVolume=y(t.cullingVolume,r);let u=this._clippingPolygons;l(u)&&u.enabled&&u.queueCommands(e);let m=this._statisticsPerPass[n];(this.show||a)&&(this._pass=n,t.ready=yHe(this,e,m,s)),a&&(c.length=d),e.commandList=i,e.camera=o,e.cullingVolume=r};qo.prototype.hasExtension=function(e){return l(this._extensionsUsed)?this._extensionsUsed.indexOf(e)>-1:!1};qo.prototype.isDestroyed=function(){return!1};qo.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),l(this._root)){let e=nle;for(e.push(this._root);e.length>0;){let t=e.pop();t.destroy();let n=t.children;for(let i=0;i{let r=this._addHeightCallbacks,s=r.length;for(let a=0;a{let u=le.distanceSquaredTo(c.contentBoundingVolume.boundingSphere,e.origin),m=le.distanceSquaredTo(d.contentBoundingVolume.boundingSphere,e.origin);return u-m});let a;for(let c=0;c-1;i--)HK(this,e[i],t,n);return me(this)};Lg.prototype.getBoundingSphere=function(e,t){let n=this._tilesetHash[e.id];if(!l(n)||n.loadFail)return mt.FAILED;let i=n.tilesetPrimitive;return l(i)?i.show?(le.clone(i.boundingSphere,t),mt.DONE):mt.FAILED:mt.PENDING};Lg.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._entitiesToVisualize,a=this._tilesetHash,c=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],l(r._tileset)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],l(r._tileset)?s.set(r.id,r):(HK(this,r,a,c),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],HK(this,r,a,c),s.remove(r.id)};function HK(e,t,n,i){let o=n[t.id];l(o)&&(l(o.tilesetPrimitive)&&i.removeAndDestroy(o.tilesetPrimitive),delete n[t.id])}async function ZHe(e,t,n,i){t[n.id]={url:e.url,loadFail:!1};try{let o=await ra.fromUrl(e);if(o.id=n,i.add(o),!l(t[n.id]))return;t[n.id].tilesetPrimitive=o}catch(o){console.error(o),t[n.id].loadFail=!0}}var A2=Lg;var yUn=S(T(),1);var LHe=Y.WHITE,RHe=Y.BLACK,GHe=new D(2,2);function s1(e){e=y(e,y.EMPTY_OBJECT),this._definitionChanged=new ge,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(s1.prototype,{isConstant:{get:function(){return H.isConstant(this._evenColor)&&H.isConstant(this._oddColor)&&H.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:de("evenColor"),oddColor:de("oddColor"),repeat:de("repeat")});s1.prototype.getType=function(e){return"Checkerboard"};s1.prototype.getValue=function(e,t){return l(t)||(t={}),t.lightColor=H.getValueOrClonedDefault(this._evenColor,e,LHe,t.lightColor),t.darkColor=H.getValueOrClonedDefault(this._oddColor,e,RHe,t.darkColor),t.repeat=H.getValueOrDefault(this._repeat,e,GHe),t};s1.prototype.equals=function(e){return this===e||e instanceof s1&&H.equals(this._evenColor,e._evenColor)&&H.equals(this._oddColor,e._oddColor)&&H.equals(this._repeat,e._repeat)};var a1=s1;var FUn=S(T(),1);var EUn=S(T(),1);var rle={id:void 0};function M2(e){if(e._firing){e._refire=!0;return}if(e._suspendCount===0){let t=e._addedEntities,n=e._removedEntities,i=e._changedEntities;if(i.length!==0||t.length!==0||n.length!==0){e._firing=!0;do{e._refire=!1;let o=t.values.slice(0),r=n.values.slice(0),s=i.values.slice(0);t.removeAll(),n.removeAll(),i.removeAll(),e._collectionChanged.raiseEvent(e,o,r,s)}while(e._refire);e._firing=!1}}}function dc(e){this._owner=e,this._entities=new Ct,this._addedEntities=new Ct,this._removedEntities=new Ct,this._changedEntities=new Ct,this._suspendCount=0,this._collectionChanged=new ge,this._id=Bn(),this._show=!0,this._firing=!1,this._refire=!1}dc.prototype.suspendEvents=function(){this._suspendCount++};dc.prototype.resumeEvents=function(){this._suspendCount--,M2(this)};Object.defineProperties(dc.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(e===this._show)return;this.suspendEvents();let t,n=[],i=this._entities.values,o=i.length;for(t=0;t-1;c--)s=a[c],ale(e,p,g,s);for(r=n-1;r>=0;r--)for(d=t[r],d.collectionChanged.addEventListener(Er.prototype._onCollectionChanged,e),a=d.values,g=d.id,c=a.length-1;c>-1;c--){s=a[c],sle(e,p,g,s);let x=m.getById(s.id);l(x)||(x=u.getById(s.id),l(x)?JK(x):(z5.id=s.id,x=new Jo(z5)),m.add(x)),x.merge(s)}e._collectionsCopy=t.slice(0),u.suspendEvents(),u.removeAll();let f=m.values;for(r=0;r=0;a--)c=i[a].getById(x),l(c)&&(l(d)||(d=r.getById(x),JK(d)),d.merge(c));l(d)||r.removeById(x),d=void 0}let g=t.length;for(s=0;s=0;a--)c=i[a].getById(x),l(c)&&(l(d)||(d=r.getById(x),l(d)?JK(d):(z5.id=x,d=new Jo(z5),r.add(d))),d.merge(c));d=void 0}r.resumeEvents()};Er.prototype._onDefinitionChanged=function(e,t,n,i){let o=this._collections,r=this._composite,s=o.length,a=e.id,c=r.getById(a),d=c[t],u=!l(d),m=!0;for(let p=s-1;p>=0;p--){let g=o[p].getById(e.id);if(l(g)){let f=g[t];if(l(f)){if(m)if(m=!1,l(f.merge)&&l(f.clone))d=f.clone(d);else{d=f;break}d.merge(f)}}}u&&c.propertyNames.indexOf(t)===-1&&c.addProperty(t),c[t]=d};var QK=Er;var ckn=S(T(),1);var nkn=S(T(),1);var MUn=S(T(),1);function jK(){this._removalFunctions=[]}jK.prototype.add=function(e,t,n){let i=e.addEventListener(t,n);this._removalFunctions.push(i);let o=this;return function(){i();let r=o._removalFunctions;r.splice(r.indexOf(i),1)}};jK.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))};Ir.prototype.findIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t]:void 0};Ir.prototype.findDataForIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0};Ir.prototype.contains=function(e){return this.indexOf(e)>=0};var qK=new Tn;Ir.prototype.indexOf=function(e){let t=this._intervals;qK.start=e,qK.stop=e;let n=Lo(t,qK,eH);return n>=0?t[n].isStartIncluded?n:n>0&&t[n-1].stop.equals(e)&&t[n-1].isStopIncluded?n-1:~n:(n=~n,n>0&&n-10&&e.isStartIncluded&&n[i-1].isStartIncluded&&n[i-1].start.equals(e.start)?--i:i0&&(o=ne.compare(n[i-1].stop,e.start),(o>0||o===0&&(n[i-1].isStopIncluded||e.isStartIncluded))&&((l(t)?t(n[i-1].data,e.data):n[i-1].data===e.data)?(ne.greaterThan(e.stop,n[i-1].stop)?e=new Tn({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):e=new Tn({start:n[i-1].start,stop:n[i-1].stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:n[i-1].isStopIncluded||e.stop.equals(n[i-1].stop)&&e.isStopIncluded,data:e.data}),n.splice(i-1,1),--i):(o=ne.compare(n[i-1].stop,e.stop),(o>0||o===0&&n[i-1].isStopIncluded&&!e.isStopIncluded)&&n.splice(i,0,new Tn({start:e.stop,stop:n[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i-1].isStopIncluded,data:n[i-1].data})),n[i-1]=new Tn({start:n[i-1].start,stop:e.start,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:n[i-1].data}))));i0||o===0&&(e.isStopIncluded||n[i].isStartIncluded));)if(l(t)?t(n[i].data,e.data):n[i].data===e.data)e=new Tn({start:e.start,stop:ne.greaterThan(n[i].stop,e.stop)?n[i].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:ne.greaterThan(n[i].stop,e.stop)?n[i].isStopIncluded:e.isStopIncluded,data:e.data}),n.splice(i,1);else if(n[i]=new Tn({start:e.stop,stop:n[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i].isStopIncluded,data:n[i].data}),n[i].isEmpty)n.splice(i,1);else break;n.splice(i,0,e),this._changedEvent.raiseEvent(this)};Ir.prototype.removeInterval=function(e){if(e.isEmpty)return!1;let t=this._intervals,n=Lo(t,e,eH);n<0&&(n=~n);let i=!1;for(n>0&&(ne.greaterThan(t[n-1].stop,e.start)||t[n-1].stop.equals(e.start)&&t[n-1].isStopIncluded&&e.isStartIncluded)&&(i=!0,(ne.greaterThan(t[n-1].stop,e.stop)||t[n-1].isStopIncluded&&!e.isStopIncluded&&t[n-1].stop.equals(e.stop))&&t.splice(n,0,new Tn({start:e.stop,stop:t[n-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n-1].isStopIncluded,data:t[n-1].data})),t[n-1]=new Tn({start:t[n-1].start,stop:e.start,isStartIncluded:t[n-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[n-1].data})),n=1e3&&(o+=Math.floor(i/1e3),i=i%1e3),o>=60&&(r+=Math.floor(o/60),o=o%60),r>=60&&(s+=Math.floor(r/60),r=r%60),s>=24&&(a+=Math.floor(s/24),s=s%24),N2[2]=dm(d)?29:28;a>N2[c]||c>=13;)a>N2[c]&&(a-=N2[c],++c),c>=13&&(--c,d+=Math.floor(c/12),c=c%12,++c),N2[2]=dm(d)?29:28;return uc.millisecond=i,uc.second=o,uc.minute=r,uc.hour=s,uc.day=a,uc.month=c,uc.year=d,ne.fromGregorianDate(uc,n)}var EHe=new ne,WHe=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function lle(e,t){if(!l(e)||e.length===0)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,e[0]==="P"){let n=e.match(WHe);if(!l(n))return!1;if(l(n[1])&&(t.year=Number(n[1].replace(",","."))),l(n[2])&&(t.month=Number(n[2].replace(",","."))),l(n[3])&&(t.day=Number(n[3].replace(",","."))*7),l(n[4])&&(t.day+=Number(n[4].replace(",","."))),l(n[5])&&(t.hour=Number(n[5].replace(",","."))),l(n[6])&&(t.minute=Number(n[6].replace(",","."))),l(n[7])){let i=Number(n[7].replace(",","."));t.second=Math.floor(i),t.millisecond=i%1*1e3}}else e[e.length-1]!=="Z"&&(e+="Z"),ne.toGregorianDate(ne.fromIso8601(e,EHe),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var U2=new ip;Ir.fromIso8601=function(e,t){let n=e.iso8601.split("/"),i=ne.fromIso8601(n[0]),o=ne.fromIso8601(n[1]),r=[];if(!lle(n[2],U2))r.push(i,o);else{let s=ne.clone(i);for(r.push(s);ne.compare(s,o)<0;)s=$K(s,U2),ne.compare(o,s)<=0&&ne.clone(o,s),r.push(s)}return Ir.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Ir.fromIso8601DateArray=function(e,t){return Ir.fromJulianDateArray({julianDates:e.iso8601Dates.map(function(n){return ne.fromIso8601(n)}),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Ir.fromIso8601DurationArray=function(e,t){let n=e.epoch,i=e.iso8601Durations,o=y(e.relativeToPrevious,!1),r=[],s,a,c=i.length;for(let d=0;d=0?-a:a}var YHe=new h(-1,0,0),X_=new A,OHe=new A,iH=new $,zHe=$.IDENTITY.clone(),KHe=new h,HHe=new se,dle=new h;function gb(e,t,n,i,o,r,s,a){let c=KHe,d=HHe;X_=Gt.eastNorthUpToFixedFrame(e,o,X_),c=A.multiplyByPointAsVector(X_,YHe,c),c=h.normalize(c,c);let u=BHe(c,t,e,o);iH=$.fromRotationZ(u,iH),dle.z=r,X_=A.multiplyTransformation(X_,A.fromRotationTranslation(iH,dle,OHe),X_);let m=zHe;m[0]=s;for(let p=0;p0){let x=d?2:1;for(let _=0;_=0};var jHe=new h,qHe=new h;k2.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,s=DHe(e,r),a=i._granularity,c=i._cornerType,d=o?QHe(t,n):ule(t,n),u=o?ule(t,n):void 0,m=n.height/2,p=n.width/2,g=e.length,f=[],x=o?[]:void 0,_=PHe,C=vHe,V=wHe,Z=FHe,R=AHe,G=MHe,W=NHe,v=UHe,P=kHe,F=e[0],M=e[1];Z=r.geodeticSurfaceNormal(F,Z),_=h.subtract(M,F,_),_=h.normalize(_,_),v=h.cross(Z,_,v),v=h.normalize(v,v);let b=s[0],L=s[1];o&&(x=gb(F,v,u,x,r,b+m,1,1)),P=h.clone(F,P),F=M,C=h.negate(_,C);let E,I;for(let B=1;BZe;p--)Te=X.PI_OVER_TWO-p*ye,q[ae++]=1-be*(1+Math.cos(Te)),q[ae++]=.5*(1+Math.sin(Te));for(p=Ze;p>0;p--)Te=X.PI_OVER_TWO-ye*p,q[ae++]=1-Se*(1+Math.cos(Te)),q[ae++]=.5*(1+Math.sin(Te));for(p=u-_;p>0;p--)q[ae++]=p*Se,q[ae++]=1;for(p=1;p0;p--)q[ae++]=(p-1)*Se,q[ae++]=1}c.st=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:q})}return t.normal&&(c.normal=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:W.normals})),t.tangent&&(c.tangent=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:W.tangents})),t.bitangent&&(c.bitangent=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:W.bitangents})),{attributes:c,indices:k}}function uJe(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);let r=e.position.values.length/18,s=r*3,a=r*2,c=s*2,d;if(t.normal||t.bitangent||t.tangent){let u=t.normal?new Float32Array(s*6):void 0,m=t.tangent?new Float32Array(s*6):void 0,p=t.bitangent?new Float32Array(s*6):void 0,g=Lle,f=Rle,x=q5,_=$5,C=dJe,V=Gle,Z=c;for(d=0;d-t?(o=yJe,o.x=this._cameraPosition.x/(n.radii.x+t),o.y=this._cameraPosition.y/(n.radii.y+t),o.z=this._cameraPosition.z/(n.radii.z+t),i=o.x*o.x+o.y*o.y+o.z*o.z-1):(o=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),lH(e,o,i)};pf.prototype.computeHorizonCullingPoint=function(e,t,n){return Ole(this._ellipsoid,e,t,n)};var Ble=te.clone(te.UNIT_SPHERE);pf.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let o=Yle(this._ellipsoid,n,Ble);return Ole(o,e,t,i)};pf.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return zle(this._ellipsoid,e,t,n,i,o)};pf.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){let s=Yle(this._ellipsoid,o,Ble);return zle(s,e,t,n,i,r)};var xJe=[];pf.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){let i=ce.subsample(e,t,0,xJe),o=le.fromPoints(i);if(!(h.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};var _Je=new h;function Yle(e,t,n){if(l(t)&&t<0&&e.minimumRadius>-t){let i=h.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,_Je);e=te.fromCartesian3(i,n)}return e}function Ole(e,t,n,i){l(i)||(i=new h);let o=Jle(e,t),r=0;for(let s=0,a=n.length;s0:s>o&&s*s/h.magnitudeSquared(r)>o)}var SJe=new h,TJe=new h;function Kle(e,t,n){let i=e.transformPositionToScaledSpace(t,SJe),o=h.magnitudeSquared(i),r=Math.sqrt(o),s=h.divideByScalar(i,r,TJe);o=Math.max(1,o),r=Math.max(1,r);let a=h.dot(s,n),c=h.magnitude(h.cross(s,n,s)),d=1/r,u=Math.sqrt(o-1)*d;return 1/(a*d-c*u)}function Hle(e,t,n){if(!(t<=0||t===1/0||t!==t))return h.multiplyByScalar(e,t,n)}var cH=new h;function Jle(e,t){return h.equals(t,h.ZERO)?t:(e.transformPositionToScaledSpace(t,cH),h.normalize(cH,cH))}var _b=pf;var ABn=S(T(),1);function vr(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.translucencyByDistance,i=e.scaleByDistance,o=e.distanceDisplayCondition;l(n)&&(n=Ft.clone(n)),l(i)&&(i=Ft.clone(i)),l(o)&&(o=Xt.clone(o)),this._show=y(e.show,!0),this._position=h.clone(y(e.position,h.ZERO)),this._actualPosition=h.clone(this._position),this._color=Y.clone(y(e.color,Y.WHITE)),this._outlineColor=Y.clone(y(e.outlineColor,Y.TRANSPARENT)),this._outlineWidth=y(e.outlineWidth,0),this._pixelSize=y(e.pixelSize,10),this._scaleByDistance=i,this._translucencyByDistance=n,this._distanceDisplayCondition=o,this._disableDepthTestDistance=y(e.disableDepthTestDistance,0),this._id=e.id,this._collection=y(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}var Qle=vr.SHOW_INDEX=0,$le=vr.POSITION_INDEX=1,CJe=vr.COLOR_INDEX=2,VJe=vr.OUTLINE_COLOR_INDEX=3,ZJe=vr.OUTLINE_WIDTH_INDEX=4,LJe=vr.PIXEL_SIZE_INDEX=5,RJe=vr.SCALE_BY_DISTANCE_INDEX=6,GJe=vr.TRANSLUCENCY_BY_DISTANCE_INDEX=7,EJe=vr.DISTANCE_DISPLAY_CONDITION_INDEX=8,WJe=vr.DISABLE_DEPTH_DISTANCE_INDEX=9;vr.NUMBER_OF_PROPERTIES=10;function wu(e,t){let n=e._pointPrimitiveCollection;l(n)&&(n._updatePointPrimitive(e,t),e._dirty=!0)}Object.defineProperties(vr.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,wu(this,Qle))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),h.clone(e,this._actualPosition),wu(this,$le))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;Ft.equals(t,e)||(this._scaleByDistance=Ft.clone(e,t),wu(this,RJe))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;Ft.equals(t,e)||(this._translucencyByDistance=Ft.clone(e,t),wu(this,GJe))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){this._pixelSize!==e&&(this._pixelSize=e,wu(this,LJe))}},color:{get:function(){return this._color},set:function(e){let t=this._color;Y.equals(t,e)||(Y.clone(e,t),wu(this,CJe))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;Y.equals(t,e)||(Y.clone(e,t),wu(this,VJe))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,wu(this,ZJe))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){Xt.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=Xt.clone(e,this._distanceDisplayCondition),wu(this,EJe))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,wu(this,WJe))}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,wu(this,Qle))}}});vr.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId};vr.prototype._getActualPosition=function(){return this._actualPosition};vr.prototype._setActualPosition=function(e){h.clone(e,this._actualPosition),wu(this,$le)};var jle=new se;vr._computeActualPosition=function(e,t,n){return t.mode===oe.SCENE3D?e:(A.multiplyByPoint(n,e,jle),ki.computeActualEllipsoidPosition(t,jle))};var qle=new se;vr._computeScreenSpacePosition=function(e,t,n,i){let o=A.multiplyByVector(e,se.fromElements(t.x,t.y,t.z,1,qle),qle);return ki.worldToWindowCoordinates(n,o,i)};vr.prototype.computeScreenSpacePosition=function(e,t){let n=this._pointPrimitiveCollection;l(t)||(t=new D);let i=n.modelMatrix,o=vr._computeScreenSpacePosition(i,this._actualPosition,e,t);if(l(o))return o.y=e.canvas.clientHeight-o.y,o};vr.getScreenSpaceBoundingBox=function(e,t,n){let i=e.pixelSize,o=i*.5,r=t.x-o,s=t.y-o,a=i,c=i;return l(n)||(n=new ze),n.x=r,n.y=s,n.width=a,n.height=c,n};vr.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&h.equals(this._position,e._position)&&Y.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&Y.equals(this._outlineColor,e._outlineColor)&&Ft.equals(this._scaleByDistance,e._scaleByDistance)&&Ft.equals(this._translucencyByDistance,e._translucencyByDistance)&&Xt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance};vr.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var ks=vr;var fYn=S(T(),1);var NBn=S(T(),1),Xg=`in vec4 v_color; in vec4 v_outlineColor; in float v_innerPercent; in float v_pixelDistance; @@ -9200,7 +9211,7 @@ void main() out_FragColor = czm_gammaCorrect(color); czm_writeLogDepth(); } -`;var Y3n=T(S(),1),H2=`uniform float u_maxTotalPointSize; +`;var kBn=S(T(),1),K2=`uniform float u_maxTotalPointSize; in vec4 positionHighAndSize; in vec4 positionLowAndOutline; @@ -9383,25 +9394,7 @@ void main() v_pickColor = pickColor; } -`;var vJe=ks.SHOW_INDEX,mK=ks.POSITION_INDEX,jle=ks.COLOR_INDEX,wJe=ks.OUTLINE_COLOR_INDEX,FJe=ks.OUTLINE_WIDTH_INDEX,AJe=ks.PIXEL_SIZE_INDEX,qle=ks.SCALE_BY_DISTANCE_INDEX,$le=ks.TRANSLUCENCY_BY_DISTANCE_INDEX,ede=ks.DISTANCE_DISPLAY_CONDITION_INDEX,MJe=ks.DISABLE_DEPTH_DISTANCE_INDEX,hK=ks.NUMBER_OF_PROPERTIES,mc={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepth:5};function Au(e){e=y(e,y.EMPTY_OBJECT),this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(hK),this._maxPixelSize=1,this._baseVolume=new le,this._baseVolumeWC=new le,this._baseVolume2D=new le,this._boundingVolume=new le,this._boundingVolumeDirty=!1,this._colorCommands=[],this.show=y(e.show,!0),this.modelMatrix=M.clone(y(e.modelMatrix,M.IDENTITY)),this._modelMatrix=M.clone(M.IDENTITY),this.debugShowBoundingVolume=y(e.debugShowBoundingVolume,!1),this.blendOption=y(e.blendOption,To.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=oe.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW];let t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}Object.defineProperties(Au.prototype,{length:{get:function(){return fK(this),this._pointPrimitives.length}}});function tde(e){let t=e.length;for(let n=0;n0&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1)),r(o,s,a,d)}function kJe(e,t,n,i){nde(e,t,n,i),ide(e,t,n,i),ode(e,t,n,i),rde(e,t,n,i),sde(e,t,n,i)}function uK(e,t,n,i,o,r){let s;i.mode===oe.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let c=0;c0){this._vaf=NJe(c,n,this._buffersUsage),a=this._vaf.writers;for(let G=0;G0){let G=BJe;G.length=0,(r[mK]||r[FJe]||r[AJe])&&G.push(nde),(r[jle]||r[wJe])&&G.push(ide),(r[vJe]||r[$le])&&G.push(ode),r[qle]&&G.push(rde),(r[ede]||r[MJe])&&G.push(sde);let X=G.length;if(a=this._vaf.writers,o/n>.1){for(let v=0;vn*1.5&&(i.length=n),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,le.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let m,p=M.IDENTITY;e.mode===oe.SCENE3D?(p=this.modelMatrix,m=le.clone(this._baseVolumeWC,this._boundingVolume)):m=le.clone(this._baseVolume2D,this._boundingVolume),DJe(this,e,m);let g=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,g&&(this._blendOption===To.OPAQUE||this._blendOption===To.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=De.fromCache({depthTest:{enabled:!0,func:ne.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===To.TRANSLUCENT||this._blendOption===To.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=De.fromCache({depthTest:{enabled:!0,func:ne.LEQUAL},depthMask:!1,blending:un.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let f,x;(g||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(f=new Ye({sources:[H2]}),this._shaderScaleByDistance&&f.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&f.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&f.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&f.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===To.OPAQUE_AND_TRANSLUCENT&&(x=new Ye({defines:["OPAQUE"],sources:[Pg]}),this._sp=qt.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:f,fragmentShaderSource:x,attributeLocations:mc}),x=new Ye({defines:["TRANSLUCENT"],sources:[Pg]}),this._spTranslucent=qt.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:f,fragmentShaderSource:x,attributeLocations:mc})),this._blendOption===To.OPAQUE&&(x=new Ye({sources:[Pg]}),this._sp=qt.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:f,fragmentShaderSource:x,attributeLocations:mc})),this._blendOption===To.TRANSLUCENT&&(x=new Ye({sources:[Pg]}),this._spTranslucent=qt.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:f,fragmentShaderSource:x,attributeLocations:mc})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);let _,C,V,L,Z=e.commandList;if(d.render||u){let G=this._colorCommands,X=this._blendOption===To.OPAQUE,v=this._blendOption===To.OPAQUE_AND_TRANSLUCENT;_=this._vaf.va,C=_.length,G.length=C;let P=v?C*2:C;for(L=0;L>4;if(o!==pK)throw new Error(`Got v${o} data when expected v${pK}.`);let r=ade[i&15];if(!r)throw new Error("Unrecognized array type.");let[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new e(a,s,r,t)}constructor(t,n=64,i=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let r=ade.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-a%8)%8;if(r<0)throw new Error(`Unexpected typed array class: ${i}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,K2,t),this.coords=new this.ArrayType(this.data,K2+a+c,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(K2+s+a+c),this.ids=new this.IndexArrayType(this.data,K2,t),this.coords=new this.ArrayType(this.data,K2+a+c,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(pK<<4)+r]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=n,i}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return gK(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,i,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:r,coords:s,nodeSize:a}=this,c=[0,r.length-1,0],d=[];for(;c.length;){let u=c.pop()||0,m=c.pop()||0,p=c.pop()||0;if(m-p<=a){for(let _=p;_<=m;_++){let C=s[2*_],V=s[2*_+1];C>=t&&C<=i&&V>=n&&V<=o&&d.push(r[_])}continue}let g=p+m>>1,f=s[2*g],x=s[2*g+1];f>=t&&f<=i&&x>=n&&x<=o&&d.push(r[g]),(u===0?t<=f:n<=x)&&(c.push(p),c.push(g-1),c.push(1-u)),(u===0?i>=f:o>=x)&&(c.push(g+1),c.push(m),c.push(1-u))}return d}within(t,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:r,nodeSize:s}=this,a=[0,o.length-1,0],c=[],d=i*i;for(;a.length;){let u=a.pop()||0,m=a.pop()||0,p=a.pop()||0;if(m-p<=s){for(let _=p;_<=m;_++)cde(r[2*_],r[2*_+1],t,n)<=d&&c.push(o[_]);continue}let g=p+m>>1,f=r[2*g],x=r[2*g+1];cde(f,x,t,n)<=d&&c.push(o[g]),(u===0?t-i<=f:n-i<=x)&&(a.push(p),a.push(g-1),a.push(1-u)),(u===0?t+i>=f:n+i>=x)&&(a.push(g+1),a.push(m),a.push(1-u))}return c}};function gK(e,t,n,i,o,r){if(o-i<=n)return;let s=i+o>>1;lde(e,t,s,i,o,r),gK(e,t,n,i,s-1,1-r),gK(e,t,n,s+1,o,1-r)}function lde(e,t,n,i,o,r){for(;o>i;){if(o-i>600){let d=o-i+1,u=n-i+1,m=Math.log(d),p=.5*Math.exp(2*m/3),g=.5*Math.sqrt(m*p*(d-p)/d)*(u-d/2<0?-1:1),f=Math.max(i,Math.floor(n-u*p/d+g)),x=Math.min(o,Math.floor(n+(d-u)*p/d+g));lde(e,t,n,f,x,r)}let s=t[2*n+r],a=i,c=o;for(J2(e,t,i,n),t[2*o+r]>s&&J2(e,t,i,o);as;)c--}t[2*i+r]===s?J2(e,t,i,c):(c++,J2(e,t,c,o)),c<=n&&(i=c+1),n<=c&&(o=c-1)}}function J2(e,t,n,i){bK(e,n,i),bK(t,2*n,2*i),bK(t,2*n+1,2*i+1)}function bK(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function cde(e,t,n,i){let o=e-n,r=t-i;return o*o+r*r}function jm(e){e=y(e,y.EMPTY_OBJECT),this._enabled=y(e.enabled,!1),this._pixelRange=y(e.pixelRange,80),this._minimumClusterSize=y(e.minimumClusterSize,2),this._clusterBillboards=y(e.clusterBillboards,!0),this._clusterLabels=y(e.clusterLabels,!0),this._clusterPoints=y(e.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new ge,this.show=y(e.show,!0)}function dde(e,t){e.x-=t,e.y-=t,e.width+=t*2,e.height+=t*2}var YJe=new He;function ude(e,t,n,i,o){if(l(e._labelCollection)&&i._clusterLabels?o=_g.getScreenSpaceBoundingBox(e,t,o):l(e._billboardCollection)&&i._clusterBillboards?o=uo.getScreenSpaceBoundingBox(e,t,o):l(e._pointPrimitiveCollection)&&i._clusterPoints&&(o=ks.getScreenSpaceBoundingBox(e,t,o)),dde(o,n),i._clusterLabels&&!l(e._labelCollection)&&l(e.id)&&hde(i,e.id.id)&&l(e.id._label)){let r=i._collectionIndicesByEntity[e.id.id].labelIndex,s=i._labelCollection.get(r),a=_g.getScreenSpaceBoundingBox(s,t,YJe);dde(a,n),o=He.union(o,a,o)}return o}function OJe(e,t){if(e.clusterShow=!0,!l(e._labelCollection)&&l(e.id)&&hde(t,e.id.id)&&l(e.id._label)){let n=t._collectionIndicesByEntity[e.id.id].labelIndex,i=t._labelCollection.get(n);i.clusterShow=!0}}function mde(e,t,n,i){let o={billboard:i._clusterBillboardCollection.add(),label:i._clusterLabelCollection.add(),point:i._clusterPointCollection.add()};o.billboard.show=!1,o.point.show=!1,o.label.show=!0,o.label.text=t.toLocaleString(),o.label.id=n,o.billboard.position=o.label.position=o.point.position=e,i._clusterEvent.raiseEvent(n,o)}function hde(e,t){return l(e)&&l(e._collectionIndicesByEntity[t])&&l(e._collectionIndicesByEntity[t].labelIndex)}function yK(e,t,n,i,o){if(!l(e))return;let r=e.length;for(let s=0;s0){let w=new Q2(V.length,64,Uint32Array);for(let N=0;N=u)for(mde(N.position,R,b,e),p.push(N),Z=0;Z=u){let k=h.multiplyByScalar(O,1/R,O);for(mde(k,R,b,e),p.push({position:k,width:U.width,height:U.height,minimumWidth:X.width,minimumHeight:X.height}),Z=0;Z0?(a=d.shift(),c=r.get(a)):(c=r.add(),a=r.length-1),s[i]=a;let u=this;return Promise.resolve().then(function(){u._clusterDirty=!0}),c}}function TK(e,t){let n=e._collectionIndicesByEntity[t];!l(n.billboardIndex)&&!l(n.labelIndex)&&!l(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}jm.prototype.getLabel=_K("_labelCollection",uf,"_unusedLabelIndices","labelIndex");jm.prototype.removeLabel=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._labelCollection)||!l(t)||!l(t.labelIndex))return;let n=t.labelIndex;t.labelIndex=void 0,TK(this,e.id);let i=this._labelCollection.get(n);i.show=!1,i.text="",i.id=void 0,this._unusedLabelIndices.push(n),this._clusterDirty=!0};jm.prototype.getBillboard=_K("_billboardCollection",yd,"_unusedBillboardIndices","billboardIndex");jm.prototype.removeBillboard=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._billboardCollection)||!l(t)||!l(t.billboardIndex))return;let n=t.billboardIndex;t.billboardIndex=void 0,TK(this,e.id);let i=this._billboardCollection.get(n);i.id=void 0,i.show=!1,i.image=void 0,this._unusedBillboardIndices.push(n),this._clusterDirty=!0};jm.prototype.getPoint=_K("_pointCollection",p1,"_unusedPointIndices","pointIndex");jm.prototype.removePoint=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._pointCollection)||!l(t)||!l(t.pointIndex))return;let n=t.pointIndex;t.pointIndex=void 0,TK(this,e.id);let i=this._pointCollection.get(n);i.show=!1,i.id=void 0,this._unusedPointIndices.push(n),this._clusterDirty=!0};function xK(e){if(!l(e))return;let t=e.length;for(let n=0;n0&&this._labelCollection.get(0)._glyphs.length===0&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),l(this._billboardCollection)&&this._billboardCollection.length>0&&!l(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,QJe(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),l(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),l(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),l(this._clusterPointCollection)&&this._clusterPointCollection.update(e),l(this._labelCollection)&&this._labelCollection.update(e),l(this._billboardCollection)&&this._billboardCollection.update(e),l(this._pointCollection)&&this._pointCollection.update(e)};jm.prototype.destroy=function(){this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),l(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1};var Sd=jm;function SK(e){this._name=e,this._clock=void 0,this._changed=new ge,this._error=new ge,this._isLoading=!1,this._loading=new ge,this._entityCollection=new Ns(this),this._entityCluster=new Sd}Object.defineProperties(SK.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){Wr.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}}});SK.prototype.update=function(e){return!0};var j2=SK;var HYn=T(S(),1);var lYn=T(S(),1);var HBn=T(S(),1);var fde={};fde.computePositions=function(e,t,n,i,o){let r=e*.5,s=-r,a=i+i,c=o?2*a:a,d=new Float64Array(c*3),u,m=0,p=0,g=o?a*3:0,f=o?(a+i)*3:i*3;for(u=0;u0){let x=Math.min(r,o);d=Math.round(o/x),c+=x}let u=Me.createTypedArray(s,c*2),m=0,p;for(p=0;p0)for(p=0;p0){for(c=0;c=t;i--)e[i]=e[a--]}for(i=0;i=0||l(m)&&te.compare(u,m)>=0));){for(IK[p++]=u,r=r+1,s=0;s0&&(WK.length=g,Tde(n,d,WK),IK.length=p,Tde(t,c,IK))}else{for(s=0;so)return;if(this._backwardExtrapolationType===Vd.HOLD)return r.unpack(s,0,t)}if(a>=i){a=i-1;let Z=n[a];if(o=this._forwardExtrapolationDuration,this._forwardExtrapolationType===Vd.NONE||o!==0&&te.secondsDifference(e,Z)>o)return;if(this._forwardExtrapolationType===Vd.HOLD)return a=i-1,r.unpack(s,a*r.packedLength,t)}let c=this._xTable,d=this._yTable,u=this._interpolationAlgorithm,m=this._packedInterpolationLength,p=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;let Z=Math.min(u.getRequiredDataPoints(this._interpolationDegree,p),i);Z!==this._numberOfPoints&&(this._numberOfPoints=Z,c.length=Z,d.length=Z*m)}let g=this._numberOfPoints-1;if(g<1)return;let f=0,x=i-1;if(x-f+1>=g+1){let Z=a-(g/2|0)-1;Zx&&(G=x,Z=G-g,Z0){n=new Array(t);for(let i=0;ic&&e!==Object}let f=typeof e.unpack=="function"&&e!==Mu;if(!g&&!p){m?t[n]=new Jn(f?e.unpack(d,0):d):t[n]=Gde(e,s,i);return}let x=t[n],_,C=i.epoch;if(l(C)&&(_=te.fromIso8601(C)),g&&!p){x instanceof Rd||(t[n]=x=new Rd(e)),x.addSamplesPackedArray(d,_),rk(i,x);return}let V;if(!g&&p){a=a.clone(),m?a.data=f?e.unpack(d,0):d:a.data=Gde(e,s,i),l(x)||(t[n]=x=m?new G0:new uc),m&&x instanceof G0?x.intervals.addInterval(a):x instanceof uc?(m&&(a.data=new Jn(a.data)),x.intervals.addInterval(a)):(t[n]=x=vde(x),m&&(a.data=new Jn(a.data)),x.intervals.addInterval(a));return}l(x)||(t[n]=x=new uc),x instanceof uc||(t[n]=x=vde(x));let L=x.intervals;V=L.findInterval(a),(!l(V)||!(V.data instanceof Rd))&&(V=a.clone(),V.data=new Rd(e),L.addInterval(V)),V.data.addSamplesPackedArray(d,_),rk(i,V.data)}function Hde(e,t){if(e instanceof Rd){e.removeSamples(t);return}else if(e instanceof G0){e.intervals.removeInterval(t);return}else if(e instanceof uc){let n=e.intervals;for(let i=0;ic),!f&&!p){m?e[t]=new Mc(h.unpack(d),g):e[t]=sP(r,n.reference);return}let x=e[t],_,C=n.epoch;if(l(C)&&(_=te.fromIso8601(C)),f&&!p){(!(x instanceof aa)||l(g)&&x.referenceFrame!==g)&&(e[t]=x=new aa(g,a)),x.addSamplesPackedArray(d,_),rk(n,x);return}let V;if(!f&&p){s=s.clone(),m?s.data=h.unpack(d):s.data=sP(r,n.reference),l(x)||(m?x=new Z0(g):x=new ra(g),e[t]=x),m&&x instanceof Z0&&l(g)&&x.referenceFrame===g?x.intervals.addInterval(s):x instanceof ra?(m&&(s.data=new Mc(s.data,g)),x.intervals.addInterval(s)):(e[t]=x=wde(x),m&&(s.data=new Mc(s.data,g)),x.intervals.addInterval(s));return}l(x)?x instanceof ra||(e[t]=x=wde(x)):e[t]=x=new ra(g);let L=x.intervals;V=L.findInterval(s),(!l(V)||!(V.data instanceof aa)||l(g)&&V.data.referenceFrame!==g)&&(V=s.clone(),V.data=new aa(g,a),L.addInterval(V)),V.data.addSamplesPackedArray(d,_),rk(n,V.data)}function zde(e,t){if(e instanceof aa){e.removeSamples(t);return}else if(e instanceof Z0){e.intervals.removeInterval(t);return}else if(e instanceof ra){let n=e.intervals;for(let i=0;i. version format.");let i=t._documentPacket;l(e.name)&&(i.name=e.name);let o=e.clock;if(l(o)){let r=i.clock;l(r)?(r.interval=y(o.interval,r.interval),r.currentTime=y(o.currentTime,r.currentTime),r.range=y(o.range,r.range),r.step=y(o.step,r.step),r.multiplier=y(o.multiplier,r.multiplier)):i.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function l4e(e,t,n,i){let o=t.ellipse;if(!l(o))return;let r=sr(o.interval),s=e.ellipse;l(s)||(e.ellipse=s=new Vx),_e(Boolean,s,"show",o.show,r,i,n),_e(Number,s,"semiMajorAxis",o.semiMajorAxis,r,i,n),_e(Number,s,"semiMinorAxis",o.semiMinorAxis,r,i,n),_e(Number,s,"height",o.height,r,i,n),_e(Je,s,"heightReference",o.heightReference,r,i,n),_e(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),_e(Je,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),_e(Mu,s,"rotation",o.rotation,r,i,n),_e(Mu,s,"stRotation",o.stRotation,r,i,n),_e(Number,s,"granularity",o.granularity,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),Zd(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(Y,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),_e(xn,s,"shadows",o.shadows,r,i,n),_e(Wt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(kn,s,"classificationType",o.classificationType,r,i,n),_e(Number,s,"zIndex",o.zIndex,r,i,n)}function d4e(e,t,n,i){let o=t.ellipsoid;if(!l(o))return;let r=sr(o.interval),s=e.ellipsoid;l(s)||(e.ellipsoid=s=new Lx),_e(Boolean,s,"show",o.show,r,i,n),_e(h,s,"radii",o.radii,r,i,n),_e(h,s,"innerRadii",o.innerRadii,r,i,n),_e(Number,s,"minimumClock",o.minimumClock,r,i,n),_e(Number,s,"maximumClock",o.maximumClock,r,i,n),_e(Number,s,"minimumCone",o.minimumCone,r,i,n),_e(Number,s,"maximumCone",o.maximumCone,r,i,n),_e(Je,s,"heightReference",o.heightReference,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),Zd(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(Y,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Number,s,"stackPartitions",o.stackPartitions,r,i,n),_e(Number,s,"slicePartitions",o.slicePartitions,r,i,n),_e(Number,s,"subdivisions",o.subdivisions,r,i,n),_e(xn,s,"shadows",o.shadows,r,i,n),_e(Wt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function u4e(e,t,n,i){let o=t.label;if(!l(o))return;let r=sr(o.interval),s=e.label;l(s)||(e.label=s=new Tm),_e(Boolean,s,"show",o.show,r,i,n),_e(String,s,"text",o.text,r,i,n),_e(String,s,"font",o.font,r,i,n),_e(Fo,s,"style",o.style,r,i,n),_e(Number,s,"scale",o.scale,r,i,n),_e(Boolean,s,"showBackground",o.showBackground,r,i,n),_e(Y,s,"backgroundColor",o.backgroundColor,r,i,n),_e(D,s,"backgroundPadding",o.backgroundPadding,r,i,n),_e(D,s,"pixelOffset",o.pixelOffset,r,i,n),_e(h,s,"eyeOffset",o.eyeOffset,r,i,n),_e(hi,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),_e(Pn,s,"verticalOrigin",o.verticalOrigin,r,i,n),_e(Je,s,"heightReference",o.heightReference,r,i,n),_e(Y,s,"fillColor",o.fillColor,r,i,n),_e(Y,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Ft,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),_e(Ft,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),_e(Ft,s,"scaleByDistance",o.scaleByDistance,r,i,n),_e(Wt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function m4e(e,t,n,i){let o=t.model;if(!l(o))return;let r=sr(o.interval),s=e.model;l(s)||(e.model=s=new Vp),_e(Boolean,s,"show",o.show,r,i,n),_e(cP.default,s,"uri",o.gltf,r,i,n),_e(Number,s,"scale",o.scale,r,i,n),_e(Number,s,"minimumPixelSize",o.minimumPixelSize,r,i,n),_e(Number,s,"maximumScale",o.maximumScale,r,i,n),_e(Boolean,s,"incrementallyLoadTextures",o.incrementallyLoadTextures,r,i,n),_e(Boolean,s,"runAnimations",o.runAnimations,r,i,n),_e(Boolean,s,"clampAnimations",o.clampAnimations,r,i,n),_e(xn,s,"shadows",o.shadows,r,i,n),_e(Je,s,"heightReference",o.heightReference,r,i,n),_e(Y,s,"silhouetteColor",o.silhouetteColor,r,i,n),_e(Number,s,"silhouetteSize",o.silhouetteSize,r,i,n),_e(Y,s,"color",o.color,r,i,n),_e(rc,s,"colorBlendMode",o.colorBlendMode,r,i,n),_e(Number,s,"colorBlendAmount",o.colorBlendAmount,r,i,n),_e(Wt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n);let a,c,d=o.nodeTransformations;if(l(d))if(Array.isArray(d))for(a=0,c=d.length;a-1;c--)n[c](s,e,t,i)}vK=void 0}function S4e(e){let t,n=e._documentPacket.clock;if(!l(n)){if(!l(e._clock)){let o=e._entityCollection.computeAvailability();if(!o.start.equals(Be.MINIMUM_VALUE)){let r=o.start,s=o.stop,a=te.secondsDifference(s,r),c=Math.round(a/120);return t=new $m,t.startTime=te.clone(r),t.stopTime=te.clone(s),t.clockRange=vr.LOOP_STOP,t.multiplier=c,t.currentTime=te.clone(r),t.clockStep=mo.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}l(e._clock)?t=e._clock.clone():(t=new $m,t.startTime=Be.MINIMUM_VALUE.clone(),t.stopTime=Be.MAXIMUM_VALUE.clone(),t.currentTime=Be.MINIMUM_VALUE.clone(),t.clockRange=vr.LOOP_STOP,t.clockStep=mo.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);let i=sr(n.interval);return l(i)&&(t.startTime=i.start,t.stopTime=i.stop),l(n.currentTime)&&(t.currentTime=te.fromIso8601(n.currentTime)),l(n.range)&&(t.clockRange=y(vr[n.range],vr.LOOP_STOP)),l(n.step)&&(t.clockStep=y(mo[n.step],mo.SYSTEM_CLOCK_MULTIPLIER)),l(n.multiplier)&&(t.multiplier=n.multiplier),t.equals(e._clock)?!1:(e._clock=t.clone(e._clock),!0)}function Jde(e,t,n,i){n=y(n,y.EMPTY_OBJECT);let o=t,r=n.sourceUri,s=n.credit;if(typeof s=="string"&&(s=new Vt(s)),e._credit=s,typeof t=="string"||t instanceof Ee){t=Ee.createIfNeeded(t),o=t.fetchJson(),r=y(r,t.clone());let a=e._resourceCredits,c=t.credits;if(l(c)){let d=c.length;for(let u=0;u1;--b){if(C=W.PI_OVER_TWO-(b-1)*_,G=v1(-C,r,f,g,c,u,d,m,p,G),X=v1(C+Math.PI,r,f,g,c,u,d,m,p,X),t){for(L[Z++]=G.x,L[Z++]=G.y,L[Z++]=G.z,E=2*(b-1)+2,R=1;R1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*s,a=0;aW.PI&&(m.north=m.north>0?W.PI_OVER_TWO-W.EPSILON7:m.north,m.south=m.south<0?W.EPSILON7-W.PI_OVER_TWO:m.south,m.east=W.PI,m.west=-W.PI),m}function xf(e){e=y(e,y.EMPTY_OBJECT);let t=e.center,n=y(e.ellipsoid,ie.WGS84),i=e.semiMajorAxis,o=e.semiMinorAxis,r=y(e.granularity,W.RADIANS_PER_DEGREE),s=y(e.vertexFormat,We.DEFAULT),a=y(e.height,0),c=y(e.extrudedHeight,a);this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=ie.clone(n),this._rotation=y(e.rotation,0),this._stRotation=y(e.stRotation,0),this._height=Math.max(c,a),this._granularity=r,this._vertexFormat=We.clone(s),this._extrudedHeight=Math.min(c,a),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}xf.packedLength=h.packedLength+ie.packedLength+We.packedLength+9;xf.pack=function(e,t,n){return n=y(n,0),h.pack(e._center,t,n),n+=h.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,We.pack(e._vertexFormat,t,n),n+=We.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var fue=new h,pue=new ie,bue=new We,yf={center:fue,ellipsoid:pue,vertexFormat:bue,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};xf.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,fue);t+=h.packedLength;let o=ie.unpack(e,t,pue);t+=ie.packedLength;let r=We.unpack(e,t,bue);t+=We.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],m=e[t++],p=e[t++],g=e[t++]===1,f=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=We.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=c,n._stRotation=d,n._height=u,n._granularity=m,n._extrudedHeight=p,n._shadowVolume=g,n._offsetAttribute=f===-1?void 0:f,n):(yf.height=u,yf.extrudedHeight=p,yf.granularity=m,yf.stRotation=d,yf.rotation=c,yf.semiMajorAxis=s,yf.semiMinorAxis=a,yf.shadowVolume=g,yf.offsetAttribute=f===-1?void 0:f,new xf(yf))};xf.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.center,i=y(e.ellipsoid,ie.WGS84),o=e.semiMajorAxis,r=e.semiMinorAxis,s=y(e.granularity,W.RADIANS_PER_DEGREE),a=y(e.rotation,0);return hue(n,o,r,a,s,i,t)};xf.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!W.equalsEpsilon(t,n,0,W.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=W4e(o);else if(r=E4e(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===cn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ge({componentDatatype:Q.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ut({attributes:r.attributes,indices:r.indices,primitiveType:Fe.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};xf.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new xf({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:We.POSITION_ONLY,shadowVolume:!0})};function P4e(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=kl.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let c=0;c0){let f=Math.min(d,c);g=Math.round(c/f);let x=Math.min(g*d,c);for(p=0;p0&&(Z=!0,C+=c-1),s0&&u!==x-1&&m!==0&&m!==_-1&&(A[H]=!0),H++;p=0;let ee,z;for(u=1;u=Ae&&u1||G>1))for(let R=0;R0;u-=d)Se=u*3,J=B1(J,q,Se,p,_),q+=6,o.st&&(z=Y1(z,be,u*2,G),be+=4),n&&(Te+=3,H[Te++]=X[Se],H[Te++]=X[Se+1],H[Te++]=X[Se+2]),j&&(ee[ae++]=1,ae+=1);if(E){let Ae=ye;for(Se=Ae*3,u=0;u<2;u++)J=B1(J,q,Se,p,_),q+=6,o.st&&(z=Y1(z,be,Ae*2,G),be+=4),n&&(Te+=3,H[Te++]=X[Se],H[Te++]=X[Se+1],H[Te++]=X[Se+2]),j&&(ee[ae++]=1,ae+=1)}else for(u=d-1;u>=0;u--)Se=u*3,J=B1(J,q,Se,p,_),q+=6,o.st&&(z=Y1(z,be,u*2,G),be+=4),n&&(Te+=3,H[Te++]=X[Se],H[Te++]=X[Se+1],H[Te++]=X[Se+2]),j&&(ee[ae++]=1,ae+=1);let Le=Fje(J,o,a);o.st&&(Le.attributes.st=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:z})),n&&(Le.attributes.extrudeDirection=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:H})),P&&(Le.attributes.applyOffset=new Ge({componentDatatype:Q.UNSIGNED_BYTE,componentsPerAttribute:1,values:ee}));let Xe=Me.createTypedArray(k,B*6),Pe,ke,Pt,Ot;g=J.length/3;let ht=0;for(u=0;u0)for(s=new Array(o),i=0;i0)for(a=new Array(o),i=0;i0)for(s=new Array(o),i=0;i0)for(a=new Array(o),i=0;i{i.raiseEvent(a)}),n[r]=s}this.updaters=n,this.geometryChanged=i,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener($_.prototype._onEntityPropertyChanged,this)}$_.prototype._onEntityPropertyChanged=function(e,t,n,i){let o=this.updaters;for(let r=0;r0){l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i);let c;l(this.depthFailAppearanceType)&&(l(this.depthFailMaterialProperty)&&(this.depthFailMaterial=zo.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),c=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),i=new En({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed}),depthFailAppearance:c,shadows:this.shadows}),o.add(i),t=!1}else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Ut)&&(this.depthFailMaterial=zo.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r=0;i--){let o=e[i];if(o.remove(t))return o.updaters.length===0&&(e.splice(i,1),o.destroy()),!0}return!1}z1.prototype.remove=function(e){fme(this._solidItems,e)||fme(this._translucentItems,e)};function pme(e,t,n){let i=!1,o=t.length;for(let r=0;r0)for(r=0;r=0;r--){let s=t[r];if(s.invalidated){t.splice(r,1);let a=s.updaters.values,c=a.length;for(let d=0;d0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=zo.getValue(e,this.materialProperty,this.material);let a;l(this.depthFailMaterialProperty)&&(this.depthFailMaterial=zo.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),n=new En({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed}),depthFailAppearance:a,shadows:this.shadows}),i.add(n),t=!1}else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=zo.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Ut)&&(this.depthFailMaterial=zo.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};K1.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c0)l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new Fc({show:!1,asynchronous:!0,geometryInstances:s.slice(),classificationType:this.classificationType}),o.add(i,this.zIndex),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r=0;--t){let s=o[t];s.isDirty&&(i=o[t].update(e)&&i,s.isDirty=!1),s.geometry.length===0&&o.splice(t,1)}return i};J1.prototype.getBoundingSphere=function(e,t){let n=this._batches,i=n.length;for(let o=0;o0)l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=zo.getValue(e,this.materialProperty,this.material),n=new Fc({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({material:this.material}),classificationType:this.classificationType}),i.add(n,this.zIndex),t=!1;else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=zo.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};j1.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c0)l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new En({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new ln({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),o.add(i),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r0)for(m=!0,t=0;t0)for(m=!0,t=0;t-1;a--)c=s[a],d=c.id,u=this._updaterSets.get(d),u.entity===c?u.forEach(function(x){m._removeUpdater(x),m._insertUpdaterIntoBatch(e,x)}):(o.push(c),n.push(c));for(a=o.length-1;a>-1;a--)c=o[a],d=c.id,u=this._updaterSets.get(d),u.forEach(this._removeUpdater.bind(this)),u.destroy(),this._updaterSets.remove(d),this._subscriptions.get(d)(),this._subscriptions.remove(d);for(a=n.length-1;a>-1;a--)c=n[a],d=c.id,u=new eT(c,this._scene),this._updaterSets.set(d,u),u.forEach(function(x){m._insertUpdaterIntoBatch(e,x)}),this._subscriptions.set(d,u.geometryChanged.addEventListener(Ul._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let p=!0,g=this._batches,f=g.length;for(a=0;a-1;s--)c=n[s],a=c.id,i.remove(a)||(o.set(a,c),r.remove(a));for(s=t.length-1;s>-1;s--)c=t[s],a=c.id,o.remove(a)?r.set(a,c):i.set(a,c)};var AP=Ul;var sni=T(S(),1);var W8e=1,P8e="30px sans-serif",v8e=Fo.FILL,w8e=Y.WHITE,F8e=Y.BLACK,A8e=1,M8e=!1,N8e=new Y(.165,.165,.165,.8),k8e=new D(7,5),U8e=D.ZERO,D8e=h.ZERO,B8e=Je.NONE,Y8e=hi.CENTER,O8e=Pn.CENTER,H8e=new h,z8e=new Y,K8e=new Y,J8e=new Y,Q8e=new D,j8e=new h,q8e=new D,$8e=new Ft,e7e=new Ft,t7e=new Ft,n7e=new Wt;function _me(e){this.entity=e,this.label=void 0,this.index=void 0}function Ug(e,t){t.collectionChanged.addEventListener(Ug.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Ct,this._onCollectionChanged(t,t.values,[],[])}Ug.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i-1;o--)r=t[o],l(r._label)&&l(r._position)&&s.set(r.id,new _me(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._label)&&l(r._position)?s.contains(r.id)||s.set(r.id,new _me(r)):(eJ(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],eJ(s.get(r.id),r,a),s.remove(r.id)};function eJ(e,t,n){l(e)&&(e.label=void 0,n.removeLabel(t))}var MP=Ug;var Zni=T(S(),1);var i7e=1,o7e=0,r7e=!0,s7e=!0,a7e=xn.ENABLED,c7e=Je.NONE,l7e=Y.RED,d7e=0,u7e=Y.WHITE,m7e=rc.HIGHLIGHT,h7e=.5,f7e=new D(1,1),p7e=new M,b7e=new M,Tme=new Y,Sme=new Array(4),g7e=new h;function Dg(e,t){t.collectionChanged.addEventListener(Dg.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new Ct,this._onCollectionChanged(t,t.values,[],[])}async function y7e(e,t,n,i){let o=e._primitives,r=e._modelHash;try{let s=await Um.fromGltfAsync({url:n,incrementallyLoadTextures:i,scene:e._scene});if(e.isDestroyed()||!l(r[t.id]))return;s.id=t,o.add(s),r[t.id].modelPrimitive=s,s.errorEvent.addEventListener(a=>{l(r[t.id])&&(console.log(a),a.name!=="TextureError"&&s.incrementallyLoadTextures&&(r[t.id].loadFailed=!0))})}catch(s){if(e.isDestroyed()||!l(r[t.id]))return;console.log(s),r[t.id].loadFailed=!0}}Dg.prototype.update=function(e){let t=this._entitiesToVisualize.values,n=this._modelHash,i=this._primitives;for(let o=0,r=t.length;o-1;i--)tJ(this,e[i],t,n);return me(this)};var Ck=new h,x7e=new he;Dg.prototype.getBoundingSphere=function(e,t){let n=this._modelHash[e.id];if(!l(n))return mt.FAILED;if(n.loadFailed)return mt.FAILED;let i=n.modelPrimitive;if(!l(i)||!i.show)return mt.PENDING;if(!i.ready||!n.modelUpdated)return mt.PENDING;let o=this._scene,r=o.globe,s=y(r?.ellipsoid,ie.WGS84);if(i.heightReference!==Je.NONE){let c=i.modelMatrix;Ck.x=c[12],Ck.y=c[13],Ck.z=c[14];let d=s.cartesianToCartographic(Ck,x7e),u=o.getHeight(d,i.heightReference);return l(u)&&(ou(i.heightReference)?d.height=u:d.height+=u),le.clone(i.boundingSphere,t),t.center=s.cartographicToCartesian(d),mt.DONE}return le.clone(i.boundingSphere,t),mt.DONE};Dg.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._entitiesToVisualize,a=this._modelHash,c=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],l(r._model)&&l(r._position)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],l(r._model)&&l(r._position)?(_7e(r,a),s.set(r.id,r)):(tJ(this,r,a,c),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],tJ(this,r,a,c),s.remove(r.id)};function tJ(e,t,n,i){let o=n[t.id];l(o)&&(i.removeAndDestroy(o.modelPrimitive),delete n[t.id])}function _7e(e,t){let n=t[e.id];l(n)&&(n.nodeTransformationsScratch={},n.articulationsScratch={})}var NP=Dg;var nii=T(S(),1);var vni=T(S(),1);function Bg(e){this._definitionChanged=new ge,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}Object.defineProperties(Bg.prototype,{isConstant:{get:function(){return K.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return l(this._value)?this._value.referenceFrame:$i.FIXED}}});Bg.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,$i.FIXED,t)};Bg.prototype.setValue=function(e){this._value!==e&&(this._value=e,l(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),l(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))};Bg.prototype.getValueInReferenceFrame=function(e,t,n){if(l(this._value))return n=this._value.getValueInReferenceFrame(e,t,n),l(n)?ie.WGS84.scaleToGeodeticSurface(n,n):void 0};Bg.prototype.equals=function(e){return this===e||e instanceof Bg&&this._value===e._value};Bg.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var Sf=Bg;var T7e=60,S7e=1,Lme=new Sn,nJ=new Sn,iJ=new Sn;function Cme(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function C7e(e,t,n,i,o,r,s,a,c){let d=a,u;u=e.getValueInReferenceFrame(t,r,c[d]),l(u)&&(c[d++]=u);let m=!l(o)||te.lessThanOrEquals(o,t)||te.greaterThanOrEquals(o,n),p=0,g=i.length,f=i[p],x=n,_=!1,C,V,L;for(;p0&&!_){let Z=i[p+1],G=te.secondsDifference(Z,f);_=G>s,_&&(C=Math.ceil(G/s),V=0,L=G/Math.max(C,2),C=Math.max(C-1,1))}if(_&&V0){let g=m.pop();c=this._polylineCollection.get(g),t.index=g}else t.index=this._polylineCollection.length,c=this._polylineCollection.add();c.id=n,t.polyline=c}let u=K.getValueOrDefault(i._resolution,e,T7e);c.show=!0,c.positions=Zme(o,r,s,e,this._referenceFrame,u,c.positions.slice()),c.material=zo.getValue(e,i._material,c.material),c.width=K.getValueOrDefault(i._width,e,S7e),c.distanceDisplayCondition=K.getValueOrUndefined(i._distanceDisplayCondition,e,c.distanceDisplayCondition)};kP.prototype.removeObject=function(e){let t=e.polyline;l(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)};kP.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),me(this)};function Yg(e,t){t.collectionChanged.addEventListener(Yg.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new Ct,this._onCollectionChanged(t,t.values,[],[])}Yg.prototype.update=function(e){let t=this._updaters;for(let i in t)t.hasOwnProperty(i)&&t[i].update(e);let n=this._items.values;if(n.length===0&&l(this._updaters)&&Object.keys(this._updaters).length>0){for(let i in t)t.hasOwnProperty(i)&&t[i].destroy();this._updaters={}}for(let i=0,o=n.length;i-1;o--)r=t[o],l(r._path)&&l(r._position)&&a.set(r.id,new Cme(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._path)&&l(r._position)?a.contains(r.id)||a.set(r.id,new Cme(r)):(s=a.get(r.id),l(s)&&(l(s.updater)&&s.updater.removeObject(s),a.remove(r.id)));for(o=n.length-1;o>-1;o--)r=n[o],s=a.get(r.id),l(s)&&(l(s.updater)&&s.updater.removeObject(s),a.remove(r.id))};Yg._subSample=Zme;var UP=Yg;var pii=T(S(),1);var Gme=Y.WHITE,Eme=Y.BLACK,Xme=0,Ime=1,Wme=0,Pme=new Y,G7e=new h,vme=new Y,wme=new Ft,Fme=new Ft,Ame=new Wt;function Mme(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function Og(e,t){t.collectionChanged.addEventListener(Og.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Ct,this._onCollectionChanged(t,t.values,[],[])}Og.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i0?(d.scale=1,g=g||C!==r.outlineWidth||V!==r.pixelSize||!Y.equals(x,r.color)||!Y.equals(_,r.outlineColor)):(d.scale=V/50,V=50,g=g||C!==r.outlineWidth||!Y.equals(x,r.color)||!Y.equals(_,r.outlineColor)),g){r.color=Y.clone(x,r.color),r.outlineColor=Y.clone(_,r.outlineColor),r.pixelSize=V,r.outlineWidth=C;let L=x.alpha,Z=x.toCssColorString(),G=_.toCssColorString(),X=JSON.stringify([Z,V,G,C]);d.setImage(X,h_(L,Z,G,C,V))}f&&d._updateClamping()}}return!0};Og.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!(l(n.pointPrimitive)||l(n.billboard)))return mt.FAILED;if(l(n.pointPrimitive))t.center=h.clone(n.pointPrimitive.position,t.center);else{let i=n.billboard;if(!l(i._clampedPosition))return mt.PENDING;t.center=h.clone(i._clampedPosition,t.center)}return t.radius=0,mt.DONE};Og.prototype.isDestroyed=function(){return!1};Og.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Og.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t-1;o--)r=t[o],l(r._point)&&l(r._position)&&s.set(r.id,new Mme(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._point)&&l(r._position)?s.contains(r.id)||s.set(r.id,new Mme(r)):(DP(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],DP(s.get(r.id),r,a),s.remove(r.id)};function DP(e,t,n){if(l(e)){let i=e.pointPrimitive;if(l(i)){e.pointPrimitive=void 0,n.removePoint(t);return}let o=e.billboard;l(o)&&(e.billboard=void 0,n.removeBillboard(t))}}var BP=Og;var zoi=T(S(),1);var moi=T(S(),1);var wii=T(S(),1);var Bme=[];function E7e(e,t,n,i,o){let r=Bme;r.length=o;let s,a=n.red,c=n.green,d=n.blue,u=n.alpha,m=i.red,p=i.green,g=i.blue,f=i.alpha;if(Y.equals(n,i)){for(s=0;s0?new Array(o):void 0;for(i=0;i0){let w=0,N=m[0];i=i.filter(function(B,U){let O=!1;return o?O=U===N||U===0&&N===1:O=U+1===N,O?(w++,N=m[w],!1):!0})}let g=p.length;if(g<2||t<=0)return;if(r===$t.GEODESIC||r===$t.RHUMB){let w,N;r===$t.GEODESIC?(w=W.chordLength(s,a.maximumRadius),N=Li.numberOfPoints):(w=s,N=Li.numberOfPointsRhumbLine);let B=Li.extractHeights(p,a);if(l(i)){let U=1;for(c=0;c0)return le.fromPoints(t.positions,e),mt.DONE}return mt.FAILED};OP.prototype.isDestroyed=function(){return!1};OP.prototype.destroy=function(){let t=this._geometryUpdater._scene.id+this._primitives._guid,n=Vk[t];l(n)&&(n.remove(this._line),n.length===0&&(this._primitives.removeAndDestroy(n),delete Vk[t])),l(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),me(this)};var HP=ah;var Eoi=T(S(),1);var M7e=new Y,N7e=new Wt,k7e=new Wt;function ch(e,t,n,i,o){let r;n instanceof Ut?r=Dr:r=qs,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=r,this.materialProperty=n,this.updaters=new Ct,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Ct,this.material=void 0,this.updatersWithAttributes=new Ct,this.attributes=new Ct,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(ch.prototype.onMaterialChanged,this),this.subscriptions=new Ct,this.showsUpdated=new Ct,this.zIndex=i,this._asynchronous=o}ch.prototype.onMaterialChanged=function(){this.invalidated=!0};ch.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Ut&&t instanceof Ut?!0:l(t)&&t.equals(n)};ch.prototype.add=function(e,t,n){let i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!K.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,c){s==="isShowing"&&o.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};ch.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t)),!0}return!1};ch.prototype.update=function(e){let t=!0,n=this.primitive,i=this.orderedGroundPrimitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0)l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),n=new _m({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===qs&&(this.material=zo.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),i.add(n,this.zIndex),t=!1;else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===qs&&(this.material=zo.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};tV.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c-1;a--)c=s[a],d=c.id,u=this._updaters.get(d),u.entity===c?(Kme(this,u),Jme(this,e,u)):(o.push(c),n.push(c));for(a=o.length-1;a>-1;a--)c=o[a],d=c.id,u=this._updaters.get(d),Kme(this,u),u.destroy(),this._updaters.remove(d),this._subscriptions.get(d)(),this._subscriptions.remove(d);for(a=n.length-1;a>-1;a--)c=n[a],d=c.id,u=new HP(c,this._scene),this._updaters.set(d,u),Jme(this,e,u),this._subscriptions.set(d,u.geometryChanged.addEventListener(Cf._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let m=!0,p=this._batches,g=p.length;for(a=0;a-1;s--)c=n[s],a=c.id,i.remove(a)||(o.set(a,c),r.remove(a));for(s=t.length-1;s>-1;s--)c=t[s],a=c.id,o.remove(a)?r.set(a,c):i.set(a,c)};var KP=Cf;function Dl(e){Fc.initializeTerrainHeights(),_m.initializeTerrainHeights();let t=e.scene,n=e.dataSourceCollection;this._eventHelper=new Er,this._eventHelper.add(n.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(n.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(n.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=n,this._scene=t,this._visualizersCallback=y(e.visualizersCallback,Dl.defaultVisualizersCallback);let i=!1,o=new Nl,r=new Nl;n.length>0&&(t.primitives.add(o),t.groundPrimitives.add(r),i=!0),this._primitives=o,this._groundPrimitives=r;for(let d=0,u=n.length;dnew o(e,i))]};Object.defineProperties(Dl.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}});Dl.prototype.isDestroyed=function(){return!1};Dl.prototype.destroy=function(){this._eventHelper.removeAll();let e=this._dataSourceCollection;for(let t=0,n=e.length;tz7e*s.maximumRadius?(m=$me,h.normalize(c,m),h.negate(m,m),g=h.clone(h.UNIT_Z,rJ),p=h.cross(g,m,Lk),h.magnitude(p)>W.EPSILON7&&(h.normalize(m,m),h.normalize(p,p),g=h.cross(m,p,rJ),h.normalize(g,g),d=!0)):h.equalsEpsilon(c,V,W.EPSILON7)||(g=$me,h.normalize(X,g),h.normalize(v,v),p=h.cross(g,v,rJ),u&&(p=h.multiplyByScalar(p,-1,p)),h.equalsEpsilon(p,h.ZERO,W.EPSILON7)||(m=h.cross(p,g,Lk),$.multiplyByVector(G,m,m),$.multiplyByVector(G,p,p),$.multiplyByVector(G,g,g),h.normalize(m,m),h.normalize(p,p),h.normalize(g,g),d=!0))}}l(e.boundingSphere)&&(c=e.boundingSphere.center);let f,x,_;i&&(f=h.clone(t.position,sJ),x=h.clone(t.direction,ehe),_=h.clone(t.up,the));let C=H7e;d?(C[0]=m.x,C[1]=m.y,C[2]=m.z,C[3]=0,C[4]=p.x,C[5]=p.y,C[6]=p.z,C[7]=0,C[8]=g.x,C[9]=g.y,C[10]=g.z,C[11]=0,C[12]=c.x,C[13]=c.y,C[14]=c.z,C[15]=0):Gt.eastNorthUpToFixedFrame(c,s,C),t._setTransform(C),i&&(h.clone(f,t.position),h.clone(x,t.direction),h.clone(_,t.up),h.cross(x,_,t.right))}if(n){let d=a===oe.SCENE2D||h.equals(e._offset3D,h.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,d)}}function QP(e,t,n){this.entity=e,this.scene=t,this.ellipsoid=y(n,ie.WGS84),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new h,this._defaultOffset3D=void 0,this._offset3D=new h}Object.defineProperties(QP,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=h.clone(e,new h)}}});QP.defaultOffset3D=new h(-14e3,3500,3500);var Rk=new Yu,J7e=new h;QP.prototype.update=function(e,t){let n=this.scene,i=this.ellipsoid,o=n.mode;if(o===oe.MORPHING)return;let r=this.entity,s=r.position;if(!l(s))return;let a=r!==this._lastEntity,c=o!==this._mode,d=n.camera,u=a||c,m=!0;if(a){let p=r.viewFrom,g=l(p);if(!g&&l(t)){Rk.pitch=-W.PI_OVER_FOUR,Rk.range=0;let f=s.getValue(e,J7e);if(l(f)){let x=2-1/Math.max(1,h.magnitude(f)/i.maximumRadius);Rk.pitch*=x}d.viewBoundingSphere(t,Rk),this.boundingSphere=t,u=!1,m=!1}else(!g||!l(p.getValue(e,this._offset3D)))&&h.clone(QP._defaultOffset3D,this._offset3D)}else!c&&this._mode!==oe.SCENE2D&&h.clone(d.position,this._offset3D);this._lastEntity=r,this._mode=o,K7e(this,d,u,m,s,e,i)};var jP=QP;var dai=T(S(),1);var Nri=T(S(),1);function $P(){this._cache={}}$P.prototype.fromColor=function(e,t){return Zk(void 0,void 0,e,t,this._cache)};$P.prototype.fromUrl=function(e,t,n){return Zk(e,void 0,t,n,this._cache)};$P.prototype.fromMakiIconId=function(e,t,n){return Zk(tn(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)};$P.prototype.fromText=function(e,t,n){return Zk(void 0,e,t,n,this._cache)};var Q7e=new Y;function j7e(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,Q7e).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function nhe(e,t,n){let i=n/2.5,o=i,r=i;t.width>t.height?r=i*(t.height/t.width):t.width${i}${ahe(o)}`:n+=`${i}${o}`)}return n.length>0&&(n=`${n}
`),n}function o6e(e,t,n){let i;return function(o,r){return l(i)||(i=e(t,n)),i}}function r6e(e,t){return new Vm(o6e(ahe,e,t),!0)}function Xk(e,t,n){let i=e.id;if(!l(i)||e.type!=="Feature")i=Bn();else{let s=2,a=i;for(;l(t.getById(a));)a=`${i}_${s}`,s++;i=a}let o=t.getOrCreateEntity(i),r=e.properties;if(l(r)){o.properties=r;let s,a=r.title;if(l(a))o.name=a,s="title";else{let d=Number.MAX_VALUE;for(let u in r)if(r.hasOwnProperty(u)&&r[u]){let m=u.toLowerCase();if(d>1&&m==="title"){d=1,s=u;break}else d>2&&m==="name"?(d=2,s=u):d>3&&/title/i.test(u)?(d=3,s=u):d>4&&/name/i.test(u)&&(d=4,s=u)}l(s)&&(o.name=r[s])}let c=r.description;c!==null&&(o.description=l(c)?new Jn(c):n(r,s))}return o}function yJ(e,t){let n=new Array(e.length);for(let i=0;i2?d.perPositionHeight=new Jn(!0):o.clampToGround||(d.height=0);let p=Xk(t,e._entityCollection,o.describe);p.polygon=d}function xhe(e,t,n,i,o){yhe(e,t,i,n.coordinates,o)}function _he(e,t,n,i,o){let r=n.coordinates;for(let s=0;st&&(n==null?(n="…",i=3):i=n.length,e=e.substring(0,t-i)+n),e}function No(e,t){for(var n=e.length-1;n>=0;n--)e[n]===t&&e.splice(n,1)}function zg(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function Kg(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var Pai=T(S());var _ai=T(S());var gai=T(S()),Jg=/[A-Za-z]/,Ds=/[\d]/;var Wd=/\s/,Ik=/['"]/,Rhe=/[\x00-\x1F\x7F]/,Zhe=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,l6e=/\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source,d6e=/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,u6e=Zhe+l6e+d6e,Ghe=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,pai=new RegExp("[".concat(Zhe+Ghe,"]")),xJ=u6e+Ghe,lh=new RegExp("[".concat(xJ,"]"));var Wk=function(){function e(t){t===void 0&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return e.prototype.setTagName=function(t){return this.tagName=t,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(t,n){var i=this.getAttrs();return i[t]=n,this},e.prototype.getAttr=function(t){return this.getAttrs()[t]},e.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(t){return this.setAttr("class",t)},e.prototype.addClass=function(t){for(var n=this.getClass(),i=n?n.split(Wd):[],o=t.split(Wd),r;r=o.shift();)i.indexOf(r)===-1&&i.push(r);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var n=this.getClass(),i=n?n.split(Wd):[],o=t.split(Wd),r;i.length&&(r=o.shift());){var s=i.indexOf(r);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(t){return(" "+this.getClass()+" ").indexOf(" "+t+" ")!==-1},e.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},e.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var t=this.getTagName(),n=this.buildAttrsStr();return n=n?" "+n:"",["<",t,n,">",this.getInnerHtml(),""].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var t=this.getAttrs(),n=[];for(var i in t)t.hasOwnProperty(i)&&n.push(i+'="'+t[i]+'"');return n.join(" ")},e}();var Sai=T(S());function Ehe(e,t,n){var i,o;n==null?(n="…",o=3,i=8):(o=n.length,i=n.length);var r=function(V){var L={},Z=V,G=Z.match(/^([a-z]+):\/\//i);return G&&(L.scheme=G[1],Z=Z.substr(G[0].length)),G=Z.match(/^(.*?)(?=(\?|#|\/|$))/i),G&&(L.host=G[1],Z=Z.substr(G[0].length)),G=Z.match(/^\/(.*?)(?=(\?|#|$))/i),G&&(L.path=G[1],Z=Z.substr(G[0].length)),G=Z.match(/^\?(.*?)(?=(#|$))/i),G&&(L.query=G[1],Z=Z.substr(G[0].length)),G=Z.match(/^#(.*?)$/i),G&&(L.fragment=G[1]),L},s=function(V){var L="";return V.scheme&&V.host&&(L+=V.scheme+"://"),V.host&&(L+=V.host),V.path&&(L+="/"+V.path),V.query&&(L+="?"+V.query),V.fragment&&(L+="#"+V.fragment),L},a=function(V,L){var Z=L/2,G=Math.ceil(Z),X=-1*Math.floor(Z),v="";return X<0&&(v=V.substr(X)),V.substr(0,G)+n+v};if(e.length<=t)return e;var c=t-o,d=r(e);if(d.query){var u=d.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);u&&(d.query=d.query.substr(0,u[1].length),e=s(d))}if(e.length<=t||(d.host&&(d.host=d.host.replace(/^www\./,""),e=s(d)),e.length<=t))return e;var m="";if(d.host&&(m+=d.host),m.length>=c)return d.host.length==t?(d.host.substr(0,t-o)+n).substr(0,c+i):a(m,c).substr(0,c+i);var p="";if(d.path&&(p+="/"+d.path),d.query&&(p+="?"+d.query),p)if((m+p).length>=c){if((m+p).length==t)return(m+p).substr(0,t);var g=c-m.length;return(m+a(p,g)).substr(0,c+i)}else m+=p;if(d.fragment){var f="#"+d.fragment;if((m+f).length>=c){if((m+f).length==t)return(m+f).substr(0,t);var x=c-m.length;return(m+a(f,x)).substr(0,c+i)}else m+=f}if(d.scheme&&d.host){var _=d.scheme+"://";if((m+_).length0&&(C=m.substr(-1*Math.floor(c/2))),(m.substr(0,Math.ceil(c/2))+n+C).substr(0,c+i)}var Vai=T(S());function Xhe(e,t,n){if(e.length<=t)return e;var i,o;n==null?(n="…",i=8,o=3):(i=n.length,o=n.length);var r=t-o,s="";return r>0&&(s=e.substr(-1*Math.floor(r/2))),(e.substr(0,Math.ceil(r/2))+n+s).substr(0,r+i)}var Zai=T(S());function Ihe(e,t,n){return Lhe(e,t,n)}var Whe=function(){function e(t){t===void 0&&(t={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=t.newWindow||!1,this.truncate=t.truncate||{},this.className=t.className||""}return e.prototype.build=function(t){return new Wk({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},e.prototype.createAttrs=function(t){var n={href:t.getAnchorHref()},i=this.createCssClass(t);return i&&(n.class=i),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length=0;g--){var f=u[g];switch(f.state){case 11:X(f,p);break;case 12:v(f,p);break;case 0:C(f,p);break;case 1:V(f,p);break;case 2:L(f,p);break;case 3:Z(f,p);break;case 4:G(f,p);break;case 5:P(f,p);break;case 6:F(f,p);break;case 7:A(f,p);break;case 13:b(f,p);break;case 14:R(f,p);break;case 8:E(f,p);break;case 9:I(f,p);break;case 10:w(f,p);break;case 15:N(f,p);break;case 16:B(f,p);break;case 17:U(f,p);break;case 18:O(f,p);break;case 19:k(f,p);break;case 20:J(f,p);break;case 21:H(f,p);break;case 22:ee(f,p);break;case 23:z(f,p);break;case 24:j(f,p);break;case 25:q(f,p);break;case 26:be(f,p);break;case 27:Te(f,p);break;case 28:ae(f,p);break;case 29:ye(f,p);break;case 30:Se(f,p);break;case 31:Le(f,p);break;case 32:Pe(f,p);break;case 33:ke(f,p);break;case 34:Pt(f,p);break;case 35:Ot(f,p);break;case 36:ht(f,p);break;case 37:Xe(f,p);break;case 38:Ae(f,p);break;case 39:$e(f,p);break;case 40:Qe(f,p);break;case 41:je(f,p);break;default:Kg(f.state)}}}for(var x=u.length-1;x>=0;x--)u.forEach(function(pe){return kt(pe)});return c;function _(pe){if(pe==="#")u.push(k6e(m,28));else if(pe==="@")u.push(U6e(m,30));else if(pe==="/")u.push(EJ(m,11));else if(pe==="+")u.push(XJ(m,37));else if(pe==="(")u.push(XJ(m,32));else{if(Ds.test(pe)&&(u.push(XJ(m,38)),u.push(M6e(m,13))),Dhe(pe)){var Ve=pe.toLowerCase()==="m"?15:22;u.push(N6e(m,Ve))}Pk(pe)&&u.push(GJ(m,0)),lh.test(pe)&&u.push(EJ(m,5))}}function C(pe,Ve){Ve===":"?pe.state=2:Ve==="-"?pe.state=1:SJ(Ve)||No(u,pe)}function V(pe,Ve){Ve==="-"||(Ve==="/"?(No(u,pe),u.push(EJ(m,11))):SJ(Ve)?pe.state=0:No(u,pe))}function L(pe,Ve){Ve==="/"?pe.state=3:Ve==="."?No(u,pe):F0(Ve)?(pe.state=5,Pk(Ve)&&u.push(GJ(m,0))):No(u,pe)}function Z(pe,Ve){Ve==="/"?pe.state=4:CJ(Ve)?(pe.state=10,pe.acceptStateReached=!0):kt(pe)}function G(pe,Ve){Ve==="/"?pe.state=10:F0(Ve)?(pe.state=5,pe.acceptStateReached=!0):No(u,pe)}function X(pe,Ve){Ve==="/"?pe.state=12:No(u,pe)}function v(pe,Ve){F0(Ve)?pe.state=5:No(u,pe)}function P(pe,Ve){Ve==="."?pe.state=7:Ve==="-"?pe.state=6:Ve===":"?pe.state=8:wk(Ve)?pe.state=10:vk(Ve)||kt(pe)}function F(pe,Ve){Ve==="-"||(Ve==="."?kt(pe):F0(Ve)?pe.state=5:kt(pe))}function A(pe,Ve){Ve==="."?kt(pe):F0(Ve)?(pe.state=5,pe.acceptStateReached=!0):kt(pe)}function b(pe,Ve){Ve==="."?pe.state=14:Ve===":"?pe.state=8:Ds.test(Ve)||(wk(Ve)?pe.state=10:lh.test(Ve)?No(u,pe):kt(pe))}function R(pe,Ve){Ds.test(Ve)?(pe.octetsEncountered++,pe.octetsEncountered===4&&(pe.acceptStateReached=!0),pe.state=13):kt(pe)}function E(pe,Ve){Ds.test(Ve)?pe.state=9:kt(pe)}function I(pe,Ve){Ds.test(Ve)||(wk(Ve)?pe.state=10:kt(pe))}function w(pe,Ve){CJ(Ve)||kt(pe)}function N(pe,Ve){Ve.toLowerCase()==="a"?pe.state=16:ee(pe,Ve)}function B(pe,Ve){Ve.toLowerCase()==="i"?pe.state=17:ee(pe,Ve)}function U(pe,Ve){Ve.toLowerCase()==="l"?pe.state=18:ee(pe,Ve)}function O(pe,Ve){Ve.toLowerCase()==="t"?pe.state=19:ee(pe,Ve)}function k(pe,Ve){Ve.toLowerCase()==="o"?pe.state=20:ee(pe,Ve)}function J(pe,Ve){Ve.toLowerCase()===":"?pe.state=21:ee(pe,Ve)}function H(pe,Ve){Fk(Ve)?pe.state=22:No(u,pe)}function ee(pe,Ve){Ve==="."?pe.state=23:Ve==="@"?pe.state=24:Fk(Ve)?pe.state=22:No(u,pe)}function z(pe,Ve){Ve==="."?No(u,pe):Ve==="@"?No(u,pe):Fk(Ve)?pe.state=22:No(u,pe)}function j(pe,Ve){F0(Ve)?pe.state=25:No(u,pe)}function q(pe,Ve){Ve==="."?pe.state=27:Ve==="-"?pe.state=26:vk(Ve)||kt(pe)}function be(pe,Ve){Ve==="-"||Ve==="."?kt(pe):vk(Ve)?pe.state=25:kt(pe)}function Te(pe,Ve){Ve==="."||Ve==="-"?kt(pe):F0(Ve)?(pe.state=25,pe.acceptStateReached=!0):kt(pe)}function ae(pe,Ve){LJ(Ve)?(pe.state=29,pe.acceptStateReached=!0):No(u,pe)}function ye(pe,Ve){LJ(Ve)||kt(pe)}function Se(pe,Ve){RJ(Ve)?(pe.state=31,pe.acceptStateReached=!0):No(u,pe)}function Le(pe,Ve){RJ(Ve)||(lh.test(Ve)?No(u,pe):kt(pe))}function Xe(pe,Ve){Ds.test(Ve)?pe.state=38:(No(u,pe),_(Ve))}function Pe(pe,Ve){Ds.test(Ve)?pe.state=33:No(u,pe),_(Ve)}function ke(pe,Ve){Ds.test(Ve)?pe.state=34:No(u,pe)}function Pt(pe,Ve){Ds.test(Ve)?pe.state=35:No(u,pe)}function Ot(pe,Ve){Ve===")"?pe.state=36:No(u,pe)}function ht(pe,Ve){Ds.test(Ve)?pe.state=38:ZJ(Ve)?pe.state=39:No(u,pe)}function Ae(pe,Ve){pe.acceptStateReached=!0,Ak(Ve)?pe.state=40:Ve==="#"?pe.state=41:Ds.test(Ve)||(Ve==="("?pe.state=32:ZJ(Ve)?pe.state=39:(kt(pe),Pk(Ve)&&u.push(GJ(m,0))))}function $e(pe,Ve){Ds.test(Ve)?pe.state=38:Ve==="("?pe.state=32:(kt(pe),_(Ve))}function Qe(pe,Ve){Ak(Ve)||(Ve==="#"?pe.state=41:Ds.test(Ve)?pe.state=38:kt(pe))}function je(pe,Ve){Ak(Ve)?pe.state=40:Ds.test(Ve)?No(u,pe):kt(pe)}function kt(pe){if(No(u,pe),!!pe.acceptStateReached){var Ve=pe.startIdx,Dt=e.slice(pe.startIdx,m);if(Dt=A6e(Dt),pe.type==="url"){var bt=e.charAt(pe.startIdx-1);if(bt==="@")return;var li=pe.matchType;if(li==="scheme"){var Vo=TJ.exec(Dt);if(Vo&&(Ve=Ve+Vo.index,Dt=Dt.slice(Vo.index)),!Ahe(Dt))return}else if(li==="tld"){if(!Mhe(Dt))return}else if(li==="ipV4"){if(!Nhe(Dt))return}else Kg(li);c.push(new khe({tagBuilder:n,matchedText:Dt,offset:Ve,urlMatchType:li,url:Dt,protocolRelativeMatch:Dt.slice(0,2)==="//",stripPrefix:i,stripTrailingSlash:o,decodePercentEncoding:r}))}else if(pe.type==="email")Bhe(Dt)&&c.push(new Yhe({tagBuilder:n,matchedText:Dt,offset:Ve,email:Dt.replace(Uhe,"")}));else if(pe.type==="hashtag")Ohe(Dt)&&c.push(new zhe({tagBuilder:n,matchedText:Dt,offset:Ve,serviceName:s,hashtag:Dt.slice(1)}));else if(pe.type==="mention")Khe(Dt,a)&&c.push(new Qhe({tagBuilder:n,matchedText:Dt,offset:Ve,serviceName:a,mention:Dt.slice(1)}));else if(pe.type==="phone"){if(Dt=Dt.replace(/ +$/g,""),jhe(Dt)){var Rs=Dt.replace(/[^0-9,;#]/g,"");c.push(new qhe({tagBuilder:n,matchedText:Dt,offset:Ve,number:Rs,plusSign:Dt.charAt(0)==="+"}))}}else Kg(pe)}}}var F6e=/[\(\{\[]/,$he=/[\)\}\]]/,efe={")":"(","}":"{","]":"["};function A6e(e){for(var t={"(":0,"{":0,"[":0},n=0;n=0;)if(r=e.charAt(o),$he.test(r)){var s=efe[r];if(t[s]<0)t[s]++,o--;else break}else if(Fhe.test(r))o--;else break;return e.slice(0,o+1)}function GJ(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"scheme"}}function EJ(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"tld"}}function M6e(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"ipV4",octetsEncountered:1}}function N6e(e,t){return{type:"email",startIdx:e,state:t,acceptStateReached:!1}}function k6e(e,t){return{type:"hashtag",startIdx:e,state:t,acceptStateReached:!1}}function U6e(e,t){return{type:"mention",startIdx:e,state:t,acceptStateReached:!1}}function XJ(e,t){return{type:"phone",startIdx:e,state:t,acceptStateReached:!1}}var Uci=T(S());function nfe(e,t){for(var n=t.onOpenTag,i=t.onCloseTag,o=t.onText,r=t.onComment,s=t.onDoctype,a=new Rf,c=0,d=e.length,u=0,m=0,p=a;c"?(p=new Rf(Bs(Bs({},p),{name:ee()})),J()):!Jg.test(j)&&!Ds.test(j)&&j!==":"&&O()}function C(j){j===">"?O():Jg.test(j)?u=3:O()}function V(j){Wd.test(j)||(j==="/"?u=12:j===">"?J():j==="<"?k():j==="="||Ik.test(j)||Rhe.test(j)?O():u=5)}function L(j){Wd.test(j)?u=6:j==="/"?u=12:j==="="?u=7:j===">"?J():j==="<"?k():Ik.test(j)&&O()}function Z(j){Wd.test(j)||(j==="/"?u=12:j==="="?u=7:j===">"?J():j==="<"?k():Ik.test(j)?O():u=5)}function G(j){Wd.test(j)||(j==='"'?u=8:j==="'"?u=9:/[>=`]/.test(j)?O():j==="<"?k():u=10)}function X(j){j==='"'&&(u=11)}function v(j){j==="'"&&(u=11)}function P(j){Wd.test(j)?u=4:j===">"?J():j==="<"&&k()}function F(j){Wd.test(j)?u=4:j==="/"?u=12:j===">"?J():j==="<"?k():(u=4,z())}function A(j){j===">"?(p=new Rf(Bs(Bs({},p),{isClosing:!0})),J()):u=4}function b(j){e.substr(c,2)==="--"?(c+=2,p=new Rf(Bs(Bs({},p),{type:"comment"})),u=14):e.substr(c,7).toUpperCase()==="DOCTYPE"?(c+=7,p=new Rf(Bs(Bs({},p),{type:"doctype"})),u=20):O()}function R(j){j==="-"?u=15:j===">"?O():u=16}function E(j){j==="-"?u=18:j===">"?O():u=16}function I(j){j==="-"&&(u=17)}function w(j){j==="-"?u=18:u=16}function N(j){j===">"?J():j==="!"?u=19:j==="-"||(u=16)}function B(j){j==="-"?u=17:j===">"?J():u=16}function U(j){j===">"?J():j==="<"&&k()}function O(){u=0,p=a}function k(){u=1,p=new Rf({idx:c})}function J(){var j=e.slice(m,p.idx);j&&o(j,m),p.type==="comment"?r(p.idx):p.type==="doctype"?s(p.idx):(p.isOpening&&n(p.name,p.idx),p.isClosing&&i(p.name,p.idx)),O(),m=c+1}function H(){var j=e.slice(m,c);o(j,m),m=c+1}function ee(){var j=p.idx+(p.isClosing?2:1);return e.slice(j,c).toLowerCase()}function z(){c--}}var Rf=function(){function e(t){t===void 0&&(t={}),this.idx=t.idx!==void 0?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing}return e}();var D6e=function(){function e(t){t===void 0&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=B6e(t.urls),this.email=Id(t.email)?t.email:this.email,this.phone=Id(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=Id(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=Y6e(t.stripPrefix),this.stripTrailingSlash=Id(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=Id(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&Jhe.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(i!==!1&&Hhe.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=O6e(t.truncate),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,n){var i=new e(n);return i.link(t)},e.parse=function(t,n){var i=new e(n);return i.parse(t)},e.prototype.parse=function(t){var n=this,i=["a","style","script"],o=0,r=[];return nfe(t,{onOpenTag:function(s){i.indexOf(s)>=0&&o++},onText:function(s,a){if(o===0){var c=/( | |<|<|>|>|"|"|')/gi,d=s.split(c),u=a;d.forEach(function(m,p){if(p%2===0){var g=n.parseText(m,u);r.push.apply(r,g)}u+=m.length})}},onCloseTag:function(s){i.indexOf(s)>=0&&(o=Math.max(o-1,0))},onComment:function(s){},onDoctype:function(s){}}),r=this.compactMatches(r),r=this.removeUnwantedMatches(r),r},e.prototype.compactMatches=function(t){t.sort(function(c,d){return c.getOffset()-d.getOffset()});for(var n=0;nr?n:n+1;t.splice(a,1);continue}if(t[n+1].getOffset()/g,">"));for(var n=this.parse(t),i=[],o=0,r=0,s=n.length;r{let i=new FileReader;i.addEventListener("load",function(){t(i.result)}),i.addEventListener("error",function(){n(i.error)}),i.readAsText(e)})}function IJ(e,t){let n=iv(e,"id");return n=l(n)?n:Bn(),t.getOrCreateEntity(n)}function WJ(e){let t=cfe(e,"lon"),n=cfe(e,"lat"),i=tv(e,"ele",So.gpx);return h.fromDegrees(t,n,i)}function cfe(e,t){if(!l(e))return;let n=e.getAttribute(t);if(n!==null){let i=parseFloat(n);return isNaN(i)?void 0:i}}function iv(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function Qg(e,t,n){if(!l(e))return;let i=e.childNodes,o=i.length;for(let r=0;r${m.text}: ${m.value}

`)}if(!l(i)||i==="")return;i=H6e.link(i),nv.innerHTML=i;let s=nv.querySelectorAll("a");for(n=0;n',d+=`${nv.innerHTML}`,nv.innerHTML="",d}function pfe(e,t,n,i){let o=WJ(t),r=IJ(t,n);r.position=o;let s=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",Y.RED,Nk);r.billboard=hfe(s);let a=Bl(t,"name",So.gpx);r.name=a,r.label=J6e(),r.label.text=a,r.description=vJ(t,r),i.clampToGround&&(r.billboard.heightReference=Je.CLAMP_TO_GROUND,r.label.heightReference=Je.CLAMP_TO_GROUND)}function Q6e(e,t,n,i){let o=IJ(t,n);o.description=vJ(t,o);let r=PJ(t,"rtept",So.gpx),s=new Array(r.length);for(let a=0;a0?(a=a.concat(c.times),u.addSamples(a,s),d=d&&!0):d=!1;if(d){let m=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",Y.RED,Nk);o.billboard=hfe(m),o.position=u,i.clampToGround&&(o.billboard.heightReference=Je.CLAMP_TO_GROUND),o.availability=new Ir,o.availability.addInterval(new Sn({start:a[0],stop:a[a.length-1]}))}o.polyline=ffe(i.trackColor),o.polyline.positions=s,i.clampToGround&&(o.polyline.clampToGround=!0)}function q6e(e){let t={positions:[],times:[]},n=PJ(e,"trkpt",So.gpx),i;for(let o=0;onew Array(t).fill(n,0,t)))}function zk(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?zk(n):n),[])}var gfe=[0,1,2,3].concat(...Hk([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function ar(){let e=this;function t(o){let r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,d=e.stat_desc.max_length,u,m,p,g,f,x,_=0;for(g=0;g<=15;g++)o.bl_count[g]=0;for(r[o.heap[o.heap_max]*2+1]=0,u=o.heap_max+1;u<573;u++)m=o.heap[u],g=r[r[m*2+1]*2+1]+1,g>d&&(g=d,_++),r[m*2+1]=g,!(m>e.max_code)&&(o.bl_count[g]++,f=0,m>=c&&(f=a[m-c]),x=r[m*2],o.opt_len+=x*(g+f),s&&(o.static_len+=x*(s[m*2+1]+f)));if(_!==0){do{for(g=d-1;o.bl_count[g]===0;)g--;o.bl_count[g]--,o.bl_count[g+1]+=2,o.bl_count[d]--,_-=2}while(_>0);for(g=d;g!==0;g--)for(m=o.bl_count[g];m!==0;)p=o.heap[--u],!(p>e.max_code)&&(r[p*2+1]!=g&&(o.opt_len+=(g-r[p*2+1])*r[p*2],r[p*2+1]=g),m--)}}function n(o,r){let s=0;do s|=o&1,o>>>=1,s<<=1;while(--r>0);return s>>>1}function i(o,r,s){let a=[],c=0,d,u,m;for(d=1;d<=15;d++)a[d]=c=c+s[d-1]<<1;for(u=0;u<=r;u++)m=o[u*2+1],m!==0&&(o[u*2]=n(a[m]++,m))}e.build_tree=function(o){let r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems,c,d,u=-1,m;for(o.heap_len=0,o.heap_max=573,c=0;c=1;c--)o.pqdownheap(r,c);m=a;do c=o.heap[1],o.heap[1]=o.heap[o.heap_len--],o.pqdownheap(r,1),d=o.heap[1],o.heap[--o.heap_max]=c,o.heap[--o.heap_max]=d,r[m*2]=r[c*2]+r[d*2],o.depth[m]=Math.max(o.depth[c],o.depth[d])+1,r[c*2+1]=r[d*2+1]=m,o.heap[1]=m++,o.pqdownheap(r,1);while(o.heap_len>=2);o.heap[--o.heap_max]=o.heap[1],t(o),i(r,e.max_code,o.bl_count)}}ar._length_code=[0,1,2,3,4,5,6,7].concat(...Hk([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));ar.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];ar.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];ar.d_code=function(e){return e<256?gfe[e]:gfe[256+(e>>>7)]};ar.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];ar.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];ar.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];ar.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Xa(e,t,n,i,o){let r=this;r.static_tree=e,r.extra_bits=t,r.extra_base=n,r.elems=i,r.max_length=o}var cqe=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],lqe=Hk([[144,8],[112,9],[24,7],[8,8]]);Xa.static_ltree=zk(cqe.map((e,t)=>[e,lqe[t]]));var dqe=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],uqe=Hk([[30,5]]);Xa.static_dtree=zk(dqe.map((e,t)=>[e,uqe[t]]));Xa.static_l_desc=new Xa(Xa.static_ltree,ar.extra_lbits,257,286,15);Xa.static_d_desc=new Xa(Xa.static_dtree,ar.extra_dbits,0,30,15);Xa.static_bl_desc=new Xa(null,ar.extra_blbits,0,19,7);var mqe=9,hqe=8;function Zf(e,t,n,i,o){let r=this;r.good_length=e,r.max_lazy=t,r.nice_length=n,r.max_chain=i,r.func=o}var xfe=0,Yk=1,oT=2,dh=[new Zf(0,0,0,0,xfe),new Zf(4,4,8,4,Yk),new Zf(4,5,16,8,Yk),new Zf(4,6,32,32,Yk),new Zf(4,4,16,16,oT),new Zf(8,16,32,32,oT),new Zf(8,16,128,128,oT),new Zf(8,32,128,256,oT),new Zf(32,128,258,1024,oT),new Zf(32,258,258,4096,oT)],kk=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ou=0,Uk=1,sv=2,Dk=3,fqe=32,wJ=42,Bk=113,av=666,FJ=8,pqe=0,AJ=1,bqe=2,gr=3,Ok=258,Pd=Ok+gr+1;function yfe(e,t,n,i){let o=e[t*2],r=e[n*2];return o=3&&B[ar.bl_order[Ue]*2+1]===0;Ue--);return e.opt_len+=3*(Ue+1)+5+5+4,Ue}function Le(Ue){e.pending_buf[e.pending++]=Ue}function Xe(Ue){Le(Ue&255),Le(Ue>>>8&255)}function Pe(Ue){Le(Ue>>8&255),Le(Ue&255&255)}function ke(Ue,it){let tt,qe=it;q>16-qe?(tt=Ue,j|=tt<>>16-q,q+=qe-16):(j|=Ue<=8&&(Le(j&255),j>>>=8,q-=8)}function $e(){ke(AJ<<1,3),Pt(256,Xa.static_ltree),Ae(),1+z+10-q<9&&(ke(AJ<<1,3),Pt(256,Xa.static_ltree),Ae()),z=7}function Qe(Ue,it){let tt,qe,dt;if(e.dist_buf[H]=Ue,e.lc_buf[H]=it&255,H++,Ue===0?w[it*2]++:(ee++,Ue--,w[(ar._length_code[it]+256+1)*2]++,N[ar.d_code(Ue)*2]++),!(H&8191)&&b>2){for(tt=H*8,qe=G-C,dt=0;dt<30;dt++)tt+=N[dt*2]*(5+ar.extra_dbits[dt]);if(tt>>>=3,ee8?Xe(j):q>0&&Le(j&255),j=0,q=0}function pe(Ue,it,tt){kt(),z=8,tt&&(Xe(it),Xe(~it)),e.pending_buf.set(c.subarray(Ue,Ue+it),e.pending),e.pending+=it}function Ve(Ue,it,tt){ke((pqe<<1)+(tt?1:0),3),pe(Ue,it,!0)}function Dt(Ue,it,tt){let qe,dt,Bt=0;b>0?(U.build_tree(e),O.build_tree(e),Bt=Se(),qe=e.opt_len+3+7>>>3,dt=e.static_len+3+7>>>3,dt<=qe&&(qe=dt)):qe=dt=it+5,it+4<=qe&&Ue!=-1?Ve(Ue,it,tt):dt==qe?(ke((AJ<<1)+(tt?1:0),3),je(Xa.static_ltree,Xa.static_dtree)):(ke((bqe<<1)+(tt?1:0),3),ht(U.max_code+1,O.max_code+1,Bt+1),je(w,N)),Te(),tt&&kt()}function bt(Ue){Dt(C>=0?C:-1,G-C,Ue),C=G,t.flush_pending()}function li(){let Ue,it,tt,qe;do{if(qe=d-v-G,qe===0&&G===0&&v===0)qe=r;else if(qe==-1)qe--;else if(G>=r+r-Pd){c.set(c.subarray(r,r+r),0),X-=r,G-=r,C-=r,Ue=g,tt=Ue;do it=m[--tt]&65535,m[tt]=it>=r?it-r:0;while(--Ue!==0);Ue=r,tt=Ue;do it=u[--tt]&65535,u[tt]=it>=r?it-r:0;while(--Ue!==0);qe+=r}if(t.avail_in===0)return;Ue=t.read_buf(c,G+v,qe),v+=Ue,v>=gr&&(p=c[G]&255,p=(p<<_^c[G+1]&255)&x)}while(vi-5&&(it=i-5);;){if(v<=1){if(li(),v===0&&Ue==0)return Ou;if(v===0)break}if(G+=v,v=0,tt=C+it,(G===0||G>=tt)&&(v=G-tt,G=tt,bt(!1),t.avail_out===0)||G-C>=r-Pd&&(bt(!1),t.avail_out===0))return Ou}return bt(Ue==4),t.avail_out===0?Ue==4?sv:Ou:Ue==4?Dk:Uk}function Rs(Ue){let it=F,tt=G,qe,dt,Bt=P,Ln=G>r-Pd?G-(r-Pd):0,Lo=I,nr=a,Na=G+Ok,ka=c[tt+Bt-1],io=c[tt+Bt];P>=E&&(it>>=2),Lo>v&&(Lo=v);do if(qe=Ue,!(c[qe+Bt]!=io||c[qe+Bt-1]!=ka||c[qe]!=c[tt]||c[++qe]!=c[tt+1])){tt+=2,qe++;do;while(c[++tt]==c[++qe]&&c[++tt]==c[++qe]&&c[++tt]==c[++qe]&&c[++tt]==c[++qe]&&c[++tt]==c[++qe]&&c[++tt]==c[++qe]&&c[++tt]==c[++qe]&&c[++tt]==c[++qe]&&ttBt){if(X=Ue,Bt=dt,dt>=Lo)break;ka=c[tt+Bt-1],io=c[tt+Bt]}}while((Ue=u[Ue&nr]&65535)>Ln&&--it!==0);return Bt<=v?Bt:v}function zs(Ue){let it=0,tt;for(;;){if(v=gr&&(p=(p<<_^c[G+(gr-1)]&255)&x,it=m[p]&65535,u[G&a]=m[p],m[p]=G),it!==0&&(G-it&65535)<=r-Pd&&R!=2&&(V=Rs(it)),V>=gr)if(tt=Qe(G-X,V-gr),v-=V,V<=A&&v>=gr){V--;do G++,p=(p<<_^c[G+(gr-1)]&255)&x,it=m[p]&65535,u[G&a]=m[p],m[p]=G;while(--V!==0);G++}else G+=V,V=0,p=c[G]&255,p=(p<<_^c[G+1]&255)&x;else tt=Qe(0,c[G]&255),v--,G++;if(tt&&(bt(!1),t.avail_out===0))return Ou}return bt(Ue==4),t.avail_out===0?Ue==4?sv:Ou:Ue==4?Dk:Uk}function Nr(Ue){let it=0,tt,qe;for(;;){if(v=gr&&(p=(p<<_^c[G+(gr-1)]&255)&x,it=m[p]&65535,u[G&a]=m[p],m[p]=G),P=V,L=X,V=gr-1,it!==0&&P4096)&&(V=gr-1)),P>=gr&&V<=P){qe=G+v-gr,tt=Qe(G-1-L,P-gr),v-=P-1,P-=2;do++G<=qe&&(p=(p<<_^c[G+(gr-1)]&255)&x,it=m[p]&65535,u[G&a]=m[p],m[p]=G);while(--P!==0);if(Z=0,V=gr-1,G++,tt&&(bt(!1),t.avail_out===0))return Ou}else if(Z!==0){if(tt=Qe(0,c[G-1]&255),tt&&bt(!1),G++,v--,t.avail_out===0)return Ou}else Z=1,G++,v--}return Z!==0&&(tt=Qe(0,c[G-1]&255),Z=0),bt(Ue==4),t.avail_out===0?Ue==4?sv:Ou:Ue==4?Dk:Uk}function $r(Ue){return Ue.total_in=Ue.total_out=0,Ue.msg=null,e.pending=0,e.pending_out=0,n=Bk,o=0,ae(),be(),0}e.deflateInit=function(Ue,it,tt,qe,dt,Bt){return qe||(qe=FJ),dt||(dt=hqe),Bt||(Bt=0),Ue.msg=null,it==-1&&(it=6),dt<1||dt>mqe||qe!=FJ||tt<9||tt>15||it<0||it>9||Bt<0||Bt>2?-2:(Ue.dstate=e,s=tt,r=1<9||tt<0||tt>2?-2:(dh[b].func!=dh[it].func&&Ue.total_in!==0&&(qe=Ue.deflate(1)),b!=it&&(b=it,A=dh[b].max_lazy,E=dh[b].good_length,I=dh[b].nice_length,F=dh[b].max_chain),R=tt,qe)},e.deflateSetDictionary=function(Ue,it,tt){let qe=tt,dt,Bt=0;if(!it||n!=wJ)return-2;if(qer-Pd&&(qe=r-Pd,Bt=tt-qe),c.set(it.subarray(Bt,Bt+qe),0),G=qe,C=qe,p=c[0]&255,p=(p<<_^c[1]&255)&x,dt=0;dt<=qe-gr;dt++)p=(p<<_^c[dt+(gr-1)]&255)&x,u[dt&a]=m[p],m[p]=dt;return 0},e.deflate=function(Ue,it){let tt,qe,dt,Bt,Ln;if(it>4||it<0)return-2;if(!Ue.next_out||!Ue.next_in&&Ue.avail_in!==0||n==av&&it!=4)return Ue.msg=kk[4],-2;if(Ue.avail_out===0)return Ue.msg=kk[7],-5;if(t=Ue,Bt=o,o=it,n==wJ&&(qe=FJ+(s-8<<4)<<8,dt=(b-1&255)>>1,dt>3&&(dt=3),qe|=dt<<6,G!==0&&(qe|=fqe),qe+=31-qe%31,n=Bk,Pe(qe)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return o=-1,0}else if(t.avail_in===0&&it<=Bt&&it!=4)return t.msg=kk[7],-5;if(n==av&&t.avail_in!==0)return Ue.msg=kk[7],-5;if(t.avail_in!==0||v!==0||it!=0&&n!=av){switch(Ln=-1,dh[b].func){case xfe:Ln=Vo(it);break;case Yk:Ln=zs(it);break;case oT:Ln=Nr(it);break;default:}if((Ln==sv||Ln==Dk)&&(n=av),Ln==Ou||Ln==sv)return t.avail_out===0&&(o=-1),0;if(Ln==Uk){if(it==1)$e();else if(Ve(0,0,!1),it==3)for(tt=0;ttn&&(o=n),o===0?0:(i.avail_in-=o,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+o),t),i.next_in_index+=o,i.total_in+=o,o)},flush_pending(){let e=this,t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Tfe(e){let t=this,n=new _fe,i=yqe(e&&e.chunkSize?e.chunkSize:64*1024),o=0,r=new Uint8Array(i),s=e?e.level:-1;typeof s>"u"&&(s=-1),n.deflateInit(s),n.next_out=r,t.append=function(a,c){let d,u,m=0,p=0,g=0,f=[];if(a.length){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=i,d=n.deflate(o),d!=0)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==i?f.push(new Uint8Array(r)):f.push(r.subarray(0,n.next_out_index))),g+=n.next_out_index,c&&n.next_in_index>0&&n.next_in_index!=m&&(c(n.next_in_index),m=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(g),f.forEach(function(x){u.set(x,p),p+=x.length})):u=f[0]?new Uint8Array(f[0]):new Uint8Array,u}},t.flush=function(){let a,c,d=0,u=0,m=[];do{if(n.next_out_index=0,n.avail_out=i,a=n.deflate(4),a!=1&&a!=0)throw new Error("deflating: "+n.msg);i-n.avail_out>0&&m.push(r.slice(0,n.next_out_index)),u+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),c=new Uint8Array(u),m.forEach(function(p){c.set(p,d),d+=p.length}),c}}function yqe(e){return e+5*(Math.floor(e/16383)+1)}var rdi=T(S(),1);var vd=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ufe=1440,xqe=0,_qe=4,Tqe=9,Sqe=5,Cqe=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Vqe=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Lqe=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Rqe=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Zqe=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Gqe=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],jg=15;function UJ(){let e=this,t,n,i,o,r,s;function a(d,u,m,p,g,f,x,_,C,V,L){let Z,G,X,v,P,F,A,b,R,E,I,w,N,B,U;E=0,P=m;do i[d[u+E]]++,E++,P--;while(P!==0);if(i[0]==m)return x[0]=-1,_[0]=0,0;for(b=_[0],F=1;F<=jg&&i[F]===0;F++);for(A=F,bP&&(b=P),_[0]=b,B=1<w+b;){if(v++,w+=b,U=X-w,U=U>b?b:U,(G=1<<(F=A-w))>Z+1&&(G-=Z+1,N=A,FUfe)return-3;r[v]=I=V[0],V[0]+=U,v!==0?(s[v]=P,o[0]=F,o[1]=b,F=P>>>w-b,o[2]=I-r[v-1]-F,C.set(o,(r[v-1]+F)*3)):x[0]=I}for(o[1]=A-w,E>=m?o[0]=192:L[E]>>w;F>>=1)P^=F;for(P^=F,R=(1<257?(V==-3?C.msg="oversubscribed distance tree":V==-5?(C.msg="incomplete distance tree",V=-3):V!=-4&&(C.msg="empty distance tree with lengths",V=-3),V):0)}}UJ.inflate_trees_fixed=function(e,t,n,i){return e[0]=Tqe,t[0]=Sqe,n[0]=Cqe,i[0]=Vqe,0};var Kk=0,Sfe=1,Cfe=2,Vfe=3,Lfe=4,Rfe=5,Zfe=6,MJ=7,Gfe=8,Jk=9;function Eqe(){let e=this,t,n=0,i,o=0,r=0,s=0,a=0,c=0,d=0,u=0,m,p=0,g,f=0;function x(_,C,V,L,Z,G,X,v){let P,F,A,b,R,E,I,w,N,B,U,O,k,J,H,ee;I=v.next_in_index,w=v.avail_in,R=X.bitb,E=X.bitk,N=X.write,B=N>=F[ee+1],E-=F[ee+1],X.win[N++]=F[ee+2],B--;continue}do{if(R>>=F[ee+1],E-=F[ee+1],b&16){for(b&=15,k=F[ee+2]+(R&vd[b]),R>>=b,E-=b;E<15;)w--,R|=(v.read_byte(I++)&255)<>=F[ee+1],E-=F[ee+1],b&16){for(b&=15;E>=b,E-=b,B-=k,N>=J)H=N-J,N-H>0&&2>N-H?(X.win[N++]=X.win[H++],X.win[N++]=X.win[H++],k-=2):(X.win.set(X.win.subarray(H,H+2),N),N+=2,H+=2,k-=2);else{H=N-J;do H+=X.end;while(H<0);if(b=X.end-H,k>b){if(k-=b,N-H>0&&b>N-H)do X.win[N++]=X.win[H++];while(--b!==0);else X.win.set(X.win.subarray(H,H+b),N),N+=b,H+=b,b=0;H=0}}if(N-H>0&&k>N-H)do X.win[N++]=X.win[H++];while(--k!==0);else X.win.set(X.win.subarray(H,H+k),N),N+=k,H+=k,k=0;break}else if(!(b&64))P+=F[ee+2],P+=R&vd[b],ee=(A+P)*3,b=F[ee];else return v.msg="invalid distance code",k=v.avail_in-w,k=E>>3>3:k,w+=k,I-=k,E-=k<<3,X.bitb=R,X.bitk=E,v.avail_in=w,v.total_in+=I-v.next_in_index,v.next_in_index=I,X.write=N,-3;while(!0);break}if(b&64)return b&32?(k=v.avail_in-w,k=E>>3>3:k,w+=k,I-=k,E-=k<<3,X.bitb=R,X.bitk=E,v.avail_in=w,v.total_in+=I-v.next_in_index,v.next_in_index=I,X.write=N,1):(v.msg="invalid literal/length code",k=v.avail_in-w,k=E>>3>3:k,w+=k,I-=k,E-=k<<3,X.bitb=R,X.bitk=E,v.avail_in=w,v.total_in+=I-v.next_in_index,v.next_in_index=I,X.write=N,-3);if(P+=F[ee+2],P+=R&vd[b],ee=(A+P)*3,(b=F[ee])===0){R>>=F[ee+1],E-=F[ee+1],X.win[N++]=F[ee+2],B--;break}}while(!0)}while(B>=258&&w>=10);return k=v.avail_in-w,k=E>>3>3:k,w+=k,I-=k,E-=k<<3,X.bitb=R,X.bitk=E,v.avail_in=w,v.total_in+=I-v.next_in_index,v.next_in_index=I,X.write=N,0}e.init=function(_,C,V,L,Z,G){t=Kk,d=_,u=C,m=V,p=L,g=Z,f=G,i=null},e.proc=function(_,C,V){let L,Z,G,X=0,v=0,P=0,F,A,b,R;for(P=C.next_in_index,F=C.avail_in,X=_.bitb,v=_.bitk,A=_.write,b=A<_.read?_.read-A-1:_.end-A;;)switch(t){case Kk:if(b>=258&&F>=10&&(_.bitb=X,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=A,V=x(d,u,m,p,g,f,_,C),P=C.next_in_index,F=C.avail_in,X=_.bitb,v=_.bitk,A=_.write,b=A<_.read?_.read-A-1:_.end-A,V!=0)){t=V==1?MJ:Jk;break}r=d,i=m,o=p,t=Sfe;case Sfe:for(L=r;v>>=i[Z+1],v-=i[Z+1],G=i[Z],G===0){s=i[Z+2],t=Zfe;break}if(G&16){a=G&15,n=i[Z+2],t=Cfe;break}if(!(G&64)){r=G,o=Z/3+i[Z+2];break}if(G&32){t=MJ;break}return t=Jk,C.msg="invalid literal/length code",V=-3,_.bitb=X,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=A,_.inflate_flush(C,V);case Cfe:for(L=a;v>=L,v-=L,r=u,i=g,o=f,t=Vfe;case Vfe:for(L=r;v>=i[Z+1],v-=i[Z+1],G=i[Z],G&16){a=G&15,c=i[Z+2],t=Lfe;break}if(!(G&64)){r=G,o=Z/3+i[Z+2];break}return t=Jk,C.msg="invalid distance code",V=-3,_.bitb=X,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=A,_.inflate_flush(C,V);case Lfe:for(L=a;v>=L,v-=L,t=Rfe;case Rfe:for(R=A-c;R<0;)R+=_.end;for(;n!==0;){if(b===0&&(A==_.end&&_.read!==0&&(A=0,b=A<_.read?_.read-A-1:_.end-A),b===0&&(_.write=A,V=_.inflate_flush(C,V),A=_.write,b=A<_.read?_.read-A-1:_.end-A,A==_.end&&_.read!==0&&(A=0,b=A<_.read?_.read-A-1:_.end-A),b===0)))return _.bitb=X,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=A,_.inflate_flush(C,V);_.win[A++]=_.win[R++],b--,R==_.end&&(R=0),n--}t=Kk;break;case Zfe:if(b===0&&(A==_.end&&_.read!==0&&(A=0,b=A<_.read?_.read-A-1:_.end-A),b===0&&(_.write=A,V=_.inflate_flush(C,V),A=_.write,b=A<_.read?_.read-A-1:_.end-A,A==_.end&&_.read!==0&&(A=0,b=A<_.read?_.read-A-1:_.end-A),b===0)))return _.bitb=X,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=A,_.inflate_flush(C,V);V=0,_.win[A++]=s,b--,t=Kk;break;case MJ:if(v>7&&(v-=8,F++,P--),_.write=A,V=_.inflate_flush(C,V),A=_.write,b=A<_.read?_.read-A-1:_.end-A,_.read!=_.write)return _.bitb=X,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=A,_.inflate_flush(C,V);t=Gfe;case Gfe:return V=1,_.bitb=X,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=A,_.inflate_flush(C,V);case Jk:return V=-3,_.bitb=X,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=A,_.inflate_flush(C,V);default:return V=-2,_.bitb=X,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=A,_.inflate_flush(C,V)}},e.free=function(){}}var Efe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],rV=0,NJ=1,Xfe=2,Ife=3,Wfe=4,Pfe=5,Qk=6,jk=7,vfe=8,rT=9;function Xqe(e,t){let n=this,i=rV,o=0,r=0,s=0,a,c=[0],d=[0],u=new Eqe,m=0,p=new Int32Array(Ufe*3),g=0,f=new UJ;n.bitk=0,n.bitb=0,n.win=new Uint8Array(t),n.end=t,n.read=0,n.write=0,n.reset=function(x,_){_&&(_[0]=g),i==Qk&&u.free(x),i=rV,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=function(x,_){let C,V,L;return V=x.next_out_index,L=n.read,C=(L<=n.write?n.write:n.end)-L,C>x.avail_out&&(C=x.avail_out),C!==0&&_==-5&&(_=0),x.avail_out-=C,x.total_out+=C,x.next_out.set(n.win.subarray(L,L+C),V),V+=C,L+=C,L==n.end&&(L=0,n.write==n.end&&(n.write=0),C=n.write-L,C>x.avail_out&&(C=x.avail_out),C!==0&&_==-5&&(_=0),x.avail_out-=C,x.total_out+=C,x.next_out.set(n.win.subarray(L,L+C),V),V+=C,L+=C),x.next_out_index=V,n.read=L,_},n.proc=function(x,_){let C,V,L,Z,G,X,v,P;for(Z=x.next_in_index,G=x.avail_in,V=n.bitb,L=n.bitk,X=n.write,v=X>>1){case 0:V>>>=3,L-=3,C=L&7,V>>>=C,L-=C,i=NJ;break;case 1:F=[],A=[],b=[[]],R=[[]],UJ.inflate_trees_fixed(F,A,b,R),u.init(F[0],A[0],b[0],0,R[0],0),V>>>=3,L-=3,i=Qk;break;case 2:V>>>=3,L-=3,i=Ife;break;case 3:return V>>>=3,L-=3,i=rT,x.msg="invalid block type",_=-3,n.bitb=V,n.bitk=L,x.avail_in=G,x.total_in+=Z-x.next_in_index,x.next_in_index=Z,n.write=X,n.inflate_flush(x,_)}break;case NJ:for(;L<32;){if(G!==0)_=0;else return n.bitb=V,n.bitk=L,x.avail_in=G,x.total_in+=Z-x.next_in_index,x.next_in_index=Z,n.write=X,n.inflate_flush(x,_);G--,V|=(x.read_byte(Z++)&255)<>>16&65535)!=(V&65535))return i=rT,x.msg="invalid stored block lengths",_=-3,n.bitb=V,n.bitk=L,x.avail_in=G,x.total_in+=Z-x.next_in_index,x.next_in_index=Z,n.write=X,n.inflate_flush(x,_);o=V&65535,V=L=0,i=o!==0?Xfe:m!==0?jk:rV;break;case Xfe:if(G===0||v===0&&(X==n.end&&n.read!==0&&(X=0,v=XG&&(C=G),C>v&&(C=v),n.win.set(x.read_buf(Z,C),X),Z+=C,G-=C,X+=C,v-=C,(o-=C)!==0)break;i=m!==0?jk:rV;break;case Ife:for(;L<14;){if(G!==0)_=0;else return n.bitb=V,n.bitk=L,x.avail_in=G,x.total_in+=Z-x.next_in_index,x.next_in_index=Z,n.write=X,n.inflate_flush(x,_);G--,V|=(x.read_byte(Z++)&255)<29||(C>>5&31)>29)return i=rT,x.msg="too many length or distance symbols",_=-3,n.bitb=V,n.bitk=L,x.avail_in=G,x.total_in+=Z-x.next_in_index,x.next_in_index=Z,n.write=X,n.inflate_flush(x,_);if(C=258+(C&31)+(C>>5&31),!a||a.length>>=14,L-=14,s=0,i=Wfe;case Wfe:for(;s<4+(r>>>10);){for(;L<3;){if(G!==0)_=0;else return n.bitb=V,n.bitk=L,x.avail_in=G,x.total_in+=Z-x.next_in_index,x.next_in_index=Z,n.write=X,n.inflate_flush(x,_);G--,V|=(x.read_byte(Z++)&255)<>>=3,L-=3}for(;s<19;)a[Efe[s++]]=0;if(c[0]=7,C=f.inflate_trees_bits(a,c,d,p,x),C!=0)return _=C,_==-3&&(a=null,i=rT),n.bitb=V,n.bitk=L,x.avail_in=G,x.total_in+=Z-x.next_in_index,x.next_in_index=Z,n.write=X,n.inflate_flush(x,_);s=0,i=Pfe;case Pfe:for(;C=r,!(s>=258+(C&31)+(C>>5&31));){let B,U;for(C=c[0];L>>=C,L-=C,a[s++]=U;else{for(P=U==18?7:U-14,B=U==18?11:3;L>>=C,L-=C,B+=V&vd[P],V>>>=P,L-=P,P=s,C=r,P+B>258+(C&31)+(C>>5&31)||U==16&&P<1)return a=null,i=rT,x.msg="invalid bit length repeat",_=-3,n.bitb=V,n.bitk=L,x.avail_in=G,x.total_in+=Z-x.next_in_index,x.next_in_index=Z,n.write=X,n.inflate_flush(x,_);U=U==16?a[P-1]:0;do a[P++]=U;while(--B!==0);s=P}}if(d[0]=-1,E=[],I=[],w=[],N=[],E[0]=9,I[0]=6,C=r,C=f.inflate_trees_dynamic(257+(C&31),1+(C>>5&31),a,E,I,w,N,p,x),C!=0)return C==-3&&(a=null,i=rT),_=C,n.bitb=V,n.bitk=L,x.avail_in=G,x.total_in+=Z-x.next_in_index,x.next_in_index=Z,n.write=X,n.inflate_flush(x,_);u.init(E[0],I[0],p,w[0],p,N[0]),i=Qk;case Qk:if(n.bitb=V,n.bitk=L,x.avail_in=G,x.total_in+=Z-x.next_in_index,x.next_in_index=Z,n.write=X,(_=u.proc(n,x,_))!=1)return n.inflate_flush(x,_);if(_=0,u.free(x),Z=x.next_in_index,G=x.avail_in,V=n.bitb,L=n.bitk,X=n.write,v=X15?(e.inflateEnd(n),-2):(e.wbits=i,n.istate.blocks=new Xqe(n,1<>4)+8>s.wbits){s.mode=qg,n.msg="invalid win size",s.marker=5;break}s.mode=wfe;case wfe:if(n.avail_in===0)return o;if(o=i,n.avail_in--,n.total_in++,r=n.read_byte(n.next_in_index++)&255,((s.method<<8)+r)%31!==0){s.mode=qg,n.msg="incorrect header check",s.marker=5;break}if(!(r&Iqe)){s.mode=cv;break}s.mode=Ffe;case Ffe:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,s.mode=Afe;case Afe:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,s.mode=Mfe;case Mfe:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,s.mode=Nfe;case Nfe:return n.avail_in===0?o:(o=i,n.avail_in--,n.total_in++,s.need+=n.read_byte(n.next_in_index++)&255,s.mode=kJ,2);case kJ:return s.mode=qg,n.msg="need dictionary",s.marker=0,-2;case cv:if(o=s.blocks.proc(n,o),o==-3){s.mode=qg,s.marker=0;break}if(o==0&&(o=i),o!=1)return o;o=i,s.blocks.reset(n,s.was),s.mode=kfe;case kfe:return n.avail_in=0,1;case qg:return-3;default:return-2}},e.inflateSetDictionary=function(n,i,o){let r=0,s=o;if(!n||!n.istate||n.istate.mode!=kJ)return-2;let a=n.istate;return s>=1<0&&n.next_in_index!=p&&(c(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return d.length>1?(m=new Uint8Array(f),d.forEach(function(x){m.set(x,g),g+=x.length})):m=d[0]?new Uint8Array(d[0]):new Uint8Array,m}},t.flush=function(){n.inflateEnd()}}var fdi=T(S(),1);var adi=T(S(),1);var sV="/",DJ=new Date(2107,11,31),BJ=new Date(1980,0,1),zi=void 0,wd="undefined",A0="function";var ldi=T(S(),1);var lv=class{constructor(t){return class extends TransformStream{constructor(n,i){let o=new t(i);super({transform(r,s){s.enqueue(o.append(r))},flush(r){let s=o.flush();s&&r.enqueue(s)}})}}}};var Fqe=64,Yfe=2;try{typeof navigator!=wd&&navigator.hardwareConcurrency&&(Yfe=navigator.hardwareConcurrency)}catch{}var Aqe={chunkSize:512*1024,maxWorkers:Yfe,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:zi,CompressionStreamNative:typeof CompressionStream!=wd&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=wd&&DecompressionStream},ey=Object.assign({},Aqe);function dv(){return ey}function qk(e){return Math.max(e.chunkSize,Fqe)}function aV(e){let{baseURL:t,chunkSize:n,maxWorkers:i,terminateWorkerTimeout:o,useCompressionStream:r,useWebWorkers:s,Deflate:a,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:m}=e;if($g("baseURL",t),$g("chunkSize",n),$g("maxWorkers",i),$g("terminateWorkerTimeout",o),$g("useCompressionStream",r),$g("useWebWorkers",s),a&&(ey.CompressionStream=new lv(a)),c&&(ey.DecompressionStream=new lv(c)),$g("CompressionStream",d),$g("DecompressionStream",u),m!==zi){let{deflate:p,inflate:g}=m;if((p||g)&&(ey.workerScripts||(ey.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");ey.workerScripts.deflate=p}if(g){if(!Array.isArray(g))throw new Error("workerScripts.inflate must be an array");ey.workerScripts.inflate=g}}}function $g(e,t){t!==zi&&(ey[e]=t)}var bdi=T(S(),1);var cui=T(S(),1);var $di=T(S(),1);var Qdi=T(S(),1);var Tdi=T(S(),1);var ydi=T(S(),1),Ofe=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=t>>>1^3988292384:t=t>>>1;Ofe[e]=t}var M0=class{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let i=0,o=t.length|0;i>>8^Ofe[(n^t[i])&255];this.crc=n}get(){return~this.crc}};var uv=class extends TransformStream{constructor(){let t,n=new M0;super({transform(i,o){n.append(i),o.enqueue(i)},flush(){let i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,n.get()),t.value=i}}),t=this}};var kdi=T(S(),1);var Vdi=T(S(),1);function cV(e){if(typeof TextEncoder==wd){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=tl.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,i){for(i===void 0&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(t===0)return i.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;let o=e.length?e[e.length-1]:0,r=tl.getPartial(o);return i.push(tl.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},mv={bytes:{fromBits(e){let n=tl.bitLength(e)/8,i=new Uint8Array(n),o;for(let r=0;r>>24,o<<=8;return i},toBits(e){let t=[],n,i=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");let r=new Uint32Array(n),s=0;for(let a=t.blockSize+i-(t.blockSize+i&t.blockSize-1);a<=o;a+=t.blockSize)t._block(r.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){let e=this,t=e._buffer,n=e._h;t=tl.concat(t,[tl.partial(1,1)]);for(let i=t.length+2;i&15;i++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){if(e<=19)return t&n|~t&i;if(e<=39)return t^n^i;if(e<=59)return t&n|t&i|n&i;if(e<=79)return t^n^i}_S(e,t){return t<>>32-e}_block(e){let t=this,n=t._h,i=Array(80);for(let d=0;d<16;d++)i[d]=e[d];let o=n[0],r=n[1],s=n[2],a=n[3],c=n[4];for(let d=0;d<=79;d++){d>=16&&(i[d]=t._S(1,i[d-3]^i[d-8]^i[d-14]^i[d-16]));let u=t._S(5,o)+t._f(d,r,s,a)+c+i[d]+t._key[Math.floor(d/20)]|0;c=a,a=s,s=t._S(30,r),r=o,o=u}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0}};var YJ={};YJ.aes=class{constructor(e){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let n=t._tables[0][4],i=t._tables[1],o=e.length,r,s,a,c=1;if(o!==4&&o!==6&&o!==8)throw new Error("invalid aes key size");for(t._key=[s=e.slice(0),a=[]],r=o;r<4*o+28;r++){let d=s[r-1];(r%o===0||o===8&&r%o===4)&&(d=n[d>>>24]<<24^n[d>>16&255]<<16^n[d>>8&255]<<8^n[d&255],r%o===0&&(d=d<<8^d>>>24^c<<24,c=c<<1^(c>>7)*283)),s[r]=s[r-o]^d}for(let d=0;r;d++,r--){let u=s[d&3?r:r-4];r<=4||d<4?a[d]=u:a[d]=i[0][n[u>>>24]]^i[1][n[u>>16&255]]^i[2][n[u>>8&255]]^i[3][n[u&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],o=[],r=[],s,a,c,d;for(let u=0;u<256;u++)r[(o[u]=u<<1^(u>>7)*283)^u]=u;for(let u=s=0;!n[u];u^=a||1,s=r[s]||1){let m=s^s<<1^s<<2^s<<3^s<<4;m=m>>8^m&255^99,n[u]=m,i[m]=u,d=o[c=o[a=o[u]]];let p=d*16843009^c*65537^a*257^u*16843008,g=o[m]*257^m*16843008;for(let f=0;f<4;f++)e[f][u]=g=g<<24^g>>>8,t[f][m]=p=p<<24^p>>>8}for(let u=0;u<5;u++)e[u]=e[u].slice(0),t[u]=t[u].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");let n=this._key[t],i=n.length/4-2,o=[0,0,0,0],r=this._tables[t],s=r[0],a=r[1],c=r[2],d=r[3],u=r[4],m=e[0]^n[0],p=e[t?3:1]^n[1],g=e[2]^n[2],f=e[t?1:3]^n[3],x=4,_,C,V;for(let L=0;L>>24]^a[p>>16&255]^c[g>>8&255]^d[f&255]^n[x],C=s[p>>>24]^a[g>>16&255]^c[f>>8&255]^d[m&255]^n[x+1],V=s[g>>>24]^a[f>>16&255]^c[m>>8&255]^d[p&255]^n[x+2],f=s[f>>>24]^a[m>>16&255]^c[p>>8&255]^d[g&255]^n[x+3],x+=4,m=_,p=C,g=V;for(let L=0;L<4;L++)o[t?3&-L:L]=u[m>>>24]<<24^u[p>>16&255]<<16^u[g>>8&255]<<8^u[f&255]^n[x++],_=m,m=p,p=g,g=f,f=_;return o}};var zfe={getRandomValues(e){let t=new Uint32Array(e.buffer),n=i=>{let o=987654321,r=4294967295;return function(){return o=36969*(o&65535)+(o>>16)&r,i=18e3*(i&65535)+(i>>16)&r,(((o<<16)+i&r)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let i=0,o;i>24&255)===255){let t=e>>16&255,n=e>>8&255,i=e&255;t===255?(t=0,n===255?(n=0,i===255?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];let o=tl.bitLength(t);for(let r=0;r>5)+1<<2,r,s,a,c,d,u=new ArrayBuffer(o),m=new DataView(u),p=0,g=tl;for(t=mv.bytes.toBits(t),d=1;p<(o||1);d++){for(r=s=e.encrypt(g.concat(t,[d])),a=1;ao&&(e=new n().update(e).finalize());for(let r=0;rthis.resolveReady=s),password:epe(t,n),signed:i,strength:o-1,pending:new Uint8Array})},async transform(s,a){let c=this,{password:d,strength:u,resolveReady:m,ready:p}=c;d?(await Kqe(c,u,d,Hu(s,0,fv[u]+2)),s=Hu(s,fv[u]+2),r?a.error(new Error(N0)):m()):await p;let g=new Uint8Array(s.length-iy-(s.length-iy)%lV);a.enqueue(qfe(c,s,g,0,iy,!0))},async flush(s){let{signed:a,ctr:c,hmac:d,pending:u,ready:m}=this;if(d&&c){await m;let p=Hu(u,0,u.length-iy),g=Hu(u,u.length-iy),f=new Uint8Array;if(p.length){let x=bv(Gf,p);d.update(x);let _=c.update(x);f=pv(Gf,_)}if(a){let x=Hu(pv(Gf,d.digest()),0,iy);for(let _=0;_this.resolveReady=r),password:epe(t,n),strength:i-1,pending:new Uint8Array})},async transform(r,s){let a=this,{password:c,strength:d,resolveReady:u,ready:m}=a,p=new Uint8Array;c?(p=await Jqe(a,d,c),u()):await m;let g=new Uint8Array(p.length+r.length-r.length%lV);g.set(p,0),s.enqueue(qfe(a,r,g,p.length,0))},async flush(r){let{ctr:s,hmac:a,pending:c,ready:d}=this;if(a&&s){await d;let u=new Uint8Array;if(c.length){let m=s.update(bv(Gf,c));a.update(m),u=pv(Gf,m)}o.signature=pv(Gf,a.digest()).slice(0,iy),r.enqueue(zJ(u,o.signature))}}}),o=this}};function qfe(e,t,n,i,o,r){let{ctr:s,hmac:a,pending:c}=e,d=t.length-o;c.length&&(t=zJ(c,t),n=qqe(n,d-d%lV));let u;for(u=0;u<=d-lV;u+=lV){let m=bv(Gf,Hu(t,u,u+lV));r&&a.update(m);let p=s.update(m);r||a.update(p),n.set(pv(Gf,p),u+i)}return e.pending=Hu(t,u),n}async function Kqe(e,t,n,i){let o=await $fe(e,t,n,Hu(i,0,fv[t])),r=Hu(i,fv[t]);if(o[0]!=r[0]||o[1]!=r[1])throw new Error(ny)}async function Jqe(e,t,n){let i=$k(new Uint8Array(fv[t])),o=await $fe(e,t,n,i);return zJ(i,o)}async function $fe(e,t,n,i){e.password=null;let o=await Qqe(Nqe,n,Dqe,!1,Bqe),r=await jqe(Object.assign({salt:i},HJ),o,8*(hv[t]*2+2)),s=new Uint8Array(r),a=bv(Gf,Hu(s,0,hv[t])),c=bv(Gf,Hu(s,hv[t],hv[t]*2)),d=Hu(s,hv[t]*2);return Object.assign(e,{keys:{key:a,authentication:c,passwordVerification:d},ctr:new Hqe(new Oqe(a),Array.from(Yqe)),hmac:new zqe(c)}),d}async function Qqe(e,t,n,i,o){if(Kfe)try{return await gv.importKey(e,t,n,i,o)}catch{return Kfe=!1,ty.importKey(t)}else return ty.importKey(t)}async function jqe(e,t,n){if(Jfe)try{return await gv.deriveBits(e,t,n)}catch{return Jfe=!1,ty.pbkdf2(t,e.salt,HJ.iterations,n)}else return ty.pbkdf2(t,e.salt,HJ.iterations,n)}function epe(e,t){return t===zi?cV(e):t}function zJ(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function qqe(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function Hu(e,t,n){return e.subarray(t,n)}function pv(e,t){return e.fromBits(t)}function bv(e,t){return e.toBits(t)}var Ydi=T(S(),1);var dV=12,iU=class extends TransformStream{constructor({password:t,passwordVerification:n,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),ope(this,t)},transform(o,r){let s=this;if(s.password){let a=tpe(s,o.subarray(0,dV));if(s.password=null,a[dV-1]!=s.passwordVerification)throw new Error(ny);o=o.subarray(dV)}i?r.error(new Error(N0)):r.enqueue(tpe(s,o))}})}},oU=class extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),ope(this,t)},transform(i,o){let r=this,s,a;if(r.password){r.password=null;let c=$k(new Uint8Array(dV));c[dV-1]=r.passwordVerification,s=new Uint8Array(i.length+c.length),s.set(npe(r,c),0),a=dV}else s=new Uint8Array(i.length),a=0;s.set(npe(r,i),a),o.enqueue(s)}})}};function tpe(e,t){let n=new Uint8Array(t.length);for(let i=0;i>>24]),o=~e.crcKey2.get(),e.keys=[n,i,o]}function rpe(e){let t=e.keys[2]|2;return spe(Math.imul(t,t^1)>>>8)}function spe(e){return e&255}function ipe(e){return e&4294967295}var ape="deflate-raw",rU=class extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:i,CompressionStreamNative:o}){super({});let{compressed:r,encrypted:s,useCompressionStream:a,zipCrypto:c,signed:d,level:u}=t,m=this,p,g,f=cpe(super.readable);(!s||c)&&d&&(p=new uv,f=Ef(f,p)),r&&(f=dpe(f,a,{level:u,chunkSize:n},o,i)),s&&(c?f=Ef(f,new oU(t)):(g=new tU(t),f=Ef(f,g))),lpe(m,f,()=>{let x;s&&!c&&(x=g.signature),(!s||c)&&d&&(x=new DataView(p.value.buffer).getUint32(0)),m.signature=x})}},sU=class extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:i,DecompressionStreamNative:o}){super({});let{zipCrypto:r,encrypted:s,signed:a,signature:c,compressed:d,useCompressionStream:u}=t,m,p,g=cpe(super.readable);s&&(r?g=Ef(g,new iU(t)):(p=new eU(t),g=Ef(g,p))),d&&(g=dpe(g,u,{chunkSize:n},o,i)),(!s||r)&&a&&(m=new uv,g=Ef(g,m)),lpe(this,g,()=>{if((!s||r)&&a){let f=new DataView(m.value.buffer);if(c!=f.getUint32(0,!1))throw new Error(sT)}})}};function cpe(e){return Ef(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function lpe(e,t,n){t=Ef(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function dpe(e,t,n,i,o){try{let r=t&&i?i:o;e=Ef(e,new r(ape,n))}catch{if(t)try{e=Ef(e,new o(ape,n))}catch{return e}else return e}return e}function Ef(e,t){return e.pipeThrough(t)}var upe="message",mpe="start",hpe="pull",JJ="data",fpe="ack",QJ="close",lU="deflate",dU="inflate";var aU=class extends TransformStream{constructor(t,n){super({});let i=this,{codecType:o}=t,r;o.startsWith(lU)?r=rU:o.startsWith(dU)&&(r=sU);let s=0,a=0,c=new r(t,n),d=super.readable,u=new TransformStream({transform(p,g){p&&p.length&&(a+=p.length,g.enqueue(p))},flush(){Object.assign(i,{inputSize:a})}}),m=new TransformStream({transform(p,g){p&&p.length&&(s+=p.length,g.enqueue(p))},flush(){let{signature:p}=c;Object.assign(i,{signature:p,outputSize:s,inputSize:a})}});Object.defineProperty(i,"readable",{get(){return d.pipeThrough(u).pipeThrough(c).pipeThrough(m)}})}},cU=class extends TransformStream{constructor(t){let n;super({transform:i,flush(o){n&&n.length&&o.enqueue(n)}});function i(o,r){if(n){let s=new Uint8Array(n.length+o.length);s.set(n),s.set(o,n.length),o=s,n=null}o.length>t?(r.enqueue(o.slice(0,t)),i(o.slice(t),r)):n=o}}};var iui=T(S(),1);var gpe=typeof Worker!=wd;var uV=class{constructor(t,{readable:n,writable:i},{options:o,config:r,streamOptions:s,useWebWorkers:a,transferStreams:c,scripts:d},u){let{signal:m}=s;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new cU(r.chunkSize)).pipeThrough(new qJ(n,s),{signal:m}),writable:i,options:Object.assign({},o),scripts:d,transferStreams:c,terminate(){return new Promise(p=>{let{worker:g,busy:f}=t;g?(f?t.resolveTerminated=p:(g.terminate(),p()),t.interface=null):p()})},onTaskFinished(){let{resolveTerminated:p}=t;p&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),p()),t.busy=!1,u(t)}}),(a&&gpe?$qe:ype)(t,r)}},qJ=class extends TransformStream{constructor(t,{onstart:n,onprogress:i,size:o,onend:r}){let s=0;super({async start(){n&&await jJ(n,o)},async transform(a,c){s+=a.length,i&&await jJ(i,s,o),c.enqueue(a)},async flush(){t.size=s,r&&await jJ(r,s)}})}};async function jJ(e,...t){try{await e(...t)}catch{}}function ype(e,t){return{run:()=>e$e(e,t)}}function $qe(e,t){let{baseURL:n,chunkSize:i}=t;if(!e.interface){let o;try{o=i$e(e.scripts[0],n,e)}catch{return gpe=!1,ype(e,t)}Object.assign(e,{worker:o,interface:{run:()=>t$e(e,{chunkSize:i})}})}return e.interface}async function e$e({options:e,readable:t,writable:n,onTaskFinished:i},o){try{let r=new aU(e,o);await t.pipeThrough(r).pipeTo(n,{preventClose:!0,preventAbort:!0});let{signature:s,inputSize:a,outputSize:c}=r;return{signature:s,inputSize:a,outputSize:c}}finally{i()}}async function t$e(e,t){let n,i,o=new Promise((p,g)=>{n=p,i=g});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:i,result:o});let{readable:r,options:s,scripts:a}=e,{writable:c,closed:d}=n$e(e.writable),u=uU({type:mpe,scripts:a.slice(1),options:s,config:t,readable:r,writable:c},e);u||Object.assign(e,{reader:r.getReader(),writer:c.getWriter()});let m=await o;return u||await c.getWriter().close(),await d,m}function n$e(e){let t,n=new Promise(o=>t=o);return{writable:new WritableStream({async write(o){let r=e.getWriter();await r.ready,await r.write(o),r.releaseLock()},close(){t()},abort(o){return e.getWriter().abort(o)}}),closed:n}}var ppe=!0,bpe=!0;function i$e(e,t,n){let i={type:"module"},o,r;typeof e==A0&&(e=e());try{o=new URL(e,t)}catch{o=e}if(ppe)try{r=new Worker(o)}catch{ppe=!1,r=new Worker(o,i)}else r=new Worker(o,i);return r.addEventListener(upe,s=>o$e(s,n)),r}function uU(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:o}){try{let{value:r,readable:s,writable:a}=e,c=[];if(r&&(r.byteLength!C.busy);if(_)return _pe(_),new uV(_,e,t,x);if(aT.length$J.push({resolve:C,stream:e,workerOptions:t}))}function x(_){if($J.length){let[{resolve:C,stream:V,workerOptions:L}]=$J.splice(0,1);C(new uV(_,V,L,x))}else _.worker?(_pe(_),r$e(_,t)):aT=aT.filter(C=>C!=_)}}function r$e(e,t){let{config:n}=t,{terminateWorkerTimeout:i}=n;Number.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{aT=aT.filter(o=>o!=e);try{await e.terminate()}catch{}},i))}function _pe(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}var mui=T(S(),1);var s$e="Writer iterator completed too soon",a$e="text/plain";var c$e="Content-Type";var l$e=64*1024,nQ="writable",mV=class{constructor(){this.size=0}init(){this.initialized=!0}},hU=class extends mV{get readable(){let t=this,{chunkSize:n=l$e}=t,i=new ReadableStream({start(){this.chunkOffset=0},async pull(o){let{offset:r=0,size:s,diskNumberStart:a}=i,{chunkOffset:c}=this;o.enqueue(await Ia(t,r+c,Math.min(n,s-c),a)),c+n>s?o.close():this.chunkOffset+=n}});return i}},eQ=class extends mV{constructor(){super();let t=this,n=new WritableStream({write(i){return t.writeUint8Array(i)}});Object.defineProperty(t,nQ,{get(){return n}})}writeUint8Array(){}};var fU=class extends eQ{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){let n=this,i=0,o=n.pending,r=n.pending.length;for(n.pending="",i=0;i2?n.data+=btoa(o):n.pending=o}getData(){return this.data+btoa(this.pending)}},k0=class extends hU{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){let i=this,o=t+n,s=await(t||on&&(s=s.slice(t,o)),new Uint8Array(s)}},yv=class extends mV{constructor(t){super();let n=this,i=new TransformStream,o=[];t&&o.push([c$e,t]),Object.defineProperty(n,nQ,{get(){return i.writable}}),n.blob=new Response(i.readable,{headers:o}).blob()}getData(){return this.blob}},pU=class extends k0{constructor(t){super(new Blob([t],{type:a$e}))}},bU=class extends yv{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){let{encoding:t,utf8:n}=this,i=await super.getData();if(i.text&&n)return i.text();{let o=new FileReader;return new Promise((r,s)=>{Object.assign(o,{onload:({target:a})=>r(a.result),onerror:()=>s(o.error)}),o.readAsText(i,t)})}}};var tQ=class extends hU{constructor(t){super(),this.readers=t}async init(){let t=this,{readers:n}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(n.map(async(i,o)=>{await i.init(),o!=n.length-1&&(t.lastDiskOffset+=i.size),t.size+=i.size})),super.init()}async readUint8Array(t,n,i=0){let o=this,{readers:r}=this,s,a=i;a==-1&&(a=r.length-1);let c=t;for(;c>=r[a].size;)c-=r[a].size,a++;let d=r[a],u=d.size;if(c+n<=u)s=await Ia(d,c,n);else{let m=u-c;s=new Uint8Array(n),s.set(await Ia(d,c,m)),s.set(await o.readUint8Array(t+m,n-m,i),m)}return o.lastDiskNumber=Math.max(a,o.lastDiskNumber),s}},gU=class extends mV{constructor(t,n=4294967295){super();let i=this;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});let o,r,s,a=new WritableStream({async write(u){let{availableSize:m}=i;if(s)u.length>=m?(await c(u.slice(0,m)),await d(),i.diskOffset+=o.size,i.diskNumber++,s=null,await this.write(u.slice(m))):await c(u);else{let{value:p,done:g}=await t.next();if(g&&!p)throw new Error(s$e);o=p,o.size=0,o.maxSize&&(i.maxSize=o.maxSize),i.availableSize=i.maxSize,await If(o),r=p.writable,s=r.getWriter(),await this.write(u)}},async close(){await s.ready,await d()}});Object.defineProperty(i,nQ,{get(){return a}});async function c(u){let m=u.length;m&&(await s.ready,await s.write(u),o.size+=m,i.size+=m,i.availableSize-=m)}async function d(){r.size=o.size,await s.close()}}};async function If(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function yU(e){return Array.isArray(e)&&(e=new tQ(e)),e instanceof ReadableStream&&(e={readable:e}),e}function xU(e){e.writable===zi&&typeof e.next==A0&&(e=new gU(e)),e instanceof WritableStream&&(e={writable:e});let{writable:t}=e;return t.size===zi&&(t.size=0),e instanceof gU||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function Ia(e,t,n,i){return e.readUint8Array(t,n,i)}var Gui=T(S(),1);var gui=T(S(),1);var fui=T(S(),1),Tpe="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),d$e=Tpe.length==256;function Spe(e){if(d$e){let t="";for(let n=0;nthis[n]=t[n])}};var fQ="File format is not recognized",p$e="End of central directory not found",b$e="End of Zip64 central directory locator not found",g$e="Central directory header not found",y$e="Local file header not found",x$e="Zip64 extra field not found",_$e="File contains encrypted entry",T$e="Encryption method not supported",Lpe="Compression method not supported",Rpe="Split zip file",Zpe="utf-8",Gpe="cp437",S$e=[[aQ,4294967295],[cQ,4294967295],[lQ,4294967295],[_U,65535]],C$e={[65535]:{getValue:ls,bytes:4},[4294967295]:{getValue:SU,bytes:8}},EU=class{constructor(t,n={}){Object.assign(this,{reader:yU(t),options:n,config:dv()})}async*getEntriesGenerator(t={}){let n=this,{reader:i}=n,{config:o}=n;if(await If(i),(i.size===zi||!i.readUint8Array)&&(i=new k0(await new Response(i.readable).blob()),await If(i)),i.size<22)throw new Error(fQ);i.chunkSize=qk(o);let r=await G$e(i,101010256,i.size,22,65535*16);if(!r){let A=await Ia(i,0,4),b=da(A);throw ls(b)==134695760?new Error(Rpe):new Error(p$e)}let s=da(r),a=ls(s,12),c=ls(s,16),d=r.offset,u=la(s,20),m=d+22+u,p=la(s,4),g=i.lastDiskNumber||0,f=la(s,6),x=la(s,8),_=0,C=0;if(c==4294967295||a==4294967295||x==65535||f==65535){let A=await Ia(i,r.offset-20,20),b=da(A);if(ls(b,0)==117853008){c=SU(b,8);let R=await Ia(i,c,56,-1),E=da(R),I=r.offset-20-56;if(ls(E,0)!=101075792&&c!=I){let w=c;c=I,_=c-w,R=await Ia(i,c,56,-1),E=da(R)}if(ls(E,0)!=101075792)throw new Error(b$e);p==65535&&(p=ls(E,16)),f==65535&&(f=ls(E,20)),x==65535&&(x=SU(E,32)),a==4294967295&&(a=SU(E,40)),c-=a}}if(c>=i.size&&(_=i.size-c-a-22,c=i.size-a-22),g!=p)throw new Error(Rpe);if(c<0)throw new Error(fQ);let V=0,L=await Ia(i,c,a,f),Z=da(L);if(a){let A=r.offset-a;if(ls(Z,V)!=33639248&&c!=A){let b=c;c=A,_+=c-b,L=await Ia(i,c,a,f),Z=da(L)}}let G=r.offset-c-(i.lastDiskOffset||0);if(a!=G&&G>=0&&(a=G,L=await Ia(i,c,a,f),Z=da(L)),c<0||c>=i.size)throw new Error(fQ);let X=Yl(n,t,"filenameEncoding"),v=Yl(n,t,"commentEncoding");for(let A=0;Ab.getData(Xe,Se,Pe),V=k;let{onprogress:Le}=t;if(Le)try{await Le(A+1,x,new oy(b))}catch{}yield Se}let P=Yl(n,t,"extractPrependedData"),F=Yl(n,t,"extractAppendedData");return P&&(n.prependedData=C>0?await Ia(i,0,C):new Uint8Array),n.comment=u?await Ia(i,d+22,u):new Uint8Array,F&&(n.appendedData=m>>8&255:p>>>24&255),signature:p,compressed:d!=0,encrypted:G,useWebWorkers:Yl(o,i,"useWebWorkers"),useCompressionStream:Yl(o,i,"useCompressionStream"),transferStreams:Yl(o,i,"transferStreams"),checkPasswordOnly:b},config:u,streamOptions:{signal:A,size:P,onstart:E,onprogress:I,onend:w}},B=0;try{({outputSize:B}=await mU({readable:F,writable:R},N))}catch(U){if(!b||U.message!=N0)throw U}finally{let U=Yl(o,i,"preventClose");R.size+=B,!U&&!R.locked&&await R.getWriter().close()}return b?zi:t.getData?t.getData():R}};function Xpe(e,t,n){let i=e.rawBitFlag=la(t,n+2),o=(i&1)==1,r=ls(t,n+6);Object.assign(e,{encrypted:o,version:la(t,n),bitFlag:{level:(i&6)>>1,dataDescriptor:(i&8)==8,languageEncodingFlag:(i&2048)==2048},rawLastModDate:r,lastModDate:E$e(r),filenameLength:la(t,n+22),extraFieldLength:la(t,n+24)})}async function Ipe(e,t,n,i,o){let{rawExtraField:r}=t,s=t.extraField=new Map,a=da(new Uint8Array(r)),c=0;try{for(;ct[o]==r);for(let o=0,r=0;o=5&&(r.push(hV),s.push(TU));let a=1;r.forEach((c,d)=>{if(e.data.length>=a+4){let u=ls(i,a);t[c]=e[c]=new Date(u*1e3);let m=s[d];e[m]=u}a+=4})}async function G$e(e,t,n,i,o){let r=new Uint8Array(4),s=da(r);X$e(s,0,t);let a=i+o;return await c(i)||await c(Math.min(a,n));async function c(d){let u=n-d,m=await Ia(e,u,d);for(let p=m.length-i;p>=0;p--)if(m[p]==r[0]&&m[p+1]==r[1]&&m[p+2]==r[2]&&m[p+3]==r[3])return{offset:u+p,buffer:m.slice(p,p+i).buffer}}}function Yl(e,t,n){return t[n]===zi?e.options[n]:t[n]}function E$e(e){let t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function pQ(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function fV(e,t){return e.getUint8(t)}function la(e,t){return e.getUint16(t,!0)}function ls(e,t){return e.getUint32(t,!0)}function SU(e,t){return Number(e.getBigUint64(t,!0))}function X$e(e,t,n){e.setUint32(t,n,!0)}function da(e){return new DataView(e.buffer)}var Fui=T(S(),1);var v$e="File already exists",w$e="Zip file comment exceeds 64KB",F$e="File entry comment exceeds 64KB",A$e="File entry name exceeds 64KB",vpe="Version exceeds 65535",M$e="The strength must equal 1, 2, or 3",N$e="Extra field type exceeds 65535",k$e="Extra field data exceeds 64KB",XQ="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",wpe=new Uint8Array([7,0,2,0,65,69,3,0,0]),GQ=0,Fpe=[],WU=class{constructor(t,n={}){t=xU(t);let i=t.availableSize!==zi&&t.availableSize>0&&t.availableSize!==1/0&&t.maxSize!==zi&&t.maxSize>0&&t.maxSize!==1/0;Object.assign(this,{writer:t,addSplitZipSignature:i,options:n,config:dv(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async add(t="",n,i={}){let o=this,{pendingAddFileCalls:r,config:s}=o;GQFpe.push(c));let a;try{if(t=t.trim(),o.filenames.has(t))throw new Error(v$e);return o.filenames.add(t),a=U$e(o,t,n,i),r.add(a),await a}catch(c){throw o.filenames.delete(t),c}finally{r.delete(a);let c=Fpe.shift();c?c():GQ--}}async close(t=new Uint8Array,n={}){let i=this,{pendingAddFileCalls:o,writer:r}=this,{writable:s}=r;for(;o.size;)await Promise.allSettled(Array.from(o));return await Q$e(this,t,n),Uo(i,n,"preventClose")||await s.getWriter().close(),r.getData?r.getData():s}};async function U$e(e,t,n,i){t=t.trim(),i.directory&&!t.endsWith(sV)?t+=sV:i.directory=t.endsWith(sV);let o=Uo(e,i,"encodeText",cV),r=o(t);if(r===zi&&(r=cV(t)),Di(r)>65535)throw new Error(A$e);let s=i.comment||"",a=o(s);if(a===zi&&(a=cV(s)),Di(a)>65535)throw new Error(F$e);let c=Uo(e,i,"version",20);if(c>65535)throw new Error(vpe);let d=Uo(e,i,"versionMadeBy",20);if(d>65535)throw new Error(vpe);let u=Uo(e,i,hV,new Date),m=Uo(e,i,_v),p=Uo(e,i,Tv),g=Uo(e,i,mQ,!0),f=Uo(e,i,dQ,0),x=Uo(e,i,uQ,0),_=Uo(e,i,"password"),C=Uo(e,i,"rawPassword"),V=Uo(e,i,"encryptionStrength",3),L=Uo(e,i,"zipCrypto"),Z=Uo(e,i,"extendedTimestamp",!0),G=Uo(e,i,"keepOrder",!0),X=Uo(e,i,"level"),v=Uo(e,i,"useWebWorkers"),P=Uo(e,i,"bufferedWrite"),F=Uo(e,i,"dataDescriptorSignature",!1),A=Uo(e,i,"signal"),b=Uo(e,i,"useCompressionStream"),R=Uo(e,i,"dataDescriptor",!0),E=Uo(e,i,hQ);if(_!==zi&&V!==zi&&(V<1||V>3))throw new Error(M$e);let I=new Uint8Array,{extraField:w}=i;if(w){let Le=0,Xe=0;w.forEach(Pe=>Le+=4+Di(Pe)),I=new Uint8Array(Le),w.forEach((Pe,ke)=>{if(ke>65535)throw new Error(N$e);if(Di(Pe)>65535)throw new Error(k$e);_s(I,new Uint16Array([ke]),Xe),_s(I,new Uint16Array([Di(Pe)]),Xe+2),_s(I,Pe,Xe+4),Xe+=4+Di(Pe)})}let N=0,B=0,U=0,O=E===!0;n&&(n=yU(n),await If(n),n.size===zi?(R=!0,(E||E===zi)&&(E=!0,U=N=4294967296)):(U=n.size,N=j$e(U)));let{diskOffset:k,diskNumber:J,maxSize:H}=e.writer,ee=O||U>4294967295,z=O||N>4294967295,j=O||e.offset+e.pendingEntriesSize-k>4294967295,be=Uo(e,i,"supportZip64SplitFile",!0)&&O||J+Math.ceil(e.pendingEntriesSize/H)>65535;if(j||ee||z||be){if(E===!1||!G)throw new Error(XQ);E=!0}E=E||!1,i=Object.assign({},i,{rawFilename:r,rawComment:a,version:c,versionMadeBy:d,lastModDate:u,lastAccessDate:m,creationDate:p,rawExtraField:I,zip64:E,zip64UncompressedSize:ee,zip64CompressedSize:z,zip64Offset:j,zip64DiskNumberStart:be,password:_,rawPassword:C,level:!b&&e.config.CompressionStream===zi&&e.config.CompressionStreamNative===zi?0:X,useWebWorkers:v,encryptionStrength:V,extendedTimestamp:Z,zipCrypto:L,bufferedWrite:P,keepOrder:G,dataDescriptor:R,dataDescriptorSignature:F,signal:A,msDosCompatible:g,internalFileAttribute:f,externalFileAttribute:x,useCompressionStream:b});let Te=Y$e(i),ae=H$e(i),ye=Di(Te.localHeaderArray,ae.dataDescriptorArray);B=ye+N,e.options.usdz&&(B+=B+64),e.pendingEntriesSize+=B;let Se;try{Se=await D$e(e,t,n,{headerInfo:Te,dataDescriptorInfo:ae,metadataSize:ye},i)}finally{e.pendingEntriesSize-=B}return Object.assign(Se,{name:t,comment:s,extraField:w}),new oy(Se)}async function D$e(e,t,n,i,o){let{files:r,writer:s}=e,{keepOrder:a,dataDescriptor:c,signal:d}=o,{headerInfo:u}=i,{usdz:m}=e.options,p=Array.from(r.values()).pop(),g={},f,x,_,C,V,L,Z;r.set(t,g);try{let P;a&&(P=p&&p.lock,G()),(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&a||!c)&&!m?(L=new TransformStream,Z=new Response(L.readable).blob(),L.writable.size=0,f=!0,e.bufferedWrites++,await If(s)):(L=s,await X()),await If(L);let{writable:F}=s,{diskOffset:A}=s;if(e.addSplitZipSignature){delete e.addSplitZipSignature;let R=new Uint8Array(4),E=Wa(R);Ui(E,0,134695760),await Wf(F,R),e.offset+=4}m&&O$e(i,e.offset-A),f||(await P,await v(F));let{diskNumber:b}=s;if(V=!0,g.diskNumberStart=b,g=await B$e(n,L,g,i,e.config,o),V=!1,r.set(t,g),g.filename=t,f){await L.writable.getWriter().close();let R=await Z;await P,await X(),C=!0,c||(R=await K$e(g,R,F,o)),await v(F),g.diskNumberStart=s.diskNumber,A=s.diskOffset,await R.stream().pipeTo(F,{preventClose:!0,preventAbort:!0,signal:d}),F.size+=R.size,C=!1}if(g.offset=e.offset-A,g.zip64)J$e(g,o);else if(g.offset>4294967295)throw new Error(XQ);return e.offset+=g.size,g}catch(P){if(f&&C||!f&&V){if(e.hasCorruptedEntries=!0,P)try{P.corruptedEntry=!0}catch{}f?e.offset+=L.writable.size:e.offset=L.writable.size}throw r.delete(t),P}finally{f&&e.bufferedWrites--,_&&_(),x&&x()}function G(){g.lock=new Promise(P=>_=P)}async function X(){e.writerLocked=!0;let{lockWriter:P}=e;e.lockWriter=new Promise(F=>x=()=>{e.writerLocked=!1,F()}),await P}async function v(P){Di(u.localHeaderArray)>s.availableSize&&(s.availableSize=0,await Wf(P,new Uint8Array))}}async function B$e(e,t,{diskNumberStart:n,lock:i},o,r,s){let{headerInfo:a,dataDescriptorInfo:c,metadataSize:d}=o,{localHeaderArray:u,headerArray:m,lastModDate:p,rawLastModDate:g,encrypted:f,compressed:x,version:_,compressionMethod:C,rawExtraFieldExtendedTimestamp:V,extraFieldExtendedTimestampFlag:L,rawExtraFieldNTFS:Z,rawExtraFieldAES:G}=a,{dataDescriptorArray:X}=c,{rawFilename:v,lastAccessDate:P,creationDate:F,password:A,rawPassword:b,level:R,zip64:E,zip64UncompressedSize:I,zip64CompressedSize:w,zip64Offset:N,zip64DiskNumberStart:B,zipCrypto:U,dataDescriptor:O,directory:k,versionMadeBy:J,rawComment:H,rawExtraField:ee,useWebWorkers:z,onstart:j,onprogress:q,onend:be,signal:Te,encryptionStrength:ae,extendedTimestamp:ye,msDosCompatible:Se,internalFileAttribute:Le,externalFileAttribute:Xe,useCompressionStream:Pe}=s,ke={lock:i,versionMadeBy:J,zip64:E,directory:!!k,filenameUTF8:!0,rawFilename:v,commentUTF8:!0,rawComment:H,rawExtraFieldExtendedTimestamp:V,rawExtraFieldNTFS:Z,rawExtraFieldAES:G,rawExtraField:ee,extendedTimestamp:ye,msDosCompatible:Se,internalFileAttribute:Le,externalFileAttribute:Xe,diskNumberStart:n},Pt=0,Ot=0,ht,{writable:Ae}=t;if(e){e.chunkSize=qk(r),await Wf(Ae,u);let Qe=e.readable,je=Qe.size=e.size,kt={options:{codecType:lU,level:R,rawPassword:b,password:A,encryptionStrength:ae,zipCrypto:f&&U,passwordVerification:f&&U&&g>>8&255,signed:!0,compressed:x,encrypted:f,useWebWorkers:z,useCompressionStream:Pe,transferStreams:!1},config:r,streamOptions:{signal:Te,size:je,onstart:j,onprogress:q,onend:be}},pe=await mU({readable:Qe,writable:Ae},kt);Ot=pe.inputSize,Pt=pe.outputSize,ht=pe.signature,Ae.size+=Ot}else await Wf(Ae,u);let $e;if(E){let Qe=4;I&&(Qe+=8),w&&(Qe+=8),N&&(Qe+=8),B&&(Qe+=4),$e=new Uint8Array(Qe)}else $e=new Uint8Array;return z$e({signature:ht,rawExtraFieldZip64:$e,compressedSize:Pt,uncompressedSize:Ot,headerInfo:a,dataDescriptorInfo:c},s),O&&await Wf(Ae,X),Object.assign(ke,{uncompressedSize:Ot,compressedSize:Pt,lastModDate:p,rawLastModDate:g,creationDate:F,lastAccessDate:P,encrypted:f,size:d+Pt,compressionMethod:C,version:_,headerArray:m,signature:ht,rawExtraFieldZip64:$e,extraFieldExtendedTimestampFlag:L,zip64UncompressedSize:I,zip64CompressedSize:w,zip64Offset:N,zip64DiskNumberStart:B}),ke}function Y$e(e){let{rawFilename:t,lastModDate:n,lastAccessDate:i,creationDate:o,rawPassword:r,password:s,level:a,zip64:c,zipCrypto:d,dataDescriptor:u,directory:m,rawExtraField:p,encryptionStrength:g,extendedTimestamp:f}=e,x=a!==0&&!m,_=!!(s&&Di(s)||r&&Di(r)),C=e.version,V;if(_&&!d){V=new Uint8Array(Di(wpe)+2);let B=Wa(V);no(B,0,39169),_s(V,wpe,2),PU(B,8,g)}else V=new Uint8Array;let L,Z,G;if(f){Z=new Uint8Array(9+(i?4:0)+(o?4:0));let B=Wa(Z);no(B,0,21589),no(B,2,Di(Z)-4),G=1+(i?2:0)+(o?4:0),PU(B,4,G);let U=5;Ui(B,U,Math.floor(n.getTime()/1e3)),U+=4,i&&(Ui(B,U,Math.floor(i.getTime()/1e3)),U+=4),o&&Ui(B,U,Math.floor(o.getTime()/1e3));try{L=new Uint8Array(36);let O=Wa(L),k=EQ(n);no(O,0,10),no(O,2,32),no(O,8,1),no(O,10,24),Ol(O,12,k),Ol(O,20,EQ(i)||k),Ol(O,28,EQ(o)||k)}catch{L=new Uint8Array}}else L=Z=new Uint8Array;let X=2048;u&&(X=X|8);let v=0;x&&(v=8),c&&(C=C>45?C:45),_&&(X=X|1,d||(C=C>51?C:51,v=99,x&&(V[9]=8)));let P=new Uint8Array(26),F=Wa(P);no(F,0,C),no(F,2,X),no(F,4,v);let A=new Uint32Array(1),b=Wa(A),R;nDJ?R=DJ:R=n,no(b,0,(R.getHours()<<6|R.getMinutes())<<5|R.getSeconds()/2),no(b,2,(R.getFullYear()-1980<<4|R.getMonth()+1)<<5|R.getDate());let E=A[0];Ui(F,6,E),no(F,22,Di(t));let I=Di(V,Z,L,p);no(F,24,I);let w=new Uint8Array(30+Di(t)+I),N=Wa(w);return Ui(N,0,67324752),_s(w,P,4),_s(w,t,30),_s(w,V,30+Di(t)),_s(w,Z,30+Di(t,V)),_s(w,L,30+Di(t,V,Z)),_s(w,p,30+Di(t,V,Z,L)),{localHeaderArray:w,headerArray:P,headerView:F,lastModDate:n,rawLastModDate:E,encrypted:_,compressed:x,version:C,compressionMethod:v,extraFieldExtendedTimestampFlag:G,rawExtraFieldExtendedTimestamp:Z,rawExtraFieldNTFS:L,rawExtraFieldAES:V,extraFieldLength:I}}function O$e(e,t){let{headerInfo:n}=e,{localHeaderArray:i,extraFieldLength:o}=n,r=Wa(i),s=64-(t+Di(i))%64;s<4&&(s+=64);let a=new Uint8Array(s),c=Wa(a);no(c,0,6534),no(c,2,s-2);let d=i;n.localHeaderArray=i=new Uint8Array(Di(d)+s),_s(i,d),_s(i,a,Di(d)),r=Wa(i),no(r,28,o+s),e.metadataSize+=s}function H$e(e){let{zip64:t,dataDescriptor:n,dataDescriptorSignature:i}=e,o=new Uint8Array,r,s=0;return n&&(o=new Uint8Array(t?i?24:20:i?16:12),r=Wa(o),i&&(s=4,Ui(r,0,134695760))),{dataDescriptorArray:o,dataDescriptorView:r,dataDescriptorOffset:s}}function z$e(e,t){let{signature:n,rawExtraFieldZip64:i,compressedSize:o,uncompressedSize:r,headerInfo:s,dataDescriptorInfo:a}=e,{headerView:c,encrypted:d}=s,{dataDescriptorView:u,dataDescriptorOffset:m}=a,{zip64:p,zip64UncompressedSize:g,zip64CompressedSize:f,zipCrypto:x,dataDescriptor:_}=t;if((!d||x)&&n!==zi&&(Ui(c,10,n),_&&Ui(u,m,n)),p){let C=Wa(i);no(C,0,1),no(C,2,Di(i)-4);let V=4;g&&(Ui(c,18,4294967295),Ol(C,V,BigInt(r)),V+=8),f&&(Ui(c,14,4294967295),Ol(C,V,BigInt(o))),_&&(Ol(u,m+4,BigInt(o)),Ol(u,m+12,BigInt(r)))}else Ui(c,14,o),Ui(c,18,r),_&&(Ui(u,m+4,o),Ui(u,m+8,r))}async function K$e(e,t,n,{zipCrypto:i}){let o;o=await t.slice(0,26).arrayBuffer(),o.byteLength!=26&&(o=o.slice(0,26));let r=new DataView(o);return(!e.encrypted||i)&&Ui(r,14,e.signature),e.zip64?(Ui(r,18,4294967295),Ui(r,22,4294967295)):(Ui(r,18,e.compressedSize),Ui(r,22,e.uncompressedSize)),await Wf(n,new Uint8Array(o)),t.slice(o.byteLength)}function J$e(e,t){let{rawExtraFieldZip64:n,offset:i,diskNumberStart:o}=e,{zip64UncompressedSize:r,zip64CompressedSize:s,zip64Offset:a,zip64DiskNumberStart:c}=t,d=Wa(n),u=4;r&&(u+=8),s&&(u+=8),a&&(Ol(d,u,BigInt(i)),u+=8),c&&Ui(d,u,o)}async function Q$e(e,t,n){let{files:i,writer:o}=e,{diskOffset:r,writable:s}=o,{diskNumber:a}=o,c=0,d=0,u=e.offset-r,m=i.size;for(let[,G]of i){let{rawFilename:X,rawExtraFieldZip64:v,rawExtraFieldAES:P,rawComment:F,rawExtraFieldNTFS:A,rawExtraField:b,extendedTimestamp:R,extraFieldExtendedTimestampFlag:E,lastModDate:I}=G,w;if(R){w=new Uint8Array(9);let N=Wa(w);no(N,0,21589),no(N,2,5),PU(N,4,E),Ui(N,5,Math.floor(I.getTime()/1e3))}else w=new Uint8Array;G.rawExtraFieldCDExtendedTimestamp=w,d+=46+Di(X,F,v,P,A,w,b)}let p=new Uint8Array(d),g=Wa(p);await If(o);let f=0;for(let[G,X]of Array.from(i.values()).entries()){let{offset:v,rawFilename:P,rawExtraFieldZip64:F,rawExtraFieldAES:A,rawExtraFieldCDExtendedTimestamp:b,rawExtraFieldNTFS:R,rawExtraField:E,rawComment:I,versionMadeBy:w,headerArray:N,directory:B,zip64:U,zip64UncompressedSize:O,zip64CompressedSize:k,zip64DiskNumberStart:J,zip64Offset:H,msDosCompatible:ee,internalFileAttribute:z,externalFileAttribute:j,diskNumberStart:q,uncompressedSize:be,compressedSize:Te}=X,ae=Di(F,A,b,R,E);Ui(g,c,33639248),no(g,c+4,w);let ye=Wa(N);O||Ui(ye,18,be),k||Ui(ye,14,Te),_s(p,N,c+6),no(g,c+30,ae),no(g,c+32,Di(I)),no(g,c+34,U&&J?65535:q),no(g,c+36,z),j?Ui(g,c+38,j):B&&ee&&PU(g,c+38,16),Ui(g,c+42,U&&H?4294967295:v),_s(p,P,c+46),_s(p,F,c+46+Di(P)),_s(p,A,c+46+Di(P,F)),_s(p,b,c+46+Di(P,F,A)),_s(p,R,c+46+Di(P,F,A,b)),_s(p,E,c+46+Di(P,F,A,b,R)),_s(p,I,c+46+Di(P)+ae);let Se=46+Di(P,I)+ae;if(c-f>o.availableSize&&(o.availableSize=0,await Wf(s,p.slice(f,c)),f=c),c+=Se,n.onprogress)try{await n.onprogress(G+1,i.size,new oy(X))}catch{}}await Wf(s,f?p.slice(f):p);let x=o.diskNumber,{availableSize:_}=o;_<22&&x++;let C=Uo(e,n,"zip64");if(u>4294967295||d>4294967295||m>65535||x>65535){if(C===!1)throw new Error(XQ);C=!0}let V=new Uint8Array(C?98:22),L=Wa(V);c=0,C&&(Ui(L,0,101075792),Ol(L,4,BigInt(44)),no(L,12,45),no(L,14,45),Ui(L,16,x),Ui(L,20,a),Ol(L,24,BigInt(m)),Ol(L,32,BigInt(m)),Ol(L,40,BigInt(d)),Ol(L,48,BigInt(u)),Ui(L,56,117853008),Ol(L,64,BigInt(u)+BigInt(d)),Ui(L,72,x+1),Uo(e,n,"supportZip64SplitFile",!0)&&(x=65535,a=65535),m=65535,u=4294967295,d=4294967295,c+=76),Ui(L,c,101010256),no(L,c+4,x),no(L,c+6,a),no(L,c+8,m),no(L,c+10,m),Ui(L,c+12,d),Ui(L,c+16,u);let Z=Di(t);if(Z)if(Z<=65535)no(L,c+20,Z);else throw new Error(w$e);await Wf(s,V),Z&&await Wf(s,t)}async function Wf(e,t){let n=e.getWriter();try{await n.ready,e.size+=Di(t),await n.write(t)}finally{n.releaseLock()}}function EQ(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function Uo(e,t,n,i){let o=t[n]===zi?e.options[n]:t[n];return o===zi?i:o}function j$e(e){return e+5*(Math.floor(e/16383)+1)}function PU(e,t,n){e.setUint8(t,n)}function no(e,t,n){e.setUint16(t,n,!0)}function Ui(e,t,n){e.setUint32(t,n,!0)}function Ol(e,t,n){e.setBigUint64(t,n,!0)}function _s(e,t,n){e.set(t,n)}function Wa(e){return new DataView(e.buffer)}function Di(...e){let t=0;return e.forEach(n=>n&&(t+=n.length)),t}aV({Deflate:Tfe,Inflate:Bfe});var Jui=T(S(),1);function q$e(e){return typeof e=="string"&&(e=document.getElementById(e)),e}var In=q$e;var jui=T(S(),1);function $$e(e,t){this.position=e,this.headingPitchRange=t}var Vv=$$e;var tmi=T(S(),1);function vU(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new ge,this.tourEnd=new ge,this.entryStart=new ge,this.entryEnd=new ge,this._activeEntries=[]}vU.prototype.addPlaylistEntry=function(e){this.playlist.push(e)};vU.prototype.play=function(e,t){this.tourStart.raiseEvent();let n=this;Npe.call(this,e,t,function(i){n.playlistIndex=0,i||Mpe(n._activeEntries),n.tourEnd.raiseEvent(i)})};vU.prototype.stop=function(){Mpe(this._activeEntries)};function Mpe(e){for(let t=e.pop();t!==void 0;t=e.pop())t.stop()}function Npe(e,t,n){let i=this.playlist[this.playlistIndex];if(i){let o=eet.bind(this,e,t,n);if(this._activeEntries.push(i),this.entryStart.raiseEvent(i),i.blocking)i.play(o,e.scene.camera,t);else{let r=this;i.play(function(){r.entryEnd.raiseEvent(i);let s=r._activeEntries.indexOf(i);s>=0&&r._activeEntries.splice(s,1)}),o(e,t,n)}}else l(n)&&n(!1)}function eet(e,t,n,i){let o=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(o,i),i)n(i);else{let r=this._activeEntries.indexOf(o);r>=0&&this._activeEntries.splice(r,1),this.playlistIndex++,Npe.call(this,e,t,n)}}var Lv=vU;var ymi=T(S(),1);var mmi=T(S(),1);var lmi=T(S(),1),Zi=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var t=1.70158;return e===1?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return e===0?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Zi.Bounce.Out(1-e)},Out:function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375},InOut:function(e){return e<.5?Zi.Bounce.In(e*2)*.5:Zi.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e1e4?1e4:e,{In:function(t){return Math.pow(t,e)},Out:function(t){return 1-Math.pow(1-t,e)},InOut:function(t){return t<.5?Math.pow(t*2,e)/2:(1-Math.pow(2-t*2,e))/2+.5}}}}),Rv=function(){return performance.now()},tet=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(n){return t._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},e.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},e.prototype.update=function(t,n){t===void 0&&(t=Rv()),n===void 0&&(n=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o1?r(e[n],e[n-1],n-i):r(e[o],e[o+1>n?n:o+1],i-o)},Bezier:function(e,t){for(var n=0,i=e.length-1,o=Math.pow,r=pV.Utils.Bernstein,s=0;s<=i;s++)n+=o(1-t,i-s)*o(t,s)*e[s]*r(i,s);return n},CatmullRom:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=pV.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(o=Math.floor(i=n*(1+t))),r(e[(o-1+n)%n],e[o],e[(o+1)%n],e[(o+2)%n],i-o)):t<0?e[0]-(r(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[n]-(r(e[n],e[n],e[n-1],e[n-1],i-n)-e[n]):r(e[o?o-1:0],e[o],e[n1;i--)n*=i;return e[t]=n,n}}(),CatmullRom:function(e,t,n,i,o){var r=(n-e)*.5,s=(i-t)*.5,a=o*o,c=o*a;return(2*t-2*n+r+s)*c+(-3*t+3*n-2*r-s)*a+r*o+t}}},kpe=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),IQ=new tet,Upe=function(){function e(t,n){n===void 0&&(n=IQ),this._object=t,this._group=n,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Zi.Linear.None,this._interpolationFunction=pV.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=kpe.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(t,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},e.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,n){if(t===void 0&&(t=Rv()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var r in this._valuesEnd)o[r]=this._valuesEnd[r];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},e.prototype._setupProperties=function(t,n,i,o,r){for(var s in i){var a=t[s],c=Array.isArray(a),d=c?"array":typeof a,u=!c&&Array.isArray(i[s]);if(!(d==="undefined"||d==="function")){if(u){var m=i[s];if(m.length===0)continue;for(var p=[a],g=0,f=m.length;g"u"||r)&&(n[s]=a),c||(n[s]*=1),u?o[s]=i[s].slice().reverse():o[s]=n[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(t){return t===void 0&&(t=Rv()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this),this)},e.prototype.resume=function(t){return t===void 0&&(t=Rv()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},e.prototype.stopChainedTweens=function(){for(var t=0,n=this._chainedTweens.length;to)return!1;n&&this.start(t,!0)}if(this._goToEnd=!1,ti)return 1;var o=t%n,r=Math.min(o/this._duration,1);return r===0&&t!==0&&t%this._duration===0?1:r},e.prototype._calculateCompletionStatus=function(t,n){return this._duration!==0&&tthis._started+this._timeThreshold)){this._giveUpTime();return}i=this._nextNode()}this._pop()&&e&&this._process(!0)};function ret(e){let t=e.slice(0,Math.min(4,e.size)),n=fl(),i=new FileReader;return i.addEventListener("load",function(){n.resolve(new DataView(i.result).getUint32(0,!1)===1347093252)}),i.addEventListener("error",function(){n.reject(i.error)}),i.readAsArrayBuffer(t),n.promise}function set(e){let t=fl(),n=new FileReader;return n.addEventListener("load",function(){t.resolve(n.result)}),n.addEventListener("error",function(){t.reject(n.error)}),n.readAsText(e),t.promise}function qpe(e){let t={xsi:"http://www.w3.org/2001/XMLSchema-instance"},n,i,o,r;for(let s in t)t.hasOwnProperty(s)&&(o=RegExp(`[< ]${s}:`),r=`xmlns:${s}=`,o.test(e)&&e.indexOf(r)===-1&&(l(n)||(n=e.substr(0,e.indexOf("",t),i,o,r;for(;t!==-1&&t0?(Hl.maximumRed=r,Hl.red=void 0):(Hl.maximumRed=void 0,Hl.red=0),o>0?(Hl.maximumGreen=o,Hl.green=void 0):(Hl.maximumGreen=void 0,Hl.green=0),i>0?(Hl.maximumBlue=i,Hl.blue=void 0):(Hl.maximumBlue=void 0,Hl.blue=0),Hl.alpha=n,Y.fromRandom(Hl)):new Y(r,o,i,n)}function cT(e,t,n){let i=Wn(e,t,n);if(l(i))return AQ(i,Wn(e,"colorMode",n)==="random")}function cet(e){let t=Gi(e,"TimeStamp",ve.kmlgx),n=Wn(t,"when",ve.kmlgx);if(!l(t)||!l(n)||n.length===0)return;let i=te.fromIso8601(n),o=new Ir;return o.addInterval(new Sn({start:i,stop:Be.MAXIMUM_VALUE})),o}function det(e){let t=Gi(e,"TimeSpan",ve.kmlgx);if(!l(t))return;let n,i=Gi(t,"begin",ve.kmlgx),o=l(i)?te.fromIso8601(i.textContent):void 0,r=Gi(t,"end",ve.kmlgx),s=l(r)?te.fromIso8601(r.textContent):void 0;if(l(o)&&l(s)){if(te.lessThan(s,o)){let a=o;o=s,s=a}n=new Ir,n.addInterval(new Sn({start:o,stop:s}))}else l(o)?(n=new Ir,n.addInterval(new Sn({start:o,stop:Be.MAXIMUM_VALUE}))):l(s)&&(n=new Ir,n.addInterval(new Sn({start:Be.MINIMUM_VALUE,stop:s})));return n}function t0e(){let e=new Ba;return e.width=ry,e.height=ry,e.scaleByDistance=new Ft(Dpe,Bpe,Ype,Ope),e.pixelOffsetScaleByDistance=new Ft(Dpe,Bpe,Ype,Ope),e}function DQ(){let e=new Sm;return e.outline=!0,e.outlineColor=Y.WHITE,e}function n0e(){let e=new Tm;return e.translucencyByDistance=new Ft(3e6,1,5e6,0),e.pixelOffset=new D(17,0),e.horizontalOrigin=hi.LEFT,e.font="16px sans-serif",e.style=Fo.FILL_AND_OUTLINE,e}function BQ(e,t,n,i,o){let r=Wn(e,"href",ve.kml);if(!l(r)||r.length===0)return;if(r.indexOf("root://icons/palette-")===0){let a=r.charAt(21),c=y(qn(e,"x",ve.gx),0),d=y(qn(e,"y",ve.gx),0);c=Math.min(c/32,7),d=7-Math.min(d/32,7);let u=8*d+c;r=`https://maps.google.com/mapfiles/kml/pal${a}/icon${u}.png`}let s=UQ(r,n,i);if(o){let a=Wn(e,"refreshMode",ve.kml),c=Wn(e,"viewRefreshMode",ve.kml);a==="onInterval"||a==="onExpire"?At(`kml-refreshMode-${a}`,`KML - Unsupported Icon refreshMode: ${a}`):(c==="onStop"||c==="onRegion")&&At(`kml-refreshMode-${c}`,`KML - Unsupported Icon viewRefreshMode: ${c}`);let d=y(Wn(e,"viewBoundScale",ve.kml),1),u=c==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",m=y(Wn(e,"viewFormat",ve.kml),u),p=Wn(e,"httpQuery",ve.kml);l(m)&&s.setQueryParameters(od(MU(m))),l(p)&&s.setQueryParameters(od(MU(p)));let g=t._ellipsoid;return OQ(s,t.camera,t.canvas,d,t._lastCameraView.bbox,g),s}return s}function uet(e,t,n,i,o){let r=qn(t,"scale",ve.kml),s=qn(t,"heading",ve.kml),a=cT(t,"color",ve.kml),c=Gi(t,"Icon",ve.kml),d=BQ(c,e,i,o,!1);l(c)&&!l(d)&&(d=!1);let u=qn(c,"x",ve.gx),m=qn(c,"y",ve.gx),p=qn(c,"w",ve.gx),g=qn(c,"h",ve.gx),f=Gi(t,"hotSpot",ve.kml),x=sy(f,"x"),_=sy(f,"y"),C=Ts(f,"xunits"),V=Ts(f,"yunits"),L=n.billboard;l(L)||(L=t0e(),n.billboard=L),L.image=d,L.scale=r,L.color=a,(l(u)||l(m)||l(p)||l(g))&&(L.imageSubRegion=new He(u,m,p,g)),l(s)&&s!==0&&(L.rotation=W.toRadians(-s),L.alignedAxis=h.UNIT_Z),r=y(r,1);let Z,G;l(x)&&(C==="pixels"?Z=-x*r:C==="insetPixels"?Z=(x-ry)*r:C==="fraction"&&(Z=-x*ry*r),Z+=ry*.5*r),l(_)&&(V==="pixels"?G=_*r:V==="insetPixels"?G=(-_+ry)*r:V==="fraction"&&(G=_*ry*r),G-=ry*.5*r),(l(Z)||l(G))&&(L.pixelOffset=new D(Z,G))}function AU(e,t,n,i,o){for(let r=0,s=t.childNodes.length;r:clampToSeaFloor is currently not supported, using :clampToGround."),Je.CLAMP_TO_GROUND):t==="relativeToSeaFloor"?(At("kml-gx:altitudeMode-relativeToSeaFloor","KML - :relativeToSeaFloor is currently not supported, using :relativeToGround."),Je.RELATIVE_TO_GROUND):(l(e)?At("kml-altitudeMode-unknown",`KML - Unknown :${e}, using :CLAMP_TO_GROUND.`):At("kml-gx:altitudeMode-unknown",`KML - Unknown :${t}, using :CLAMP_TO_GROUND.`),Je.CLAMP_TO_GROUND)}function fet(e,t,n){return n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround"?e:((l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&At("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${y(t,n)}`),new Sf(e))}function pet(e,t,n,i){if(!l(e))return;if(n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround")return e;(l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&At("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${y(t,n)}`);let o=e.length;for(let r=0;r0&&At("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");let g=Math.min(a.length,d.length),f=[],x=[];for(let C=0;C0&&i.availability.addInterval(new Sn({start:x[0],stop:x[x.length-1]})),m&&u&&YQ(t,i,o),!0}function Qpe(e,t,n,i,o,r,s,a,c){let d=e[0],u=e[e.length-1],m=new aa;m.addSamples(e,t),n.intervals.addInterval(new Sn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c,data:fet(m,s,a)})),i.addInterval(new Sn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c})),o.intervals.addInterval(new Sn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c,data:r}))}function xet(e,t,n,i,o){let r=mh(n,"interpolate",ve.gx),s=uh(n,"Track",ve.gx),a,c,d,u=!1,m=new G0,p=new Ir,g=new ra,f=e._ellipsoid;for(let x=0,_=s.length;x<_;x++){let C=s[x],V=uh(C,"when",ve.kml),L=uh(C,"coord",ve.gx),Z=Wn(C,"altitudeMode",ve.kml),G=Wn(C,"altitudeMode",ve.gx),X=Xv(Z,G),v=mh(C,"extrude",ve.kml),P=Math.min(L.length,V.length),F=[];a=[];for(let A=0;A0)){for(f='',r=0;r`;f+="
${y(x.displayName,s)}${y(x.value,"")}
"}if(!l(f))return;f=iet.link(f),ho.innerHTML=f;let _=ho.querySelectorAll("a");for(r=0;r<_.length;r++)_[r].setAttribute("target","_blank");l(i)&&i.keys.length>1&&(Fd(ho,"a","href",i),Fd(ho,"link","href",i),Fd(ho,"area","href",i),Fd(ho,"img","src",i),Fd(ho,"iframe","src",i),Fd(ho,"video","src",i),Fd(ho,"audio","src",i),Fd(ho,"source","src",i),Fd(ho,"track","src",i),Fd(ho,"input","src",i),Fd(ho,"embed","src",i),Fd(ho,"script","src",i),Fd(ho,"video","poster",i)),Ad(ho,"a","href",o),Ad(ho,"link","href",o),Ad(ho,"area","href",o),Ad(ho,"img","src",o),Ad(ho,"iframe","src",o),Ad(ho,"video","src",o),Ad(ho,"audio","src",o),Ad(ho,"source","src",o),Ad(ho,"track","src",o),Ad(ho,"input","src",o),Ad(ho,"embed","src",o),Ad(ho,"script","src",o),Ad(ho,"video","poster",o);let C='
',C+=`${ho.innerHTML}
`,ho.innerHTML="",t.description=C}function UU(e,t,n){let i=n.entityCollection,o=n.parentEntity,r=n.sourceResource,s=n.uriResolver,a=e0e(t,i,n.context),c=a.kml,d=met(e,t,n.styleCollection,r,s),u=Wn(t,"name",ve.kml);a.name=u,a.parent=o;let m=det(t);l(m)||(m=cet(t)),a.availability=m,zQ(a);function p(L){return L?L.show&&p(L.parent):!0}let g=mh(t,"visibility",ve.kml);a.show=p(o)&&y(g,!0);let f=Gi(t,"author",ve.atom),x=c.author;x.name=Wn(f,"name",ve.atom),x.uri=Wn(f,"uri",ve.atom),x.email=Wn(f,"email",ve.atom);let _=Gi(t,"link",ve.atom),C=c.link;C.href=Ts(_,"href"),C.hreflang=Ts(_,"hreflang"),C.rel=Ts(_,"rel"),C.type=Ts(_,"type"),C.title=Ts(_,"title"),C.length=Ts(_,"length"),c.address=Wn(t,"address",ve.kml),c.phoneNumber=Wn(t,"phoneNumber",ve.kml),c.snippet=Wn(t,"Snippet",ve.kml),Cet(t,a),Vet(t,a,d,s,r);let V=e._ellipsoid;return l0e(t,a,V),c0e(t,a,V),l(Gi(t,"Region",ve.kml))&&At("kml-region","KML - Placemark Regions are unsupported"),{entity:a,styleEntity:d}}function a0e(e,t,n,i){i.addNodes(t.childNodes,n),i.process()}function Let(e,t,n,i){let o=UU(e,t,n),r=Oe(n);r.parentEntity=o.entity,a0e(e,t,r,i)}function Ret(e,t,n,i){let o=UU(e,t,n),r=o.entity,s=o.styleEntity,a=!1,c=t.childNodes;for(let d=0,u=c.length;dW.PI_OVER_TWO?W.PI_OVER_TWO:d}function a(d){return d>W.PI?d-W.TWO_PI:d<-W.PI?d+W.TWO_PI:d}let c=zy(e.queryParameters);if(c=c.replace(/%5B/g,"[").replace(/%5D/g,"]"),l(t)&&t._mode!==oe.MORPHING){let d,u;if(o=y(o,Pet),l(n)&&(wQ.x=n.clientWidth*.5,wQ.y=n.clientHeight*.5,d=t.pickEllipsoid(wQ,r,vet)),l(d)?u=r.cartesianToCartographic(d,bV):(u=ce.center(o,bV),d=r.cartographicToCartesian(u)),l(i)&&!W.equalsEpsilon(i,1,W.EPSILON9)){let C=o.width*i*.5,V=o.height*i*.5;o=new ce(a(u.longitude-C),s(u.latitude-V),a(u.longitude+C),s(u.latitude+V))}c=c.replace("[bboxWest]",W.toDegrees(o.west).toString()),c=c.replace("[bboxSouth]",W.toDegrees(o.south).toString()),c=c.replace("[bboxEast]",W.toDegrees(o.east).toString()),c=c.replace("[bboxNorth]",W.toDegrees(o.north).toString());let m=W.toDegrees(u.longitude).toString(),p=W.toDegrees(u.latitude).toString();c=c.replace("[lookatLon]",m),c=c.replace("[lookatLat]",p),c=c.replace("[lookatTilt]",W.toDegrees(t.pitch).toString()),c=c.replace("[lookatHeading]",W.toDegrees(t.heading).toString()),c=c.replace("[lookatRange]",h.distance(t.positionWC,d)),c=c.replace("[lookatTerrainLon]",m),c=c.replace("[lookatTerrainLat]",p),c=c.replace("[lookatTerrainAlt]",u.height.toString()),r.cartesianToCartographic(t.positionWC,bV),c=c.replace("[cameraLon]",W.toDegrees(bV.longitude).toString()),c=c.replace("[cameraLat]",W.toDegrees(bV.latitude).toString()),c=c.replace("[cameraAlt]",W.toDegrees(bV.height).toString());let g=t.frustum,f=g.aspectRatio,x="",_="";if(l(f)){let C=W.toDegrees(g.fov);f>1?(x=C,_=C/f):(_=C,x=C*f)}c=c.replace("[horizFov]",x.toString()),c=c.replace("[vertFov]",_.toString())}else c=c.replace("[bboxWest]","-180"),c=c.replace("[bboxSouth]","-90"),c=c.replace("[bboxEast]","180"),c=c.replace("[bboxNorth]","90"),c=c.replace("[lookatLon]",""),c=c.replace("[lookatLat]",""),c=c.replace("[lookatRange]",""),c=c.replace("[lookatTilt]",""),c=c.replace("[lookatHeading]",""),c=c.replace("[lookatTerrainLon]",""),c=c.replace("[lookatTerrainLat]",""),c=c.replace("[lookatTerrainAlt]",""),c=c.replace("[cameraLon]",""),c=c.replace("[cameraLat]",""),c=c.replace("[cameraAlt]",""),c=c.replace("[horizFov]",""),c=c.replace("[vertFov]","");l(n)?(c=c.replace("[horizPixels]",n.clientWidth),c=c.replace("[vertPixels]",n.clientHeight)):(c=c.replace("[horizPixels]",""),c=c.replace("[vertPixels]","")),c=c.replace("[terrainEnabled]","1"),c=c.replace("[clientVersion]","1"),c=c.replace("[kmlVersion]","2.2"),c=c.replace("[clientName]","Cesium"),c=c.replace("[language]","English"),e.setQueryParameters(od(c))}function wet(e,t,n,i){let r=UU(e,t,n).entity,s=n.sourceResource,a=n.uriResolver,c=Gi(t,"Link",ve.kml);if(l(c)||(c=Gi(t,"Url",ve.kml)),l(c)){let d=Wn(c,"href",ve.kml),u,m;if(l(d)){let p=d;if(d=UQ(d,s,n.uriResolver),/^data:/.test(d.getUrlComponent()))/\.kmz/i.test(s.getUrlComponent())||(p=s.getDerivedResource({url:p}));else{if(p=d.clone(),u=Wn(c,"viewRefreshMode",ve.kml),u==="onRegion"){At("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion");return}m=y(Wn(c,"viewBoundScale",ve.kml),1);let _=u==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",C=y(Wn(c,"viewFormat",ve.kml),_),V=Wn(c,"httpQuery",ve.kml);l(C)&&d.setQueryParameters(od(MU(C))),l(V)&&d.setQueryParameters(od(MU(V)));let L=e._ellipsoid;OQ(d,e.camera,e.canvas,m,e._lastCameraView.bbox,L)}let g={sourceUri:p,uriResolver:a,context:r.id,screenOverlayContainer:n.screenOverlayContainer},f=new Ns,x=HQ(e,f,d,g).then(function(_){let C=e._entityCollection,V=f.values;C.suspendEvents();for(let G=0;G0||L==="onExpire"||u==="onStop"){let G=Gi(_,"NetworkLinkControl",ve.kml),X=l(G),v=te.now(),P={id:Bn(),href:d,cookie:{},lastUpdated:v,updating:!1,entity:r,viewBoundScale:m,needsUpdate:!1,cameraUpdateTime:v},F=0;if(X&&(P.cookie=od(y(Wn(G,"cookie",ve.kml),"")),F=y(qn(G,"minRefreshPeriod",ve.kml),0)),L==="onInterval")X&&(Z=Math.max(F,Z)),P.refreshMode=ay.INTERVAL,P.time=Z;else if(L==="onExpire"){let A;if(X&&(A=Wn(G,"expires",ve.kml)),l(A))try{let b=te.fromIso8601(A),R=te.secondsDifference(b,v);R>0&&R0;)this._screenOverlays.pop().remove()};function zQ(e){let t=e.parent;if(l(t)){let n=t.availability;if(l(n)){let i=e.availability;l(i)?i.intersect(n):e.availability=n}}}function Met(e,t,n,i,o){return function(r){if(!i.contains(t.id))return;let s=!1,a=Gi(r,"NetworkLinkControl",ve.kml),c=l(a),d=0;if(c){if(l(Gi(a,"Update",ve.kml))){At("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,i.remove(t.id);return}t.cookie=od(y(Wn(a,"cookie",ve.kml),"")),d=y(qn(a,"minRefreshPeriod",ve.kml),0)}let u=te.now(),m=t.refreshMode;if(m===ay.INTERVAL)l(a)&&(t.time=Math.max(d,t.time));else if(m===ay.EXPIRE){let v;if(l(a)&&(v=Wn(a,"expires",ve.kml)),l(v))try{let P=te.fromIso8601(v),F=te.secondsDifference(P,u);F>0&&Fu.time&&(p=!0):u.refreshMode===ay.EXPIRE?te.greaterThan(n,u.time)&&(p=!0):u.refreshMode===ay.STOP&&(r&&(u.needsUpdate=!0,u.cameraUpdateTime=n),u.needsUpdate&&te.secondsDifference(n,u.cameraUpdateTime)>=u.time&&(p=!0)),p){o(m),u.updating=!0;let g=new Ns,f=u.href.clone();f.setQueryParameters(u.cookie);let x=y(i._ellipsoid,ie.WGS84);OQ(f,i.camera,i.canvas,u.viewBoundScale,s.bbox,x),HQ(i,g,f,{context:m.id}).then(Met(i,u,g,c,f)).catch(function(_){let C=`NetworkLink ${u.href} refresh failed: ${_}`;console.log(C),i._error.raiseEvent(i,C)}),d=!0}}c.set(u.id,u)}}),d&&(this._networkLinks=c,this._changed.raiseEvent(this)),!0};function Net(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}Md._DeferredLoading=vf;Md._getTimestamp=bi;var Iv=Md;var Mhi=T(S(),1);function Wv(){fe.throwInstantiationError()}Wv.prototype.update=fe.throwInstantiationError;Wv.prototype.getBoundingSphere=fe.throwInstantiationError;Wv.prototype.isDestroyed=fe.throwInstantiationError;Wv.prototype.destroy=fe.throwInstantiationError;var KQ=Wv;var ffi=T(S(),1);var JQ=32,ket="http://www.opengis.net/kml/2.2",fh="http://www.google.com/kml/ext/2.2",Uet="http://www.w3.org/2000/xmlns/";function DU(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var Det=/^data:image\/([^,;]+)/;DU.prototype.texture=function(e){let t=this,n;if(typeof e=="string"||e instanceof Ee){if(e=Ee.createIfNeeded(e),!e.isDataUri)return e.url;let i=e.url.match(Det);n=`texture_${++this._count}`,l(i)&&(n+=`.${i[1]}`);let o=e.fetchBlob().then(function(r){t._files[n]=r});return this._promises.push(o),n}if(e instanceof HTMLCanvasElement){n=`texture_${++this._count}.png`;let i=new Promise(o=>{e.toBlob(function(r){t._files[n]=r,o()})});return this._promises.push(i),n}return""};function Bet(e,t){return function(n){e._files[t]=n}}DU.prototype.model=function(e,t){let n=this._modelCallback;if(!l(n))throw new ue("Encountered a model entity while exporting to KML, but no model callback was supplied.");let i={},o=n(e,t,i);for(let r in i)if(i.hasOwnProperty(r)){let s=Promise.resolve(i[r]);this._promises.push(s),s.then(Bet(this,r))}return o};Object.defineProperties(DU.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function BU(e){this._time=e}BU.prototype.get=function(e,t,n){let i;return l(e)&&(i=l(e.getValue)?e.getValue(this._time,n):e),y(i,t)};BU.prototype.getColor=function(e,t){let n=this.get(e,t);if(l(n))return dT(n)};BU.prototype.getMaterialType=function(e){if(l(e))return e.getType(this._time)};function QQ(){this._ids={},this._styles={},this._count=0}QQ.prototype.get=function(e){let t=this._ids,n=e.innerHTML;if(l(t[n]))return t[n];let i=`style-${++this._count}`;return e.setAttribute("id",i),i=`#${i}`,t[n]=i,this._styles[n]=e,i};QQ.prototype.save=function(e){let t=this._styles,n=e.childNodes[0];for(let i in t)t.hasOwnProperty(i)&&e.insertBefore(t[i],n)};function h0e(){this._ids={}}h0e.prototype.get=function(e){if(!l(e))return this.get(Bn());let t=this._ids;return l(t[e])?`${e.toString()}-${++t[e]}`:(t[e]=0,e)};function jQ(e){e=y(e,y.EMPTY_OBJECT);let t=e.entities,n=y(e.kmz,!1),i=jQ._createState(e),o=t.values.filter(function(d){return!l(d.parent)}),r=i.kmlDoc,s=r.documentElement;s.setAttributeNS(Uet,"xmlns:gx",fh);let a=r.createElement("Document");s.appendChild(a),p0e(i,a,o),i.styleCache.save(a);let c=i.externalFileHandler;return c.promise.then(function(){let u=new XMLSerializer().serializeToString(i.kmlDoc);return n?Yet(u,c.files):{kml:u,externalFiles:c.files}})}function Yet(e,t){let n=tn("ThirdParty/Workers/z-worker-pako.js");aV({workerScripts:{deflate:[n,"./pako_deflate.min.js"],inflate:[n,"./pako_inflate.min.js"]}});let i=new yv,o=new WU(i);return o.add("doc.kml",new pU(e)).then(function(){let r=Object.keys(t);return f0e(o,r,t,0)}).then(function(){return o.close()}).then(function(r){return{kmz:r}})}function f0e(e,t,n,i){if(t.length===i)return;let o=t[i];return e.add(o,new k0(n[o])).then(function(){return f0e(e,t,n,i+1)})}jQ._createState=function(e){let t=e.entities,n=new QQ,i=t.computeAvailability(),o=l(e.time)?e.time:i.start,r=y(e.defaultAvailability,i),s=y(e.sampleDuration,60);r.start===Be.MINIMUM_VALUE?r.stop===Be.MAXIMUM_VALUE?r=new Sn:te.addSeconds(r.stop,-10*s,r.start):r.stop===Be.MAXIMUM_VALUE&&te.addSeconds(r.start,10*s,r.stop);let a=new DU(e.modelCallback);return{kmlDoc:document.implementation.createDocument(ket,"kml"),ellipsoid:y(e.ellipsoid,ie.WGS84),idManager:new h0e,styleCache:n,externalFileHandler:a,time:o,valueGetter:new BU(o),sampleDuration:s,defaultAvailability:new Ir([r])}};function p0e(e,t,n){let i=e.kmlDoc,o=e.styleCache,r=e.valueGetter,s=e.idManager,a=n.length,c,d,u;for(let m=0;m0){let C=i.createElement("Placemark");C.setAttribute("id",s.get(p.id));let V=p.name,L=p.label;if(l(L)){let G=i.createElement("LabelStyle"),X=r.get(L.text);V=l(X)&&X.length>0?X:V;let v=r.getColor(L.fillColor);l(v)&&(G.appendChild(hn(i,"color",v)),G.appendChild(hn(i,"colorMode","normal")));let P=r.get(L.scale);l(P)&&G.appendChild(hn(i,"scale",P)),u.push(G)}C.appendChild(hn(i,"name",V)),C.appendChild(hn(i,"visibility",p.show)),C.appendChild(hn(i,"description",p.description)),l(g)&&C.appendChild(g),t.appendChild(C);let Z=u.length;if(Z>0){let G=i.createElement("Style");for(let X=0;X1){let G=i.createElement("MultiGeometry");for(let X=0;X0){let C=i.createElement("Folder");C.setAttribute("id",s.get(p.id)),C.appendChild(hn(i,"name",p.name)),C.appendChild(hn(i,"visibility",p.show)),C.appendChild(hn(i,"description",p.description)),t.appendChild(C),p0e(e,C,_)}}}var zl=new h,nl=new he,hh=new te;function Oet(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=e.valueGetter,a=y(t.billboard,t.point);if(!l(a)&&!l(t.path))return;let c=t.position;if(!c.isConstant){b0e(e,t,a,n,i);return}s.get(c,void 0,zl);let d=hn(o,"coordinates",lT(zl,r)),u=o.createElement("Point"),m=o.createElement("altitudeMode");m.appendChild(uT(e,a.heightReference)),u.appendChild(m),u.appendChild(d),n.push(u);let p=a instanceof Ba?y0e(e,a):g0e(e,a);i.push(p)}function b0e(e,t,n,i,o){let r=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter,c,d=t.position,u=!0;d instanceof ra?(c=d.intervals,u=!1):c=y(t.availability,e.defaultAvailability);let m=n instanceof Vp,p,g,f,x=[];for(p=0;p1){let C=r.createElementNS(fh,"MultiTrack");for(p=0;p0&&(r=n);let s=t.coordinates,a=o.get(s),c=[],d=[ce.northeast,ce.southeast,ce.southwest,ce.northwest];for(let g=0;g<4;++g)d[g](a,nl),c.push(`${W.toDegrees(nl.longitude)},${W.toDegrees(nl.latitude)},${r}`);let u=hn(i,"coordinates",c.join(" ")),m=i.createElement("outerBoundaryIs"),p=i.createElement("LinearRing");return p.appendChild(u),m.appendChild(p),[m]}function u0e(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=[],a=t.length;for(let u=0;u0&&(r=n);let a=[],c=t.hierarchy,d=o.get(c),u=Array.isArray(d)?d:d.positions,m=i.createElement("outerBoundaryIs");m.appendChild(u0e(e,u,r,s)),a.push(m);let p=d.holes;if(l(p)){let g=p.length;for(let f=0;f0&&c.appendChild(hn(r,"extrude",!0));let u=a?zet(e,t,d):Ket(e,t,d),m=u.length;for(let _=0;_=0;--i)t+=n[i]<16?`0${n[i].toString(16)}`:n[i].toString(16);return t}var $Q=jQ;var Efi=T(S(),1);var bfi=T(S(),1),mT=`in vec4 position; -in vec2 textureCoordinates; - -out vec2 v_textureCoordinates; - -void main() -{ - gl_Position = position; - v_textureCoordinates = textureCoordinates; -} -`;function YU(e){this._context=e}var Pv,jet=new et({primitiveType:Fe.TRIANGLES}),qet=new ii({color:new Y(0,0,0,0)});function $et(e,t){return new ta({context:e,colorTextures:[t],destroyAttachments:!1})}function ett(e,t){return qt.fromCache({context:e,vertexShaderSource:mT,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function ttt(e,t){return(!l(Pv)||Pv.viewport.width!==e||Pv.viewport.height!==t)&&(Pv=De.fromCache({viewport:new He(0,0,e,t)})),Pv}YU.prototype.execute=function(e){l(e.preExecute)&&e.preExecute(e);let t=e.outputTexture,n=t.width,i=t.height,o=this._context,r=l(e.vertexArray)?e.vertexArray:o.getViewportQuadVertexArray(),s=l(e.shaderProgram)?e.shaderProgram:ett(o,e.fragmentShaderSource),a=$et(o,t),c=ttt(n,i),d=e.uniformMap,u=qet;u.framebuffer=a,u.renderState=c,u.execute(o);let m=jet;m.vertexArray=r,m.renderState=c,m.shaderProgram=s,m.uniformMap=d,m.framebuffer=a,m.execute(o),a.destroy(),e.persists||(s.destroy(),l(e.vertexArray)&&r.destroy()),l(e.postExecute)&&e.postExecute(t)};YU.prototype.isDestroyed=function(){return!1};YU.prototype.destroy=function(){return me(this)};var vv=YU;var qpi=T(S(),1);var Ifi=T(S(),1);function ntt(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}var pc=ntt;var Afi=T(S(),1);function ph(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}Object.defineProperties(ph.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}});ph.prototype.replaceShaderProgram=function(e){return l(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)};function itt(e){let t=Object.keys(e).sort();return JSON.stringify(e,t)}ph.prototype.getShaderProgram=function(e){let t=e.vertexShaderSource,n=e.fragmentShaderSource,i=e.attributeLocations;typeof t=="string"&&(t=new Ye({sources:[t]})),typeof n=="string"&&(n=new Ye({sources:[n]}));let o=t.getCacheKey(),r=n.getCacheKey(),s=l(i)?itt(i):"",a=`${o}:${r}:${s}`,c;if(l(this._shaders[a]))c=this._shaders[a],delete this._shadersToRelease[a];else{let d=this._context,u=t.createCombinedVertexShader(d),m=n.createCombinedFragmentShader(d),p=new qt({gl:d._gl,logShaderCompilation:d.logShaderCompilation,debugShaders:d.debugShaders,vertexShaderSource:t,vertexShaderText:u,fragmentShaderSource:n,fragmentShaderText:m,attributeLocations:i});c={cache:this,shaderProgram:p,keyword:a,derivedKeywords:[],count:0},p._cachedShader=c,this._shaders[a]=c,++this._numberOfShaders}return++c.count,c.shaderProgram};ph.prototype.replaceDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=this._shaders[o];if(l(r)){e4(this,r);let s=i.derivedKeywords.indexOf(t);s>-1&&i.derivedKeywords.splice(s,1)}return this.createDerivedShaderProgram(e,t,n)};ph.prototype.getDerivedShaderProgram=function(e,t){let n=e._cachedShader,i=t+n.keyword,o=this._shaders[i];if(l(o))return o.shaderProgram};ph.prototype.createDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=n.vertexShaderSource,s=n.fragmentShaderSource,a=n.attributeLocations;typeof r=="string"&&(r=new Ye({sources:[r]})),typeof s=="string"&&(s=new Ye({sources:[s]}));let c=this._context,d=r.createCombinedVertexShader(c),u=s.createCombinedFragmentShader(c),m=new qt({gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:r,vertexShaderText:d,fragmentShaderSource:s,fragmentShaderText:u,attributeLocations:a}),p={cache:this,shaderProgram:m,keyword:o,derivedKeywords:[],count:0};return i.derivedKeywords.push(t),m._cachedShader=p,this._shaders[o]=p,m};function e4(e,t){let n=t.derivedKeywords,i=n.length;for(let o=0;outt;++r){o=i;let s=o-t*Math.sin(o)-e,a=1-t*Math.cos(o);i=o-s/a}return o=i+n*W.TWO_PI,o}function htt(e,t){let n=Math.floor(e/W.TWO_PI);e-=n*W.TWO_PI;let i=Math.cos(e)-t,o=Math.sin(e)*Math.sqrt(1-t*t),r=Math.atan2(o,i);return r=W.zeroToTwoPi(r),e<0&&(r-=W.TWO_PI),r+=n*W.TWO_PI,r}function ftt(e,t,n,i){let o=Math.cos(e),r=Math.sin(e),s=Math.cos(t),a=Math.sin(t),c=Math.cos(n),d=Math.sin(n);return l(i)?(i[0]=c*o-d*r*s,i[1]=d*o+c*r*s,i[2]=r*a,i[3]=-c*r-d*o*s,i[4]=-d*r+c*o*s,i[5]=o*a,i[6]=d*a,i[7]=-c*a,i[8]=s):i=new $(c*o-d*r*s,-c*r-d*o*s,d*a,d*o+c*r*s,-d*r+c*o*s,-c*a,r*a,o*a,s),i}var ptt=1.0000010178*Pa,btt=100.46645683*zu,gtt=129597742283429e-5*Nd,T0e=16002,S0e=21863,C0e=32004,V0e=10931,L0e=14529,R0e=16368,Z0e=15318,G0e=32794,ytt=64*1e-7*Pa,xtt=-152*1e-7*Pa,_tt=62*1e-7*Pa,Ttt=-8*1e-7*Pa,Stt=32*1e-7*Pa,Ctt=-41*1e-7*Pa,Vtt=19*1e-7*Pa,Ltt=-11*1e-7*Pa,Rtt=-150*1e-7*Pa,Ztt=-46*1e-7*Pa,Gtt=68*1e-7*Pa,Ett=54*1e-7*Pa,Xtt=14*1e-7*Pa,Itt=24*1e-7*Pa,Wtt=-28*1e-7*Pa,Ptt=22*1e-7*Pa,E0e=10,X0e=16002,I0e=21863,W0e=10931,P0e=1473,v0e=32004,w0e=4387,F0e=73,vtt=-325*1e-7,wtt=-322*1e-7,Ftt=-79*1e-7,Att=232*1e-7,Mtt=-52*1e-7,Ntt=97*1e-7,ktt=55*1e-7,Utt=-41*1e-7,Dtt=-105*1e-7,Btt=-137*1e-7,Ytt=258*1e-7,Ott=35*1e-7,Htt=-116*1e-7,ztt=-88*1e-7,Ktt=-112*1e-7,Jtt=-80*1e-7,gV=new te(0,0,Hn.TAI);function Qtt(e,t){M0e(e,gV);let i=(gV.dayNumber-OU.dayNumber+(gV.secondsOfDay-OU.secondsOfDay)/zn.SECONDS_PER_DAY)/(zn.DAYS_PER_JULIAN_CENTURY*10),o=.3595362*i,r=ptt+ytt*Math.cos(T0e*o)+Rtt*Math.sin(T0e*o)+xtt*Math.cos(S0e*o)+Ztt*Math.sin(S0e*o)+_tt*Math.cos(C0e*o)+Gtt*Math.sin(C0e*o)+Ttt*Math.cos(V0e*o)+Ett*Math.sin(V0e*o)+Stt*Math.cos(L0e*o)+Xtt*Math.sin(L0e*o)+Ctt*Math.cos(R0e*o)+Itt*Math.sin(R0e*o)+Vtt*Math.cos(Z0e*o)+Wtt*Math.sin(Z0e*o)+Ltt*Math.cos(G0e*o)+Ptt*Math.sin(G0e*o),s=btt+gtt*i+vtt*Math.cos(E0e*o)+Dtt*Math.sin(E0e*o)+wtt*Math.cos(X0e*o)+Btt*Math.sin(X0e*o)+Ftt*Math.cos(I0e*o)+Ytt*Math.sin(I0e*o)+Att*Math.cos(W0e*o)+Ott*Math.sin(W0e*o)+Mtt*Math.cos(P0e*o)+Htt*Math.sin(P0e*o)+Ntt*Math.cos(v0e*o)+ztt*Math.sin(v0e*o)+ktt*Math.cos(w0e*o)+Ktt*Math.sin(w0e*o)+Utt*Math.cos(F0e*o)+Jtt*Math.sin(F0e*o),a=.0167086342-.0004203654*i,c=102.93734808*zu+11612.3529*Nd*i,d=469.97289*Nd*i,u=174.87317577*zu-8679.27034*Nd*i;return N0e(r,a,d,c,u,s,t)}function k0e(e,t){M0e(e,gV);let i=(gV.dayNumber-OU.dayNumber+(gV.secondsOfDay-OU.secondsOfDay)/zn.SECONDS_PER_DAY)/zn.DAYS_PER_JULIAN_CENTURY,o=i*i,r=o*i,s=r*i,a=383397.7725+.004*i,c=.055545526-16e-9*i,d=5.15668983*zu,u=-8e-5*i+.02966*o-42e-6*r-13e-8*s,m=83.35324312*zu,p=146434202669e-4*i-38.2702*o-.045047*r+21301e-8*s,g=125.04455501*zu,f=-69679193631e-4*i+6.3602*o+.007625*r-3586e-8*s,x=218.31664563*zu,_=17325593434847e-4*i-6.391*o+.006588*r-3169e-8*s,C=297.85019547*zu+Nd*(1602961601209e-3*i-6.3706*o+.006593*r-3169e-8*s),V=93.27209062*zu+Nd*(17395272628478e-4*i-12.7512*o-.001037*r+417e-8*s),L=134.96340251*zu+Nd*(17179159232178e-4*i+31.8792*o+.051635*r-2447e-7*s),Z=357.52910918*zu+Nd*(1295965810481e-4*i-.5532*o+136e-6*r-1149e-8*s),G=310.17137918*zu-Nd*(6967051436e-3*i+6.2068*o+.007618*r-3219e-8*s),X=2*C,v=4*C,P=6*C,F=2*L,A=3*L,b=4*L,R=2*V;a+=3400.4*Math.cos(X)-635.6*Math.cos(X-L)-235.6*Math.cos(L)+218.1*Math.cos(X-Z)+181*Math.cos(X+L),c+=.014216*Math.cos(X-L)+.008551*Math.cos(X-F)-.001383*Math.cos(L)+.001356*Math.cos(X+L)-.001147*Math.cos(v-A)-914e-6*Math.cos(v-F)+869e-6*Math.cos(X-Z-L)-627e-6*Math.cos(X)-394e-6*Math.cos(v-b)+282e-6*Math.cos(X-Z-F)-279e-6*Math.cos(C-L)-236e-6*Math.cos(F)+231e-6*Math.cos(v)+229e-6*Math.cos(P-b)-201e-6*Math.cos(F-R),u+=486.26*Math.cos(X-R)-40.13*Math.cos(X)+37.51*Math.cos(R)+25.73*Math.cos(F-R)+19.97*Math.cos(X-Z-R),p+=-55609*Math.sin(X-L)-34711*Math.sin(X-F)-9792*Math.sin(L)+9385*Math.sin(v-A)+7505*Math.sin(v-F)+5318*Math.sin(X+L)+3484*Math.sin(v-b)-3417*Math.sin(X-Z-L)-2530*Math.sin(P-b)-2376*Math.sin(X)-2075*Math.sin(X-A)-1883*Math.sin(F)-1736*Math.sin(P-5*L)+1626*Math.sin(Z)-1370*Math.sin(P-A),f+=-5392*Math.sin(X-R)-540*Math.sin(Z)-441*Math.sin(X)+423*Math.sin(R)-288*Math.sin(F-R),_+=-3332.9*Math.sin(X)+1197.4*Math.sin(X-L)-662.5*Math.sin(Z)+396.3*Math.sin(L)-218*Math.sin(X-Z);let E=2*G,I=3*G;u+=46.997*Math.cos(G)*i-.614*Math.cos(X-R+G)*i+.614*Math.cos(X-R-G)*i-.0297*Math.cos(E)*o-.0335*Math.cos(G)*o+.0012*Math.cos(X-R+E)*o-16e-5*Math.cos(G)*r+4e-5*Math.cos(I)*r+4e-5*Math.cos(E)*r;let w=2.116*Math.sin(G)*i-.111*Math.sin(X-R-G)*i-.0015*Math.sin(G)*o;p+=w,_+=w,f+=-520.77*Math.sin(G)*i+13.66*Math.sin(X-R+G)*i+1.12*Math.sin(X-G)*i-1.06*Math.sin(R-G)*i+.66*Math.sin(E)*o+.371*Math.sin(G)*o-.035*Math.sin(X-R+E)*o-.015*Math.sin(X-R+G)*o+.0014*Math.sin(G)*r-.0011*Math.sin(I)*r-9e-4*Math.sin(E)*r,a*=att;let N=d+u*Nd,B=m+p*Nd,U=x+_*Nd,O=g+f*Nd;return N0e(a,c,N,B,O,U,t)}var A0e=.012300034,jtt=A0e/(A0e+1)*-1;function qtt(e,t){return t=k0e(e,t),h.multiplyByScalar(t,jtt,t)}var U0e=new $(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),Av=new h;t4.computeSunPositionInEarthInertialFrame=function(e,t){return l(e)||(e=te.now()),l(t)||(t=new h),Av=Qtt(e,Av),t=h.negate(Av,t),qtt(e,Av),h.subtract(t,Av,t),$.multiplyByVector(U0e,t,t),t};t4.computeMoonPositionInEarthInertialFrame=function(e,t){return l(e)||(e=te.now()),t=k0e(e,t),$.multiplyByVector(U0e,t,t),t};var cy=t4;var epi=T(S(),1);function $tt(e){e=y(e,y.EMPTY_OBJECT),this.color=Y.clone(y(e.color,Y.WHITE)),this.intensity=y(e.intensity,2)}var U0=$tt;function yV(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new He,this._viewportCartesian4=new se,this._viewportDirty=!1,this._viewportOrthographicMatrix=M.clone(M.IDENTITY),this._viewportTransformation=M.clone(M.IDENTITY),this._model=M.clone(M.IDENTITY),this._view=M.clone(M.IDENTITY),this._inverseView=M.clone(M.IDENTITY),this._projection=M.clone(M.IDENTITY),this._infiniteProjection=M.clone(M.IDENTITY),this._entireFrustum=new D,this._currentFrustum=new D,this._frustumPlanes=new se,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=$.clone(M.IDENTITY),this._view3DDirty=!0,this._view3D=new M,this._inverseView3DDirty=!0,this._inverseView3D=new M,this._inverseModelDirty=!0,this._inverseModel=new M,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new $,this._viewRotation=new $,this._inverseViewRotation=new $,this._viewRotation3D=new $,this._inverseViewRotation3D=new $,this._inverseProjectionDirty=!0,this._inverseProjection=new M,this._modelViewDirty=!0,this._modelView=new M,this._modelView3DDirty=!0,this._modelView3D=new M,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new M,this._inverseModelViewDirty=!0,this._inverseModelView=new M,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new M,this._viewProjectionDirty=!0,this._viewProjection=new M,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new M,this._modelViewProjectionDirty=!0,this._modelViewProjection=new M,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new M,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new M,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new M,this._normalDirty=!0,this._normal=new $,this._normal3DDirty=!0,this._normal3D=new $,this._inverseNormalDirty=!0,this._inverseNormal=new $,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new $,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new Yn,this._cameraPosition=new h,this._sunPositionWC=new h,this._sunPositionColumbusView=new h,this._sunDirectionWC=new h,this._sunDirectionEC=new h,this._moonDirectionEC=new h,this._lightDirectionWC=new h,this._lightDirectionEC=new h,this._lightColor=new h,this._lightColorHdr=new h,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new h,this._cameraRight=new h,this._cameraUp=new h,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new D,this._eyeEllipsoidNormalEC=new h,this._eyeEllipsoidCurvature=new D,this._modelToEnu=new M,this._enuToModel=new M,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new Y,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new D,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._fogMinimumBrightness=void 0,this._atmosphereHsbShift=void 0,this._atmosphereLightIntensity=void 0,this._atmosphereRayleighCoefficient=new h,this._atmosphereRayleighScaleHeight=new h,this._atmosphereMieCoefficient=new h,this._atmosphereMieScaleHeight=void 0,this._atmosphereMieAnisotropy=void 0,this._atmosphereDynamicLighting=void 0,this._invertClassificationColor=void 0,this._splitPosition=0,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0}Object.defineProperties(yV.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!He.equals(e,this._viewport)){He.clone(e,this._viewport);let t=this._viewport,n=this._viewportCartesian4;n.x=t.x,n.y=t.y,n.z=t.width,n.w=t.height,this._viewportDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return B0e(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return B0e(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){M.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,M.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){let e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,M.getMatrix3(this.inverseModel,e),$.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return n4(this),this._view3D}},viewRotation:{get:function(){return n4(this),this._viewRotation}},viewRotation3D:{get:function(){return n4(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return H0e(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return H0e(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return dnt(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return unt(this),this._modelView}},modelView3D:{get:function(){return mnt(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return ynt(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return hnt(this),this._inverseModelView}},inverseModelView3D:{get:function(){return fnt(this),this._inverseModelView3D}},viewProjection:{get:function(){return pnt(this),this._viewProjection}},inverseViewProjection:{get:function(){return bnt(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return gnt(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return xnt(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return _nt(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return Tnt(this),this._modelViewInfiniteProjection}},normal:{get:function(){return Snt(this),this._normal}},normal3D:{get:function(){return Cnt(this),this._normal3D}},inverseNormal:{get:function(){return Vnt(this),this._inverseNormal}},inverseNormal3D:{get:function(){return Lnt(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight:{get:function(){return this._eyeHeight}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},eyeEllipsoidNormalEC:{get:function(){return this._eyeEllipsoidNormalEC}},eyeEllipsoidCurvature:{get:function(){return this._eyeEllipsoidCurvature}},modelToEnu:{get:function(){return this._modelToEnu}},enuToModel:{get:function(){return this._enuToModel}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return O0e(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return O0e(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},fogMinimumBrightness:{get:function(){return this._fogMinimumBrightness}},atmosphereHsbShift:{get:function(){return this._atmosphereHsbShift}},atmosphereLightIntensity:{get:function(){return this._atmosphereLightIntensity}},atmosphereRayleighCoefficient:{get:function(){return this._atmosphereRayleighCoefficient}},atmosphereRayleighScaleHeight:{get:function(){return this._atmosphereRayleighScaleHeight}},atmosphereMieCoefficient:{get:function(){return this._atmosphereMieCoefficient}},atmosphereMieScaleHeight:{get:function(){return this._atmosphereMieScaleHeight}},atmosphereMieAnisotropy:{get:function(){return this._atmosphereMieAnisotropy}},atmosphereDynamicLighting:{get:function(){return this._atmosphereDynamicLighting}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsDimensions:{get:function(){return this._specularEnvironmentMapsDimensions}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},splitPosition:{get:function(){return this._splitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},ellipsoid:{get:function(){return y(this._ellipsoid,ie.WGS84)}}});function ent(e,t){M.clone(t,e._view),M.getMatrix3(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0}function tnt(e,t){M.clone(t,e._inverseView),M.getMatrix3(t,e._inverseViewRotation)}function nnt(e,t){M.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function int(e,t){M.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}var D0e=new h,ont=new M;function rnt(e,t){h.clone(t.positionWC,e._cameraPosition),h.clone(t.directionWC,e._cameraDirection),h.clone(t.rightWC,e._cameraRight),h.clone(t.upWC,e._cameraUp);let n=e._ellipsoid,i,o=t.positionCartographic;if(l(o)?(e._eyeHeight=o.height,e._eyeEllipsoidNormalEC=n.geodeticSurfaceNormalCartographic(o,e._eyeEllipsoidNormalEC),i=h.fromRadians(o.longitude,o.latitude,0,n,D0e)):(e._eyeHeight=-n.maximumRadius,h.magnitude(t.positionWC)>0&&(e._eyeEllipsoidNormalEC=h.normalize(t.positionWC,e._eyeEllipsoidNormalEC)),i=n.scaleToGeodeticSurface(t.positionWC,D0e)),e._encodedCameraPositionMCDirty=!0,!l(i))return;e._eyeEllipsoidNormalEC=$.multiplyByVector(e._viewRotation,e._eyeEllipsoidNormalEC,e._eyeEllipsoidNormalEC);let r=Gt.eastNorthUpToFixedFrame(i,n,ont);e._enuToModel=M.multiplyTransformation(e.inverseModel,r,e._enuToModel),e._modelToEnu=M.inverseTransformation(e._enuToModel,e._modelToEnu),W.equalsEpsilon(n._radii.x,n._radii.y,W.EPSILON15)&&(e._eyeEllipsoidCurvature=n.getLocalCurvature(i,e._eyeEllipsoidCurvature))}var Mv=new $,snt=new he;function ant(e,t){l(Gt.computeIcrfToFixedMatrix(t.time,Mv))||(Mv=Gt.computeTemeToPseudoFixedMatrix(t.time,Mv));let n=cy.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);$.multiplyByVector(Mv,n,n),h.normalize(n,e._sunDirectionWC),n=$.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),h.normalize(n,n),n=cy.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),$.multiplyByVector(Mv,n,n),$.multiplyByVector(e.viewRotation3D,n,n),h.normalize(n,n);let i=t.mapProjection,r=i.ellipsoid.cartesianToCartographic(e._sunPositionWC,snt);i.project(r,e._sunPositionColumbusView)}yV.prototype.updateCamera=function(e){ent(this,e.viewMatrix),tnt(this,e.inverseViewMatrix),rnt(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==oe.SCENE2D&&e.frustum instanceof sn};yV.prototype.updateFrustum=function(e){nnt(this,e.projectionMatrix),l(e.infiniteProjectionMatrix)&&int(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=W.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne;let t=e.offCenterFrustum;l(t)&&(e=t),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right};yV.prototype.updatePass=function(e){this._pass=e};var cnt=[],lnt=new U0;yV.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,this._pixelRatio=e.pixelRatio;let t=e.camera;this.updateCamera(t),e.mode===oe.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=this._frustum2DWidth*.5,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),ant(this,e);let n=y(e.light,lnt);n instanceof U0?(this._lightDirectionWC=h.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=h.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=h.normalize(h.negate(n.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=$.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));let i=n.color,o=h.fromElements(i.red,i.green,i.blue,this._lightColorHdr);o=h.multiplyByScalar(o,n.intensity,o);let r=h.maximumComponent(o);r>1?h.divideByScalar(o,r,this._lightColor):h.clone(o,this._lightColor);let s=e.brdfLutGenerator,a=l(s)?s.colorTexture:void 0;this._brdfLut=a,this._environmentMap=y(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=y(e.sphericalHarmonicCoefficients,cnt),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,l(this._specularEnvironmentMaps)&&D.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._fogMinimumBrightness=e.fog.minimumBrightness;let c=e.atmosphere;l(c)&&(this._atmosphereHsbShift=h.fromElements(c.hueShift,c.saturationShift,c.brightnessShift,this._atmosphereHsbShift),this._atmosphereLightIntensity=c.lightIntensity,this._atmosphereRayleighCoefficient=h.clone(c.rayleighCoefficient,this._atmosphereRayleighCoefficient),this._atmosphereRayleighScaleHeight=c.rayleighScaleHeight,this._atmosphereMieCoefficient=h.clone(c.mieCoefficient,this._atmosphereMieCoefficient),this._atmosphereMieScaleHeight=c.mieScaleHeight,this._atmosphereMieAnisotropy=c.mieAnisotropy,this._atmosphereDynamicLighting=c.dynamicLighting),this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=Gt.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._splitPosition=e.splitPosition*e.context.drawingBufferWidth;let d=t.frustum.fov,u=this._viewport,m;l(d)?u.height>u.width?m=Math.tan(.5*d)*2/u.height:m=Math.tan(.5*d)*2/u.width:m=1/Math.max(u.width,u.height),this._geometricToleranceOverMeter=m*e.maximumScreenSpaceError,Y.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};function B0e(e){if(e._viewportDirty){let t=e._viewport;M.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),M.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1}}function dnt(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode!==oe.SCENE2D&&e._mode!==oe.MORPHING&&!e._orthographicIn3D?M.inverse(e._projection,e._inverseProjection):M.clone(M.ZERO,e._inverseProjection))}function unt(e){e._modelViewDirty&&(e._modelViewDirty=!1,M.multiplyTransformation(e._view,e._model,e._modelView))}function mnt(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,M.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function hnt(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,M.inverse(e.modelView,e._inverseModelView))}function fnt(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,M.inverse(e.modelView3D,e._inverseModelView3D))}function pnt(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,M.multiply(e._projection,e._view,e._viewProjection))}function bnt(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,M.inverse(e.viewProjection,e._inverseViewProjection))}function gnt(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,M.multiply(e._projection,e.modelView,e._modelViewProjection))}function ynt(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;let t=e.modelView,n=e._modelViewRelativeToEye;n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=0,n[13]=0,n[14]=0,n[15]=t[15]}}function xnt(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,M.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function _nt(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,M.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function Tnt(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,M.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function Snt(e){if(e._normalDirty){e._normalDirty=!1;let t=e._normal;M.getMatrix3(e.inverseModelView,t),$.transpose(t,t)}}function Cnt(e){if(e._normal3DDirty){e._normal3DDirty=!1;let t=e._normal3D;M.getMatrix3(e.inverseModelView3D,t),$.transpose(t,t)}}function Vnt(e){if(e._inverseNormalDirty){e._inverseNormalDirty=!1;let t=e._inverseNormal;M.getMatrix3(e.modelView,t),$.transpose(t,t)}}function Lnt(e){if(e._inverseNormal3DDirty){e._inverseNormal3DDirty=!1;let t=e._inverseNormal3D;M.getMatrix3(e.modelView3D,t),$.transpose(t,t)}}var Y0e=new h;function O0e(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,M.multiplyByPoint(e.inverseModel,e._cameraPosition,Y0e),Yn.fromCartesian(Y0e,e._encodedCameraPositionMC))}var Rnt=new h,Znt=new h,Gnt=new h,Ent=new h,Xnt=new he,Int=new h,Wnt=new M;function Pnt(e,t,n,i,o,r,s,a){let c=Rnt;c.x=e.y,c.y=e.z,c.z=e.x;let d=Znt;d.x=n.y,d.y=n.z,d.z=n.x;let u=Gnt;u.x=i.y,u.y=i.z,u.z=i.x;let m=Ent;m.x=t.y,m.y=t.z,m.z=t.x,r===oe.SCENE2D&&(c.z=o*.5);let p=s.unproject(c,Xnt);p.longitude=W.clamp(p.longitude,-Math.PI,Math.PI),p.latitude=W.clamp(p.latitude,-W.PI_OVER_TWO,W.PI_OVER_TWO);let g=s.ellipsoid,f=g.cartographicToCartesian(p,Int),x=Gt.eastNorthUpToFixedFrame(f,g,Wnt);return M.multiplyByPointAsVector(x,d,d),M.multiplyByPointAsVector(x,u,u),M.multiplyByPointAsVector(x,m,m),l(a)||(a=new M),a[0]=d.x,a[1]=u.x,a[2]=-m.x,a[3]=0,a[4]=d.y,a[5]=u.y,a[6]=-m.y,a[7]=0,a[8]=d.z,a[9]=u.z,a[10]=-m.z,a[11]=0,a[12]=-h.dot(d,f),a[13]=-h.dot(u,f),a[14]=h.dot(m,f),a[15]=1,a}function n4(e){e._view3DDirty&&(e._mode===oe.SCENE3D?M.clone(e._view,e._view3D):Pnt(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),M.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function H0e(e){e._inverseView3DDirty&&(M.inverseTransformation(e.view3D,e._inverseView3D),M.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}var Nv=yV;function kd(e,t){let{getWebGLStub:n,requestWebgl1:i,webgl:o={},allowTextureFilterAnisotropic:r=!0}=y(t,{});o.alpha=y(o.alpha,!1),o.stencil=y(o.stencil,!0),o.powerPreference=y(o.powerPreference,"high-performance");let s=l(n)?n(e,o):vnt(e,o,i),c=typeof WebGL2RenderingContext<"u"&&s instanceof WebGL2RenderingContext;this._canvas=e,this._originalGLContext=s,this._gl=s,this._webgl2=c,this._id=Bn(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new wv(this),this._textureCache=new Fv;let d=s;this._stencilBits=d.getParameter(d.STENCIL_BITS),Mt._maximumCombinedTextureImageUnits=d.getParameter(d.MAX_COMBINED_TEXTURE_IMAGE_UNITS),Mt._maximumCubeMapSize=d.getParameter(d.MAX_CUBE_MAP_TEXTURE_SIZE),Mt._maximumFragmentUniformVectors=d.getParameter(d.MAX_FRAGMENT_UNIFORM_VECTORS),Mt._maximumTextureImageUnits=d.getParameter(d.MAX_TEXTURE_IMAGE_UNITS),Mt._maximumRenderbufferSize=d.getParameter(d.MAX_RENDERBUFFER_SIZE),Mt._maximumTextureSize=d.getParameter(d.MAX_TEXTURE_SIZE),Mt._maximumVaryingVectors=d.getParameter(d.MAX_VARYING_VECTORS),Mt._maximumVertexAttributes=d.getParameter(d.MAX_VERTEX_ATTRIBS),Mt._maximumVertexTextureImageUnits=d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Mt._maximumVertexUniformVectors=d.getParameter(d.MAX_VERTEX_UNIFORM_VECTORS),Mt._maximumSamples=this._webgl2?d.getParameter(d.MAX_SAMPLES):0;let u=d.getParameter(d.ALIASED_LINE_WIDTH_RANGE);Mt._minimumAliasedLineWidth=u[0],Mt._maximumAliasedLineWidth=u[1];let m=d.getParameter(d.ALIASED_POINT_SIZE_RANGE);Mt._minimumAliasedPointSize=m[0],Mt._maximumAliasedPointSize=m[1];let p=d.getParameter(d.MAX_VIEWPORT_DIMS);Mt._maximumViewportWidth=p[0],Mt._maximumViewportHeight=p[1];let g=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_FLOAT);Mt._highpFloatSupported=g.precision!==0;let f=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_INT);Mt._highpIntSupported=f.rangeMax!==0,this._antialias=d.getContextAttributes().antialias,this._standardDerivatives=!!Ar(d,["OES_standard_derivatives"]),this._blendMinmax=!!Ar(d,["EXT_blend_minmax"]),this._elementIndexUint=!!Ar(d,["OES_element_index_uint"]),this._depthTexture=!!Ar(d,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!Ar(d,["EXT_frag_depth"]),this._debugShaders=Ar(d,["WEBGL_debug_shaders"]),this._textureFloat=!!Ar(d,["OES_texture_float"]),this._textureHalfFloat=!!Ar(d,["OES_texture_half_float"]),this._textureFloatLinear=!!Ar(d,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!Ar(d,["OES_texture_half_float_linear"]),this._colorBufferFloat=!!Ar(d,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!Ar(d,["EXT_float_blend"]),this._colorBufferHalfFloat=!!Ar(d,["EXT_color_buffer_half_float"]),this._s3tc=!!Ar(d,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!Ar(d,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._astc=!!Ar(d,["WEBGL_compressed_texture_astc"]),this._etc=!!Ar(d,["WEBG_compressed_texture_etc"]),this._etc1=!!Ar(d,["WEBGL_compressed_texture_etc1"]),this._bc7=!!Ar(d,["EXT_texture_compression_bptc"]),yl.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);let x=r?Ar(d,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;this._textureFilterAnisotropic=x,Mt._maximumTextureFilterAnisotropy=l(x)?d.getParameter(x.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1;let _,C,V,L,Z,G,X,v,P,F;if(c){let E=this;_=function(){return E._gl.createVertexArray()},C=function(I){E._gl.bindVertexArray(I)},V=function(I){E._gl.deleteVertexArray(I)},L=function(I,w,N,B,U){d.drawElementsInstanced(I,w,N,B,U)},Z=function(I,w,N,B){d.drawArraysInstanced(I,w,N,B)},G=function(I,w){d.vertexAttribDivisor(I,w)},X=function(I){d.drawBuffers(I)}}else v=Ar(d,["OES_vertex_array_object"]),l(v)&&(_=function(){return v.createVertexArrayOES()},C=function(E){v.bindVertexArrayOES(E)},V=function(E){v.deleteVertexArrayOES(E)}),P=Ar(d,["ANGLE_instanced_arrays"]),l(P)&&(L=function(E,I,w,N,B){P.drawElementsInstancedANGLE(E,I,w,N,B)},Z=function(E,I,w,N){P.drawArraysInstancedANGLE(E,I,w,N)},G=function(E,I){P.vertexAttribDivisorANGLE(E,I)}),F=Ar(d,["WEBGL_draw_buffers"]),l(F)&&(X=function(E){F.drawBuffersWEBGL(E)});this.glCreateVertexArray=_,this.glBindVertexArray=C,this.glDeleteVertexArray=V,this.glDrawElementsInstanced=L,this.glDrawArraysInstanced=Z,this.glVertexAttribDivisor=G,this.glDrawBuffers=X,this._vertexArrayObject=!!v,this._instancedArrays=!!P,this._drawBuffers=!!F,Mt._maximumDrawBuffers=this.drawBuffers?d.getParameter(ne.MAX_DRAW_BUFFERS):1,Mt._maximumColorAttachments=this.drawBuffers?d.getParameter(ne.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new Y(0,0,0,0),this._clearDepth=1,this._clearStencil=0;let A=new Nv,b=new pc(this),R=De.fromCache();this._defaultPassState=b,this._defaultRenderState=R,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=A,this._currentRenderState=R,this._currentPassState=b,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(let E=0;E"u")throw new ue("The browser does not support WebGL. Visit http://get.webgl.org.");!n&&!(typeof WebGL2RenderingContext<"u")&&(n=!0);let o=n?"webgl":"webgl2",r=e.getContext(o,t);if(!l(r))throw new ue("The browser supports WebGL, but initialization failed.");return r}function wnt(e,t){let n="WebGL Error: ";switch(t){case e.INVALID_ENUM:n+="INVALID_ENUM";break;case e.INVALID_VALUE:n+="INVALID_VALUE";break;case e.INVALID_OPERATION:n+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:n+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:n+="CONTEXT_LOST_WEBGL lost";break;default:n+=`Unknown (${t})`}return n}function Fnt(e,t,n,i){let o=`${wnt(e,i)}: ${t.name}(`;for(let r=0;r=8}},antialias:{get:function(){return this._antialias}},msaa:{get:function(){return this._webgl2}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},astc:{get:function(){return this._astc}},etc:{get:function(){return this._etc}},etc1:{get:function(){return this._etc1}},bc7:{get:function(){return this._bc7}},supportsBasis:{get:function(){return this._s3tc||this._pvrtc||this._astc||this._etc||this._etc1||this._bc7}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=Nnt(this._originalGLContext,e?Ant:void 0)}},defaultTexture:{get:function(){return this._defaultTexture===void 0&&(this._defaultTexture=new Et({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultEmissiveTexture:{get:function(){return this._defaultEmissiveTexture===void 0&&(this._defaultEmissiveTexture=new Et({context:this,pixelFormat:at.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0])},flipY:!1})),this._defaultEmissiveTexture}},defaultNormalTexture:{get:function(){return this._defaultNormalTexture===void 0&&(this._defaultNormalTexture=new Et({context:this,pixelFormat:at.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([128,128,255])},flipY:!1})),this._defaultNormalTexture}},defaultCubeMap:{get:function(){if(this._defaultCubeMap===void 0){let e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new Qa({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},drawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth}},defaultFramebuffer:{get:function(){return knt}}});function z0e(e,t,n,i){let o=e._currentRenderState,r=e._currentPassState;e._currentRenderState=t,e._currentPassState=n,De.partialApply(e._gl,o,t,r,n,i)}var i4;typeof WebGLRenderingContext<"u"&&(i4=[ne.BACK]);function o4(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;let n=i4;if(l(t))t._bind(),n=t._getActiveColorAttachments();else{let i=e._gl;i.bindFramebuffer(i.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}var Unt=new ii;kd.prototype.clear=function(e,t){e=y(e,Unt),t=y(t,this._defaultPassState);let n=this._gl,i=0,o=e.color,r=e.depth,s=e.stencil;l(o)&&(Y.equals(this._clearColor,o)||(Y.clone(o,this._clearColor),n.clearColor(o.red,o.green,o.blue,o.alpha)),i|=n.COLOR_BUFFER_BIT),l(r)&&(r!==this._clearDepth&&(this._clearDepth=r,n.clearDepth(r)),i|=n.DEPTH_BUFFER_BIT),l(s)&&(s!==this._clearStencil&&(this._clearStencil=s,n.clearStencil(s)),i|=n.STENCIL_BUFFER_BIT);let a=y(e.renderState,this._defaultRenderState);z0e(this,a,t,!0);let c=y(e.framebuffer,t.framebuffer);o4(this,c),n.clear(i)};function Dnt(e,t,n,i,o){o4(e,t),z0e(e,o,n,!1),i._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,i.maximumTextureUnitIndex)}function Bnt(e,t,n,i){let o=t._primitiveType,r=t._vertexArray,s=t._offset,a=t._count,c=t.instanceCount;e._us.model=y(t._modelMatrix,M.IDENTITY),n._setUniforms(i,e._us,e.validateShaderProgram),r._bind();let d=r.indexBuffer;l(d)?(s=s*d.bytesPerIndex,l(a)?a=Math.min(a,d.numberOfIndices):a=d.numberOfIndices,c===0?e._gl.drawElements(o,a,d.indexDatatype,s):e.glDrawElementsInstanced(o,a,d.indexDatatype,s,c)):(l(a)?a=Math.min(a,r.numberOfVertices):a=r.numberOfVertices,c===0?e._gl.drawArrays(o,s,a):e.glDrawArraysInstanced(o,s,a,c)),r._unBind()}kd.prototype.draw=function(e,t,n,i){t=y(t,this._defaultPassState);let o=y(e._framebuffer,t.framebuffer),r=y(e._renderState,this._defaultRenderState);n=y(n,e._shaderProgram),i=y(i,e._uniformMap),Dnt(this,o,t,n,r),Bnt(this,e,n,i)};kd.prototype.endFrame=function(){let e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);let t=i4;this.drawBuffers&&this.glDrawBuffers(t);let n=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(let i=0;i0&&(a=s.getColorTexture(0).pixelDatatype);let c=at.createTypedArray(at.RGBA,a,o,r);return o4(this,s),t.readPixels(n,i,o,r,at.RGBA,ze.toWebGLConstant(a,this),c),c};var K0e={position:0,textureCoordinates:1};kd.prototype.getViewportQuadVertexArray=function(){let e=this.cache.viewportQuad_vertexArray;if(!l(e)){let t=new ut({attributes:{position:new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:Fe.TRIANGLES});e=ei.fromGeometry({context:this,geometry:t,attributeLocations:K0e,bufferUsage:Ne.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e};kd.prototype.createViewportQuadCommand=function(e,t){return t=y(t,y.EMPTY_OBJECT),new et({vertexArray:this.getViewportQuadVertexArray(),primitiveType:Fe.TRIANGLES,renderState:t.renderState,shaderProgram:qt.fromCache({context:this,vertexShaderSource:mT,fragmentShaderSource:e,attributeLocations:K0e}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})};kd.prototype.getObjectByPickColor=function(e){return this._pickObjects[e.toRgba()]};function r4(e,t,n){this._pickObjects=e,this.key=t,this.color=n}Object.defineProperties(r4.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}});r4.prototype.destroy=function(){delete this._pickObjects[this.key]};kd.prototype.createPickId=function(e){++this._nextPickColor[0];let t=this._nextPickColor[0];if(t===0)throw new ue("Out of unique Pick IDs.");return this._pickObjects[t]=e,new r4(this._pickObjects,t,Y.fromRgba(t))};kd.prototype.isDestroyed=function(){return!1};kd.prototype.destroy=function(){let e=this.cache;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];l(n.destroy)&&n.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultEmissiveTexture=this._defaultEmissiveTexture&&this._defaultEmissiveTexture.destroy(),this._defaultNormalTexture=this._defaultNormalTexture&&this._defaultNormalTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),me(this)};kd._deprecationWarning=Is;var kv=kd;var n0i=T(S(),1);function Ynt(e,t,n){let i={flipY:!0,skipColorSpaceConversion:n,preferImageBitmap:!0},o=[Ee.createIfNeeded(t.positiveX).fetchImage(i),Ee.createIfNeeded(t.negativeX).fetchImage(i),Ee.createIfNeeded(t.positiveY).fetchImage(i),Ee.createIfNeeded(t.negativeY).fetchImage(i),Ee.createIfNeeded(t.positiveZ).fetchImage(i),Ee.createIfNeeded(t.negativeZ).fetchImage(i)];return Promise.all(o).then(function(r){return new Qa({context:e,source:{positiveX:r[0],negativeX:r[1],positiveY:r[2],negativeY:r[3],positiveZ:r[4],negativeZ:r[5]}})})}var Uv=Ynt;var $bi=T(S(),1);var o0i=T(S(),1),Ont={NONE:0,LERC:1},Ku=Object.freeze(Ont);var dbi=T(S(),1);var w0i=T(S(),1);var y0i=T(S(),1);var s0i=T(S(),1),Hnt={NONE:0,BITS12:1},Ys=Object.freeze(Hnt);var fT=new h,znt=new h,Ju=new D,HU=new M,Knt=new M,Jnt=Math.pow(2,12);function bc(e,t,n,i,o,r,s,a,c,d){let u=Ys.NONE,m,p;if(l(t)&&l(n)&&l(i)&&l(o)){let g=t.minimum,f=t.maximum,x=h.subtract(f,g,znt),_=i-n;Math.max(h.maximumComponent(x),_)0,g=y(e.isGeographic,!0),f=y(e.ellipsoid,ie.WGS84),x=1/f.maximumRadius,_=ce.clone(e.nativeRectangle),C=ce.clone(e.rectangle),V,L,Z,G;l(C)?(V=C.west,L=C.south,Z=C.east,G=C.north):g?(V=a(_.west),L=a(_.south),Z=a(_.east),G=a(_.north)):(V=_.west*x,L=s-2*o(r(-_.south*x)),Z=_.east*x,G=s-2*o(r(-_.north*x)));let X=e.relativeToCenter,v=l(X);X=v?X:h.ZERO;let P=y(e.includeWebMercatorT,!1),F=y(e.exaggeration,1),A=y(e.exaggerationRelativeHeight,0),R=F!==1,E=y(e.structure,wf.DEFAULT_STRUCTURE),I=y(E.heightScale,wf.DEFAULT_STRUCTURE.heightScale),w=y(E.heightOffset,wf.DEFAULT_STRUCTURE.heightOffset),N=y(E.elementsPerHeight,wf.DEFAULT_STRUCTURE.elementsPerHeight),B=y(E.stride,wf.DEFAULT_STRUCTURE.stride),U=y(E.elementMultiplier,wf.DEFAULT_STRUCTURE.elementMultiplier),O=y(E.isBigEndian,wf.DEFAULT_STRUCTURE.isBigEndian),k=ce.computeWidth(_),J=ce.computeHeight(_),H=k/(d-1),ee=J/(u-1);g||(k*=x,J*=x);let z=f.radiiSquared,j=z.x,q=z.y,be=z.z,Te=65536,ae=-65536,ye=Gt.eastNorthUpToFixedFrame(X,f),Se=M.inverseTransformation(ye,jnt),Le,Xe;P&&(Le=Vi.geodeticLatitudeToMercatorAngle(L),Xe=1/(Vi.geodeticLatitudeToMercatorAngle(G)-Le));let Pe=qnt;Pe.x=Number.POSITIVE_INFINITY,Pe.y=Number.POSITIVE_INFINITY,Pe.z=Number.POSITIVE_INFINITY;let ke=$nt;ke.x=Number.NEGATIVE_INFINITY,ke.y=Number.NEGATIVE_INFINITY,ke.z=Number.NEGATIVE_INFINITY;let Pt=Number.POSITIVE_INFINITY,Ot=d*u,ht=m>0?d*2+u*2:0,Ae=Ot+ht,$e=new Array(Ae),Qe=new Array(Ae),je=new Array(Ae),kt=P?new Array(Ae):[],pe=R?new Array(Ae):[],Ve=0,Dt=u,bt=0,li=d;p&&(--Ve,++Dt,--bt,++li);let Vo=1e-5;for(let qe=Ve;qe=u&&(dt=u-1);let Bt=_.north-ee*dt;g?Bt=a(Bt):Bt=s-2*o(r(-Bt*x));let Ln=(Bt-L)/(G-L);Ln=W.clamp(Ln,0,1);let Lo=qe===Ve,nr=qe===Dt-1;m>0&&(Lo?Bt+=Vo*J:nr&&(Bt-=Vo*J));let Na=t(Bt),ka=n(Bt),io=be*ka,Bi;P&&(Bi=(Vi.geodeticLatitudeToMercatorAngle(Bt)-Le)*Xe);for(let us=bt;us=d&&(yr=d-1);let ml=dt*(d*B)+yr*B,Do;if(N===1)Do=c[ml];else{Do=0;let es;if(O)for(es=0;es=0;--es)Do=Do*U+c[ml+es]}Do=Do*I+w,ae=Math.max(ae,Do),Te=Math.min(Te,Do);let xr=_.west+H*yr;g?xr=a(xr):xr=xr*x;let fb=(xr-V)/(Z-V);fb=W.clamp(fb,0,1);let Gc=dt*d+yr;if(m>0){let es=us===bt,pb=us===li-1,bb=Lo||nr||es||pb;if((Lo||nr)&&(es||pb))continue;bb&&(Do-=m,es?(Gc=Ot+(u-dt-1),xr-=Vo*k):nr?Gc=Ot+u+(d-yr-1):pb?(Gc=Ot+u+d+dt,xr+=Vo*k):Lo&&(Gc=Ot+u+d+u+yr))}let Ua=Na*t(xr),dr=Na*n(xr),ya=j*Ua,oo=q*dr,$n=1/i(ya*Ua+oo*dr+io*ka),Ec=ya*$n,nd=oo*$n,Ny=io*$n,_r=new h;_r.x=Ec+Ua*Do,_r.y=nd+dr*Do,_r.z=Ny+ka*Do,M.multiplyByPoint(Se,_r,s4),h.minimumByComponent(s4,Pe,Pe),h.maximumByComponent(s4,ke,ke),Pt=Math.min(Pt,Do),$e[Gc]=_r,je[Gc]=new D(fb,Ln),Qe[Gc]=Do,P&&(kt[Gc]=Bi),R&&(pe[Gc]=f.geodeticSurfaceNormal(_r))}}let Rs=le.fromPoints($e),zs;l(C)&&(zs=Gn.fromRectangle(C,Te,ae,f));let Nr;v&&(Nr=new T0(f).computeHorizonCullingPointPossiblyUnderEllipsoid(X,$e,Te));let $r=new Gb(Pe,ke,X),Ue=new gc(X,$r,Pt,ae,ye,!1,P,R,F,A),it=new Float32Array(Ae*Ue.stride),tt=0;for(let qe=0;qe0?L=Kr.getRegularGridAndSkirtIndicesAndEdgeIndices(V.gridWidth,V.gridHeight):L=Kr.getRegularGridIndicesAndEdgeIndices(V.gridWidth,V.gridHeight);let Z=V.gridWidth*V.gridHeight;return C._mesh=new Qu(m,new Float32Array(V.vertices),L.indices,L.indexCountWithoutSkirts,Z,V.minimumHeight,V.maximumHeight,le.clone(V.boundingSphere3D),h.clone(V.occludeePointInScaledSpace),V.numberOfAttributes,Gn.clone(V.orientedBoundingBox),gc.clone(V.encoding),L.westIndicesSouthToNorth,L.southIndicesEastToWest,L.eastIndicesNorthToSouth,L.northIndicesWestToEast),C._buffer=void 0,C._mesh})};D0.prototype._createMeshSync=function(e){let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=t.ellipsoid,c=t.tileXYToNativeRectangle(n,i,o),d=t.tileXYToRectangle(n,i,o),u=a.cartographicToCartesian(ce.center(d)),m=this._structure,g=Kr.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<0?x=Kr.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):x=Kr.getRegularGridIndicesAndEdgeIndices(this._width,this._height);let _=f.gridWidth*f.gridHeight;return this._mesh=new Qu(u,f.vertices,x.indices,x.indexCountWithoutSkirts,_,f.minimumHeight,f.maximumHeight,f.boundingSphere3D,f.occludeePointInScaledSpace,f.encoding.stride,f.orientedBoundingBox,f.encoding,x.westIndicesSouthToNorth,x.southIndicesEastToWest,x.eastIndicesNorthToSouth,x.northIndicesWestToEast),this._mesh};D0.prototype.interpolateHeight=function(e,t,n){let i=this._width,o=this._height,r=this._structure,s=r.stride,a=r.elementsPerHeight,c=r.elementMultiplier,d=r.isBigEndian,u=r.heightOffset,m=r.heightScale,p=l(this._mesh),g=this._encoding===Ku.LERC;if(!p&&g)return;let x;if(p){let _=this._mesh.vertices,C=this._mesh.encoding;x=nbe(_,C,u,m,e,i,o,t,n)}else x=iit(this._buffer,a,c,s,d,e,i,o,t,n),x=x*m+u;return x};D0.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(a))return;let c=this._width,d=this._height,u=this._structure,m=u.stride,p=new this._bufferType(c*d*m),g=a.vertices,f=a.encoding,x=e.tileXYToRectangle(t,n,i),_=e.tileXYToRectangle(o,r,s),C=u.heightOffset,V=u.heightScale,L=u.elementsPerHeight,Z=u.elementMultiplier,G=u.isBigEndian,X=Math.pow(Z,L-1);for(let v=0;vu.highestEncodedHeight?u.highestEncodedHeight:b,oit(p,L,Z,X,m,G,v*c+F,b)}}return Promise.resolve(new D0({buffer:p,width:c,height:d,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))};D0.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<=s&&(g=s-1,p=s-2);let f=m|0,x=f+1;x>=a&&(x=a-1,f=a-2);let _=u-p,C=m-f;f=a-1-f,x=a-1-x;let V=QU(e,t,n,i,o,f*s+p),L=QU(e,t,n,i,o,f*s+g),Z=QU(e,t,n,i,o,x*s+p),G=QU(e,t,n,i,o,x*s+g);return ibe(_,C,V,L,Z,G)}function nbe(e,t,n,i,o,r,s,a,c){let d=(a-o.west)*(r-1)/(o.east-o.west),u=(c-o.south)*(s-1)/(o.north-o.south),m=d|0,p=m+1;p>=r&&(p=r-1,m=r-2);let g=u|0,f=g+1;f>=s&&(f=s-1,g=s-2);let x=d-m,_=u-g;g=s-1-g,f=s-1-f;let C=(t.decodeHeight(e,g*r+m)-n)/i,V=(t.decodeHeight(e,g*r+p)-n)/i,L=(t.decodeHeight(e,f*r+m)-n)/i,Z=(t.decodeHeight(e,f*r+p)-n)/i;return ibe(x,_,C,V,L,Z)}function ibe(e,t,n,i,o,r){return t=0;--a)s=s*n+e[r+a];return s}function oit(e,t,n,i,o,r,s,a){s*=o;let c;if(r)for(c=0;c0;--c)e[s+c]=a/i|0,a-=e[s+c]*i,i/=n;e[s+c]=a}var va=D0;var bbi=T(S(),1);function SV(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}var pT=new ce;function rit(e,t,n,i){let o=i.length;for(let r=0;r=0;--i)if(l(n[i])&&n[i].length===0)return i;return 0};var obe=new he;SV.prototype.isTileAvailable=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(t,n,e,pT);return ce.center(i,obe),this.computeMaximumLevelAtPosition(obe)>=e};SV.prototype.computeChildMaskForTile=function(e,t,n){let i=e+1;if(i>=this._maximumLevel)return 0;let o=0;return o|=this.isTileAvailable(i,2*t,2*n+1)?1:0,o|=this.isTileAvailable(i,2*t+1,2*n+1)?2:0,o|=this.isTileAvailable(i,2*t,2*n)?4:0,o|=this.isTileAvailable(i,2*t+1,2*n)?8:0,o};function _V(e,t,n,i,o){this.tilingScheme=e,this.parent=t,this.level=n,this.x=i,this.y=o,this.extent=e.tileXYToRectangle(i,o,n),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}Object.defineProperties(_V.prototype,{nw:{get:function(){return this._nw||(this._nw=new _V(this.tilingScheme,this,this.level+1,this.x*2,this.y*2)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new _V(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new _V(this.tilingScheme,this,this.level+1,this.x*2,this.y*2+1)),this._sw}},se:{get:function(){return this._se||(this._se=new _V(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2+1)),this._se}}});function dit(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function a4(e,t){let n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),o=Math.min(e.east,t.east),r=Math.min(e.north,t.north);return i=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function TV(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function Dv(e,t,n){let i=0,o=!1;for(;!o;){let r=t._nw&&TV(t._nw.extent,n),s=t._ne&&TV(t._ne.extent,n),a=t._sw&&TV(t._sw.extent,n),c=t._se&&TV(t._se.extent,n);if(r+s+a+c>1){r&&(i=Math.max(i,Dv(t,t._nw,n))),s&&(i=Math.max(i,Dv(t,t._ne,n))),a&&(i=Math.max(i,Dv(t,t._sw,n))),c&&(i=Math.max(i,Dv(t,t._se,n)));break}else r?t=t._nw:s?t=t._ne:a?t=t._sw:c?t=t._se:o=!0}for(;t!==e;){let r=t.rectangles;for(let s=r.length-1;s>=0&&r[s].level>i;--s){let a=r[s];TV(a,n)&&(i=a.level)}t=t.parent}return i}function Bv(e,t,n){if(!t)return;let i,o=!1;for(i=0;it.east&&n.push(new ce(t.east,o.south,o.east,o.north)),o.southt.north&&n.push(new ce(Math.max(t.west,o.west),t.north,Math.min(t.east,o.east),o.north))):n.push(o)}return n}var gh=SV;var Vbi=T(S(),1);var xbi=T(S(),1);function fit(e){let t,n=e.name,i=e.message;l(n)&&l(i)?t=`${n}: ${i}`:t=e.toString();let o=e.stack;return l(o)&&(t+=` -${o}`),t}var Ff=fit;function qU(e,t,n,i,o,r,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=y(r,0),this.retry=!1,this.error=s}qU.reportError=function(e,t,n,i,o,r,s,a){let c=e;return l(e)?(c.provider=t,c.message=i,c.x=o,c.y=r,c.level=s,c.retry=!1,c.error=a,++c.timesRetried):c=new qU(t,i,o,r,s,0,a),l(n)&&n.numberOfListeners>0?n.raiseEvent(c):l(t)&&console.log(`An error occurred in "${t.constructor.name}": ${Ff(i)}`),c};qU.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};var Co=qU;var Wbi=T(S(),1);function dy(e){if(e=y(e,y.EMPTY_OBJECT),this._ellipsoid=y(e.ellipsoid,ie.WGS84),this._numberOfLevelZeroTilesX=y(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=y(e.numberOfLevelZeroTilesY,1),this._projection=new Vi(this._ellipsoid),l(e.rectangleSouthwestInMeters)&&l(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{let i=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new D(-i,-i),this._rectangleNortheastInMeters=new D(i,i)}let t=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new ce(t.longitude,t.latitude,n.longitude,n.latitude)}Object.defineProperties(dy.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});dy.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<=o&&(f=o-1);let x=g/d|0;return x>=r&&(x=r-1),l(n)?(n.x=f,n.y=x,n):new D(f,x)};var Jr=dy;var pit=15;function rbe(e){this.ellipsoid=y(e.ellipsoid,ie.WGS84),this.credit=void 0,this.tilingScheme=void 0,this.height=void 0,this.width=void 0,this.encoding=void 0,this.lodCount=void 0,this.hasAvailability=!1,this.tilesAvailable=void 0,this.tilesAvailabilityLoaded=void 0,this.levelZeroMaximumGeometricError=void 0,this.terrainDataStructure=void 0}rbe.prototype.build=function(e){e._credit=this.credit,e._tilingScheme=this.tilingScheme,e._height=this.height,e._width=this.width,e._encoding=this.encoding,e._lodCount=this.lodCount,e._hasAvailability=this.hasAvailability,e._tilesAvailable=this.tilesAvailable,e._tilesAvailabilityLoaded=this.tilesAvailabilityLoaded,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._terrainDataStructure=this.terrainDataStructure};function bit(e,t){let n=t.copyrightText;l(n)&&(e.credit=new Vt(n));let i=t.spatialReference,o=y(i.latestWkid,i.wkid),r=t.extent,s={ellipsoid:e.ellipsoid};if(o===4326)s.rectangle=ce.fromDegrees(r.xmin,r.ymin,r.xmax,r.ymax),e.tilingScheme=new Mi(s);else if(o===3857){let d=Math.PI*e.ellipsoid.maximumRadius;t.extent.xmax>d&&(t.extent.xmax=d),t.extent.ymax>d&&(t.extent.ymax=d),t.extent.xmin<-d&&(t.extent.xmin=-d),t.extent.ymin<-d&&(t.extent.ymin=-d),s.rectangleSouthwestInMeters=new D(r.xmin,r.ymin),s.rectangleNortheastInMeters=new D(r.xmax,r.ymax),e.tilingScheme=new Jr(s)}else throw new ue("Invalid spatial reference");let a=t.tileInfo;if(!l(a))throw new ue("tileInfo is required");e.width=a.rows+1,e.height=a.cols+1,e.encoding=a.format==="LERC"?Ku.LERC:Ku.NONE,e.lodCount=a.lods.length-1,(e.hasAvailability=t.capabilities.indexOf("Tilemap")!==-1)&&(e.tilesAvailable=new gh(e.tilingScheme,e.lodCount),e.tilesAvailable.addAvailableTileRange(0,0,0,e.tilingScheme.getNumberOfXTilesAtLevel(0),e.tilingScheme.getNumberOfYTilesAtLevel(0)),e.tilesAvailabilityLoaded=new gh(e.tilingScheme,e.lodCount)),e.levelZeroMaximumGeometricError=Kr.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.width,e.tilingScheme.getNumberOfXTilesAtLevel(0)),t.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),l(t.minValues)&&l(t.maxValues)?e.terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:t.minValues[0],highestEncodedHeight:t.maxValues[0]}:e.terrainDataStructure={elementMultiplier:1}}async function git(e,t,n){try{let i=await t.fetchJson();bit(e,i)}catch(i){let o=`An error occurred while accessing ${t}.`;throw Co.reportError(void 0,n,l(n)?n._errorEvent:void 0,o),i}}function uy(e){e=y(e,y.EMPTY_OBJECT),this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._width=void 0,this._height=void 0,this._encoding=void 0,this._lodCount=void 0,this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailabilityLoaded=void 0,this._availableCache={},this._errorEvent=new ge}Object.defineProperties(uy.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});uy.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT),e=await Promise.resolve(e);let n=Ee.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&(n=n.getDerivedResource({queryParameters:{token:t.token}}));let i=n.getDerivedResource({queryParameters:{f:"pjson"}}),o=new rbe(t);await git(o,i);let r=new uy(t);return o.build(r),r._resource=n,r};uy.prototype.requestTileGeometry=function(e,t,n,i){let o=this._resource.getDerivedResource({url:`tile/${n}/${t}/${e}`,request:i}),r=this._hasAvailability,s=Promise.resolve(!0),a;if(r&&!l(c4(this,n+1,e*2,t*2))){let m=sbe(this,n+1,e*2,t*2);s=m.promise,a=m.request}let c=o.fetchArrayBuffer();if(!l(c)||!l(s))return;let d=this,u=this._tilesAvailable;return Promise.all([c,s]).then(function(m){return new va({buffer:m[0],width:d._width,height:d._height,childTileMask:r?u.computeChildMaskForTile(n,e,t):pit,structure:d._terrainDataStructure,encoding:d._encoding})}).catch(function(m){return l(a)&&a.state===Qn.CANCELLED?(i.cancel(),i.deferred.promise.finally(function(){return i.state=Qn.CANCELLED,Promise.reject(m)})):Promise.reject(m)})};function c4(e,t,n,i){if(!e._hasAvailability)return;let o=e._tilesAvailabilityLoaded,r=e._tilesAvailable;if(t>e._lodCount)return!1;if(r.isTileAvailable(t,n,i))return!0;if(o.isTileAvailable(t,n,i))return!1}uy.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<0;){let c=a.pop(),d=yit(c,n,i,o);if(d.value===1){let m=d.range;m.startX+=e,m.endX+=e,m.startY+=t,m.endY+=t,r.push(m)}let u=d.endingIndices;u.length>0&&(a=a.concat(u))}return r}function sbe(e,t,n,i){if(!e._hasAvailability)return{};let o=Math.floor(n/128)*128,r=Math.floor(i/128)*128,s=Math.min(1<',!1)}Object.defineProperties(d4.prototype,{url:{get:function(){return abe}},key:{get:function(){return this._key}},credit:{get:function(){return this._credit}}});d4.prototype.geocode=async function(e){return this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then(function(n){return n.resourceSets.length===0?[]:n.resourceSets[0].resources.map(function(o){let r=o.bbox,s=r[0],a=r[1],c=r[2],d=r[3];return{displayName:o.name,destination:ce.fromDegrees(a,s,d,c)}})})};var u4=d4;var lgi=T(S(),1);function m4(){}Object.defineProperties(m4.prototype,{credit:{get:function(){}}});m4.prototype.geocode=function(e){let t=e.match(/[^\s,\n]+/g);if(t.length===2||t.length===3){let n=+t[0],i=+t[1],o=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let r=/^(\d+.?\d*)([nsew])/i;for(let s=0;s2&&(l(i)||(i=Sit,h.multiplyByScalar(t[1],2,i),h.subtract(i,t[2],i),h.subtract(i,t[0],i),h.multiplyByScalar(i,.5,i)),!l(o))){let r=t.length-1;o=Cit,h.multiplyByScalar(t[r-1],2,o),h.subtract(t[r],o,o),h.add(o,t[r-2],o),h.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=h.clone(i),this._lastTangent=h.clone(o),this._evaluateFunction=Tit(this),this._lastTimeIndex=0}Object.defineProperties(my.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});my.catmullRomCoefficientMatrix=new M(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);my.prototype.findTimeInterval=to.prototype.findTimeInterval;my.prototype.wrapTime=to.prototype.wrapTime;my.prototype.clampTime=to.prototype.clampTime;my.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var f4=my;var cyi=T(S(),1);var Mgi=T(S(),1);var Cgi=T(S(),1);var $U={};$U.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,o,r){l(r)?r.length=0:r=[];let s,a,c;t?(s=ne,a=i>e,c=o>e);let d=s+a+c,u,m,p,g,f,x;return d===1?s?(u=(e-n)/(i-n),m=(e-n)/(o-n),r.push(1),r.push(2),m!==1&&(r.push(-1),r.push(0),r.push(2),r.push(m)),u!==1&&(r.push(-1),r.push(0),r.push(1),r.push(u))):a?(p=(e-i)/(o-i),g=(e-i)/(n-i),r.push(2),r.push(0),g!==1&&(r.push(-1),r.push(1),r.push(0),r.push(g)),p!==1&&(r.push(-1),r.push(1),r.push(2),r.push(p))):c&&(f=(e-o)/(n-o),x=(e-o)/(i-o),r.push(0),r.push(1),x!==1&&(r.push(-1),r.push(2),r.push(1),r.push(x)),f!==1&&(r.push(-1),r.push(2),r.push(0),r.push(f))):d===2?!s&&n!==e?(g=(e-i)/(n-i),f=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(g),r.push(-1),r.push(2),r.push(0),r.push(f)):!a&&i!==e?(x=(e-o)/(i-o),u=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(x),r.push(-1),r.push(0),r.push(1),r.push(u)):!c&&o!==e&&(m=(e-n)/(o-n),p=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(m),r.push(-1),r.push(1),r.push(2),r.push(p)):d!==3&&(r.push(0),r.push(1),r.push(2)),r};$U.computeBarycentricCoordinates=function(e,t,n,i,o,r,s,a,c){let d=n-s,u=s-o,m=r-a,p=i-a,g=1/(m*d+u*p),f=t-a,x=e-s,_=(m*x+u*f)*g,C=(-p*x+d*f)*g,V=1-_-C;return l(c)?(c.x=_,c.y=C,c.z=V,c):new h(_,C,V)};$U.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,o,r,s,a,c){let d=(s-o)*(t-r)-(a-r)*(e-o),u=(n-e)*(t-r)-(i-t)*(e-o),m=(a-r)*(n-e)-(s-o)*(i-t);if(m===0)return;let p=d/m,g=u/m;if(p>=0&&p<=1&&g>=0&&g<=1)return l(c)||(c=new D),c.x=e+p*(n-e),c.y=t+p*(i-t),c};var B0=$U;function hy(e){this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;let t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);this._heightValues=this._quantizedVertices.subarray(2*t,3*t);function o(s,a){return i[s]-i[a]}function r(s,a){return n[s]-n[a]}this._westIndices=tD(e.westIndices,o,t),this._southIndices=tD(e.southIndices,r,t),this._eastIndices=tD(e.eastIndices,o,t),this._northIndices=tD(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=y(e.childTileMask,15),this._createdByUpsampling=y(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties(hy.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return l(this._mesh)}}});var eD=[];function tD(e,t,n){eD.length=e.length;let i=!1;for(let o=0,r=e.length;o0&&t(e[o-1],e[o])>0;return i?(eD.sort(t),Me.createTypedArray(n,eD)):e}var lbe="createVerticesFromQuantizedTerrainMesh",Vit=new pi(lbe),Lit=new pi(lbe,bh.maximumAsynchronousTasks);hy.prototype.createMesh=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=y(e.throttle,!0),c=t.ellipsoid,d=t.tileXYToRectangle(n,i,o),m=(a?Lit:Vit).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:d,relativeToCenter:this._boundingSphere.center,ellipsoid:c,exaggeration:r,exaggerationRelativeHeight:s});if(!l(m))return;let p=this;return Promise.resolve(m).then(function(g){let f=p._quantizedVertices.length/3,x=f+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,_=Me.createTypedArray(x,g.indices),C=new Float32Array(g.vertices),V=g.center,L=g.minimumHeight,Z=g.maximumHeight,G=p._boundingSphere,X=p._orientedBoundingBox,v=y(h.clone(g.occludeePointInScaledSpace),p._horizonOcclusionPoint),P=g.vertexStride,F=gc.clone(g.encoding);return p._mesh=new Qu(V,C,_,g.indexCountWithoutSkirts,f,L,Z,G,v,P,X,F,g.westIndicesSouthToNorth,g.southIndicesEastToWest,g.eastIndicesNorthToSouth,g.northIndicesWestToEast),p._quantizedVertices=void 0,p._encodedNormals=void 0,p._indices=void 0,p._uValues=void 0,p._vValues=void 0,p._heightValues=void 0,p._westIndices=void 0,p._southIndices=void 0,p._eastIndices=void 0,p._northIndices=void 0,p._mesh})};var Rit=new pi("upsampleQuantizedTerrainMesh",bh.maximumAsynchronousTasks);hy.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,d=n*2===r,u=e.ellipsoid,m=e.tileXYToRectangle(o,r,s),p=Rit.scheduleTask({vertices:a.vertices,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:d,childRectangle:m,ellipsoid:u});if(!l(p))return;let g=Math.min(this._westSkirtHeight,this._eastSkirtHeight);g=Math.min(g,this._southSkirtHeight),g=Math.min(g,this._northSkirtHeight);let f=c?g*.5:this._westSkirtHeight,x=d?g*.5:this._southSkirtHeight,_=c?this._eastSkirtHeight:g*.5,C=d?this._northSkirtHeight:g*.5,V=this._credits;return Promise.resolve(p).then(function(L){let Z=new Uint16Array(L.vertices),G=Me.createTypedArray(Z.length/3,L.indices),X;return l(L.encodedNormals)&&(X=new Uint8Array(L.encodedNormals)),new hy({quantizedVertices:Z,indices:G,encodedNormals:X,minimumHeight:L.minimumHeight,maximumHeight:L.maximumHeight,boundingSphere:le.clone(L.boundingSphere),orientedBoundingBox:Gn.clone(L.orientedBoundingBox),horizonOcclusionPoint:h.clone(L.horizonOcclusionPoint),westIndices:L.westIndices,southIndices:L.southIndices,eastIndices:L.eastIndices,northIndices:L.northIndices,westSkirtHeight:f,southSkirtHeight:x,eastSkirtHeight:_,northSkirtHeight:C,childTileMask:0,credits:V,createdByUpsampling:!0})})};var p4=32767,dbe=new h;hy.prototype.interpolateHeight=function(e,t,n){let i=W.clamp((t-e.west)/e.width,0,1);i*=p4;let o=W.clamp((n-e.south)/e.height,0,1);return o*=p4,l(this._mesh)?Xit(this,i,o):Iit(this,i,o)};function ube(e,t,n,i,o,r,s,a){let c=Math.min(n,o,s),d=Math.max(n,o,s),u=Math.min(i,r,a),m=Math.max(i,r,a);return e>=c&&e<=d&&t>=u&&t<=m}var Zit=new D,Git=new D,Eit=new D;function Xit(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){let _=r.decodeHeight(o,d),C=r.decodeHeight(o,u),V=r.decodeHeight(o,m);return x.x*_+x.y*C+x.z*V}}}}function Iit(e,t,n){let i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,c=s.length;a=-1e-15&&V.y>=-1e-15&&V.z>=-1e-15){let L=V.x*r[d]+V.y*r[u]+V.z*r[m];return W.lerp(e._minimumHeight,e._maximumHeight,L/p4)}}}}hy.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<0&&(e.attribution+=" "),e.attribution+=t.attribution),e.layers.push(new Wit({resource:e.lastResource,version:t.version,isHeightmap:a,tileUrlTemplates:c,availability:g,hasVertexNormals:i,hasWaterMask:o,hasMetadata:r,availabilityLevels:m,availabilityTilesLoaded:u,littleEndianExtensionSize:s}));let f=t.parentUrl;return l(f)?l(g)?(e.lastResource=e.lastResource.getDerivedResource({url:f}),e.lastResource.appendForwardSlash(),e.layerJsonResource=e.lastResource.getDerivedResource({url:"layer.json"}),await y4(e),!0):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),!0):!0}function Pit(e,t,n){let i=`An error occurred while accessing ${e.layerJsonResource.url}.`;if(l(t)&&(i+=` -${t.message}`),e.previousError=Co.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,i),e.previousError.retry)return y4(e,n);throw new ue(i)}async function vit(e,t,n){await fbe(e,t,n);let i=e.overallAvailability.length;if(i>0){let o=e.availability=new gh(e.tilingScheme,e.overallMaxZoom);for(let r=0;r0){let o=new Vt(e.attribution);e.tileCredits.push(o)}return!0}async function y4(e,t){try{let n=await e.layerJsonResource.fetchJson();return vit(e,n,t)}catch(n){return l(n)&&n.statusCode===404?(await fbe(e,{tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]},t),!0):Pit(e,n,t)}}function yh(e){e=y(e,y.EMPTY_OBJECT),this._heightmapWidth=void 0,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._hasMetadata=!1,this._scheme=void 0,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=y(e.requestVertexNormals,!1),this._requestWaterMask=y(e.requestWaterMask,!1),this._requestMetadata=y(e.requestMetadata,!0),this._errorEvent=new ge;let t=e.credit;typeof t=="string"&&(t=new Vt(t)),this._credit=t,this._availability=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._layers=void 0,this._tileCredits=void 0}var b4={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function mbe(e){return!l(e)||e.length===0?{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}}function wit(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new va({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function Fit(e,t,n,i,o,r){let s=r.littleEndianExtensionSize,a=0,c=3,d=c+1,u=Float64Array.BYTES_PER_ELEMENT*c,m=Float64Array.BYTES_PER_ELEMENT*d,g=Uint16Array.BYTES_PER_ELEMENT*3,f=3,x=Uint16Array.BYTES_PER_ELEMENT,_=x*f,C=new DataView(t),V=new h(C.getFloat64(a,!0),C.getFloat64(a+8,!0),C.getFloat64(a+16,!0));a+=u;let L=C.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let Z=C.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let G=new le(new h(C.getFloat64(a,!0),C.getFloat64(a+8,!0),C.getFloat64(a+16,!0)),C.getFloat64(a+u,!0));a+=m;let X=new h(C.getFloat64(a,!0),C.getFloat64(a+8,!0),C.getFloat64(a+16,!0));a+=u;let v=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let P=new Uint16Array(t,a,v*3);a+=v*g,v>64*1024&&(x=Uint32Array.BYTES_PER_ELEMENT,_=x*f);let F=P.subarray(0,v),A=P.subarray(v,2*v),b=P.subarray(v*2,3*v);wn.zigZagDeltaDecode(F,A,b),a%x!==0&&(a+=x-a%x);let R=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let E=Me.createTypedArrayFromArrayBuffer(v,t,a,R*f);a+=R*_;let I=0,w=E.length;for(let ae=0;ae0){let Xe=Eo(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,Se).available;if(l(Xe))for(let Pe=0;Pem.promise))}return!l(r)&&a?c.then(()=>new Promise(d=>{setTimeout(()=>{let u=this.requestTileGeometry(e,t,n,i);d(u)},0)})):pbe(this,e,t,n,r,i)};function pbe(e,t,n,i,o,r){if(!l(o))return Promise.reject(new ue("Terrain tile doesn't exist"));let s=o.tileUrlTemplates;if(s.length===0)return;let a;!e._scheme||e._scheme==="tms"?a=e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1:a=n;let c=[];e._requestVertexNormals&&o.hasVertexNormals&&c.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&c.push("watermask"),e._requestMetadata&&o.hasMetadata&&c.push("metadata");let d,u,m=s[(t+a+i)%s.length],p=o.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(u={extensions:c.join("-")}),d=mbe(void 0)):d=mbe(c);let g=p.getDerivedResource({url:m,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:u,headers:d,request:r}).fetchArrayBuffer();if(l(g))return g.then(function(f){return l(f)?l(e._heightmapStructure)?wit(e,f,i,t,n):Fit(e,f,i,t,n,o):Promise.reject(new ue("Mesh buffer doesn't exist."))})}Object.defineProperties(yh.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}});yh.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(n,e,t))return!0;if(!this._hasMetadata)return!1;let i=this._layers,o=i.length;for(let r=0;rthis._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;let i=this._layers,o=i.length;for(let r=0;re;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});xh.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new xh({comparator:t,maximumLength:e});o._length=i;for(let r=0;r=2&&(this._array[0]=this._array[e-1],ybe(this,0)),this._array[e-1]=void 0,t};xh.prototype.removeMaximum=function(){let e=this._length;if(e===0)return;this._length--;let t;if(e<=2)t=this._array[e-1];else{let n=V4(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&ybe(this,n)}return this._array[e-1]=void 0,t};xh.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};xh.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[V4(this,1,2)?1:2]};function nD(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function Yv(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function V4(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function gbe(e,t){if(t===0)return;let n=Math.floor(W.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=Yv(e,t,i);for(o!==n&&(nD(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if(Yv(e,t,r)!==o)break;nD(e,t,r),t=r}}function ybe(e,t){let n=e._length,i=Math.floor(W.log2(t+1))%2===0,o;for(;(o=2*t+1)mF8J\xB4\xDD\xF0.\xDDu\x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W>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2 -\xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1 -ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS ->\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88 -\x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function Dd(e){this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=W.EPSILON12,this.providers={},this.key=void 0,this._resource=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={}}Object.defineProperties(Dd.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}}});Dd.fromUrl=async function(e){let t=e;typeof t!="string"&&!(t instanceof Ee)&&(t=e.url);let n=Ee.createIfNeeded(t);n.appendForwardSlash();let i=new Dd;i._resource=n;try{await fot(i),await i.getQuadTreePacket("",i._quadPacketVersion)}catch(o){let r=`An error occurred while accessing ${Rbe(i,"",1).url}: ${o}`;throw new ue(r)}return i};Dd.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<=0;--o){let r=1<1;)if(o=i.substring(i.length-1),i=i.substring(0,i.length-1),t=this.getTileInformationFromQuadKey(i),l(t)){!t.hasSubtree()&&!t.hasChild(parseInt(o))&&(n=!1);break}else if(t===null){n=!1;break}return n};var Lbe=new pi("decodeGoogleEarthEnterprisePacket");Dd.prototype.getQuadTreePacket=function(e,t,n){t=y(t,1),e=y(e,"");let o=Rbe(this,e,t,n).fetchArrayBuffer();if(!l(o))return;let r=this._tileInfo,s=this.key;return o.then(function(a){return Lbe.scheduleTask({buffer:a,quadKey:e,type:"Metadata",key:s},[a]).then(function(d){let u,m=-1;if(e!==""){m=e.length+1;let f=d[e];u=r[e],u._bits|=f._bits,delete d[e]}let p=Object.keys(d);p.sort(function(f,x){return f.length-x.length});let g=p.length;for(let f=0;f1){let L=r[x.substring(0,x.length-1)];C.setParent(L)}r[x]=C}else r[x]=null}})})};Dd.prototype.populateSubtree=function(e,t,n,i){let o=Dd.tileXYToQuadKey(e,t,n);return W4(this,o,i)};function W4(e,t,n){let i=e._tileInfo,o=t,r=i[o];if(l(r)&&(!r.hasSubtree()||r.hasChildren()))return r;for(;r===void 0&&o.length>1;)o=o.substring(0,o.length-1),r=i[o];let s,a=e._subtreePromises,c=a[o];if(l(c))return c.then(function(){return s=new Yo({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),W4(e,t,s)});if(!l(r)||!r.hasSubtree())return Promise.reject(new ue(`Couldn't load metadata for tile ${t}`));if(c=e.getQuadTreePacket(o,r.cnodeVersion,n),!!l(c))return a[o]=c,c.then(function(){return s=new Yo({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),W4(e,t,s)}).finally(function(){delete a[o]})}Dd.prototype.getTileInformation=function(e,t,n){let i=Dd.tileXYToQuadKey(e,t,n);return this._tileInfo[i]};Dd.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};function Rbe(e,t,n,i){return e._resource.getDerivedResource({url:`flatfile?q2-0${t}-q.${n.toString()}`,request:i})}var X4,I4;function fot(e){let t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!l(I4)){let n=tn("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser;I4=Hy(n).then(function(){X4=window.cesiumGoogleEarthDbRootParser(uot),l(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser})}return I4.then(function(){return t.fetchArrayBuffer()}).then(function(n){let i=X4.EncryptedDbRootProto.decode(new Uint8Array(n)),o=i.encryptionData,r=o.byteOffset,s=r+o.byteLength,a=e.key=o.buffer.slice(r,s);o=i.dbrootData,r=o.byteOffset,s=r+o.byteLength;let c=o.buffer.slice(r,s);return Lbe.scheduleTask({buffer:c,type:"DbRoot",key:a},[c])}).then(function(n){let i=X4.DbRootProto.decode(new Uint8Array(n.buffer));if(e.imageryPresent=y(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=y(i.terrainPresent,e.terrainPresent),l(i.endSnippet)&&l(i.endSnippet.model)){let a=i.endSnippet.model;e.negativeAltitudeExponentBias=y(a.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=y(a.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)}l(i.databaseVersion)&&(e._quadPacketVersion=y(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));let o=e.providers,r=y(i.providerInfo,[]),s=r.length;for(let a=0;a=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){let _=r.decodeHeight(o,d),C=r.decodeHeight(o,u),V=r.decodeHeight(o,m);return x.x*_+x.y*C+x.z*V}}}var Sot=Uint16Array.BYTES_PER_ELEMENT,Gbe=Uint32Array.BYTES_PER_ELEMENT,v4=Int32Array.BYTES_PER_ELEMENT,Cot=Float32Array.BYTES_PER_ELEMENT,w4=Float64Array.BYTES_PER_ELEMENT;function Vot(e,t,n,i){let o=e._buffer,r=0,s=0,a=0;n>.5?(t>.5?(r=2,s=.5):r=3,a=.5):t>.5&&(r=1,s=.5);let c=new DataView(o),d=0;for(let G=0;G=-1e-15&&I.y>=-1e-15&&I.z>=-1e-15)return I.x*V[G]+I.y*V[X]+I.z*V[v]}}var EV=TT;var eTi=T(S(),1);var ju={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},rD=new te;function sD(){this._terrainCache={},this._lastTidy=te.now()}sD.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:te.now()}};sD.prototype.get=function(e){let n=this._terrainCache[e];if(l(n))return delete this._terrainCache[e],n.buffer};sD.prototype.tidy=function(){if(te.now(rD),te.secondsDifference(rD,this._lastTidy)>10){let e=this._terrainCache,t=Object.keys(e),n=t.length;for(let i=0;i10&&delete e[o]}te.clone(rD,this._lastTidy)}};function by(e){e=y(e,y.EMPTY_OBJECT),this._tilingScheme=new Mi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ce(-W.PI,-W.PI,W.PI,W.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new Vt(t)),this._credit=t,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new sD,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new ge}Object.defineProperties(by.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});by.fromMetadata=function(e,t){if(!e.terrainPresent)throw new ue(`The server ${e.url} doesn't have terrain`);let n=new by(t);return n._metadata=e,n};var Lot=new pi("decodeGoogleEarthEnterprisePacket");function Ibe(e,t,n){let i=t.getChildBitmask();if(t.terrainState===ju.PARENT){i=0;for(let o=0;o<4;++o){let r=n.getTileInformationFromQuadKey(e+o.toString());l(r)&&r.hasTerrain()&&(i|=1<0?n:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${t}-t.${n.toString()}`,request:i})}var F4=by;var oTi=T(S(),1);var aD={};aD.defaultApiKey=void 0;aD.mapTilesApiEndpoint=new Ee({url:"https://tile.googleapis.com/v1/"});aD.getDefaultCredit=function(){return new Vt('Google',!0)};var ST=aD;var hTi=T(S(),1);var sTi=T(S(),1);function Zot(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i}var Jv=Zot;var Obe={},Got=32.184,Eot=2451545,Wbe=-.0529921,Pbe=-.1059842,vbe=13.0120009,wbe=13.3407154,Fbe=.9856003,Abe=26.4057084,Mbe=13.064993,Nbe=.3287146,kbe=1.7484877,Ube=-.1589763,Dbe=.0036096,Bbe=.1643573,Ybe=12.9590088,A4=new te;Obe.ComputeMoon=function(e,t){l(e)||(e=te.now()),A4=te.addSeconds(e,Got,A4);let n=te.totalDays(A4)-Eot,i=n/zn.DAYS_PER_JULIAN_CENTURY,o=(125.045+Wbe*n)*W.RADIANS_PER_DEGREE,r=(250.089+Pbe*n)*W.RADIANS_PER_DEGREE,s=(260.008+vbe*n)*W.RADIANS_PER_DEGREE,a=(176.625+wbe*n)*W.RADIANS_PER_DEGREE,c=(357.529+Fbe*n)*W.RADIANS_PER_DEGREE,d=(311.589+Abe*n)*W.RADIANS_PER_DEGREE,u=(134.963+Mbe*n)*W.RADIANS_PER_DEGREE,m=(276.617+Nbe*n)*W.RADIANS_PER_DEGREE,p=(34.226+kbe*n)*W.RADIANS_PER_DEGREE,g=(15.134+Ube*n)*W.RADIANS_PER_DEGREE,f=(119.743+Dbe*n)*W.RADIANS_PER_DEGREE,x=(239.961+Bbe*n)*W.RADIANS_PER_DEGREE,_=(25.053+Ybe*n)*W.RADIANS_PER_DEGREE,C=Math.sin(o),V=Math.sin(r),L=Math.sin(s),Z=Math.sin(a),G=Math.sin(c),X=Math.sin(d),v=Math.sin(u),P=Math.sin(m),F=Math.sin(p),A=Math.sin(g),b=Math.sin(f),R=Math.sin(x),E=Math.sin(_),I=Math.cos(o),w=Math.cos(r),N=Math.cos(s),B=Math.cos(a),U=Math.cos(c),O=Math.cos(d),k=Math.cos(u),J=Math.cos(m),H=Math.cos(p),ee=Math.cos(g),z=Math.cos(f),j=Math.cos(x),q=Math.cos(_),be=(269.9949+.0031*i-3.8787*C-.1204*V+.07*L-.0172*Z+.0072*X-.0052*A+.0043*E)*W.RADIANS_PER_DEGREE,Te=(66.5392+.013*i+1.5419*I+.0239*w-.0278*N+.0068*B-.0029*O+9e-4*k+8e-4*ee-9e-4*q)*W.RADIANS_PER_DEGREE,ae=(38.3213+13.17635815*n-14e-13*n*n+3.561*C+.1208*V-.0642*L+.0158*Z+.0252*G-.0066*X-.0047*v-.0046*P+.0028*F+.0052*A+.004*b+.0019*R-.0044*E)*W.RADIANS_PER_DEGREE,ye=(13.17635815-14e-13*(2*n)+3.561*I*Wbe+.1208*w*Pbe-.0642*N*vbe+.0158*B*wbe+.0252*U*Fbe-.0066*O*Abe-.0047*k*Mbe-.0046*J*Nbe+.0028*H*kbe+.0052*ee*Ube+.004*z*Dbe+.0019*j*Bbe-.0044*q*Ybe)/86400*W.RADIANS_PER_DEGREE;return l(t)||(t=new Jv),t.rightAscension=be,t.declination=Te,t.rotation=ae,t.rotationRate=ye,t};var Qv=Obe;var STi=T(S(),1);function Hbe(e){(!l(e)||typeof e!="function")&&(e=Qv.ComputeMoon),this._computeFunction=e}var Xot=new h,Iot=new h,Wot=new h;function Pot(e,t,n){let i=Xot;i.x=Math.cos(e+W.PI_OVER_TWO),i.y=Math.sin(e+W.PI_OVER_TWO),i.z=0;let o=Math.cos(t),r=Wot;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);let s=h.cross(r,i,Iot);return l(n)||(n=new $),n[0]=i.x,n[1]=s.x,n[2]=r.x,n[3]=i.y,n[4]=s.y,n[5]=r.y,n[6]=i.z,n[7]=s.z,n[8]=r.z,n}var vot=new $,wot=new we;Hbe.prototype.evaluate=function(e,t){l(e)||(e=te.now());let n=this._computeFunction(e),i=Pot(n.rightAscension,n.declination,t),o=W.zeroToTwoPi(n.rotation),r=we.fromAxisAngle(h.UNIT_Z,o,wot),s=$.fromQuaternion(we.conjugate(r,r),vot);return $.multiply(s,i,i)};var jv=Hbe;var LTi=T(S(),1);var qv={};qv.type=void 0;qv.getRequiredDataPoints=fe.throwInstantiationError;qv.interpolateOrderZero=fe.throwInstantiationError;qv.interpolate=fe.throwInstantiationError;var M4=qv;var kTi=T(S(),1);var WTi=T(S(),1);function N4(e){this._url=Ee.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(N4.prototype,{url:{get:function(){return this._url}},credit:{get:function(){}}});N4.prototype.geocode=async function(e,t){return this._url.getDerivedResource({url:t===py.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then(function(i){return i.features.map(function(o){let r,s=o.bbox;if(l(s))r=ce.fromDegrees(s[0],s[1],s[2],s[3]);else{let a=o.geometry.coordinates[0],c=o.geometry.coordinates[1];r=h.fromDegrees(a,c)}return{displayName:o.properties.label,destination:r,attributions:i.attributions}})})};var $v=N4;function k4(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.accessToken,Rm.defaultAccessToken),n=Ee.createIfNeeded(y(e.server,Rm.defaultServer));n.appendForwardSlash();let i=Rm.getDefaultTokenCredit(t);l(i)&&e.scene.frameState.creditDisplay.addStaticCredit(Vt.clone(i));let o=n.getDerivedResource({url:"v1/geocode"});l(t)&&o.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=n,this._pelias=new $v(o)}Object.defineProperties(k4.prototype,{credit:{get:function(){}}});k4.prototype.geocode=async function(e,t){return this._pelias.geocode(e,t)};var ew=k4;var DTi=T(S(),1),Fot={SHIFT:0,CTRL:1,ALT:2},ua=Object.freeze(Fot);var OTi=T(S(),1);function cD(){fe.throwInstantiationError()}Object.defineProperties(cD.prototype,{ellipsoid:{get:fe.throwInstantiationError}});cD.prototype.project=fe.throwInstantiationError;cD.prototype.unproject=fe.throwInstantiationError;var U4=cD;var QTi=T(S(),1);function XV(e){e=y(e,y.EMPTY_OBJECT);let t=e.weights,n=e.times;this._times=n,this._weights=t,this._count=t.length/n.length,this._lastTimeIndex=0}Object.defineProperties(XV.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});XV.prototype.findTimeInterval=to.prototype.findTimeInterval;XV.prototype.wrapTime=to.prototype.wrapTime;XV.prototype.clampTime=to.prototype.clampTime;XV.prototype.evaluate=function(e,t){let n=this.weights,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);l(t)||(t=new Array(this._count));for(let s=0;si){o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=h.multiplyByScalar(t,n,lD);let a=o*o*n;s=h.add(e,h.multiplyByScalar(r,a,lD),lD)}else o=Number.MAX_VALUE;this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=s,this._cameraPosition=e}}});_c.fromBoundingSphere=function(e,t,n){return l(n)?(h.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new _c(e,t)};var Kbe=new h;_c.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=h.subtract(e,this._occluderPosition,Kbe),n=this._occluderRadius;if(n=h.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=h.subtract(e,this._cameraPosition,t),n*n>h.magnitudeSquared(t)}return!1};var Mot=new h;_c.prototype.isBoundingSphereVisible=function(e){let t=h.clone(e.center,Mot),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,Kbe),o=this._occluderRadius-n;if(o=h.magnitudeSquared(i)-o*o,n0?(o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i),o*o+n*n>h.magnitudeSquared(i)):!1;if(o>0){i=h.subtract(t,this._cameraPosition,i);let r=h.magnitudeSquared(i),s=this._occluderRadius*this._occluderRadius,a=n*n;return(this._horizonDistance*this._horizonDistance+s)*a>r*s?!0:(o=Math.sqrt(o)+this._horizonDistance,o*o+a>r)}return!0}return!1};var Not=new h;_c.prototype.computeVisibility=function(e){let t=h.clone(e.center),n=e.radius;if(n>this._occluderRadius)return cr.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,Not),o=this._occluderRadius-n,r=h.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i);let s=h.magnitudeSquared(i);return o*o+n*n0?(o=Math.sqrt(o)+this._horizonDistance,s-n?cr.PARTIAL:cr.FULL))}}return cr.NONE};var dD=new h;_c.computeOccludeePoint=function(e,t,n){let i=h.clone(t),o=h.clone(e.center),r=e.radius,s=n.length,a=h.normalize(h.subtract(i,o,dD),dD),c=-h.dot(a,o),d=_c._anyRotationVector(o,a,c),u=_c._horizonToPlaneNormalDotProduct(e,a,c,d,n[0]);if(!u)return;let m;for(let g=1;gi.y?0:1;(o===0&&i.z>i.x||o===1&&i.z>i.y)&&(o=2);let r=new h,s;o===0?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=h.UNIT_X):o===1?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=h.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=h.UNIT_Z);let a=(h.dot(t,i)+n)/-h.dot(t,s);return h.normalize(h.subtract(h.add(i,h.multiplyByScalar(s,a,r),i),e,i),i)};var Dot=new h;_c._rotationVector=function(e,t,n,i,o){let r=h.subtract(i,e,Dot);if(r=h.normalize(r,r),h.dot(t,r)<.9999999847691291){let s=h.cross(t,r,r);if(h.magnitude(s)>W.EPSILON13)return h.normalize(s,new h)}return o};var B4=new h,Bot=new h,uD=new h,zbe=new h;_c._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){let r=h.clone(o,B4),s=h.clone(e.center,Bot),a=e.radius,c=h.subtract(s,r,uD),d=h.magnitudeSquared(c),u=a*a;if(dOpenStreetMap contributors',!1)}Object.defineProperties(Y4.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}},credit:{get:function(){return this._credit}}});Y4.prototype.geocode=async function(e){return this._url.getDerivedResource({url:"json",queryParameters:xt(this._params,{q:e})}).fetchJson().then(function(n){return n.results.map(function(i){let o,r=i.bounds;if(l(r))o=ce.fromDegrees(r.southwest.lng,r.southwest.lat,r.northeast.lng,r.northeast.lat);else{let s=i.geometry.lat,a=i.geometry.lng;o=h.fromDegrees(s,a)}return{displayName:i.formatted,destination:o}})})};var O4=Y4;var _Si=T(S(),1);var Yot={packedLength:void 0,pack:fe.throwInstantiationError,unpack:fe.throwInstantiationError},H4=Yot;var CSi=T(S(),1);var Oot={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:fe.throwInstantiationError,unpackInterpolationResult:fe.throwInstantiationError},z4=Oot;var RSi=T(S(),1);function Jbe(){fe.throwInstantiationError()}Jbe.prototype.getURL=fe.throwInstantiationError;var K4=Jbe;var NSi=T(S(),1);var GSi=T(S(),1),Hot={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},Tn=Object.freeze(Hot);function gy(e,t,n){let i=e._element;if(i===document)return n.x=t.clientX,n.y=t.clientY,n;let o=i.getBoundingClientRect();return n.x=t.clientX-o.left,n.y=t.clientY-o.top,n}function ej(e,t){let n=e;return l(t)&&(n+=`+${t}`),n}function CT(e){if(e.shiftKey)return ua.SHIFT;if(e.ctrlKey)return ua.CTRL;if(e.altKey)return ua.ALT}var Ss={LEFT:0,MIDDLE:1,RIGHT:2};function Bd(e,t,n,i){function o(r){i(e,r)}Yt.isInternetExplorer()?n.addEventListener(t,o,!1):n.addEventListener(t,o,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,o,!1)})}function zot(e){let t=e._element,n=l(t.disableRootEvents)?t:document;Yt.supportsPointerEvents()?(Bd(e,"pointerdown",t,$ot),Bd(e,"pointerup",t,rge),Bd(e,"pointermove",t,ert),Bd(e,"pointercancel",t,rge)):(Bd(e,"mousedown",t,sge),Bd(e,"mouseup",n,age),Bd(e,"mousemove",n,cge),Bd(e,"touchstart",t,jot),Bd(e,"touchend",n,ege),Bd(e,"touchmove",n,qot),Bd(e,"touchcancel",n,ege)),Bd(e,"dblclick",t,Jot);let i;"onwheel"in t?i="wheel":document.onmousewheel!==void 0?i="mousewheel":i="DOMMouseScroll",Bd(e,i,t,Qot)}function Kot(e){let t=e._removalFunctions;for(let n=0;nTh.mouseEmulationIgnoreMilliseconds}function $4(e,t,n){let i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)0?n=t.detail*-120:n=t.wheelDelta;if(!l(n))return;let i=CT(t),o=e.getInputAction(Tn.WHEEL,i);l(o)&&(o(n),t.preventDefault())}function jot(e,t){tj(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i0?new Array(o):void 0;for(i=0;i0&&(h.pack(X,m,Z),Z+=3,f=n[d-1],g[G++]=Y.floatToByte(f.red),g[G++]=Y.floatToByte(f.green),g[G++]=Y.floatToByte(f.blue),g[G++]=Y.floatToByte(f.alpha)),c&&d===u-1)break;h.pack(X,m,Z),Z+=3,l(n)&&(f=n[d],g[G++]=Y.floatToByte(f.red),g[G++]=Y.floatToByte(f.green),g[G++]=Y.floatToByte(f.blue),g[G++]=Y.floatToByte(f.alpha))}}let _=new mn;_.position=new Ge({componentDatatype:Q.DOUBLE,componentsPerAttribute:3,values:m}),l(n)&&(_.color=new Ge({componentDatatype:Q.UNSIGNED_BYTE,componentsPerAttribute:4,values:g,normalize:!0})),p=m.length/3;let C=(p-1)*2,V=Me.createTypedArray(p,C),L=0;for(d=0;da?c=a:s<0?c=0:c=s;let u=i?y(this.tolerance,1):.001;Math.abs(c-d)>u&&(this._seeking=!0,t.currentTime=c)};function drt(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}var aj=VT;var NCi=T(S(),1),urt={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},cj=Object.freeze(urt);var BCi=T(S(),1);function mrt(e){return e=y(e,y.EMPTY_OBJECT),gT.fromIonAssetId(2426648,{requestVertexNormals:y(e.requestVertexNormals,!1)})}var ow=mrt;var zCi=T(S(),1);function hrt(e){return e=y(e,y.EMPTY_OBJECT),gT.fromIonAssetId(1,{requestVertexNormals:y(e.requestVertexNormals,!1),requestWaterMask:y(e.requestWaterMask,!1)})}var LT=hrt;var QCi=T(S(),1);var frt=1953029805,prt=2917034100;function lj(e,t){if(lj.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new ue("The length of key must be greater than 0 and a multiple of 4.");let i=new DataView(t),o=i.getUint32(0,!0);if(o===frt||o===prt)return t;let r=new DataView(e),s=0,a=t.byteLength,c=a-a%8,d=n,u,m=8;for(;s=d&&(m=(m+8)%24,u=m);s=a||t(g,f,n)<=0)?(e[p]=g,++u):m=o)return;let r=Math.floor((i+o)*.5);mj(e,t,n,i,r),mj(e,t,n,r+1,o),grt(e,t,n,i,r,o)}function yrt(e,t,n){let i=e.length,o=Math.ceil(i*.5);dj.length=o,uj.length=o,mj(e,t,n,0,i-1),dj.length=0,uj.length=0}var H0=yrt;var r1i=T(S(),1);var xrt=new h;function _rt(e,t,n,i){let o=cx(e,t,n,i,xrt);return l(o)?o.x>0&&o.y>0&&o.z>0:!1}var hj=_rt;var c1i=T(S(),1);async function Trt(e,t,n,i){return l(i)||(i=!1),Vrt(e,t,n,i)}function Srt(e,t,n){let i=e[0],o=i.terrainProvider.requestTileGeometry(i.x,i.y,i.level);if(!o)return!1;let r;return n?r=o.then(hge(i)):r=o.then(hge(i)).catch(Lrt(i)),e.shift(),t.push(r),!0}function Crt(e){return new Promise(function(t){setTimeout(t,e)})}function fj(e,t,n){return e.length?Srt(e,t,n)?fj(e,t,n):Crt(100).then(()=>fj(e,t,n)):Promise.resolve()}function Vrt(e,t,n,i){let o=e.tilingScheme,r,s=[],a={};for(r=0;r0&&await fge(e,a,n),t}var RT=fge;var p1i=T(S(),1);function Rrt(e){return e<=.04045?e*.07739938080495357:Math.pow((e+.055)*.9478672985781991,2.4)}var ZT=Rrt;var y1i=T(S(),1);function Zrt(e){switch(e){case ne.FLOAT:return"float";case ne.FLOAT_VEC2:return"vec2";case ne.FLOAT_VEC3:return"vec3";case ne.FLOAT_VEC4:return"vec4";case ne.FLOAT_MAT2:return"mat2";case ne.FLOAT_MAT3:return"mat3";case ne.FLOAT_MAT4:return"mat4";case ne.SAMPLER_2D:return"sampler2D";case ne.BOOL:return"bool"}}var bj=Zrt;var _1i=T(S(),1);function Grt(e,t,n){return function(){n.apply(e,arguments),t.apply(e,arguments)}}var cw=Grt;var S1i=T(S(),1),WV=`#ifdef MRT +`;var IJe=ks.SHOW_INDEX,mH=ks.POSITION_INDEX,ede=ks.COLOR_INDEX,XJe=ks.OUTLINE_COLOR_INDEX,PJe=ks.OUTLINE_WIDTH_INDEX,vJe=ks.PIXEL_SIZE_INDEX,tde=ks.SCALE_BY_DISTANCE_INDEX,nde=ks.TRANSLUCENCY_BY_DISTANCE_INDEX,ide=ks.DISTANCE_DISPLAY_CONDITION_INDEX,wJe=ks.DISABLE_DEPTH_DISTANCE_INDEX,hH=ks.NUMBER_OF_PROPERTIES,hc={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepth:5};function Fu(e){e=y(e,y.EMPTY_OBJECT),this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(hH),this._maxPixelSize=1,this._baseVolume=new le,this._baseVolumeWC=new le,this._baseVolume2D=new le,this._boundingVolume=new le,this._boundingVolumeDirty=!1,this._colorCommands=[],this.show=y(e.show,!0),this.modelMatrix=A.clone(y(e.modelMatrix,A.IDENTITY)),this._modelMatrix=A.clone(A.IDENTITY),this.debugShowBoundingVolume=y(e.debugShowBoundingVolume,!1),this.blendOption=y(e.blendOption,So.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=oe.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW,Ne.STATIC_DRAW];let t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}Object.defineProperties(Fu.prototype,{length:{get:function(){return fH(this),this._pointPrimitives.length}}});function ode(e){let t=e.length;for(let n=0;n0&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1)),r(o,s,a,d)}function AJe(e,t,n,i){rde(e,t,n,i),sde(e,t,n,i),ade(e,t,n,i),cde(e,t,n,i),lde(e,t,n,i)}function uH(e,t,n,i,o,r){let s;i.mode===oe.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let c=0;c0){this._vaf=FJe(c,n,this._buffersUsage),a=this._vaf.writers;for(let G=0;G0){let G=UJe;G.length=0,(r[mH]||r[PJe]||r[vJe])&&G.push(rde),(r[ede]||r[XJe])&&G.push(sde),(r[IJe]||r[nde])&&G.push(ade),r[tde]&&G.push(cde),(r[ide]||r[wJe])&&G.push(lde);let W=G.length;if(a=this._vaf.writers,o/n>.1){for(let v=0;vn*1.5&&(i.length=n),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,le.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let m,p=A.IDENTITY;e.mode===oe.SCENE3D?(p=this.modelMatrix,m=le.clone(this._baseVolumeWC,this._boundingVolume)):m=le.clone(this._baseVolume2D,this._boundingVolume),NJe(this,e,m);let g=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,g&&(this._blendOption===So.OPAQUE||this._blendOption===So.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=De.fromCache({depthTest:{enabled:!0,func:ie.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===So.TRANSLUCENT||this._blendOption===So.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=De.fromCache({depthTest:{enabled:!0,func:ie.LEQUAL},depthMask:!1,blending:un.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let f,x;(g||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(f=new Ye({sources:[K2]}),this._shaderScaleByDistance&&f.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&f.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&f.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&f.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===So.OPAQUE_AND_TRANSLUCENT&&(x=new Ye({defines:["OPAQUE"],sources:[Xg]}),this._sp=qt.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:f,fragmentShaderSource:x,attributeLocations:hc}),x=new Ye({defines:["TRANSLUCENT"],sources:[Xg]}),this._spTranslucent=qt.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:f,fragmentShaderSource:x,attributeLocations:hc})),this._blendOption===So.OPAQUE&&(x=new Ye({sources:[Xg]}),this._sp=qt.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:f,fragmentShaderSource:x,attributeLocations:hc})),this._blendOption===So.TRANSLUCENT&&(x=new Ye({sources:[Xg]}),this._spTranslucent=qt.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:f,fragmentShaderSource:x,attributeLocations:hc})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);let _,C,V,Z,R=e.commandList;if(d.render||u){let G=this._colorCommands,W=this._blendOption===So.OPAQUE,v=this._blendOption===So.OPAQUE_AND_TRANSLUCENT;_=this._vaf.va,C=_.length,G.length=C;let P=v?C*2:C;for(Z=0;Z>4;if(o!==pH)throw new Error(`Got v${o} data when expected v${pH}.`);let r=dde[i&15];if(!r)throw new Error("Unrecognized array type.");let[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new e(a,s,r,t)}constructor(t,n=64,i=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let r=dde.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-a%8)%8;if(r<0)throw new Error(`Unexpected typed array class: ${i}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,J2,t),this.coords=new this.ArrayType(this.data,J2+a+c,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(J2+s+a+c),this.ids=new this.IndexArrayType(this.data,J2,t),this.coords=new this.ArrayType(this.data,J2+a+c,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(pH<<4)+r]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=n,i}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return gH(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,i,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:r,coords:s,nodeSize:a}=this,c=[0,r.length-1,0],d=[];for(;c.length;){let u=c.pop()||0,m=c.pop()||0,p=c.pop()||0;if(m-p<=a){for(let _=p;_<=m;_++){let C=s[2*_],V=s[2*_+1];C>=t&&C<=i&&V>=n&&V<=o&&d.push(r[_])}continue}let g=p+m>>1,f=s[2*g],x=s[2*g+1];f>=t&&f<=i&&x>=n&&x<=o&&d.push(r[g]),(u===0?t<=f:n<=x)&&(c.push(p),c.push(g-1),c.push(1-u)),(u===0?i>=f:o>=x)&&(c.push(g+1),c.push(m),c.push(1-u))}return d}within(t,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:r,nodeSize:s}=this,a=[0,o.length-1,0],c=[],d=i*i;for(;a.length;){let u=a.pop()||0,m=a.pop()||0,p=a.pop()||0;if(m-p<=s){for(let _=p;_<=m;_++)ude(r[2*_],r[2*_+1],t,n)<=d&&c.push(o[_]);continue}let g=p+m>>1,f=r[2*g],x=r[2*g+1];ude(f,x,t,n)<=d&&c.push(o[g]),(u===0?t-i<=f:n-i<=x)&&(a.push(p),a.push(g-1),a.push(1-u)),(u===0?t+i>=f:n+i>=x)&&(a.push(g+1),a.push(m),a.push(1-u))}return c}};function gH(e,t,n,i,o,r){if(o-i<=n)return;let s=i+o>>1;mde(e,t,s,i,o,r),gH(e,t,n,i,s-1,1-r),gH(e,t,n,s+1,o,1-r)}function mde(e,t,n,i,o,r){for(;o>i;){if(o-i>600){let d=o-i+1,u=n-i+1,m=Math.log(d),p=.5*Math.exp(2*m/3),g=.5*Math.sqrt(m*p*(d-p)/d)*(u-d/2<0?-1:1),f=Math.max(i,Math.floor(n-u*p/d+g)),x=Math.min(o,Math.floor(n+(d-u)*p/d+g));mde(e,t,n,f,x,r)}let s=t[2*n+r],a=i,c=o;for(Q2(e,t,i,n),t[2*o+r]>s&&Q2(e,t,i,o);as;)c--}t[2*i+r]===s?Q2(e,t,i,c):(c++,Q2(e,t,c,o)),c<=n&&(i=c+1),n<=c&&(o=c-1)}}function Q2(e,t,n,i){bH(e,n,i),bH(t,2*n,2*i),bH(t,2*n+1,2*i+1)}function bH(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function ude(e,t,n,i){let o=e-n,r=t-i;return o*o+r*r}function Qm(e){e=y(e,y.EMPTY_OBJECT),this._enabled=y(e.enabled,!1),this._pixelRange=y(e.pixelRange,80),this._minimumClusterSize=y(e.minimumClusterSize,2),this._clusterBillboards=y(e.clusterBillboards,!0),this._clusterLabels=y(e.clusterLabels,!0),this._clusterPoints=y(e.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new ge,this.show=y(e.show,!0)}function hde(e,t){e.x-=t,e.y-=t,e.width+=t*2,e.height+=t*2}var kJe=new ze;function fde(e,t,n,i,o){if(l(e._labelCollection)&&i._clusterLabels?o=xg.getScreenSpaceBoundingBox(e,t,o):l(e._billboardCollection)&&i._clusterBillboards?o=uo.getScreenSpaceBoundingBox(e,t,o):l(e._pointPrimitiveCollection)&&i._clusterPoints&&(o=ks.getScreenSpaceBoundingBox(e,t,o)),hde(o,n),i._clusterLabels&&!l(e._labelCollection)&&l(e.id)&&bde(i,e.id.id)&&l(e.id._label)){let r=i._collectionIndicesByEntity[e.id.id].labelIndex,s=i._labelCollection.get(r),a=xg.getScreenSpaceBoundingBox(s,t,kJe);hde(a,n),o=ze.union(o,a,o)}return o}function DJe(e,t){if(e.clusterShow=!0,!l(e._labelCollection)&&l(e.id)&&bde(t,e.id.id)&&l(e.id._label)){let n=t._collectionIndicesByEntity[e.id.id].labelIndex,i=t._labelCollection.get(n);i.clusterShow=!0}}function pde(e,t,n,i){let o={billboard:i._clusterBillboardCollection.add(),label:i._clusterLabelCollection.add(),point:i._clusterPointCollection.add()};o.billboard.show=!1,o.point.show=!1,o.label.show=!0,o.label.text=t.toLocaleString(),o.label.id=n,o.billboard.position=o.label.position=o.point.position=e,i._clusterEvent.raiseEvent(n,o)}function bde(e,t){return l(e)&&l(e._collectionIndicesByEntity[t])&&l(e._collectionIndicesByEntity[t].labelIndex)}function yH(e,t,n,i,o){if(!l(e))return;let r=e.length;for(let s=0;s0){let w=new j2(V.length,64,Uint32Array);for(let N=0;N=u)for(pde(N.position,L,b,e),p.push(N),R=0;R=u){let U=h.multiplyByScalar(O,1/L,O);for(pde(U,L,b,e),p.push({position:U,width:k.width,height:k.height,minimumWidth:W.width,minimumHeight:W.height}),R=0;R0?(a=d.shift(),c=r.get(a)):(c=r.add(),a=r.length-1),s[i]=a;let u=this;return Promise.resolve().then(function(){u._clusterDirty=!0}),c}}function SH(e,t){let n=e._collectionIndicesByEntity[t];!l(n.billboardIndex)&&!l(n.labelIndex)&&!l(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}Qm.prototype.getLabel=_H("_labelCollection",df,"_unusedLabelIndices","labelIndex");Qm.prototype.removeLabel=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._labelCollection)||!l(t)||!l(t.labelIndex))return;let n=t.labelIndex;t.labelIndex=void 0,SH(this,e.id);let i=this._labelCollection.get(n);i.show=!1,i.text="",i.id=void 0,this._unusedLabelIndices.push(n),this._clusterDirty=!0};Qm.prototype.getBillboard=_H("_billboardCollection",gd,"_unusedBillboardIndices","billboardIndex");Qm.prototype.removeBillboard=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._billboardCollection)||!l(t)||!l(t.billboardIndex))return;let n=t.billboardIndex;t.billboardIndex=void 0,SH(this,e.id);let i=this._billboardCollection.get(n);i.id=void 0,i.show=!1,i.image=void 0,this._unusedBillboardIndices.push(n),this._clusterDirty=!0};Qm.prototype.getPoint=_H("_pointCollection",f1,"_unusedPointIndices","pointIndex");Qm.prototype.removePoint=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._pointCollection)||!l(t)||!l(t.pointIndex))return;let n=t.pointIndex;t.pointIndex=void 0,SH(this,e.id);let i=this._pointCollection.get(n);i.show=!1,i.id=void 0,this._unusedPointIndices.push(n),this._clusterDirty=!0};function xH(e){if(!l(e))return;let t=e.length;for(let n=0;n0&&this._labelCollection.get(0)._glyphs.length===0&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),l(this._billboardCollection)&&this._billboardCollection.length>0&&!l(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,KJe(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),l(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),l(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),l(this._clusterPointCollection)&&this._clusterPointCollection.update(e),l(this._labelCollection)&&this._labelCollection.update(e),l(this._billboardCollection)&&this._billboardCollection.update(e),l(this._pointCollection)&&this._pointCollection.update(e)};Qm.prototype.destroy=function(){this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),l(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1};var Sd=Qm;function TH(e){this._name=e,this._clock=void 0,this._changed=new ge,this._error=new ge,this._isLoading=!1,this._loading=new ge,this._entityCollection=new Us(this),this._entityCluster=new Sd}Object.defineProperties(TH.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){Pr.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}}});TH.prototype.update=function(e){return!0};var q2=TH;var B3n=S(T(),1);var s3n=S(T(),1);var BYn=S(T(),1);var gde={};gde.computePositions=function(e,t,n,i,o){let r=e*.5,s=-r,a=i+i,c=o?2*a:a,d=new Float64Array(c*3),u,m=0,p=0,g=o?a*3:0,f=o?(a+i)*3:i*3;for(u=0;u0){let x=Math.min(r,o);d=Math.round(o/x),c+=x}let u=Me.createTypedArray(s,c*2),m=0,p;for(p=0;p0)for(p=0;p0){for(c=0;c=t;i--)e[i]=e[a--]}for(i=0;i=0||l(m)&&ne.compare(u,m)>=0));){for(IH[p++]=u,r=r+1,s=0;s0&&(XH.length=g,Vde(n,d,XH),IH.length=p,Vde(t,c,IH))}else{for(s=0;so)return;if(this._backwardExtrapolationType===Cd.HOLD)return r.unpack(s,0,t)}if(a>=i){a=i-1;let R=n[a];if(o=this._forwardExtrapolationDuration,this._forwardExtrapolationType===Cd.NONE||o!==0&&ne.secondsDifference(e,R)>o)return;if(this._forwardExtrapolationType===Cd.HOLD)return a=i-1,r.unpack(s,a*r.packedLength,t)}let c=this._xTable,d=this._yTable,u=this._interpolationAlgorithm,m=this._packedInterpolationLength,p=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;let R=Math.min(u.getRequiredDataPoints(this._interpolationDegree,p),i);R!==this._numberOfPoints&&(this._numberOfPoints=R,c.length=R,d.length=R*m)}let g=this._numberOfPoints-1;if(g<1)return;let f=0,x=i-1;if(x-f+1>=g+1){let R=a-(g/2|0)-1;Rx&&(G=x,R=G-g,R0){n=new Array(t);for(let i=0;ic&&e!==Object}let f=typeof e.unpack=="function"&&e!==Au;if(!g&&!p){m?t[n]=new Jn(f?e.unpack(d,0):d):t[n]=Ide(e,s,i);return}let x=t[n],_,C=i.epoch;if(l(C)&&(_=ne.fromIso8601(C)),g&&!p){x instanceof Zd||(t[n]=x=new Zd(e)),x.addSamplesPackedArray(d,_),sU(i,x);return}let V;if(!g&&p){a=a.clone(),m?a.data=f?e.unpack(d,0):d:a.data=Ide(e,s,i),l(x)||(t[n]=x=m?new Rb:new mc),m&&x instanceof Rb?x.intervals.addInterval(a):x instanceof mc?(m&&(a.data=new Jn(a.data)),x.intervals.addInterval(a)):(t[n]=x=Ade(x),m&&(a.data=new Jn(a.data)),x.intervals.addInterval(a));return}l(x)||(t[n]=x=new mc),x instanceof mc||(t[n]=x=Ade(x));let Z=x.intervals;V=Z.findInterval(a),(!l(V)||!(V.data instanceof Zd))&&(V=a.clone(),V.data=new Zd(e),Z.addInterval(V)),V.data.addSamplesPackedArray(d,_),sU(i,V.data)}function Jde(e,t){if(e instanceof Zd){e.removeSamples(t);return}else if(e instanceof Rb){e.intervals.removeInterval(t);return}else if(e instanceof mc){let n=e.intervals;for(let i=0;ic),!f&&!p){m?e[t]=new Ac(h.unpack(d),g):e[t]=aP(r,n.reference);return}let x=e[t],_,C=n.epoch;if(l(C)&&(_=ne.fromIso8601(C)),f&&!p){(!(x instanceof ca)||l(g)&&x.referenceFrame!==g)&&(e[t]=x=new ca(g,a)),x.addSamplesPackedArray(d,_),sU(n,x);return}let V;if(!f&&p){s=s.clone(),m?s.data=h.unpack(d):s.data=aP(r,n.reference),l(x)||(m?x=new Lb(g):x=new sa(g),e[t]=x),m&&x instanceof Lb&&l(g)&&x.referenceFrame===g?x.intervals.addInterval(s):x instanceof sa?(m&&(s.data=new Ac(s.data,g)),x.intervals.addInterval(s)):(e[t]=x=Mde(x),m&&(s.data=new Ac(s.data,g)),x.intervals.addInterval(s));return}l(x)?x instanceof sa||(e[t]=x=Mde(x)):e[t]=x=new sa(g);let Z=x.intervals;V=Z.findInterval(s),(!l(V)||!(V.data instanceof ca)||l(g)&&V.data.referenceFrame!==g)&&(V=s.clone(),V.data=new ca(g,a),Z.addInterval(V)),V.data.addSamplesPackedArray(d,_),sU(n,V.data)}function Qde(e,t){if(e instanceof ca){e.removeSamples(t);return}else if(e instanceof Lb){e.intervals.removeInterval(t);return}else if(e instanceof sa){let n=e.intervals;for(let i=0;i. version format.");let i=t._documentPacket;l(e.name)&&(i.name=e.name);let o=e.clock;if(l(o)){let r=i.clock;l(r)?(r.interval=y(o.interval,r.interval),r.currentTime=y(o.currentTime,r.currentTime),r.range=y(o.range,r.range),r.step=y(o.step,r.step),r.multiplier=y(o.multiplier,r.multiplier)):i.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function s4e(e,t,n,i){let o=t.ellipse;if(!l(o))return;let r=ar(o.interval),s=e.ellipse;l(s)||(e.ellipse=s=new Cx),_e(Boolean,s,"show",o.show,r,i,n),_e(Number,s,"semiMajorAxis",o.semiMajorAxis,r,i,n),_e(Number,s,"semiMinorAxis",o.semiMinorAxis,r,i,n),_e(Number,s,"height",o.height,r,i,n),_e(Je,s,"heightReference",o.heightReference,r,i,n),_e(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),_e(Je,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),_e(Au,s,"rotation",o.rotation,r,i,n),_e(Au,s,"stRotation",o.stRotation,r,i,n),_e(Number,s,"granularity",o.granularity,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),Ld(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(Y,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),_e(xn,s,"shadows",o.shadows,r,i,n),_e(Xt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(Un,s,"classificationType",o.classificationType,r,i,n),_e(Number,s,"zIndex",o.zIndex,r,i,n)}function a4e(e,t,n,i){let o=t.ellipsoid;if(!l(o))return;let r=ar(o.interval),s=e.ellipsoid;l(s)||(e.ellipsoid=s=new Vx),_e(Boolean,s,"show",o.show,r,i,n),_e(h,s,"radii",o.radii,r,i,n),_e(h,s,"innerRadii",o.innerRadii,r,i,n),_e(Number,s,"minimumClock",o.minimumClock,r,i,n),_e(Number,s,"maximumClock",o.maximumClock,r,i,n),_e(Number,s,"minimumCone",o.minimumCone,r,i,n),_e(Number,s,"maximumCone",o.maximumCone,r,i,n),_e(Je,s,"heightReference",o.heightReference,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),Ld(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(Y,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Number,s,"stackPartitions",o.stackPartitions,r,i,n),_e(Number,s,"slicePartitions",o.slicePartitions,r,i,n),_e(Number,s,"subdivisions",o.subdivisions,r,i,n),_e(xn,s,"shadows",o.shadows,r,i,n),_e(Xt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function c4e(e,t,n,i){let o=t.label;if(!l(o))return;let r=ar(o.interval),s=e.label;l(s)||(e.label=s=new _m),_e(Boolean,s,"show",o.show,r,i,n),_e(String,s,"text",o.text,r,i,n),_e(String,s,"font",o.font,r,i,n),_e(Ao,s,"style",o.style,r,i,n),_e(Number,s,"scale",o.scale,r,i,n),_e(Boolean,s,"showBackground",o.showBackground,r,i,n),_e(Y,s,"backgroundColor",o.backgroundColor,r,i,n),_e(D,s,"backgroundPadding",o.backgroundPadding,r,i,n),_e(D,s,"pixelOffset",o.pixelOffset,r,i,n),_e(h,s,"eyeOffset",o.eyeOffset,r,i,n),_e(fi,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),_e(Pn,s,"verticalOrigin",o.verticalOrigin,r,i,n),_e(Je,s,"heightReference",o.heightReference,r,i,n),_e(Y,s,"fillColor",o.fillColor,r,i,n),_e(Y,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Ft,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),_e(Ft,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),_e(Ft,s,"scaleByDistance",o.scaleByDistance,r,i,n),_e(Xt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function l4e(e,t,n,i){let o=t.model;if(!l(o))return;let r=ar(o.interval),s=e.model;l(s)||(e.model=s=new Cp),_e(Boolean,s,"show",o.show,r,i,n),_e(lP.default,s,"uri",o.gltf,r,i,n),_e(Number,s,"scale",o.scale,r,i,n),_e(Number,s,"minimumPixelSize",o.minimumPixelSize,r,i,n),_e(Number,s,"maximumScale",o.maximumScale,r,i,n),_e(Boolean,s,"incrementallyLoadTextures",o.incrementallyLoadTextures,r,i,n),_e(Boolean,s,"runAnimations",o.runAnimations,r,i,n),_e(Boolean,s,"clampAnimations",o.clampAnimations,r,i,n),_e(xn,s,"shadows",o.shadows,r,i,n),_e(Je,s,"heightReference",o.heightReference,r,i,n),_e(Y,s,"silhouetteColor",o.silhouetteColor,r,i,n),_e(Number,s,"silhouetteSize",o.silhouetteSize,r,i,n),_e(Y,s,"color",o.color,r,i,n),_e(sc,s,"colorBlendMode",o.colorBlendMode,r,i,n),_e(Number,s,"colorBlendAmount",o.colorBlendAmount,r,i,n),_e(Xt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n);let a,c,d=o.nodeTransformations;if(l(d))if(Array.isArray(d))for(a=0,c=d.length;a-1;c--)n[c](s,e,t,i)}vH=void 0}function x4e(e){let t,n=e._documentPacket.clock;if(!l(n)){if(!l(e._clock)){let o=e._entityCollection.computeAvailability();if(!o.start.equals(Be.MINIMUM_VALUE)){let r=o.start,s=o.stop,a=ne.secondsDifference(s,r),c=Math.round(a/120);return t=new qm,t.startTime=ne.clone(r),t.stopTime=ne.clone(s),t.clockRange=wr.LOOP_STOP,t.multiplier=c,t.currentTime=ne.clone(r),t.clockStep=mo.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}l(e._clock)?t=e._clock.clone():(t=new qm,t.startTime=Be.MINIMUM_VALUE.clone(),t.stopTime=Be.MAXIMUM_VALUE.clone(),t.currentTime=Be.MINIMUM_VALUE.clone(),t.clockRange=wr.LOOP_STOP,t.clockStep=mo.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);let i=ar(n.interval);return l(i)&&(t.startTime=i.start,t.stopTime=i.stop),l(n.currentTime)&&(t.currentTime=ne.fromIso8601(n.currentTime)),l(n.range)&&(t.clockRange=y(wr[n.range],wr.LOOP_STOP)),l(n.step)&&(t.clockStep=y(mo[n.step],mo.SYSTEM_CLOCK_MULTIPLIER)),l(n.multiplier)&&(t.multiplier=n.multiplier),t.equals(e._clock)?!1:(e._clock=t.clone(e._clock),!0)}function qde(e,t,n,i){n=y(n,y.EMPTY_OBJECT);let o=t,r=n.sourceUri,s=n.credit;if(typeof s=="string"&&(s=new Vt(s)),e._credit=s,typeof t=="string"||t instanceof Ee){t=Ee.createIfNeeded(t),o=t.fetchJson(),r=y(r,t.clone());let a=e._resourceCredits,c=t.credits;if(l(c)){let d=c.length;for(let u=0;u1;--b){if(C=X.PI_OVER_TWO-(b-1)*_,G=P1(-C,r,f,g,c,u,d,m,p,G),W=P1(C+Math.PI,r,f,g,c,u,d,m,p,W),t){for(Z[R++]=G.x,Z[R++]=G.y,Z[R++]=G.z,E=2*(b-1)+2,L=1;L1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*s,a=0;aX.PI&&(m.north=m.north>0?X.PI_OVER_TWO-X.EPSILON7:m.north,m.south=m.south<0?X.EPSILON7-X.PI_OVER_TWO:m.south,m.east=X.PI,m.west=-X.PI),m}function yf(e){e=y(e,y.EMPTY_OBJECT);let t=e.center,n=y(e.ellipsoid,te.default),i=e.semiMajorAxis,o=e.semiMinorAxis,r=y(e.granularity,X.RADIANS_PER_DEGREE),s=y(e.vertexFormat,Xe.DEFAULT),a=y(e.height,0),c=y(e.extrudedHeight,a);this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=te.clone(n),this._rotation=y(e.rotation,0),this._stRotation=y(e.stRotation,0),this._height=Math.max(c,a),this._granularity=r,this._vertexFormat=Xe.clone(s),this._extrudedHeight=Math.min(c,a),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}yf.packedLength=h.packedLength+te.packedLength+Xe.packedLength+9;yf.pack=function(e,t,n){return n=y(n,0),h.pack(e._center,t,n),n+=h.packedLength,te.pack(e._ellipsoid,t,n),n+=te.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var gue=new h,yue=new te,xue=new Xe,gf={center:gue,ellipsoid:yue,vertexFormat:xue,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};yf.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,gue);t+=h.packedLength;let o=te.unpack(e,t,yue);t+=te.packedLength;let r=Xe.unpack(e,t,xue);t+=Xe.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],m=e[t++],p=e[t++],g=e[t++]===1,f=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=te.clone(o,n._ellipsoid),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=c,n._stRotation=d,n._height=u,n._granularity=m,n._extrudedHeight=p,n._shadowVolume=g,n._offsetAttribute=f===-1?void 0:f,n):(gf.height=u,gf.extrudedHeight=p,gf.granularity=m,gf.stRotation=d,gf.rotation=c,gf.semiMajorAxis=s,gf.semiMinorAxis=a,gf.shadowVolume=g,gf.offsetAttribute=f===-1?void 0:f,new yf(gf))};yf.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.center,i=y(e.ellipsoid,te.default),o=e.semiMajorAxis,r=e.semiMinorAxis,s=y(e.granularity,X.RADIANS_PER_DEGREE),a=y(e.rotation,0);return bue(n,o,r,a,s,i,t)};yf.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!X.equalsEpsilon(t,n,0,X.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=E4e(o);else if(r=L4e(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===cn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ge({componentDatatype:Q.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ut({attributes:r.attributes,indices:r.indices,primitiveType:Fe.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};yf.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new yf({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0})};function W4e(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=Nl.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let c=0;c0){let f=Math.min(d,c);g=Math.round(c/f);let x=Math.min(g*d,c);for(p=0;p0&&(R=!0,C+=c-1),s0&&u!==x-1&&m!==0&&m!==_-1&&(M[z]=!0),z++;p=0;let ee,K;for(u=1;u=Ae&&u1||G>1))for(let L=0;L0;u-=d)Te=u*3,J=D1(J,q,Te,p,_),q+=6,o.st&&(K=B1(K,be,u*2,G),be+=4),n&&(Se+=3,z[Se++]=W[Te],z[Se++]=W[Te+1],z[Se++]=W[Te+2]),j&&(ee[ae++]=1,ae+=1);if(E){let Ae=ye;for(Te=Ae*3,u=0;u<2;u++)J=D1(J,q,Te,p,_),q+=6,o.st&&(K=B1(K,be,Ae*2,G),be+=4),n&&(Se+=3,z[Se++]=W[Te],z[Se++]=W[Te+1],z[Se++]=W[Te+2]),j&&(ee[ae++]=1,ae+=1)}else for(u=d-1;u>=0;u--)Te=u*3,J=D1(J,q,Te,p,_),q+=6,o.st&&(K=B1(K,be,u*2,G),be+=4),n&&(Se+=3,z[Se++]=W[Te],z[Se++]=W[Te+1],z[Se++]=W[Te+2]),j&&(ee[ae++]=1,ae+=1);let Ze=Pje(J,o,a);o.st&&(Ze.attributes.st=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:K})),n&&(Ze.attributes.extrudeDirection=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:z})),P&&(Ze.attributes.applyOffset=new Ge({componentDatatype:Q.UNSIGNED_BYTE,componentsPerAttribute:1,values:ee}));let We=Me.createTypedArray(U,B*6),Pe,Ue,Pt,Ot;g=J.length/3;let ht=0;for(u=0;u0)for(s=new Array(o),i=0;i0)for(a=new Array(o),i=0;i0)for(s=new Array(o),i=0;i0)for(a=new Array(o),i=0;i{i.raiseEvent(a)}),n[r]=s}this.updaters=n,this.geometryChanged=i,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener(q_.prototype._onEntityPropertyChanged,this)}q_.prototype._onEntityPropertyChanged=function(e,t,n,i){let o=this.updaters;for(let r=0;r0){l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i);let c;l(this.depthFailAppearanceType)&&(l(this.depthFailMaterialProperty)&&(this.depthFailMaterial=Ho.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),c=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),i=new En({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed}),depthFailAppearance:c,shadows:this.shadows}),o.add(i),t=!1}else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof kt)&&(this.depthFailMaterial=Ho.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r=0;i--){let o=e[i];if(o.remove(t))return o.updaters.length===0&&(e.splice(i,1),o.destroy()),!0}return!1}z1.prototype.remove=function(e){gme(this._solidItems,e)||gme(this._translucentItems,e)};function yme(e,t,n){let i=!1,o=t.length;for(let r=0;r0)for(r=0;r=0;r--){let s=t[r];if(s.invalidated){t.splice(r,1);let a=s.updaters.values,c=a.length;for(let d=0;d0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=Ho.getValue(e,this.materialProperty,this.material);let a;l(this.depthFailMaterialProperty)&&(this.depthFailMaterial=Ho.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),n=new En({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed}),depthFailAppearance:a,shadows:this.shadows}),i.add(n),t=!1}else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=Ho.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof kt)&&(this.depthFailMaterial=Ho.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};K1.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c0)l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new wc({show:!1,asynchronous:!0,geometryInstances:s.slice(),classificationType:this.classificationType}),o.add(i,this.zIndex),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r=0;--t){let s=o[t];s.isDirty&&(i=o[t].update(e)&&i,s.isDirty=!1),s.geometry.length===0&&o.splice(t,1)}return i};H1.prototype.getBoundingSphere=function(e,t){let n=this._batches,i=n.length;for(let o=0;o0)l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=Ho.getValue(e,this.materialProperty,this.material),n=new wc({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({material:this.material}),classificationType:this.classificationType}),i.add(n,this.zIndex),t=!1;else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=Ho.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};Q1.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c0)l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new En({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new ln({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),o.add(i),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r0)for(m=!0,t=0;t0)for(m=!0,t=0;t-1;a--)c=s[a],d=c.id,u=this._updaterSets.get(d),u.entity===c?u.forEach(function(x){m._removeUpdater(x),m._insertUpdaterIntoBatch(e,x)}):(o.push(c),n.push(c));for(a=o.length-1;a>-1;a--)c=o[a],d=c.id,u=this._updaterSets.get(d),u.forEach(this._removeUpdater.bind(this)),u.destroy(),this._updaterSets.remove(d),this._subscriptions.get(d)(),this._subscriptions.remove(d);for(a=n.length-1;a>-1;a--)c=n[a],d=c.id,u=new $_(c,this._scene),this._updaterSets.set(d,u),u.forEach(function(x){m._insertUpdaterIntoBatch(e,x)}),this._subscriptions.set(d,u.geometryChanged.addEventListener(Ul._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let p=!0,g=this._batches,f=g.length;for(a=0;a-1;s--)c=n[s],a=c.id,i.remove(a)||(o.set(a,c),r.remove(a));for(s=t.length-1;s>-1;s--)c=t[s],a=c.id,o.remove(a)?r.set(a,c):i.set(a,c)};var MP=Ul;var ini=S(T(),1);var E8e=1,W8e="30px sans-serif",I8e=Ao.FILL,X8e=Y.WHITE,P8e=Y.BLACK,v8e=1,w8e=!1,F8e=new Y(.165,.165,.165,.8),A8e=new D(7,5),M8e=D.ZERO,N8e=h.ZERO,U8e=Je.NONE,k8e=fi.CENTER,D8e=Pn.CENTER,B8e=new h,Y8e=new Y,O8e=new Y,z8e=new Y,K8e=new D,H8e=new h,J8e=new D,Q8e=new Ft,j8e=new Ft,q8e=new Ft,$8e=new Xt;function Cme(e){this.entity=e,this.label=void 0,this.index=void 0}function Ug(e,t){t.collectionChanged.addEventListener(Ug.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Ct,this._onCollectionChanged(t,t.values,[],[])}Ug.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i-1;o--)r=t[o],l(r._label)&&l(r._position)&&s.set(r.id,new Cme(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._label)&&l(r._position)?s.contains(r.id)||s.set(r.id,new Cme(r)):(eJ(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],eJ(s.get(r.id),r,a),s.remove(r.id)};function eJ(e,t,n){l(e)&&(e.label=void 0,n.removeLabel(t))}var NP=Ug;var Vni=S(T(),1);var e7e=1,t7e=0,n7e=!0,i7e=!0,o7e=xn.ENABLED,r7e=Je.NONE,s7e=Y.RED,a7e=0,c7e=Y.WHITE,l7e=sc.HIGHLIGHT,d7e=.5,u7e=new D(1,1),m7e=new A,h7e=new A,Vme=new Y,Zme=new Array(4),f7e=new h;function kg(e,t){t.collectionChanged.addEventListener(kg.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new Ct,this._onCollectionChanged(t,t.values,[],[])}async function p7e(e,t,n,i){let o=e._primitives,r=e._modelHash;try{let s=await Um.fromGltfAsync({url:n,incrementallyLoadTextures:i,scene:e._scene});if(e.isDestroyed()||!l(r[t.id]))return;s.id=t,o.add(s),r[t.id].modelPrimitive=s,s.errorEvent.addEventListener(a=>{l(r[t.id])&&(console.log(a),a.name!=="TextureError"&&s.incrementallyLoadTextures&&(r[t.id].loadFailed=!0))})}catch(s){if(e.isDestroyed()||!l(r[t.id]))return;console.log(s),r[t.id].loadFailed=!0}}kg.prototype.update=function(e){let t=this._entitiesToVisualize.values,n=this._modelHash,i=this._primitives;for(let o=0,r=t.length;o-1;i--)tJ(this,e[i],t,n);return me(this)};var VU=new h,b7e=new he;kg.prototype.getBoundingSphere=function(e,t){let n=this._modelHash[e.id];if(!l(n))return mt.FAILED;if(n.loadFailed)return mt.FAILED;let i=n.modelPrimitive;if(!l(i)||!i.show)return mt.PENDING;if(!i.ready||!n.modelUpdated)return mt.PENDING;let o=this._scene,r=y(o.ellipsoid,te.default);if(i.heightReference!==Je.NONE){let a=i.modelMatrix;VU.x=a[12],VU.y=a[13],VU.z=a[14];let c=r.cartesianToCartographic(VU,b7e),d=o.getHeight(c,i.heightReference);return l(d)&&(iu(i.heightReference)?c.height=d:c.height+=d),le.clone(i.boundingSphere,t),t.center=r.cartographicToCartesian(c),mt.DONE}return le.clone(i.boundingSphere,t),mt.DONE};kg.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._entitiesToVisualize,a=this._modelHash,c=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],l(r._model)&&l(r._position)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],l(r._model)&&l(r._position)?(g7e(r,a),s.set(r.id,r)):(tJ(this,r,a,c),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],tJ(this,r,a,c),s.remove(r.id)};function tJ(e,t,n,i){let o=n[t.id];l(o)&&(i.removeAndDestroy(o.modelPrimitive),delete n[t.id])}function g7e(e,t){let n=t[e.id];l(n)&&(n.nodeTransformationsScratch={},n.articulationsScratch={})}var UP=kg;var $ni=S(T(),1);var Ini=S(T(),1);function Dg(e){this._definitionChanged=new ge,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}Object.defineProperties(Dg.prototype,{isConstant:{get:function(){return H.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return l(this._value)?this._value.referenceFrame:$i.FIXED}}});Dg.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,$i.FIXED,t)};Dg.prototype.setValue=function(e){this._value!==e&&(this._value=e,l(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),l(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))};Dg.prototype.getValueInReferenceFrame=function(e,t,n){if(l(this._value))return n=this._value.getValueInReferenceFrame(e,t,n),l(n)?te.default.scaleToGeodeticSurface(n,n):void 0};Dg.prototype.equals=function(e){return this===e||e instanceof Dg&&this._value===e._value};Dg.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var Sf=Dg;var y7e=60,x7e=1,Gme=new Tn,nJ=new Tn,iJ=new Tn;function Lme(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function _7e(e,t,n,i,o,r,s,a,c){let d=a,u;u=e.getValueInReferenceFrame(t,r,c[d]),l(u)&&(c[d++]=u);let m=!l(o)||ne.lessThanOrEquals(o,t)||ne.greaterThanOrEquals(o,n),p=0,g=i.length,f=i[p],x=n,_=!1,C,V,Z;for(;p0&&!_){let R=i[p+1],G=ne.secondsDifference(R,f);_=G>s,_&&(C=Math.ceil(G/s),V=0,Z=G/Math.max(C,2),C=Math.max(C-1,1))}if(_&&V0){let g=m.pop();c=this._polylineCollection.get(g),t.index=g}else t.index=this._polylineCollection.length,c=this._polylineCollection.add();c.id=n,t.polyline=c}let u=H.getValueOrDefault(i._resolution,e,y7e);c.show=!0,c.positions=Wme(o,r,s,e,this._referenceFrame,u,c.positions.slice()),c.material=Ho.getValue(e,i._material,c.material),c.width=H.getValueOrDefault(i._width,e,x7e),c.distanceDisplayCondition=H.getValueOrUndefined(i._distanceDisplayCondition,e,c.distanceDisplayCondition)};kP.prototype.removeObject=function(e){let t=e.polyline;l(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)};kP.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),me(this)};function Bg(e,t){t.collectionChanged.addEventListener(Bg.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new Ct,this._onCollectionChanged(t,t.values,[],[])}Bg.prototype.update=function(e){let t=this._updaters;for(let i in t)t.hasOwnProperty(i)&&t[i].update(e);let n=this._items.values;if(n.length===0&&l(this._updaters)&&Object.keys(this._updaters).length>0){for(let i in t)t.hasOwnProperty(i)&&t[i].destroy();this._updaters={}}for(let i=0,o=n.length;i-1;o--)r=t[o],l(r._path)&&l(r._position)&&a.set(r.id,new Lme(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._path)&&l(r._position)?a.contains(r.id)||a.set(r.id,new Lme(r)):(s=a.get(r.id),l(s)&&(l(s.updater)&&s.updater.removeObject(s),a.remove(r.id)));for(o=n.length-1;o>-1;o--)r=n[o],s=a.get(r.id),l(s)&&(l(s.updater)&&s.updater.removeObject(s),a.remove(r.id))};Bg._subSample=Wme;var DP=Bg;var mii=S(T(),1);var Ime=Y.WHITE,Xme=Y.BLACK,Pme=0,vme=1,wme=0,Fme=new Y,Z7e=new h,Ame=new Y,Mme=new Ft,Nme=new Ft,Ume=new Xt;function kme(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function Yg(e,t){t.collectionChanged.addEventListener(Yg.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Ct,this._onCollectionChanged(t,t.values,[],[])}Yg.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i0?(d.scale=1,g=g||C!==r.outlineWidth||V!==r.pixelSize||!Y.equals(x,r.color)||!Y.equals(_,r.outlineColor)):(d.scale=V/50,V=50,g=g||C!==r.outlineWidth||!Y.equals(x,r.color)||!Y.equals(_,r.outlineColor)),g){r.color=Y.clone(x,r.color),r.outlineColor=Y.clone(_,r.outlineColor),r.pixelSize=V,r.outlineWidth=C;let Z=x.alpha,R=x.toCssColorString(),G=_.toCssColorString(),W=JSON.stringify([R,V,G,C]);d.setImage(W,m_(Z,R,G,C,V))}f&&d._updateClamping()}}return!0};Yg.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!(l(n.pointPrimitive)||l(n.billboard)))return mt.FAILED;if(l(n.pointPrimitive))t.center=h.clone(n.pointPrimitive.position,t.center);else{let i=n.billboard;if(!l(i._clampedPosition))return mt.PENDING;t.center=h.clone(i._clampedPosition,t.center)}return t.radius=0,mt.DONE};Yg.prototype.isDestroyed=function(){return!1};Yg.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Yg.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t-1;o--)r=t[o],l(r._point)&&l(r._position)&&s.set(r.id,new kme(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._point)&&l(r._position)?s.contains(r.id)||s.set(r.id,new kme(r)):(BP(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],BP(s.get(r.id),r,a),s.remove(r.id)};function BP(e,t,n){if(l(e)){let i=e.pointPrimitive;if(l(i)){e.pointPrimitive=void 0,n.removePoint(t);return}let o=e.billboard;l(o)&&(e.billboard=void 0,n.removeBillboard(t))}}var YP=Yg;var Yoi=S(T(),1);var loi=S(T(),1);var Xii=S(T(),1);var zme=[];function L7e(e,t,n,i,o){let r=zme;r.length=o;let s,a=n.red,c=n.green,d=n.blue,u=n.alpha,m=i.red,p=i.green,g=i.blue,f=i.alpha;if(Y.equals(n,i)){for(s=0;s0?new Array(o):void 0;for(i=0;i0){let w=0,N=m[0];i=i.filter(function(B,k){let O=!1;return o?O=k===N||k===0&&N===1:O=k+1===N,O?(w++,N=m[w],!1):!0})}let g=p.length;if(g<2||t<=0)return;if(r===$t.GEODESIC||r===$t.RHUMB){let w,N;r===$t.GEODESIC?(w=X.chordLength(s,a.maximumRadius),N=Li.numberOfPoints):(w=s,N=Li.numberOfPointsRhumbLine);let B=Li.extractHeights(p,a);if(l(i)){let k=1;for(c=0;c0)return le.fromPoints(t.positions,e),mt.DONE}return mt.FAILED};zP.prototype.isDestroyed=function(){return!1};zP.prototype.destroy=function(){let t=this._geometryUpdater._scene.id+this._primitives._guid,n=ZU[t];l(n)&&(n.remove(this._line),n.length===0&&(this._primitives.removeAndDestroy(n),delete ZU[t])),l(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),me(this)};var KP=sh;var Loi=S(T(),1);var w7e=new Y,F7e=new Xt,A7e=new Xt;function ah(e,t,n,i,o){let r;n instanceof kt?r=Br:r=$s,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=r,this.materialProperty=n,this.updaters=new Ct,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Ct,this.material=void 0,this.updatersWithAttributes=new Ct,this.attributes=new Ct,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(ah.prototype.onMaterialChanged,this),this.subscriptions=new Ct,this.showsUpdated=new Ct,this.zIndex=i,this._asynchronous=o}ah.prototype.onMaterialChanged=function(){this.invalidated=!0};ah.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof kt&&t instanceof kt?!0:l(t)&&t.equals(n)};ah.prototype.add=function(e,t,n){let i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!H.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,c){s==="isShowing"&&o.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};ah.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t)),!0}return!1};ah.prototype.update=function(e){let t=!0,n=this.primitive,i=this.orderedGroundPrimitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0)l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),n=new xm({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===$s&&(this.material=Ho.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),i.add(n,this.zIndex),t=!1;else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===$s&&(this.material=Ho.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};eV.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c-1;a--)c=s[a],d=c.id,u=this._updaters.get(d),u.entity===c?(jme(this,u),qme(this,e,u)):(o.push(c),n.push(c));for(a=o.length-1;a>-1;a--)c=o[a],d=c.id,u=this._updaters.get(d),jme(this,u),u.destroy(),this._updaters.remove(d),this._subscriptions.get(d)(),this._subscriptions.remove(d);for(a=n.length-1;a>-1;a--)c=n[a],d=c.id,u=new KP(c,this._scene),this._updaters.set(d,u),qme(this,e,u),this._subscriptions.set(d,u.geometryChanged.addEventListener(Tf._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let m=!0,p=this._batches,g=p.length;for(a=0;a-1;s--)c=n[s],a=c.id,i.remove(a)||(o.set(a,c),r.remove(a));for(s=t.length-1;s>-1;s--)c=t[s],a=c.id,o.remove(a)?r.set(a,c):i.set(a,c)};var JP=Tf;function kl(e){wc.initializeTerrainHeights(),xm.initializeTerrainHeights();let t=e.scene,n=e.dataSourceCollection;this._eventHelper=new Wr,this._eventHelper.add(n.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(n.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(n.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=n,this._scene=t,this._visualizersCallback=y(e.visualizersCallback,kl.defaultVisualizersCallback);let i=!1,o=new Ml,r=new Ml;n.length>0&&(t.primitives.add(o),t.groundPrimitives.add(r),i=!0),this._primitives=o,this._groundPrimitives=r;for(let d=0,u=n.length;dnew o(e,i))]};Object.defineProperties(kl.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}});kl.prototype.isDestroyed=function(){return!1};kl.prototype.destroy=function(){this._eventHelper.removeAll();let e=this._dataSourceCollection;for(let t=0,n=e.length;tY7e*s.maximumRadius?(m=nhe,h.normalize(c,m),h.negate(m,m),g=h.clone(h.UNIT_Z,rJ),p=h.cross(g,m,LU),h.magnitude(p)>X.EPSILON7&&(h.normalize(m,m),h.normalize(p,p),g=h.cross(m,p,rJ),h.normalize(g,g),d=!0)):h.equalsEpsilon(c,V,X.EPSILON7)||(g=nhe,h.normalize(W,g),h.normalize(v,v),p=h.cross(g,v,rJ),u&&(p=h.multiplyByScalar(p,-1,p)),h.equalsEpsilon(p,h.ZERO,X.EPSILON7)||(m=h.cross(p,g,LU),$.multiplyByVector(G,m,m),$.multiplyByVector(G,p,p),$.multiplyByVector(G,g,g),h.normalize(m,m),h.normalize(p,p),h.normalize(g,g),d=!0))}}l(e.boundingSphere)&&(c=e.boundingSphere.center);let f,x,_;i&&(f=h.clone(t.position,sJ),x=h.clone(t.direction,ihe),_=h.clone(t.up,ohe));let C=B7e;d?(C[0]=m.x,C[1]=m.y,C[2]=m.z,C[3]=0,C[4]=p.x,C[5]=p.y,C[6]=p.z,C[7]=0,C[8]=g.x,C[9]=g.y,C[10]=g.z,C[11]=0,C[12]=c.x,C[13]=c.y,C[14]=c.z,C[15]=0):Gt.eastNorthUpToFixedFrame(c,s,C),t._setTransform(C),i&&(h.clone(f,t.position),h.clone(x,t.direction),h.clone(_,t.up),h.cross(x,_,t.right))}if(n){let d=a===oe.SCENE2D||h.equals(e._offset3D,h.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,d)}}function jP(e,t,n){this.entity=e,this.scene=t,this.ellipsoid=y(n,te.default),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new h,this._defaultOffset3D=void 0,this._offset3D=new h}Object.defineProperties(jP,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=h.clone(e,new h)}}});jP.defaultOffset3D=new h(-14e3,3500,3500);var RU=new Bu,z7e=new h;jP.prototype.update=function(e,t){let n=this.scene,i=this.ellipsoid,o=n.mode;if(o===oe.MORPHING)return;let r=this.entity,s=r.position;if(!l(s))return;let a=r!==this._lastEntity,c=o!==this._mode,d=n.camera,u=a||c,m=!0;if(a){let p=r.viewFrom,g=l(p);if(!g&&l(t)){RU.pitch=-X.PI_OVER_FOUR,RU.range=0;let f=s.getValue(e,z7e);if(l(f)){let x=2-1/Math.max(1,h.magnitude(f)/i.maximumRadius);RU.pitch*=x}d.viewBoundingSphere(t,RU),this.boundingSphere=t,u=!1,m=!1}else(!g||!l(p.getValue(e,this._offset3D)))&&h.clone(jP._defaultOffset3D,this._offset3D)}else!c&&this._mode!==oe.SCENE2D&&h.clone(d.position,this._offset3D);this._lastEntity=r,this._mode=o,O7e(this,d,u,m,s,e,i)};var qP=jP;var aai=S(T(),1);var Fri=S(T(),1);function ev(){this._cache={}}ev.prototype.fromColor=function(e,t){return GU(void 0,void 0,e,t,this._cache)};ev.prototype.fromUrl=function(e,t,n){return GU(e,void 0,t,n,this._cache)};ev.prototype.fromMakiIconId=function(e,t,n){return GU(tn(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)};ev.prototype.fromText=function(e,t,n){return GU(void 0,e,t,n,this._cache)};var K7e=new Y;function H7e(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,K7e).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function rhe(e,t,n){let i=n/2.5,o=i,r=i;t.width>t.height?r=i*(t.height/t.width):t.width${i}${dhe(o)}`:n+=`${i}${o}`)}return n.length>0&&(n=`${n}
`),n}function t6e(e,t,n){let i;return function(o,r){return l(i)||(i=e(t,n)),i}}function n6e(e,t){return new Cm(t6e(dhe,e,t),!0)}function IU(e,t,n){let i=e.id;if(!l(i)||e.type!=="Feature")i=Bn();else{let s=2,a=i;for(;l(t.getById(a));)a=`${i}_${s}`,s++;i=a}let o=t.getOrCreateEntity(i),r=e.properties;if(l(r)){o.properties=r;let s,a=r.title;if(l(a))o.name=a,s="title";else{let d=Number.MAX_VALUE;for(let u in r)if(r.hasOwnProperty(u)&&r[u]){let m=u.toLowerCase();if(d>1&&m==="title"){d=1,s=u;break}else d>2&&m==="name"?(d=2,s=u):d>3&&/title/i.test(u)?(d=3,s=u):d>4&&/name/i.test(u)&&(d=4,s=u)}l(s)&&(o.name=r[s])}let c=r.description;c!==null&&(o.description=l(c)?new Jn(c):n(r,s))}return o}function yJ(e,t){let n=new Array(e.length);for(let i=0;i2?d.perPositionHeight=new Jn(!0):o.clampToGround||(d.height=0);let p=IU(t,e._entityCollection,o.describe);p.polygon=d}function The(e,t,n,i,o){She(e,t,i,n.coordinates,o)}function Che(e,t,n,i,o){let r=n.coordinates;for(let s=0;st&&(n==null?(n="…",i=3):i=n.length,e=e.substring(0,t-i)+n),e}function Uo(e,t){for(var n=e.length-1;n>=0;n--)e[n]===t&&e.splice(n,1)}function zg(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function Kg(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var Wai=S(T());var gai=S(T());var fai=S(T()),Hg=/[A-Za-z]/,Bs=/[\d]/;var Id=/\s/,XU=/['"]/,Ehe=/[\x00-\x1F\x7F]/,Whe=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,s6e=/\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source,a6e=/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,c6e=Whe+s6e+a6e,Ihe=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,mai=new RegExp("[".concat(Whe+Ihe,"]")),xJ=c6e+Ihe,ch=new RegExp("[".concat(xJ,"]"));var PU=function(){function e(t){t===void 0&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return e.prototype.setTagName=function(t){return this.tagName=t,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(t,n){var i=this.getAttrs();return i[t]=n,this},e.prototype.getAttr=function(t){return this.getAttrs()[t]},e.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(t){return this.setAttr("class",t)},e.prototype.addClass=function(t){for(var n=this.getClass(),i=n?n.split(Id):[],o=t.split(Id),r;r=o.shift();)i.indexOf(r)===-1&&i.push(r);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var n=this.getClass(),i=n?n.split(Id):[],o=t.split(Id),r;i.length&&(r=o.shift());){var s=i.indexOf(r);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(t){return(" "+this.getClass()+" ").indexOf(" "+t+" ")!==-1},e.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},e.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var t=this.getTagName(),n=this.buildAttrsStr();return n=n?" "+n:"",["<",t,n,">",this.getInnerHtml(),""].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var t=this.getAttrs(),n=[];for(var i in t)t.hasOwnProperty(i)&&n.push(i+'="'+t[i]+'"');return n.join(" ")},e}();var xai=S(T());function Xhe(e,t,n){var i,o;n==null?(n="…",o=3,i=8):(o=n.length,i=n.length);var r=function(V){var Z={},R=V,G=R.match(/^([a-z]+):\/\//i);return G&&(Z.scheme=G[1],R=R.substr(G[0].length)),G=R.match(/^(.*?)(?=(\?|#|\/|$))/i),G&&(Z.host=G[1],R=R.substr(G[0].length)),G=R.match(/^\/(.*?)(?=(\?|#|$))/i),G&&(Z.path=G[1],R=R.substr(G[0].length)),G=R.match(/^\?(.*?)(?=(#|$))/i),G&&(Z.query=G[1],R=R.substr(G[0].length)),G=R.match(/^#(.*?)$/i),G&&(Z.fragment=G[1]),Z},s=function(V){var Z="";return V.scheme&&V.host&&(Z+=V.scheme+"://"),V.host&&(Z+=V.host),V.path&&(Z+="/"+V.path),V.query&&(Z+="?"+V.query),V.fragment&&(Z+="#"+V.fragment),Z},a=function(V,Z){var R=Z/2,G=Math.ceil(R),W=-1*Math.floor(R),v="";return W<0&&(v=V.substr(W)),V.substr(0,G)+n+v};if(e.length<=t)return e;var c=t-o,d=r(e);if(d.query){var u=d.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);u&&(d.query=d.query.substr(0,u[1].length),e=s(d))}if(e.length<=t||(d.host&&(d.host=d.host.replace(/^www\./,""),e=s(d)),e.length<=t))return e;var m="";if(d.host&&(m+=d.host),m.length>=c)return d.host.length==t?(d.host.substr(0,t-o)+n).substr(0,c+i):a(m,c).substr(0,c+i);var p="";if(d.path&&(p+="/"+d.path),d.query&&(p+="?"+d.query),p)if((m+p).length>=c){if((m+p).length==t)return(m+p).substr(0,t);var g=c-m.length;return(m+a(p,g)).substr(0,c+i)}else m+=p;if(d.fragment){var f="#"+d.fragment;if((m+f).length>=c){if((m+f).length==t)return(m+f).substr(0,t);var x=c-m.length;return(m+a(f,x)).substr(0,c+i)}else m+=f}if(d.scheme&&d.host){var _=d.scheme+"://";if((m+_).length0&&(C=m.substr(-1*Math.floor(c/2))),(m.substr(0,Math.ceil(c/2))+n+C).substr(0,c+i)}var Sai=S(T());function Phe(e,t,n){if(e.length<=t)return e;var i,o;n==null?(n="…",i=8,o=3):(i=n.length,o=n.length);var r=t-o,s="";return r>0&&(s=e.substr(-1*Math.floor(r/2))),(e.substr(0,Math.ceil(r/2))+n+s).substr(0,r+i)}var Vai=S(T());function vhe(e,t,n){return Ghe(e,t,n)}var whe=function(){function e(t){t===void 0&&(t={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=t.newWindow||!1,this.truncate=t.truncate||{},this.className=t.className||""}return e.prototype.build=function(t){return new PU({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},e.prototype.createAttrs=function(t){var n={href:t.getAnchorHref()},i=this.createCssClass(t);return i&&(n.class=i),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length=0;g--){var f=u[g];switch(f.state){case 11:W(f,p);break;case 12:v(f,p);break;case 0:C(f,p);break;case 1:V(f,p);break;case 2:Z(f,p);break;case 3:R(f,p);break;case 4:G(f,p);break;case 5:P(f,p);break;case 6:F(f,p);break;case 7:M(f,p);break;case 13:b(f,p);break;case 14:L(f,p);break;case 8:E(f,p);break;case 9:I(f,p);break;case 10:w(f,p);break;case 15:N(f,p);break;case 16:B(f,p);break;case 17:k(f,p);break;case 18:O(f,p);break;case 19:U(f,p);break;case 20:J(f,p);break;case 21:z(f,p);break;case 22:ee(f,p);break;case 23:K(f,p);break;case 24:j(f,p);break;case 25:q(f,p);break;case 26:be(f,p);break;case 27:Se(f,p);break;case 28:ae(f,p);break;case 29:ye(f,p);break;case 30:Te(f,p);break;case 31:Ze(f,p);break;case 32:Pe(f,p);break;case 33:Ue(f,p);break;case 34:Pt(f,p);break;case 35:Ot(f,p);break;case 36:ht(f,p);break;case 37:We(f,p);break;case 38:Ae(f,p);break;case 39:$e(f,p);break;case 40:Qe(f,p);break;case 41:je(f,p);break;default:Kg(f.state)}}}for(var x=u.length-1;x>=0;x--)u.forEach(function(pe){return Ut(pe)});return c;function _(pe){if(pe==="#")u.push(A6e(m,28));else if(pe==="@")u.push(M6e(m,30));else if(pe==="/")u.push(EJ(m,11));else if(pe==="+")u.push(WJ(m,37));else if(pe==="(")u.push(WJ(m,32));else{if(Bs.test(pe)&&(u.push(WJ(m,38)),u.push(w6e(m,13))),Ohe(pe)){var Ve=pe.toLowerCase()==="m"?15:22;u.push(F6e(m,Ve))}vU(pe)&&u.push(GJ(m,0)),ch.test(pe)&&u.push(EJ(m,5))}}function C(pe,Ve){Ve===":"?pe.state=2:Ve==="-"?pe.state=1:TJ(Ve)||Uo(u,pe)}function V(pe,Ve){Ve==="-"||(Ve==="/"?(Uo(u,pe),u.push(EJ(m,11))):TJ(Ve)?pe.state=0:Uo(u,pe))}function Z(pe,Ve){Ve==="/"?pe.state=3:Ve==="."?Uo(u,pe):wb(Ve)?(pe.state=5,vU(Ve)&&u.push(GJ(m,0))):Uo(u,pe)}function R(pe,Ve){Ve==="/"?pe.state=4:CJ(Ve)?(pe.state=10,pe.acceptStateReached=!0):Ut(pe)}function G(pe,Ve){Ve==="/"?pe.state=10:wb(Ve)?(pe.state=5,pe.acceptStateReached=!0):Uo(u,pe)}function W(pe,Ve){Ve==="/"?pe.state=12:Uo(u,pe)}function v(pe,Ve){wb(Ve)?pe.state=5:Uo(u,pe)}function P(pe,Ve){Ve==="."?pe.state=7:Ve==="-"?pe.state=6:Ve===":"?pe.state=8:FU(Ve)?pe.state=10:wU(Ve)||Ut(pe)}function F(pe,Ve){Ve==="-"||(Ve==="."?Ut(pe):wb(Ve)?pe.state=5:Ut(pe))}function M(pe,Ve){Ve==="."?Ut(pe):wb(Ve)?(pe.state=5,pe.acceptStateReached=!0):Ut(pe)}function b(pe,Ve){Ve==="."?pe.state=14:Ve===":"?pe.state=8:Bs.test(Ve)||(FU(Ve)?pe.state=10:ch.test(Ve)?Uo(u,pe):Ut(pe))}function L(pe,Ve){Bs.test(Ve)?(pe.octetsEncountered++,pe.octetsEncountered===4&&(pe.acceptStateReached=!0),pe.state=13):Ut(pe)}function E(pe,Ve){Bs.test(Ve)?pe.state=9:Ut(pe)}function I(pe,Ve){Bs.test(Ve)||(FU(Ve)?pe.state=10:Ut(pe))}function w(pe,Ve){CJ(Ve)||Ut(pe)}function N(pe,Ve){Ve.toLowerCase()==="a"?pe.state=16:ee(pe,Ve)}function B(pe,Ve){Ve.toLowerCase()==="i"?pe.state=17:ee(pe,Ve)}function k(pe,Ve){Ve.toLowerCase()==="l"?pe.state=18:ee(pe,Ve)}function O(pe,Ve){Ve.toLowerCase()==="t"?pe.state=19:ee(pe,Ve)}function U(pe,Ve){Ve.toLowerCase()==="o"?pe.state=20:ee(pe,Ve)}function J(pe,Ve){Ve.toLowerCase()===":"?pe.state=21:ee(pe,Ve)}function z(pe,Ve){AU(Ve)?pe.state=22:Uo(u,pe)}function ee(pe,Ve){Ve==="."?pe.state=23:Ve==="@"?pe.state=24:AU(Ve)?pe.state=22:Uo(u,pe)}function K(pe,Ve){Ve==="."?Uo(u,pe):Ve==="@"?Uo(u,pe):AU(Ve)?pe.state=22:Uo(u,pe)}function j(pe,Ve){wb(Ve)?pe.state=25:Uo(u,pe)}function q(pe,Ve){Ve==="."?pe.state=27:Ve==="-"?pe.state=26:wU(Ve)||Ut(pe)}function be(pe,Ve){Ve==="-"||Ve==="."?Ut(pe):wU(Ve)?pe.state=25:Ut(pe)}function Se(pe,Ve){Ve==="."||Ve==="-"?Ut(pe):wb(Ve)?(pe.state=25,pe.acceptStateReached=!0):Ut(pe)}function ae(pe,Ve){ZJ(Ve)?(pe.state=29,pe.acceptStateReached=!0):Uo(u,pe)}function ye(pe,Ve){ZJ(Ve)||Ut(pe)}function Te(pe,Ve){LJ(Ve)?(pe.state=31,pe.acceptStateReached=!0):Uo(u,pe)}function Ze(pe,Ve){LJ(Ve)||(ch.test(Ve)?Uo(u,pe):Ut(pe))}function We(pe,Ve){Bs.test(Ve)?pe.state=38:(Uo(u,pe),_(Ve))}function Pe(pe,Ve){Bs.test(Ve)?pe.state=33:Uo(u,pe),_(Ve)}function Ue(pe,Ve){Bs.test(Ve)?pe.state=34:Uo(u,pe)}function Pt(pe,Ve){Bs.test(Ve)?pe.state=35:Uo(u,pe)}function Ot(pe,Ve){Ve===")"?pe.state=36:Uo(u,pe)}function ht(pe,Ve){Bs.test(Ve)?pe.state=38:RJ(Ve)?pe.state=39:Uo(u,pe)}function Ae(pe,Ve){pe.acceptStateReached=!0,MU(Ve)?pe.state=40:Ve==="#"?pe.state=41:Bs.test(Ve)||(Ve==="("?pe.state=32:RJ(Ve)?pe.state=39:(Ut(pe),vU(Ve)&&u.push(GJ(m,0))))}function $e(pe,Ve){Bs.test(Ve)?pe.state=38:Ve==="("?pe.state=32:(Ut(pe),_(Ve))}function Qe(pe,Ve){MU(Ve)||(Ve==="#"?pe.state=41:Bs.test(Ve)?pe.state=38:Ut(pe))}function je(pe,Ve){MU(Ve)?pe.state=40:Bs.test(Ve)?Uo(u,pe):Ut(pe)}function Ut(pe){if(Uo(u,pe),!!pe.acceptStateReached){var Ve=pe.startIdx,Dt=e.slice(pe.startIdx,m);if(Dt=v6e(Dt),pe.type==="url"){var bt=e.charAt(pe.startIdx-1);if(bt==="@")return;var li=pe.matchType;if(li==="scheme"){var Vo=SJ.exec(Dt);if(Vo&&(Ve=Ve+Vo.index,Dt=Dt.slice(Vo.index)),!Uhe(Dt))return}else if(li==="tld"){if(!khe(Dt))return}else if(li==="ipV4"){if(!Dhe(Dt))return}else Kg(li);c.push(new Bhe({tagBuilder:n,matchedText:Dt,offset:Ve,urlMatchType:li,url:Dt,protocolRelativeMatch:Dt.slice(0,2)==="//",stripPrefix:i,stripTrailingSlash:o,decodePercentEncoding:r}))}else if(pe.type==="email")zhe(Dt)&&c.push(new Khe({tagBuilder:n,matchedText:Dt,offset:Ve,email:Dt.replace(Yhe,"")}));else if(pe.type==="hashtag")Hhe(Dt)&&c.push(new Qhe({tagBuilder:n,matchedText:Dt,offset:Ve,serviceName:s,hashtag:Dt.slice(1)}));else if(pe.type==="mention")jhe(Dt,a)&&c.push(new $he({tagBuilder:n,matchedText:Dt,offset:Ve,serviceName:a,mention:Dt.slice(1)}));else if(pe.type==="phone"){if(Dt=Dt.replace(/ +$/g,""),efe(Dt)){var Gs=Dt.replace(/[^0-9,;#]/g,"");c.push(new tfe({tagBuilder:n,matchedText:Dt,offset:Ve,number:Gs,plusSign:Dt.charAt(0)==="+"}))}}else Kg(pe)}}}var P6e=/[\(\{\[]/,nfe=/[\)\}\]]/,ife={")":"(","}":"{","]":"["};function v6e(e){for(var t={"(":0,"{":0,"[":0},n=0;n=0;)if(r=e.charAt(o),nfe.test(r)){var s=ife[r];if(t[s]<0)t[s]++,o--;else break}else if(Nhe.test(r))o--;else break;return e.slice(0,o+1)}function GJ(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"scheme"}}function EJ(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"tld"}}function w6e(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"ipV4",octetsEncountered:1}}function F6e(e,t){return{type:"email",startIdx:e,state:t,acceptStateReached:!1}}function A6e(e,t){return{type:"hashtag",startIdx:e,state:t,acceptStateReached:!1}}function M6e(e,t){return{type:"mention",startIdx:e,state:t,acceptStateReached:!1}}function WJ(e,t){return{type:"phone",startIdx:e,state:t,acceptStateReached:!1}}var Mci=S(T());function rfe(e,t){for(var n=t.onOpenTag,i=t.onCloseTag,o=t.onText,r=t.onComment,s=t.onDoctype,a=new Zf,c=0,d=e.length,u=0,m=0,p=a;c"?(p=new Zf(Ys(Ys({},p),{name:ee()})),J()):!Hg.test(j)&&!Bs.test(j)&&j!==":"&&O()}function C(j){j===">"?O():Hg.test(j)?u=3:O()}function V(j){Id.test(j)||(j==="/"?u=12:j===">"?J():j==="<"?U():j==="="||XU.test(j)||Ehe.test(j)?O():u=5)}function Z(j){Id.test(j)?u=6:j==="/"?u=12:j==="="?u=7:j===">"?J():j==="<"?U():XU.test(j)&&O()}function R(j){Id.test(j)||(j==="/"?u=12:j==="="?u=7:j===">"?J():j==="<"?U():XU.test(j)?O():u=5)}function G(j){Id.test(j)||(j==='"'?u=8:j==="'"?u=9:/[>=`]/.test(j)?O():j==="<"?U():u=10)}function W(j){j==='"'&&(u=11)}function v(j){j==="'"&&(u=11)}function P(j){Id.test(j)?u=4:j===">"?J():j==="<"&&U()}function F(j){Id.test(j)?u=4:j==="/"?u=12:j===">"?J():j==="<"?U():(u=4,K())}function M(j){j===">"?(p=new Zf(Ys(Ys({},p),{isClosing:!0})),J()):u=4}function b(j){e.substr(c,2)==="--"?(c+=2,p=new Zf(Ys(Ys({},p),{type:"comment"})),u=14):e.substr(c,7).toUpperCase()==="DOCTYPE"?(c+=7,p=new Zf(Ys(Ys({},p),{type:"doctype"})),u=20):O()}function L(j){j==="-"?u=15:j===">"?O():u=16}function E(j){j==="-"?u=18:j===">"?O():u=16}function I(j){j==="-"&&(u=17)}function w(j){j==="-"?u=18:u=16}function N(j){j===">"?J():j==="!"?u=19:j==="-"||(u=16)}function B(j){j==="-"?u=17:j===">"?J():u=16}function k(j){j===">"?J():j==="<"&&U()}function O(){u=0,p=a}function U(){u=1,p=new Zf({idx:c})}function J(){var j=e.slice(m,p.idx);j&&o(j,m),p.type==="comment"?r(p.idx):p.type==="doctype"?s(p.idx):(p.isOpening&&n(p.name,p.idx),p.isClosing&&i(p.name,p.idx)),O(),m=c+1}function z(){var j=e.slice(m,c);o(j,m),m=c+1}function ee(){var j=p.idx+(p.isClosing?2:1);return e.slice(j,c).toLowerCase()}function K(){c--}}var Zf=function(){function e(t){t===void 0&&(t={}),this.idx=t.idx!==void 0?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing}return e}();var N6e=function(){function e(t){t===void 0&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=U6e(t.urls),this.email=Wd(t.email)?t.email:this.email,this.phone=Wd(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=Wd(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=k6e(t.stripPrefix),this.stripTrailingSlash=Wd(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=Wd(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&qhe.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(i!==!1&&Jhe.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=D6e(t.truncate),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,n){var i=new e(n);return i.link(t)},e.parse=function(t,n){var i=new e(n);return i.parse(t)},e.prototype.parse=function(t){var n=this,i=["a","style","script"],o=0,r=[];return rfe(t,{onOpenTag:function(s){i.indexOf(s)>=0&&o++},onText:function(s,a){if(o===0){var c=/( | |<|<|>|>|"|"|')/gi,d=s.split(c),u=a;d.forEach(function(m,p){if(p%2===0){var g=n.parseText(m,u);r.push.apply(r,g)}u+=m.length})}},onCloseTag:function(s){i.indexOf(s)>=0&&(o=Math.max(o-1,0))},onComment:function(s){},onDoctype:function(s){}}),r=this.compactMatches(r),r=this.removeUnwantedMatches(r),r},e.prototype.compactMatches=function(t){t.sort(function(c,d){return c.getOffset()-d.getOffset()});for(var n=0;nr?n:n+1;t.splice(a,1);continue}if(t[n+1].getOffset()/g,">"));for(var n=this.parse(t),i=[],o=0,r=0,s=n.length;r{let i=new FileReader;i.addEventListener("load",function(){t(i.result)}),i.addEventListener("error",function(){n(i.error)}),i.readAsText(e)})}function IJ(e,t){let n=ov(e,"id");return n=l(n)?n:Bn(),t.getOrCreateEntity(n)}function XJ(e){let t=ufe(e,"lon"),n=ufe(e,"lat"),i=nv(e,"ele",To.gpx);return h.fromDegrees(t,n,i)}function ufe(e,t){if(!l(e))return;let n=e.getAttribute(t);if(n!==null){let i=parseFloat(n);return isNaN(i)?void 0:i}}function ov(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function Jg(e,t,n){if(!l(e))return;let i=e.childNodes,o=i.length;for(let r=0;r${m.text}: ${m.value}

`)}if(!l(i)||i==="")return;i=B6e.link(i),iv.innerHTML=i;let s=iv.querySelectorAll("a");for(n=0;n',d+=`${iv.innerHTML}`,iv.innerHTML="",d}function yfe(e,t,n,i){let o=XJ(t),r=IJ(t,n);r.position=o;let s=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",Y.RED,UU);r.billboard=bfe(s);let a=Dl(t,"name",To.gpx);r.name=a,r.label=z6e(),r.label.text=a,r.description=vJ(t,r),i.clampToGround&&(r.billboard.heightReference=Je.CLAMP_TO_GROUND,r.label.heightReference=Je.CLAMP_TO_GROUND)}function K6e(e,t,n,i){let o=IJ(t,n);o.description=vJ(t,o);let r=PJ(t,"rtept",To.gpx),s=new Array(r.length);for(let a=0;a0?(a=a.concat(c.times),u.addSamples(a,s),d=d&&!0):d=!1;if(d){let m=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",Y.RED,UU);o.billboard=bfe(m),o.position=u,i.clampToGround&&(o.billboard.heightReference=Je.CLAMP_TO_GROUND),o.availability=new Xr,o.availability.addInterval(new Tn({start:a[0],stop:a[a.length-1]}))}o.polyline=gfe(i.trackColor),o.polyline.positions=s,i.clampToGround&&(o.polyline.clampToGround=!0)}function J6e(e){let t={positions:[],times:[]},n=PJ(e,"trkpt",To.gpx),i;for(let o=0;onew Array(t).fill(n,0,t)))}function HU(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?HU(n):n),[])}var _fe=[0,1,2,3].concat(...KU([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function cr(){let e=this;function t(o){let r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,d=e.stat_desc.max_length,u,m,p,g,f,x,_=0;for(g=0;g<=15;g++)o.bl_count[g]=0;for(r[o.heap[o.heap_max]*2+1]=0,u=o.heap_max+1;u<573;u++)m=o.heap[u],g=r[r[m*2+1]*2+1]+1,g>d&&(g=d,_++),r[m*2+1]=g,!(m>e.max_code)&&(o.bl_count[g]++,f=0,m>=c&&(f=a[m-c]),x=r[m*2],o.opt_len+=x*(g+f),s&&(o.static_len+=x*(s[m*2+1]+f)));if(_!==0){do{for(g=d-1;o.bl_count[g]===0;)g--;o.bl_count[g]--,o.bl_count[g+1]+=2,o.bl_count[d]--,_-=2}while(_>0);for(g=d;g!==0;g--)for(m=o.bl_count[g];m!==0;)p=o.heap[--u],!(p>e.max_code)&&(r[p*2+1]!=g&&(o.opt_len+=(g-r[p*2+1])*r[p*2],r[p*2+1]=g),m--)}}function n(o,r){let s=0;do s|=o&1,o>>>=1,s<<=1;while(--r>0);return s>>>1}function i(o,r,s){let a=[],c=0,d,u,m;for(d=1;d<=15;d++)a[d]=c=c+s[d-1]<<1;for(u=0;u<=r;u++)m=o[u*2+1],m!==0&&(o[u*2]=n(a[m]++,m))}e.build_tree=function(o){let r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems,c,d,u=-1,m;for(o.heap_len=0,o.heap_max=573,c=0;c=1;c--)o.pqdownheap(r,c);m=a;do c=o.heap[1],o.heap[1]=o.heap[o.heap_len--],o.pqdownheap(r,1),d=o.heap[1],o.heap[--o.heap_max]=c,o.heap[--o.heap_max]=d,r[m*2]=r[c*2]+r[d*2],o.depth[m]=Math.max(o.depth[c],o.depth[d])+1,r[c*2+1]=r[d*2+1]=m,o.heap[1]=m++,o.pqdownheap(r,1);while(o.heap_len>=2);o.heap[--o.heap_max]=o.heap[1],t(o),i(r,e.max_code,o.bl_count)}}cr._length_code=[0,1,2,3,4,5,6,7].concat(...KU([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));cr.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];cr.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];cr.d_code=function(e){return e<256?_fe[e]:_fe[256+(e>>>7)]};cr.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];cr.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];cr.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];cr.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Wa(e,t,n,i,o){let r=this;r.static_tree=e,r.extra_bits=t,r.extra_base=n,r.elems=i,r.max_length=o}var rqe=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],sqe=KU([[144,8],[112,9],[24,7],[8,8]]);Wa.static_ltree=HU(rqe.map((e,t)=>[e,sqe[t]]));var aqe=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],cqe=KU([[30,5]]);Wa.static_dtree=HU(aqe.map((e,t)=>[e,cqe[t]]));Wa.static_l_desc=new Wa(Wa.static_ltree,cr.extra_lbits,257,286,15);Wa.static_d_desc=new Wa(Wa.static_dtree,cr.extra_dbits,0,30,15);Wa.static_bl_desc=new Wa(null,cr.extra_blbits,0,19,7);var lqe=9,dqe=8;function Lf(e,t,n,i,o){let r=this;r.good_length=e,r.max_lazy=t,r.nice_length=n,r.max_chain=i,r.func=o}var Tfe=0,OU=1,iS=2,lh=[new Lf(0,0,0,0,Tfe),new Lf(4,4,8,4,OU),new Lf(4,5,16,8,OU),new Lf(4,6,32,32,OU),new Lf(4,4,16,16,iS),new Lf(8,16,32,32,iS),new Lf(8,16,128,128,iS),new Lf(8,32,128,256,iS),new Lf(32,128,258,1024,iS),new Lf(32,258,258,4096,iS)],kU=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Yu=0,DU=1,av=2,BU=3,uqe=32,wJ=42,YU=113,cv=666,FJ=8,mqe=0,AJ=1,hqe=2,yr=3,zU=258,Xd=zU+yr+1;function Sfe(e,t,n,i){let o=e[t*2],r=e[n*2];return o=3&&B[cr.bl_order[ke]*2+1]===0;ke--);return e.opt_len+=3*(ke+1)+5+5+4,ke}function Ze(ke){e.pending_buf[e.pending++]=ke}function We(ke){Ze(ke&255),Ze(ke>>>8&255)}function Pe(ke){Ze(ke>>8&255),Ze(ke&255&255)}function Ue(ke,ot){let nt,qe=ot;q>16-qe?(nt=ke,j|=nt<>>16-q,q+=qe-16):(j|=ke<=8&&(Ze(j&255),j>>>=8,q-=8)}function $e(){Ue(AJ<<1,3),Pt(256,Wa.static_ltree),Ae(),1+K+10-q<9&&(Ue(AJ<<1,3),Pt(256,Wa.static_ltree),Ae()),K=7}function Qe(ke,ot){let nt,qe,dt;if(e.dist_buf[z]=ke,e.lc_buf[z]=ot&255,z++,ke===0?w[ot*2]++:(ee++,ke--,w[(cr._length_code[ot]+256+1)*2]++,N[cr.d_code(ke)*2]++),!(z&8191)&&b>2){for(nt=z*8,qe=G-C,dt=0;dt<30;dt++)nt+=N[dt*2]*(5+cr.extra_dbits[dt]);if(nt>>>=3,ee8?We(j):q>0&&Ze(j&255),j=0,q=0}function pe(ke,ot,nt){Ut(),K=8,nt&&(We(ot),We(~ot)),e.pending_buf.set(c.subarray(ke,ke+ot),e.pending),e.pending+=ot}function Ve(ke,ot,nt){Ue((mqe<<1)+(nt?1:0),3),pe(ke,ot,!0)}function Dt(ke,ot,nt){let qe,dt,Bt=0;b>0?(k.build_tree(e),O.build_tree(e),Bt=Te(),qe=e.opt_len+3+7>>>3,dt=e.static_len+3+7>>>3,dt<=qe&&(qe=dt)):qe=dt=ot+5,ot+4<=qe&&ke!=-1?Ve(ke,ot,nt):dt==qe?(Ue((AJ<<1)+(nt?1:0),3),je(Wa.static_ltree,Wa.static_dtree)):(Ue((hqe<<1)+(nt?1:0),3),ht(k.max_code+1,O.max_code+1,Bt+1),je(w,N)),Se(),nt&&Ut()}function bt(ke){Dt(C>=0?C:-1,G-C,ke),C=G,t.flush_pending()}function li(){let ke,ot,nt,qe;do{if(qe=d-v-G,qe===0&&G===0&&v===0)qe=r;else if(qe==-1)qe--;else if(G>=r+r-Xd){c.set(c.subarray(r,r+r),0),W-=r,G-=r,C-=r,ke=g,nt=ke;do ot=m[--nt]&65535,m[nt]=ot>=r?ot-r:0;while(--ke!==0);ke=r,nt=ke;do ot=u[--nt]&65535,u[nt]=ot>=r?ot-r:0;while(--ke!==0);qe+=r}if(t.avail_in===0)return;ke=t.read_buf(c,G+v,qe),v+=ke,v>=yr&&(p=c[G]&255,p=(p<<_^c[G+1]&255)&x)}while(vi-5&&(ot=i-5);;){if(v<=1){if(li(),v===0&&ke==0)return Yu;if(v===0)break}if(G+=v,v=0,nt=C+ot,(G===0||G>=nt)&&(v=G-nt,G=nt,bt(!1),t.avail_out===0)||G-C>=r-Xd&&(bt(!1),t.avail_out===0))return Yu}return bt(ke==4),t.avail_out===0?ke==4?av:Yu:ke==4?BU:DU}function Gs(ke){let ot=F,nt=G,qe,dt,Bt=P,Zn=G>r-Xd?G-(r-Xd):0,Zo=I,ir=a,Ua=G+zU,ka=c[nt+Bt-1],oo=c[nt+Bt];P>=E&&(ot>>=2),Zo>v&&(Zo=v);do if(qe=ke,!(c[qe+Bt]!=oo||c[qe+Bt-1]!=ka||c[qe]!=c[nt]||c[++qe]!=c[nt+1])){nt+=2,qe++;do;while(c[++nt]==c[++qe]&&c[++nt]==c[++qe]&&c[++nt]==c[++qe]&&c[++nt]==c[++qe]&&c[++nt]==c[++qe]&&c[++nt]==c[++qe]&&c[++nt]==c[++qe]&&c[++nt]==c[++qe]&&ntBt){if(W=ke,Bt=dt,dt>=Zo)break;ka=c[nt+Bt-1],oo=c[nt+Bt]}}while((ke=u[ke&ir]&65535)>Zn&&--ot!==0);return Bt<=v?Bt:v}function Hs(ke){let ot=0,nt;for(;;){if(v=yr&&(p=(p<<_^c[G+(yr-1)]&255)&x,ot=m[p]&65535,u[G&a]=m[p],m[p]=G),ot!==0&&(G-ot&65535)<=r-Xd&&L!=2&&(V=Gs(ot)),V>=yr)if(nt=Qe(G-W,V-yr),v-=V,V<=M&&v>=yr){V--;do G++,p=(p<<_^c[G+(yr-1)]&255)&x,ot=m[p]&65535,u[G&a]=m[p],m[p]=G;while(--V!==0);G++}else G+=V,V=0,p=c[G]&255,p=(p<<_^c[G+1]&255)&x;else nt=Qe(0,c[G]&255),v--,G++;if(nt&&(bt(!1),t.avail_out===0))return Yu}return bt(ke==4),t.avail_out===0?ke==4?av:Yu:ke==4?BU:DU}function Ur(ke){let ot=0,nt,qe;for(;;){if(v=yr&&(p=(p<<_^c[G+(yr-1)]&255)&x,ot=m[p]&65535,u[G&a]=m[p],m[p]=G),P=V,Z=W,V=yr-1,ot!==0&&P4096)&&(V=yr-1)),P>=yr&&V<=P){qe=G+v-yr,nt=Qe(G-1-Z,P-yr),v-=P-1,P-=2;do++G<=qe&&(p=(p<<_^c[G+(yr-1)]&255)&x,ot=m[p]&65535,u[G&a]=m[p],m[p]=G);while(--P!==0);if(R=0,V=yr-1,G++,nt&&(bt(!1),t.avail_out===0))return Yu}else if(R!==0){if(nt=Qe(0,c[G-1]&255),nt&&bt(!1),G++,v--,t.avail_out===0)return Yu}else R=1,G++,v--}return R!==0&&(nt=Qe(0,c[G-1]&255),R=0),bt(ke==4),t.avail_out===0?ke==4?av:Yu:ke==4?BU:DU}function ts(ke){return ke.total_in=ke.total_out=0,ke.msg=null,e.pending=0,e.pending_out=0,n=YU,o=0,ae(),be(),0}e.deflateInit=function(ke,ot,nt,qe,dt,Bt){return qe||(qe=FJ),dt||(dt=dqe),Bt||(Bt=0),ke.msg=null,ot==-1&&(ot=6),dt<1||dt>lqe||qe!=FJ||nt<9||nt>15||ot<0||ot>9||Bt<0||Bt>2?-2:(ke.dstate=e,s=nt,r=1<9||nt<0||nt>2?-2:(lh[b].func!=lh[ot].func&&ke.total_in!==0&&(qe=ke.deflate(1)),b!=ot&&(b=ot,M=lh[b].max_lazy,E=lh[b].good_length,I=lh[b].nice_length,F=lh[b].max_chain),L=nt,qe)},e.deflateSetDictionary=function(ke,ot,nt){let qe=nt,dt,Bt=0;if(!ot||n!=wJ)return-2;if(qer-Xd&&(qe=r-Xd,Bt=nt-qe),c.set(ot.subarray(Bt,Bt+qe),0),G=qe,C=qe,p=c[0]&255,p=(p<<_^c[1]&255)&x,dt=0;dt<=qe-yr;dt++)p=(p<<_^c[dt+(yr-1)]&255)&x,u[dt&a]=m[p],m[p]=dt;return 0},e.deflate=function(ke,ot){let nt,qe,dt,Bt,Zn;if(ot>4||ot<0)return-2;if(!ke.next_out||!ke.next_in&&ke.avail_in!==0||n==cv&&ot!=4)return ke.msg=kU[4],-2;if(ke.avail_out===0)return ke.msg=kU[7],-5;if(t=ke,Bt=o,o=ot,n==wJ&&(qe=FJ+(s-8<<4)<<8,dt=(b-1&255)>>1,dt>3&&(dt=3),qe|=dt<<6,G!==0&&(qe|=uqe),qe+=31-qe%31,n=YU,Pe(qe)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return o=-1,0}else if(t.avail_in===0&&ot<=Bt&&ot!=4)return t.msg=kU[7],-5;if(n==cv&&t.avail_in!==0)return ke.msg=kU[7],-5;if(t.avail_in!==0||v!==0||ot!=0&&n!=cv){switch(Zn=-1,lh[b].func){case Tfe:Zn=Vo(ot);break;case OU:Zn=Hs(ot);break;case iS:Zn=Ur(ot);break;default:}if((Zn==av||Zn==BU)&&(n=cv),Zn==Yu||Zn==av)return t.avail_out===0&&(o=-1),0;if(Zn==DU){if(ot==1)$e();else if(Ve(0,0,!1),ot==3)for(nt=0;ntn&&(o=n),o===0?0:(i.avail_in-=o,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+o),t),i.next_in_index+=o,i.total_in+=o,o)},flush_pending(){let e=this,t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Vfe(e){let t=this,n=new Cfe,i=pqe(e&&e.chunkSize?e.chunkSize:64*1024),o=0,r=new Uint8Array(i),s=e?e.level:-1;typeof s>"u"&&(s=-1),n.deflateInit(s),n.next_out=r,t.append=function(a,c){let d,u,m=0,p=0,g=0,f=[];if(a.length){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=i,d=n.deflate(o),d!=0)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==i?f.push(new Uint8Array(r)):f.push(r.subarray(0,n.next_out_index))),g+=n.next_out_index,c&&n.next_in_index>0&&n.next_in_index!=m&&(c(n.next_in_index),m=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return f.length>1?(u=new Uint8Array(g),f.forEach(function(x){u.set(x,p),p+=x.length})):u=f[0]?new Uint8Array(f[0]):new Uint8Array,u}},t.flush=function(){let a,c,d=0,u=0,m=[];do{if(n.next_out_index=0,n.avail_out=i,a=n.deflate(4),a!=1&&a!=0)throw new Error("deflating: "+n.msg);i-n.avail_out>0&&m.push(r.slice(0,n.next_out_index)),u+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),c=new Uint8Array(u),m.forEach(function(p){c.set(p,d),d+=p.length}),c}}function pqe(e){return e+5*(Math.floor(e/16383)+1)}var ndi=S(T(),1);var Pd=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Yfe=1440,bqe=0,gqe=4,yqe=9,xqe=5,_qe=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Sqe=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Tqe=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Cqe=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Vqe=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Zqe=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Qg=15;function kJ(){let e=this,t,n,i,o,r,s;function a(d,u,m,p,g,f,x,_,C,V,Z){let R,G,W,v,P,F,M,b,L,E,I,w,N,B,k;E=0,P=m;do i[d[u+E]]++,E++,P--;while(P!==0);if(i[0]==m)return x[0]=-1,_[0]=0,0;for(b=_[0],F=1;F<=Qg&&i[F]===0;F++);for(M=F,bP&&(b=P),_[0]=b,B=1<w+b;){if(v++,w+=b,k=W-w,k=k>b?b:k,(G=1<<(F=M-w))>R+1&&(G-=R+1,N=M,FYfe)return-3;r[v]=I=V[0],V[0]+=k,v!==0?(s[v]=P,o[0]=F,o[1]=b,F=P>>>w-b,o[2]=I-r[v-1]-F,C.set(o,(r[v-1]+F)*3)):x[0]=I}for(o[1]=M-w,E>=m?o[0]=192:Z[E]>>w;F>>=1)P^=F;for(P^=F,L=(1<257?(V==-3?C.msg="oversubscribed distance tree":V==-5?(C.msg="incomplete distance tree",V=-3):V!=-4&&(C.msg="empty distance tree with lengths",V=-3),V):0)}}kJ.inflate_trees_fixed=function(e,t,n,i){return e[0]=yqe,t[0]=xqe,n[0]=_qe,i[0]=Sqe,0};var JU=0,Zfe=1,Lfe=2,Rfe=3,Gfe=4,Efe=5,Wfe=6,MJ=7,Ife=8,QU=9;function Lqe(){let e=this,t,n=0,i,o=0,r=0,s=0,a=0,c=0,d=0,u=0,m,p=0,g,f=0;function x(_,C,V,Z,R,G,W,v){let P,F,M,b,L,E,I,w,N,B,k,O,U,J,z,ee;I=v.next_in_index,w=v.avail_in,L=W.bitb,E=W.bitk,N=W.write,B=N>=F[ee+1],E-=F[ee+1],W.win[N++]=F[ee+2],B--;continue}do{if(L>>=F[ee+1],E-=F[ee+1],b&16){for(b&=15,U=F[ee+2]+(L&Pd[b]),L>>=b,E-=b;E<15;)w--,L|=(v.read_byte(I++)&255)<>=F[ee+1],E-=F[ee+1],b&16){for(b&=15;E>=b,E-=b,B-=U,N>=J)z=N-J,N-z>0&&2>N-z?(W.win[N++]=W.win[z++],W.win[N++]=W.win[z++],U-=2):(W.win.set(W.win.subarray(z,z+2),N),N+=2,z+=2,U-=2);else{z=N-J;do z+=W.end;while(z<0);if(b=W.end-z,U>b){if(U-=b,N-z>0&&b>N-z)do W.win[N++]=W.win[z++];while(--b!==0);else W.win.set(W.win.subarray(z,z+b),N),N+=b,z+=b,b=0;z=0}}if(N-z>0&&U>N-z)do W.win[N++]=W.win[z++];while(--U!==0);else W.win.set(W.win.subarray(z,z+U),N),N+=U,z+=U,U=0;break}else if(!(b&64))P+=F[ee+2],P+=L&Pd[b],ee=(M+P)*3,b=F[ee];else return v.msg="invalid distance code",U=v.avail_in-w,U=E>>3>3:U,w+=U,I-=U,E-=U<<3,W.bitb=L,W.bitk=E,v.avail_in=w,v.total_in+=I-v.next_in_index,v.next_in_index=I,W.write=N,-3;while(!0);break}if(b&64)return b&32?(U=v.avail_in-w,U=E>>3>3:U,w+=U,I-=U,E-=U<<3,W.bitb=L,W.bitk=E,v.avail_in=w,v.total_in+=I-v.next_in_index,v.next_in_index=I,W.write=N,1):(v.msg="invalid literal/length code",U=v.avail_in-w,U=E>>3>3:U,w+=U,I-=U,E-=U<<3,W.bitb=L,W.bitk=E,v.avail_in=w,v.total_in+=I-v.next_in_index,v.next_in_index=I,W.write=N,-3);if(P+=F[ee+2],P+=L&Pd[b],ee=(M+P)*3,(b=F[ee])===0){L>>=F[ee+1],E-=F[ee+1],W.win[N++]=F[ee+2],B--;break}}while(!0)}while(B>=258&&w>=10);return U=v.avail_in-w,U=E>>3>3:U,w+=U,I-=U,E-=U<<3,W.bitb=L,W.bitk=E,v.avail_in=w,v.total_in+=I-v.next_in_index,v.next_in_index=I,W.write=N,0}e.init=function(_,C,V,Z,R,G){t=JU,d=_,u=C,m=V,p=Z,g=R,f=G,i=null},e.proc=function(_,C,V){let Z,R,G,W=0,v=0,P=0,F,M,b,L;for(P=C.next_in_index,F=C.avail_in,W=_.bitb,v=_.bitk,M=_.write,b=M<_.read?_.read-M-1:_.end-M;;)switch(t){case JU:if(b>=258&&F>=10&&(_.bitb=W,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=M,V=x(d,u,m,p,g,f,_,C),P=C.next_in_index,F=C.avail_in,W=_.bitb,v=_.bitk,M=_.write,b=M<_.read?_.read-M-1:_.end-M,V!=0)){t=V==1?MJ:QU;break}r=d,i=m,o=p,t=Zfe;case Zfe:for(Z=r;v>>=i[R+1],v-=i[R+1],G=i[R],G===0){s=i[R+2],t=Wfe;break}if(G&16){a=G&15,n=i[R+2],t=Lfe;break}if(!(G&64)){r=G,o=R/3+i[R+2];break}if(G&32){t=MJ;break}return t=QU,C.msg="invalid literal/length code",V=-3,_.bitb=W,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=M,_.inflate_flush(C,V);case Lfe:for(Z=a;v>=Z,v-=Z,r=u,i=g,o=f,t=Rfe;case Rfe:for(Z=r;v>=i[R+1],v-=i[R+1],G=i[R],G&16){a=G&15,c=i[R+2],t=Gfe;break}if(!(G&64)){r=G,o=R/3+i[R+2];break}return t=QU,C.msg="invalid distance code",V=-3,_.bitb=W,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=M,_.inflate_flush(C,V);case Gfe:for(Z=a;v>=Z,v-=Z,t=Efe;case Efe:for(L=M-c;L<0;)L+=_.end;for(;n!==0;){if(b===0&&(M==_.end&&_.read!==0&&(M=0,b=M<_.read?_.read-M-1:_.end-M),b===0&&(_.write=M,V=_.inflate_flush(C,V),M=_.write,b=M<_.read?_.read-M-1:_.end-M,M==_.end&&_.read!==0&&(M=0,b=M<_.read?_.read-M-1:_.end-M),b===0)))return _.bitb=W,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=M,_.inflate_flush(C,V);_.win[M++]=_.win[L++],b--,L==_.end&&(L=0),n--}t=JU;break;case Wfe:if(b===0&&(M==_.end&&_.read!==0&&(M=0,b=M<_.read?_.read-M-1:_.end-M),b===0&&(_.write=M,V=_.inflate_flush(C,V),M=_.write,b=M<_.read?_.read-M-1:_.end-M,M==_.end&&_.read!==0&&(M=0,b=M<_.read?_.read-M-1:_.end-M),b===0)))return _.bitb=W,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=M,_.inflate_flush(C,V);V=0,_.win[M++]=s,b--,t=JU;break;case MJ:if(v>7&&(v-=8,F++,P--),_.write=M,V=_.inflate_flush(C,V),M=_.write,b=M<_.read?_.read-M-1:_.end-M,_.read!=_.write)return _.bitb=W,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=M,_.inflate_flush(C,V);t=Ife;case Ife:return V=1,_.bitb=W,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=M,_.inflate_flush(C,V);case QU:return V=-3,_.bitb=W,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=M,_.inflate_flush(C,V);default:return V=-2,_.bitb=W,_.bitk=v,C.avail_in=F,C.total_in+=P-C.next_in_index,C.next_in_index=P,_.write=M,_.inflate_flush(C,V)}},e.free=function(){}}var Xfe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],oV=0,NJ=1,Pfe=2,vfe=3,wfe=4,Ffe=5,jU=6,qU=7,Afe=8,oS=9;function Rqe(e,t){let n=this,i=oV,o=0,r=0,s=0,a,c=[0],d=[0],u=new Lqe,m=0,p=new Int32Array(Yfe*3),g=0,f=new kJ;n.bitk=0,n.bitb=0,n.win=new Uint8Array(t),n.end=t,n.read=0,n.write=0,n.reset=function(x,_){_&&(_[0]=g),i==jU&&u.free(x),i=oV,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=function(x,_){let C,V,Z;return V=x.next_out_index,Z=n.read,C=(Z<=n.write?n.write:n.end)-Z,C>x.avail_out&&(C=x.avail_out),C!==0&&_==-5&&(_=0),x.avail_out-=C,x.total_out+=C,x.next_out.set(n.win.subarray(Z,Z+C),V),V+=C,Z+=C,Z==n.end&&(Z=0,n.write==n.end&&(n.write=0),C=n.write-Z,C>x.avail_out&&(C=x.avail_out),C!==0&&_==-5&&(_=0),x.avail_out-=C,x.total_out+=C,x.next_out.set(n.win.subarray(Z,Z+C),V),V+=C,Z+=C),x.next_out_index=V,n.read=Z,_},n.proc=function(x,_){let C,V,Z,R,G,W,v,P;for(R=x.next_in_index,G=x.avail_in,V=n.bitb,Z=n.bitk,W=n.write,v=W>>1){case 0:V>>>=3,Z-=3,C=Z&7,V>>>=C,Z-=C,i=NJ;break;case 1:F=[],M=[],b=[[]],L=[[]],kJ.inflate_trees_fixed(F,M,b,L),u.init(F[0],M[0],b[0],0,L[0],0),V>>>=3,Z-=3,i=jU;break;case 2:V>>>=3,Z-=3,i=vfe;break;case 3:return V>>>=3,Z-=3,i=oS,x.msg="invalid block type",_=-3,n.bitb=V,n.bitk=Z,x.avail_in=G,x.total_in+=R-x.next_in_index,x.next_in_index=R,n.write=W,n.inflate_flush(x,_)}break;case NJ:for(;Z<32;){if(G!==0)_=0;else return n.bitb=V,n.bitk=Z,x.avail_in=G,x.total_in+=R-x.next_in_index,x.next_in_index=R,n.write=W,n.inflate_flush(x,_);G--,V|=(x.read_byte(R++)&255)<>>16&65535)!=(V&65535))return i=oS,x.msg="invalid stored block lengths",_=-3,n.bitb=V,n.bitk=Z,x.avail_in=G,x.total_in+=R-x.next_in_index,x.next_in_index=R,n.write=W,n.inflate_flush(x,_);o=V&65535,V=Z=0,i=o!==0?Pfe:m!==0?qU:oV;break;case Pfe:if(G===0||v===0&&(W==n.end&&n.read!==0&&(W=0,v=WG&&(C=G),C>v&&(C=v),n.win.set(x.read_buf(R,C),W),R+=C,G-=C,W+=C,v-=C,(o-=C)!==0)break;i=m!==0?qU:oV;break;case vfe:for(;Z<14;){if(G!==0)_=0;else return n.bitb=V,n.bitk=Z,x.avail_in=G,x.total_in+=R-x.next_in_index,x.next_in_index=R,n.write=W,n.inflate_flush(x,_);G--,V|=(x.read_byte(R++)&255)<29||(C>>5&31)>29)return i=oS,x.msg="too many length or distance symbols",_=-3,n.bitb=V,n.bitk=Z,x.avail_in=G,x.total_in+=R-x.next_in_index,x.next_in_index=R,n.write=W,n.inflate_flush(x,_);if(C=258+(C&31)+(C>>5&31),!a||a.length>>=14,Z-=14,s=0,i=wfe;case wfe:for(;s<4+(r>>>10);){for(;Z<3;){if(G!==0)_=0;else return n.bitb=V,n.bitk=Z,x.avail_in=G,x.total_in+=R-x.next_in_index,x.next_in_index=R,n.write=W,n.inflate_flush(x,_);G--,V|=(x.read_byte(R++)&255)<>>=3,Z-=3}for(;s<19;)a[Xfe[s++]]=0;if(c[0]=7,C=f.inflate_trees_bits(a,c,d,p,x),C!=0)return _=C,_==-3&&(a=null,i=oS),n.bitb=V,n.bitk=Z,x.avail_in=G,x.total_in+=R-x.next_in_index,x.next_in_index=R,n.write=W,n.inflate_flush(x,_);s=0,i=Ffe;case Ffe:for(;C=r,!(s>=258+(C&31)+(C>>5&31));){let B,k;for(C=c[0];Z>>=C,Z-=C,a[s++]=k;else{for(P=k==18?7:k-14,B=k==18?11:3;Z>>=C,Z-=C,B+=V&Pd[P],V>>>=P,Z-=P,P=s,C=r,P+B>258+(C&31)+(C>>5&31)||k==16&&P<1)return a=null,i=oS,x.msg="invalid bit length repeat",_=-3,n.bitb=V,n.bitk=Z,x.avail_in=G,x.total_in+=R-x.next_in_index,x.next_in_index=R,n.write=W,n.inflate_flush(x,_);k=k==16?a[P-1]:0;do a[P++]=k;while(--B!==0);s=P}}if(d[0]=-1,E=[],I=[],w=[],N=[],E[0]=9,I[0]=6,C=r,C=f.inflate_trees_dynamic(257+(C&31),1+(C>>5&31),a,E,I,w,N,p,x),C!=0)return C==-3&&(a=null,i=oS),_=C,n.bitb=V,n.bitk=Z,x.avail_in=G,x.total_in+=R-x.next_in_index,x.next_in_index=R,n.write=W,n.inflate_flush(x,_);u.init(E[0],I[0],p,w[0],p,N[0]),i=jU;case jU:if(n.bitb=V,n.bitk=Z,x.avail_in=G,x.total_in+=R-x.next_in_index,x.next_in_index=R,n.write=W,(_=u.proc(n,x,_))!=1)return n.inflate_flush(x,_);if(_=0,u.free(x),R=x.next_in_index,G=x.avail_in,V=n.bitb,Z=n.bitk,W=n.write,v=W15?(e.inflateEnd(n),-2):(e.wbits=i,n.istate.blocks=new Rqe(n,1<>4)+8>s.wbits){s.mode=jg,n.msg="invalid win size",s.marker=5;break}s.mode=Mfe;case Mfe:if(n.avail_in===0)return o;if(o=i,n.avail_in--,n.total_in++,r=n.read_byte(n.next_in_index++)&255,((s.method<<8)+r)%31!==0){s.mode=jg,n.msg="incorrect header check",s.marker=5;break}if(!(r&Gqe)){s.mode=lv;break}s.mode=Nfe;case Nfe:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,s.mode=Ufe;case Ufe:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,s.mode=kfe;case kfe:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,s.mode=Dfe;case Dfe:return n.avail_in===0?o:(o=i,n.avail_in--,n.total_in++,s.need+=n.read_byte(n.next_in_index++)&255,s.mode=UJ,2);case UJ:return s.mode=jg,n.msg="need dictionary",s.marker=0,-2;case lv:if(o=s.blocks.proc(n,o),o==-3){s.mode=jg,s.marker=0;break}if(o==0&&(o=i),o!=1)return o;o=i,s.blocks.reset(n,s.was),s.mode=Bfe;case Bfe:return n.avail_in=0,1;case jg:return-3;default:return-2}},e.inflateSetDictionary=function(n,i,o){let r=0,s=o;if(!n||!n.istate||n.istate.mode!=UJ)return-2;let a=n.istate;return s>=1<0&&n.next_in_index!=p&&(c(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return d.length>1?(m=new Uint8Array(f),d.forEach(function(x){m.set(x,g),g+=x.length})):m=d[0]?new Uint8Array(d[0]):new Uint8Array,m}},t.flush=function(){n.inflateEnd()}}var udi=S(T(),1);var odi=S(T(),1);var rV="/",DJ=new Date(2107,11,31),BJ=new Date(1980,0,1),Ki=void 0,vd="undefined",Fb="function";var sdi=S(T(),1);var dv=class{constructor(t){return class extends TransformStream{constructor(n,i){let o=new t(i);super({transform(r,s){s.enqueue(o.append(r))},flush(r){let s=o.flush();s&&r.enqueue(s)}})}}}};var Pqe=64,Kfe=2;try{typeof navigator!=vd&&navigator.hardwareConcurrency&&(Kfe=navigator.hardwareConcurrency)}catch{}var vqe={chunkSize:512*1024,maxWorkers:Kfe,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Ki,CompressionStreamNative:typeof CompressionStream!=vd&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=vd&&DecompressionStream},$g=Object.assign({},vqe);function uv(){return $g}function $U(e){return Math.max(e.chunkSize,Pqe)}function sV(e){let{baseURL:t,chunkSize:n,maxWorkers:i,terminateWorkerTimeout:o,useCompressionStream:r,useWebWorkers:s,Deflate:a,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:m}=e;if(qg("baseURL",t),qg("chunkSize",n),qg("maxWorkers",i),qg("terminateWorkerTimeout",o),qg("useCompressionStream",r),qg("useWebWorkers",s),a&&($g.CompressionStream=new dv(a)),c&&($g.DecompressionStream=new dv(c)),qg("CompressionStream",d),qg("DecompressionStream",u),m!==Ki){let{deflate:p,inflate:g}=m;if((p||g)&&($g.workerScripts||($g.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");$g.workerScripts.deflate=p}if(g){if(!Array.isArray(g))throw new Error("workerScripts.inflate must be an array");$g.workerScripts.inflate=g}}}function qg(e,t){t!==Ki&&($g[e]=t)}var hdi=S(T(),1);var rui=S(T(),1);var Qdi=S(T(),1);var Kdi=S(T(),1);var ydi=S(T(),1);var pdi=S(T(),1),Hfe=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=t>>>1^3988292384:t=t>>>1;Hfe[e]=t}var Ab=class{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let i=0,o=t.length|0;i>>8^Hfe[(n^t[i])&255];this.crc=n}get(){return~this.crc}};var mv=class extends TransformStream{constructor(){let t,n=new Ab;super({transform(i,o){n.append(i),o.enqueue(i)},flush(){let i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,n.get()),t.value=i}}),t=this}};var Adi=S(T(),1);var Sdi=S(T(),1);function aV(e){if(typeof TextEncoder==vd){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=el.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,i){for(i===void 0&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(t===0)return i.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;let o=e.length?e[e.length-1]:0,r=el.getPartial(o);return i.push(el.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},hv={bytes:{fromBits(e){let n=el.bitLength(e)/8,i=new Uint8Array(n),o;for(let r=0;r>>24,o<<=8;return i},toBits(e){let t=[],n,i=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");let r=new Uint32Array(n),s=0;for(let a=t.blockSize+i-(t.blockSize+i&t.blockSize-1);a<=o;a+=t.blockSize)t._block(r.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){let e=this,t=e._buffer,n=e._h;t=el.concat(t,[el.partial(1,1)]);for(let i=t.length+2;i&15;i++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){if(e<=19)return t&n|~t&i;if(e<=39)return t^n^i;if(e<=59)return t&n|t&i|n&i;if(e<=79)return t^n^i}_S(e,t){return t<>>32-e}_block(e){let t=this,n=t._h,i=Array(80);for(let d=0;d<16;d++)i[d]=e[d];let o=n[0],r=n[1],s=n[2],a=n[3],c=n[4];for(let d=0;d<=79;d++){d>=16&&(i[d]=t._S(1,i[d-3]^i[d-8]^i[d-14]^i[d-16]));let u=t._S(5,o)+t._f(d,r,s,a)+c+i[d]+t._key[Math.floor(d/20)]|0;c=a,a=s,s=t._S(30,r),r=o,o=u}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0}};var YJ={};YJ.aes=class{constructor(e){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let n=t._tables[0][4],i=t._tables[1],o=e.length,r,s,a,c=1;if(o!==4&&o!==6&&o!==8)throw new Error("invalid aes key size");for(t._key=[s=e.slice(0),a=[]],r=o;r<4*o+28;r++){let d=s[r-1];(r%o===0||o===8&&r%o===4)&&(d=n[d>>>24]<<24^n[d>>16&255]<<16^n[d>>8&255]<<8^n[d&255],r%o===0&&(d=d<<8^d>>>24^c<<24,c=c<<1^(c>>7)*283)),s[r]=s[r-o]^d}for(let d=0;r;d++,r--){let u=s[d&3?r:r-4];r<=4||d<4?a[d]=u:a[d]=i[0][n[u>>>24]]^i[1][n[u>>16&255]]^i[2][n[u>>8&255]]^i[3][n[u&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],o=[],r=[],s,a,c,d;for(let u=0;u<256;u++)r[(o[u]=u<<1^(u>>7)*283)^u]=u;for(let u=s=0;!n[u];u^=a||1,s=r[s]||1){let m=s^s<<1^s<<2^s<<3^s<<4;m=m>>8^m&255^99,n[u]=m,i[m]=u,d=o[c=o[a=o[u]]];let p=d*16843009^c*65537^a*257^u*16843008,g=o[m]*257^m*16843008;for(let f=0;f<4;f++)e[f][u]=g=g<<24^g>>>8,t[f][m]=p=p<<24^p>>>8}for(let u=0;u<5;u++)e[u]=e[u].slice(0),t[u]=t[u].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");let n=this._key[t],i=n.length/4-2,o=[0,0,0,0],r=this._tables[t],s=r[0],a=r[1],c=r[2],d=r[3],u=r[4],m=e[0]^n[0],p=e[t?3:1]^n[1],g=e[2]^n[2],f=e[t?1:3]^n[3],x=4,_,C,V;for(let Z=0;Z>>24]^a[p>>16&255]^c[g>>8&255]^d[f&255]^n[x],C=s[p>>>24]^a[g>>16&255]^c[f>>8&255]^d[m&255]^n[x+1],V=s[g>>>24]^a[f>>16&255]^c[m>>8&255]^d[p&255]^n[x+2],f=s[f>>>24]^a[m>>16&255]^c[p>>8&255]^d[g&255]^n[x+3],x+=4,m=_,p=C,g=V;for(let Z=0;Z<4;Z++)o[t?3&-Z:Z]=u[m>>>24]<<24^u[p>>16&255]<<16^u[g>>8&255]<<8^u[f&255]^n[x++],_=m,m=p,p=g,g=f,f=_;return o}};var Qfe={getRandomValues(e){let t=new Uint32Array(e.buffer),n=i=>{let o=987654321,r=4294967295;return function(){return o=36969*(o&65535)+(o>>16)&r,i=18e3*(i&65535)+(i>>16)&r,(((o<<16)+i&r)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let i=0,o;i>24&255)===255){let t=e>>16&255,n=e>>8&255,i=e&255;t===255?(t=0,n===255?(n=0,i===255?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];let o=el.bitLength(t);for(let r=0;r>5)+1<<2,r,s,a,c,d,u=new ArrayBuffer(o),m=new DataView(u),p=0,g=el;for(t=hv.bytes.toBits(t),d=1;p<(o||1);d++){for(r=s=e.encrypt(g.concat(t,[d])),a=1;ao&&(e=new n().update(e).finalize());for(let r=0;rthis.resolveReady=s),password:ipe(t,n),signed:i,strength:o-1,pending:new Uint8Array})},async transform(s,a){let c=this,{password:d,strength:u,resolveReady:m,ready:p}=c;d?(await Oqe(c,u,d,Ou(s,0,pv[u]+2)),s=Ou(s,pv[u]+2),r?a.error(new Error(Mb)):m()):await p;let g=new Uint8Array(s.length-ny-(s.length-ny)%cV);a.enqueue(tpe(c,s,g,0,ny,!0))},async flush(s){let{signed:a,ctr:c,hmac:d,pending:u,ready:m}=this;if(d&&c){await m;let p=Ou(u,0,u.length-ny),g=Ou(u,u.length-ny),f=new Uint8Array;if(p.length){let x=gv(Rf,p);d.update(x);let _=c.update(x);f=bv(Rf,_)}if(a){let x=Ou(bv(Rf,d.digest()),0,ny);for(let _=0;_this.resolveReady=r),password:ipe(t,n),strength:i-1,pending:new Uint8Array})},async transform(r,s){let a=this,{password:c,strength:d,resolveReady:u,ready:m}=a,p=new Uint8Array;c?(p=await zqe(a,d,c),u()):await m;let g=new Uint8Array(p.length+r.length-r.length%cV);g.set(p,0),s.enqueue(tpe(a,r,g,p.length,0))},async flush(r){let{ctr:s,hmac:a,pending:c,ready:d}=this;if(a&&s){await d;let u=new Uint8Array;if(c.length){let m=s.update(gv(Rf,c));a.update(m),u=bv(Rf,m)}o.signature=bv(Rf,a.digest()).slice(0,ny),r.enqueue(KJ(u,o.signature))}}}),o=this}};function tpe(e,t,n,i,o,r){let{ctr:s,hmac:a,pending:c}=e,d=t.length-o;c.length&&(t=KJ(c,t),n=Jqe(n,d-d%cV));let u;for(u=0;u<=d-cV;u+=cV){let m=gv(Rf,Ou(t,u,u+cV));r&&a.update(m);let p=s.update(m);r||a.update(p),n.set(bv(Rf,p),u+i)}return e.pending=Ou(t,u),n}async function Oqe(e,t,n,i){let o=await npe(e,t,n,Ou(i,0,pv[t])),r=Ou(i,pv[t]);if(o[0]!=r[0]||o[1]!=r[1])throw new Error(ty)}async function zqe(e,t,n){let i=ek(new Uint8Array(pv[t])),o=await npe(e,t,n,i);return KJ(i,o)}async function npe(e,t,n,i){e.password=null;let o=await Kqe(Fqe,n,Nqe,!1,Uqe),r=await Hqe(Object.assign({salt:i},zJ),o,8*(fv[t]*2+2)),s=new Uint8Array(r),a=gv(Rf,Ou(s,0,fv[t])),c=gv(Rf,Ou(s,fv[t],fv[t]*2)),d=Ou(s,fv[t]*2);return Object.assign(e,{keys:{key:a,authentication:c,passwordVerification:d},ctr:new Bqe(new Dqe(a),Array.from(kqe)),hmac:new Yqe(c)}),d}async function Kqe(e,t,n,i,o){if(jfe)try{return await yv.importKey(e,t,n,i,o)}catch{return jfe=!1,ey.importKey(t)}else return ey.importKey(t)}async function Hqe(e,t,n){if(qfe)try{return await yv.deriveBits(e,t,n)}catch{return qfe=!1,ey.pbkdf2(t,e.salt,zJ.iterations,n)}else return ey.pbkdf2(t,e.salt,zJ.iterations,n)}function ipe(e,t){return t===Ki?aV(e):t}function KJ(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Jqe(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function Ou(e,t,n){return e.subarray(t,n)}function bv(e,t){return e.fromBits(t)}function gv(e,t){return e.toBits(t)}var kdi=S(T(),1);var lV=12,ok=class extends TransformStream{constructor({password:t,passwordVerification:n,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),ape(this,t)},transform(o,r){let s=this;if(s.password){let a=ope(s,o.subarray(0,lV));if(s.password=null,a[lV-1]!=s.passwordVerification)throw new Error(ty);o=o.subarray(lV)}i?r.error(new Error(Mb)):r.enqueue(ope(s,o))}})}},rk=class extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),ape(this,t)},transform(i,o){let r=this,s,a;if(r.password){r.password=null;let c=ek(new Uint8Array(lV));c[lV-1]=r.passwordVerification,s=new Uint8Array(i.length+c.length),s.set(rpe(r,c),0),a=lV}else s=new Uint8Array(i.length),a=0;s.set(rpe(r,i),a),o.enqueue(s)}})}};function ope(e,t){let n=new Uint8Array(t.length);for(let i=0;i>>24]),o=~e.crcKey2.get(),e.keys=[n,i,o]}function cpe(e){let t=e.keys[2]|2;return lpe(Math.imul(t,t^1)>>>8)}function lpe(e){return e&255}function spe(e){return e&4294967295}var dpe="deflate-raw",sk=class extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:i,CompressionStreamNative:o}){super({});let{compressed:r,encrypted:s,useCompressionStream:a,zipCrypto:c,signed:d,level:u}=t,m=this,p,g,f=upe(super.readable);(!s||c)&&d&&(p=new mv,f=Gf(f,p)),r&&(f=hpe(f,a,{level:u,chunkSize:n},o,i)),s&&(c?f=Gf(f,new rk(t)):(g=new nk(t),f=Gf(f,g))),mpe(m,f,()=>{let x;s&&!c&&(x=g.signature),(!s||c)&&d&&(x=new DataView(p.value.buffer).getUint32(0)),m.signature=x})}},ak=class extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:i,DecompressionStreamNative:o}){super({});let{zipCrypto:r,encrypted:s,signed:a,signature:c,compressed:d,useCompressionStream:u}=t,m,p,g=upe(super.readable);s&&(r?g=Gf(g,new ok(t)):(p=new tk(t),g=Gf(g,p))),d&&(g=hpe(g,u,{chunkSize:n},o,i)),(!s||r)&&a&&(m=new mv,g=Gf(g,m)),mpe(this,g,()=>{if((!s||r)&&a){let f=new DataView(m.value.buffer);if(c!=f.getUint32(0,!1))throw new Error(rS)}})}};function upe(e){return Gf(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function mpe(e,t,n){t=Gf(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function hpe(e,t,n,i,o){try{let r=t&&i?i:o;e=Gf(e,new r(dpe,n))}catch{if(t)try{e=Gf(e,new o(dpe,n))}catch{return e}else return e}return e}function Gf(e,t){return e.pipeThrough(t)}var fpe="message",ppe="start",bpe="pull",JJ="data",gpe="ack",QJ="close",dk="deflate",uk="inflate";var ck=class extends TransformStream{constructor(t,n){super({});let i=this,{codecType:o}=t,r;o.startsWith(dk)?r=sk:o.startsWith(uk)&&(r=ak);let s=0,a=0,c=new r(t,n),d=super.readable,u=new TransformStream({transform(p,g){p&&p.length&&(a+=p.length,g.enqueue(p))},flush(){Object.assign(i,{inputSize:a})}}),m=new TransformStream({transform(p,g){p&&p.length&&(s+=p.length,g.enqueue(p))},flush(){let{signature:p}=c;Object.assign(i,{signature:p,outputSize:s,inputSize:a})}});Object.defineProperty(i,"readable",{get(){return d.pipeThrough(u).pipeThrough(c).pipeThrough(m)}})}},lk=class extends TransformStream{constructor(t){let n;super({transform:i,flush(o){n&&n.length&&o.enqueue(n)}});function i(o,r){if(n){let s=new Uint8Array(n.length+o.length);s.set(n),s.set(o,n.length),o=s,n=null}o.length>t?(r.enqueue(o.slice(0,t)),i(o.slice(t),r)):n=o}}};var eui=S(T(),1);var _pe=typeof Worker!=vd;var dV=class{constructor(t,{readable:n,writable:i},{options:o,config:r,streamOptions:s,useWebWorkers:a,transferStreams:c,scripts:d},u){let{signal:m}=s;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new lk(r.chunkSize)).pipeThrough(new qJ(n,s),{signal:m}),writable:i,options:Object.assign({},o),scripts:d,transferStreams:c,terminate(){return new Promise(p=>{let{worker:g,busy:f}=t;g?(f?t.resolveTerminated=p:(g.terminate(),p()),t.interface=null):p()})},onTaskFinished(){let{resolveTerminated:p}=t;p&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),p()),t.busy=!1,u(t)}}),(a&&_pe?Qqe:Spe)(t,r)}},qJ=class extends TransformStream{constructor(t,{onstart:n,onprogress:i,size:o,onend:r}){let s=0;super({async start(){n&&await jJ(n,o)},async transform(a,c){s+=a.length,i&&await jJ(i,s,o),c.enqueue(a)},async flush(){t.size=s,r&&await jJ(r,s)}})}};async function jJ(e,...t){try{await e(...t)}catch{}}function Spe(e,t){return{run:()=>jqe(e,t)}}function Qqe(e,t){let{baseURL:n,chunkSize:i}=t;if(!e.interface){let o;try{o=e$e(e.scripts[0],n,e)}catch{return _pe=!1,Spe(e,t)}Object.assign(e,{worker:o,interface:{run:()=>qqe(e,{chunkSize:i})}})}return e.interface}async function jqe({options:e,readable:t,writable:n,onTaskFinished:i},o){try{let r=new ck(e,o);await t.pipeThrough(r).pipeTo(n,{preventClose:!0,preventAbort:!0});let{signature:s,inputSize:a,outputSize:c}=r;return{signature:s,inputSize:a,outputSize:c}}finally{i()}}async function qqe(e,t){let n,i,o=new Promise((p,g)=>{n=p,i=g});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:i,result:o});let{readable:r,options:s,scripts:a}=e,{writable:c,closed:d}=$qe(e.writable),u=mk({type:ppe,scripts:a.slice(1),options:s,config:t,readable:r,writable:c},e);u||Object.assign(e,{reader:r.getReader(),writer:c.getWriter()});let m=await o;return u||await c.getWriter().close(),await d,m}function $qe(e){let t,n=new Promise(o=>t=o);return{writable:new WritableStream({async write(o){let r=e.getWriter();await r.ready,await r.write(o),r.releaseLock()},close(){t()},abort(o){return e.getWriter().abort(o)}}),closed:n}}var ype=!0,xpe=!0;function e$e(e,t,n){let i={type:"module"},o,r;typeof e==Fb&&(e=e());try{o=new URL(e,t)}catch{o=e}if(ype)try{r=new Worker(o)}catch{ype=!1,r=new Worker(o,i)}else r=new Worker(o,i);return r.addEventListener(fpe,s=>t$e(s,n)),r}function mk(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:o}){try{let{value:r,readable:s,writable:a}=e,c=[];if(r&&(r.byteLength!C.busy);if(_)return Cpe(_),new dV(_,e,t,x);if(sS.length$J.push({resolve:C,stream:e,workerOptions:t}))}function x(_){if($J.length){let[{resolve:C,stream:V,workerOptions:Z}]=$J.splice(0,1);C(new dV(_,V,Z,x))}else _.worker?(Cpe(_),n$e(_,t)):sS=sS.filter(C=>C!=_)}}function n$e(e,t){let{config:n}=t,{terminateWorkerTimeout:i}=n;Number.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{sS=sS.filter(o=>o!=e);try{await e.terminate()}catch{}},i))}function Cpe(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}var lui=S(T(),1);var i$e="Writer iterator completed too soon",o$e="text/plain";var r$e="Content-Type";var s$e=64*1024,nQ="writable",uV=class{constructor(){this.size=0}init(){this.initialized=!0}},fk=class extends uV{get readable(){let t=this,{chunkSize:n=s$e}=t,i=new ReadableStream({start(){this.chunkOffset=0},async pull(o){let{offset:r=0,size:s,diskNumberStart:a}=i,{chunkOffset:c}=this;o.enqueue(await Ia(t,r+c,Math.min(n,s-c),a)),c+n>s?o.close():this.chunkOffset+=n}});return i}},eQ=class extends uV{constructor(){super();let t=this,n=new WritableStream({write(i){return t.writeUint8Array(i)}});Object.defineProperty(t,nQ,{get(){return n}})}writeUint8Array(){}};var pk=class extends eQ{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){let n=this,i=0,o=n.pending,r=n.pending.length;for(n.pending="",i=0;i2?n.data+=btoa(o):n.pending=o}getData(){return this.data+btoa(this.pending)}},Nb=class extends fk{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){let i=this,o=t+n,s=await(t||on&&(s=s.slice(t,o)),new Uint8Array(s)}},xv=class extends uV{constructor(t){super();let n=this,i=new TransformStream,o=[];t&&o.push([r$e,t]),Object.defineProperty(n,nQ,{get(){return i.writable}}),n.blob=new Response(i.readable,{headers:o}).blob()}getData(){return this.blob}},bk=class extends Nb{constructor(t){super(new Blob([t],{type:o$e}))}},gk=class extends xv{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){let{encoding:t,utf8:n}=this,i=await super.getData();if(i.text&&n)return i.text();{let o=new FileReader;return new Promise((r,s)=>{Object.assign(o,{onload:({target:a})=>r(a.result),onerror:()=>s(o.error)}),o.readAsText(i,t)})}}};var tQ=class extends fk{constructor(t){super(),this.readers=t}async init(){let t=this,{readers:n}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(n.map(async(i,o)=>{await i.init(),o!=n.length-1&&(t.lastDiskOffset+=i.size),t.size+=i.size})),super.init()}async readUint8Array(t,n,i=0){let o=this,{readers:r}=this,s,a=i;a==-1&&(a=r.length-1);let c=t;for(;c>=r[a].size;)c-=r[a].size,a++;let d=r[a],u=d.size;if(c+n<=u)s=await Ia(d,c,n);else{let m=u-c;s=new Uint8Array(n),s.set(await Ia(d,c,m)),s.set(await o.readUint8Array(t+m,n-m,i),m)}return o.lastDiskNumber=Math.max(a,o.lastDiskNumber),s}},yk=class extends uV{constructor(t,n=4294967295){super();let i=this;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});let o,r,s,a=new WritableStream({async write(u){let{availableSize:m}=i;if(s)u.length>=m?(await c(u.slice(0,m)),await d(),i.diskOffset+=o.size,i.diskNumber++,s=null,await this.write(u.slice(m))):await c(u);else{let{value:p,done:g}=await t.next();if(g&&!p)throw new Error(i$e);o=p,o.size=0,o.maxSize&&(i.maxSize=o.maxSize),i.availableSize=i.maxSize,await Wf(o),r=p.writable,s=r.getWriter(),await this.write(u)}},async close(){await s.ready,await d()}});Object.defineProperty(i,nQ,{get(){return a}});async function c(u){let m=u.length;m&&(await s.ready,await s.write(u),o.size+=m,i.size+=m,i.availableSize-=m)}async function d(){r.size=o.size,await s.close()}}};async function Wf(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function xk(e){return Array.isArray(e)&&(e=new tQ(e)),e instanceof ReadableStream&&(e={readable:e}),e}function _k(e){e.writable===Ki&&typeof e.next==Fb&&(e=new yk(e)),e instanceof WritableStream&&(e={writable:e});let{writable:t}=e;return t.size===Ki&&(t.size=0),e instanceof yk||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function Ia(e,t,n,i){return e.readUint8Array(t,n,i)}var Zui=S(T(),1);var fui=S(T(),1);var uui=S(T(),1),Vpe="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),a$e=Vpe.length==256;function Zpe(e){if(a$e){let t="";for(let n=0;nthis[n]=t[n])}};var fQ="File format is not recognized",m$e="End of central directory not found",h$e="End of Zip64 central directory locator not found",f$e="Central directory header not found",p$e="Local file header not found",b$e="Zip64 extra field not found",g$e="File contains encrypted entry",y$e="Encryption method not supported",Gpe="Compression method not supported",Epe="Split zip file",Wpe="utf-8",Ipe="cp437",x$e=[[aQ,4294967295],[cQ,4294967295],[lQ,4294967295],[Sk,65535]],_$e={[65535]:{getValue:us,bytes:4},[4294967295]:{getValue:Ck,bytes:8}},Wk=class{constructor(t,n={}){Object.assign(this,{reader:xk(t),options:n,config:uv()})}async*getEntriesGenerator(t={}){let n=this,{reader:i}=n,{config:o}=n;if(await Wf(i),(i.size===Ki||!i.readUint8Array)&&(i=new Nb(await new Response(i.readable).blob()),await Wf(i)),i.size<22)throw new Error(fQ);i.chunkSize=$U(o);let r=await Z$e(i,101010256,i.size,22,65535*16);if(!r){let M=await Ia(i,0,4),b=ua(M);throw us(b)==134695760?new Error(Epe):new Error(m$e)}let s=ua(r),a=us(s,12),c=us(s,16),d=r.offset,u=da(s,20),m=d+22+u,p=da(s,4),g=i.lastDiskNumber||0,f=da(s,6),x=da(s,8),_=0,C=0;if(c==4294967295||a==4294967295||x==65535||f==65535){let M=await Ia(i,r.offset-20,20),b=ua(M);if(us(b,0)==117853008){c=Ck(b,8);let L=await Ia(i,c,56,-1),E=ua(L),I=r.offset-20-56;if(us(E,0)!=101075792&&c!=I){let w=c;c=I,_=c-w,L=await Ia(i,c,56,-1),E=ua(L)}if(us(E,0)!=101075792)throw new Error(h$e);p==65535&&(p=us(E,16)),f==65535&&(f=us(E,20)),x==65535&&(x=Ck(E,32)),a==4294967295&&(a=Ck(E,40)),c-=a}}if(c>=i.size&&(_=i.size-c-a-22,c=i.size-a-22),g!=p)throw new Error(Epe);if(c<0)throw new Error(fQ);let V=0,Z=await Ia(i,c,a,f),R=ua(Z);if(a){let M=r.offset-a;if(us(R,V)!=33639248&&c!=M){let b=c;c=M,_+=c-b,Z=await Ia(i,c,a,f),R=ua(Z)}}let G=r.offset-c-(i.lastDiskOffset||0);if(a!=G&&G>=0&&(a=G,Z=await Ia(i,c,a,f),R=ua(Z)),c<0||c>=i.size)throw new Error(fQ);let W=Bl(n,t,"filenameEncoding"),v=Bl(n,t,"commentEncoding");for(let M=0;Mb.getData(We,Te,Pe),V=U;let{onprogress:Ze}=t;if(Ze)try{await Ze(M+1,x,new iy(b))}catch{}yield Te}let P=Bl(n,t,"extractPrependedData"),F=Bl(n,t,"extractAppendedData");return P&&(n.prependedData=C>0?await Ia(i,0,C):new Uint8Array),n.comment=u?await Ia(i,d+22,u):new Uint8Array,F&&(n.appendedData=m>>8&255:p>>>24&255),signature:p,compressed:d!=0,encrypted:G,useWebWorkers:Bl(o,i,"useWebWorkers"),useCompressionStream:Bl(o,i,"useCompressionStream"),transferStreams:Bl(o,i,"transferStreams"),checkPasswordOnly:b},config:u,streamOptions:{signal:M,size:P,onstart:E,onprogress:I,onend:w}},B=0;try{({outputSize:B}=await hk({readable:F,writable:L},N))}catch(k){if(!b||k.message!=Mb)throw k}finally{let k=Bl(o,i,"preventClose");L.size+=B,!k&&!L.locked&&await L.getWriter().close()}return b?Ki:t.getData?t.getData():L}};function Ppe(e,t,n){let i=e.rawBitFlag=da(t,n+2),o=(i&1)==1,r=us(t,n+6);Object.assign(e,{encrypted:o,version:da(t,n),bitFlag:{level:(i&6)>>1,dataDescriptor:(i&8)==8,languageEncodingFlag:(i&2048)==2048},rawLastModDate:r,lastModDate:L$e(r),filenameLength:da(t,n+22),extraFieldLength:da(t,n+24)})}async function vpe(e,t,n,i,o){let{rawExtraField:r}=t,s=t.extraField=new Map,a=ua(new Uint8Array(r)),c=0;try{for(;ct[o]==r);for(let o=0,r=0;o=5&&(r.push(mV),s.push(Tk));let a=1;r.forEach((c,d)=>{if(e.data.length>=a+4){let u=us(i,a);t[c]=e[c]=new Date(u*1e3);let m=s[d];e[m]=u}a+=4})}async function Z$e(e,t,n,i,o){let r=new Uint8Array(4),s=ua(r);R$e(s,0,t);let a=i+o;return await c(i)||await c(Math.min(a,n));async function c(d){let u=n-d,m=await Ia(e,u,d);for(let p=m.length-i;p>=0;p--)if(m[p]==r[0]&&m[p+1]==r[1]&&m[p+2]==r[2]&&m[p+3]==r[3])return{offset:u+p,buffer:m.slice(p,p+i).buffer}}}function Bl(e,t,n){return t[n]===Ki?e.options[n]:t[n]}function L$e(e){let t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function pQ(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function hV(e,t){return e.getUint8(t)}function da(e,t){return e.getUint16(t,!0)}function us(e,t){return e.getUint32(t,!0)}function Ck(e,t){return Number(e.getBigUint64(t,!0))}function R$e(e,t,n){e.setUint32(t,n,!0)}function ua(e){return new DataView(e.buffer)}var Pui=S(T(),1);var I$e="File already exists",X$e="Zip file comment exceeds 64KB",P$e="File entry comment exceeds 64KB",v$e="File entry name exceeds 64KB",Ape="Version exceeds 65535",w$e="The strength must equal 1, 2, or 3",F$e="Extra field type exceeds 65535",A$e="Extra field data exceeds 64KB",WQ="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Mpe=new Uint8Array([7,0,2,0,65,69,3,0,0]),GQ=0,Npe=[],Pk=class{constructor(t,n={}){t=_k(t);let i=t.availableSize!==Ki&&t.availableSize>0&&t.availableSize!==1/0&&t.maxSize!==Ki&&t.maxSize>0&&t.maxSize!==1/0;Object.assign(this,{writer:t,addSplitZipSignature:i,options:n,config:uv(),files:new Map,filenames:new Set,offset:t.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async add(t="",n,i={}){let o=this,{pendingAddFileCalls:r,config:s}=o;GQNpe.push(c));let a;try{if(t=t.trim(),o.filenames.has(t))throw new Error(I$e);return o.filenames.add(t),a=M$e(o,t,n,i),r.add(a),await a}catch(c){throw o.filenames.delete(t),c}finally{r.delete(a);let c=Npe.shift();c?c():GQ--}}async close(t=new Uint8Array,n={}){let i=this,{pendingAddFileCalls:o,writer:r}=this,{writable:s}=r;for(;o.size;)await Promise.allSettled(Array.from(o));return await K$e(this,t,n),Do(i,n,"preventClose")||await s.getWriter().close(),r.getData?r.getData():s}};async function M$e(e,t,n,i){t=t.trim(),i.directory&&!t.endsWith(rV)?t+=rV:i.directory=t.endsWith(rV);let o=Do(e,i,"encodeText",aV),r=o(t);if(r===Ki&&(r=aV(t)),Bi(r)>65535)throw new Error(v$e);let s=i.comment||"",a=o(s);if(a===Ki&&(a=aV(s)),Bi(a)>65535)throw new Error(P$e);let c=Do(e,i,"version",20);if(c>65535)throw new Error(Ape);let d=Do(e,i,"versionMadeBy",20);if(d>65535)throw new Error(Ape);let u=Do(e,i,mV,new Date),m=Do(e,i,Sv),p=Do(e,i,Tv),g=Do(e,i,mQ,!0),f=Do(e,i,dQ,0),x=Do(e,i,uQ,0),_=Do(e,i,"password"),C=Do(e,i,"rawPassword"),V=Do(e,i,"encryptionStrength",3),Z=Do(e,i,"zipCrypto"),R=Do(e,i,"extendedTimestamp",!0),G=Do(e,i,"keepOrder",!0),W=Do(e,i,"level"),v=Do(e,i,"useWebWorkers"),P=Do(e,i,"bufferedWrite"),F=Do(e,i,"dataDescriptorSignature",!1),M=Do(e,i,"signal"),b=Do(e,i,"useCompressionStream"),L=Do(e,i,"dataDescriptor",!0),E=Do(e,i,hQ);if(_!==Ki&&V!==Ki&&(V<1||V>3))throw new Error(w$e);let I=new Uint8Array,{extraField:w}=i;if(w){let Ze=0,We=0;w.forEach(Pe=>Ze+=4+Bi(Pe)),I=new Uint8Array(Ze),w.forEach((Pe,Ue)=>{if(Ue>65535)throw new Error(F$e);if(Bi(Pe)>65535)throw new Error(A$e);Ts(I,new Uint16Array([Ue]),We),Ts(I,new Uint16Array([Bi(Pe)]),We+2),Ts(I,Pe,We+4),We+=4+Bi(Pe)})}let N=0,B=0,k=0,O=E===!0;n&&(n=xk(n),await Wf(n),n.size===Ki?(L=!0,(E||E===Ki)&&(E=!0,k=N=4294967296)):(k=n.size,N=H$e(k)));let{diskOffset:U,diskNumber:J,maxSize:z}=e.writer,ee=O||k>4294967295,K=O||N>4294967295,j=O||e.offset+e.pendingEntriesSize-U>4294967295,be=Do(e,i,"supportZip64SplitFile",!0)&&O||J+Math.ceil(e.pendingEntriesSize/z)>65535;if(j||ee||K||be){if(E===!1||!G)throw new Error(WQ);E=!0}E=E||!1,i=Object.assign({},i,{rawFilename:r,rawComment:a,version:c,versionMadeBy:d,lastModDate:u,lastAccessDate:m,creationDate:p,rawExtraField:I,zip64:E,zip64UncompressedSize:ee,zip64CompressedSize:K,zip64Offset:j,zip64DiskNumberStart:be,password:_,rawPassword:C,level:!b&&e.config.CompressionStream===Ki&&e.config.CompressionStreamNative===Ki?0:W,useWebWorkers:v,encryptionStrength:V,extendedTimestamp:R,zipCrypto:Z,bufferedWrite:P,keepOrder:G,dataDescriptor:L,dataDescriptorSignature:F,signal:M,msDosCompatible:g,internalFileAttribute:f,externalFileAttribute:x,useCompressionStream:b});let Se=k$e(i),ae=B$e(i),ye=Bi(Se.localHeaderArray,ae.dataDescriptorArray);B=ye+N,e.options.usdz&&(B+=B+64),e.pendingEntriesSize+=B;let Te;try{Te=await N$e(e,t,n,{headerInfo:Se,dataDescriptorInfo:ae,metadataSize:ye},i)}finally{e.pendingEntriesSize-=B}return Object.assign(Te,{name:t,comment:s,extraField:w}),new iy(Te)}async function N$e(e,t,n,i,o){let{files:r,writer:s}=e,{keepOrder:a,dataDescriptor:c,signal:d}=o,{headerInfo:u}=i,{usdz:m}=e.options,p=Array.from(r.values()).pop(),g={},f,x,_,C,V,Z,R;r.set(t,g);try{let P;a&&(P=p&&p.lock,G()),(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&a||!c)&&!m?(Z=new TransformStream,R=new Response(Z.readable).blob(),Z.writable.size=0,f=!0,e.bufferedWrites++,await Wf(s)):(Z=s,await W()),await Wf(Z);let{writable:F}=s,{diskOffset:M}=s;if(e.addSplitZipSignature){delete e.addSplitZipSignature;let L=new Uint8Array(4),E=Xa(L);Di(E,0,134695760),await If(F,L),e.offset+=4}m&&D$e(i,e.offset-M),f||(await P,await v(F));let{diskNumber:b}=s;if(V=!0,g.diskNumberStart=b,g=await U$e(n,Z,g,i,e.config,o),V=!1,r.set(t,g),g.filename=t,f){await Z.writable.getWriter().close();let L=await R;await P,await W(),C=!0,c||(L=await O$e(g,L,F,o)),await v(F),g.diskNumberStart=s.diskNumber,M=s.diskOffset,await L.stream().pipeTo(F,{preventClose:!0,preventAbort:!0,signal:d}),F.size+=L.size,C=!1}if(g.offset=e.offset-M,g.zip64)z$e(g,o);else if(g.offset>4294967295)throw new Error(WQ);return e.offset+=g.size,g}catch(P){if(f&&C||!f&&V){if(e.hasCorruptedEntries=!0,P)try{P.corruptedEntry=!0}catch{}f?e.offset+=Z.writable.size:e.offset=Z.writable.size}throw r.delete(t),P}finally{f&&e.bufferedWrites--,_&&_(),x&&x()}function G(){g.lock=new Promise(P=>_=P)}async function W(){e.writerLocked=!0;let{lockWriter:P}=e;e.lockWriter=new Promise(F=>x=()=>{e.writerLocked=!1,F()}),await P}async function v(P){Bi(u.localHeaderArray)>s.availableSize&&(s.availableSize=0,await If(P,new Uint8Array))}}async function U$e(e,t,{diskNumberStart:n,lock:i},o,r,s){let{headerInfo:a,dataDescriptorInfo:c,metadataSize:d}=o,{localHeaderArray:u,headerArray:m,lastModDate:p,rawLastModDate:g,encrypted:f,compressed:x,version:_,compressionMethod:C,rawExtraFieldExtendedTimestamp:V,extraFieldExtendedTimestampFlag:Z,rawExtraFieldNTFS:R,rawExtraFieldAES:G}=a,{dataDescriptorArray:W}=c,{rawFilename:v,lastAccessDate:P,creationDate:F,password:M,rawPassword:b,level:L,zip64:E,zip64UncompressedSize:I,zip64CompressedSize:w,zip64Offset:N,zip64DiskNumberStart:B,zipCrypto:k,dataDescriptor:O,directory:U,versionMadeBy:J,rawComment:z,rawExtraField:ee,useWebWorkers:K,onstart:j,onprogress:q,onend:be,signal:Se,encryptionStrength:ae,extendedTimestamp:ye,msDosCompatible:Te,internalFileAttribute:Ze,externalFileAttribute:We,useCompressionStream:Pe}=s,Ue={lock:i,versionMadeBy:J,zip64:E,directory:!!U,filenameUTF8:!0,rawFilename:v,commentUTF8:!0,rawComment:z,rawExtraFieldExtendedTimestamp:V,rawExtraFieldNTFS:R,rawExtraFieldAES:G,rawExtraField:ee,extendedTimestamp:ye,msDosCompatible:Te,internalFileAttribute:Ze,externalFileAttribute:We,diskNumberStart:n},Pt=0,Ot=0,ht,{writable:Ae}=t;if(e){e.chunkSize=$U(r),await If(Ae,u);let Qe=e.readable,je=Qe.size=e.size,Ut={options:{codecType:dk,level:L,rawPassword:b,password:M,encryptionStrength:ae,zipCrypto:f&&k,passwordVerification:f&&k&&g>>8&255,signed:!0,compressed:x,encrypted:f,useWebWorkers:K,useCompressionStream:Pe,transferStreams:!1},config:r,streamOptions:{signal:Se,size:je,onstart:j,onprogress:q,onend:be}},pe=await hk({readable:Qe,writable:Ae},Ut);Ot=pe.inputSize,Pt=pe.outputSize,ht=pe.signature,Ae.size+=Ot}else await If(Ae,u);let $e;if(E){let Qe=4;I&&(Qe+=8),w&&(Qe+=8),N&&(Qe+=8),B&&(Qe+=4),$e=new Uint8Array(Qe)}else $e=new Uint8Array;return Y$e({signature:ht,rawExtraFieldZip64:$e,compressedSize:Pt,uncompressedSize:Ot,headerInfo:a,dataDescriptorInfo:c},s),O&&await If(Ae,W),Object.assign(Ue,{uncompressedSize:Ot,compressedSize:Pt,lastModDate:p,rawLastModDate:g,creationDate:F,lastAccessDate:P,encrypted:f,size:d+Pt,compressionMethod:C,version:_,headerArray:m,signature:ht,rawExtraFieldZip64:$e,extraFieldExtendedTimestampFlag:Z,zip64UncompressedSize:I,zip64CompressedSize:w,zip64Offset:N,zip64DiskNumberStart:B}),Ue}function k$e(e){let{rawFilename:t,lastModDate:n,lastAccessDate:i,creationDate:o,rawPassword:r,password:s,level:a,zip64:c,zipCrypto:d,dataDescriptor:u,directory:m,rawExtraField:p,encryptionStrength:g,extendedTimestamp:f}=e,x=a!==0&&!m,_=!!(s&&Bi(s)||r&&Bi(r)),C=e.version,V;if(_&&!d){V=new Uint8Array(Bi(Mpe)+2);let B=Xa(V);no(B,0,39169),Ts(V,Mpe,2),vk(B,8,g)}else V=new Uint8Array;let Z,R,G;if(f){R=new Uint8Array(9+(i?4:0)+(o?4:0));let B=Xa(R);no(B,0,21589),no(B,2,Bi(R)-4),G=1+(i?2:0)+(o?4:0),vk(B,4,G);let k=5;Di(B,k,Math.floor(n.getTime()/1e3)),k+=4,i&&(Di(B,k,Math.floor(i.getTime()/1e3)),k+=4),o&&Di(B,k,Math.floor(o.getTime()/1e3));try{Z=new Uint8Array(36);let O=Xa(Z),U=EQ(n);no(O,0,10),no(O,2,32),no(O,8,1),no(O,10,24),Yl(O,12,U),Yl(O,20,EQ(i)||U),Yl(O,28,EQ(o)||U)}catch{Z=new Uint8Array}}else Z=R=new Uint8Array;let W=2048;u&&(W=W|8);let v=0;x&&(v=8),c&&(C=C>45?C:45),_&&(W=W|1,d||(C=C>51?C:51,v=99,x&&(V[9]=8)));let P=new Uint8Array(26),F=Xa(P);no(F,0,C),no(F,2,W),no(F,4,v);let M=new Uint32Array(1),b=Xa(M),L;nDJ?L=DJ:L=n,no(b,0,(L.getHours()<<6|L.getMinutes())<<5|L.getSeconds()/2),no(b,2,(L.getFullYear()-1980<<4|L.getMonth()+1)<<5|L.getDate());let E=M[0];Di(F,6,E),no(F,22,Bi(t));let I=Bi(V,R,Z,p);no(F,24,I);let w=new Uint8Array(30+Bi(t)+I),N=Xa(w);return Di(N,0,67324752),Ts(w,P,4),Ts(w,t,30),Ts(w,V,30+Bi(t)),Ts(w,R,30+Bi(t,V)),Ts(w,Z,30+Bi(t,V,R)),Ts(w,p,30+Bi(t,V,R,Z)),{localHeaderArray:w,headerArray:P,headerView:F,lastModDate:n,rawLastModDate:E,encrypted:_,compressed:x,version:C,compressionMethod:v,extraFieldExtendedTimestampFlag:G,rawExtraFieldExtendedTimestamp:R,rawExtraFieldNTFS:Z,rawExtraFieldAES:V,extraFieldLength:I}}function D$e(e,t){let{headerInfo:n}=e,{localHeaderArray:i,extraFieldLength:o}=n,r=Xa(i),s=64-(t+Bi(i))%64;s<4&&(s+=64);let a=new Uint8Array(s),c=Xa(a);no(c,0,6534),no(c,2,s-2);let d=i;n.localHeaderArray=i=new Uint8Array(Bi(d)+s),Ts(i,d),Ts(i,a,Bi(d)),r=Xa(i),no(r,28,o+s),e.metadataSize+=s}function B$e(e){let{zip64:t,dataDescriptor:n,dataDescriptorSignature:i}=e,o=new Uint8Array,r,s=0;return n&&(o=new Uint8Array(t?i?24:20:i?16:12),r=Xa(o),i&&(s=4,Di(r,0,134695760))),{dataDescriptorArray:o,dataDescriptorView:r,dataDescriptorOffset:s}}function Y$e(e,t){let{signature:n,rawExtraFieldZip64:i,compressedSize:o,uncompressedSize:r,headerInfo:s,dataDescriptorInfo:a}=e,{headerView:c,encrypted:d}=s,{dataDescriptorView:u,dataDescriptorOffset:m}=a,{zip64:p,zip64UncompressedSize:g,zip64CompressedSize:f,zipCrypto:x,dataDescriptor:_}=t;if((!d||x)&&n!==Ki&&(Di(c,10,n),_&&Di(u,m,n)),p){let C=Xa(i);no(C,0,1),no(C,2,Bi(i)-4);let V=4;g&&(Di(c,18,4294967295),Yl(C,V,BigInt(r)),V+=8),f&&(Di(c,14,4294967295),Yl(C,V,BigInt(o))),_&&(Yl(u,m+4,BigInt(o)),Yl(u,m+12,BigInt(r)))}else Di(c,14,o),Di(c,18,r),_&&(Di(u,m+4,o),Di(u,m+8,r))}async function O$e(e,t,n,{zipCrypto:i}){let o;o=await t.slice(0,26).arrayBuffer(),o.byteLength!=26&&(o=o.slice(0,26));let r=new DataView(o);return(!e.encrypted||i)&&Di(r,14,e.signature),e.zip64?(Di(r,18,4294967295),Di(r,22,4294967295)):(Di(r,18,e.compressedSize),Di(r,22,e.uncompressedSize)),await If(n,new Uint8Array(o)),t.slice(o.byteLength)}function z$e(e,t){let{rawExtraFieldZip64:n,offset:i,diskNumberStart:o}=e,{zip64UncompressedSize:r,zip64CompressedSize:s,zip64Offset:a,zip64DiskNumberStart:c}=t,d=Xa(n),u=4;r&&(u+=8),s&&(u+=8),a&&(Yl(d,u,BigInt(i)),u+=8),c&&Di(d,u,o)}async function K$e(e,t,n){let{files:i,writer:o}=e,{diskOffset:r,writable:s}=o,{diskNumber:a}=o,c=0,d=0,u=e.offset-r,m=i.size;for(let[,G]of i){let{rawFilename:W,rawExtraFieldZip64:v,rawExtraFieldAES:P,rawComment:F,rawExtraFieldNTFS:M,rawExtraField:b,extendedTimestamp:L,extraFieldExtendedTimestampFlag:E,lastModDate:I}=G,w;if(L){w=new Uint8Array(9);let N=Xa(w);no(N,0,21589),no(N,2,5),vk(N,4,E),Di(N,5,Math.floor(I.getTime()/1e3))}else w=new Uint8Array;G.rawExtraFieldCDExtendedTimestamp=w,d+=46+Bi(W,F,v,P,M,w,b)}let p=new Uint8Array(d),g=Xa(p);await Wf(o);let f=0;for(let[G,W]of Array.from(i.values()).entries()){let{offset:v,rawFilename:P,rawExtraFieldZip64:F,rawExtraFieldAES:M,rawExtraFieldCDExtendedTimestamp:b,rawExtraFieldNTFS:L,rawExtraField:E,rawComment:I,versionMadeBy:w,headerArray:N,directory:B,zip64:k,zip64UncompressedSize:O,zip64CompressedSize:U,zip64DiskNumberStart:J,zip64Offset:z,msDosCompatible:ee,internalFileAttribute:K,externalFileAttribute:j,diskNumberStart:q,uncompressedSize:be,compressedSize:Se}=W,ae=Bi(F,M,b,L,E);Di(g,c,33639248),no(g,c+4,w);let ye=Xa(N);O||Di(ye,18,be),U||Di(ye,14,Se),Ts(p,N,c+6),no(g,c+30,ae),no(g,c+32,Bi(I)),no(g,c+34,k&&J?65535:q),no(g,c+36,K),j?Di(g,c+38,j):B&&ee&&vk(g,c+38,16),Di(g,c+42,k&&z?4294967295:v),Ts(p,P,c+46),Ts(p,F,c+46+Bi(P)),Ts(p,M,c+46+Bi(P,F)),Ts(p,b,c+46+Bi(P,F,M)),Ts(p,L,c+46+Bi(P,F,M,b)),Ts(p,E,c+46+Bi(P,F,M,b,L)),Ts(p,I,c+46+Bi(P)+ae);let Te=46+Bi(P,I)+ae;if(c-f>o.availableSize&&(o.availableSize=0,await If(s,p.slice(f,c)),f=c),c+=Te,n.onprogress)try{await n.onprogress(G+1,i.size,new iy(W))}catch{}}await If(s,f?p.slice(f):p);let x=o.diskNumber,{availableSize:_}=o;_<22&&x++;let C=Do(e,n,"zip64");if(u>4294967295||d>4294967295||m>65535||x>65535){if(C===!1)throw new Error(WQ);C=!0}let V=new Uint8Array(C?98:22),Z=Xa(V);c=0,C&&(Di(Z,0,101075792),Yl(Z,4,BigInt(44)),no(Z,12,45),no(Z,14,45),Di(Z,16,x),Di(Z,20,a),Yl(Z,24,BigInt(m)),Yl(Z,32,BigInt(m)),Yl(Z,40,BigInt(d)),Yl(Z,48,BigInt(u)),Di(Z,56,117853008),Yl(Z,64,BigInt(u)+BigInt(d)),Di(Z,72,x+1),Do(e,n,"supportZip64SplitFile",!0)&&(x=65535,a=65535),m=65535,u=4294967295,d=4294967295,c+=76),Di(Z,c,101010256),no(Z,c+4,x),no(Z,c+6,a),no(Z,c+8,m),no(Z,c+10,m),Di(Z,c+12,d),Di(Z,c+16,u);let R=Bi(t);if(R)if(R<=65535)no(Z,c+20,R);else throw new Error(X$e);await If(s,V),R&&await If(s,t)}async function If(e,t){let n=e.getWriter();try{await n.ready,e.size+=Bi(t),await n.write(t)}finally{n.releaseLock()}}function EQ(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function Do(e,t,n,i){let o=t[n]===Ki?e.options[n]:t[n];return o===Ki?i:o}function H$e(e){return e+5*(Math.floor(e/16383)+1)}function vk(e,t,n){e.setUint8(t,n)}function no(e,t,n){e.setUint16(t,n,!0)}function Di(e,t,n){e.setUint32(t,n,!0)}function Yl(e,t,n){e.setBigUint64(t,n,!0)}function Ts(e,t,n){e.set(t,n)}function Xa(e){return new DataView(e.buffer)}function Bi(...e){let t=0;return e.forEach(n=>n&&(t+=n.length)),t}sV({Deflate:Vfe,Inflate:zfe});var zui=S(T(),1);function J$e(e){return typeof e=="string"&&(e=document.getElementById(e)),e}var In=J$e;var Hui=S(T(),1);function Q$e(e,t){this.position=e,this.headingPitchRange=t}var Zv=Q$e;var qui=S(T(),1);function wk(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new ge,this.tourEnd=new ge,this.entryStart=new ge,this.entryEnd=new ge,this._activeEntries=[]}wk.prototype.addPlaylistEntry=function(e){this.playlist.push(e)};wk.prototype.play=function(e,t){this.tourStart.raiseEvent();let n=this;Dpe.call(this,e,t,function(i){n.playlistIndex=0,i||kpe(n._activeEntries),n.tourEnd.raiseEvent(i)})};wk.prototype.stop=function(){kpe(this._activeEntries)};function kpe(e){for(let t=e.pop();t!==void 0;t=e.pop())t.stop()}function Dpe(e,t,n){let i=this.playlist[this.playlistIndex];if(i){let o=j$e.bind(this,e,t,n);if(this._activeEntries.push(i),this.entryStart.raiseEvent(i),i.blocking)i.play(o,e.scene.camera,t);else{let r=this;i.play(function(){r.entryEnd.raiseEvent(i);let s=r._activeEntries.indexOf(i);s>=0&&r._activeEntries.splice(s,1)}),o(e,t,n)}}else l(n)&&n(!1)}function j$e(e,t,n,i){let o=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(o,i),i)n(i);else{let r=this._activeEntries.indexOf(o);r>=0&&this._activeEntries.splice(r,1),this.playlistIndex++,Dpe.call(this,e,t,n)}}var Lv=wk;var pmi=S(T(),1);var lmi=S(T(),1);var smi=S(T(),1),Gi=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var t=1.70158;return e===1?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return e===0?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Gi.Bounce.Out(1-e)},Out:function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375},InOut:function(e){return e<.5?Gi.Bounce.In(e*2)*.5:Gi.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e1e4?1e4:e,{In:function(t){return Math.pow(t,e)},Out:function(t){return 1-Math.pow(1-t,e)},InOut:function(t){return t<.5?Math.pow(t*2,e)/2:(1-Math.pow(2-t*2,e))/2+.5}}}}),Rv=function(){return performance.now()},q$e=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(n){return t._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},e.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},e.prototype.update=function(t,n){t===void 0&&(t=Rv()),n===void 0&&(n=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o1?r(e[n],e[n-1],n-i):r(e[o],e[o+1>n?n:o+1],i-o)},Bezier:function(e,t){for(var n=0,i=e.length-1,o=Math.pow,r=fV.Utils.Bernstein,s=0;s<=i;s++)n+=o(1-t,i-s)*o(t,s)*e[s]*r(i,s);return n},CatmullRom:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=fV.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(o=Math.floor(i=n*(1+t))),r(e[(o-1+n)%n],e[o],e[(o+1)%n],e[(o+2)%n],i-o)):t<0?e[0]-(r(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[n]-(r(e[n],e[n],e[n-1],e[n-1],i-n)-e[n]):r(e[o?o-1:0],e[o],e[n1;i--)n*=i;return e[t]=n,n}}(),CatmullRom:function(e,t,n,i,o){var r=(n-e)*.5,s=(i-t)*.5,a=o*o,c=o*a;return(2*t-2*n+r+s)*c+(-3*t+3*n-2*r-s)*a+r*o+t}}},Bpe=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),IQ=new q$e,Ype=function(){function e(t,n){n===void 0&&(n=IQ),this._object=t,this._group=n,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Gi.Linear.None,this._interpolationFunction=fV.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Bpe.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(t,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},e.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,n){if(t===void 0&&(t=Rv()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var r in this._valuesEnd)o[r]=this._valuesEnd[r];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},e.prototype._setupProperties=function(t,n,i,o,r){for(var s in i){var a=t[s],c=Array.isArray(a),d=c?"array":typeof a,u=!c&&Array.isArray(i[s]);if(!(d==="undefined"||d==="function")){if(u){var m=i[s];if(m.length===0)continue;for(var p=[a],g=0,f=m.length;g"u"||r)&&(n[s]=a),c||(n[s]*=1),u?o[s]=i[s].slice().reverse():o[s]=n[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(t){return t===void 0&&(t=Rv()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this),this)},e.prototype.resume=function(t){return t===void 0&&(t=Rv()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},e.prototype.stopChainedTweens=function(){for(var t=0,n=this._chainedTweens.length;to)return!1;n&&this.start(t,!0)}if(this._goToEnd=!1,ti)return 1;var o=t%n,r=Math.min(o/this._duration,1);return r===0&&t!==0&&t%this._duration===0?1:r},e.prototype._calculateCompletionStatus=function(t,n){return this._duration!==0&&tthis._started+this._timeThreshold)){this._giveUpTime();return}i=this._nextNode()}this._pop()&&e&&this._process(!0)};function net(e){let t=e.slice(0,Math.min(4,e.size)),n=hl(),i=new FileReader;return i.addEventListener("load",function(){n.resolve(new DataView(i.result).getUint32(0,!1)===1347093252)}),i.addEventListener("error",function(){n.reject(i.error)}),i.readAsArrayBuffer(t),n.promise}function iet(e){let t=hl(),n=new FileReader;return n.addEventListener("load",function(){t.resolve(n.result)}),n.addEventListener("error",function(){t.reject(n.error)}),n.readAsText(e),t.promise}function tbe(e){let t={xsi:"http://www.w3.org/2001/XMLSchema-instance"},n,i,o,r;for(let s in t)t.hasOwnProperty(s)&&(o=RegExp(`[< ]${s}:`),r=`xmlns:${s}=`,o.test(e)&&e.indexOf(r)===-1&&(l(n)||(n=e.substr(0,e.indexOf("",t),i,o,r;for(;t!==-1&&t0?(Ol.maximumRed=r,Ol.red=void 0):(Ol.maximumRed=void 0,Ol.red=0),o>0?(Ol.maximumGreen=o,Ol.green=void 0):(Ol.maximumGreen=void 0,Ol.green=0),i>0?(Ol.maximumBlue=i,Ol.blue=void 0):(Ol.maximumBlue=void 0,Ol.blue=0),Ol.alpha=n,Y.fromRandom(Ol)):new Y(r,o,i,n)}function aS(e,t,n){let i=Xn(e,t,n);if(l(i))return AQ(i,Xn(e,"colorMode",n)==="random")}function ret(e){let t=Ei(e,"TimeStamp",ve.kmlgx),n=Xn(t,"when",ve.kmlgx);if(!l(t)||!l(n)||n.length===0)return;let i=ne.fromIso8601(n),o=new Xr;return o.addInterval(new Tn({start:i,stop:Be.MAXIMUM_VALUE})),o}function set(e){let t=Ei(e,"TimeSpan",ve.kmlgx);if(!l(t))return;let n,i=Ei(t,"begin",ve.kmlgx),o=l(i)?ne.fromIso8601(i.textContent):void 0,r=Ei(t,"end",ve.kmlgx),s=l(r)?ne.fromIso8601(r.textContent):void 0;if(l(o)&&l(s)){if(ne.lessThan(s,o)){let a=o;o=s,s=a}n=new Xr,n.addInterval(new Tn({start:o,stop:s}))}else l(o)?(n=new Xr,n.addInterval(new Tn({start:o,stop:Be.MAXIMUM_VALUE}))):l(s)&&(n=new Xr,n.addInterval(new Tn({start:Be.MINIMUM_VALUE,stop:s})));return n}function obe(){let e=new Ya;return e.width=oy,e.height=oy,e.scaleByDistance=new Ft(Ope,zpe,Kpe,Hpe),e.pixelOffsetScaleByDistance=new Ft(Ope,zpe,Kpe,Hpe),e}function DQ(){let e=new Sm;return e.outline=!0,e.outlineColor=Y.WHITE,e}function rbe(){let e=new _m;return e.translucencyByDistance=new Ft(3e6,1,5e6,0),e.pixelOffset=new D(17,0),e.horizontalOrigin=fi.LEFT,e.font="16px sans-serif",e.style=Ao.FILL_AND_OUTLINE,e}function BQ(e,t,n,i,o){let r=Xn(e,"href",ve.kml);if(!l(r)||r.length===0)return;if(r.indexOf("root://icons/palette-")===0){let a=r.charAt(21),c=y(qn(e,"x",ve.gx),0),d=y(qn(e,"y",ve.gx),0);c=Math.min(c/32,7),d=7-Math.min(d/32,7);let u=8*d+c;r=`https://maps.google.com/mapfiles/kml/pal${a}/icon${u}.png`}let s=kQ(r,n,i);if(o){let a=Xn(e,"refreshMode",ve.kml),c=Xn(e,"viewRefreshMode",ve.kml);a==="onInterval"||a==="onExpire"?At(`kml-refreshMode-${a}`,`KML - Unsupported Icon refreshMode: ${a}`):(c==="onStop"||c==="onRegion")&&At(`kml-refreshMode-${c}`,`KML - Unsupported Icon viewRefreshMode: ${c}`);let d=y(Xn(e,"viewBoundScale",ve.kml),1),u=c==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",m=y(Xn(e,"viewFormat",ve.kml),u),p=Xn(e,"httpQuery",ve.kml);l(m)&&s.setQueryParameters(id(Nk(m))),l(p)&&s.setQueryParameters(id(Nk(p)));let g=t._ellipsoid;return OQ(s,t.camera,t.canvas,d,t._lastCameraView.bbox,g),s}return s}function aet(e,t,n,i,o){let r=qn(t,"scale",ve.kml),s=qn(t,"heading",ve.kml),a=aS(t,"color",ve.kml),c=Ei(t,"Icon",ve.kml),d=BQ(c,e,i,o,!1);l(c)&&!l(d)&&(d=!1);let u=qn(c,"x",ve.gx),m=qn(c,"y",ve.gx),p=qn(c,"w",ve.gx),g=qn(c,"h",ve.gx),f=Ei(t,"hotSpot",ve.kml),x=ry(f,"x"),_=ry(f,"y"),C=Cs(f,"xunits"),V=Cs(f,"yunits"),Z=n.billboard;l(Z)||(Z=obe(),n.billboard=Z),Z.image=d,Z.scale=r,Z.color=a,(l(u)||l(m)||l(p)||l(g))&&(Z.imageSubRegion=new ze(u,m,p,g)),l(s)&&s!==0&&(Z.rotation=X.toRadians(-s),Z.alignedAxis=h.UNIT_Z),r=y(r,1);let R,G;l(x)&&(C==="pixels"?R=-x*r:C==="insetPixels"?R=(x-oy)*r:C==="fraction"&&(R=-x*oy*r),R+=oy*.5*r),l(_)&&(V==="pixels"?G=_*r:V==="insetPixels"?G=(-_+oy)*r:V==="fraction"&&(G=_*oy*r),G-=oy*.5*r),(l(R)||l(G))&&(Z.pixelOffset=new D(R,G))}function Mk(e,t,n,i,o){for(let r=0,s=t.childNodes.length;r:clampToSeaFloor is currently not supported, using :clampToGround."),Je.CLAMP_TO_GROUND):t==="relativeToSeaFloor"?(At("kml-gx:altitudeMode-relativeToSeaFloor","KML - :relativeToSeaFloor is currently not supported, using :relativeToGround."),Je.RELATIVE_TO_GROUND):(l(e)?At("kml-altitudeMode-unknown",`KML - Unknown :${e}, using :CLAMP_TO_GROUND.`):At("kml-gx:altitudeMode-unknown",`KML - Unknown :${t}, using :CLAMP_TO_GROUND.`),Je.CLAMP_TO_GROUND)}function uet(e,t,n){return n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround"?e:((l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&At("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${y(t,n)}`),new Sf(e))}function met(e,t,n,i){if(!l(e))return;if(n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround")return e;(l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&At("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${y(t,n)}`);let o=e.length;for(let r=0;r0&&At("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");let g=Math.min(a.length,d.length),f=[],x=[];for(let C=0;C0&&i.availability.addInterval(new Tn({start:x[0],stop:x[x.length-1]})),m&&u&&YQ(t,i,o),!0}function $pe(e,t,n,i,o,r,s,a,c){let d=e[0],u=e[e.length-1],m=new ca;m.addSamples(e,t),n.intervals.addInterval(new Tn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c,data:uet(m,s,a)})),i.addInterval(new Tn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c})),o.intervals.addInterval(new Tn({start:d,stop:u,isStartIncluded:c,isStopIncluded:c,data:r}))}function bet(e,t,n,i,o){let r=uh(n,"interpolate",ve.gx),s=dh(n,"Track",ve.gx),a,c,d,u=!1,m=new Rb,p=new Xr,g=new sa,f=e._ellipsoid;for(let x=0,_=s.length;x<_;x++){let C=s[x],V=dh(C,"when",ve.kml),Z=dh(C,"coord",ve.gx),R=Xn(C,"altitudeMode",ve.kml),G=Xn(C,"altitudeMode",ve.gx),W=Iv(R,G),v=uh(C,"extrude",ve.kml),P=Math.min(Z.length,V.length),F=[];a=[];for(let M=0;M0)){for(f='',r=0;r`;f+="
${y(x.displayName,s)}${y(x.value,"")}
"}if(!l(f))return;f=eet.link(f),ho.innerHTML=f;let _=ho.querySelectorAll("a");for(r=0;r<_.length;r++)_[r].setAttribute("target","_blank");l(i)&&i.keys.length>1&&(wd(ho,"a","href",i),wd(ho,"link","href",i),wd(ho,"area","href",i),wd(ho,"img","src",i),wd(ho,"iframe","src",i),wd(ho,"video","src",i),wd(ho,"audio","src",i),wd(ho,"source","src",i),wd(ho,"track","src",i),wd(ho,"input","src",i),wd(ho,"embed","src",i),wd(ho,"script","src",i),wd(ho,"video","poster",i)),Fd(ho,"a","href",o),Fd(ho,"link","href",o),Fd(ho,"area","href",o),Fd(ho,"img","src",o),Fd(ho,"iframe","src",o),Fd(ho,"video","src",o),Fd(ho,"audio","src",o),Fd(ho,"source","src",o),Fd(ho,"track","src",o),Fd(ho,"input","src",o),Fd(ho,"embed","src",o),Fd(ho,"script","src",o),Fd(ho,"video","poster",o);let C='
',C+=`${ho.innerHTML}
`,ho.innerHTML="",t.description=C}function Dk(e,t,n){let i=n.entityCollection,o=n.parentEntity,r=n.sourceResource,s=n.uriResolver,a=ibe(t,i,n.context),c=a.kml,d=cet(e,t,n.styleCollection,r,s),u=Xn(t,"name",ve.kml);a.name=u,a.parent=o;let m=set(t);l(m)||(m=ret(t)),a.availability=m,KQ(a);function p(Z){return Z?Z.show&&p(Z.parent):!0}let g=uh(t,"visibility",ve.kml);a.show=p(o)&&y(g,!0);let f=Ei(t,"author",ve.atom),x=c.author;x.name=Xn(f,"name",ve.atom),x.uri=Xn(f,"uri",ve.atom),x.email=Xn(f,"email",ve.atom);let _=Ei(t,"link",ve.atom),C=c.link;C.href=Cs(_,"href"),C.hreflang=Cs(_,"hreflang"),C.rel=Cs(_,"rel"),C.type=Cs(_,"type"),C.title=Cs(_,"title"),C.length=Cs(_,"length"),c.address=Xn(t,"address",ve.kml),c.phoneNumber=Xn(t,"phoneNumber",ve.kml),c.snippet=Xn(t,"Snippet",ve.kml),xet(t,a),_et(t,a,d,s,r);let V=e._ellipsoid;return mbe(t,a,V),ube(t,a,V),l(Ei(t,"Region",ve.kml))&&At("kml-region","KML - Placemark Regions are unsupported"),{entity:a,styleEntity:d}}function dbe(e,t,n,i){i.addNodes(t.childNodes,n),i.process()}function Tet(e,t,n,i){let o=Dk(e,t,n),r=Oe(n);r.parentEntity=o.entity,dbe(e,t,r,i)}function Cet(e,t,n,i){let o=Dk(e,t,n),r=o.entity,s=o.styleEntity,a=!1,c=t.childNodes;for(let d=0,u=c.length;dX.PI_OVER_TWO?X.PI_OVER_TWO:d}function a(d){return d>X.PI?d-X.TWO_PI:d<-X.PI?d+X.TWO_PI:d}let c=zy(e.queryParameters);if(c=c.replace(/%5B/g,"[").replace(/%5D/g,"]"),l(t)&&t._mode!==oe.MORPHING){let d,u;if(o=y(o,Wet),l(n)&&(wQ.x=n.clientWidth*.5,wQ.y=n.clientHeight*.5,d=t.pickEllipsoid(wQ,r,Iet)),l(d)?u=r.cartesianToCartographic(d,pV):(u=ce.center(o,pV),d=r.cartographicToCartesian(u)),l(i)&&!X.equalsEpsilon(i,1,X.EPSILON9)){let C=o.width*i*.5,V=o.height*i*.5;o=new ce(a(u.longitude-C),s(u.latitude-V),a(u.longitude+C),s(u.latitude+V))}c=c.replace("[bboxWest]",X.toDegrees(o.west).toString()),c=c.replace("[bboxSouth]",X.toDegrees(o.south).toString()),c=c.replace("[bboxEast]",X.toDegrees(o.east).toString()),c=c.replace("[bboxNorth]",X.toDegrees(o.north).toString());let m=X.toDegrees(u.longitude).toString(),p=X.toDegrees(u.latitude).toString();c=c.replace("[lookatLon]",m),c=c.replace("[lookatLat]",p),c=c.replace("[lookatTilt]",X.toDegrees(t.pitch).toString()),c=c.replace("[lookatHeading]",X.toDegrees(t.heading).toString()),c=c.replace("[lookatRange]",h.distance(t.positionWC,d)),c=c.replace("[lookatTerrainLon]",m),c=c.replace("[lookatTerrainLat]",p),c=c.replace("[lookatTerrainAlt]",u.height.toString()),r.cartesianToCartographic(t.positionWC,pV),c=c.replace("[cameraLon]",X.toDegrees(pV.longitude).toString()),c=c.replace("[cameraLat]",X.toDegrees(pV.latitude).toString()),c=c.replace("[cameraAlt]",X.toDegrees(pV.height).toString());let g=t.frustum,f=g.aspectRatio,x="",_="";if(l(f)){let C=X.toDegrees(g.fov);f>1?(x=C,_=C/f):(_=C,x=C*f)}c=c.replace("[horizFov]",x.toString()),c=c.replace("[vertFov]",_.toString())}else c=c.replace("[bboxWest]","-180"),c=c.replace("[bboxSouth]","-90"),c=c.replace("[bboxEast]","180"),c=c.replace("[bboxNorth]","90"),c=c.replace("[lookatLon]",""),c=c.replace("[lookatLat]",""),c=c.replace("[lookatRange]",""),c=c.replace("[lookatTilt]",""),c=c.replace("[lookatHeading]",""),c=c.replace("[lookatTerrainLon]",""),c=c.replace("[lookatTerrainLat]",""),c=c.replace("[lookatTerrainAlt]",""),c=c.replace("[cameraLon]",""),c=c.replace("[cameraLat]",""),c=c.replace("[cameraAlt]",""),c=c.replace("[horizFov]",""),c=c.replace("[vertFov]","");l(n)?(c=c.replace("[horizPixels]",n.clientWidth),c=c.replace("[vertPixels]",n.clientHeight)):(c=c.replace("[horizPixels]",""),c=c.replace("[vertPixels]","")),c=c.replace("[terrainEnabled]","1"),c=c.replace("[clientVersion]","1"),c=c.replace("[kmlVersion]","2.2"),c=c.replace("[clientName]","Cesium"),c=c.replace("[language]","English"),e.setQueryParameters(id(c))}function Xet(e,t,n,i){let r=Dk(e,t,n).entity,s=n.sourceResource,a=n.uriResolver,c=Ei(t,"Link",ve.kml);if(l(c)||(c=Ei(t,"Url",ve.kml)),l(c)){let d=Xn(c,"href",ve.kml),u,m;if(l(d)){let p=d;if(d=kQ(d,s,n.uriResolver),/^data:/.test(d.getUrlComponent()))/\.kmz/i.test(s.getUrlComponent())||(p=s.getDerivedResource({url:p}));else{if(p=d.clone(),u=Xn(c,"viewRefreshMode",ve.kml),u==="onRegion"){At("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion");return}m=y(Xn(c,"viewBoundScale",ve.kml),1);let _=u==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",C=y(Xn(c,"viewFormat",ve.kml),_),V=Xn(c,"httpQuery",ve.kml);l(C)&&d.setQueryParameters(id(Nk(C))),l(V)&&d.setQueryParameters(id(Nk(V)));let Z=e._ellipsoid;OQ(d,e.camera,e.canvas,m,e._lastCameraView.bbox,Z)}let g={sourceUri:p,uriResolver:a,context:r.id,screenOverlayContainer:n.screenOverlayContainer},f=new Us,x=zQ(e,f,d,g).then(function(_){let C=e._entityCollection,V=f.values;C.suspendEvents();for(let G=0;G0||Z==="onExpire"||u==="onStop"){let G=Ei(_,"NetworkLinkControl",ve.kml),W=l(G),v=ne.now(),P={id:Bn(),href:d,cookie:{},lastUpdated:v,updating:!1,entity:r,viewBoundScale:m,needsUpdate:!1,cameraUpdateTime:v},F=0;if(W&&(P.cookie=id(y(Xn(G,"cookie",ve.kml),"")),F=y(qn(G,"minRefreshPeriod",ve.kml),0)),Z==="onInterval")W&&(R=Math.max(F,R)),P.refreshMode=sy.INTERVAL,P.time=R;else if(Z==="onExpire"){let M;if(W&&(M=Xn(G,"expires",ve.kml)),l(M))try{let b=ne.fromIso8601(M),L=ne.secondsDifference(b,v);L>0&&L0;)this._screenOverlays.pop().remove()};function KQ(e){let t=e.parent;if(l(t)){let n=t.availability;if(l(n)){let i=e.availability;l(i)?i.intersect(n):e.availability=n}}}function wet(e,t,n,i,o){return function(r){if(!i.contains(t.id))return;let s=!1,a=Ei(r,"NetworkLinkControl",ve.kml),c=l(a),d=0;if(c){if(l(Ei(a,"Update",ve.kml))){At("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,i.remove(t.id);return}t.cookie=id(y(Xn(a,"cookie",ve.kml),"")),d=y(qn(a,"minRefreshPeriod",ve.kml),0)}let u=ne.now(),m=t.refreshMode;if(m===sy.INTERVAL)l(a)&&(t.time=Math.max(d,t.time));else if(m===sy.EXPIRE){let v;if(l(a)&&(v=Xn(a,"expires",ve.kml)),l(v))try{let P=ne.fromIso8601(v),F=ne.secondsDifference(P,u);F>0&&Fu.time&&(p=!0):u.refreshMode===sy.EXPIRE?ne.greaterThan(n,u.time)&&(p=!0):u.refreshMode===sy.STOP&&(r&&(u.needsUpdate=!0,u.cameraUpdateTime=n),u.needsUpdate&&ne.secondsDifference(n,u.cameraUpdateTime)>=u.time&&(p=!0)),p){o(m),u.updating=!0;let g=new Us,f=u.href.clone();f.setQueryParameters(u.cookie);let x=y(i._ellipsoid,te.default);OQ(f,i.camera,i.canvas,u.viewBoundScale,s.bbox,x),zQ(i,g,f,{context:m.id}).then(wet(i,u,g,c,f)).catch(function(_){let C=`NetworkLink ${u.href} refresh failed: ${_}`;console.log(C),i._error.raiseEvent(i,C)}),d=!0}}c.set(u.id,u)}}),d&&(this._networkLinks=c,this._changed.raiseEvent(this)),!0};function Fet(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}Ad._DeferredLoading=Pf;Ad._getTimestamp=gi;var Xv=Ad;var whi=S(T(),1);function Pv(){fe.throwInstantiationError()}Pv.prototype.update=fe.throwInstantiationError;Pv.prototype.getBoundingSphere=fe.throwInstantiationError;Pv.prototype.isDestroyed=fe.throwInstantiationError;Pv.prototype.destroy=fe.throwInstantiationError;var HQ=Pv;var ufi=S(T(),1);var JQ=32,Aet="http://www.opengis.net/kml/2.2",hh="http://www.google.com/kml/ext/2.2",Met="http://www.w3.org/2000/xmlns/";function Bk(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var Net=/^data:image\/([^,;]+)/;Bk.prototype.texture=function(e){let t=this,n;if(typeof e=="string"||e instanceof Ee){if(e=Ee.createIfNeeded(e),!e.isDataUri)return e.url;let i=e.url.match(Net);n=`texture_${++this._count}`,l(i)&&(n+=`.${i[1]}`);let o=e.fetchBlob().then(function(r){t._files[n]=r});return this._promises.push(o),n}if(e instanceof HTMLCanvasElement){n=`texture_${++this._count}.png`;let i=new Promise(o=>{e.toBlob(function(r){t._files[n]=r,o()})});return this._promises.push(i),n}return""};function Uet(e,t){return function(n){e._files[t]=n}}Bk.prototype.model=function(e,t){let n=this._modelCallback;if(!l(n))throw new ue("Encountered a model entity while exporting to KML, but no model callback was supplied.");let i={},o=n(e,t,i);for(let r in i)if(i.hasOwnProperty(r)){let s=Promise.resolve(i[r]);this._promises.push(s),s.then(Uet(this,r))}return o};Object.defineProperties(Bk.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function Yk(e){this._time=e}Yk.prototype.get=function(e,t,n){let i;return l(e)&&(i=l(e.getValue)?e.getValue(this._time,n):e),y(i,t)};Yk.prototype.getColor=function(e,t){let n=this.get(e,t);if(l(n))return lS(n)};Yk.prototype.getMaterialType=function(e){if(l(e))return e.getType(this._time)};function QQ(){this._ids={},this._styles={},this._count=0}QQ.prototype.get=function(e){let t=this._ids,n=e.innerHTML;if(l(t[n]))return t[n];let i=`style-${++this._count}`;return e.setAttribute("id",i),i=`#${i}`,t[n]=i,this._styles[n]=e,i};QQ.prototype.save=function(e){let t=this._styles,n=e.childNodes[0];for(let i in t)t.hasOwnProperty(i)&&e.insertBefore(t[i],n)};function bbe(){this._ids={}}bbe.prototype.get=function(e){if(!l(e))return this.get(Bn());let t=this._ids;return l(t[e])?`${e.toString()}-${++t[e]}`:(t[e]=0,e)};function jQ(e){e=y(e,y.EMPTY_OBJECT);let t=e.entities,n=y(e.kmz,!1),i=jQ._createState(e),o=t.values.filter(function(d){return!l(d.parent)}),r=i.kmlDoc,s=r.documentElement;s.setAttributeNS(Met,"xmlns:gx",hh);let a=r.createElement("Document");s.appendChild(a),ybe(i,a,o),i.styleCache.save(a);let c=i.externalFileHandler;return c.promise.then(function(){let u=new XMLSerializer().serializeToString(i.kmlDoc);return n?ket(u,c.files):{kml:u,externalFiles:c.files}})}function ket(e,t){let n=tn("ThirdParty/Workers/z-worker-pako.js");sV({workerScripts:{deflate:[n,"./pako_deflate.min.js"],inflate:[n,"./pako_inflate.min.js"]}});let i=new xv,o=new Pk(i);return o.add("doc.kml",new bk(e)).then(function(){let r=Object.keys(t);return gbe(o,r,t,0)}).then(function(){return o.close()}).then(function(r){return{kmz:r}})}function gbe(e,t,n,i){if(t.length===i)return;let o=t[i];return e.add(o,new Nb(n[o])).then(function(){return gbe(e,t,n,i+1)})}jQ._createState=function(e){let t=e.entities,n=new QQ,i=t.computeAvailability(),o=l(e.time)?e.time:i.start,r=y(e.defaultAvailability,i),s=y(e.sampleDuration,60);r.start===Be.MINIMUM_VALUE?r.stop===Be.MAXIMUM_VALUE?r=new Tn:ne.addSeconds(r.stop,-10*s,r.start):r.stop===Be.MAXIMUM_VALUE&&ne.addSeconds(r.start,10*s,r.stop);let a=new Bk(e.modelCallback);return{kmlDoc:document.implementation.createDocument(Aet,"kml"),ellipsoid:y(e.ellipsoid,te.default),idManager:new bbe,styleCache:n,externalFileHandler:a,time:o,valueGetter:new Yk(o),sampleDuration:s,defaultAvailability:new Xr([r])}};function ybe(e,t,n){let i=e.kmlDoc,o=e.styleCache,r=e.valueGetter,s=e.idManager,a=n.length,c,d,u;for(let m=0;m0){let C=i.createElement("Placemark");C.setAttribute("id",s.get(p.id));let V=p.name,Z=p.label;if(l(Z)){let G=i.createElement("LabelStyle"),W=r.get(Z.text);V=l(W)&&W.length>0?W:V;let v=r.getColor(Z.fillColor);l(v)&&(G.appendChild(hn(i,"color",v)),G.appendChild(hn(i,"colorMode","normal")));let P=r.get(Z.scale);l(P)&&G.appendChild(hn(i,"scale",P)),u.push(G)}C.appendChild(hn(i,"name",V)),C.appendChild(hn(i,"visibility",p.show)),C.appendChild(hn(i,"description",p.description)),l(g)&&C.appendChild(g),t.appendChild(C);let R=u.length;if(R>0){let G=i.createElement("Style");for(let W=0;W1){let G=i.createElement("MultiGeometry");for(let W=0;W0){let C=i.createElement("Folder");C.setAttribute("id",s.get(p.id)),C.appendChild(hn(i,"name",p.name)),C.appendChild(hn(i,"visibility",p.show)),C.appendChild(hn(i,"description",p.description)),t.appendChild(C),ybe(e,C,_)}}}var zl=new h,tl=new he,mh=new ne;function Det(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=e.valueGetter,a=y(t.billboard,t.point);if(!l(a)&&!l(t.path))return;let c=t.position;if(!c.isConstant){xbe(e,t,a,n,i);return}s.get(c,void 0,zl);let d=hn(o,"coordinates",cS(zl,r)),u=o.createElement("Point"),m=o.createElement("altitudeMode");m.appendChild(dS(e,a.heightReference)),u.appendChild(m),u.appendChild(d),n.push(u);let p=a instanceof Ya?Sbe(e,a):_be(e,a);i.push(p)}function xbe(e,t,n,i,o){let r=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter,c,d=t.position,u=!0;d instanceof sa?(c=d.intervals,u=!1):c=y(t.availability,e.defaultAvailability);let m=n instanceof Cp,p,g,f,x=[];for(p=0;p1){let C=r.createElementNS(hh,"MultiTrack");for(p=0;p0&&(r=n);let s=t.coordinates,a=o.get(s),c=[],d=[ce.northeast,ce.southeast,ce.southwest,ce.northwest];for(let g=0;g<4;++g)d[g](a,tl),c.push(`${X.toDegrees(tl.longitude)},${X.toDegrees(tl.latitude)},${r}`);let u=hn(i,"coordinates",c.join(" ")),m=i.createElement("outerBoundaryIs"),p=i.createElement("LinearRing");return p.appendChild(u),m.appendChild(p),[m]}function fbe(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=[],a=t.length;for(let u=0;u0&&(r=n);let a=[],c=t.hierarchy,d=o.get(c),u=Array.isArray(d)?d:d.positions,m=i.createElement("outerBoundaryIs");m.appendChild(fbe(e,u,r,s)),a.push(m);let p=d.holes;if(l(p)){let g=p.length;for(let f=0;f0&&c.appendChild(hn(r,"extrude",!0));let u=a?Yet(e,t,d):Oet(e,t,d),m=u.length;for(let _=0;_=0;--i)t+=n[i]<16?`0${n[i].toString(16)}`:n[i].toString(16);return t}var $Q=jQ;var hfi=S(T(),1),bV=`#ifdef MRT layout (location = 0) out vec4 out_FragData_0; layout (location = 1) out vec4 out_FragData_1; #else @@ -9428,7 +9421,7 @@ void main() discard; } -`;var V1i=T(S(),1),z0=`uniform vec3 u_radiiAndDynamicAtmosphereColor; +`;var pfi=S(T(),1),Ub=`uniform vec3 u_radiiAndDynamicAtmosphereColor; uniform float u_atmosphereLightIntensity; uniform float u_atmosphereRayleighScaleHeight; @@ -9615,7 +9608,7 @@ vec4 computeAtmosphereColor( return vec4(color, opacity); } -`;var R1i=T(S(),1),lw=`in vec2 v_textureCoordinates; +`;var gfi=S(T(),1),vv=`in vec2 v_textureCoordinates; const float M_PI = 3.141592653589793; float vdcRadicalInverse(int i) @@ -9698,7 +9691,7 @@ void main() { out_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0); } -`;var G1i=T(S(),1),dw=`uniform sampler2D u_noiseTexture; +`;var xfi=S(T(),1),wv=`uniform sampler2D u_noiseTexture; uniform vec3 u_noiseTextureDimensions; uniform float u_noiseDetail; in vec2 v_offset; @@ -9961,7 +9954,7 @@ void main() { #endif #endif } -`;var X1i=T(S(),1),uw=`#ifdef INSTANCED +`;var Sfi=S(T(),1),Fv=`#ifdef INSTANCED in vec2 direction; #endif in vec4 positionHighAndScaleX; @@ -10009,7 +10002,7 @@ void main() { v_slice = slice; v_brightness = brightness; } -`;var W1i=T(S(),1),mw=`uniform vec3 u_noiseTextureDimensions; +`;var Cfi=S(T(),1),Av=`uniform vec3 u_noiseTextureDimensions; uniform float u_noiseDetail; uniform vec3 u_noiseOffset; in vec2 v_position; @@ -10101,7 +10094,7 @@ void main() { float worley2 = clamp(worleyFBMNoise(position, 3.0, 3.0), 0.0, 1.0); out_FragColor = vec4(worley0, worley1, worley2, 1.0); } -`;var v1i=T(S(),1),hw=`uniform vec3 u_noiseTextureDimensions; +`;var Zfi=S(T(),1),Mv=`uniform vec3 u_noiseTextureDimensions; in vec2 position; out vec2 v_position; @@ -10119,7 +10112,7 @@ void main() transformedPos.y *= noiseTextureRows; v_position = transformedPos; } -`;var F1i=T(S(),1),fw=`uniform sampler2D u_opaqueDepthTexture; +`;var Rfi=S(T(),1),Nv=`uniform sampler2D u_opaqueDepthTexture; uniform sampler2D u_translucentDepthTexture; in vec2 v_textureCoordinates; @@ -10131,7 +10124,7 @@ void main() translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth); out_FragColor = czm_packDepth(translucentDepth); } -`;var M1i=T(S(),1),pw=`/** +`;var Efi=S(T(),1),Uv=`/** * Compositing for Weighted Blended Order-Independent Transparency. See: * - http://jcgt.org/published/0002/02/09/ * - http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html @@ -10162,7 +10155,7 @@ void main() out_FragColor.a = 1.0; } } -`;var k1i=T(S(),1),bw=`in vec4 positionEC; +`;var Ifi=S(T(),1),kv=`in vec4 positionEC; void main() { @@ -10198,7 +10191,7 @@ void main() czm_writeLogDepth(); } -`;var D1i=T(S(),1),gw=`in vec4 position; +`;var Pfi=S(T(),1),Dv=`in vec4 position; out vec4 positionEC; @@ -10209,7 +10202,7 @@ void main() czm_vertexLogDepth(); } -`;var Y1i=T(S(),1),PV=`uniform vec3 u_radii; +`;var wfi=S(T(),1),gV=`uniform vec3 u_radii; uniform vec3 u_oneOverEllipsoidRadiiSquared; in vec3 v_positionEC; @@ -10223,7 +10216,7 @@ vec4 computeEllipsoidColor(czm_ray ray, float intersection, float side) vec3 normalMC = geodeticNormal * side; // normalized surface normal (always facing the viewer) in model coordinates vec3 normalEC = normalize(czm_normal * normalMC); // normalized surface normal in eye coordinates - vec2 st = czm_ellipsoidWgs84TextureCoordinates(sphericalNormal); + vec2 st = czm_ellipsoidTextureCoordinates(sphericalNormal); vec3 positionToEyeEC = -positionEC; czm_materialInput materialInput; @@ -10313,7 +10306,7 @@ void main() #endif #endif } -`;var H1i=T(S(),1),vV=`in vec3 position; +`;var Afi=S(T(),1),yV=`in vec3 position; uniform vec3 u_radii; @@ -10341,7 +10334,7 @@ void main() czm_vertexLogDepth(); } -`;var K1i=T(S(),1);/** +`;var Nfi=S(T(),1);/** * @license * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. * @@ -10368,7 +10361,7 @@ void main() * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */var yw=`/** + */var Bv=`/** * @license * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. * @@ -11016,7 +11009,7 @@ FxaaFloat4 FxaaPixelShader( if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign; return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM); } -`;var Q1i=T(S(),1),xw=`uniform vec4 u_initialColor; +`;var kfi=S(T(),1),Yv=`uniform vec4 u_initialColor; #if TEXTURE_UNITS > 0 uniform sampler2D u_dayTextures[TEXTURE_UNITS]; @@ -11392,8 +11385,8 @@ void main() { mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC); - vec2 ellipsoidTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC); - vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC.zyx); + vec2 ellipsoidTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC); + vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC.zyx); vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z)); @@ -11672,7 +11665,7 @@ vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat } #endif // #ifdef SHOW_REFLECTIVE_OCEAN -`;var q1i=T(S(),1),_w=`#ifdef QUANTIZATION_BITS12 +`;var Bfi=S(T(),1),Ov=`#ifdef QUANTIZATION_BITS12 in vec4 compressed0; in float compressed1; #else @@ -11957,7 +11950,7 @@ void main() v_height = height; #endif } -`;var eVi=T(S(),1),wV=`void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) { +`;var Ofi=S(T(),1),xV=`void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) { vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC; vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC); @@ -11975,7 +11968,7 @@ void main() opacity ); } -`;var nVi=T(S(),1),Tw=`uniform sampler2D u_texture; +`;var Kfi=S(T(),1),zv=`uniform sampler2D u_texture; in vec2 v_textureCoordinates; @@ -11983,7 +11976,7 @@ void main() { out_FragColor = texture(u_texture, v_textureCoordinates); } -`;var oVi=T(S(),1),Sw=`in vec4 position; +`;var Jfi=S(T(),1),Kv=`in vec4 position; in float webMercatorT; uniform vec2 u_textureDimensions; @@ -11995,7 +11988,7 @@ void main() v_textureCoordinates = vec2(position.x, webMercatorT); gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0)); } -`;var sVi=T(S(),1),FV=`float interpolateByDistance(vec4 nearFarScalar, float distance) +`;var jfi=S(T(),1),_V=`float interpolateByDistance(vec4 nearFarScalar, float distance) { float startDistance = nearFarScalar.x; float startValue = nearFarScalar.y; @@ -12076,7 +12069,7 @@ void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0; opacity *= pow(nightAlpha, 0.5); } -`;var cVi=T(S(),1),Cw=`in vec3 v_outerPositionWC; +`;var $fi=S(T(),1),Hv=`in vec3 v_outerPositionWC; uniform vec3 u_hsbShift; @@ -12135,7 +12128,7 @@ void main (void) out_FragColor = color; } -`;var dVi=T(S(),1),Vw=`in vec4 position; +`;var tpi=S(T(),1),Jv=`in vec4 position; out vec3 v_outerPositionWC; @@ -12166,7 +12159,7 @@ void main(void) v_outerPositionWC = positionWC.xyz; gl_Position = czm_modelViewProjection * position; } -`;var mVi=T(S(),1),Lw=`uniform samplerCube u_cubeMap; +`;var ipi=S(T(),1),Qv=`uniform samplerCube u_cubeMap; in vec3 v_texCoord; @@ -12175,7 +12168,7 @@ void main() vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord)); out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime); } -`;var fVi=T(S(),1),Rw=`in vec3 position; +`;var rpi=S(T(),1),jv=`in vec3 position; out vec3 v_texCoord; @@ -12185,7 +12178,7 @@ void main() gl_Position = czm_projection * vec4(p, 1.0); v_texCoord = position.xyz; } -`;var bVi=T(S(),1),Zw=`uniform sampler2D u_texture; +`;var api=S(T(),1),qv=`uniform sampler2D u_texture; in vec2 v_textureCoordinates; @@ -12194,7 +12187,7 @@ void main() vec4 color = texture(u_texture, v_textureCoordinates); out_FragColor = czm_gammaCorrect(color); } -`;var yVi=T(S(),1),Gw=`uniform float u_radiusTS; +`;var lpi=S(T(),1),$v=`uniform float u_radiusTS; in vec2 v_textureCoordinates; @@ -12249,7 +12242,7 @@ void main() out_FragColor = clamp(color, vec4(0.0), vec4(1.0)); } -`;var _Vi=T(S(),1),Ew=`in vec2 direction; +`;var upi=S(T(),1),ew=`in vec2 direction; uniform float u_size; @@ -12277,7 +12270,7 @@ void main() v_textureCoordinates = direction; } -`;var SVi=T(S(),1),Xw=` +`;var hpi=S(T(),1),tw=` in vec2 v_textureCoordinates; void main() @@ -12293,8 +12286,19 @@ void main() out_FragColor = vec4(material.diffuse + material.emission, material.alpha); } -`;var jzi=T(S(),1);var WWi=T(S(),1);var vVi=T(S(),1);var RVi=T(S(),1);var Ert=new D;function Xrt(e,t){let n=e.unionClippingRegions,i=e.length,o=ss.useFloatTexture(t),r=ss.getTextureResolution(e,t,Ert),s=r.x,a=r.y,c=o?Prt(s,a):vrt(s,a);return c+=` -`,c+=n?Irt(i):Wrt(i),c}function Irt(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix) +`;var ppi=S(T(),1),uS=`in vec4 position; +in vec2 textureCoordinates; + +out vec2 v_textureCoordinates; + +void main() +{ + gl_Position = position; + v_textureCoordinates = textureCoordinates; +} +`;var aBi=S(T(),1);var ypi=S(T(),1);function Het(e){let t,n=e.name,i=e.message;l(n)&&l(i)?t=`${n}: ${i}`:t=e.toString();let o=e.stack;return l(o)&&(t+=` +${o}`),t}var vf=Het;var l1i=S(T(),1);var wbi=S(T(),1);var Lbi=S(T(),1);var _pi=S(T(),1),Jet={NONE:0,LERC:1},zu=Object.freeze(Jet);var jpi=S(T(),1);var vpi=S(T(),1);var Tpi=S(T(),1),Qet={NONE:0,BITS12:1},Os=Object.freeze(Qet);var mS=new h,jet=new h,Ku=new D,Ok=new A,qet=new A,$et=Math.pow(2,12);function bc(e,t,n,i,o,r,s,a,c,d){let u=Os.NONE,m,p;if(l(t)&&l(n)&&l(i)&&l(o)){let g=t.minimum,f=t.maximum,x=h.subtract(f,g,jet),_=i-n;Math.max(h.maximumComponent(x),_)<$et-1?u=Os.BITS12:u=Os.NONE,m=A.inverseTransformation(o,new A);let V=h.negate(g,mS);A.multiply(A.fromTranslation(V,Ok),m,m);let Z=mS;Z.x=1/x.x,Z.y=1/x.y,Z.z=1/x.z,A.multiply(A.fromScale(Z,Ok),m,m),p=A.clone(o),A.setTranslation(p,h.ZERO,p),o=A.clone(o,new A);let R=A.fromTranslation(g,Ok),G=A.fromScale(x,qet),W=A.multiply(R,G,Ok);A.multiply(o,W,o),A.multiply(p,W,p)}this.quantization=u,this.minimumHeight=n,this.maximumHeight=i,this.center=h.clone(e),this.toScaledENU=m,this.fromScaledENU=o,this.matrix=p,this.hasVertexNormals=r,this.hasWebMercatorT=y(s,!1),this.hasGeodeticSurfaceNormals=y(a,!1),this.exaggeration=y(c,1),this.exaggerationRelativeHeight=y(d,0),this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}bc.prototype.encode=function(e,t,n,i,o,r,s,a){let c=i.x,d=i.y;if(this.quantization===Os.BITS12){n=A.multiplyByPoint(this.toScaledENU,n,mS),n.x=X.clamp(n.x,0,1),n.y=X.clamp(n.y,0,1),n.z=X.clamp(n.z,0,1);let u=this.maximumHeight-this.minimumHeight,m=X.clamp((o-this.minimumHeight)/u,0,1);D.fromElements(n.x,n.y,Ku);let p=wn.compressTextureCoordinates(Ku);D.fromElements(n.z,m,Ku);let g=wn.compressTextureCoordinates(Ku);D.fromElements(c,d,Ku);let f=wn.compressTextureCoordinates(Ku);if(e[t++]=p,e[t++]=g,e[t++]=f,this.hasWebMercatorT){D.fromElements(s,0,Ku);let x=wn.compressTextureCoordinates(Ku);e[t++]=x}}else h.subtract(n,this.center,mS),e[t++]=mS.x,e[t++]=mS.y,e[t++]=mS.z,e[t++]=o,e[t++]=c,e[t++]=d,this.hasWebMercatorT&&(e[t++]=s);return this.hasVertexNormals&&(e[t++]=wn.octPackFloat(r)),this.hasGeodeticSurfaceNormals&&(e[t++]=a.x,e[t++]=a.y,e[t++]=a.z),t};var ett=new h,Cbe=new h;bc.prototype.addGeodeticSurfaceNormals=function(e,t,n){if(this.hasGeodeticSurfaceNormals)return;let i=this.stride,o=e.length/i;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let r=this.stride;for(let s=0;s0,g=y(e.isGeographic,!0),f=y(e.ellipsoid,te.default),x=1/f.maximumRadius,_=ce.clone(e.nativeRectangle),C=ce.clone(e.rectangle),V,Z,R,G;l(C)?(V=C.west,Z=C.south,R=C.east,G=C.north):g?(V=a(_.west),Z=a(_.south),R=a(_.east),G=a(_.north)):(V=_.west*x,Z=s-2*o(r(-_.south*x)),R=_.east*x,G=s-2*o(r(-_.north*x)));let W=e.relativeToCenter,v=l(W);W=v?W:h.ZERO;let P=y(e.includeWebMercatorT,!1),F=y(e.exaggeration,1),M=y(e.exaggerationRelativeHeight,0),L=F!==1,E=y(e.structure,wf.DEFAULT_STRUCTURE),I=y(E.heightScale,wf.DEFAULT_STRUCTURE.heightScale),w=y(E.heightOffset,wf.DEFAULT_STRUCTURE.heightOffset),N=y(E.elementsPerHeight,wf.DEFAULT_STRUCTURE.elementsPerHeight),B=y(E.stride,wf.DEFAULT_STRUCTURE.stride),k=y(E.elementMultiplier,wf.DEFAULT_STRUCTURE.elementMultiplier),O=y(E.isBigEndian,wf.DEFAULT_STRUCTURE.isBigEndian),U=ce.computeWidth(_),J=ce.computeHeight(_),z=U/(d-1),ee=J/(u-1);g||(U*=x,J*=x);let K=f.radiiSquared,j=K.x,q=K.y,be=K.z,Se=65536,ae=-65536,ye=Gt.eastNorthUpToFixedFrame(W,f),Te=A.inverseTransformation(ye,ttt),Ze,We;P&&(Ze=Zi.geodeticLatitudeToMercatorAngle(Z),We=1/(Zi.geodeticLatitudeToMercatorAngle(G)-Ze));let Pe=ntt;Pe.x=Number.POSITIVE_INFINITY,Pe.y=Number.POSITIVE_INFINITY,Pe.z=Number.POSITIVE_INFINITY;let Ue=itt;Ue.x=Number.NEGATIVE_INFINITY,Ue.y=Number.NEGATIVE_INFINITY,Ue.z=Number.NEGATIVE_INFINITY;let Pt=Number.POSITIVE_INFINITY,Ot=d*u,ht=m>0?d*2+u*2:0,Ae=Ot+ht,$e=new Array(Ae),Qe=new Array(Ae),je=new Array(Ae),Ut=P?new Array(Ae):[],pe=L?new Array(Ae):[],Ve=0,Dt=u,bt=0,li=d;p&&(--Ve,++Dt,--bt,++li);let Vo=1e-5;for(let qe=Ve;qe=u&&(dt=u-1);let Bt=_.north-ee*dt;g?Bt=a(Bt):Bt=s-2*o(r(-Bt*x));let Zn=(Bt-Z)/(G-Z);Zn=X.clamp(Zn,0,1);let Zo=qe===Ve,ir=qe===Dt-1;m>0&&(Zo?Bt+=Vo*J:ir&&(Bt-=Vo*J));let Ua=t(Bt),ka=n(Bt),oo=be*ka,Yi;P&&(Yi=(Zi.geodeticLatitudeToMercatorAngle(Bt)-Ze)*We);for(let hs=bt;hs=d&&(xr=d-1);let ul=dt*(d*B)+xr*B,Bo;if(N===1)Bo=c[ul];else{Bo=0;let ns;if(O)for(ns=0;ns=0;--ns)Bo=Bo*k+c[ul+ns]}Bo=Bo*I+w,ae=Math.max(ae,Bo),Se=Math.min(Se,Bo);let _r=_.west+z*xr;g?_r=a(_r):_r=_r*x;let h0=(_r-V)/(R-V);h0=X.clamp(h0,0,1);let Rc=dt*d+xr;if(m>0){let ns=hs===bt,f0=hs===li-1,p0=Zo||ir||ns||f0;if((Zo||ir)&&(ns||f0))continue;p0&&(Bo-=m,ns?(Rc=Ot+(u-dt-1),_r-=Vo*U):ir?Rc=Ot+u+(d-xr-1):f0?(Rc=Ot+u+d+dt,_r+=Vo*U):Zo&&(Rc=Ot+u+d+u+xr))}let Da=Ua*t(_r),ur=Ua*n(_r),xa=j*Da,ro=q*ur,$n=1/i(xa*Da+ro*ur+oo*ka),Gc=xa*$n,td=ro*$n,My=oo*$n,Sr=new h;Sr.x=Gc+Da*Bo,Sr.y=td+ur*Bo,Sr.z=My+ka*Bo,A.multiplyByPoint(Te,Sr,e4),h.minimumByComponent(e4,Pe,Pe),h.maximumByComponent(e4,Ue,Ue),Pt=Math.min(Pt,Bo),$e[Rc]=Sr,je[Rc]=new D(h0,Zn),Qe[Rc]=Bo,P&&(Ut[Rc]=Yi),L&&(pe[Rc]=f.geodeticSurfaceNormal(Sr))}}let Gs=le.fromPoints($e),Hs;l(C)&&(Hs=Gn.fromRectangle(C,Se,ae,f));let Ur;v&&(Ur=new _b(f).computeHorizonCullingPointPossiblyUnderEllipsoid(W,$e,Se));let ts=new R0(Pe,Ue,W),ke=new gc(W,ts,Pt,ae,ye,!1,P,L,F,M),ot=new Float32Array(Ae*ke.stride),nt=0;for(let qe=0;qe0?Z=Qr.getRegularGridAndSkirtIndicesAndEdgeIndices(V.gridWidth,V.gridHeight):Z=Qr.getRegularGridIndicesAndEdgeIndices(V.gridWidth,V.gridHeight);let R=V.gridWidth*V.gridHeight;return C._mesh=new Hu(m,new Float32Array(V.vertices),Z.indices,Z.indexCountWithoutSkirts,R,V.minimumHeight,V.maximumHeight,le.clone(V.boundingSphere3D),h.clone(V.occludeePointInScaledSpace),V.numberOfAttributes,Gn.clone(V.orientedBoundingBox),gc.clone(V.encoding),Z.westIndicesSouthToNorth,Z.southIndicesEastToWest,Z.eastIndicesNorthToSouth,Z.northIndicesWestToEast),C._buffer=void 0,C._mesh})};kb.prototype._createMeshSync=function(e){let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=t.ellipsoid,c=t.tileXYToNativeRectangle(n,i,o),d=t.tileXYToRectangle(n,i,o),u=a.cartographicToCartesian(ce.center(d)),m=this._structure,g=Qr.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<0?x=Qr.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):x=Qr.getRegularGridIndicesAndEdgeIndices(this._width,this._height);let _=f.gridWidth*f.gridHeight;return this._mesh=new Hu(u,f.vertices,x.indices,x.indexCountWithoutSkirts,_,f.minimumHeight,f.maximumHeight,f.boundingSphere3D,f.occludeePointInScaledSpace,f.encoding.stride,f.orientedBoundingBox,f.encoding,x.westIndicesSouthToNorth,x.southIndicesEastToWest,x.eastIndicesNorthToSouth,x.northIndicesWestToEast),this._mesh};kb.prototype.interpolateHeight=function(e,t,n){let i=this._width,o=this._height,r=this._structure,s=r.stride,a=r.elementsPerHeight,c=r.elementMultiplier,d=r.isBigEndian,u=r.heightOffset,m=r.heightScale,p=l(this._mesh),g=this._encoding===zu.LERC;if(!p&&g)return;let x;if(p){let _=this._mesh.vertices,C=this._mesh.encoding;x=Wbe(_,C,u,m,e,i,o,t,n)}else x=att(this._buffer,a,c,s,d,e,i,o,t,n),x=x*m+u;return x};kb.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(a))return;let c=this._width,d=this._height,u=this._structure,m=u.stride,p=new this._bufferType(c*d*m),g=a.vertices,f=a.encoding,x=e.tileXYToRectangle(t,n,i),_=e.tileXYToRectangle(o,r,s),C=u.heightOffset,V=u.heightScale,Z=u.elementsPerHeight,R=u.elementMultiplier,G=u.isBigEndian,W=Math.pow(R,Z-1);for(let v=0;vu.highestEncodedHeight?u.highestEncodedHeight:b,ctt(p,Z,R,W,m,G,v*c+F,b)}}return Promise.resolve(new kb({buffer:p,width:c,height:d,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))};kb.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<=s&&(g=s-1,p=s-2);let f=m|0,x=f+1;x>=a&&(x=a-1,f=a-2);let _=u-p,C=m-f;f=a-1-f,x=a-1-x;let V=Jk(e,t,n,i,o,f*s+p),Z=Jk(e,t,n,i,o,f*s+g),R=Jk(e,t,n,i,o,x*s+p),G=Jk(e,t,n,i,o,x*s+g);return Ibe(_,C,V,Z,R,G)}function Wbe(e,t,n,i,o,r,s,a,c){let d=(a-o.west)*(r-1)/(o.east-o.west),u=(c-o.south)*(s-1)/(o.north-o.south),m=d|0,p=m+1;p>=r&&(p=r-1,m=r-2);let g=u|0,f=g+1;f>=s&&(f=s-1,g=s-2);let x=d-m,_=u-g;g=s-1-g,f=s-1-f;let C=(t.decodeHeight(e,g*r+m)-n)/i,V=(t.decodeHeight(e,g*r+p)-n)/i,Z=(t.decodeHeight(e,f*r+m)-n)/i,R=(t.decodeHeight(e,f*r+p)-n)/i;return Ibe(x,_,C,V,Z,R)}function Ibe(e,t,n,i,o,r){return t=0;--a)s=s*n+e[r+a];return s}function ctt(e,t,n,i,o,r,s,a){s*=o;let c;if(r)for(c=0;c0;--c)e[s+c]=a/i|0,a-=e[s+c]*i,i/=n;e[s+c]=a}var Pa=kb;function TV(e){e=y(e,y.EMPTY_OBJECT),this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Ni({ellipsoid:y(e.ellipsoid,te.default)})),this._levelZeroMaximumGeometricError=Qr.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new ge}Object.defineProperties(TV.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});TV.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new Pa({buffer:new Uint8Array(16*16),width:16,height:16}))};TV.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<0&&(ye=X?v.clippingPlanesState:0);let Se=0;l(F)&&F.length>0&&(Se=P?F.clippingPolygonsState:0);let Le=n.surfaceShader;if(l(Le)&&Le.numberOfDayTextures===i&&Le.flags===ae&&Le.material===this.material&&Le.clippingShaderState===ye&&Le.clippingPolygonShaderState===Se)return Le.shaderProgram;let Xe=this._shadersByTexturesFlags[i];if(l(Xe)||(Xe=this._shadersByTexturesFlags[i]=[]),Le=Xe[ae],!l(Le)||Le.material!==this.material||Le.clippingShaderState!==ye||Le.clippingPolygonShaderState!==Se){let Pe=this.baseVertexShaderSource.clone(),ke=this.baseFragmentShaderSource.clone();ye!==0&&ke.sources.unshift(K0(v,t.context)),Se!==0&&(ke.sources.unshift(Art(t.context)),Pe.sources.unshift(Mrt(t.context))),Pe.defines.push(k),ke.defines.push(`TEXTURE_UNITS ${i}`,j,be),o&&ke.defines.push("APPLY_BRIGHTNESS"),r&&ke.defines.push("APPLY_CONTRAST"),s&&ke.defines.push("APPLY_HUE"),a&&ke.defines.push("APPLY_SATURATION"),c&&ke.defines.push("APPLY_GAMMA"),d&&ke.defines.push("APPLY_ALPHA"),u&&ke.defines.push("APPLY_DAY_NIGHT_ALPHA"),p&&(ke.defines.push("SHOW_REFLECTIVE_OCEAN"),Pe.defines.push("SHOW_REFLECTIVE_OCEAN")),g&&ke.defines.push("SHOW_OCEAN_WAVES"),I&&ke.defines.push("APPLY_COLOR_TO_ALPHA"),B&&(Pe.defines.push("UNDERGROUND_COLOR"),ke.defines.push("UNDERGROUND_COLOR")),U&&(Pe.defines.push("TRANSLUCENT"),ke.defines.push("TRANSLUCENT")),f&&(L?(Pe.defines.push("ENABLE_VERTEX_LIGHTING"),ke.defines.push("ENABLE_VERTEX_LIGHTING")):(Pe.defines.push("ENABLE_DAYNIGHT_SHADING"),ke.defines.push("ENABLE_DAYNIGHT_SHADING"))),x&&(Pe.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),ke.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),_&&(Pe.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"),ke.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"))),C&&(Pe.defines.push("GROUND_ATMOSPHERE"),ke.defines.push("GROUND_ATMOSPHERE"),V&&(Pe.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"),ke.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"))),Pe.defines.push("INCLUDE_WEB_MERCATOR_Y"),ke.defines.push("INCLUDE_WEB_MERCATOR_Y"),G&&(Pe.defines.push("FOG"),ke.defines.push("FOG")),m&&ke.defines.push("APPLY_SPLIT"),X&&ke.defines.push("ENABLE_CLIPPING_PLANES"),P&&(ke.defines.push("ENABLE_CLIPPING_POLYGONS"),Pe.defines.push("ENABLE_CLIPPING_POLYGONS"),F.inverse&&ke.defines.push("CLIPPING_INVERSE"),ke.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${F.extentsCount}`),Pe.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${F.extentsCount}`)),R&&ke.defines.push("COLOR_CORRECT"),E&&ke.defines.push("HIGHLIGHT_FILL_TILE"),w&&Pe.defines.push("GEODETIC_SURFACE_NORMALS"),N&&Pe.defines.push("EXAGGERATION");let Pt=` vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend) + }`}function xtt(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}t4.prototype.getShaderProgram=function(e){let t=e.frameState,n=e.surfaceTile,i=e.numberOfDayTextures,o=e.applyBrightness,r=e.applyContrast,s=e.applyHue,a=e.applySaturation,c=e.applyGamma,d=e.applyAlpha,u=e.applyDayNightAlpha,m=e.applySplit,p=e.showReflectiveOcean,g=e.showOceanWaves,f=e.enableLighting,x=e.dynamicAtmosphereLighting,_=e.dynamicAtmosphereLightingFromSun,C=e.showGroundAtmosphere,V=e.perFragmentGroundAtmosphere,Z=e.hasVertexNormals,R=e.useWebMercatorProjection,G=e.enableFog,W=e.enableClippingPlanes,v=e.clippingPlanes,P=e.enableClippingPolygons,F=e.clippingPolygons,M=e.clippedByBoundaries,b=e.hasImageryLayerCutout,L=e.colorCorrect,E=e.highlightFillTile,I=e.colorToAlpha,w=e.hasGeodeticSurfaceNormals,N=e.hasExaggeration,B=e.showUndergroundColor,k=e.translucent,O=0,U="",z=n.renderedMesh.encoding;z.quantization===Os.BITS12&&(O=1,U="QUANTIZATION_BITS12");let K=0,j="";M&&(K=1,j="TILE_LIMIT_RECTANGLE");let q=0,be="";b&&(q=1,be="APPLY_IMAGERY_CUTOUT");let Se=t.mode,ae=Se|o<<2|r<<3|s<<4|a<<5|c<<6|d<<7|p<<8|g<<9|f<<10|x<<11|_<<12|C<<13|V<<14|Z<<15|R<<16|G<<17|O<<18|m<<19|W<<20|P<<21|K<<22|q<<23|L<<24|E<<25|I<<26|w<<27|N<<28|B<<29|k<<30|u<<31,ye=0;l(v)&&v.length>0&&(ye=W?v.clippingPlanesState:0);let Te=0;l(F)&&F.length>0&&(Te=P?F.clippingPolygonsState:0);let Ze=n.surfaceShader;if(l(Ze)&&Ze.numberOfDayTextures===i&&Ze.flags===ae&&Ze.material===this.material&&Ze.clippingShaderState===ye&&Ze.clippingPolygonShaderState===Te)return Ze.shaderProgram;let We=this._shadersByTexturesFlags[i];if(l(We)||(We=this._shadersByTexturesFlags[i]=[]),Ze=We[ae],!l(Ze)||Ze.material!==this.material||Ze.clippingShaderState!==ye||Ze.clippingPolygonShaderState!==Te){let Pe=this.baseVertexShaderSource.clone(),Ue=this.baseFragmentShaderSource.clone();ye!==0&&Ue.sources.unshift(Db(v,t.context)),Te!==0&&(Ue.sources.unshift(gtt(t.context)),Pe.sources.unshift(ytt(t.context))),Pe.defines.push(U),Ue.defines.push(`TEXTURE_UNITS ${i}`,j,be),o&&Ue.defines.push("APPLY_BRIGHTNESS"),r&&Ue.defines.push("APPLY_CONTRAST"),s&&Ue.defines.push("APPLY_HUE"),a&&Ue.defines.push("APPLY_SATURATION"),c&&Ue.defines.push("APPLY_GAMMA"),d&&Ue.defines.push("APPLY_ALPHA"),u&&Ue.defines.push("APPLY_DAY_NIGHT_ALPHA"),p&&(Ue.defines.push("SHOW_REFLECTIVE_OCEAN"),Pe.defines.push("SHOW_REFLECTIVE_OCEAN")),g&&Ue.defines.push("SHOW_OCEAN_WAVES"),I&&Ue.defines.push("APPLY_COLOR_TO_ALPHA"),B&&(Pe.defines.push("UNDERGROUND_COLOR"),Ue.defines.push("UNDERGROUND_COLOR")),k&&(Pe.defines.push("TRANSLUCENT"),Ue.defines.push("TRANSLUCENT")),f&&(Z?(Pe.defines.push("ENABLE_VERTEX_LIGHTING"),Ue.defines.push("ENABLE_VERTEX_LIGHTING")):(Pe.defines.push("ENABLE_DAYNIGHT_SHADING"),Ue.defines.push("ENABLE_DAYNIGHT_SHADING"))),x&&(Pe.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),Ue.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),_&&(Pe.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"),Ue.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"))),C&&(Pe.defines.push("GROUND_ATMOSPHERE"),Ue.defines.push("GROUND_ATMOSPHERE"),V&&(Pe.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"),Ue.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"))),Pe.defines.push("INCLUDE_WEB_MERCATOR_Y"),Ue.defines.push("INCLUDE_WEB_MERCATOR_Y"),G&&(Pe.defines.push("FOG"),Ue.defines.push("FOG")),m&&Ue.defines.push("APPLY_SPLIT"),W&&Ue.defines.push("ENABLE_CLIPPING_PLANES"),P&&(Ue.defines.push("ENABLE_CLIPPING_POLYGONS"),Pe.defines.push("ENABLE_CLIPPING_POLYGONS"),F.inverse&&Ue.defines.push("CLIPPING_INVERSE"),Ue.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${F.extentsCount}`),Pe.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${F.extentsCount}`)),L&&Ue.defines.push("COLOR_CORRECT"),E&&Ue.defines.push("HIGHLIGHT_FILL_TILE"),w&&Pe.defines.push("GEODETIC_SURFACE_NORMALS"),N&&Pe.defines.push("EXAGGERATION");let Pt=` vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend) { vec4 color = initialColor; `;b&&(Pt+=` vec4 cutoutAndColorResult; @@ -12400,8 +12404,101 @@ ${o?`u_dayTextureBrightness[${ht}]`:"0.0"}, nightBlend ); `,b&&(Pt+=` color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color); `);Pt+=` return color; - }`,ke.sources.push(Pt),Pe.sources.push(Frt(Te)),Pe.sources.push(Nrt(Z));let Ot=qt.fromCache({context:t.context,vertexShaderSource:Pe,fragmentShaderSource:ke,attributeLocations:H.getAttributeLocations()});Le=Xe[ae]=new wrt(i,ae,this.material,Ot,ye,Se)}return n.surfaceShader=Le,Le.shaderProgram};gj.prototype.destroy=function(){let e,t,n=this._shadersByTexturesFlags;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];if(!l(o))continue;for(e in o)o.hasOwnProperty(e)&&(t=o[e],l(t)&&t.shaderProgram.destroy())}return me(this)};var Iw=gj;var aIi=T(S(),1);var pLi=T(S(),1);var FVi=T(S(),1),krt={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7},ai=Object.freeze(krt);var MVi=T(S(),1),Urt={START:0,LOADING:1,DONE:2,FAILED:3},Os=Object.freeze(Urt);var kVi=T(S(),1),Drt={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6},so=Object.freeze(Drt);function qo(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new h,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=so.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new le,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}Object.defineProperties(qo.prototype,{eligibleForUnloading:{get:function(){let e=this.terrainState,n=!(e===so.RECEIVING||e===so.TRANSFORMING),i=this.imagery;for(let o=0,r=i.length;n&&o=0&&(u=V)}return u!==Number.MAX_VALUE?pn.getPoint(e,u,o):void 0};qo.prototype.freeResources=function(){l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,this.terrainState=so.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();let e=this.imagery;for(let t=0,n=e.length;t=so.RECEIVED&&s.waterMaskTexture===void 0&&n.hasWaterMask)if(s.terrainData.waterMask!==void 0)tst(t.context,s);else{let d=s._findAncestorTileWithTerrainData(e);l(d)&&l(d.data.waterMaskTexture)&&(s.waterMaskTexture=d.data.waterMaskTexture,++s.waterMaskTexture.referenceCount,s._computeWaterMaskTranslationAndScale(e,d,s.waterMaskTranslationAndScale))}}function Jrt(e,t,n,i,o,r,s){let a=t.parent;if(!a){t.state=Os.FAILED;return}let c=a.data.terrainData,d=a.x,u=a.y,m=a.level;if(!l(c))return;let p=c.upsample(i.tilingScheme,d,u,m,o,r,s);l(p)&&(e.terrainState=so.RECEIVING,Promise.resolve(p).then(function(g){l(g)&&(e.terrainData=g,e.terrainState=so.RECEIVED)}).catch(function(){e.terrainState=so.FAILED}))}function Qrt(e,t,n,i,o){function r(c){if(!l(c)){e.terrainState=so.UNLOADED,e.request=void 0;return}e.terrainData=c,e.terrainState=so.RECEIVED,e.request=void 0}function s(c){if(e.request.state===Qn.CANCELLED){e.terrainData=void 0,e.terrainState=so.UNLOADED,e.request=void 0;return}e.terrainState=so.FAILED,e.request=void 0;let d=`Failed to obtain terrain tile X: ${n} Y: ${i} Level: ${o}. Error message: "${c}"`;t._requestError=Co.reportError(t._requestError,t,t.errorEvent,d,n,i,o),t._requestError.retry&&a()}function a(){let c=new Yo({throttle:!1,throttleByServer:!0,type:ns.TERRAIN});e.request=c;let d=t.requestTileGeometry(n,i,o,c);l(d)?(e.terrainState=so.RECEIVING,Promise.resolve(d).then(function(u){r(u)}).catch(function(u){s(u)})):(e.terrainState=so.UNLOADED,e.request=void 0)}a()}var jrt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};function qrt(e,t,n,i,o,r){let s=n.tilingScheme,a=jrt;a.tilingScheme=s,a.x=i,a.y=o,a.level=r,a.exaggeration=t.verticalExaggeration,a.exaggerationRelativeHeight=t.verticalExaggerationRelativeHeight,a.throttle=!0;let d=e.terrainData.createMesh(a);l(d)&&(e.terrainState=so.TRANSFORMING,Promise.resolve(d).then(function(u){e.mesh=u,e.terrainState=so.TRANSFORMED}).catch(function(){e.terrainState=so.FAILED}))}qo._createVertexArrayForMesh=function(e,t){let n=t.vertices,i=ft.createVertexBuffer({context:e,typedArray:n,usage:Ne.STATIC_DRAW}),o=t.encoding.getAttributes(i),r=t.indices.indexBuffers||{},s=r[e.id];if(!l(s)||s.isDestroyed()){let a=t.indices;s=ft.createIndexBuffer({context:e,typedArray:a,usage:Ne.STATIC_DRAW,indexDatatype:Me.fromSizeInBytes(a.BYTES_PER_ELEMENT)}),s.vertexArrayDestroyable=!1,s.referenceCount=1,r[e.id]=s,t.indices.indexBuffers=r}else++s.referenceCount;return new ei({context:e,attributes:o,indexBuffer:s})};qo._freeVertexArray=function(e){if(l(e)){let t=e.indexBuffer;e.isDestroyed()||e.destroy(),l(t)&&!t.isDestroyed()&&l(t.referenceCount)&&(--t.referenceCount,t.referenceCount===0&&t.destroy())}};function $rt(e,t,n,i,o,r,s){e.vertexArray=qo._createVertexArrayForMesh(t,e.mesh),e.terrainState=so.READY,e.fill=e.fill&&e.fill.destroy(s)}function est(e){let t=e.cache.tile_waterMaskData;if(!l(t)){let n=Et.create({context:e,pixelFormat:at.LUMINANCE,pixelDatatype:ze.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});n.referenceCount=1;let i=new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.LINEAR,magnificationFilter:di.LINEAR});t={allWaterTexture:n,sampler:i,destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function tst(e,t){let n=t.terrainData.waterMask,i=est(e),o,r=n.length;if(r===1)if(n[0]!==0)o=i.allWaterTexture;else return;else{let s=Math.sqrt(r);o=Et.create({context:e,pixelFormat:at.LUMINANCE,pixelDatatype:ze.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:i.sampler,flipY:!1}),o.referenceCount=0}++o.referenceCount,t.waterMaskTexture=o,se.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}qo.prototype._findAncestorTileWithTerrainData=function(e){let t=e.parent;for(;l(t)&&(!l(t.data)||!l(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t};qo.prototype._computeWaterMaskTranslationAndScale=function(e,t,n){let i=t.rectangle,o=e.rectangle,r=o.width,s=o.height,a=r/i.width,c=s/i.height;return n.x=a*(o.west-i.west)/r,n.y=c*(o.south-i.south)/s,n.z=a,n.w=c,n};var qu=qo;var FEi=T(S(),1);var UGi=T(S(),1);var vGi=T(S(),1);var rRi=T(S(),1);var _Li=T(S(),1);var nst="AAPKe2b57a40e4744c2e8595243dbdd7b2behCc4fIPuxORpch9ruOmWtyu3tsIxneD_O-1J2i9KAogQnE7_9Nl5gDhPJsKXsmqp",xj,ist="AAPKe5e6f1571ad74096bfacbdf289c5cdb687BUrehhWYnNo9tN4coC66_qhHDNruh3ygZV90buspkWdOqZUq6tb0kCb_dms9Ir",AV={};AV.defaultAccessToken=nst;AV.defaultWorldImageryServer=new Ee({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"});AV.defaultWorldHillshadeServer=new Ee({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"});AV.defaultWorldOceanServer=new Ee({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"});AV.getDefaultTokenCredit=function(e){if(e===ist){if(!l(xj)){let t=' This application is using a default ArcGIS access token. Please assign Cesium.ArcGisMapService.defaultAccessToken with an API key from your ArcGIS Developer account before using the ArcGIS tile services. You can sign up for a free ArcGIS Developer account at https://developers.arcgis.com/.';xj=new Vt(t,!0)}return xj}};var Od=AV;var RLi=T(S(),1);function _j(e){e=y(e,y.EMPTY_OBJECT),this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;let t=Ee.createIfNeeded(e.missingImageUrl),n=this;function i(r){l(r.blob)&&(n._missingImageByteLength=r.blob.size);let s=mm(r);if(e.disableCheckIfAllPixelsAreTransparent){let a=!0,c=r.width,d=e.pixelsToCheck;for(let u=0,m=d.length;a&&u0&&(a=!1)}a&&(s=void 0)}n._missingImagePixels=s,n._isReady=!0}function o(){n._missingImagePixels=void 0,n._isReady=!0}t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then(i).catch(o)}_j.prototype.isReady=function(){return this._isReady};_j.prototype.shouldDiscardImage=function(e){let t=this._pixelsToCheck,n=this._missingImagePixels;if(!l(n)||l(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;let i=mm(e),o=e.width;for(let r=0,s=t.length;r1&&o==="name"?(t=1,n=i):t>2&&o==="title"?(t=2,n=i):t>3&&/name/i.test(i)?(t=3,n=i):t>4&&/title/i.test(i)&&(t=4,n=i)}l(n)&&(this.name=e[n])};Tj.prototype.configureDescriptionFromProperties=function(e){function t(n){let i='';for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];l(r)&&(typeof r=="object"?i+=``:i+=``)}return i+="
${o}${t(r)}
${o}${r}
",i}this.description=t(e)};var Sh=Tj;var wLi=T(S(),1);function MV(){fe.throwInstantiationError()}Object.defineProperties(MV.prototype,{rectangle:{get:fe.throwInstantiationError},tileWidth:{get:fe.throwInstantiationError},tileHeight:{get:fe.throwInstantiationError},maximumLevel:{get:fe.throwInstantiationError},minimumLevel:{get:fe.throwInstantiationError},tilingScheme:{get:fe.throwInstantiationError},tileDiscardPolicy:{get:fe.throwInstantiationError},errorEvent:{get:fe.throwInstantiationError},credit:{get:fe.throwInstantiationError},proxy:{get:fe.throwInstantiationError},hasAlphaChannel:{get:fe.throwInstantiationError}});MV.prototype.getTileCredits=function(e,t,n){fe.throwInstantiationError()};MV.prototype.requestImage=function(e,t,n,i){fe.throwInstantiationError()};MV.prototype.pickFeatures=function(e,t,n,i,o){fe.throwInstantiationError()};var ost=/\.ktx2$/i;MV.loadImage=function(e,t){let n=Ee.createIfNeeded(t);return ost.test(n.url)?yl(n):l(e)&&l(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):n.fetchImage({preferImageBitmap:!0,flipY:!0})};var rl=MV;var ALi=T(S(),1),rst={SATELLITE:1,OCEANS:2,HILLSHADE:3},Ch=Object.freeze(rst);function bge(e){this.useTiles=y(e.usePreCachedTilesIfAvailable,!0);let t=e.ellipsoid;this.tilingScheme=y(e.tilingScheme,new Mi({ellipsoid:t})),this.rectangle=y(e.rectangle,this.tilingScheme.rectangle),this.ellipsoid=t;let n=e.credit;typeof n=="string"&&(n=new Vt(n)),this.credit=n,this.tileCredits=void 0,this.tileDiscardPolicy=e.tileDiscardPolicy,this.tileWidth=y(e.tileWidth,256),this.tileHeight=y(e.tileHeight,256),this.maximumLevel=e.maximumLevel}bge.prototype.build=function(e){e._useTiles=this.useTiles,e._tilingScheme=this.tilingScheme,e._rectangle=this.rectangle,e._credit=this.credit,e._tileCredits=this.tileCredits,e._tileDiscardPolicy=this.tileDiscardPolicy,e._tileWidth=this.tileWidth,e._tileHeight=this.tileHeight,e._maximumLevel=this.maximumLevel,this.useTiles&&!l(this.tileDiscardPolicy)&&(e._tileDiscardPolicy=new Ww({missingImageUrl:gge(e,0,0,this.maximumLevel).url,pixelsToCheck:[new D(0,0),new D(200,20),new D(20,200),new D(80,110),new D(160,130)],disableCheckIfAllPixelsAreTransparent:!0}))};function sst(e,t){let n=e.tileInfo;if(!l(n))t.useTiles=!1;else{if(t.tileWidth=n.rows,t.tileHeight=n.cols,n.spatialReference.wkid===102100||n.spatialReference.wkid===102113)t.tilingScheme=new Jr({ellipsoid:t.ellipsoid});else if(e.tileInfo.spatialReference.wkid===4326)t.tilingScheme=new Mi({ellipsoid:t.ellipsoid});else{let i=`Tile spatial reference WKID ${e.tileInfo.spatialReference.wkid} is not supported.`;throw new ue(i)}if(t.maximumLevel=e.tileInfo.lods.length-1,l(e.fullExtent)){if(l(e.fullExtent.spatialReference)&&l(e.fullExtent.spatialReference.wkid))if(e.fullExtent.spatialReference.wkid===102100||e.fullExtent.spatialReference.wkid===102113){let i=new Vi,o=e.fullExtent,r=i.unproject(new h(Math.max(o.xmin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(o.ymin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),s=i.unproject(new h(Math.min(o.xmax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(o.ymax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0));t.rectangle=new ce(r.longitude,r.latitude,s.longitude,s.latitude)}else if(e.fullExtent.spatialReference.wkid===4326)t.rectangle=ce.fromDegrees(e.fullExtent.xmin,e.fullExtent.ymin,e.fullExtent.xmax,e.fullExtent.ymax);else{let i=`fullExtent.spatialReference WKID ${e.fullExtent.spatialReference.wkid} is not supported.`;throw new ue(i)}}else t.rectangle=t.tilingScheme.rectangle;t.useTiles=!0}l(e.copyrightText)&&e.copyrightText.length>0&&(l(t.credit)?t.tileCredits=[new Vt(e.copyrightText)]:t.credit=new Vt(e.copyrightText))}function ast(e,t){let n=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(n+=`: ${t.message}`),new ue(n)}async function cst(e,t){let n=e.getDerivedResource({queryParameters:{f:"json"}});try{let i=await n.fetchJson();sst(i,t)}catch(i){ast(e,i)}}function kf(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=y(e.tileWidth,256),this._tileHeight=y(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=y(e.tilingScheme,new Mi({ellipsoid:e.ellipsoid})),this._useTiles=y(e.usePreCachedTilesIfAvailable,!0),this._rectangle=y(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,this._credit=e.credit,this._tileCredits=void 0;let t=e.credit;typeof t=="string"&&(t=new Vt(t)),this.enablePickFeatures=y(e.enablePickFeatures,!0),this._errorEvent=new ge}kf.fromBasemapType=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n,i,o;switch(e){case Ch.SATELLITE:{n=y(t.token,Od.defaultAccessToken),i=Ee.createIfNeeded(Od.defaultWorldImageryServer),i.appendForwardSlash();let r=Od.getDefaultTokenCredit(n);l(r)&&(o=Vt.clone(r))}break;case Ch.OCEANS:{n=y(t.token,Od.defaultAccessToken),i=Ee.createIfNeeded(Od.defaultWorldOceanServer),i.appendForwardSlash();let r=Od.getDefaultTokenCredit(n);l(r)&&(o=Vt.clone(r))}break;case Ch.HILLSHADE:{n=y(t.token,Od.defaultAccessToken),i=Ee.createIfNeeded(Od.defaultWorldHillshadeServer),i.appendForwardSlash();let r=Od.getDefaultTokenCredit(n);l(r)&&(o=Vt.clone(r))}break;default:}return kf.fromUrl(i,{...t,token:n,credit:o,usePreCachedTilesIfAvailable:!0})};function gge(e,t,n,i,o){let r;if(e._useTiles)r=e._resource.getDerivedResource({url:`tile/${i}/${n}/${t}`,request:o});else{let s=e._tilingScheme.tileXYToNativeRectangle(t,n,i),c={bbox:`${s.west},${s.south},${s.east},${s.north}`,size:`${e._tileWidth},${e._tileHeight}`,format:"png32",transparent:!0,f:"image"};e._tilingScheme.projection instanceof Si?(c.bboxSR=4326,c.imageSR=4326):(c.bboxSR=3857,c.imageSR=3857),e.layers&&(c.layers=`show:${e.layers}`),r=e._resource.getDerivedResource({url:"export",request:o,queryParameters:c})}return r}Object.defineProperties(kf.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}});kf.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n=Ee.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&n.setQueryParameters({token:t.token});let i=new kf(t);i._resource=n;let o=new bge(t);return y(t.usePreCachedTilesIfAvailable,!0)&&await cst(n,o),o.build(i),i};kf.prototype.getTileCredits=function(e,t,n){return this._tileCredits};kf.prototype.requestImage=function(e,t,n,i){return rl.loadImage(this,gge(this,e,t,n,i))};kf.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures)return;let r=this._tilingScheme.tileXYToNativeRectangle(e,t,n),s,a,c;if(this._tilingScheme.projection instanceof Si)s=W.toDegrees(i),a=W.toDegrees(o),c="4326";else{let p=this._tilingScheme.projection.project(new he(i,o,0));s=p.x,a=p.y,c="3857"}let d="visible";l(this._layers)&&(d+=`:${this._layers}`);let u={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:`${s},${a}`,mapExtent:`${r.west},${r.south},${r.east},${r.north}`,imageDisplay:`${this._tileWidth},${this._tileHeight},96`,sr:c,layers:d};return this._resource.getDerivedResource({url:"identify",queryParameters:u}).fetchJson().then(function(p){let g=[],f=p.results;if(!l(f))return g;for(let x=0;x`),this._tilingScheme=new Jr({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._attributionList=void 0,this._errorEvent=new ge}Object.defineProperties(Cs.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},mapLayer:{get:function(){return this._mapLayer}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return l(this.mapLayer)}}});Cs.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n=t.tileProtocol;l(n)?n.length>0&&n[n.length-1]===":"&&(n=n.substr(0,n.length-1)):n=document.location.protocol==="http:"?"http":"https";let i=y(t.mapStyle,NV.AERIAL),o=Ee.createIfNeeded(e);o.appendForwardSlash();let r={incl:"ImageryProviders",key:t.key,uriScheme:n};l(t.mapLayer)&&(r.mapLayer=t.mapLayer),l(t.culture)&&(r.culture=t.culture);let s=o.getDerivedResource({url:`REST/v1/Imagery/Metadata/${i}`,queryParameters:r}),a=new Cs(t);a._resource=o;let c=new yge(t);return await mst(s,c),c.build(a),a};var hst=new ce;Cs.prototype.getTileCredits=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(e,t,n,hst);return bst(this._attributionList,n,i)};Cs.prototype.requestImage=function(e,t,n,i){let o=rl.loadImage(this,fst(this,e,t,n,i));if(l(o))return o.catch(function(r){return l(r.blob)&&r.blob.size===0?kV.EMPTY_IMAGE:Promise.reject(r)})};Cs.prototype.pickFeatures=function(e,t,n,i,o){};Cs.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<=0;--o){let r=1<=m.zoomMin&&t<=m.zoomMax){let p=ce.intersection(n,m.bbox,pst);l(p)&&(c=!0)}}c&&i.push(s.credit)}return i}Cs._metadataCache={};var vw=Cs;var iZi=T(S(),1);var DRi=T(S(),1);var xge=/{[^}]+}/g,_ge={x:_st,y:Sst,z:Lst,s:Rst,reverseX:Tst,reverseY:Cst,reverseZ:Vst,westDegrees:Zst,southDegrees:Gst,eastDegrees:Est,northDegrees:Xst,westProjected:Ist,southProjected:Wst,eastProjected:Pst,northProjected:vst,width:wst,height:Fst},gst=xt(_ge,{i:Ast,j:Mst,reverseI:Nst,reverseJ:kst,longitudeDegrees:Dst,latitudeDegrees:Bst,longitudeProjected:Yst,latitudeProjected:Ost,format:zst});function ww(e){e=y(e,y.EMPTY_OBJECT),this._errorEvent=new ge;let t=Ee.createIfNeeded(e.url),n=Ee.createIfNeeded(e.pickFeaturesUrl);this._resource=t,this._urlSchemeZeroPadding=e.urlSchemeZeroPadding,this._getFeatureInfoFormats=e.getFeatureInfoFormats,this._pickFeaturesResource=n;let i=e.subdomains;Array.isArray(i)?i=i.slice():l(i)&&i.length>0?i=i.split(""):i=["a","b","c"],this._subdomains=i,this._tileWidth=y(e.tileWidth,256),this._tileHeight=y(e.tileHeight,256),this._minimumLevel=y(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._tilingScheme=y(e.tilingScheme,new Jr({ellipsoid:e.ellipsoid})),this._rectangle=y(e.rectangle,this._tilingScheme.rectangle),this._rectangle=ce.intersection(this._rectangle,this._tilingScheme.rectangle),this._tileDiscardPolicy=e.tileDiscardPolicy;let o=e.credit;typeof o=="string"&&(o=new Vt(o)),this._credit=o,this._hasAlphaChannel=y(e.hasAlphaChannel,!0);let r=e.customTags,s=xt(_ge,r),a=xt(gst,r);this._tags=s,this._pickFeaturesTags=a,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this.enablePickFeatures=y(e.enablePickFeatures,!0)}Object.defineProperties(ww.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}});ww.prototype.getTileCredits=function(e,t,n){};ww.prototype.requestImage=function(e,t,n,i){return rl.loadImage(this,yst(this,e,t,n,i))};ww.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures||!l(this._pickFeaturesResource)||this._getFeatureInfoFormats.length===0)return;let r=0,s=this;function a(d,u){return d.callback(u)}function c(){if(r>=s._getFeatureInfoFormats.length)return Promise.resolve([]);let d=s._getFeatureInfoFormats[r],u=xst(s,e,t,n,i,o,d.format);return++r,d.type==="json"?u.fetchJson().then(d.callback).catch(c):d.type==="xml"?u.fetchXML().then(d.callback).catch(c):d.type==="text"||d.type==="html"?u.fetchText().then(d.callback).catch(c):u.fetch({responseType:d.format}).then(a.bind(void 0,d)).catch(c)}return c()};var gD=!1,Hd=new ce,yD=!1,Fw=new ce;function yst(e,t,n,i,o){gD=!1,yD=!1;let r=e._resource,s=r.getUrlComponent(!0),a=e._tags,c={},d=s.match(xge);return l(d)&&d.forEach(function(u){let m=u.substring(1,u.length-1);l(a[m])&&(c[m]=a[m](e,t,n,i))}),r.getDerivedResource({request:o,templateValues:c})}var Sj=!1,DV=new D,Cj=!1;function xst(e,t,n,i,o,r,s){gD=!1,yD=!1,Sj=!1,Cj=!1;let a=e._pickFeaturesResource,c=a.getUrlComponent(!0),d=e._pickFeaturesTags,u={},m=c.match(xge);return l(m)&&m.forEach(function(p){let g=p.substring(1,p.length-1);l(d[g])&&(u[g]=d[g](e,t,n,i,o,r,s))}),a.getDerivedResource({templateValues:u})}function BV(e,t,n){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){let i=e.urlSchemeZeroPadding[t];if(typeof i=="string"){let o=i.length;o>1&&(n=n.length>=o?n:new Array(o-n.toString().length+1).join("0")+n)}}return n}function _st(e,t,n,i){return BV(e,"{x}",t)}function Tst(e,t,n,i){let o=e.tilingScheme.getNumberOfXTilesAtLevel(i)-t-1;return BV(e,"{reverseX}",o)}function Sst(e,t,n,i){return BV(e,"{y}",n)}function Cst(e,t,n,i){let o=e.tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;return BV(e,"{reverseY}",o)}function Vst(e,t,n,i){let o=e.maximumLevel,r=l(o)&&it.rectangle.east&&(e.east=t.rectangle.east),e.southt.rectangle.north&&(e.north=t.rectangle.north),e}function Sge(e,t,n){let i=e.positionToTileXY(ce.southwest(t),n),o=e.positionToTileXY(ce.northeast(t),n);return(Math.abs(o.x-i.x)+1)*(Math.abs(o.y-i.y)+1)>4?0:n}$u._metadataSuccess=function(e,t,n,i,o){let r=/tileformat/i,s=/tileset/i,a=/tilesets/i,c=/boundingbox/i,d,u,m,p=[],g=e.childNodes[0].childNodes;for(let P=0;P`),this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new ge}Object.defineProperties(Jl.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},version:{get:function(){return this._version}},requestType:{get:function(){return this._requestType}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});Jl.fromUrl=async function(e,t,n){n=y(n,{});let i=y(n.path,"/default_map"),o=Ee.createIfNeeded(e).getDerivedResource({url:i[0]==="/"?i.substring(1):i});o.appendForwardSlash();let r=o.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),s=new Cge(n);s.channel=t,await Qst(r,s);let a=new Jl(n);return s.build(a),a._resource=o,a._url=e,a._path=i,a};Jl.prototype.getTileCredits=function(e,t,n){};Jl.prototype.requestImage=function(e,t,n,i){let o=this._resource.getDerivedResource({url:"query",request:i,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:n+1}});return rl.loadImage(this,o)};Jl.prototype.pickFeatures=function(e,t,n,i,o){};Jl._logoUrl=void 0;Object.defineProperties(Jl,{logoUrl:{get:function(){return l(Jl._logoUrl)||(Jl._logoUrl=tn("Assets/Images/google_earth_credit.png")),Jl._logoUrl},set:function(e){Jl._logoUrl=e}}});var Aw=Jl;var VZi=T(S(),1);var jst=/\/$/,Vge=new Vt('© Mapbox © OpenStreetMap Improve this map');function YV(e){e=y(e,y.EMPTY_OBJECT);let t=e.mapId,n=e.accessToken;this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=Ee.createIfNeeded(y(e.url,"https://{s}.tiles.mapbox.com/v4/"));this._mapId=t,this._accessToken=n;let o=y(e.format,"png");/\./.test(o)||(o=`.${o}`),this._format=o;let r=i.getUrlComponent();jst.test(r)||(r+="/"),r+=`${t}/{z}/{x}/{y}${this._format}`,i.url=r,i.setQueryParameters({access_token:n});let s;l(e.credit)?(s=e.credit,typeof s=="string"&&(s=new Vt(s))):s=Vge,this._resource=i,this._imageryProvider=new wa({url:i,credit:s,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(YV.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});YV.prototype.getTileCredits=function(e,t,n){};YV.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};YV.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};YV._defaultCredit=Vge;var Mw=YV;var FZi=T(S(),1);function GT(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let t=y(e.rectangle,ce.MAX_VALUE),n=new Mi({rectangle:t,numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=n,this._image=void 0,this._texture=void 0,this._hasError=!1,this._errorEvent=new ge;let i=e.credit;typeof i=="string"&&(i=new Vt(i)),this._credit=i;let o=Ee.createIfNeeded(e.url);this._resource=o,this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight}Object.defineProperties(GT.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return 0}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});function qst(e,t,n,i){let o=`Failed to load image ${e.url}`;l(t)&&l(t.message)&&(o+=`: ${t.message}`);let r=Co.reportError(i,n,l(n)?n._errorEvent:void 0,o,0,0,0,t);if(r.retry)return Lj(e,n,r);throw l(n)&&(n._hasError=!0),new ue(o)}async function Lj(e,t,n){try{return await rl.loadImage(null,e)}catch(i){return qst(e,i,t,n)}}GT.fromUrl=async function(e,t){let n=Ee.createIfNeeded(e),i=await Lj(n);t=y(t,y.EMPTY_OBJECT);let o=new GT({...t,url:e,tileWidth:i.width,tileHeight:i.height});return o._image=i,o};GT.prototype.getTileCredits=function(e,t,n){};GT.prototype.requestImage=async function(e,t,n,i){if(!this._hasError&&!l(this._image)){let o=await Lj(this._resource,this);return this._image=o,Co.reportSuccess(this._errorEvent),o}return this._image};GT.prototype.pickFeatures=function(e,t,n,i,o){};var Nw=GT;var sGi=T(S(),1);var DZi=T(S(),1);function $st(e,t,n){this.type=e,l(t)||(e==="json"?t="application/json":e==="xml"?t="text/xml":e==="html"?t="text/html":e==="text"&&(t="text/plain")),this.format=t,l(n)||(e==="json"?n=eat:e==="xml"?n=oat:(e==="html"||e==="text")&&(n=Lge)),this.callback=n}function eat(e){let t=[],n=e.features;for(let i=0;i0)for(let r=0;r\s*<\/body>/im,uat=//im,mat=/([\s\S]*)<\/title>/im;function Lge(e){if(dat.test(e)||uat.test(e))return;let t,n=mat.exec(e);n&&n.length>1&&(t=n[1]);let i=new Sh;return i.name=t,i.description=e,i.data=e,[i]}var ET=$st;var JZi=T(S(),1);function kw(e){e=y(e,y.EMPTY_OBJECT),this._tileCache={},this._tilesRequestedForInterval=[];let t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}Object.defineProperties(kw.prototype,{clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}});kw.prototype.getFromCache=function(e,t,n,i){let o=Rge(e,t,n),r,s=this._tileCache[this._currentIntervalIndex];if(l(s)&&l(s[o])){let a=s[o];r=a.promise.catch(function(c){throw i.state=a.request.state,c}),delete s[o]}return r};kw.prototype.checkApproachingInterval=function(e,t,n,i){let o=Rge(e,t,n),r=this._tilesRequestedForInterval,s=Zge(this),a={key:o,priorityFunction:i.priorityFunction};(!l(s)||!Gge(this,a,s))&&r.push(a),r.length>=512&&r.splice(0,256)};kw.prototype._clockOnTick=function(e){let t=e.currentTime,i=this._times.indexOf(t),o=this._currentIntervalIndex;if(i!==o){let s=this._tileCache[o];for(let a in s)s.hasOwnProperty(a)&&s[a].request.cancel();delete this._tileCache[o],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,this._reloadFunction();return}let r=Zge(this);if(l(r)){let s=this._tilesRequestedForInterval,a=!0;for(;a&&s.length!==0;){let c=s.pop();a=Gge(this,c,r),a||s.push(c)}}};function Rge(e,t,n){return`${e}-${t}-${n}`}function hat(e){let t=e.split("-");if(t.length===3)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function Zge(e){let t=e._times;if(!l(t))return;let n=e._clock,i=n.currentTime,o=n.canAnimate&&n.shouldAnimate,r=n.multiplier;if(!o&&r!==0)return;let s,a=t.indexOf(i);if(a<0)return;let c=t.get(a);return r>0?(s=te.secondsDifference(c.stop,i),++a):(s=te.secondsDifference(c.start,i),--a),s/=r,a>=0&&s<=5?t.get(a):void 0}function Gge(e,t,n){let i=e._times.indexOf(n.start),o=e._tileCache,r=o[i];l(r)||(r=o[i]={});let s=t.key;if(l(r[s]))return!0;let a=hat(s),c=new Yo({throttle:!1,throttleByServer:!0,type:ns.IMAGERY,priorityFunction:t.priorityFunction}),d=e._requestImageFunction(a.x,a.y,a.level,c,n);return l(d)?(r[s]={promise:d,request:c},!0):!1}var XT=kw;var fat=[3034,3035,3042,3043,3044],pat=[4471,4559];function Vh(e){if(e=y(e,y.EMPTY_OBJECT),l(e.times)&&!l(e.clock))throw new fe("options.times was specified, so options.clock is required.");this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=y(e.getFeatureInfoUrl,e.url);let t=Ee.createIfNeeded(e.url),n=Ee.createIfNeeded(this._getFeatureInfoUrl);t.setQueryParameters(Vh.DefaultParameters,!0),n.setQueryParameters(Vh.GetFeatureInfoDefaultParameters,!0),l(e.parameters)&&t.setQueryParameters(Ege(e.parameters)),l(e.getFeatureInfoParameters)&&n.setQueryParameters(Ege(e.getFeatureInfoParameters));let i=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new XT({clock:e.clock,times:e.times,requestImageFunction:function(s,a,c,d,u){return Xge(i,s,a,c,d,u)},reloadFunction:function(){l(i._reload)&&i._reload()}}));let o={};if(o.layers=e.layers,o.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",o.width="{width}",o.height="{height}",parseFloat(t.queryParameters.version)>=1.3){o.crs=y(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof Vi?"EPSG:3857":"CRS:84");let s=o.crs.split(":");if(s[0]==="EPSG"&&s.length===2){let a=Number(s[1]);(a>=4e3&&a<5e3&&!pat.includes(a)||fat.includes(a))&&(o.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else o.srs=y(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof Vi?"EPSG:3857":"EPSG:4326");t.setQueryParameters(o,!0),n.setQueryParameters(o,!0);let r={query_layers:e.layers,info_format:"{format}"};parseFloat(n.queryParameters.version)>=1.3?(r.i="{i}",r.j="{j}"):(r.x="{i}",r.y="{j}"),n.setQueryParameters(r,!0),this._resource=t,this._pickFeaturesResource=n,this._layers=e.layers,this._tileProvider=new wa({url:t,pickFeaturesUrl:n,tilingScheme:y(e.tilingScheme,new Mi({ellipsoid:e.ellipsoid})),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:y(e.getFeatureInfoFormats,Vh.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures})}function Xge(e,t,n,i,o,r){let s=l(r)?r.data:void 0,a=e._tileProvider;return l(s)&&a._resource.setQueryParameters(s),a.requestImage(t,n,i,o)}function bat(e,t,n,i,o,r,s){let a=l(s)?s.data:void 0,c=e._tileProvider;return l(a)&&c._pickFeaturesResource.setQueryParameters(a),c.pickFeatures(t,n,i,o,r)}Object.defineProperties(Vh.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}});Vh.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};Vh.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return l(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Xge(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};Vh.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,s=l(r)?r.currentInterval:void 0;return bat(this,e,t,n,i,o,s)};Vh.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"});Vh.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"});Vh.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new ET("json","application/json")),Object.freeze(new ET("xml","text/xml")),Object.freeze(new ET("text","text/html"))]);function Ege(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var Uw=Vh;var yGi=T(S(),1);var gat=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function Dw(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let t=Ee.createIfNeeded(e.url),n=e.style,i=e.tileMatrixSetID,o=t.url,r=o.match(/{/g);if(!l(r)||r.length===1&&/{s}/.test(o))t.setQueryParameters(gat),this._useKvp=!0;else{let m={style:n,Style:n,TileMatrixSet:i};t.setTemplateValues(m),this._useKvp=!1}this._resource=t,this._layer=e.layer,this._style=n,this._tileMatrixSetID=i,this._tileMatrixLabels=e.tileMatrixLabels,this._format=y(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new Jr({ellipsoid:e.ellipsoid}),this._tileWidth=y(e.tileWidth,256),this._tileHeight=y(e.tileHeight,256),this._minimumLevel=y(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=y(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;let s=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new XT({clock:e.clock,times:e.times,requestImageFunction:function(m,p,g,f,x){return Ige(s,m,p,g,f,x)},reloadFunction:function(){l(s._reload)&&s._reload()}}));let a=this._tilingScheme.positionToTileXY(ce.southwest(this._rectangle),this._minimumLevel),c=this._tilingScheme.positionToTileXY(ce.northeast(this._rectangle),this._minimumLevel),d=(Math.abs(c.x-a.x)+1)*(Math.abs(c.y-a.y)+1);this._errorEvent=new ge;let u=e.credit;this._credit=typeof u=="string"?new Vt(u):u,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():l(this._subdomains)&&this._subdomains.length>0?this._subdomains=this._subdomains.split(""):this._subdomains=["a","b","c"]}function Ige(e,t,n,i,o,r){let s=e._tileMatrixLabels,a=l(s)?s[i]:i.toString(),c=e._subdomains,d=e._dimensions,u=l(r)?r.data:void 0,m,p;if(!e._useKvp)p={TileMatrix:a,TileRow:n.toString(),TileCol:t.toString(),s:c[(t+n+i)%c.length]},m=e._resource.getDerivedResource({request:o}),m.setTemplateValues(p),l(d)&&m.setTemplateValues(d),l(u)&&m.setTemplateValues(u);else{let g={};g.tilematrix=a,g.layer=e._layer,g.style=e._style,g.tilerow=n,g.tilecol=t,g.tilematrixset=e._tileMatrixSetID,g.format=e._format,l(d)&&(g=xt(g,d)),l(u)&&(g=xt(g,u)),p={s:c[(t+n+i)%c.length]},m=e._resource.getDerivedResource({queryParameters:g,request:o}),m.setTemplateValues(p)}return rl.loadImage(e,m)}Object.defineProperties(Dw.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,l(this._reload)&&this._reload())}}});Dw.prototype.getTileCredits=function(e,t,n){};Dw.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return l(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Ige(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};Dw.prototype.pickFeatures=function(e,t,n,i,o){};var Bw=Dw;var yat={ARCGIS_MAPSERVER:J0.fromUrl,BING:async(e,t)=>vw.fromUrl(e,t),GOOGLE_EARTH:async(e,t)=>{let n=t.channel;return delete t.channel,Aw.fromUrl(e,n,t)},MAPBOX:(e,t)=>new Mw({url:e,...t}),SINGLE_TILE:Nw.fromUrl,TMS:Ty.fromUrl,URL_TEMPLATE:(e,t)=>new wa({url:e,...t}),WMS:(e,t)=>new Uw({url:e,...t}),WMTS:(e,t)=>new Bw({url:e,...t})};function Uf(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileCredits=void 0,this._errorEvent=new ge}Object.defineProperties(Uf.prototype,{rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}},proxy:{get:function(){}}});Uf.fromAssetId=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n=ud._createEndpointResource(e,t),i=e.toString()+t.accessToken+t.server,o=Uf._endpointCache[i];l(o)||(o=n.fetchJson(),Uf._endpointCache[i]=o);let r=await o;if(r.type!=="IMAGERY")throw new ue(`Cesium ion asset ${e} is not an imagery asset.`);let s,a=r.externalType;if(!l(a))s=await Ty.fromUrl(new ud(r,n));else{let d=yat[a];if(!l(d))throw new ue(`Unrecognized Cesium ion imagery type: ${a}`);let u={...r.options},m=u.url;delete u.url,s=await d(m,u)}let c=new Uf(t);return s.errorEvent.addEventListener(function(d){d.provider=c,c._errorEvent.raiseEvent(d)}),c._tileCredits=ud.getCreditsFromEndpoint(r,n),c._imageryProvider=s,c};Uf.prototype.getTileCredits=function(e,t,n){let i=this._imageryProvider.getTileCredits(e,t,n);return l(i)?this._tileCredits.concat(i):this._tileCredits};Uf.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};Uf.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};Uf._endpointCache={};var Q0=Uf;var FGi=T(S(),1),xat={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},j0=Object.freeze(xat);function _at(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.style,j0.AERIAL);return Q0.fromAssetId(t)}var q0=_at;var HGi=T(S(),1);function OV(e,t,n,i,o){if(this.imageryLayer=e,this.x=t,this.y=n,this.level=i,this.request=void 0,i!==0){let r=t/2|0,s=n/2|0,a=i-1;this.parent=e.getImageryFromCache(r,s,a)}this.state=ai.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!l(o)&&e.ready&&(o=e.imageryProvider.tilingScheme.tileXYToRectangle(t,n,i)),this.rectangle=o}OV.createPlaceholder=function(e){let t=new OV(e,0,0,0);return t.addReference(),t.state=ai.PLACEHOLDER,t};OV.prototype.addReference=function(){++this.referenceCount};OV.prototype.releaseReference=function(){return--this.referenceCount,this.referenceCount===0?(this.imageryLayer.removeImageryFromCache(this),l(this.parent)&&this.parent.releaseReference(),l(this.image)&&l(this.image.destroy)&&this.image.destroy(),l(this.texture)&&this.texture.destroy(),l(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),me(this),0):this.referenceCount};OV.prototype.processStateMachine=function(e,t,n){this.state===ai.UNLOADED&&!n&&(this.state=ai.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===ai.RECEIVED&&(this.state=ai.TRANSITIONING,this.imageryLayer._createTexture(e.context,this));let i=this.state===ai.READY&&t&&!this.texture;(this.state===ai.TEXTURE_LOADED||i)&&(this.state=ai.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};var HV=OV;var QGi=T(S(),1);function Gj(e,t,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=n}Gj.prototype.freeResources=function(){l(this.readyImagery)&&this.readyImagery.releaseReference(),l(this.loadingImagery)&&this.loadingImagery.releaseReference()};Gj.prototype.processStateMachine=function(e,t,n){let i=this.loadingImagery,o=i.imageryLayer;if(i.processStateMachine(t,!this.useWebMercatorT,n),i.state===ai.READY)return l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this),!0;let r=i.parent,s;for(;l(r)&&(r.state!==ai.READY||!this.useWebMercatorT&&!l(r.texture));)r.state!==ai.FAILED&&r.state!==ai.INVALID&&(s=s||r),r=r.parent;return this.readyImagery!==r&&(l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=r,l(r)&&(r.addReference(),this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this))),i.state===ai.FAILED||i.state===ai.INVALID?l(s)?(s.processStateMachine(t,!this.useWebMercatorT,n),!1):!0:!1};var zV=Gj;function gi(e,t){this._imageryProvider=e,this._readyEvent=new ge,this._errorEvent=new ge,t=y(t,y.EMPTY_OBJECT),e=y(e,y.EMPTY_OBJECT),this.alpha=y(t.alpha,y(e._defaultAlpha,1)),this.nightAlpha=y(t.nightAlpha,y(e._defaultNightAlpha,1)),this.dayAlpha=y(t.dayAlpha,y(e._defaultDayAlpha,1)),this.brightness=y(t.brightness,y(e._defaultBrightness,gi.DEFAULT_BRIGHTNESS)),this.contrast=y(t.contrast,y(e._defaultContrast,gi.DEFAULT_CONTRAST)),this.hue=y(t.hue,y(e._defaultHue,gi.DEFAULT_HUE)),this.saturation=y(t.saturation,y(e._defaultSaturation,gi.DEFAULT_SATURATION)),this.gamma=y(t.gamma,y(e._defaultGamma,gi.DEFAULT_GAMMA)),this.splitDirection=y(t.splitDirection,gi.DEFAULT_SPLIT),this.minificationFilter=y(t.minificationFilter,y(e._defaultMinificationFilter,gi.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=y(t.magnificationFilter,y(e._defaultMagnificationFilter,gi.DEFAULT_MAGNIFICATION_FILTER)),this.show=y(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=y(t.rectangle,ce.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new zV(HV.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this.colorToAlpha=t.colorToAlpha,this.colorToAlphaThreshold=y(t.colorToAlphaThreshold,gi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD)}Object.defineProperties(gi.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},ready:{get:function(){return l(this._imageryProvider)}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},rectangle:{get:function(){return this._rectangle}}});gi.DEFAULT_BRIGHTNESS=1;gi.DEFAULT_CONTRAST=1;gi.DEFAULT_HUE=0;gi.DEFAULT_SATURATION=1;gi.DEFAULT_GAMMA=1;gi.DEFAULT_SPLIT=zc.NONE;gi.DEFAULT_MINIFICATION_FILTER=on.LINEAR;gi.DEFAULT_MAGNIFICATION_FILTER=di.LINEAR;gi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004;gi.fromProviderAsync=function(e,t){let n=new gi(void 0,t);return Lat(n,Promise.resolve(e)),n};gi.fromWorldImagery=function(e){return e=y(e,y.EMPTY_OBJECT),gi.fromProviderAsync(q0({style:e.style}),e)};gi.prototype.isBaseLayer=function(){return this._isBaseLayer};gi.prototype.isDestroyed=function(){return!1};gi.prototype.destroy=function(){return me(this)};var vge=new ce,Wge=new ce,Ej=new ce,wge=new ce;gi.prototype.getImageryRectangle=function(){let e=this._imageryProvider,t=this._rectangle;return ce.intersection(e.rectangle,t)};gi.prototype._createTileImagerySkeletons=function(e,t,n){let i=e.data;if(!l(t)||l(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||l(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;l(n)||(n=i.imagery.length);let o=this._imageryProvider;if(!this.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),i.imagery.splice(n,0,this._skeletonPlaceholder),!0;let r=o.tilingScheme.projection instanceof Vi&&e.rectangle.north<Vi.MaximumLatitude&&e.rectangle.south>-Vi.MaximumLatitude,s=ce.intersection(o.rectangle,this._rectangle,vge),a=ce.intersection(e.rectangle,s,Wge);if(!l(a)){if(!this.isBaseLayer())return!1;let E=s,I=e.rectangle;a=Wge,I.south>=E.north?a.north=a.south=E.north:I.north<=E.south?a.north=a.south=E.south:(a.south=Math.max(I.south,E.south),a.north=Math.min(I.north,E.north)),I.west>=E.east?a.west=a.east=E.east:I.east<=E.west?a.west=a.east=E.west:(a.west=Math.max(I.west,E.west),a.east=Math.min(I.east,E.east))}let c=0;a.south>0?c=a.south:a.north<0&&(c=a.north);let u=1*t.getLevelMaximumGeometricError(e.level),m=Cat(this,u,c);m=Math.max(0,m);let p=o.maximumLevel;if(m>p&&(m=p),l(o.minimumLevel)){let E=o.minimumLevel;m<E&&(m=E)}let g=o.tilingScheme,f=g.positionToTileXY(ce.northwest(a),m),x=g.positionToTileXY(ce.southeast(a),m),_=e.rectangle.width/512,C=e.rectangle.height/512,V=g.tileXYToRectangle(f.x,f.y,m);Math.abs(V.south-e.rectangle.north)<C&&f.y<x.y&&++f.y,Math.abs(V.east-e.rectangle.west)<_&&f.x<x.x&&++f.x;let L=g.tileXYToRectangle(x.x,x.y,m);Math.abs(L.north-e.rectangle.south)<C&&x.y>f.y&&--x.y,Math.abs(L.west-e.rectangle.east)<_&&x.x>f.x&&--x.x;let Z=ce.clone(e.rectangle,wge),G=g.tileXYToRectangle(f.x,f.y,m),X=ce.intersection(G,s,Ej),v;r?(g.rectangleToNativeRectangle(Z,Z),g.rectangleToNativeRectangle(G,G),g.rectangleToNativeRectangle(X,X),g.rectangleToNativeRectangle(s,s),v=g.tileXYToNativeRectangle.bind(g),_=Z.width/512,C=Z.height/512):v=g.tileXYToRectangle.bind(g);let P,F=0,A=1,b;!this.isBaseLayer()&&Math.abs(X.west-Z.west)>=_&&(F=Math.min(1,(X.west-Z.west)/Z.width)),!this.isBaseLayer()&&Math.abs(X.north-Z.north)>=C&&(A=Math.max(0,(X.north-Z.south)/Z.height));let R=A;for(let E=f.x;E<=x.x;E++)if(P=F,G=v(E,f.y,m),X=ce.simpleIntersection(G,s,Ej),!!l(X)){F=Math.min(1,(X.east-Z.west)/Z.width),E===x.x&&(this.isBaseLayer()||Math.abs(X.east-Z.east)<_)&&(F=1),A=R;for(let I=f.y;I<=x.y;I++){if(b=A,G=v(E,I,m),X=ce.simpleIntersection(G,s,Ej),!l(X))continue;A=Math.max(0,(X.south-Z.south)/Z.height),I===x.y&&(this.isBaseLayer()||Math.abs(X.south-Z.south)<C)&&(A=0);let w=new se(P,A,F,b),N=this.getImageryFromCache(E,I,m);i.imagery.splice(n,0,new zV(N,w,r)),++n}}return!0};gi.prototype._calculateTextureTranslationAndScale=function(e,t){let n=t.readyImagery.rectangle,i=e.rectangle;if(t.useWebMercatorT){let c=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;n=c.rectangleToNativeRectangle(n,vge),i=c.rectangleToNativeRectangle(i,wge)}let o=i.width,r=i.height,s=o/n.width,a=r/n.height;return new se(s*(i.west-n.west)/o,a*(i.south-n.south)/r,s,a)};gi.prototype._requestImagery=function(e){let t=this._imageryProvider,n=this;function i(s){if(!l(s))return o();e.image=s,e.state=ai.RECEIVED,e.request=void 0,Co.reportSuccess(n._requestImageError)}function o(s){if(e.request.state===Qn.CANCELLED){e.state=ai.UNLOADED,e.request=void 0;return}e.state=ai.FAILED,e.request=void 0;let a=`Failed to obtain image tile X: ${e.x} Y: ${e.y} Level: ${e.level}.`;n._requestImageError=Co.reportError(n._requestImageError,t,t.errorEvent,a,e.x,e.y,e.level,s),n._requestImageError.retry&&r()}function r(){let s=new Yo({throttle:!1,throttleByServer:!0,type:ns.IMAGERY});e.request=s,e.state=ai.TRANSITIONING;let a=t.requestImage(e.x,e.y,e.level,s);if(!l(a)){e.state=ai.UNLOADED,e.request=void 0;return}l(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),a.then(function(c){i(c)}).catch(function(c){o(c)})}r()};gi.prototype._createTextureWebGL=function(e,t){let n=new rn({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),i=t.image;return l(i.internalFormat)?new Et({context:e,pixelFormat:i.internalFormat,width:i.width,height:i.height,source:{arrayBufferView:i.bufferView},sampler:n}):new Et({context:e,source:i,pixelFormat:this._imageryProvider.hasAlphaChannel?at.RGBA:at.RGB,sampler:n})};gi.prototype._createTexture=function(e,t){let n=this._imageryProvider,i=t.image;if(l(n.tileDiscardPolicy)){let r=n.tileDiscardPolicy;if(l(r)){if(!r.isReady()){t.state=ai.RECEIVED;return}if(r.shouldDiscardImage(i)){t.state=ai.INVALID;return}}}let o=this._createTextureWebGL(e,t);n.tilingScheme.projection instanceof Vi?t.textureWebMercator=o:t.texture=o,t.image=void 0,t.state=ai.TEXTURE_LOADED};function Pge(e,t,n){return`${e}:${t}:${n}`}gi.prototype._finalizeReprojectTexture=function(e,t){let n=this.minificationFilter,i=this.magnificationFilter;if(n===on.LINEAR&&i===di.LINEAR&&!at.isCompressedFormat(t.pixelFormat)&&W.isPowerOfTwo(t.width)&&W.isPowerOfTwo(t.height)){n=on.LINEAR_MIPMAP_LINEAR;let r=Mt.maximumTextureFilterAnisotropy,s=Math.min(r,y(this._maximumAnisotropy,r)),a=Pge(n,i,s),c=e.cache.imageryLayerMipmapSamplers;l(c)||(c={},e.cache.imageryLayerMipmapSamplers=c);let d=c[a];l(d)||(d=c[a]=new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i,maximumAnisotropy:s})),t.generateMipmap(Bh.NICEST),t.sampler=d}else{let r=Pge(n,i,0),s=e.cache.imageryLayerNonMipmapSamplers;l(s)||(s={},e.cache.imageryLayerNonMipmapSamplers=s);let a=s[r];l(a)||(a=s[r]=new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i})),t.sampler=a}};gi.prototype._reprojectTexture=function(e,t,n){let i=t.textureWebMercator||t.texture,o=t.rectangle,r=e.context;if(n=y(n,!0),n&&!(this._imageryProvider.tilingScheme.projection instanceof Si)&&o.width/i.width>1e-5){let s=this;t.addReference();let a=new Cl({persists:!0,owner:this,preExecute:function(c){Sat(c,r,i,t.rectangle)},postExecute:function(c){t.texture=c,s._finalizeReprojectTexture(r,c),t.state=ai.READY,t.releaseReference()},canceled:function(){t.state=ai.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(a)}else n&&(t.texture=i),this._finalizeReprojectTexture(r,i),t.state=ai.READY};gi.prototype.queueReprojectionCommands=function(e){let t=this._reprojectComputeCommands,n=t.length;for(let i=0;i<n;++i)e.commandList.push(t[i]);t.length=0};gi.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach(function(e){l(e.canceled)&&e.canceled()}),this._reprojectComputeCommands.length=0};gi.prototype.getImageryFromCache=function(e,t,n,i){let o=Fge(e,t,n),r=this._imageryCache[o];return l(r)||(r=new HV(this,e,t,n,i),this._imageryCache[o]=r),r.addReference(),r};gi.prototype.removeImageryFromCache=function(e){let t=Fge(e.x,e.y,e.level);delete this._imageryCache[t]};function Fge(e,t,n){return JSON.stringify([e,t,n])}var CD={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new D,texture:void 0},Tat=Yt.supportsTypedArrays()?new Float32Array(2*64):void 0;function Sat(e,t,n,i){let o=t.cache.imageryLayer_reproject;if(!l(o)){o=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){l(this.framebuffer)&&this.framebuffer.destroy(),l(this.vertexArray)&&this.vertexArray.destroy(),l(this.shaderProgram)&&this.shaderProgram.destroy()}};let _=new Float32Array(2*64*2),C=0;for(let X=0;X<64;++X){let v=X/63;_[C++]=0,_[C++]=v,_[C++]=1,_[C++]=v}let V={position:0,webMercatorT:1},L=Kr.getRegularGridIndices(2,64),Z=ft.createIndexBuffer({context:t,typedArray:L,usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT});o.vertexArray=new ei({context:t,attributes:[{index:V.position,vertexBuffer:ft.createVertexBuffer({context:t,typedArray:_,usage:Ne.STATIC_DRAW}),componentsPerAttribute:2},{index:V.webMercatorT,vertexBuffer:ft.createVertexBuffer({context:t,sizeInBytes:64*2*4,usage:Ne.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:Z});let G=new Ye({sources:[Sw]});o.shaderProgram=qt.fromCache({context:t,vertexShaderSource:G,fragmentShaderSource:Tw,attributeLocations:V}),o.sampler=new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.LINEAR,magnificationFilter:di.LINEAR})}n.sampler=o.sampler;let r=n.width,s=n.height;CD.textureDimensions.x=r,CD.textureDimensions.y=s,CD.texture=n;let a=Math.sin(i.south),c=.5*Math.log((1+a)/(1-a));a=Math.sin(i.north);let u=1/(.5*Math.log((1+a)/(1-a))-c),m=new Et({context:t,width:r,height:s,pixelFormat:n.pixelFormat,pixelDatatype:n.pixelDatatype,preMultiplyAlpha:n.preMultiplyAlpha});W.isPowerOfTwo(r)&&W.isPowerOfTwo(s)&&m.generateMipmap(Bh.NICEST);let p=i.south,g=i.north,f=Tat,x=0;for(let _=0;_<64;++_){let C=_/63,V=W.lerp(p,g,C);a=Math.sin(V);let Z=(.5*Math.log((1+a)/(1-a))-c)*u;f[x++]=Z,f[x++]=Z}o.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(f),e.shaderProgram=o.shaderProgram,e.outputTexture=m,e.uniformMap=CD,e.vertexArray=o.vertexArray}function Cat(e,t,n){let i=e._imageryProvider,o=i.tilingScheme,r=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof Si?1:Math.cos(n),a=o.rectangle,d=r.maximumRadius*a.width*s/(i.tileWidth*o.getNumberOfXTilesAtLevel(0))/t,u=Math.log(d)/Math.log(2);return Math.round(u)|0}function Vat(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function Lat(e,t){let n;try{if(n=await Promise.resolve(t),e.isDestroyed())return;e._imageryProvider=n,e._readyEvent.raiseEvent(n)}catch(i){Vat(e._errorEvent,i)}}var ma=gi;var sXi=T(S(),1);var MEi=T(S(),1),Age={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=Age.RENDERED_AND_KICKED},originalResult:function(e){return e&3},kick:function(e){return e|4}},Kn=Age;function JV(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se}JV.prototype.update=function(e,t,n){this.changedThisFrame&&(Yge(e,t,this.tile,n),this.changedThisFrame=!1)};JV.prototype.destroy=function(e){this._destroyVertexArray(e),l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};JV.prototype._destroyVertexArray=function(e){l(this.vertexArray)&&(l(e)?e.push(this.vertexArray):qu._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var Rat=new ig;JV.updateFillTiles=function(e,t,n,i){let o=e._quadtree,r=o._levelZeroTiles,s=o._lastSelectionFrameNumber,a=Rat;a.clear();for(let d=0;d<t.length;++d){let u=t[d];l(u.data.vertexArray)&&a.enqueue(t[d])}let c=a.dequeue();for(;c!==void 0;){let d=c.findTileToWest(r),u=c.findTileToSouth(r),m=c.findTileToEast(r),p=c.findTileToNorth(r);Vs(e,n,c,d,s,gn.EAST,!1,a,i),Vs(e,n,c,u,s,gn.NORTH,!1,a,i),Vs(e,n,c,m,s,gn.WEST,!1,a,i),Vs(e,n,c,p,s,gn.SOUTH,!1,a,i);let g=d.findTileToNorth(r),f=d.findTileToSouth(r),x=m.findTileToNorth(r),_=m.findTileToSouth(r);Vs(e,n,c,g,s,gn.SOUTHEAST,!1,a,i),Vs(e,n,c,x,s,gn.SOUTHWEST,!1,a,i),Vs(e,n,c,f,s,gn.NORTHEAST,!1,a,i),Vs(e,n,c,_,s,gn.NORTHWEST,!1,a,i),c=a.dequeue()}};function Vs(e,t,n,i,o,r,s,a,c){if(i===void 0)return;let d=i;for(;d&&(d._lastSelectionResultFrame!==o||Kn.wasKicked(d._lastSelectionResult)||Kn.originalResult(d._lastSelectionResult)===Kn.CULLED);){if(s)return;let u=d.parent;if(r>=gn.NORTHWEST&&u!==void 0)switch(r){case gn.NORTHWEST:d=d===u.northwestChild?u:void 0;break;case gn.NORTHEAST:d=d===u.northeastChild?u:void 0;break;case gn.SOUTHWEST:d=d===u.southwestChild?u:void 0;break;case gn.SOUTHEAST:d=d===u.southeastChild?u:void 0;break}else d=u}if(d!==void 0){if(d._lastSelectionResult===Kn.RENDERED){if(l(d.data.vertexArray))return;Zat(e,t,n,d,r,o,a,c);return}if(Kn.originalResult(i._lastSelectionResult)!==Kn.CULLED)switch(r){case gn.WEST:Vs(e,t,n,i.northwestChild,o,r,!0,a,c),Vs(e,t,n,i.southwestChild,o,r,!0,a,c);break;case gn.EAST:Vs(e,t,n,i.southeastChild,o,r,!0,a,c),Vs(e,t,n,i.northeastChild,o,r,!0,a,c);break;case gn.SOUTH:Vs(e,t,n,i.southwestChild,o,r,!0,a,c),Vs(e,t,n,i.southeastChild,o,r,!0,a,c);break;case gn.NORTH:Vs(e,t,n,i.northeastChild,o,r,!0,a,c),Vs(e,t,n,i.northwestChild,o,r,!0,a,c);break;case gn.NORTHWEST:Vs(e,t,n,i.northwestChild,o,r,!0,a,c);break;case gn.NORTHEAST:Vs(e,t,n,i.northeastChild,o,r,!0,a,c);break;case gn.SOUTHWEST:Vs(e,t,n,i.southwestChild,o,r,!0,a,c);break;case gn.SOUTHEAST:Vs(e,t,n,i.southeastChild,o,r,!0,a,c);break;default:throw new fe("Invalid edge")}}}function Zat(e,t,n,i,o,r,s,a){let c=i.data;if(c.fill===void 0)c.fill=new JV(i);else if(c.fill.visitedFrame===r)return;c.fill.enqueuedFrame!==r&&(c.fill.enqueuedFrame=r,c.fill.changedThisFrame=!1,s.enqueue(i)),Gat(e,t,n,i,o,a)}function Gat(e,t,n,i,o,r){let s=i.data.fill,a,c=n.data.fill;l(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(Yge(e,t,n,r),c.changedThisFrame=!1),a=n.data.fill.mesh):a=n.data.mesh;let d,u;switch(o){case gn.WEST:d=s.westMeshes,u=s.westTiles;break;case gn.SOUTH:d=s.southMeshes,u=s.southTiles;break;case gn.EAST:d=s.eastMeshes,u=s.eastTiles;break;case gn.NORTH:d=s.northMeshes,u=s.northTiles;break;case gn.NORTHWEST:s.changedThisFrame=s.changedThisFrame||s.northwestMesh!==a,s.northwestMesh=a,s.northwestTile=n;return;case gn.NORTHEAST:s.changedThisFrame=s.changedThisFrame||s.northeastMesh!==a,s.northeastMesh=a,s.northeastTile=n;return;case gn.SOUTHWEST:s.changedThisFrame=s.changedThisFrame||s.southwestMesh!==a,s.southwestMesh=a,s.southwestTile=n;return;case gn.SOUTHEAST:s.changedThisFrame=s.changedThisFrame||s.southeastMesh!==a,s.southeastMesh=a,s.southeastTile=n;return}if(n.level<=i.level){s.changedThisFrame=s.changedThisFrame||d[0]!==a||d.length!==1,d[0]=a,u[0]=n,d.length=1,u.length=1;return}let m,p,g,f,x=n.rectangle,_,C=i.rectangle;switch(o){case gn.WEST:for(_=(C.north-C.south)*W.EPSILON5,m=0;m<u.length&&(g=u[m],f=g.rectangle,!W.greaterThan(x.north,f.south,_));++m);for(p=m;p<u.length&&(g=u[p],f=g.rectangle,!W.greaterThanOrEquals(x.south,f.north,_));++p);break;case gn.SOUTH:for(_=(C.east-C.west)*W.EPSILON5,m=0;m<u.length&&(g=u[m],f=g.rectangle,!W.lessThan(x.west,f.east,_));++m);for(p=m;p<u.length&&(g=u[p],f=g.rectangle,!W.lessThanOrEquals(x.east,f.west,_));++p);break;case gn.EAST:for(_=(C.north-C.south)*W.EPSILON5,m=0;m<u.length&&(g=u[m],f=g.rectangle,!W.lessThan(x.south,f.north,_));++m);for(p=m;p<u.length&&(g=u[p],f=g.rectangle,!W.lessThanOrEquals(x.north,f.south,_));++p);break;case gn.NORTH:for(_=(C.east-C.west)*W.EPSILON5,m=0;m<u.length&&(g=u[m],f=g.rectangle,!W.greaterThan(x.east,f.west,_));++m);for(p=m;p<u.length&&(g=u[p],f=g.rectangle,!W.greaterThanOrEquals(x.west,f.east,_));++p);break}p-m===1?(s.changedThisFrame=s.changedThisFrame||d[m]!==a,d[m]=a,u[m]=n):(s.changedThisFrame=!0,d.splice(m,p-m,a),u.splice(m,p-m,n))}var IT=new he,Eat=new he,KV=new h,Pj=new h,Xj=new D,Ij=new D,zd=new D;function XD(){this.height=0,this.encodedNormal=new D}function VD(e,t,n,i,o,r,s,a,c){if(l(o))return o;let d;if(l(r)&&l(s))d=(r.height+s.height)*.5;else if(l(r))d=r.height;else if(l(s))d=s.height;else if(l(a))d=a.height;else{let m=e.tile.data.tileBoundingRegion,p=0,g=0;l(m)&&(p=m.minimumHeight,g=m.maximumHeight),d=(p+g)*.5}return Oge(e,t,n,i,d,c),c}var Xat={minimumHeight:0,maximumHeight:0},Iat=new h,Mge=new XD,Nge=new XD,kge=new XD,Uge=new XD,Wat=typeof Uint8Array<"u"?new Uint8Array(9*9):void 0,Pat={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function Yge(e,t,n,i){qu.initialize(n,e.terrainProvider,e._imageryLayers);let o=n.data,r=o.fill,s=n.rectangle,a=t.verticalExaggeration,c=t.verticalExaggerationRelativeHeight,d=a!==1,u=n.tilingScheme.ellipsoid,m=RD(r,u,0,1,r.northwestTile,r.northwestMesh,r.northTiles,r.northMeshes,r.westTiles,r.westMeshes,kge),p=RD(r,u,0,0,r.southwestTile,r.southwestMesh,r.westTiles,r.westMeshes,r.southTiles,r.southMeshes,Mge),g=RD(r,u,1,0,r.southeastTile,r.southeastMesh,r.southTiles,r.southMeshes,r.eastTiles,r.eastMeshes,Nge),f=RD(r,u,1,1,r.northeastTile,r.northeastMesh,r.eastTiles,r.eastMeshes,r.northTiles,r.northMeshes,Uge);m=VD(r,u,0,1,m,p,f,g,kge),p=VD(r,u,0,0,p,m,g,f,Mge),g=VD(r,u,1,1,g,p,f,m,Nge),f=VD(r,u,1,1,f,g,m,p,Uge);let x=p.height,_=g.height,C=m.height,V=f.height,L=Math.min(x,_,C,V),Z=Math.max(x,_,C,V),G=(L+Z)*.5,X,v,P=e.getLevelMaximumGeometricError(n.level),F=u.maximumRadius-P,A=Math.acos(F/u.maximumRadius)*4;if(A*=1.5,s.width>A&&Z-L<=P){let E=new va({width:9,height:9,buffer:Wat,structure:{heightOffset:Z}}),I=Pat;I.tilingScheme=n.tilingScheme,I.x=n.x,I.y=n.y,I.level=n.level,I.exaggeration=a,I.exaggerationRelativeHeight=c,r.mesh=E._createMeshSync(I)}else{let E=d,I=ce.center(s,Eat);I.height=G;let w=u.cartographicToCartesian(I,Iat),N=new gc(w,void 0,void 0,void 0,void 0,!0,!0,E,a,c),B=5,U;for(U=r.westMeshes,X=0,v=U.length;X<v;++X)B+=U[X].eastIndicesNorthToSouth.length;for(U=r.southMeshes,X=0,v=U.length;X<v;++X)B+=U[X].northIndicesWestToEast.length;for(U=r.eastMeshes,X=0,v=U.length;X<v;++X)B+=U[X].westIndicesSouthToNorth.length;for(U=r.northMeshes,X=0,v=U.length;X<v;++X)B+=U[X].southIndicesEastToWest.length;let O=Xat;O.minimumHeight=L,O.maximumHeight=Z;let k=N.stride,J=new Float32Array(B*k),H=0,ee=H;H=LD(u,s,N,J,H,0,1,m.height,m.encodedNormal,1,O),H=GD(r,u,N,J,H,r.westTiles,r.westMeshes,gn.EAST,O);let z=H;H=LD(u,s,N,J,H,0,0,p.height,p.encodedNormal,0,O),H=GD(r,u,N,J,H,r.southTiles,r.southMeshes,gn.NORTH,O);let j=H;H=LD(u,s,N,J,H,1,0,g.height,g.encodedNormal,0,O),H=GD(r,u,N,J,H,r.eastTiles,r.eastMeshes,gn.WEST,O);let q=H;H=LD(u,s,N,J,H,1,1,f.height,f.encodedNormal,1,O),H=GD(r,u,N,J,H,r.northTiles,r.northMeshes,gn.SOUTH,O),L=O.minimumHeight,Z=O.maximumHeight;let be=Gn.fromRectangle(s,L,Z,n.tilingScheme.ellipsoid),Te=Vi.geodeticLatitudeToMercatorAngle(s.south),ae=1/(Vi.geodeticLatitudeToMercatorAngle(s.north)-Te),ye=(Vi.geodeticLatitudeToMercatorAngle(I.latitude)-Te)*ae,Se=u.geodeticSurfaceNormalCartographic(IT,Pj),Le=wn.octEncode(Se,Xj),Xe=H;N.encode(J,H*k,be.center,D.fromElements(.5,.5,zd),G,Le,ye,Se),++H;let Pe=H,ke=Pe<256?1:2,Pt=(Pe-1)*3,Ot=Pt*ke,ht=(J.length-Pe*k)*Float32Array.BYTES_PER_ELEMENT,Ae;if(ht>=Ot){let Ve=Pe*k*Float32Array.BYTES_PER_ELEMENT;Ae=Pe<256?new Uint8Array(J.buffer,Ve,Pt):new Uint16Array(J.buffer,Ve,Pt)}else Ae=Pe<256?new Uint8Array(Pt):new Uint16Array(Pt);J=new Float32Array(J.buffer,0,Pe*k);let $e=0;for(X=0;X<Pe-2;++X)Ae[$e++]=Xe,Ae[$e++]=X,Ae[$e++]=X+1;Ae[$e++]=Xe,Ae[$e++]=X,Ae[$e++]=0;let Qe=[];for(X=z;X>=ee;--X)Qe.push(X);let je=[];for(X=j;X>=z;--X)je.push(X);let kt=[];for(X=q;X>=j;--X)kt.push(X);let pe=[];for(pe.push(0),X=Xe-1;X>=q;--X)pe.push(X);r.mesh=new Qu(N.center,J,Ae,Pt,Pe,L,Z,le.fromOrientedBoundingBox(be),kat(e,be.center,s,L,Z),N.stride,be,N,Qe,je,kt,pe)}let b=t.context;r._destroyVertexArray(i),r.vertexArray=qu._createVertexArrayForMesh(b,r.mesh),o.processImagery(n,e.terrainProvider,t,!0);let R=r.waterMaskTexture;if(r.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){let E=o._findAncestorTileWithTerrainData(n);l(E)&&l(E.data.waterMaskTexture)&&(r.waterMaskTexture=E.data.waterMaskTexture,++r.waterMaskTexture.referenceCount,o._computeWaterMaskTranslationAndScale(n,E,r.waterMaskTranslationAndScale))}l(R)&&(--R.referenceCount,R.referenceCount===0&&R.destroy())}function LD(e,t,n,i,o,r,s,a,c,d,u){let m=IT;m.longitude=W.lerp(t.west,t.east,r),m.latitude=W.lerp(t.south,t.north,s),m.height=a;let p=e.cartographicToCartesian(m,KV),g;n.hasGeodeticSurfaceNormals&&(g=e.geodeticSurfaceNormal(p,Pj));let f=Ij;return f.x=r,f.y=s,n.encode(i,o*n.stride,p,f,a,c,d,g),u.minimumHeight=Math.min(u.minimumHeight,a),u.maximumHeight=Math.max(u.maximumHeight,a),o+1}var ED=new ce;function Yw(e,t,n,i){let o=e.rectangle,r=t.rectangle;t.x===0&&n.x===1&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?(o=ce.clone(e.rectangle,ED),o.west-=W.TWO_PI,o.east-=W.TWO_PI):e.x===0&&n.x===0&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&(o=ce.clone(e.rectangle,ED),o.west+=W.TWO_PI,o.east+=W.TWO_PI);let s=o.east-o.west,a=(r.west-o.west)/s,c=(r.east-o.west)/s,d=o.north-o.south,u=(r.south-o.south)/d,m=(r.north-o.south)/d,p=(n.x-a)/(c-a),g=(n.y-u)/(m-u);return Math.abs(p)<Math.EPSILON5?p=0:Math.abs(p-1)<Math.EPSILON5&&(p=1),Math.abs(g)<Math.EPSILON5?g=0:Math.abs(g-1)<Math.EPSILON5&&(g=1),i.x=p,i.y=g,i}var vat=new D;function Wj(e,t,n,i,o){let r=e.encoding,s=e.vertices;if(o.height=r.decodeHeight(s,t),r.hasVertexNormals)r.getOctEncodedNormal(s,t,o.encodedNormal);else{let a=o.encodedNormal;a.x=0,a.y=0}}var wat=new D,Fat=new h;function Aat(e,t,n,i,o,r,s,a,c,d){let u=i.encoding,m=i.vertices,p=Yw(t,n,u.decodeTextureCoordinates(m,o,zd),zd),g=Yw(t,n,u.decodeTextureCoordinates(m,r,Ij),Ij),f;c?f=(s-p.x)/(g.x-p.x):f=(a-p.y)/(g.y-p.y);let x=u.decodeHeight(m,o),_=u.decodeHeight(m,r),C=n.rectangle;IT.longitude=W.lerp(C.west,C.east,s),IT.latitude=W.lerp(C.south,C.north,a),d.height=IT.height=W.lerp(x,_,f);let V;if(u.hasVertexNormals){let L=u.getOctEncodedNormal(m,o,vat),Z=u.getOctEncodedNormal(m,r,wat),G=wn.octDecode(L.x,L.y,KV),X=wn.octDecode(Z.x,Z.y,Fat);V=h.lerp(G,X,f,KV),h.normalize(V,V),wn.octEncode(V,d.encodedNormal)}else V=e.geodeticSurfaceNormalCartographic(IT,KV),wn.octEncode(V,d.encodedNormal)}function Oge(e,t,n,i,o,r){r.height=o;let s=t.geodeticSurfaceNormalCartographic(IT,KV);wn.octEncode(s,r.encodedNormal)}function RD(e,t,n,i,o,r,s,a,c,d,u){if(Bge(e,t,a,s,!1,n,i,u)||Bge(e,t,d,c,!0,n,i,u))return u;let p;if(vj(o,r))return n===0?i===0?p=r.eastIndicesNorthToSouth[0]:p=r.southIndicesEastToWest[0]:i===0?p=r.northIndicesWestToEast[0]:p=r.westIndicesSouthToNorth[0],Wj(r,p,n,i,u),u;let g;if(n===0?i===0?g=ZD(e.westMeshes,e.westTiles,gn.EAST,e.southMeshes,e.southTiles,gn.NORTH,n,i):g=ZD(e.northMeshes,e.northTiles,gn.SOUTH,e.westMeshes,e.westTiles,gn.EAST,n,i):i===0?g=ZD(e.southMeshes,e.southTiles,gn.NORTH,e.eastMeshes,e.eastTiles,gn.WEST,n,i):g=ZD(e.eastMeshes,e.eastTiles,gn.WEST,e.northMeshes,e.northTiles,gn.SOUTH,n,i),l(g))return Oge(e,t,n,i,g,u),u}function ZD(e,t,n,i,o,r,s,a){let c=Dge(e,t,!1,n,s,a),d=Dge(i,o,!0,r,s,a);return l(c)&&l(d)?(c+d)*.5:l(c)?c:d}function GD(e,t,n,i,o,r,s,a,c){for(let d=0;d<r.length;++d)o=Mat(e,t,n,i,o,r[d],s[d],a,c);return o}function Mat(e,t,n,i,o,r,s,a,c){let d=r.rectangle;a===gn.EAST&&e.tile.x===0?(d=ce.clone(r.rectangle,ED),d.west-=W.TWO_PI,d.east-=W.TWO_PI):a===gn.WEST&&r.x===0&&(d=ce.clone(r.rectangle,ED),d.west+=W.TWO_PI,d.east+=W.TWO_PI);let u=e.tile.rectangle,m,p;o>0&&(n.decodeTextureCoordinates(i,o-1,zd),m=zd.x,p=zd.y);let g,f;switch(a){case gn.WEST:g=s.westIndicesSouthToNorth,f=!1;break;case gn.NORTH:g=s.northIndicesWestToEast,f=!0;break;case gn.EAST:g=s.eastIndicesNorthToSouth,f=!1;break;case gn.SOUTH:g=s.southIndicesEastToWest,f=!0;break}let x=r,_=e.tile,C=s.encoding,V=s.vertices,L=n.stride,Z,G;C.hasWebMercatorT&&(Z=Vi.geodeticLatitudeToMercatorAngle(u.south),G=1/(Vi.geodeticLatitudeToMercatorAngle(u.north)-Z));for(let X=0;X<g.length;++X){let v=g[X],P=C.decodeTextureCoordinates(V,v,zd);Yw(x,_,P,P);let F=P.x,A=P.y,b=f?F:A;if(b<0||b>1||Math.abs(F-m)<W.EPSILON5&&Math.abs(A-p)<W.EPSILON5)continue;let R=Math.abs(F)<W.EPSILON5||Math.abs(F-1)<W.EPSILON5,E=Math.abs(A)<W.EPSILON5||Math.abs(A-1)<W.EPSILON5;if(R&&E)continue;let I=C.decodePosition(V,v,KV),w=C.decodeHeight(V,v),N;C.hasVertexNormals?N=C.getOctEncodedNormal(V,v,Xj):(N=Xj,N.x=0,N.y=0);let B=A;if(C.hasWebMercatorT){let O=W.lerp(u.south,u.north,A);B=(Vi.geodeticLatitudeToMercatorAngle(O)-Z)*G}let U;n.hasGeodeticSurfaceNormals&&(U=t.geodeticSurfaceNormal(I,Pj)),n.encode(i,o*L,I,P,w,N,B,U),c.minimumHeight=Math.min(c.minimumHeight,w),c.maximumHeight=Math.max(c.maximumHeight,w),++o}return o}function Dge(e,t,n,i,o,r){let s,a,c;n?(s=0,a=e.length,c=1):(s=e.length-1,a=-1,c=-1);for(let d=s;d!==a;d+=c){let u=e[d],m=t[d];if(!vj(m,u))continue;let p;switch(i){case gn.WEST:p=u.westIndicesSouthToNorth;break;case gn.SOUTH:p=u.southIndicesEastToWest;break;case gn.EAST:p=u.eastIndicesNorthToSouth;break;case gn.NORTH:p=u.northIndicesWestToEast;break}let g=p[n?0:p.length-1];if(l(g))return u.encoding.decodeHeight(u.vertices,g)}}function vj(e,t){return l(t)&&(!l(e.data.fill)||!e.data.fill.changedThisFrame)}function Bge(e,t,n,i,o,r,s,a){let c,d,u,m,p,g=i[o?0:n.length-1],f=n[o?0:n.length-1];if(vj(g,f)&&(r===0?s===0?(c=o?f.northIndicesWestToEast:f.eastIndicesNorthToSouth,d=o,u=o):(c=o?f.eastIndicesNorthToSouth:f.southIndicesEastToWest,d=!o,u=!1):s===0?(c=o?f.westIndicesSouthToNorth:f.northIndicesWestToEast,d=!o,u=!0):(c=o?f.southIndicesEastToWest:f.westIndicesSouthToNorth,d=o,u=!o),c.length>0)){m=o?0:c.length-1,p=c[m],f.encoding.decodeTextureCoordinates(f.vertices,p,zd);let x=Yw(g,e.tile,zd,zd);if(x.x===r&&x.y===s)return Wj(f,p,r,s,a),!0;if(m=Ro(c,d?r:s,function(_,C){f.encoding.decodeTextureCoordinates(f.vertices,_,zd);let V=Yw(g,e.tile,zd,zd);return u?d?V.x-r:V.y-s:d?r-V.x:s-V.y}),m<0){if(m=~m,m>0&&m<c.length)return Aat(t,g,e.tile,f,c[m-1],c[m],r,s,d,a),!0}else return Wj(f,c[m],r,s,a),!0}return!1}var Nat=[new h,new h,new h,new h];function kat(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=Nat;return h.fromRadians(n.west,n.south,o,a,c[0]),h.fromRadians(n.east,n.south,o,a,c[1]),h.fromRadians(n.west,n.north,o,a,c[2]),h.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}var QV=JV;function $o(e){this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=xn.RECEIVE_ONLY,this.vertexShadowDarkness=.3,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=void 0,this.undergroundColorAlphaByDistance=void 0,this.lambertDiffuseMultiplier=0,this.materialUniformMap=void 0,this._materialUniformMap=void 0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new ge,this._removeLayerAddedListener=this._imageryLayers.layerAdded.addEventListener($o.prototype._onLayerAdded,this),this._removeLayerRemovedListener=this._imageryLayers.layerRemoved.addEventListener($o.prototype._onLayerRemoved,this),this._removeLayerMovedListener=this._imageryLayers.layerMoved.addEventListener($o.prototype._onLayerMoved,this),this._removeLayerShownListener=this._imageryLayers.layerShownOrHidden.addEventListener($o.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new ge,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new Y(0,0,.5,1),this._clippingPlanes=void 0,this._clippingPolygons=void 0,this.cartographicLimitRectangle=ce.clone(ce.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldVerticalExaggeration=void 0,this._oldVerticalExaggerationRelativeHeight=void 0}Object.defineProperties($o.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this._firstPassInitialColor=se.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){this._quadtree=e}},tilingScheme:{get:function(){if(l(this._terrainProvider))return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){this._terrainProvider!==e&&(this._terrainProvider=e,l(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ss.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){vm.setOwner(e,this,"_clippingPolygons")}}});function Uat(e,t){let n=e.loadingImagery;l(n)||(n=e.readyImagery);let i=t.loadingImagery;return l(i)||(i=t.readyImagery),n.imageryLayer._layerIndex-i.imageryLayer._layerIndex}$o.prototype.update=function(e){this._imageryLayers._update()};function Dat(e,t){let n=t.creditDisplay,i=e._terrainProvider;l(i)&&l(i.credit)&&n.addCreditToNextFrame(i.credit);let o=e._imageryLayers;for(let r=0,s=o.length;r<s;++r){let a=o.get(r);a.ready&&a.show&&l(a.imageryProvider.credit)&&n.addCreditToNextFrame(a.imageryProvider.credit)}}$o.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(i){i.data.imagery.sort(Uat)})),Dat(this,e);let t=this._vertexArraysToDestroy,n=t.length;for(let i=0;i<n;++i)qu._freeVertexArray(t[i]);t.length=0};$o.prototype.beginUpdate=function(e){let t=this._tilesToRenderByTextureCount;for(let o=0,r=t.length;o<r;++o){let s=t[o];l(s)&&(s.length=0)}let n=this._clippingPlanes;l(n)&&n.enabled&&n.update(e);let i=this._clippingPolygons;l(i)&&i.enabled&&(i.update(e),i.queueCommands(e)),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1};$o.prototype.endUpdate=function(e){if(!l(this._renderState)){this._renderState=De.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:qa.LESS}}),this._blendRenderState=De.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:qa.LESS_OR_EQUAL},blending:un.ALPHA_BLEND});let s=Oe(this._renderState,!0);s.cull.enabled=!1,this._disableCullingRenderState=De.fromCache(s),s=Oe(this._blendRenderState,!0),s.cull.enabled=!1,this._disableCullingBlendRenderState=De.fromCache(s)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&QV.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);let t=this.quadtree,n=e.verticalExaggeration,i=e.verticalExaggerationRelativeHeight,o=this._oldVerticalExaggeration!==n||this._oldVerticalExaggerationRelativeHeight!==i;this._oldVerticalExaggeration=n,this._oldVerticalExaggerationRelativeHeight=i,o&&t.forEachLoadedTile(function(s){s.data.updateExaggeration(s,e,t)});let r=this._tilesToRenderByTextureCount;for(let s=0,a=r.length;s<a;++s){let c=r[s];if(l(c))for(let d=0,u=c.length;d<u;++d){let m=c[d],p=m.data.tileBoundingRegion;mct(this,m,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,p.minimumHeight)}}};function Qge(e,t){let n=t.globeTranslucencyState;if(n.translucent){let i=e.renderState.blending.enabled;n.pushDerivedCommands(e,i,t)}else t.commandList.push(e)}$o.prototype.updateForPick=function(e){let t=this._drawCommands;for(let n=0,i=this._usedDrawCommands;n<i;++n)Qge(t[n],e)};$o.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()};$o.prototype.getLevelMaximumGeometricError=function(e){return l(this._terrainProvider)?this._terrainProvider.getLevelMaximumGeometricError(e):0};$o.prototype.loadTile=function(e,t){let n=t.data,i=!0,o;l(n)&&(i=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===Kn.CULLED_BUT_NEEDED,o=n.terrainState),qu.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i),n=t.data,i&&o!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)!==cr.NONE&&n.boundingVolumeSourceTile===t&&(i=!1,qu.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i))};var Bat=new le,jge=new ce,Yat=new ce,Oat=new he;function WD(e,t){if(t.west<t.east)return t;let n=ce.clone(t,Yat);return ce.center(e,Oat).longitude>0?n.east=W.PI:n.west=-W.PI,n}function qge(e,t){if(t.cameraUnderground||t.globeTranslucencyState.translucent)return!0;if(e.backFaceCulling)return!1;let n=e._clippingPlanes;if(l(n)&&n.enabled)return!0;let i=e._clippingPolygons;return!!(l(i)&&i.enabled||!ce.equals(e.cartographicLimitRectangle,ce.MAX_VALUE))}$o.prototype.computeTileVisibility=function(e,t,n){let i=this.computeDistanceToTile(e,t);e._distance=i;let o=qge(this,t);if(t.fog.enabled&&!o&&W.fog(i,t.fog.density)>=1)return cr.NONE;let r=e.data,s=r.tileBoundingRegion;if(r.boundingVolumeSourceTile===void 0)return cr.PARTIAL;let a=t.cullingVolume,c=s.boundingVolume;l(c)||(c=s.boundingSphere),r.clippedByBoundaries=!1;let d=WD(e.rectangle,this.cartographicLimitRectangle),u=ce.simpleIntersection(d,e.rectangle,jge);if(!l(u))return cr.NONE;if(ce.equals(u,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==oe.SCENE3D&&(c=Bat,le.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,s.minimumHeight,s.maximumHeight,c),h.fromElements(c.center.z,c.center.x,c.center.y,c.center),t.mode===oe.MORPHING&&l(r.renderedMesh)&&(c=le.union(s.boundingSphere,c,c))),!l(c))return cr.PARTIAL;let m=this._clippingPlanes;if(l(m)&&m.enabled){let _=m.computeIntersectionWithBoundingVolume(c);if(e.isClipped=_!==Kt.INSIDE,_===Kt.OUTSIDE)return cr.NONE}let p=this._clippingPolygons;if(l(p)&&p.enabled){let _=p.computeIntersectionWithBoundingVolume(s);e.isClipped=_!==Kt.OUTSIDE}let g,f=a.computeVisibility(c);if(f===Kt.OUTSIDE?g=cr.NONE:f===Kt.INTERSECTING?g=cr.PARTIAL:f===Kt.INSIDE&&(g=cr.FULL),g===cr.NONE)return g;let x=t.mode===oe.SCENE3D&&t.camera.frustum instanceof sn;if(t.mode===oe.SCENE3D&&!x&&l(n)&&!o){let _=r.occludeePointInScaledSpace;return!l(_)||n.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(_,s.minimumHeight)?g:cr.NONE}return g};$o.prototype.canRefine=function(e){return l(e.data.terrainData)?!0:this.terrainProvider.getTileDataAvailable(e.x*2,e.y*2,e.level+1)!==void 0};var Hat=[],zat=[];$o.prototype.canRenderWithoutLosingDetail=function(e,t){let n=e.data,i=Hat;i.length=this._imageryLayers.length;let o=!1,r=!1,s;l(n)&&(o=n.terrainState===so.READY,r=!0,s=n.imagery);let a,c;for(a=0,c=i.length;a<c;++a)i[a]=r;if(l(s))for(a=0,c=s.length;a<c;++a){let m=s[a],p=m.loadingImagery,g=!l(p)||p.state===ai.FAILED||p.state===ai.INVALID,f=(m.loadingImagery||m.readyImagery).imageryLayer._layerIndex;i[f]=g&&i[f]}let d=this.quadtree._lastSelectionFrameNumber,u=zat;for(u.length=0,u.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);u.length>0;){let m=u.pop(),p=m._lastSelectionResultFrame===d?m._lastSelectionResult:Kn.NONE;if(p===Kn.RENDERED){let g=m.data;if(!l(g))continue;if(!o&&m.data.terrainState===so.READY)return!1;let f=m.data.imagery;for(a=0,c=f.length;a<c;++a){let x=f[a],_=x.loadingImagery,C=!l(_)||_.state===ai.FAILED||_.state===ai.INVALID,V=(x.loadingImagery||x.readyImagery).imageryLayer._layerIndex;if(C&&!i[V])return!1}}else p===Kn.REFINED&&u.push(m.southwestChild,m.southeastChild,m.northwestChild,m.northeastChild)}return!0};var Kat=new h;$o.prototype.computeTileLoadPriority=function(e,t){let n=e.data;if(n===void 0)return 0;let i=n.tileBoundingRegion.boundingVolume;if(i===void 0)return 0;let o=t.camera.positionWC,r=t.camera.directionWC,s=h.subtract(i.center,o,Kat),a=h.magnitude(s);return a<W.EPSILON5?0:(h.divideByScalar(s,a,s),(1-h.dot(s,r))*e._distance)};var Hge=new M,ID=new M,Jat=new se,Qat=new se,jat=new se,qat=new h,zge=new h,$at=new h,ect=new h;$o.prototype.showTileThisFrame=function(e,t){let n=0,i=e.data.imagery;for(let a=0,c=i.length;a<c;++a){let d=i[a];l(d.readyImagery)&&d.readyImagery.imageryLayer.alpha!==0&&++n}let o=this._tilesToRenderByTextureCount[n];l(o)||(o=[],this._tilesToRenderByTextureCount[n]=o),o.push(e);let r=e.data;l(r.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;let s=this._debug;++s.tilesRendered,s.texturesRendered+=n};var tct=[new h,new h,new h,new h];function Kge(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=tct;return h.fromRadians(n.west,n.south,o,a,c[0]),h.fromRadians(n.east,n.south,o,a,c[1]),h.fromRadians(n.west,n.north,o,a,c[2]),h.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}$o.prototype.computeDistanceToTile=function(e,t){nct(e,this,t);let n=e.data;if(n.boundingVolumeSourceTile===void 0)return 9999999999;let o=n.tileBoundingRegion,r=o.minimumHeight,s=o.maximumHeight;if(n.boundingVolumeSourceTile!==e){let c=t.camera.positionCartographic.height,d=Math.abs(c-r),u=Math.abs(c-s);d>u?(o.minimumHeight=r,o.maximumHeight=r):(o.minimumHeight=s,o.maximumHeight=s)}let a=o.distanceToCamera(t);return o.minimumHeight=r,o.maximumHeight=s,a};function nct(e,t,n){let i=e.data;i===void 0&&(i=e.data=new qu);let o=e.tilingScheme.ellipsoid;i.tileBoundingRegion===void 0&&(i.tileBoundingRegion=new Iu({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:o,minimumHeight:0,maximumHeight:0}));let r=i.tileBoundingRegion,s=r.minimumHeight,a=r.maximumHeight,c=!1,d=e,u=i.mesh,m=i.terrainData;if(u!==void 0&&u.minimumHeight!==void 0&&u.maximumHeight!==void 0)r.minimumHeight=u.minimumHeight,r.maximumHeight=u.maximumHeight,c=!0;else if(m!==void 0&&m._minimumHeight!==void 0&&m._maximumHeight!==void 0)r.minimumHeight=m._minimumHeight,r.maximumHeight=m._maximumHeight;else{r.minimumHeight=Number.NaN,r.maximumHeight=Number.NaN;let p=e.parent;for(;p!==void 0;){let g=p.data;if(g!==void 0){let f=g.mesh,x=g.terrainData;if(f!==void 0&&f.minimumHeight!==void 0&&f.maximumHeight!==void 0){r.minimumHeight=f.minimumHeight,r.maximumHeight=f.maximumHeight;break}else if(x!==void 0&&x._minimumHeight!==void 0&&x._maximumHeight!==void 0){r.minimumHeight=x._minimumHeight,r.maximumHeight=x._maximumHeight;break}}p=p.parent}d=p}if(d!==void 0){let p=n.verticalExaggeration,g=n.verticalExaggerationRelativeHeight;if(p!==1&&(c=!1,r.minimumHeight=hr.getHeight(r.minimumHeight,p,g),r.maximumHeight=hr.getHeight(r.maximumHeight,p,g)),c)i.boundingVolumeIsFromMesh||(r._orientedBoundingBox=Gn.clone(u.orientedBoundingBox,r._orientedBoundingBox),r._boundingSphere=le.clone(u.boundingSphere3D,r._boundingSphere),i.occludeePointInScaledSpace=h.clone(u.occludeePointInScaledSpace,i.occludeePointInScaledSpace),l(i.occludeePointInScaledSpace)||(i.occludeePointInScaledSpace=Kge(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace)));else{let x=r._orientedBoundingBox===void 0||r._boundingSphere===void 0;(r.minimumHeight!==s||r.maximumHeight!==a||x)&&(r.computeBoundingVolumes(o),i.occludeePointInScaledSpace=Kge(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace))}i.boundingVolumeSourceTile=d,i.boundingVolumeIsFromMesh=c}else i.boundingVolumeSourceTile=void 0,i.boundingVolumeIsFromMesh=!1}$o.prototype.isDestroyed=function(){return!1};$o.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),this._removeLayerAddedListener=this._removeLayerAddedListener&&this._removeLayerAddedListener(),this._removeLayerRemovedListener=this._removeLayerRemovedListener&&this._removeLayerRemovedListener(),this._removeLayerMovedListener=this._removeLayerMovedListener&&this._removeLayerMovedListener(),this._removeLayerShownListener=this._removeLayerShownListener&&this._removeLayerShownListener(),me(this)};function ict(e,t,n){return function(i){let o,r,s=-1,a=i.data.imagery,c=a.length,d;for(d=0;d<c;++d)if(o=a[d],r=y(o.readyImagery,o.loadingImagery),r.imageryLayer===t){s=d;break}if(s!==-1){let u=s+e;if(o=a[u],r=l(o)?y(o.readyImagery,o.loadingImagery):void 0,!l(r)||r.imageryLayer!==t)return!t._createTileImagerySkeletons(i,n,u);for(d=s;d<u;++d)a[d].freeResources();a.splice(s,e)}return!0}}$o.prototype._onLayerAdded=function(e,t){if(!this.isDestroyed()&&e.show){let n=this._terrainProvider,i=this,o=this._imageryLayersUpdatedEvent,r=function(){e._imageryCache={},i._quadtree.forEachLoadedTile(function(s){if(l(s._loadedCallbacks[e._layerIndex]))return;let a,c=s.data.imagery,d=c.length,u=-1,m=0;for(a=0;a<d;++a){let g=c[a];if(y(g.readyImagery,g.loadingImagery).imageryLayer===e)u===-1&&(u=a),++m;else if(u!==-1)break}if(u===-1)return;let p=u+m;e._createTileImagerySkeletons(s,n,p)&&(s._loadedCallbacks[e._layerIndex]=ict(m,e,n),s.state=Os.LOADING)})};if(e.ready){let s=e.imageryProvider;s._reload=r}this._quadtree.forEachLoadedTile(function(s){e._createTileImagerySkeletons(s,n)&&(s.state=Os.LOADING,s.level!==0&&(s._lastSelectionResultFrame!==i.quadtree._lastSelectionFrameNumber||s._lastSelectionResult!==Kn.RENDERED)&&(s.renderable=!1))}),this._layerOrderChanged=!0,o.raiseEvent()}};$o.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile(function(n){let i=n.data.imagery,o=-1,r=0;for(let s=0,a=i.length;s<a;++s){let c=i[s],d=c.loadingImagery;if(l(d)||(d=c.readyImagery),d.imageryLayer===e)o===-1&&(o=s),c.freeResources(),++r;else if(o!==-1)break}o!==-1&&i.splice(o,r)}),l(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()};$o.prototype._onLayerMoved=function(e,t,n){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()};$o.prototype._onLayerShownOrHidden=function(e,t,n){n?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var oct=new M,rct=new M;function Jge(e,t){let n={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_atmosphereLightIntensity:function(){return this.properties.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return this.properties.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return this.properties.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return this.properties.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return this.properties.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return this.properties.atmosphereMieAnisotropy},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_verticalExaggerationAndRelativeHeight:function(){return this.properties.verticalExaggerationAndRelativeHeight},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){let i=e.context.uniformState.view,o=M.multiplyByPoint(i,this.properties.rtc,zge);return M.setTranslation(i,o,Hge),Hge},u_modifiedModelViewProjection:function(){let i=e.context.uniformState.view,o=e.context.uniformState.projection,r=M.multiplyByPoint(i,this.properties.rtc,zge);return M.setTranslation(i,r,ID),M.multiply(o,ID,ID),ID},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureNightAlpha:function(){return this.properties.dayTextureNightAlpha},u_dayTextureDayAlpha:function(){return this.properties.dayTextureDayAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){let i=t._clippingPlanes;return l(i)&&l(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){let i=t._clippingPlanes,o=l(i)?M.multiply(e.context.uniformState.view,i.modelMatrix,oct):M.IDENTITY;return M.inverseTranspose(o,rct)},u_clippingPlanesEdgeStyle:function(){let i=this.properties.clippingPlanesEdgeColor;return i.alpha=this.properties.clippingPlanesEdgeWidth,i},u_clippingDistance:function(){let i=t._clippingPolygons.clippingTexture;return l(i)?i:e.context.defaultTexture},u_clippingExtents:function(){let i=t._clippingPolygons.extentsTexture;return l(i)?i:e.context.defaultTexture},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},u_lambertDiffuseMultiplier:function(){return this.properties.lambertDiffuseMultiplier},u_vertexShadowDarkness:function(){return this.properties.vertexShadowDarkness},properties:{initialColor:new se(0,0,.5,1),fillHighlightColor:new Y(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new D(65e5,9e6),nightFadeDistance:new D(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new h(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new h(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new h,center3D:void 0,rtc:new h,modifiedModelView:new M,tileRectangle:new se,verticalExaggerationAndRelativeHeight:new D(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new D,southMercatorYAndOneOverHeight:new D,waterMask:void 0,waterMaskTranslationAndScale:new se,minMaxHeight:new D,scaleAndBias:new M,clippingPlanesEdgeColor:Y.clone(Y.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new se,frontFaceAlphaByDistance:new se,backFaceAlphaByDistance:new se,localizedTranslucencyRectangle:new se,undergroundColor:Y.clone(Y.TRANSPARENT),undergroundColorAlphaByDistance:new se,lambertDiffuseMultiplier:0,vertexShadowDarkness:0}};return l(t.materialUniformMap)?xt(n,t.materialUniformMap):n}function sct(e,t,n){let i=n.data,o,r;if(l(i.vertexArray)?(o=i.mesh,r=i.vertexArray):l(i.fill)&&l(i.fill.vertexArray)&&(o=i.fill.mesh,r=i.fill.vertexArray),!(!l(o)||!l(r))){if(l(i.wireframeVertexArray)){if(i.wireframeVertexArray.mesh===o)return;i.wireframeVertexArray.destroy(),i.wireframeVertexArray=void 0}i.wireframeVertexArray=act(e,r,o),i.wireframeVertexArray.mesh=o}}function act(e,t,n){let o={indices:n.indices,primitiveType:Fe.TRIANGLES};An.toWireframe(o);let r=o.indices,s=ft.createIndexBuffer({context:e,typedArray:r,usage:Ne.STATIC_DRAW,indexDatatype:Me.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new ei({context:e,attributes:t._attributes,indexBuffer:s})}var $ge,eye,PD;(function(){let e=new St({geometry:pm.fromDimensions({dimensions:new h(2,2,2)})}),t=new St({geometry:new u0({radius:1})}),n=new M,i,o;function r(s){return new En({geometryInstances:s,appearance:new ln({translucent:!1,flat:!0}),asynchronous:!1})}$ge=function(s,a){return s===i||(PD(),i=s,n=M.fromRotationTranslation(s.halfAxes,s.center,n),e.modelMatrix=n,e.attributes.color=Ht.fromColor(a),o=r(e)),o},eye=function(s,a){return s===i||(PD(),i=s,n=M.fromTranslation(s.center,n),n=M.multiplyByUniformScale(n,s.radius,n),t.modelMatrix=n,t.attributes.color=Ht.fromColor(a),o=r(t)),o},PD=function(){l(o)&&(o.destroy(),o=void 0,i=void 0)}})();var cct=new se(0,0,0,0),lct={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applyDayNightAlpha:void 0,applySplit:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,enableClippingPolygons:void 0,clippingPolygons:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0,hasGeodeticSurfaceNormals:void 0,hasExaggeration:void 0},dct=Y.TRANSPARENT,uct=new Ft;function mct(e,t,n){let i=t.data;l(i.vertexArray)||(i.fill===void 0&&(i.fill=new QV(t)),i.fill.update(e,n));let o=n.creditDisplay,r=i.terrainData;if(l(r)&&l(r.credits)){let pe=r.credits;for(let Ve=0,Dt=pe.length;Ve<Dt;++Ve)o.addCreditToNextFrame(pe[Ve])}let s=Mt.maximumTextureImageUnits,a=i.waterMaskTexture,c=i.waterMaskTranslationAndScale;!l(a)&&l(i.fill)&&(a=i.fill.waterMaskTexture,c=i.fill.waterMaskTranslationAndScale);let d=n.cameraUnderground,u=n.globeTranslucencyState,m=u.translucent,p=u.frontFaceAlphaByDistance,g=u.backFaceAlphaByDistance,f=u.rectangle,x=y(e.undergroundColor,dct),_=y(e.undergroundColorAlphaByDistance,uct),C=qge(e,n)&&n.mode===oe.SCENE3D&&x.alpha>0&&(_.nearValue>0||_.farValue>0),V=e.lambertDiffuseMultiplier,L=e.vertexShadowDarkness,Z=e.hasWaterMask&&l(a),G=e.oceanNormalMap,X=Z&&l(G),v=e.terrainProvider,P=l(v)&&e.terrainProvider.hasVertexNormals,F=n.fog.enabled&&n.fog.renderable&&!d,A=e.showGroundAtmosphere&&n.mode===oe.SCENE3D,b=xn.castShadows(e.shadows)&&!m,R=xn.receiveShadows(e.shadows)&&!m,E=e.hueShift,I=e.saturationShift,w=e.brightnessShift,N=!(W.equalsEpsilon(E,0,W.EPSILON7)&&W.equalsEpsilon(I,0,W.EPSILON7)&&W.equalsEpsilon(w,0,W.EPSILON7)),B=!1;if(A){let pe=h.magnitude(n.camera.positionWC),Ve=e.nightFadeOutDistance;B=pe>Ve}Z&&--s,X&&--s,l(n.shadowState)&&n.shadowState.shadowsEnabled&&--s,l(e.clippingPlanes)&&e.clippingPlanes.enabled&&--s,l(e.clippingPolygons)&&e.clippingPolygons.enabled&&(--s,--s),s-=u.numberOfTextureUniforms;let U=i.renderedMesh,O=U.center,k=U.encoding,J=i.tileBoundingRegion,H=n.verticalExaggeration,ee=n.verticalExaggerationRelativeHeight,z=H!==1,j=k.hasGeodeticSurfaceNormals,q=Jat,be=0,Te=0,ae=0,ye=0,Se=!1;if(n.mode!==oe.SCENE3D){let pe=n.mapProjection,Ve=pe.project(ce.southwest(t.rectangle),$at),Dt=pe.project(ce.northeast(t.rectangle),ect);if(q.x=Ve.x,q.y=Ve.y,q.z=Dt.x,q.w=Dt.y,n.mode!==oe.MORPHING&&(O=qat,O.x=0,O.y=(q.z+q.x)*.5,O.z=(q.w+q.y)*.5,q.x-=O.y,q.y-=O.z,q.z-=O.y,q.w-=O.z),n.mode===oe.SCENE2D&&k.quantization===Ys.BITS12){let bt=1/(Math.pow(2,12)-1)*.5,li=(q.z-q.x)*bt,Vo=(q.w-q.y)*bt;q.x-=li,q.y-=Vo,q.z+=li,q.w+=Vo}pe instanceof Vi&&(be=t.rectangle.south,Te=t.rectangle.north,ae=Vi.geodeticLatitudeToMercatorAngle(be),ye=1/(Vi.geodeticLatitudeToMercatorAngle(Te)-ae),Se=!0)}let Le=lct;Le.frameState=n,Le.surfaceTile=i,Le.showReflectiveOcean=Z,Le.showOceanWaves=X,Le.enableLighting=e.enableLighting,Le.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,Le.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,Le.showGroundAtmosphere=A,Le.atmosphereLightIntensity=e.atmosphereLightIntensity,Le.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,Le.atmosphereMieCoefficient=e.atmosphereMieCoefficient,Le.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,Le.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,Le.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,Le.perFragmentGroundAtmosphere=B,Le.hasVertexNormals=P,Le.useWebMercatorProjection=Se,Le.clippedByBoundaries=i.clippedByBoundaries,Le.hasGeodeticSurfaceNormals=j,Le.hasExaggeration=z;let Xe=i.imagery,Pe=0,ke=Xe.length,Pt=e.showSkirts&&!d&&!m,Ot=e.backFaceCulling&&!d&&!m,ht=Ot?e._renderState:e._disableCullingRenderState,Ae=Ot?e._blendRenderState:e._disableCullingBlendRenderState,$e=ht,Qe=e._firstPassInitialColor,je=n.context;if(l(e._debug.boundingSphereTile)||PD(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;let pe=e._drawCommands.length;for(let Ve=0;Ve<pe;++Ve)e._uniformMaps[Ve]=Jge(n,e)}do{let pe=0,Ve,Dt;if(e._drawCommands.length<=e._usedDrawCommands?(Ve=new et,Ve.owner=t,Ve.cull=!1,Ve.boundingVolume=new le,Ve.orientedBoundingBox=void 0,Dt=Jge(n,e),e._drawCommands.push(Ve),e._uniformMaps.push(Dt)):(Ve=e._drawCommands[e._usedDrawCommands],Dt=e._uniformMaps[e._usedDrawCommands]),Ve.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){let ya=J.boundingVolume,oo=J.boundingSphere;l(ya)?$ge(ya,Y.RED).update(n):l(oo)&&eye(oo,Y.RED).update(n)}let bt=Dt.properties;se.clone(Qe,bt.initialColor),bt.oceanNormalMap=G,bt.lightingFadeDistance.x=e.lightingFadeOutDistance,bt.lightingFadeDistance.y=e.lightingFadeInDistance,bt.nightFadeDistance.x=e.nightFadeOutDistance,bt.nightFadeDistance.y=e.nightFadeInDistance,bt.atmosphereLightIntensity=e.atmosphereLightIntensity,bt.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,bt.atmosphereMieCoefficient=e.atmosphereMieCoefficient,bt.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,bt.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,bt.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,bt.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;let li=d?g:p,Vo=d?p:g;l(li)&&(se.fromElements(li.near,li.nearValue,li.far,li.farValue,bt.frontFaceAlphaByDistance),se.fromElements(Vo.near,Vo.nearValue,Vo.far,Vo.farValue,bt.backFaceAlphaByDistance)),se.fromElements(_.near,_.nearValue,_.far,_.farValue,bt.undergroundColorAlphaByDistance),Y.clone(x,bt.undergroundColor),bt.lambertDiffuseMultiplier=V,bt.vertexShadowDarkness=L;let Rs=!l(i.vertexArray)&&l(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;Rs&&Y.clone(e.fillHighlightColor,bt.fillHighlightColor),bt.verticalExaggerationAndRelativeHeight.x=H,bt.verticalExaggerationAndRelativeHeight.y=ee,bt.center3D=U.center,h.clone(O,bt.rtc),se.clone(q,bt.tileRectangle),bt.southAndNorthLatitude.x=be,bt.southAndNorthLatitude.y=Te,bt.southMercatorYAndOneOverHeight.x=ae,bt.southMercatorYAndOneOverHeight.y=ye;let zs=Qat,Nr=WD(t.rectangle,e.cartographicLimitRectangle),$r=jat,Ue=WD(t.rectangle,f);h.fromElements(E,I,w,bt.hsbShift);let it=t.rectangle,tt=1/it.width,qe=1/it.height;zs.x=(Nr.west-it.west)*tt,zs.y=(Nr.south-it.south)*qe,zs.z=(Nr.east-it.west)*tt,zs.w=(Nr.north-it.south)*qe,se.clone(zs,bt.localizedCartographicLimitRectangle),$r.x=(Ue.west-it.west)*tt,$r.y=(Ue.south-it.south)*qe,$r.z=(Ue.east-it.west)*tt,$r.w=(Ue.north-it.south)*qe,se.clone($r,bt.localizedTranslucencyRectangle);let dt=F&&W.fog(t._distance,n.fog.density)>W.EPSILON3;N=N&&(dt||A);let Bt=!1,Ln=!1,Lo=!1,nr=!1,Na=!1,ka=!1,io=!1,Bi=!1,us=!1,yr=!1;for(;pe<s&&Pe<ke;){let ya=Xe[Pe],oo=ya.readyImagery;if(++Pe,!l(oo)||oo.imageryLayer.alpha===0)continue;let ZL=ya.useWebMercatorT?oo.textureWebMercator:oo.texture,$n=oo.imageryLayer;l(ya.textureTranslationAndScale)||(ya.textureTranslationAndScale=$n._calculateTextureTranslationAndScale(t,ya)),bt.dayTextures[pe]=ZL,bt.dayTextureTranslationAndScale[pe]=ya.textureTranslationAndScale,bt.dayTextureTexCoordsRectangle[pe]=ya.textureCoordinateRectangle,bt.dayTextureUseWebMercatorT[pe]=ya.useWebMercatorT,bt.dayTextureAlpha[pe]=$n.alpha,ka=ka||bt.dayTextureAlpha[pe]!==1,bt.dayTextureNightAlpha[pe]=$n.nightAlpha,io=io||bt.dayTextureNightAlpha[pe]!==1,bt.dayTextureDayAlpha[pe]=$n.dayAlpha,io=io||bt.dayTextureDayAlpha[pe]!==1,bt.dayTextureBrightness[pe]=$n.brightness,Bt=Bt||bt.dayTextureBrightness[pe]!==ma.DEFAULT_BRIGHTNESS,bt.dayTextureContrast[pe]=$n.contrast,Ln=Ln||bt.dayTextureContrast[pe]!==ma.DEFAULT_CONTRAST,bt.dayTextureHue[pe]=$n.hue,Lo=Lo||bt.dayTextureHue[pe]!==ma.DEFAULT_HUE,bt.dayTextureSaturation[pe]=$n.saturation,nr=nr||bt.dayTextureSaturation[pe]!==ma.DEFAULT_SATURATION,bt.dayTextureOneOverGamma[pe]=1/$n.gamma,Na=Na||bt.dayTextureOneOverGamma[pe]!==1/ma.DEFAULT_GAMMA,bt.dayTextureSplit[pe]=$n.splitDirection,Bi=Bi||bt.dayTextureSplit[pe]!==0;let Ec=bt.dayTextureCutoutRectangles[pe];if(l(Ec)||(Ec=bt.dayTextureCutoutRectangles[pe]=new se),se.clone(se.ZERO,Ec),l($n.cutoutRectangle)){let _r=WD(it,$n.cutoutRectangle),es=ce.simpleIntersection(_r,it,jge);us=l(es)||us,Ec.x=(_r.west-it.west)*tt,Ec.y=(_r.south-it.south)*qe,Ec.z=(_r.east-it.west)*tt,Ec.w=(_r.north-it.south)*qe}let nd=bt.colorsToAlpha[pe];l(nd)||(nd=bt.colorsToAlpha[pe]=new se);let Ny=l($n.colorToAlpha)&&$n.colorToAlphaThreshold>0;if(yr=yr||Ny,Ny){let _r=$n.colorToAlpha;nd.x=_r.red,nd.y=_r.green,nd.z=_r.blue,nd.w=$n.colorToAlphaThreshold}else nd.w=-1;if(l(oo.credits)){let _r=oo.credits;for(let es=0,pb=_r.length;es<pb;++es)o.addCreditToNextFrame(_r[es])}++pe}bt.dayTextures.length=pe,bt.waterMask=a,se.clone(c,bt.waterMaskTranslationAndScale),bt.minMaxHeight.x=k.minimumHeight,bt.minMaxHeight.y=k.maximumHeight,M.clone(k.matrix,bt.scaleAndBias);let ml=e._clippingPlanes,Do=l(ml)&&ml.enabled&&t.isClipped;Do&&(bt.clippingPlanesEdgeColor=Y.clone(ml.edgeColor,bt.clippingPlanesEdgeColor),bt.clippingPlanesEdgeWidth=ml.edgeWidth);let xr=e._clippingPolygons,fb=l(xr)&&xr.enabled&&t.isClipped;Le.numberOfDayTextures=pe,Le.applyBrightness=Bt,Le.applyContrast=Ln,Le.applyHue=Lo,Le.applySaturation=nr,Le.applyGamma=Na,Le.applyAlpha=ka,Le.applyDayNightAlpha=io,Le.applySplit=Bi,Le.enableFog=dt,Le.enableClippingPlanes=Do,Le.clippingPlanes=ml,Le.enableClippingPolygons=fb,Le.clippingPolygons=xr,Le.hasImageryLayerCutout=us,Le.colorCorrect=N,Le.highlightFillTile=Rs,Le.colorToAlpha=yr,Le.showUndergroundColor=C,Le.translucent=m;let Gc=i.renderedMesh.indices.length;Pt||(Gc=i.renderedMesh.indexCountWithoutSkirts),Ve.shaderProgram=e._surfaceShaderSet.getShaderProgram(Le),Ve.castShadows=b,Ve.receiveShadows=R,Ve.renderState=$e,Ve.primitiveType=Fe.TRIANGLES,Ve.vertexArray=i.vertexArray||i.fill.vertexArray,Ve.count=Gc,Ve.uniformMap=Dt,Ve.pass=Re.GLOBE,e._debug.wireframe&&(sct(je,e,t),l(i.wireframeVertexArray)&&(Ve.vertexArray=i.wireframeVertexArray,Ve.primitiveType=Fe.LINES,Ve.count=Gc*2));let Ua=Ve.boundingVolume,dr=Ve.orientedBoundingBox;n.mode!==oe.SCENE3D?(le.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,J.minimumHeight,J.maximumHeight,Ua),h.fromElements(Ua.center.z,Ua.center.x,Ua.center.y,Ua.center),n.mode===oe.MORPHING&&(Ua=le.union(J.boundingSphere,Ua,Ua))):(Ve.boundingVolume=le.clone(J.boundingSphere,Ua),Ve.orientedBoundingBox=Gn.clone(J.boundingVolume,dr)),Ve.dirty=!0,m&&u.updateDerivedCommands(Ve,n),Qge(Ve,n),$e=Ae,Qe=cct}while(Pe<ke)}var Ow=$o;var mIi=T(S(),1);function tye(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=ce.clone(ce.MAX_VALUE)}Object.defineProperties(tye.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){this._frontFaceAlphaByDistance=Ft.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){this._backFaceAlphaByDistance=Ft.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){l(e)||(e=ce.clone(ce.MAX_VALUE)),ce.clone(e,this._rectangle)}}});var Hw=tye;var TIi=T(S(),1);function Ls(){this._layers=[],this.layerAdded=new ge,this.layerRemoved=new ge,this.layerMoved=new ge,this.layerShownOrHidden=new ge}Object.defineProperties(Ls.prototype,{length:{get:function(){return this._layers.length}}});Ls.prototype.add=function(e,t){l(t)?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t);let i=e.readyEvent.addEventListener(()=>{this.layerShownOrHidden.raiseEvent(e,e._layerIndex,e.show),i()})};Ls.prototype.addImageryProvider=function(e,t){let n=new ma(e);return this.add(n,t),n};Ls.prototype.remove=function(e,t){t=y(t,!0);let n=this._layers.indexOf(e);return n!==-1?(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0):!1};Ls.prototype.removeAll=function(e){e=y(e,!0);let t=this._layers;for(let n=0,i=t.length;n<i;n++){let o=t[n];this.layerRemoved.raiseEvent(o,n),e&&o.destroy()}this._layers=[]};Ls.prototype.contains=function(e){return this.indexOf(e)!==-1};Ls.prototype.indexOf=function(e){return this._layers.indexOf(e)};Ls.prototype.get=function(e){return this._layers[e]};function vD(e,t){return e.indexOf(t)}function nye(e,t,n){let i=e._layers;if(t=W.clamp(t,0,i.length-1),n=W.clamp(n,0,i.length-1),t===n)return;let o=i[t];i[t]=i[n],i[n]=o,e._update(),e.layerMoved.raiseEvent(o,n,t)}Ls.prototype.raise=function(e){let t=vD(this._layers,e);nye(this,t,t+1)};Ls.prototype.lower=function(e){let t=vD(this._layers,e);nye(this,t,t-1)};Ls.prototype.raiseToTop=function(e){let t=vD(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))};Ls.prototype.lowerToBottom=function(e){let t=vD(this._layers,e);t!==0&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var hct=new ce;function iye(e,t,n,i){let o=e.globe._surface._tilesToRender,r;for(let a=0;!l(r)&&a<o.length;++a){let c=o[a];ce.contains(c.rectangle,t)&&(r=c)}if(!l(r))return;let s=r.data.imagery;for(let a=s.length-1;a>=0;--a){let c=s[a],d=c.readyImagery;if(!l(d)||!d.imageryLayer.ready)continue;let u=d.imageryLayer.imageryProvider;if(n&&!l(u.pickFeatures)||!ce.contains(d.rectangle,t))continue;let m=hct,p=1/1024;m.west=W.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.x-p),m.east=W.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.z+p),m.south=W.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.y-p),m.north=W.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.w+p),ce.contains(m,t)&&i(d)}}Ls.prototype.pickImageryLayers=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.globe.ellipsoid.cartesianToCartographic(n),o=[];if(iye(t,i,!1,function(r){o.push(r.imageryLayer)}),o.length!==0)return o};Ls.prototype.pickImageryLayerFeatures=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.globe.ellipsoid.cartesianToCartographic(n),o=[],r=[];if(iye(t,i,!0,function(s){if(!s.imageryLayer.ready)return;let c=s.imageryLayer.imageryProvider.pickFeatures(s.x,s.y,s.level,i.longitude,i.latitude);l(c)&&(o.push(c),r.push(s.imageryLayer))}),o.length!==0)return Promise.all(o).then(function(s){let a=[];for(let c=0;c<s.length;++c){let d=s[c],u=r[c];if(l(d)&&d.length>0)for(let m=0;m<d.length;++m){let p=d[m];p.imageryLayer=u,l(p.position)||(p.position=i),a.push(p)}}return a})};Ls.prototype.queueReprojectionCommands=function(e){let t=this._layers;for(let n=0,i=t.length;n<i;++n)t[n].queueReprojectionCommands(e)};Ls.prototype.cancelReprojections=function(){let e=this._layers;for(let t=0,n=e.length;t<n;++t)e[t].cancelReprojections()};Ls.prototype.isDestroyed=function(){return!1};Ls.prototype.destroy=function(){return this.removeAll(!0),me(this)};Ls.prototype._update=function(){let e=!0,t=this._layers,n,i,o,r;for(o=0,r=t.length;o<r;++o)i=t[o],i._layerIndex=o,i.show?(i._isBaseLayer=e,e=!1):i._isBaseLayer=!1,i.show!==i._show&&(l(i._show)&&(l(n)||(n=[]),n.push(i)),i._show=i.show);if(l(n))for(o=0,r=n.length;o<r;++o)i=n[o],this.layerShownOrHidden.raiseEvent(i,i._layerIndex,i.show)};var zw=Ls;var tWi=T(S(),1);var LIi=T(S(),1);function oye(e){this._ellipsoid=new T0(e.ellipsoid,h.ZERO)}Object.defineProperties(oye.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var Kw=oye;var IIi=T(S(),1);function sl(e){this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=Kn.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=Os.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}sl.createLevelZeroTiles=function(e){let t=e.getNumberOfXTilesAtLevel(0),n=e.getNumberOfYTilesAtLevel(0),i=new Array(t*n),o=0;for(let r=0;r<n;++r)for(let s=0;s<t;++s)i[o++]=new sl({tilingScheme:e,x:s,y:r,level:0});return i};sl.prototype._updateCustomData=function(e,t,n){let i=this.customData,o,r,s;if(l(t)&&l(n)){for(i=i.filter(function(a){return n.indexOf(a)===-1}),this._customData=i,s=this._rectangle,o=0;o<t.length;++o)r=t[o],ce.contains(s,r.positionCartographic)&&i.push(r);this._frameUpdated=e}else{let a=this._parent;if(l(a)&&this._frameUpdated!==a._frameUpdated){i.length=0,s=this._rectangle;let c=a.customData;for(o=0;o<c.length;++o)r=c[o],ce.contains(s,r.positionCartographic)&&i.push(r);this._frameUpdated=a._frameUpdated}}};Object.defineProperties(sl.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return l(this._southwestChild)||(this._southwestChild=new sl({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return l(this._southeastChild)||(this._southeastChild=new sl({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return l(this._northwestChild)||(this._northwestChild=new sl({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return l(this._northeastChild)||(this._northeastChild=new sl({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<Os.DONE}},eligibleForUnloading:{get:function(){let e=!0;return l(this.data)&&(e=this.data.eligibleForUnloading,l(e)||(e=!0)),e}}});sl.prototype.findLevelZeroTile=function(e,t,n){let i=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=i:t>=i&&(t-=i),!(n<0||n>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter(function(o){return o.x===t&&o.y===n})[0]};sl.prototype.findTileToWest=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;let n=t.findTileToWest(e);if(n!==void 0)return t.southwestChild===this?n.southeastChild:n.northeastChild};sl.prototype.findTileToEast=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;let n=t.findTileToEast(e);if(n!==void 0)return t.southeastChild===this?n.southwestChild:n.northwestChild};sl.prototype.findTileToSouth=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;let n=t.findTileToSouth(e);if(n!==void 0)return t.southwestChild===this?n.northwestChild:n.northeastChild};sl.prototype.findTileToNorth=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;let n=t.findTileToNorth(e);if(n!==void 0)return t.northwestChild===this?n.southwestChild:n.southeastChild};sl.prototype.freeResources=function(){this.state=Os.START,this.renderable=!1,this.upsampledFromParent=!1,l(this.data)&&l(this.data.freeResources)&&this.data.freeResources(),wD(this._southwestChild),this._southwestChild=void 0,wD(this._southeastChild),this._southeastChild=void 0,wD(this._northwestChild),this._northwestChild=void 0,wD(this._northeastChild),this._northeastChild=void 0};function wD(e){l(e)&&e.freeResources()}var Jw=sl;var vIi=T(S(),1);function FD(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}FD.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head};FD.prototype.trimTiles=function(e){let t=this.tail,n=!0;for(;n&&l(this._lastBeforeStartOfFrame)&&this.count>e&&l(t);){n=t!==this._lastBeforeStartOfFrame;let i=t.replacementPrevious;t.eligibleForUnloading&&(t.freeResources(),rye(this,t)),t=i}};function rye(e,t){let n=t.replacementPrevious,i=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=i),t===e.head?e.head=i:n.replacementNext=i,t===e.tail?e.tail=n:i.replacementPrevious=n,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}FD.prototype.markTileRendered=function(e){let t=this.head;if(t===e){e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext);return}if(++this.count,!l(t)){e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,this.tail=e;return}(l(e.replacementPrevious)||l(e.replacementNext))&&rye(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,this.head=e};var Qw=FD;function em(e){this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let n=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new Qw,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=y(e.maximumScreenSpaceError,2),this.tileCacheSize=y(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new Kw({ellipsoid:n}),this._tileLoadProgressEvent=new ge,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(em.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});em.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function fct(e){let t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,aye(e);let n=e._levelZeroTiles;if(l(n))for(let i=0;i<n.length;++i){let r=n[i].customData,s=r.length;for(let a=0;a<s;++a){let c=r[a];c.level=0,e._addHeightCallbacks.push(c)}n[i].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}em.prototype.forEachLoadedTile=function(e){let t=this._tileReplacementQueue.head;for(;l(t);)t.state!==Os.START&&e(t),t=t.replacementNext};em.prototype.forEachRenderedTile=function(e){let t=this._tilesToRender;for(let n=0,i=t.length;n<i;++n)e(t[n])};em.prototype.updateHeight=function(e,t){let n=this,i={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t};return i.removeFunc=function(){let o=n._addHeightCallbacks,r=o.length;for(let s=0;s<r;++s)if(o[s]===i){o.splice(s,1);break}n._removeHeightCallbacks.push(i),i.callback&&(i.callback=void 0)},n._addHeightCallbacks.push(i),i.removeFunc};em.prototype.update=function(e){l(this._tileProvider.update)&&this._tileProvider.update(e)};function aye(e){let t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}em.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(fct(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),aye(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())};em.prototype.render=function(e){let t=e.passes,n=this._tileProvider;t.render&&(n.beginUpdate(e),yct(this,e),Gct(this,e),n.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&n.updateForPick(e)};function pct(e,t){let n=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;if(n!==e._lastTileLoadQueueLength||e._tilesInvalidated){let o=ge.prototype.raiseEvent.bind(e._tileLoadProgressEvent,n);t.afterRender.push(()=>(o(),!0)),e._lastTileLoadQueueLength=n}let i=e._debug;i.enableDebugOutput&&!i.suspendLodUpdate&&(i.maxDepth=e._tilesToRender.reduce(function(o,r){return Math.max(o,r.level)},-1),i.tilesRendered=e._tilesToRender.length,(i.tilesVisited!==i.lastTilesVisited||i.tilesRendered!==i.lastTilesRendered||i.tilesCulled!==i.lastTilesCulled||i.maxDepth!==i.lastMaxDepth||i.tilesWaitingForChildren!==i.lastTilesWaitingForChildren||i.maxDepthVisited!==i.lastMaxDepthVisited)&&(console.log(`Visited ${i.tilesVisited}, Rendered: ${i.tilesRendered}, Culled: ${i.tilesCulled}, Max Depth Rendered: ${i.maxDepth}, Max Depth Visited: ${i.maxDepthVisited}, Waiting for children: ${i.tilesWaitingForChildren}`),i.lastTilesVisited=i.tilesVisited,i.lastTilesRendered=i.tilesRendered,i.lastTilesCulled=i.tilesCulled,i.lastMaxDepth=i.maxDepth,i.lastTilesWaitingForChildren=i.tilesWaitingForChildren,i.lastMaxDepthVisited=i.maxDepthVisited))}em.prototype.endFrame=function(e){!e.passes.render||e.mode===oe.MORPHING||(Vct(this,e),Zct(this,e),pct(this,e))};em.prototype.isDestroyed=function(){return!1};em.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var qw,sye=new he;function bct(e,t){let n=ce.center(e.rectangle,sye),i=n.longitude-qw.longitude,o=n.latitude-qw.latitude;n=ce.center(t.rectangle,sye);let r=n.longitude-qw.longitude,s=n.latitude-qw.latitude;return i*i+o*o-(r*r+s*s)}var gct=new h,jw=[];function yct(e,t){let n=e._debug;if(n.suspendLodUpdate)return;let i=e._tilesToRender;i.length=0;let o,r=e._tileProvider;if(!l(e._levelZeroTiles)){let x=r.tilingScheme;if(l(x)){let _=r.tilingScheme;e._levelZeroTiles=Jw.createLevelZeroTiles(_);let C=e._levelZeroTiles.length;if(jw.length<C)for(jw=new Array(C),o=0;o<C;++o)jw[o]===void 0&&(jw[o]=new $w)}else return}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;let s,a=e._levelZeroTiles,c=a.length>1?e._occluders:void 0;qw=t.camera.positionCartographic,a.sort(bct);let d=e._addHeightCallbacks,u=e._removeHeightCallbacks,m=t.frameNumber,p;if(d.length>0||u.length>0){for(o=0,p=a.length;o<p;++o)s=a[o],s._updateCustomData(m,d,u);d.length=0,u.length=0}let g=t.camera;e._cameraPositionCartographic=g.positionCartographic;let f=M.getTranslation(g.transform,gct);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(f,e._cameraReferenceFrameOriginCartographic),o=0,p=a.length;o<p;++o)s=a[o],e._tileReplacementQueue.markTileRendered(s),s.renderable?Fa(e,s,r,t,c,!1,jw[o]):($0(e,e._tileLoadQueueHigh,s,t),++n.tilesWaitingForChildren);e._lastSelectionFrameNumber=m}function $0(e,t,n,i){n.needsLoading&&(e.tileProvider.computeTileLoadPriority!==void 0&&(n._loadPriority=e.tileProvider.computeTileLoadPriority(n,i)),t.push(n))}function $w(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function cye(){this.southwest=new $w,this.southeast=new $w,this.northwest=new $w,this.northeast=new $w}cye.prototype.combine=function(e){let t=this.southwest,n=this.southeast,i=this.northwest,o=this.northeast;e.allAreRenderable=t.allAreRenderable&&n.allAreRenderable&&i.allAreRenderable&&o.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||o.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+n.notYetRenderableCount+i.notYetRenderableCount+o.notYetRenderableCount};var Aj=new Array(31);for(let e=0;e<Aj.length;++e)Aj[e]=new cye;function xct(e,t,n,i,o){let r=e._debug;++r.tilesVisited,e._tileReplacementQueue.markTileRendered(n),n._updateCustomData(t.frameNumber),n.level>r.maxDepthVisited&&(r.maxDepthVisited=n.level);let s=Sct(e,t,n)<e.maximumScreenSpaceError,a=n.southwestChild,c=n.southeastChild,d=n.northwestChild,u=n.northeastChild,m=e._lastSelectionFrameNumber,p=n._lastSelectionResultFrame===m?n._lastSelectionResult:Kn.NONE,g=e.tileProvider;if(s||i){let f=Kn.originalResult(p)===Kn.RENDERED,x=Kn.originalResult(p)===Kn.CULLED||p===Kn.NONE,_=n.state===Os.DONE,C=f||x||_;if(C||l(g.canRenderWithoutLosingDetail)&&(C=g.canRenderWithoutLosingDetail(n)),C){s&&$0(e,e._tileLoadQueueMedium,n,t),AD(e,n),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===Kn.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Kn.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}i=!0,s&&$0(e,e._tileLoadQueueHigh,n,t)}if(g.canRefine(n)){if(a.upsampledFromParent&&c.upsampledFromParent&&d.upsampledFromParent&&u.upsampledFromParent){AD(e,n),$0(e,e._tileLoadQueueMedium,n,t),e._tileReplacementQueue.markTileRendered(a),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(d),e._tileReplacementQueue.markTileRendered(u),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===Kn.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Kn.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Kn.REFINED;let x=e._tilesToRender.length,_=e._tileLoadQueueLow.length,C=e._tileLoadQueueMedium.length,V=e._tileLoadQueueHigh.length,L=e._tileToUpdateHeights.length;if(_ct(e,a,c,d,u,t,i,o),x!==e._tilesToRender.length){let Z=o.allAreRenderable,G=o.anyWereRenderedLastFrame,X=o.notYetRenderableCount,v=!1;if(!Z&&!G){let P=e._tilesToRender;for(let A=x;A<P.length;++A){let b=P[A];for(;b!==void 0&&b._lastSelectionResult!==Kn.KICKED&&b!==n;)b._lastSelectionResult=Kn.kick(b._lastSelectionResult),b=b.parent}e._tilesToRender.length=x,e._tileToUpdateHeights.length=L,AD(e,n),n._lastSelectionResult=Kn.RENDERED;let F=p===Kn.RENDERED;!F&&X>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=_,e._tileLoadQueueMedium.length=C,e._tileLoadQueueHigh.length=V,$0(e,e._tileLoadQueueMedium,n,t),o.notYetRenderableCount=n.renderable?0:1,v=!0),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=F,F||e._tileToUpdateHeights.push(n),++r.tilesWaitingForChildren}e.preloadAncestors&&!v&&$0(e,e._tileLoadQueueLow,n,t)}return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Kn.RENDERED,AD(e,n),$0(e,e._tileLoadQueueHigh,n,t),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===Kn.RENDERED,o.notYetRenderableCount=n.renderable?0:1}function _ct(e,t,n,i,o,r,s,a){let c=r.camera.positionCartographic,d=e._tileProvider,u=e._occluders,m=Aj[t.level],p=m.southwest,g=m.southeast,f=m.northwest,x=m.northeast;c.longitude<t.rectangle.east?c.latitude<t.rectangle.north?(Fa(e,t,d,r,u,s,p),Fa(e,n,d,r,u,s,g),Fa(e,i,d,r,u,s,f),Fa(e,o,d,r,u,s,x)):(Fa(e,i,d,r,u,s,f),Fa(e,t,d,r,u,s,p),Fa(e,o,d,r,u,s,x),Fa(e,n,d,r,u,s,g)):c.latitude<t.rectangle.north?(Fa(e,n,d,r,u,s,g),Fa(e,t,d,r,u,s,p),Fa(e,o,d,r,u,s,x),Fa(e,i,d,r,u,s,f)):(Fa(e,o,d,r,u,s,x),Fa(e,i,d,r,u,s,f),Fa(e,n,d,r,u,s,g),Fa(e,t,d,r,u,s,p)),m.combine(a)}function Tct(e,t){let n=t.rectangle;return l(e._cameraPositionCartographic)&&ce.contains(n,e._cameraPositionCartographic)||l(e._cameraReferenceFrameOriginCartographic)&&ce.contains(n,e._cameraReferenceFrameOriginCartographic)}function Fa(e,t,n,i,o,r,s){if(n.computeTileVisibility(t,i,o)!==cr.NONE)return xct(e,i,t,r,s);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),s.allAreRenderable=!0,s.anyWereRenderedLastFrame=!1,s.notYetRenderableCount=0,Tct(e,t)){(!l(t.data)||!l(t.data.vertexArray))&&$0(e,e._tileLoadQueueMedium,t,i);let a=e._lastSelectionFrameNumber,c=t._lastSelectionResultFrame===a?t._lastSelectionResult:Kn.NONE;c!==Kn.CULLED_BUT_NEEDED&&c!==Kn.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=Kn.CULLED_BUT_NEEDED}else e.preloadSiblings||t.level===0?($0(e,e._tileLoadQueueLow,t,i),t._lastSelectionResult=Kn.CULLED):t._lastSelectionResult=Kn.CULLED;t._lastSelectionResultFrame=i.frameNumber}function Sct(e,t,n){if(t.mode===oe.SCENE2D||t.camera.frustum instanceof sn||t.camera.frustum instanceof Cr)return Cct(e,t,n);let i=e._tileProvider.getLevelMaximumGeometricError(n.level),o=n._distance,r=t.context.drawingBufferHeight,s=t.camera.frustum.sseDenominator,a=i*r/(o*s);return t.fog.enabled&&(a-=W.fog(o,t.fog.density)*t.fog.sse),a/=t.pixelRatio,a}function Cct(e,t,n){let o=t.camera.frustum,r=o.offCenterFrustum;l(r)&&(o=r);let s=t.context,a=s.drawingBufferWidth,c=s.drawingBufferHeight,d=e._tileProvider.getLevelMaximumGeometricError(n.level),u=Math.max(o.top-o.bottom,o.right-o.left)/Math.max(a,c),m=d/u;return t.fog.enabled&&t.mode!==oe.SCENE2D&&(m-=W.fog(n._distance,t.fog.density)*t.fog.sse),m/=t.pixelRatio,m}function AD(e,t){e._tilesToRender.push(t)}function Vct(e,t){let n=e._tileLoadQueueHigh,i=e._tileLoadQueueMedium,o=e._tileLoadQueueLow;if(n.length===0&&i.length===0&&o.length===0)return;e._tileReplacementQueue.trimTiles(e.tileCacheSize);let r=bi()+e._loadQueueTimeSlice,s=e._tileProvider,a=wj(e,t,s,r,n,!1);a=wj(e,t,s,r,i,a),wj(e,t,s,r,o,a)}function Lct(e,t){return e._loadPriority-t._loadPriority}function wj(e,t,n,i,o,r){n.computeTileLoadPriority!==void 0&&o.sort(Lct);for(let s=0,a=o.length;s<a&&(bi()<i||!r);++s){let c=o[s];e._tileReplacementQueue.markTileRendered(c),n.loadTile(t,c),r=!0}return r}var jV=new pn,Fj=new he,Sy=new h,Rct=[];function Zct(e,t){if(!l(e.tileProvider.tilingScheme))return;let n=Rct;n.length=0;let i=e._tileToUpdateHeights,o=bi(),r=e._updateHeightsTimeSlice,s=o+r,a=t.mode,c=t.mapProjection,d=e.tileProvider.tilingScheme.ellipsoid,u;for(;i.length>0;){let m=i[0];if(!l(m.data)||!l(m.data.mesh)){let x=m._lastSelectionResultFrame===e._lastSelectionFrameNumber?m._lastSelectionResult:Kn.NONE;(x===Kn.RENDERED||x===Kn.CULLED_BUT_NEEDED)&&n.push(m),i.shift(),e._lastTileIndex=0;continue}let p=m.customData,g=p.length,f=!1;for(u=e._lastTileIndex;u<g;++u){let x=p[u],_=m.data.terrainData,C=l(_)&&_.wasCreatedByUpsampling();if(m.level>x.level&&!C){if(l(x.positionOnEllipsoidSurface)||(x.positionOnEllipsoidSurface=h.fromRadians(x.positionCartographic.longitude,x.positionCartographic.latitude,0,d)),a===oe.SCENE3D){let L=d.geodeticSurfaceNormal(x.positionOnEllipsoidSurface,jV.direction),Z=d.getSurfaceNormalIntersectionWithZAxis(x.positionOnEllipsoidSurface,11500,jV.origin);if(!l(Z)){let G=0;l(m.data.tileBoundingRegion)&&(G=m.data.tileBoundingRegion.minimumHeight);let X=Math.min(G,-11500),v=h.multiplyByScalar(L,Math.abs(X)+1,Sy);h.subtract(x.positionOnEllipsoidSurface,v,jV.origin)}}else he.clone(x.positionCartographic,Fj),Fj.height=-11500,c.project(Fj,Sy),h.fromElements(Sy.z,Sy.x,Sy.y,Sy),h.clone(Sy,jV.origin),h.clone(h.UNIT_X,jV.direction);let V=m.data.pick(jV,a,c,!1,Sy);l(V)&&(l(x.callback)&&x.callback(V),x.level=m.level)}if(bi()>=s){f=!0;break}}if(f){e._lastTileIndex=u;break}else e._lastTileIndex=0,i.shift()}for(u=0;u<n.length;u++)i.push(n[u])}function Gct(e,t){let n=e._tileProvider,i=e._tilesToRender;for(let o=0,r=i.length;o<r;++o){let s=i[o];n.showTileThisFrame(s,t)}}var eF=em;function Lh(e){e=y(e,ie.WGS84);let t=new Af({ellipsoid:e}),n=new zw;this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new Iw,this._material=void 0,this._surface=new eF({tileProvider:new Ow({terrainProvider:t,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new ge,this._undergroundColor=Y.clone(Y.BLACK),this._undergroundColorAlphaByDistance=new Ft(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new Hw,Nj(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new Ee({url:tn("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.lambertDiffuseMultiplier=.9,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!0,this.atmosphereLightIntensity=10,this.atmosphereRayleighCoefficient=new h(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new h(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=xn.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this.vertexShadowDarkness=.3}Object.defineProperties(Lh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tilesLoaded:{get:function(){return l(this._surface)?this._surface._tileLoadQueueHigh.length===0&&this._surface._tileLoadQueueMedium.length===0&&this._surface._tileLoadQueueLow.length===0:!0}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},clippingPolygons:{get:function(){return this._surface.tileProvider.clippingPolygons},set:function(e){this._surface.tileProvider.clippingPolygons=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){l(e)||(e=ce.clone(ce.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),l(this._material)&&Nj(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,Nj(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=Y.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){this._undergroundColorAlphaByDistance=Ft.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});function Nj(e){let t=[],n=l(e._material)&&(l(e._material.shaderSource.match(/slope/))||l(e._material.shaderSource.match("normalEC"))),i=[z0,wV];l(e._material)&&(!n||e._terrainProvider.requestVertexNormals)?(i.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms):e._surface._tileProvider.materialUniformMap=void 0,i.push(xw),e._surfaceShaderSet.baseVertexShaderSource=new Ye({sources:[z0,wV,_w],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new Ye({sources:i,defines:t}),e._surfaceShaderSet.material=e._material}function Ect(e){return function(t,n){let i=le.distanceSquaredTo(t.pickBoundingSphere,e),o=le.distanceSquaredTo(n.pickBoundingSphere,e);return i-o}}var Xct=[],Ict={start:0,stop:0};Lh.prototype.pickWorldCoordinates=function(e,t,n,i){n=y(n,!0);let o=t.mode,r=t.mapProjection,s=Xct;s.length=0;let a=this._surface._tilesToRender,c=a.length,d,u;for(u=0;u<c;++u){d=a[u];let p=d.data;if(!l(p))continue;let g=p.pickBoundingSphere;if(o!==oe.SCENE3D)p.pickBoundingSphere=g=le.fromRectangleWithHeights2D(d.rectangle,r,p.tileBoundingRegion.minimumHeight,p.tileBoundingRegion.maximumHeight,g),h.fromElements(g.center.z,g.center.x,g.center.y,g.center);else if(l(p.renderedMesh))le.clone(p.tileBoundingRegion.boundingSphere,g);else continue;let f=jn.raySphere(e,g,Ict);l(f)&&s.push(p)}s.sort(Ect(e.origin));let m;for(c=s.length,u=0;u<c&&(m=s[u].pick(e,t.mode,t.mapProjection,n,i),!l(m));++u);return m};var Wct=new he;Lh.prototype.pick=function(e,t,n){if(n=this.pickWorldCoordinates(e,t,!0,n),l(n)&&t.mode!==oe.SCENE3D){n=h.fromElements(n.y,n.z,n.x,n);let i=t.mapProjection.unproject(n,Wct);n=t.globe.ellipsoid.cartographicToCartesian(i,n)}return n};var Pct=new h,lye=new h,vct=new he,wct=new pn;function Mj(e,t){return l(e)&&ce.contains(e.rectangle,t)?e:void 0}Lh.prototype.getHeight=function(e){let t=this._surface._levelZeroTiles;if(!l(t))return;let n,i,o=t.length;for(i=0;i<o&&(n=t[i],!ce.contains(n.rectangle,e));++i);if(i>=o)return;let r=n;for(;l(n);)n=Mj(n._southwestChild,e)||Mj(n._southeastChild,e)||Mj(n._northwestChild,e)||n._northeastChild,l(n)&&l(n.data)&&l(n.data.renderedMesh)&&(r=n);if(n=r,!l(n)||!l(n.data)||!l(n.data.renderedMesh))return;let s=this._surface._tileProvider.tilingScheme.projection,a=this._surface._tileProvider.tilingScheme.ellipsoid,c=h.fromRadians(e.longitude,e.latitude,0,a,Pct),d=wct,u=a.geodeticSurfaceNormal(c,d.direction),m=a.getSurfaceNormalIntersectionWithZAxis(c,11500,d.origin);if(!l(m)){let g;l(n.data.tileBoundingRegion)&&(g=n.data.tileBoundingRegion.minimumHeight);let f=Math.min(y(g,0),-11500),x=h.multiplyByScalar(u,Math.abs(f)+1,lye);h.subtract(c,x,d.origin)}let p=n.data.pick(d,void 0,s,!1,lye);if(l(p))return a.cartesianToCartographic(p,vct).height};Lh.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)};Lh.prototype.beginFrame=function(e){let t=this._surface,n=t.tileProvider,i=this.terrainProvider,o=this.showWaterEffect&&l(i)&&i.hasWaterMask&&i.hasWaterMask;if(o&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;let a=this._oceanNormalMapResource,c=a.url;if(l(c)){let d=this;a.fetchImage().then(function(u){c===d._oceanNormalMapResource.url&&(d._oceanNormalMap=d._oceanNormalMap&&d._oceanNormalMap.destroy(),d._oceanNormalMap=new Et({context:e.context,source:u}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}let r=e.passes,s=e.mode;r.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,n.terrainProvider=this.terrainProvider,n.lightingFadeOutDistance=this.lightingFadeOutDistance,n.lightingFadeInDistance=this.lightingFadeInDistance,n.nightFadeOutDistance=this.nightFadeOutDistance,n.nightFadeInDistance=this.nightFadeInDistance,n.zoomedOutOceanSpecularIntensity=s===oe.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,n.hasWaterMask=o,n.oceanNormalMap=this._oceanNormalMap,n.enableLighting=this.enableLighting,n.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,n.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,n.showGroundAtmosphere=this.showGroundAtmosphere,n.atmosphereLightIntensity=this.atmosphereLightIntensity,n.atmosphereRayleighCoefficient=this.atmosphereRayleighCoefficient,n.atmosphereMieCoefficient=this.atmosphereMieCoefficient,n.atmosphereRayleighScaleHeight=this.atmosphereRayleighScaleHeight,n.atmosphereMieScaleHeight=this.atmosphereMieScaleHeight,n.atmosphereMieAnisotropy=this.atmosphereMieAnisotropy,n.shadows=this.shadows,n.hueShift=this.atmosphereHueShift,n.saturationShift=this.atmosphereSaturationShift,n.brightnessShift=this.atmosphereBrightnessShift,n.fillHighlightColor=this.fillHighlightColor,n.showSkirts=this.showSkirts,n.backFaceCulling=this.backFaceCulling,n.vertexShadowDarkness=this.vertexShadowDarkness,n.undergroundColor=this._undergroundColor,n.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,n.lambertDiffuseMultiplier=this.lambertDiffuseMultiplier,t.beginFrame(e))};Lh.prototype.render=function(e){this.show&&(l(this._material)&&this._material.update(e.context),this._surface.render(e))};Lh.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)};Lh.prototype.isDestroyed=function(){return!1};Lh.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),me(this)};var tF=Lh;var g2i=T(S(),1);var n2i=T(S(),1);var kj={position:0};function MD(e){e=y(e,y.EMPTY_OBJECT),this.center=h.clone(y(e.center,h.ZERO)),this._center=new h,this.radii=h.clone(e.radii),this._radii=new h,this._oneOverEllipsoidRadiiSquared=new h,this._boundingSphere=new le,this.modelMatrix=M.clone(y(e.modelMatrix,M.IDENTITY)),this._modelMatrix=new M,this._computedModelMatrix=new M,this.show=y(e.show,!0),this.material=y(e.material,Ai.fromType(Ai.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=y(e.debugShowBoundingVolume,!1),this.onlySunLighting=y(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=y(e.depthTestEnabled,!0),this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new et({owner:y(e._owner,this)}),this._pickCommand=new et({owner:y(e._owner,this),pickOnly:!0});let t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function Fct(e){let t=e.cache.ellipsoidPrimitive_vertexArray;if(l(t))return t;let n=gl.createGeometry(gl.fromDimensions({dimensions:new h(2,2,2),vertexFormat:We.POSITION_ONLY}));return t=ei.fromGeometry({context:e,geometry:n,attributeLocations:kj,bufferUsage:Ne.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}MD.prototype.update=function(e){if(!this.show||e.mode!==oe.SCENE3D||!l(this.center)||!l(this.radii))return;let t=e.context,n=this.material.isTranslucent(),i=this._translucent!==n;(!l(this._rs)||i)&&(this._translucent=n,this._rs=De.fromCache({cull:{enabled:!0,face:fi.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!n&&t.fragmentDepth,blending:n?un.ALPHA_BLEND:void 0})),l(this._va)||(this._va=Fct(t));let o=!1,r=this.radii;if(!h.equals(this._radii,r)){h.clone(r,this._radii);let x=this._oneOverEllipsoidRadiiSquared;x.x=1/(r.x*r.x),x.y=1/(r.y*r.y),x.z=1/(r.z*r.z),o=!0}(!M.equals(this.modelMatrix,this._modelMatrix)||!h.equals(this.center,this._center))&&(M.clone(this.modelMatrix,this._modelMatrix),h.clone(this.center,this._center),M.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(h.clone(h.ZERO,this._boundingSphere.center),this._boundingSphere.radius=h.maximumComponent(r),le.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));let s=this._material!==this.material;this._material=this.material,this._material.update(t);let a=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;let c=e.useLogDepth,d=this._useLogDepth!==c;this._useLogDepth=c;let u=this._colorCommand,m,p;(s||a||i||d)&&(m=new Ye({sources:[vV]}),p=new Ye({sources:[this.material.shaderSource,PV]}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(m.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._sp=qt.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:kj}),u.vertexArray=this._va,u.renderState=this._rs,u.shaderProgram=this._sp,u.uniformMap=xt(this._uniforms,this.material._uniforms),u.executeInClosestFrustum=n);let g=e.commandList,f=e.passes;if(f.render&&(u.boundingVolume=this._boundingSphere,u.debugShowBoundingVolume=this.debugShowBoundingVolume,u.modelMatrix=this._computedModelMatrix,u.pass=n?Re.TRANSLUCENT:Re.OPAQUE,g.push(u)),f.pick){let x=this._pickCommand;(!l(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(s||a||!l(this._pickSP)||d)&&(m=new Ye({sources:[vV]}),p=new Ye({sources:[this.material.shaderSource,PV],pickColorQualifier:"uniform"}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(m.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._pickSP=qt.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:kj}),x.vertexArray=this._va,x.renderState=this._rs,x.shaderProgram=this._pickSP,x.uniformMap=xt(xt(this._uniforms,this._pickUniforms),this.material._uniforms),x.executeInClosestFrustum=n),x.boundingVolume=this._boundingSphere,x.modelMatrix=this._computedModelMatrix,x.pass=n?Re.TRANSLUCENT:Re.OPAQUE,g.push(x)}};MD.prototype.isDestroyed=function(){return!1};MD.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),me(this)};var nF=MD;function iF(e){e=y(e,y.EMPTY_OBJECT);let t=e.textureUrl;l(t)||(t=tn("Assets/Textures/moonSmall.jpg")),this.show=y(e.show,!0),this.textureUrl=t,this._ellipsoid=y(e.ellipsoid,ie.MOON),this.onlySunLighting=y(e.onlySunLighting,!0),this._ellipsoidPrimitive=new nF({radii:this.ellipsoid.radii,material:Ai.fromType(Ai.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new jv}Object.defineProperties(iF.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var ND=new $,Act=new $,Mct=new h,kD=[];iF.prototype.update=function(e){if(!this.show)return;let t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;let n=e.time;l(Gt.computeIcrfToFixedMatrix(n,ND))||Gt.computeTemeToPseudoFixedMatrix(n,ND);let i=this._axes.evaluate(n,Act);$.transpose(i,i),$.multiply(ND,i,i);let o=cy.computeMoonPositionInEarthInertialFrame(n,Mct);$.multiplyByVector(ND,o,o),M.fromRotationTranslation(i,o,t.modelMatrix);let r=e.commandList;return e.commandList=kD,kD.length=0,t.update(e),e.commandList=r,kD.length===1?kD[0]:void 0};iF.prototype.isDestroyed=function(){return!1};iF.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),me(this)};var oF=iF;var sHi=T(S(),1);var C2i=T(S(),1);var x2i=T(S(),1),rF={NONE:0,SCENE_LIGHT:1,SUNLIGHT:2};rF.fromGlobeFlags=function(e){return e.enableLighting&&e.dynamicAtmosphereLighting?e.dynamicAtmosphereLightingFromSun?rF.SUNLIGHT:rF.SCENE_LIGHT:rF.NONE};var WT=Object.freeze(rF);function Nct(){this.lightIntensity=10,this.rayleighCoefficient=new h(55e-7,13e-6,284e-7),this.mieCoefficient=new h(21e-6,21e-6,21e-6),this.rayleighScaleHeight=1e4,this.mieScaleHeight=3200,this.mieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.dynamicLighting=WT.NONE}var sF=Nct;var w2i=T(S(),1);function aF(){this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(aF.prototype,{colorTexture:{get:function(){return this._colorTexture}}});function kct(e,t,n){let i=t.createViewportQuadCommand(lw,{framebuffer:n,renderState:De.fromCache({viewport:new He(0,0,256,256)})});e._drawCommand=i}aF.prototype.update=function(e){if(!l(this._colorTexture)){let t=e.context,n=new Et({context:t,width:256,height:256,pixelFormat:at.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,sampler:rn.NEAREST});this._colorTexture=n;let i=new ta({context:t,colorTextures:[n],destroyAttachments:!1});kct(this,t,i),this._drawCommand.execute(t),i.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}};aF.prototype.isDestroyed=function(){return!1};aF.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),me(this)};var cF=aF;var LPi=T(S(),1);var z2i=T(S(),1);var hye={};function Uct(e,t,n){let i,o,r;if(e instanceof Ti){let s=Math.tan(.5*e.fovy);return i=e.near,o=e.near*s,r=e.aspectRatio*o,Math.max(t*i/r,n*i/o)}else if(e instanceof ol)return i=e.near,o=e.top,r=e.right,Math.max(t*i/r,n*i/o);return Math.max(t,n)}var Dct=new h,dye=new h;function fye(e,t,n,i){if(l(i)&&n(.5)>i){let o=n(0),r=n(1),s=n(.5),a=s-o,c=s-r;return function(d){let u=n(d);if(d<=.5){let p=(u-o)/a;return W.lerp(e,-W.PI_OVER_TWO,p)}let m=(u-r)/c;return W.lerp(-W.PI_OVER_TWO,t,1-m)}}return function(o){return W.lerp(e,t,o)}}function Dj(e,t,n,i,o){let r=o,s=Math.max(n,i);if(!l(r)){let a=e.position,c=t,d=e.up,u=e.right,m=e.frustum,p=h.subtract(a,c,Dct),g=h.magnitude(h.multiplyByScalar(d,h.dot(p,d),dye)),f=h.magnitude(h.multiplyByScalar(u,h.dot(p,u),dye));r=Math.min(Uct(m,g,f)*.2,1e9)}if(s<r){let d=-Math.pow((r-n)*1e6,.125),u=Math.pow((r-i)*1e6,1/8);return function(m){let p=m*(u-d)+d;return-Math.pow(p,8)/1e6+r}}return function(a){return W.lerp(n,i,a)}}function lF(e,t){return W.equalsEpsilon(e,W.TWO_PI,W.EPSILON11)&&(e=0),t>e+Math.PI?e+=W.TWO_PI:t<e-Math.PI&&(e-=W.TWO_PI),e}var pye=new h;function Bct(e,t,n,i,o,r,s,a){let c=e.camera,d=h.clone(c.position,pye),u=c.pitch,m=lF(c.heading,i),p=lF(c.roll,r),g=Dj(c,n,d.z,n.z,s),f=fye(u,o,g,a);function x(_){let C=_.time/t;c.setView({orientation:{heading:W.lerp(m,i,C),pitch:f(C),roll:W.lerp(p,r,C)}}),D.lerp(d,n,C,c.position),c.position.z=g(C)}return x}function Yct(e,t){e.longitude<t.longitude?e.longitude+=W.TWO_PI:t.longitude+=W.TWO_PI}function Oct(e,t){let n=e.longitude-t.longitude;n<-W.PI?e.longitude+=W.TWO_PI:n>W.PI&&(t.longitude+=W.TWO_PI)}var Hct=new he,zct=new he;function Kct(e,t,n,i,o,r,s,a,c,d){let u=e.camera,p=e.mapProjection.ellipsoid,g=he.clone(u.positionCartographic,Hct),f=u.pitch,x=lF(u.heading,i),_=lF(u.roll,r),C=p.cartesianToCartographic(n,zct);g.longitude=W.zeroToTwoPi(g.longitude),C.longitude=W.zeroToTwoPi(C.longitude);let V=!1;if(l(a)){let X=W.zeroToTwoPi(a),v=Math.min(g.longitude,C.longitude),P=Math.max(g.longitude,C.longitude),F=X>=v&&X<=P;if(l(c)){let A=Math.abs(g.longitude-C.longitude),b=W.TWO_PI-A;(F?A:b)<(F?b:A)*c&&!F&&(V=!0)}else F||(V=!0)}V?Yct(g,C):Oct(g,C);let L=Dj(u,n,g.height,C.height,s),Z=fye(f,o,L,d);function G(){let X=g.longitude,v=C.longitude,P=g.latitude,F=C.latitude;return function(b){let R=b.time/t,E=h.fromRadians(W.lerp(X,v,R),W.lerp(P,F,R),L(R),p);u.setView({destination:E,orientation:{heading:W.lerp(x,i,R),pitch:Z(R),roll:W.lerp(_,r,R)}})}}return G()}function Jct(e,t,n,i,o,r,s){let a=e.camera,c=h.clone(a.position,pye),d=lF(a.heading,i),u=a.frustum.right-a.frustum.left,m=Dj(a,n,u,n.z,s);function p(g){let f=g.time/t;a.setView({orientation:{heading:W.lerp(d,i,f)}}),D.lerp(c,n,f,a.position);let x=m(f),_=a.frustum,C=_.top/_.right,V=(x-(_.right-_.left))*.5;_.right+=V,_.left-=V,_.top=C*_.right,_.bottom=-_.top}return p}var uye=new he,Qct=new h;function Uj(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function mye(e,t){function n(){typeof t=="function"&&t(),e.enableInputs=!0}return n}hye.createTween=function(e,t){t=y(t,y.EMPTY_OBJECT);let n=t.destination,i=e.mode;if(i===oe.MORPHING)return Uj();let o=y(t.convert,!0),r=e.mapProjection,s=r.ellipsoid,a=t.maximumHeight,c=t.flyOverLongitude,d=t.flyOverLongitudeWeight,u=t.pitchAdjustHeight,m=t.easingFunction;o&&i!==oe.SCENE3D&&(s.cartesianToCartographic(n,uye),n=r.project(uye,Qct));let p=e.camera,g=t.endTransform;l(g)&&p._setTransform(g);let f=t.duration;l(f)||(f=Math.ceil(h.distance(p.position,n)/1e6)+2,f=Math.min(f,3));let x=y(t.heading,0),_=y(t.pitch,-W.PI_OVER_TWO),C=y(t.roll,0),V=e.screenSpaceCameraController;V.enableInputs=!1;let L=mye(V,t.complete),Z=mye(V,t.cancel),G=p.frustum,X=e.mode===oe.SCENE2D;if(X=X&&D.equalsEpsilon(p.position,n,W.EPSILON6),X=X&&W.equalsEpsilon(Math.max(G.right-G.left,G.top-G.bottom),n.z,W.EPSILON6),X=X||e.mode!==oe.SCENE2D&&h.equalsEpsilon(n,p.position,W.EPSILON10),X=X&&W.equalsEpsilon(W.negativePiToPi(x),W.negativePiToPi(p.heading),W.EPSILON10)&&W.equalsEpsilon(W.negativePiToPi(_),W.negativePiToPi(p.pitch),W.EPSILON10)&&W.equalsEpsilon(W.negativePiToPi(C),W.negativePiToPi(p.roll),W.EPSILON10),X)return Uj(L,Z);let v=new Array(4);if(v[oe.SCENE2D]=Jct,v[oe.SCENE3D]=Kct,v[oe.COLUMBUS_VIEW]=Bct,f<=0)return Uj(function(){v[i](e,1,n,x,_,C,a,c,d,u)({time:1}),typeof L=="function"&&L()},Z);let P=v[i](e,f,n,x,_,C,a,c,d,u);if(!l(m)){let F=p.positionCartographic.height,A=i===oe.SCENE3D?s.cartesianToCartographic(n).height:n.z;F>A&&F>11500?m=Fr.CUBIC_OUT:m=Fr.QUINTIC_IN_OUT}return{duration:f,easingFunction:m,startObject:{time:0},stopObject:{time:f},update:P,complete:L,cancel:Z}};var dF=hye;var J2i=T(S(),1),jct={ROTATE:0,INFINITE_SCROLL:1},Ql=Object.freeze(jct);function en(e){this._scene=e,this._transform=M.clone(M.IDENTITY),this._invTransform=M.clone(M.IDENTITY),this._actualTransform=M.clone(M.IDENTITY),this._actualInvTransform=M.clone(M.IDENTITY),this._transformChanged=!1,this.position=new h,this._position=new h,this._positionWC=new h,this._positionCartographic=new he,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new h,this._direction=new h,this._directionWC=new h,this.up=new h,this._up=new h,this._upWC=new h,this.right=new h,this._right=new h,this._rightWC=new h,this.frustum=new Ti,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=W.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new ge,this._moveEnd=new ge,this._changed=new ge,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this._changedHeading=void 0,this._changedRoll=void 0,this.percentageChanged=.5,this._viewMatrix=new M,this._invViewMatrix=new M,Cye(this),this._mode=oe.SCENE3D,this._modeChanged=!0;let t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new he(Math.PI,W.PI_OVER_TWO)),this._max2Dfrustum=void 0,wye(this,en.DEFAULT_VIEW_RECTANGLE,this.position,!0);let n=h.magnitude(this.position);n+=n*en.DEFAULT_VIEW_FACTOR,h.normalize(this.position,this.position),h.multiplyByScalar(this.position,n,this.position)}en.TRANSFORM_2D=new M(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);en.TRANSFORM_2D_INVERSE=M.inverseTransformation(en.TRANSFORM_2D,new M);en.DEFAULT_VIEW_RECTANGLE=ce.fromDegrees(-95,-20,-70,90);en.DEFAULT_VIEW_FACTOR=.5;en.DEFAULT_OFFSET=new Yu(0,-W.PI_OVER_FOUR,0);function Cye(e){M.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),M.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),M.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function qct(e){if(!l(e._oldPositionWC))e._oldPositionWC=h.clone(e.positionWC,e._oldPositionWC);else{e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;let t=h.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=h.magnitude(t),e._oldPositionWC=h.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=bi()):e.timeSinceMoved=Math.max(bi()-e._lastMovedTimestamp,0)/1e3}}en.prototype.canPreloadFlight=function(){return l(this._currentFlight)&&this._mode!==oe.SCENE2D};en.prototype._updateCameraChanged=function(){let e=this;if(qct(e),e._changed.numberOfListeners===0)return;let t=e.percentageChanged,n=e.heading;l(e._changedHeading)||(e._changedHeading=n);let i=Math.abs(e._changedHeading-n)%W.TWO_PI;i=i>W.PI?W.TWO_PI-i:i;let o=i/Math.PI;o>t&&(e._changedHeading=n);let r=e.roll;l(e._changedRoll)||(e._changedRoll=r);let s=Math.abs(e._changedRoll-r)%W.TWO_PI;s=s>W.PI?W.TWO_PI-s:s;let a=s/Math.PI;if(a>t&&(e._changedRoll=r),(a>t||o>t)&&e._changed.raiseEvent(Math.max(a,o)),e._mode===oe.SCENE2D){if(!l(e._changedFrustum)){e._changedPosition=h.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone();return}let p=e.position,g=e._changedPosition,f=e.frustum,x=e._changedFrustum,_=p.x+f.left,C=p.x+f.right,V=g.x+x.left,L=g.x+x.right,Z=p.y+f.bottom,G=p.y+f.top,X=g.y+x.bottom,v=g.y+x.top,P=Math.max(_,V),F=Math.min(C,L),A=Math.max(Z,X),b=Math.min(G,v),R;if(P>=F||A>=G)R=1;else{let E=x;_<V&&C>L&&Z<X&&G>v&&(E=f),R=1-(F-P)*(b-A)/((E.right-E.left)*(E.top-E.bottom))}R>t&&(e._changed.raiseEvent(R),e._changedPosition=h.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum));return}if(!l(e._changedDirection)){e._changedPosition=h.clone(e.positionWC,e._changedPosition),e._changedDirection=h.clone(e.directionWC,e._changedDirection);return}let c=W.acosClamped(h.dot(e.directionWC,e._changedDirection)),d;l(e.frustum.fovy)?d=c/(e.frustum.fovy*.5):d=c;let m=h.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(d>t||m>t)&&(e._changed.raiseEvent(Math.max(d,m)),e._changedPosition=h.clone(e.positionWC,e._changedPosition),e._changedDirection=h.clone(e.directionWC,e._changedDirection))};function $ct(e){Gt.basisTo2D(e._projection,e._transform,e._actualTransform)}var elt=new he,tlt=new h,UD=new h,nlt=new se,ilt=new se,olt=new se,rlt=new se,slt=new se;function alt(e){let t=e._projection,n=t.ellipsoid,i=M.getColumn(e._transform,3,nlt),o=n.cartesianToCartographic(i,elt),r=t.project(o,tlt),s=ilt;s.x=r.z,s.y=r.x,s.z=r.y,s.w=1;let a=se.clone(se.UNIT_X,slt),c=se.add(M.getColumn(e._transform,0,UD),i,UD);n.cartesianToCartographic(c,o),t.project(o,r);let d=olt;d.x=r.z,d.y=r.x,d.z=r.y,d.w=0,h.subtract(d,s,d),d.x=0;let u=rlt;if(h.magnitudeSquared(d)>W.EPSILON10)h.cross(a,d,u);else{let m=se.add(M.getColumn(e._transform,1,UD),i,UD);n.cartesianToCartographic(m,o),t.project(o,r),u.x=r.z,u.y=r.x,u.z=r.y,u.w=0,h.subtract(u,s,u),u.x=0,h.magnitudeSquared(u)<W.EPSILON10&&(se.clone(se.UNIT_Y,d),se.clone(se.UNIT_Z,u))}h.cross(u,a,d),h.normalize(d,d),h.cross(a,d,u),h.normalize(u,u),M.setColumn(e._actualTransform,0,d,e._actualTransform),M.setColumn(e._actualTransform,1,u,e._actualTransform),M.setColumn(e._actualTransform,2,a,e._actualTransform),M.setColumn(e._actualTransform,3,s,e._actualTransform)}var Bj=new h;function Sc(e){let t=e._mode,n=!1,i=0;t===oe.SCENE2D&&(i=e.frustum.right-e.frustum.left,n=i!==e._positionCartographic.height);let o=e._position,r=!h.equals(o,e.position)||n;r&&(o=h.clone(e.position,e._position));let s=e._direction,a=!h.equals(s,e.direction);a&&(h.normalize(e.direction,e.direction),s=h.clone(e.direction,e._direction));let c=e._up,d=!h.equals(c,e.up);d&&(h.normalize(e.up,e.up),c=h.clone(e.up,e._up));let u=e._right,m=!h.equals(u,e.right);m&&(h.normalize(e.right,e.right),u=h.clone(e.right,e._right));let p=e._transformChanged||e._modeChanged;e._transformChanged=!1,p&&(M.inverseTransformation(e._transform,e._invTransform),e._mode===oe.COLUMBUS_VIEW||e._mode===oe.SCENE2D?M.equals(M.IDENTITY,e._transform)?M.clone(en.TRANSFORM_2D,e._actualTransform):e._mode===oe.COLUMBUS_VIEW?$ct(e):alt(e):M.clone(e._transform,e._actualTransform),M.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);let g=e._actualTransform;if(r||p)if(e._positionWC=M.multiplyByPoint(g,o,e._positionWC),t===oe.SCENE3D||t===oe.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{let f=Bj;f.x=e._positionWC.y,f.y=e._positionWC.z,f.z=e._positionWC.x,t===oe.SCENE2D&&(f.z=i),e._projection.unproject(f,e._positionCartographic)}if(a||d||m){let f=h.dot(s,h.cross(c,u,Bj));if(Math.abs(1-f)>W.EPSILON2){let x=1/h.magnitudeSquared(c),_=h.dot(c,s)*x,C=h.multiplyByScalar(s,_,Bj);c=h.normalize(h.subtract(c,C,e._up),e._up),h.clone(c,e.up),u=h.cross(s,c,e._right),h.clone(u,e.right)}}(a||p)&&(e._directionWC=M.multiplyByPointAsVector(g,s,e._directionWC),h.normalize(e._directionWC,e._directionWC)),(d||p)&&(e._upWC=M.multiplyByPointAsVector(g,c,e._upWC),h.normalize(e._upWC,e._upWC)),(m||p)&&(e._rightWC=M.multiplyByPointAsVector(g,u,e._rightWC),h.normalize(e._rightWC,e._rightWC)),(r||a||d||m||p)&&Cye(e)}function Vye(e,t){let n;return W.equalsEpsilon(Math.abs(e.z),1,W.EPSILON3)?n=Math.atan2(t.y,t.x)-W.PI_OVER_TWO:n=Math.atan2(e.y,e.x)-W.PI_OVER_TWO,W.TWO_PI-W.zeroToTwoPi(n)}function Lye(e){return W.PI_OVER_TWO-W.acosClamped(e.z)}function Rye(e,t,n){let i=0;return W.equalsEpsilon(Math.abs(e.z),1,W.EPSILON3)||(i=Math.atan2(-n.z,t.z),i=W.zeroToTwoPi(i+W.TWO_PI)),i}var YD=new M,OD=new M;Object.defineProperties(en.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return Sc(this),this._invTransform}},viewMatrix:{get:function(){return Sc(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return Sc(this),this._invViewMatrix}},positionCartographic:{get:function(){return Sc(this),this._positionCartographic}},positionWC:{get:function(){return Sc(this),this._positionWC}},directionWC:{get:function(){return Sc(this),this._directionWC}},upWC:{get:function(){return Sc(this),this._upWC}},rightWC:{get:function(){return Sc(this),this._rightWC}},heading:{get:function(){if(this._mode!==oe.MORPHING){let e=this._projection.ellipsoid,t=M.clone(this._transform,YD),n=Gt.eastNorthUpToFixedFrame(this.positionWC,e,OD);this._setTransform(n);let i=Vye(this.direction,this.up);return this._setTransform(t),i}}},pitch:{get:function(){if(this._mode!==oe.MORPHING){let e=this._projection.ellipsoid,t=M.clone(this._transform,YD),n=Gt.eastNorthUpToFixedFrame(this.positionWC,e,OD);this._setTransform(n);let i=Lye(this.direction);return this._setTransform(t),i}}},roll:{get:function(){if(this._mode!==oe.MORPHING){let e=this._projection.ellipsoid,t=M.clone(this._transform,YD),n=Gt.eastNorthUpToFixedFrame(this.positionWC,e,OD);this._setTransform(n);let i=Rye(this.direction,this.up,this.right);return this._setTransform(t),i}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}}});en.prototype.update=function(e){let t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==oe.MORPHING,t=this._mode===oe.SCENE2D),t){let n=this._max2Dfrustum=this.frustum.clone(),i=2,o=n.top/n.right;n.right=this._maxCoord.x*i,n.left=-n.right,n.top=o*n.right,n.bottom=-n.top}this._mode===oe.SCENE2D&&Xye(this,this.position)};var clt=new h,llt=new h,dlt=new h;en.prototype._setTransform=function(e){let t=h.clone(this.positionWC,clt),n=h.clone(this.upWC,llt),i=h.clone(this.directionWC,dlt);M.clone(e,this._transform),this._transformChanged=!0,Sc(this);let o=this._actualInvTransform;M.multiplyByPoint(o,t,this.position),M.multiplyByPointAsVector(o,i,this.direction),M.multiplyByPointAsVector(o,n,this.up),h.cross(this.direction,this.up,this.right),Sc(this)};var ult=new D,mlt=new pn,hlt=new h,flt=new h;function Zye(e){if(!M.equals(M.IDENTITY,e.transform))return h.magnitude(e.position);let t=e._scene,n=t.globe,i=ult;i.x=t.drawingBufferWidth/2,i.y=t.drawingBufferHeight/2;let o;if(l(n)){let a=e.getPickRay(i,mlt);o=n.pickWorldCoordinates(a,t,!0,hlt)}let r;t.pickPositionSupported&&(r=t.pickPositionWorldCoordinates(i,flt));let s;if(l(o)||l(r)){let a=l(r)?h.distance(r,e.positionWC):Number.POSITIVE_INFINITY,c=l(o)?h.distance(o,e.positionWC):Number.POSITIVE_INFINITY;s=Math.min(a,c)}else s=Math.max(e.positionCartographic.height,0);return s}en.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof sn&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=Zye(this)))};var HD=new h,Kj=new M,plt=new M,Jj=new we,Qj=new $,Gye=new he;function blt(e,t,n){let i=M.clone(e.transform,Kj),o=Gt.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,plt);e._setTransform(o),h.clone(h.ZERO,e.position),n.heading=n.heading-W.PI_OVER_TWO;let r=we.fromHeadingPitchRoll(n,Jj),s=$.fromQuaternion(r,Qj);$.getColumn(s,0,e.direction),$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right),e._setTransform(i),e._adjustOrthographicFrustum(!0)}function glt(e,t,n,i){let o=M.clone(e.transform,Kj);if(e._setTransform(M.IDENTITY),!h.equals(t,e.positionWC)){if(i){let a=e._projection,c=a.ellipsoid.cartesianToCartographic(t,Gye);t=a.project(c,HD)}h.clone(t,e.position)}n.heading=n.heading-W.PI_OVER_TWO;let r=we.fromHeadingPitchRoll(n,Jj),s=$.fromQuaternion(r,Qj);$.getColumn(s,0,e.direction),$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right),e._setTransform(o),e._adjustOrthographicFrustum(!0)}function ylt(e,t,n,i){let o=M.clone(e.transform,Kj);if(e._setTransform(M.IDENTITY),!h.equals(t,e.positionWC)){if(i){let c=e._projection,d=c.ellipsoid.cartesianToCartographic(t,Gye);t=c.project(d,HD)}D.clone(t,e.position);let r=-t.z*.5,s=-r,a=e.frustum;if(s>r){let c=a.top/a.right;a.right=s,a.left=r,a.top=a.right*c,a.bottom=-a.top}}if(e._scene.mapMode2D===Ql.ROTATE){n.heading=n.heading-W.PI_OVER_TWO,n.pitch=-W.PI_OVER_TWO,n.roll=0;let r=we.fromHeadingPitchRoll(n,Jj),s=$.fromQuaternion(r,Qj);$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right)}e._setTransform(o)}var xlt=new h,_lt=new h,Tlt=new h;function Eye(e,t,n,i){let o=h.clone(n.direction,xlt),r=h.clone(n.up,_lt);if(e._scene.mode===oe.SCENE3D){let a=e._projection.ellipsoid,c=Gt.eastNorthUpToFixedFrame(t,a,YD),d=M.inverseTransformation(c,OD);M.multiplyByPointAsVector(d,o,o),M.multiplyByPointAsVector(d,r,r)}let s=h.cross(o,r,Tlt);return i.heading=Vye(o,r),i.pitch=Lye(o),i.roll=Rye(o,r,s),i}var zj={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},qV=new Ka;en.prototype.setView=function(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.orientation,y.EMPTY_OBJECT),n=this._mode;if(n===oe.MORPHING)return;l(e.endTransform)&&this._setTransform(e.endTransform);let i=y(e.convert,!0),o=y(e.destination,h.clone(this.positionWC,HD));l(o)&&l(o.west)&&(o=this.getRectangleCameraCoordinates(o,HD),i=!1),l(t.direction)&&(t=Eye(this,o,t,zj.orientation)),qV.heading=y(t.heading,0),qV.pitch=y(t.pitch,-W.PI_OVER_TWO),qV.roll=y(t.roll,0),n===oe.SCENE3D?blt(this,o,qV):n===oe.SCENE2D?ylt(this,o,qV,i):glt(this,o,qV,i)};var Slt=new h;en.prototype.flyHome=function(e){let t=this._mode;if(t===oe.MORPHING&&this._scene.completeMorph(),t===oe.SCENE2D)this.flyTo({destination:en.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:M.IDENTITY});else if(t===oe.SCENE3D){let n=this.getRectangleCameraCoordinates(en.DEFAULT_VIEW_RECTANGLE),i=h.magnitude(n);i+=i*en.DEFAULT_VIEW_FACTOR,h.normalize(n,n),h.multiplyByScalar(n,i,n),this.flyTo({destination:n,duration:e,endTransform:M.IDENTITY})}else if(t===oe.COLUMBUS_VIEW){let n=this._projection.ellipsoid.maximumRadius,i=new h(0,-1,1);i=h.multiplyByScalar(h.normalize(i,i),5*n,i),this.flyTo({destination:i,duration:e,orientation:{heading:0,pitch:-Math.acos(h.normalize(i,Slt).z),roll:0},endTransform:M.IDENTITY,convert:!1})}};en.prototype.worldToCameraCoordinates=function(e,t){return l(t)||(t=new se),Sc(this),M.multiplyByVector(this._actualInvTransform,e,t)};en.prototype.worldToCameraCoordinatesPoint=function(e,t){return l(t)||(t=new h),Sc(this),M.multiplyByPoint(this._actualInvTransform,e,t)};en.prototype.worldToCameraCoordinatesVector=function(e,t){return l(t)||(t=new h),Sc(this),M.multiplyByPointAsVector(this._actualInvTransform,e,t)};en.prototype.cameraToWorldCoordinates=function(e,t){return l(t)||(t=new se),Sc(this),M.multiplyByVector(this._actualTransform,e,t)};en.prototype.cameraToWorldCoordinatesPoint=function(e,t){return l(t)||(t=new h),Sc(this),M.multiplyByPoint(this._actualTransform,e,t)};en.prototype.cameraToWorldCoordinatesVector=function(e,t){return l(t)||(t=new h),Sc(this),M.multiplyByPointAsVector(this._actualTransform,e,t)};function Xye(e,t){let n=e._scene.mapMode2D===Ql.ROTATE,i=e._maxCoord.x,o=e._maxCoord.y,r,s;n?(s=i,r=-s):(s=t.x-i*2,r=t.x+i*2),t.x>i&&(t.x=s),t.x<-i&&(t.x=r),t.y>o&&(t.y=o),t.y<-o&&(t.y=-o)}var bye=new h;en.prototype.move=function(e,t){let n=this.position;h.multiplyByScalar(e,t,bye),h.add(n,bye,n),this._mode===oe.SCENE2D&&Xye(this,n),this._adjustOrthographicFrustum(!0)};en.prototype.moveForward=function(e){e=y(e,this.defaultMoveAmount),this._mode===oe.SCENE2D?zD(this,e):this.move(this.direction,e)};en.prototype.moveBackward=function(e){e=y(e,this.defaultMoveAmount),this._mode===oe.SCENE2D?zD(this,-e):this.move(this.direction,-e)};en.prototype.moveUp=function(e){e=y(e,this.defaultMoveAmount),this.move(this.up,e)};en.prototype.moveDown=function(e){e=y(e,this.defaultMoveAmount),this.move(this.up,-e)};en.prototype.moveRight=function(e){e=y(e,this.defaultMoveAmount),this.move(this.right,e)};en.prototype.moveLeft=function(e){e=y(e,this.defaultMoveAmount),this.move(this.right,-e)};en.prototype.lookLeft=function(e){e=y(e,this.defaultLookAmount),this._mode!==oe.SCENE2D&&this.look(this.up,-e)};en.prototype.lookRight=function(e){e=y(e,this.defaultLookAmount),this._mode!==oe.SCENE2D&&this.look(this.up,e)};en.prototype.lookUp=function(e){e=y(e,this.defaultLookAmount),this._mode!==oe.SCENE2D&&this.look(this.right,-e)};en.prototype.lookDown=function(e){e=y(e,this.defaultLookAmount),this._mode!==oe.SCENE2D&&this.look(this.right,e)};var Clt=new we,Vlt=new $;en.prototype.look=function(e,t){let n=y(t,this.defaultLookAmount),i=we.fromAxisAngle(e,-n,Clt),o=$.fromQuaternion(i,Vlt),r=this.direction,s=this.up,a=this.right;$.multiplyByVector(o,r,r),$.multiplyByVector(o,s,s),$.multiplyByVector(o,a,a)};en.prototype.twistLeft=function(e){e=y(e,this.defaultLookAmount),this.look(this.direction,e)};en.prototype.twistRight=function(e){e=y(e,this.defaultLookAmount),this.look(this.direction,-e)};var Llt=new we,Rlt=new $;en.prototype.rotate=function(e,t){let n=y(t,this.defaultRotateAmount),i=we.fromAxisAngle(e,-n,Llt),o=$.fromQuaternion(i,Rlt);$.multiplyByVector(o,this.position,this.position),$.multiplyByVector(o,this.direction,this.direction),$.multiplyByVector(o,this.up,this.up),h.cross(this.direction,this.up,this.right),h.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)};en.prototype.rotateDown=function(e){e=y(e,this.defaultRotateAmount),Iye(this,e)};en.prototype.rotateUp=function(e){e=y(e,this.defaultRotateAmount),Iye(this,-e)};var Zlt=new h,Glt=new h,Elt=new h,gye=new h;function Iye(e,t){let n=e.position;if(l(e.constrainedAxis)&&!h.equalsEpsilon(e.position,h.ZERO,W.EPSILON2)){let i=h.normalize(n,Zlt),o=h.equalsEpsilon(i,e.constrainedAxis,W.EPSILON2),r=h.equalsEpsilon(i,h.negate(e.constrainedAxis,gye),W.EPSILON2);if(!o&&!r){let s=h.normalize(e.constrainedAxis,Glt),a=h.dot(i,s),c=W.acosClamped(a);t>0&&t>c&&(t=c-W.EPSILON4),a=h.dot(i,h.negate(s,gye)),c=W.acosClamped(a),t<0&&-t>c&&(t=-c+W.EPSILON4);let d=h.cross(s,i,Elt);e.rotate(d,t)}else(o&&t<0||r&&t>0)&&e.rotate(e.right,t)}else e.rotate(e.right,t)}en.prototype.rotateRight=function(e){e=y(e,this.defaultRotateAmount),Wye(this,-e)};en.prototype.rotateLeft=function(e){e=y(e,this.defaultRotateAmount),Wye(this,e)};function Wye(e,t){l(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function zD(e,t){let n=e.frustum,i;if(t=t*.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){let o=n.top-t,r=n.bottom+t,s=e._maxCoord.y;e._scene.mapMode2D===Ql.ROTATE&&(s*=e.maximumZoomFactor),r>s&&(r=s,o=-s),o<=r&&(o=1,r=-1),i=n.right/n.top,n.top=o,n.bottom=r,n.right=n.top*i,n.left=-n.right}else{let o=n.right-t,r=n.left+t,s=e._maxCoord.x;e._scene.mapMode2D===Ql.ROTATE&&(s*=e.maximumZoomFactor),o>s&&(o=s,r=-s),o<=r&&(o=1,r=-1),i=n.top/n.right,n.right=o,n.left=r,n.top=n.right*i,n.bottom=-n.top}}function Pye(e,t){e.move(e.direction,t)}en.prototype.zoomIn=function(e){e=y(e,this.defaultZoomAmount),this._mode===oe.SCENE2D?zD(this,e):Pye(this,e)};en.prototype.zoomOut=function(e){e=y(e,this.defaultZoomAmount),this._mode===oe.SCENE2D?zD(this,-e):Pye(this,-e)};en.prototype.getMagnitude=function(){if(this._mode===oe.SCENE3D)return h.magnitude(this.position);if(this._mode===oe.COLUMBUS_VIEW)return Math.abs(this.position.z);if(this._mode===oe.SCENE2D)return Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom)};var Xlt=new M;en.prototype.lookAt=function(e,t){let n=Gt.eastNorthUpToFixedFrame(e,ie.WGS84,Xlt);this.lookAtTransform(n,t)};var Ilt=new h,Wlt=new we,Plt=new we,vlt=new $;function vye(e,t,n){t=W.clamp(t,-W.PI_OVER_TWO,W.PI_OVER_TWO),e=W.zeroToTwoPi(e)-W.PI_OVER_TWO;let i=we.fromAxisAngle(h.UNIT_Y,-t,Wlt),o=we.fromAxisAngle(h.UNIT_Z,-e,Plt),r=we.multiply(o,i,o),s=$.fromQuaternion(r,vlt),a=h.clone(h.UNIT_X,Ilt);return $.multiplyByVector(s,a,a),h.negate(a,a),h.multiplyByScalar(a,n,a),a}en.prototype.lookAtTransform=function(e,t){if(this._setTransform(e),!l(t))return;let n;if(l(t.heading)?n=vye(t.heading,t.pitch,t.range):n=t,this._mode===oe.SCENE2D){D.clone(D.ZERO,this.position),h.negate(n,this.up),this.up.z=0,h.magnitudeSquared(this.up)<W.EPSILON10&&h.clone(h.UNIT_Y,this.up),h.normalize(this.up,this.up),this._setTransform(M.IDENTITY),h.negate(h.UNIT_Z,this.direction),h.cross(this.direction,this.up,this.right),h.normalize(this.right,this.right);let i=this.frustum,o=i.top/i.right;i.right=h.magnitude(n)*.5,i.left=-i.right,i.top=o*i.right,i.bottom=-i.top,this._setTransform(e);return}h.clone(n,this.position),h.negate(this.position,this.direction),h.normalize(this.direction,this.direction),h.cross(this.direction,h.UNIT_Z,this.right),h.magnitudeSquared(this.right)<W.EPSILON10&&h.clone(h.UNIT_X,this.right),h.normalize(this.right,this.right),h.cross(this.right,this.direction,this.up),h.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)};var uF=new he,wlt=new he,Flt=new h,Alt=new h,Mlt=new h,Nlt=new h,klt=new h,Ult=new h,Dlt=new h,Yj=new h,Blt={direction:new h,right:new h,up:new h},yye;function Tc(e,t,n,i){return Math.abs(h.dot(t,n))/i-h.dot(e,n)}function wye(e,t,n,i){let o=e._projection.ellipsoid,r=i?e:Blt,s=t.north,a=t.south,c=t.east,d=t.west;d>c&&(c+=W.TWO_PI);let u=(d+c)*.5,m;if(a<-W.PI_OVER_TWO+W.RADIANS_PER_DEGREE&&s>W.PI_OVER_TWO-W.RADIANS_PER_DEGREE)m=0;else{let F=uF;F.longitude=u,F.latitude=s,F.height=0;let A=wlt;A.longitude=u,A.latitude=a,A.height=0;let b=yye;(!l(b)||b.ellipsoid!==o)&&(yye=b=new yp(void 0,void 0,o)),b.setEndPoints(F,A),m=b.interpolateUsingFraction(.5,uF).latitude}let p=uF;p.longitude=u,p.latitude=m,p.height=0;let g=o.cartographicToCartesian(p,Dlt),f=uF;f.longitude=c,f.latitude=s;let x=o.cartographicToCartesian(f,Flt);f.longitude=d;let _=o.cartographicToCartesian(f,Mlt);f.longitude=u;let C=o.cartographicToCartesian(f,klt);f.latitude=a;let V=o.cartographicToCartesian(f,Ult);f.longitude=c;let L=o.cartographicToCartesian(f,Nlt);f.longitude=d;let Z=o.cartographicToCartesian(f,Alt);h.subtract(_,g,_),h.subtract(L,g,L),h.subtract(x,g,x),h.subtract(Z,g,Z),h.subtract(C,g,C),h.subtract(V,g,V);let G=o.geodeticSurfaceNormal(g,r.direction);h.negate(G,G);let X=h.cross(G,h.UNIT_Z,r.right);h.normalize(X,X);let v=h.cross(X,G,r.up),P;if(e.frustum instanceof sn){let F=Math.max(h.distance(x,_),h.distance(L,Z)),A=Math.max(h.distance(x,L),h.distance(_,Z)),b,R,E=e.frustum._offCenterFrustum,I=E.right/E.top,w=A*I;F>w?(b=F,R=b/I):(R=A,b=w),P=Math.max(b,R)}else{let F=Math.tan(e.frustum.fovy*.5),A=e.frustum.aspectRatio*F;if(P=Math.max(Tc(G,v,_,F),Tc(G,v,L,F),Tc(G,v,x,F),Tc(G,v,Z,F),Tc(G,v,C,F),Tc(G,v,V,F),Tc(G,X,_,A),Tc(G,X,L,A),Tc(G,X,x,A),Tc(G,X,Z,A),Tc(G,X,C,A),Tc(G,X,V,A)),a<0&&s>0){let b=uF;b.longitude=d,b.latitude=0,b.height=0;let R=o.cartographicToCartesian(b,Yj);h.subtract(R,g,R),P=Math.max(P,Tc(G,v,R,F),Tc(G,X,R,A)),b.longitude=c,R=o.cartographicToCartesian(b,Yj),h.subtract(R,g,R),P=Math.max(P,Tc(G,v,R,F),Tc(G,X,R,A))}}return h.add(g,h.multiplyByScalar(G,-P,Yj),n)}var Ylt=new he,Olt=new h,Hlt=new h;function zlt(e,t,n){let i=e._projection;t.west>t.east&&(t=ce.MAX_VALUE);let o=e._actualTransform,r=e._actualInvTransform,s=Ylt;s.longitude=t.east,s.latitude=t.north;let a=i.project(s,Olt);M.multiplyByPoint(o,a,a),M.multiplyByPoint(r,a,a),s.longitude=t.west,s.latitude=t.south;let c=i.project(s,Hlt);if(M.multiplyByPoint(o,c,c),M.multiplyByPoint(r,c,c),n.x=(a.x-c.x)*.5+c.x,n.y=(a.y-c.y)*.5+c.y,l(e.frustum.fovy)){let d=Math.tan(e.frustum.fovy*.5),u=e.frustum.aspectRatio*d;n.z=Math.max((a.x-c.x)/u,(a.y-c.y)/d)*.5}else{let d=a.x-c.x,u=a.y-c.y;n.z=Math.max(d,u)}return n}var Klt=new he,Jlt=new h,Qlt=new h;function jlt(e,t,n){let i=e._projection,o=t.east;t.west>t.east&&(e._scene.mapMode2D===Ql.INFINITE_SCROLL?o+=W.TWO_PI:(t=ce.MAX_VALUE,o=t.east));let r=Klt;r.longitude=o,r.latitude=t.north;let s=i.project(r,Jlt);r.longitude=t.west,r.latitude=t.south;let a=i.project(r,Qlt),c=Math.abs(s.x-a.x)*.5,d=Math.abs(s.y-a.y)*.5,u,m,p=e.frustum.right/e.frustum.top,g=d*p;return c>g?(u=c,m=u/p):(m=d,u=g),d=Math.max(2*u,2*m),n.x=(s.x-a.x)*.5+a.x,n.y=(s.y-a.y)*.5+a.y,r=i.unproject(n,r),r.height=d,n=i.project(r,n),n}en.prototype.getRectangleCameraCoordinates=function(e,t){let n=this._mode;if(l(t)||(t=new h),n===oe.SCENE3D)return wye(this,e,t);if(n===oe.COLUMBUS_VIEW)return zlt(this,e,t);if(n===oe.SCENE2D)return jlt(this,e,t)};var qlt=new pn;function $lt(e,t,n,i){n=y(n,ie.WGS84);let o=e.getPickRay(t,qlt),r=jn.rayEllipsoid(o,n);if(!r)return;let s=r.start>0?r.start:r.stop;return pn.getPoint(o,s,i)}var edt=new pn;function tdt(e,t,n,i){let r=e.getPickRay(t,edt).origin;r=h.fromElements(r.y,r.z,0,r);let s=n.unproject(r);if(!(s.latitude<-W.PI_OVER_TWO||s.latitude>W.PI_OVER_TWO))return n.ellipsoid.cartographicToCartesian(s,i)}var ndt=new pn;function idt(e,t,n,i){let o=e.getPickRay(t,ndt),r=-o.origin.x/o.direction.x;pn.getPoint(o,r,i);let s=n.unproject(new h(i.y,i.z,0));if(!(s.latitude<-W.PI_OVER_TWO||s.latitude>W.PI_OVER_TWO||s.longitude<-Math.PI||s.longitude>Math.PI))return n.ellipsoid.cartographicToCartesian(s,i)}en.prototype.pickEllipsoid=function(e,t,n){let i=this._scene.canvas;if(!(i.clientWidth===0||i.clientHeight===0)){if(l(n)||(n=new h),t=y(t,ie.WGS84),this._mode===oe.SCENE3D)n=$lt(this,e,t,n);else if(this._mode===oe.SCENE2D)n=tdt(this,e,this._projection,n);else if(this._mode===oe.COLUMBUS_VIEW)n=idt(this,e,this._projection,n);else return;return n}};var odt=new h,rdt=new h,sdt=new h;function adt(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=Math.tan(e.frustum.fovy*.5),a=e.frustum.aspectRatio*s,c=e.frustum.near,d=2/o*t.x-1,u=2/r*(r-t.y)-1,m=e.positionWC;h.clone(m,n.origin);let p=h.multiplyByScalar(e.directionWC,c,odt);h.add(m,p,p);let g=h.multiplyByScalar(e.rightWC,d*c*a,rdt),f=h.multiplyByScalar(e.upWC,u*c*s,sdt),x=h.add(p,g,n.direction);return h.add(x,f,x),h.subtract(x,m,x),h.normalize(x,x),n}var DD=new h;function cdt(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=e.frustum,a=s.offCenterFrustum;l(a)&&(s=a);let c=2/o*t.x-1;c*=(s.right-s.left)*.5;let d=2/r*(r-t.y)-1;d*=(s.top-s.bottom)*.5;let u=n.origin;return h.clone(e.position,u),h.multiplyByScalar(e.right,c,DD),h.add(DD,u,u),h.multiplyByScalar(e.up,d,DD),h.add(DD,u,u),h.clone(e.directionWC,n.direction),(e._mode===oe.COLUMBUS_VIEW||e._mode===oe.SCENE2D)&&h.fromElements(n.origin.z,n.origin.x,n.origin.y,n.origin),n}en.prototype.getPickRay=function(e,t){l(t)||(t=new pn);let n=this._scene.canvas;if(n.clientWidth<=0||n.clientHeight<=0)return;let i=this.frustum;return l(i.aspectRatio)&&l(i.fov)&&l(i.near)?adt(this,e,t):cdt(this,e,t)};var ldt=new h,ddt=new h;en.prototype.distanceToBoundingSphere=function(e){let t=h.subtract(this.positionWC,e.center,ldt),n=h.multiplyByScalar(this.directionWC,h.dot(t,this.directionWC),ddt);return Math.max(0,h.magnitude(n)-e.radius)};var udt=new D;en.prototype.getPixelSize=function(e,t,n){let i=this.distanceToBoundingSphere(e),o=this.frustum.getPixelDimensions(t,n,i,this._scene.pixelRatio,udt);return Math.max(o.x,o.y)};function mdt(e,t,n,i,o,r){let s=h.clone(t);n.y>i?s.y-=n.y-i:n.y<-i&&(s.y+=-i-n.y),n.z>o?s.z-=n.z-o:n.z<-o&&(s.z+=-o-n.z);function a(c){let d=h.lerp(t,s,c.time,new h);e.worldToCameraCoordinatesPoint(d,e.position)}return{easingFunction:Fr.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:r,update:a}}var hdt=new h,xye=new h,fdt=new h,pdt=new h;function bdt(e,t){let n=e.position,i=e.direction,o=e.worldToCameraCoordinatesVector(h.UNIT_X,hdt),r=-h.dot(o,n)/h.dot(o,i),s=h.add(n,h.multiplyByScalar(i,r,xye),xye);e.cameraToWorldCoordinatesPoint(s,s),n=e.cameraToWorldCoordinatesPoint(e.position,fdt);let a=Math.tan(e.frustum.fovy*.5),c=e.frustum.aspectRatio*a,d=h.magnitude(h.subtract(n,s,pdt)),u=c*d,m=a*d,p=e._maxCoord.x,g=e._maxCoord.y,f=Math.max(u-p,p),x=Math.max(m-g,g);if(n.z<-f||n.z>f||n.y<-x||n.y>x){let _=s.y<-f||s.y>f,C=s.z<-x||s.z>x;if(_||C)return mdt(e,n,s,f,x,t)}}en.prototype.createCorrectPositionTween=function(e){if(this._mode===oe.COLUMBUS_VIEW)return bdt(this,e)};var gdt=new h,Hs={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};en.prototype.cancelFlight=function(){l(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)};en.prototype.completeFlight=function(){if(l(this._currentFlight)){this._currentFlight.cancelTween();let e={destination:void 0,orientation:{heading:void 0,pitch:void 0,roll:void 0}};e.destination=Hs.destination,e.orientation.heading=Hs.heading,e.orientation.pitch=Hs.pitch,e.orientation.roll=Hs.roll,this.setView(e),l(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0}};en.prototype.flyTo=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.destination;if(this._mode===oe.MORPHING)return;this.cancelFlight();let i=t instanceof ce;i&&(t=this.getRectangleCameraCoordinates(t,gdt));let o=y(e.orientation,y.EMPTY_OBJECT);if(l(o.direction)&&(o=Eye(this,t,o,zj.orientation)),l(e.duration)&&e.duration<=0){let u=zj;u.destination=e.destination,u.orientation.heading=o.heading,u.orientation.pitch=o.pitch,u.orientation.roll=o.roll,u.convert=e.convert,u.endTransform=e.endTransform,this.setView(u),typeof e.complete=="function"&&e.complete();return}let r=this,s;Hs.destination=t,Hs.heading=o.heading,Hs.pitch=o.pitch,Hs.roll=o.roll,Hs.duration=e.duration,Hs.complete=function(){s===r._currentFlight&&(r._currentFlight=void 0),l(e.complete)&&e.complete()},Hs.cancel=e.cancel,Hs.endTransform=e.endTransform,Hs.convert=i?!1:e.convert,Hs.maximumHeight=e.maximumHeight,Hs.pitchAdjustHeight=e.pitchAdjustHeight,Hs.flyOverLongitude=e.flyOverLongitude,Hs.flyOverLongitudeWeight=e.flyOverLongitudeWeight,Hs.easingFunction=e.easingFunction;let a=this._scene,c=dF.createTween(a,Hs);if(c.duration===0){typeof c.complete=="function"&&c.complete();return}s=a.tweens.add(c),this._currentFlight=s;let d=this._scene.preloadFlightCamera;this._mode!==oe.SCENE2D&&(l(d)||(d=en.clone(this)),d.setView({destination:t,orientation:o}),this._scene.preloadFlightCullingVolume=d.frustum.computeCullingVolume(d.positionWC,d.directionWC,d.upWC))};function ydt(e,t){let n=e.frustum,i=Math.tan(n.fovy*.5),o=n.aspectRatio*i;return Math.max(t/o,t/i)}function xdt(e,t){let n=e.frustum,i=n.offCenterFrustum;l(i)&&(n=i);let o,r,s=n.right/n.top,a=t*s;return t>a?(o=t,r=o/s):(r=t,o=a),Math.max(o,r)*1.5}var _dt=100;function Fye(e,t,n){n=Yu.clone(l(n)?n:en.DEFAULT_OFFSET);let i=e._scene.screenSpaceCameraController.minimumZoomDistance,o=e._scene.screenSpaceCameraController.maximumZoomDistance,r=n.range;if(!l(r)||r===0){let s=t.radius;s===0?n.range=_dt:e.frustum instanceof sn||e._mode===oe.SCENE2D?n.range=xdt(e,s):n.range=ydt(e,s),n.range=W.clamp(n.range,i,o)}return n}en.prototype.viewBoundingSphere=function(e,t){t=Fye(this,e,t),this.lookAt(e.center,t)};var Tdt=new M,Sdt=new h,Cdt=new h,Vdt=new h,Ldt=new h,Rdt=new se,Zdt=new we,Gdt=new $;en.prototype.flyToBoundingSphere=function(e,t){t=y(t,y.EMPTY_OBJECT);let n=this._mode===oe.SCENE2D||this._mode===oe.COLUMBUS_VIEW;this._setTransform(M.IDENTITY);let i=Fye(this,e,t.offset),o;n?o=h.multiplyByScalar(h.UNIT_Z,i.range,Sdt):o=vye(i.heading,i.pitch,i.range);let r=Gt.eastNorthUpToFixedFrame(e.center,ie.WGS84,Tdt);M.multiplyByPoint(r,o,o);let s,a;if(!n){if(s=h.subtract(e.center,o,Cdt),h.normalize(s,s),a=M.multiplyByPointAsVector(r,h.UNIT_Z,Vdt),1-Math.abs(h.dot(s,a))<W.EPSILON6){let d=we.fromAxisAngle(s,i.heading,Zdt),u=$.fromQuaternion(d,Gdt);h.fromCartesian4(M.getColumn(r,1,Rdt),a),$.multiplyByVector(u,a,a)}let c=h.cross(s,a,Ldt);h.cross(c,s,a),h.normalize(a,a)}this.flyTo({destination:o,orientation:{direction:s,up:a},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var _ye=new h,Tye=new h,Oj=new h,Sye=new h,mF=[new h,new h,new h,new h];function Edt(e,t){let n=t.radii,i=e.positionWC,o=h.multiplyComponents(t.oneOverRadii,i,_ye),r=h.magnitude(o),s=h.normalize(o,Tye),a,c;h.equalsEpsilon(s,h.UNIT_Z,W.EPSILON10)?(a=new h(0,1,0),c=new h(0,0,1)):(a=h.normalize(h.cross(h.UNIT_Z,s,Oj),Oj),c=h.normalize(h.cross(s,a,Sye),Sye));let d=Math.sqrt(h.magnitudeSquared(o)-1),u=h.multiplyByScalar(s,1/r,_ye),m=d/r,p=h.multiplyByScalar(a,m,Tye),g=h.multiplyByScalar(c,m,Oj),f=h.add(u,g,mF[0]);h.subtract(f,p,f),h.multiplyComponents(n,f,f);let x=h.subtract(u,g,mF[1]);h.subtract(x,p,x),h.multiplyComponents(n,x,x);let _=h.subtract(u,g,mF[2]);h.add(_,p,_),h.multiplyComponents(n,_,_);let C=h.add(u,g,mF[3]);return h.add(C,p,C),h.multiplyComponents(n,C,C),mF}var Hj=new D,Xdt=new h,Cy=[new he,new he,new he,new he];function BD(e,t,n,i,o,r){Hj.x=e,Hj.y=t;let s=i.pickEllipsoid(Hj,o,Xdt);return l(s)?(Cy[n]=o.cartesianToCartographic(s,Cy[n]),1):(Cy[n]=o.cartesianToCartographic(r[n],Cy[n]),0)}en.prototype.computeViewRectangle=function(e,t){e=y(e,ie.WGS84);let n=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),i=new le(h.ZERO,e.maximumRadius);if(n.computeVisibility(i)===Kt.OUTSIDE)return;let r=this._scene.canvas,s=r.clientWidth,a=r.clientHeight,c=0,d=Edt(this,e);if(c+=BD(0,0,0,this,e,d),c+=BD(0,a,1,this,e,d),c+=BD(s,a,2,this,e,d),c+=BD(s,0,3,this,e,d),c<2)return ce.MAX_VALUE;t=ce.fromCartographicArray(Cy,t);let u=0,m=Cy[3].longitude;for(let p=0;p<4;++p){let g=Cy[p].longitude,f=Math.abs(g-m);f>W.PI?u+=W.TWO_PI-f:u+=f,m=g}return W.equalsEpsilon(Math.abs(u),W.TWO_PI,W.EPSILON9)&&(t.west=-W.PI,t.east=W.PI,Cy[0].latitude>=0?t.north=W.PI_OVER_TWO:t.south=-W.PI_OVER_TWO),t};en.prototype.switchToPerspectiveFrustum=function(){if(this._mode===oe.SCENE2D||this.frustum instanceof Ti)return;let e=this._scene;this.frustum=new Ti,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=W.toRadians(60)};en.prototype.switchToOrthographicFrustum=function(){if(this._mode===oe.SCENE2D||this.frustum instanceof sn)return;let e=Zye(this),t=this._scene;this.frustum=new sn,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e};en.clone=function(e,t){return l(t)||(t=new en(e._scene)),h.clone(e.position,t.position),h.clone(e.direction,t.direction),h.clone(e.up,t.up),h.clone(e.right,t.right),M.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};var ao=en;var ZPi=T(S(),1);function Idt(e){this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}var tm=Idt;var wPi=T(S(),1);var Uye=T(id(),1),Aye=576,Wdt=100,hF="#ffffff",jj="#48b";function Dye(e,t){this.credit=e,this.count=y(t,1)}function Pdt(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i];if(Vt.equals(o,t))return!0}return!1}function vdt(e){let t=e._previousCesiumCredit,n=e._currentCesiumCredit;Vt.equals(n,t)||(l(t)&&e._cesiumCreditContainer.removeChild(t.element),l(n)&&e._cesiumCreditContainer.appendChild(n.element),e._previousCesiumCredit=n)}var Bye="cesium-credit-delimiter";function Mye(e){let t=document.createElement("span");return t.textContent=e,t.className=Bye,t}function Nye(e,t){if(l(t)){let n=document.createElement(t);n._creditId=e._creditId,n.appendChild(e),e=n}return e}function kye(e,t,n,i){let o=e.childNodes,r=-1;t.sort(function(s,a){return a.count-s.count});for(let s=0;s<t.length;++s){let a=t[s].credit;if(l(a)){if(r=s,l(n)&&(r*=2,s>0)){let d=r-1;if(o.length<=d)e.appendChild(Mye(n));else{let u=o[d];u.className!==Bye&&e.replaceChild(Mye(n),u)}}let c=a.element;if(o.length<=r)e.appendChild(Nye(c,i));else{let d=o[r];d._creditId!==a._id&&e.replaceChild(Nye(c,i),d)}}}for(++r;r<o.length;)e.removeChild(o[r])}function wdt(e){let t=e._lightboxCredits,n=e.viewport.clientWidth,i=e.viewport.clientHeight;n!==e._lastViewportWidth&&(n<Aye?(t.className="cesium-credit-lightbox cesium-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="cesium-credit-lightbox cesium-credit-lightbox-expanded",t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`),e._lastViewportWidth=n),n>=Aye&&i!==e._lastViewportHeight&&(t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`,e._lastViewportHeight=i)}function Cc(e,t){let n=`${e} {`;for(let i in t)t.hasOwnProperty(i)&&(n+=`${i}: ${t[i]}; `);return n+=` } -`,n}function Fdt(e){let t="";t+=Cc(".cesium-credit-lightbox-overlay",{display:"none","z-index":"1",position:"absolute",top:"0",left:"0",width:"100%",height:"100%","background-color":"rgba(80, 80, 80, 0.8)"}),t+=Cc(".cesium-credit-lightbox",{"background-color":"#303336",color:hF,position:"relative","min-height":`${Wdt}px`,margin:"auto"}),t+=Cc(".cesium-credit-lightbox > ul > li a, .cesium-credit-lightbox > ul > li a:visited",{color:hF}),t+=Cc(".cesium-credit-lightbox > ul > li a:hover",{color:jj}),t+=Cc(".cesium-credit-lightbox.cesium-credit-lightbox-expanded",{border:"1px solid #444","border-radius":"5px","max-width":"370px"}),t+=Cc(".cesium-credit-lightbox.cesium-credit-lightbox-mobile",{height:"100%",width:"100%"}),t+=Cc(".cesium-credit-lightbox-title",{padding:"20px 20px 0 20px"}),t+=Cc(".cesium-credit-lightbox-close",{"font-size":"18pt",cursor:"pointer",position:"absolute",top:"0",right:"6px",color:hF}),t+=Cc(".cesium-credit-lightbox-close:hover",{color:jj}),t+=Cc(".cesium-credit-lightbox > ul",{margin:"0",padding:"12px 20px 12px 40px","font-size":"13px"}),t+=Cc(".cesium-credit-lightbox > ul > li",{"padding-bottom":"6px"}),t+=Cc(".cesium-credit-lightbox > ul > li *",{padding:"0",margin:"0"}),t+=Cc(".cesium-credit-expand-link",{"padding-left":"5px",cursor:"pointer","text-decoration":"underline",color:hF}),t+=Cc(".cesium-credit-expand-link:hover",{color:jj}),t+=Cc(".cesium-credit-text",{color:hF}),t+=Cc(".cesium-credit-textContainer *, .cesium-credit-logoContainer *",{display:"inline"});function n(r){if(r.shadowRoot)return r.shadowRoot;if(r.getRootNode){let s=r.getRootNode();if(s instanceof ShadowRoot)return s}}let i=y(n(e),document.head),o=document.createElement("style");o.innerHTML=t,i.appendChild(o)}function lr(e,t,n){let i=this;n=y(n,document.body);let o=document.createElement("div");o.className="cesium-credit-lightbox-overlay",n.appendChild(o);let r=document.createElement("div");r.className="cesium-credit-lightbox",o.appendChild(r);function s(f){r.contains(f.target)||i.hideLightbox()}o.addEventListener("click",s,!1);let a=document.createElement("div");a.className="cesium-credit-lightbox-title",a.textContent="Data provided by:",r.appendChild(a);let c=document.createElement("a");c.onclick=this.hideLightbox.bind(this),c.innerHTML="×",c.className="cesium-credit-lightbox-close",r.appendChild(c);let d=document.createElement("ul");r.appendChild(d);let u=document.createElement("div");u.className="cesium-credit-logoContainer",u.style.display="inline",e.appendChild(u);let m=document.createElement("div");m.className="cesium-credit-textContainer",m.style.display="inline",e.appendChild(m);let p=document.createElement("a");p.className="cesium-credit-expand-link",p.onclick=this.showLightbox.bind(this),p.textContent="Data attribution",e.appendChild(p),Fdt(e);let g=Vt.clone(lr.cesiumCredit);this._delimiter=y(t," \u2022 "),this._screenContainer=m,this._cesiumCreditContainer=u,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=r,this._creditList=d,this._lightbox=o,this._hideLightbox=s,this._expandLink=p,this._expanded=!1,this._staticCredits=[],this._cesiumCredit=g,this._previousCesiumCredit=void 0,this._currentCesiumCredit=g,this._creditDisplayElementPool=[],this._creditDisplayElementIndex=0,this._currentFrameCredits={screenCredits:new Ct,lightboxCredits:new Ct},this._defaultCredit=void 0,this.viewport=n,this.container=e}function Yye(e,t,n,i){i=y(i,1);let o=t.get(n.id);if(l(o))o.count<Number.MAX_VALUE&&(o.count+=i);else{let r=e._creditDisplayElementPool,s=e._creditDisplayElementPoolIndex;s<r.length?(o=r[s],o.credit=n,o.count=i):(o=new Dye(n,i),r.push(o)),++e._creditDisplayElementPoolIndex,t.set(n.id,o)}}lr.prototype.addCreditToNextFrame=function(e){if(e.isIon()){l(this._defaultCredit)||(this._defaultCredit=Vt.clone(Oye())),this._currentCesiumCredit=this._defaultCredit;return}let t;e.showOnScreen?t=this._currentFrameCredits.screenCredits:t=this._currentFrameCredits.lightboxCredits,Yye(this,t,e)};lr.prototype.addStaticCredit=function(e){let t=this._staticCredits;Pdt(t,e)||t.push(e)};lr.prototype.removeStaticCredit=function(e){let t=this._staticCredits,n=t.indexOf(e);n!==-1&&t.splice(n,1)};lr.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0};lr.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1};lr.prototype.update=function(){this._expanded&&wdt(this)};lr.prototype.beginFrame=function(){let e=this._currentFrameCredits;this._creditDisplayElementPoolIndex=0;let t=e.screenCredits,n=e.lightboxCredits;t.removeAll(),n.removeAll();let i=this._staticCredits;for(let o=0;o<i.length;++o){let r=i[o],s=r.showOnScreen?t:n;r.isIon()&&Vt.equals(lr.cesiumCredit,this._cesiumCredit)||Yye(this,s,r,Number.MAX_VALUE)}Vt.equals(lr.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=Vt.clone(lr.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit};lr.prototype.endFrame=function(){let e=this._currentFrameCredits.screenCredits.values;kye(this._screenContainer,e,this._delimiter,void 0);let t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",kye(this._creditList,t,void 0,"li"),vdt(this)};lr.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._cesiumCreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),me(this)};lr.prototype.isDestroyed=function(){return!1};lr._cesiumCredit=void 0;lr._cesiumCreditInitialized=!1;var KD;function Oye(){if(!l(KD)){let e=tn("Assets/Images/ion-credit.png");e.indexOf("http://")!==0&&e.indexOf("https://")!==0&&e.indexOf("data:")!==0&&(e=new Uye.default(e).path()),KD=new Vt(`<a href="https://cesium.com/" target="_blank"><img src="${e}" title="Cesium ion"/></a>`,!0)}return lr._cesiumCreditInitialized||(lr._cesiumCredit=KD,lr._cesiumCreditInitialized=!0),KD}Object.defineProperties(lr,{cesiumCredit:{get:function(){return Oye(),lr._cesiumCredit},set:function(e){lr._cesiumCredit=e,lr._cesiumCreditInitialized=!0}}});lr.CreditDisplayElement=Dye;var fF=lr;var evi=T(S(),1);function JD(e){e=y(e,y.EMPTY_OBJECT),this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=y(e.color,Y.CYAN),this._updateOnChange=y(e.updateOnChange,!0),this.show=y(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}var Adt=new h,Mdt=new $,Ndt=new we,kdt=new Ti,Udt=new ol,Ddt=new sn,Bdt=new Cr,Ydt=new Y,Odt=[1,1e5];JD.prototype.update=function(e){if(!this.show)return;let t=this._planesPrimitives,n=this._outlinePrimitives,i,o;if(this._updateOnChange){for(o=t.length,i=0;i<o;++i)n[i]=n[i]&&n[i].destroy(),t[i]=t[i]&&t[i].destroy();t.length=0,n.length=0}if(t.length===0){let r=this._camera,s=r.frustum,a;s instanceof Ti?a=kdt:s instanceof ol?a=Udt:s instanceof sn?a=Ddt:a=Bdt,a=s.clone(a);let c,d=this._frustumSplits;!l(d)||d.length<=1?(d=Odt,d[0]=this._camera.frustum.near,d[1]=this._camera.frustum.far,c=1):c=d.length-1;let u=r.positionWC,m=r.directionWC,p=r.upWC,g=r.rightWC;g=h.negate(g,Adt);let f=Mdt;$.setColumn(f,0,g,f),$.setColumn(f,1,p,f),$.setColumn(f,2,m,f);let x=we.fromRotationMatrix(f,Ndt);for(t.length=n.length=c,i=0;i<c;++i)a.near=d[i],a.far=d[i+1],t[i]=new En({geometryInstances:new St({geometry:new _T({origin:u,orientation:x,frustum:a,_drawNearPlane:i===0}),attributes:{color:Ht.fromColor(Y.fromAlpha(this._color,.1,Ydt))},id:this.id,pickPrimitive:this}),appearance:new ln({translucent:!0,flat:!0}),asynchronous:!1}),n[i]=new En({geometryInstances:new St({geometry:new zv({origin:u,orientation:x,frustum:a,_drawNearPlane:i===0}),attributes:{color:Ht.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new ln({translucent:!1,flat:!0}),asynchronous:!1})}for(o=t.length,i=0;i<o;++i)n[i].update(e),t[i].update(e)};JD.prototype.isDestroyed=function(){return!1};JD.prototype.destroy=function(){let e=this._planesPrimitives.length;for(let t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return me(this)};var Df=JD;var Cvi=T(S(),1);function bF(e){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1,this._ellipsoidOffset=y(e,0)}var pF=Yt.supportsTypedArrays()?new Float32Array(12):[],Hye=new h,zye=new h,qj=new h,Kye=new h,QD=new h;function Hdt(e,t){let n=e.radii,i=t.camera,o,r,s;if(i.frustum instanceof sn)o=h.ZERO,r=i.rightWC,s=i.upWC;else{let m=i.positionWC,p=h.multiplyComponents(e.oneOverRadii,m,Hye),g=h.normalize(p,zye),f=h.normalize(h.cross(h.UNIT_Z,p,qj),qj),x=h.normalize(h.cross(g,f,Kye),Kye),_=h.magnitude(p),C=Math.sqrt(_*_-1);o=h.multiplyByScalar(g,1/_,Hye);let V=C/_;r=h.multiplyByScalar(f,V,zye),s=h.multiplyByScalar(x,V,qj)}let a=h.add(o,s,QD);h.subtract(a,r,a),h.multiplyComponents(n,a,a),h.pack(a,pF,0);let c=h.subtract(o,s,QD);h.subtract(c,r,c),h.multiplyComponents(n,c,c),h.pack(c,pF,3);let d=h.add(o,s,QD);h.add(d,r,d),h.multiplyComponents(n,d,d),h.pack(d,pF,6);let u=h.subtract(o,s,QD);return h.add(u,r,u),h.multiplyComponents(n,u,u),h.pack(u,pF,9),pF}bF.prototype.update=function(e){if(this._mode=e.mode,e.mode!==oe.SCENE3D)return;let t=e.context,n=e.mapProjection.ellipsoid.radii,i=new ie(n.x+this._ellipsoidOffset,n.y+this._ellipsoidOffset,n.z+this._ellipsoidOffset),o=e.useLogDepth;if(l(this._command)||(this._rs=De.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new et({renderState:this._rs,boundingVolume:new le(h.ZERO,i.maximumRadius),pass:Re.OPAQUE,owner:this})),!l(this._sp)||this._useLogDepth!==o){this._useLogDepth=o;let s=new Ye({sources:[gw]}),a=new Ye({sources:[bw]});o&&(a.defines.push("LOG_DEPTH"),s.defines.push("LOG_DEPTH")),this._sp=qt.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}let r=Hdt(i,e);if(l(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(r);else{let s=new ut({attributes:{position:new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:r})},indices:[0,1,2,2,1,3],primitiveType:Fe.TRIANGLES});this._va=ei.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:Ne.DYNAMIC_DRAW}),this._command.vertexArray=this._va}};bF.prototype.execute=function(e,t){this._mode===oe.SCENE3D&&this._command.execute(e,t)};bF.prototype.isDestroyed=function(){return!1};bF.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var gF=bF;var Evi=T(S(),1);function yF(){}var zdt=/\bgl_FragDepth\b/,Kdt=/\bdiscard\b/;function Jdt(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(!l(n)){let i=t._attributeLocations,o=t.fragmentShaderSource,r,s=!1,a=o.sources,c=a.length;for(r=0;r<c;++r)if(zdt.test(a[r])||Kdt.test(a[r])){s=!0;break}let d=!1,u=o.defines;for(c=u.length,r=0;r<c;++r)if(u[r]==="LOG_DEPTH"){d=!0;break}let m;!s&&!d?(m=`void main() + }`,Ue.sources.push(Pt),Pe.sources.push(btt(Se)),Pe.sources.push(xtt(R));let Ot=qt.fromCache({context:t.context,vertexShaderSource:Pe,fragmentShaderSource:Ue,attributeLocations:z.getAttributeLocations()});Ze=We[ae]=new ptt(i,ae,this.material,Ot,ye,Te)}return n.surfaceShader=Ze,Ze.shaderProgram};t4.prototype.destroy=function(){let e,t,n=this._shadersByTexturesFlags;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];if(!l(o))continue;for(e in o)o.hasOwnProperty(e)&&(t=o[e],l(t)&&t.shaderProgram.destroy())}return me(this)};var nw=t4;var ATi=S(T(),1);var Jbi=S(T(),1),_tt={NONE:-1,PARTIAL:0,FULL:1},lr=Object.freeze(_tt);var w0i=S(T(),1);var e0i=S(T(),1);function Qk(e,t,n,i,o,r,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=y(r,0),this.retry=!1,this.error=s}Qk.reportError=function(e,t,n,i,o,r,s,a){let c=e;return l(e)?(c.provider=t,c.message=i,c.x=o,c.y=r,c.level=s,c.retry=!1,c.error=a,++c.timesRetried):c=new Qk(t,i,o,r,s,0,a),l(n)&&n.numberOfListeners>0?n.raiseEvent(c):l(t)&&console.log(`An error occurred in "${t.constructor.name}": ${vf(i)}`),c};Qk.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};var Co=Qk;var n0i=S(T(),1),Stt={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7},ai=Object.freeze(Stt);var o0i=S(T(),1),Ttt={START:0,LOADING:1,DONE:2,FAILED:3},zs=Object.freeze(Ttt);var s0i=S(T(),1),Ctt={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6},ao=Object.freeze(Ctt);function $o(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new h,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=ao.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new le,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}Object.defineProperties($o.prototype,{eligibleForUnloading:{get:function(){let e=this.terrainState,n=!(e===ao.RECEIVING||e===ao.TRANSFORMING),i=this.imagery;for(let o=0,r=i.length;n&&o<r;++o){let s=i[o];n=!l(s.loadingImagery)||s.loadingImagery.state!==ai.TRANSITIONING}return n}},renderedMesh:{get:function(){if(l(this.vertexArray))return this.mesh;if(l(this.fill))return this.fill.mesh}}});var Vtt=new he;function n4(e,t,n,i,o,r){let s=e.getExaggeratedPosition(i,o,r);if(l(t)&&t!==oe.SCENE3D){let c=n.ellipsoid.cartesianToCartographic(s,Vtt);s=n.project(c,r),s=h.fromElements(s.z,s.x,s.y,r)}return s}var Ztt=new h,Ltt=new h,Rtt=new h;$o.prototype.pick=function(e,t,n,i,o){let r=this.renderedMesh;if(!l(r))return;let s=r.vertices,a=r.indices,c=r.encoding,d=a.length,u=Number.MAX_VALUE;for(let m=0;m<d;m+=3){let p=a[m],g=a[m+1],f=a[m+2],x=n4(c,t,n,s,p,Ztt),_=n4(c,t,n,s,g,Ltt),C=n4(c,t,n,s,f,Rtt),V=jn.rayTriangleParametric(e,x,_,C,i);l(V)&&V<u&&V>=0&&(u=V)}return u!==Number.MAX_VALUE?pn.getPoint(e,u,o):void 0};$o.prototype.freeResources=function(){l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,this.terrainState=ao.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();let e=this.imagery;for(let t=0,n=e.length;t<n;++t)e[t].freeResources();this.imagery.length=0,this.freeVertexArray()};$o.prototype.freeVertexArray=function(){$o._freeVertexArray(this.vertexArray),this.vertexArray=void 0,$o._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0};$o.initialize=function(e,t,n){let i=e.data;l(i)||(i=e.data=new $o),e.state===zs.START&&(Gtt(e,t,n),e.state=zs.LOADING)};$o.processStateMachine=function(e,t,n,i,o,r,s){$o.initialize(e,n,i);let a=e.data;if(e.state===zs.LOADING&&Ett(e,t,n,i,o,r),s)return;let c=e.renderable;e.renderable=l(a.vertexArray);let d=a.terrainState===ao.READY;e.upsampledFromParent=l(a.terrainData)&&a.terrainData.wasCreatedByUpsampling();let u=a.processImagery(e,n,t);if(d&&u){let m=e._loadedCallbacks,p={};for(let g in m)m.hasOwnProperty(g)&&(m[g](e)||(p[g]=m[g]));e._loadedCallbacks=p,e.state=zs.DONE}c&&(e.renderable=!0)};$o.prototype.processImagery=function(e,t,n,i){let o=e.data,r=e.upsampledFromParent,s=!1,a=!0,c=o.imagery,d,u;for(d=0,u=c.length;d<u;++d){let m=c[d];if(!l(m.loadingImagery)){r=!1;continue}if(m.loadingImagery.state===ai.PLACEHOLDER){let g=m.loadingImagery.imageryLayer;if(g.ready){m.freeResources(),c.splice(d,1),g._createTileImagerySkeletons(e,t,d),--d,u=c.length;continue}else r=!1}let p=m.processStateMachine(e,n,i);a=a&&p,s=s||p||l(m.readyImagery),r=r&&l(m.loadingImagery)&&(m.loadingImagery.state===ai.FAILED||m.loadingImagery.state===ai.INVALID)}return e.upsampledFromParent=r,e.renderable=e.renderable&&(s||a),a};function Xbe(e,t,n,i){let o=e.renderedMesh,r=o.vertices,s=o.encoding,a=r.length/s.stride,c=gc.clone(s);c.hasGeodeticSurfaceNormals=t,c=gc.clone(c);let d=c.stride,u=new Float32Array(a*d);t?s.addGeodeticSurfaceNormals(r,u,n):s.removeGeodeticSurfaceNormals(r,u),o.vertices=u,o.stride=d,o!==e.mesh?($o._freeVertexArray(e.fill.vertexArray),e.fill.vertexArray=$o._createVertexArrayForMesh(i.context,o)):($o._freeVertexArray(e.vertexArray),e.vertexArray=$o._createVertexArrayForMesh(i.context,o)),$o._freeVertexArray(e.wireframeVertexArray),e.wireframeVertexArray=void 0}$o.prototype.addGeodeticSurfaceNormals=function(e,t){Xbe(this,!0,e,t)};$o.prototype.removeGeodeticSurfaceNormals=function(e){Xbe(this,!1,void 0,e)};$o.prototype.updateExaggeration=function(e,t,n){let i=this,o=i.renderedMesh;if(o===void 0)return;let r=t.verticalExaggeration,s=t.verticalExaggerationRelativeHeight,a=r!==1,c=o.encoding,d=c.exaggeration!==r,u=c.exaggerationRelativeHeight!==s;if(d||u){if(d)if(a&&!c.hasGeodeticSurfaceNormals){let m=e.tilingScheme.ellipsoid;i.addGeodeticSurfaceNormals(m,t)}else!a&&c.hasGeodeticSurfaceNormals&&i.removeGeodeticSurfaceNormals(t);if(c.exaggeration=r,c.exaggerationRelativeHeight=s,n!==void 0){n._tileToUpdateHeights.push(e);let m=e.customData,p=m.length;for(let g=0;g<p;g++){let f=m[g];f.level=-1}}}};function Gtt(e,t,n){let i=t.getTileDataAvailable(e.x,e.y,e.level);if(!l(i)&&l(e.parent)){let o=e.parent,r=o.data;l(r)&&l(r.terrainData)&&(i=r.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}i===!1&&(e.data.terrainState=ao.FAILED);for(let o=0,r=n.length;o<r;++o){let s=n.get(o);s.show&&s._createTileImagerySkeletons(e,t)}}function Ett(e,t,n,i,o,r){let s=e.data,a=e.parent;if(s.terrainState===ao.FAILED&&a!==void 0&&(a.data!==void 0&&a.data.terrainData!==void 0&&a.data.terrainData.canUpsample!==!1||$o.processStateMachine(a,t,n,i,o,r,!0)),s.terrainState===ao.FAILED&&Wtt(s,e,t,n,e.x,e.y,e.level),s.terrainState===ao.UNLOADED&&Itt(s,n,e.x,e.y,e.level),s.terrainState===ao.RECEIVED&&Ptt(s,t,n,e.x,e.y,e.level),s.terrainState===ao.TRANSFORMED&&(vtt(s,t.context,n,e.x,e.y,e.level,r),s.updateExaggeration(e,t,o)),s.terrainState>=ao.RECEIVED&&s.waterMaskTexture===void 0&&n.hasWaterMask)if(s.terrainData.waterMask!==void 0)Ftt(t.context,s);else{let d=s._findAncestorTileWithTerrainData(e);l(d)&&l(d.data.waterMaskTexture)&&(s.waterMaskTexture=d.data.waterMaskTexture,++s.waterMaskTexture.referenceCount,s._computeWaterMaskTranslationAndScale(e,d,s.waterMaskTranslationAndScale))}}function Wtt(e,t,n,i,o,r,s){let a=t.parent;if(!a){t.state=zs.FAILED;return}let c=a.data.terrainData,d=a.x,u=a.y,m=a.level;if(!l(c))return;let p=c.upsample(i.tilingScheme,d,u,m,o,r,s);l(p)&&(e.terrainState=ao.RECEIVING,Promise.resolve(p).then(function(g){l(g)&&(e.terrainData=g,e.terrainState=ao.RECEIVED)}).catch(function(){e.terrainState=ao.FAILED}))}function Itt(e,t,n,i,o){function r(c){if(!l(c)){e.terrainState=ao.UNLOADED,e.request=void 0;return}e.terrainData=c,e.terrainState=ao.RECEIVED,e.request=void 0}function s(c){if(e.request.state===Qn.CANCELLED){e.terrainData=void 0,e.terrainState=ao.UNLOADED,e.request=void 0;return}e.terrainState=ao.FAILED,e.request=void 0;let d=`Failed to obtain terrain tile X: ${n} Y: ${i} Level: ${o}. Error message: "${c}"`;t._requestError=Co.reportError(t._requestError,t,t.errorEvent,d,n,i,o),t._requestError.retry&&a()}function a(){let c=new Oo({throttle:!1,throttleByServer:!0,type:is.TERRAIN});e.request=c;let d=t.requestTileGeometry(n,i,o,c);l(d)?(e.terrainState=ao.RECEIVING,Promise.resolve(d).then(function(u){r(u)}).catch(function(u){s(u)})):(e.terrainState=ao.UNLOADED,e.request=void 0)}a()}var Xtt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};function Ptt(e,t,n,i,o,r){let s=n.tilingScheme,a=Xtt;a.tilingScheme=s,a.x=i,a.y=o,a.level=r,a.exaggeration=t.verticalExaggeration,a.exaggerationRelativeHeight=t.verticalExaggerationRelativeHeight,a.throttle=!0;let d=e.terrainData.createMesh(a);l(d)&&(e.terrainState=ao.TRANSFORMING,Promise.resolve(d).then(function(u){e.mesh=u,e.terrainState=ao.TRANSFORMED}).catch(function(){e.terrainState=ao.FAILED}))}$o._createVertexArrayForMesh=function(e,t){let n=t.vertices,i=ft.createVertexBuffer({context:e,typedArray:n,usage:Ne.STATIC_DRAW}),o=t.encoding.getAttributes(i),r=t.indices.indexBuffers||{},s=r[e.id];if(!l(s)||s.isDestroyed()){let a=t.indices;s=ft.createIndexBuffer({context:e,typedArray:a,usage:Ne.STATIC_DRAW,indexDatatype:Me.fromSizeInBytes(a.BYTES_PER_ELEMENT)}),s.vertexArrayDestroyable=!1,s.referenceCount=1,r[e.id]=s,t.indices.indexBuffers=r}else++s.referenceCount;return new ei({context:e,attributes:o,indexBuffer:s})};$o._freeVertexArray=function(e){if(l(e)){let t=e.indexBuffer;e.isDestroyed()||e.destroy(),l(t)&&!t.isDestroyed()&&l(t.referenceCount)&&(--t.referenceCount,t.referenceCount===0&&t.destroy())}};function vtt(e,t,n,i,o,r,s){e.vertexArray=$o._createVertexArrayForMesh(t,e.mesh),e.terrainState=ao.READY,e.fill=e.fill&&e.fill.destroy(s)}function wtt(e){let t=e.cache.tile_waterMaskData;if(!l(t)){let n=Et.create({context:e,pixelFormat:at.LUMINANCE,pixelDatatype:Ke.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});n.referenceCount=1;let i=new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.LINEAR,magnificationFilter:di.LINEAR});t={allWaterTexture:n,sampler:i,destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function Ftt(e,t){let n=t.terrainData.waterMask,i=wtt(e),o,r=n.length;if(r===1)if(n[0]!==0)o=i.allWaterTexture;else return;else{let s=Math.sqrt(r);o=Et.create({context:e,pixelFormat:at.LUMINANCE,pixelDatatype:Ke.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:i.sampler,flipY:!1}),o.referenceCount=0}++o.referenceCount,t.waterMaskTexture=o,se.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}$o.prototype._findAncestorTileWithTerrainData=function(e){let t=e.parent;for(;l(t)&&(!l(t.data)||!l(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t};$o.prototype._computeWaterMaskTranslationAndScale=function(e,t,n){let i=t.rectangle,o=e.rectangle,r=o.width,s=o.height,a=r/i.width,c=s/i.height;return n.x=a*(o.west-i.west)/r,n.y=c*(o.south-i.south)/s,n.z=a,n.w=c,n};var Ju=$o;var dSi=S(T(),1);var p_i=S(T(),1);var c_i=S(T(),1);var Pgi=S(T(),1);var B0i=S(T(),1);function cy(e){if(e=y(e,y.EMPTY_OBJECT),this._ellipsoid=y(e.ellipsoid,te.default),this._numberOfLevelZeroTilesX=y(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=y(e.numberOfLevelZeroTilesY,1),this._projection=new Zi(this._ellipsoid),l(e.rectangleSouthwestInMeters)&&l(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{let i=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new D(-i,-i),this._rectangleNortheastInMeters=new D(i,i)}let t=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new ce(t.longitude,t.latitude,n.longitude,n.latitude)}Object.defineProperties(cy.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});cy.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};cy.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};cy.prototype.rectangleToNativeRectangle=function(e,t){let n=this._projection,i=n.project(ce.southwest(e)),o=n.project(ce.northeast(e));return l(t)?(t.west=i.x,t.south=i.y,t.east=o.x,t.north=o.y,t):new ce(i.x,i.y,o.x,o.y)};cy.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.getNumberOfXTilesAtLevel(n),r=this.getNumberOfYTilesAtLevel(n),s=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,a=this._rectangleSouthwestInMeters.x+e*s,c=this._rectangleSouthwestInMeters.x+(e+1)*s,d=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,u=this._rectangleNortheastInMeters.y-t*d,m=this._rectangleNortheastInMeters.y-(t+1)*d;return l(i)?(i.west=a,i.south=m,i.east=c,i.north=u,i):new ce(a,m,c,u)};cy.prototype.tileXYToRectangle=function(e,t,n,i){let o=this.tileXYToNativeRectangle(e,t,n,i),r=this._projection,s=r.unproject(new D(o.west,o.south)),a=r.unproject(new D(o.east,o.north));return o.west=s.longitude,o.south=s.latitude,o.east=a.longitude,o.north=a.latitude,o};cy.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!ce.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),a=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,d=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,m=this._projection.project(e),p=m.x-this._rectangleSouthwestInMeters.x,g=this._rectangleNortheastInMeters.y-m.y,f=p/a|0;f>=o&&(f=o-1);let x=g/d|0;return x>=r&&(x=r-1),l(n)?(n.x=f,n.y=x,n):new D(f,x)};var jr=cy;var H0i=S(T(),1);var i4,Pbe="AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmRcs5cw5x8CvIyg2oiotXJmY_GjoEUuuKAUvdWxusIx25kUy2AttkOs0FgosGzFJSsjafpWC40GiE5hiD0FLNSh3kxIW6w-5qqUQCEAwGY1t4yH7Fj-PjrkjPfSpw0_r2xF3lKLd0_LSmPWXCkYhqV1O67tWLNImHyr7SurJ92sA5YIG1pMJKEQU3Qv5k18p0g.AT1_sGbfSYDL",CV={};CV.defaultAccessToken=Pbe;CV.defaultWorldImageryServer=new Ee({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"});CV.defaultWorldHillshadeServer=new Ee({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"});CV.defaultWorldOceanServer=new Ee({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"});CV.getDefaultTokenCredit=function(e){if(e===Pbe){if(!l(i4)){let t='<b> This application is using a default ArcGIS access token. Please assign <i>Cesium.ArcGisMapService.defaultAccessToken</i> with an API key from your ArcGIS Developer account before using the ArcGIS tile services. You can sign up for a free ArcGIS Developer account at <a href="https://developers.arcgis.com/">https://developers.arcgis.com/</a>.</b>';i4=new Vt(t,!0)}return i4}};var Md=CV;var egi=S(T(),1);function o4(e){e=y(e,y.EMPTY_OBJECT),this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;let t=Ee.createIfNeeded(e.missingImageUrl),n=this;function i(r){l(r.blob)&&(n._missingImageByteLength=r.blob.size);let s=um(r);if(e.disableCheckIfAllPixelsAreTransparent){let a=!0,c=r.width,d=e.pixelsToCheck;for(let u=0,m=d.length;a&&u<m;++u){let p=d[u],g=p.x*4+p.y*c;s[g+3]>0&&(a=!1)}a&&(s=void 0)}n._missingImagePixels=s,n._isReady=!0}function o(){n._missingImagePixels=void 0,n._isReady=!0}t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then(i).catch(o)}o4.prototype.isReady=function(){return this._isReady};o4.prototype.shouldDiscardImage=function(e){let t=this._pixelsToCheck,n=this._missingImagePixels;if(!l(n)||l(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;let i=um(e),o=e.width;for(let r=0,s=t.length;r<s;++r){let a=t[r],c=a.x*4+a.y*o;for(let d=0;d<4;++d){let u=c+d;if(i[u]!==n[u])return!1}}return!0};var iw=o4;var igi=S(T(),1);function r4(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}r4.prototype.configureNameFromProperties=function(e){let t=10,n;for(let i in e)if(e.hasOwnProperty(i)&&e[i]){let o=i.toLowerCase();t>1&&o==="name"?(t=1,n=i):t>2&&o==="title"?(t=2,n=i):t>3&&/name/i.test(i)?(t=3,n=i):t>4&&/title/i.test(i)&&(t=4,n=i)}l(n)&&(this.name=e[n])};r4.prototype.configureDescriptionFromProperties=function(e){function t(n){let i='<table class="cesium-infoBox-defaultTable">';for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];l(r)&&(typeof r=="object"?i+=`<tr><td>${o}</td><td>${t(r)}</td></tr>`:i+=`<tr><td>${o}</td><td>${r}</td></tr>`)}return i+="</table>",i}this.description=t(e)};var ph=r4;var lgi=S(T(),1);function VV(){fe.throwInstantiationError()}Object.defineProperties(VV.prototype,{rectangle:{get:fe.throwInstantiationError},tileWidth:{get:fe.throwInstantiationError},tileHeight:{get:fe.throwInstantiationError},maximumLevel:{get:fe.throwInstantiationError},minimumLevel:{get:fe.throwInstantiationError},tilingScheme:{get:fe.throwInstantiationError},tileDiscardPolicy:{get:fe.throwInstantiationError},errorEvent:{get:fe.throwInstantiationError},credit:{get:fe.throwInstantiationError},proxy:{get:fe.throwInstantiationError},hasAlphaChannel:{get:fe.throwInstantiationError}});VV.prototype.getTileCredits=function(e,t,n){fe.throwInstantiationError()};VV.prototype.requestImage=function(e,t,n,i){fe.throwInstantiationError()};VV.prototype.pickFeatures=function(e,t,n,i,o){fe.throwInstantiationError()};var Att=/\.ktx2$/i;VV.loadImage=function(e,t){let n=Ee.createIfNeeded(t);return Att.test(n.url)?gl(n):l(e)&&l(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):n.fetchImage({preferImageBitmap:!0,flipY:!0})};var il=VV;var ugi=S(T(),1),Mtt={SATELLITE:1,OCEANS:2,HILLSHADE:3},bh=Object.freeze(Mtt);function vbe(e){this.useTiles=y(e.usePreCachedTilesIfAvailable,!0);let t=e.ellipsoid;this.tilingScheme=y(e.tilingScheme,new Ni({ellipsoid:t})),this.rectangle=y(e.rectangle,this.tilingScheme.rectangle),this.ellipsoid=t;let n=e.credit;typeof n=="string"&&(n=new Vt(n)),this.credit=n,this.tileCredits=void 0,this.tileDiscardPolicy=e.tileDiscardPolicy,this.tileWidth=y(e.tileWidth,256),this.tileHeight=y(e.tileHeight,256),this.maximumLevel=e.maximumLevel}vbe.prototype.build=function(e){e._useTiles=this.useTiles,e._tilingScheme=this.tilingScheme,e._rectangle=this.rectangle,e._credit=this.credit,e._tileCredits=this.tileCredits,e._tileDiscardPolicy=this.tileDiscardPolicy,e._tileWidth=this.tileWidth,e._tileHeight=this.tileHeight,e._maximumLevel=this.maximumLevel,this.useTiles&&!l(this.tileDiscardPolicy)&&(e._tileDiscardPolicy=new iw({missingImageUrl:wbe(e,0,0,this.maximumLevel).url,pixelsToCheck:[new D(0,0),new D(200,20),new D(20,200),new D(80,110),new D(160,130)],disableCheckIfAllPixelsAreTransparent:!0}))};function Ntt(e,t){let n=e.tileInfo;if(!l(n))t.useTiles=!1;else{if(t.tileWidth=n.rows,t.tileHeight=n.cols,n.spatialReference.wkid===102100||n.spatialReference.wkid===102113)t.tilingScheme=new jr({ellipsoid:t.ellipsoid});else if(e.tileInfo.spatialReference.wkid===4326)t.tilingScheme=new Ni({ellipsoid:t.ellipsoid});else{let i=`Tile spatial reference WKID ${e.tileInfo.spatialReference.wkid} is not supported.`;throw new ue(i)}if(t.maximumLevel=e.tileInfo.lods.length-1,l(e.fullExtent)){if(l(e.fullExtent.spatialReference)&&l(e.fullExtent.spatialReference.wkid))if(e.fullExtent.spatialReference.wkid===102100||e.fullExtent.spatialReference.wkid===102113){let i=new Zi,o=e.fullExtent,r=i.unproject(new h(Math.max(o.xmin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(o.ymin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),s=i.unproject(new h(Math.min(o.xmax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(o.ymax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0));t.rectangle=new ce(r.longitude,r.latitude,s.longitude,s.latitude)}else if(e.fullExtent.spatialReference.wkid===4326)t.rectangle=ce.fromDegrees(e.fullExtent.xmin,e.fullExtent.ymin,e.fullExtent.xmax,e.fullExtent.ymax);else{let i=`fullExtent.spatialReference WKID ${e.fullExtent.spatialReference.wkid} is not supported.`;throw new ue(i)}}else t.rectangle=t.tilingScheme.rectangle;t.useTiles=!0}l(e.copyrightText)&&e.copyrightText.length>0&&(l(t.credit)?t.tileCredits=[new Vt(e.copyrightText)]:t.credit=new Vt(e.copyrightText))}function Utt(e,t){let n=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(n+=`: ${t.message}`),new ue(n)}async function ktt(e,t){let n=e.getDerivedResource({queryParameters:{f:"json"}});try{let i=await n.fetchJson();Ntt(i,t)}catch(i){Utt(e,i)}}function Af(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=y(e.tileWidth,256),this._tileHeight=y(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=y(e.tilingScheme,new Ni({ellipsoid:e.ellipsoid})),this._useTiles=y(e.usePreCachedTilesIfAvailable,!0),this._rectangle=y(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,this._credit=e.credit,this._tileCredits=void 0;let t=e.credit;typeof t=="string"&&(t=new Vt(t)),this.enablePickFeatures=y(e.enablePickFeatures,!0),this._errorEvent=new ge}Af.fromBasemapType=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n,i,o;switch(e){case bh.SATELLITE:{n=y(t.token,Md.defaultAccessToken),i=Ee.createIfNeeded(Md.defaultWorldImageryServer),i.appendForwardSlash();let r=Md.getDefaultTokenCredit(n);l(r)&&(o=Vt.clone(r))}break;case bh.OCEANS:{n=y(t.token,Md.defaultAccessToken),i=Ee.createIfNeeded(Md.defaultWorldOceanServer),i.appendForwardSlash();let r=Md.getDefaultTokenCredit(n);l(r)&&(o=Vt.clone(r))}break;case bh.HILLSHADE:{n=y(t.token,Md.defaultAccessToken),i=Ee.createIfNeeded(Md.defaultWorldHillshadeServer),i.appendForwardSlash();let r=Md.getDefaultTokenCredit(n);l(r)&&(o=Vt.clone(r))}break;default:}return Af.fromUrl(i,{...t,token:n,credit:o,usePreCachedTilesIfAvailable:!0})};function wbe(e,t,n,i,o){let r;if(e._useTiles)r=e._resource.getDerivedResource({url:`tile/${i}/${n}/${t}`,request:o});else{let s=e._tilingScheme.tileXYToNativeRectangle(t,n,i),c={bbox:`${s.west},${s.south},${s.east},${s.north}`,size:`${e._tileWidth},${e._tileHeight}`,format:"png32",transparent:!0,f:"image"};e._tilingScheme.projection instanceof Ci?(c.bboxSR=4326,c.imageSR=4326):(c.bboxSR=3857,c.imageSR=3857),e.layers&&(c.layers=`show:${e.layers}`),r=e._resource.getDerivedResource({url:"export",request:o,queryParameters:c})}return r}Object.defineProperties(Af.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}});Af.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n=Ee.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&n.setQueryParameters({token:t.token});let i=new Af(t);i._resource=n;let o=new vbe(t);return y(t.usePreCachedTilesIfAvailable,!0)&&await ktt(n,o),o.build(i),i};Af.prototype.getTileCredits=function(e,t,n){return this._tileCredits};Af.prototype.requestImage=function(e,t,n,i){return il.loadImage(this,wbe(this,e,t,n,i))};Af.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures)return;let r=this._tilingScheme.tileXYToNativeRectangle(e,t,n),s,a,c;if(this._tilingScheme.projection instanceof Ci)s=X.toDegrees(i),a=X.toDegrees(o),c="4326";else{let p=this._tilingScheme.projection.project(new he(i,o,0));s=p.x,a=p.y,c="3857"}let d="visible";l(this._layers)&&(d+=`:${this._layers}`);let u={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:`${s},${a}`,mapExtent:`${r.west},${r.south},${r.east},${r.north}`,imageDisplay:`${this._tileWidth},${this._tileHeight},96`,sr:c,layers:d};return this._resource.getDerivedResource({url:"identify",queryParameters:u}).fetchJson().then(function(p){let g=[],f=p.results;if(!l(f))return g;for(let x=0;x<f.length;++x){let _=f[x],C=new ph;if(C.data=_,C.name=_.value,C.properties=_.attributes,C.configureDescriptionFromProperties(_.attributes),_.geometryType==="esriGeometryPoint"&&_.geometry){let V=_.geometry.spatialReference&&_.geometry.spatialReference.wkid?_.geometry.spatialReference.wkid:4326;if(V===4326||V===4283)C.position=he.fromDegrees(_.geometry.x,_.geometry.y,_.geometry.z);else if(V===102100||V===900913||V===3857){let Z=new Zi;C.position=Z.unproject(new h(_.geometry.x,_.geometry.y,_.geometry.z))}}g.push(C)}return g})};Af._metadataCache={};var Bb=Af;var eyi=S(T(),1);var wgi=S(T(),1),Dtt={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"},ZV=Object.freeze(Dtt);var Mgi=S(T(),1);function ow(e){}ow.prototype.isReady=function(){return!0};ow.prototype.shouldDiscardImage=function(e){return ow.EMPTY_IMAGE===e};var jk;Object.defineProperties(ow,{EMPTY_IMAGE:{get:function(){return l(jk)||(jk=new Image,jk.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),jk}}});var LV=ow;function Fbe(e){this.tileWidth=void 0,this.tileHeight=void 0,this.maximumLevel=void 0,this.imageUrlSubdomains=void 0,this.imageUrlTemplate=void 0,this.attributionList=void 0}Fbe.prototype.build=function(e){e._tileWidth=this.tileWidth,e._tileHeight=this.tileHeight,e._maximumLevel=this.maximumLevel,e._imageUrlSubdomains=this.imageUrlSubdomains,e._imageUrlTemplate=this.imageUrlTemplate;let t=e._attributionList=this.attributionList;t||(t=[]),e._attributionList=t;for(let n=0,i=t.length;n<i;++n){let o=t[n];if(o.credit instanceof Vt)break;o.credit=new Vt(o.attribution);let r=o.coverageAreas;for(let s=0,a=o.coverageAreas.length;s<a;++s){let c=r[s],d=c.bbox;c.bbox=new ce(X.toRadians(d[1]),X.toRadians(d[0]),X.toRadians(d[3]),X.toRadians(d[2]))}}};function Btt(e,t){if(e.resourceSets.length!==1)throw new ue("metadata does not specify one resource in resourceSets");let n=e.resourceSets[0].resources[0];t.tileWidth=n.imageWidth,t.tileHeight=n.imageHeight,t.maximumLevel=n.zoomMax-1,t.imageUrlSubdomains=n.imageUrlSubdomains,t.imageUrlTemplate=n.imageUrl,t.attributionList=n.imageryProviders}function Ytt(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i+=`: ${t.message}`),Co.reportError(void 0,n,l(n)?n._errorEvent:void 0,i,void 0,void 0,void 0,t),new ue(i)}async function Ott(e,t,n){let i=e.url,o=Vs._metadataCache[i];l(o)||(o=e.fetchJsonp("jsonp"),Vs._metadataCache[i]=o);try{let r=await o;return Btt(r,t)}catch(r){Ytt(e,r,n)}}function Vs(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=1,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._mapStyle=y(e.mapStyle,ZV.AERIAL),this._mapLayer=e.mapLayer,this._culture=y(e.culture,""),this._key=e.key,this._tileDiscardPolicy=e.tileDiscardPolicy,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new LV),this._proxy=e.proxy,this._credit=new Vt(`<a href="https://www.microsoft.com/en-us/maps/product/enduserterms"><img src="${Vs.logoUrl}" title="Bing Imagery"/></a>`),this._tilingScheme=new jr({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._attributionList=void 0,this._errorEvent=new ge}Object.defineProperties(Vs.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},mapLayer:{get:function(){return this._mapLayer}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return l(this.mapLayer)}}});Vs.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n=t.tileProtocol;l(n)?n.length>0&&n[n.length-1]===":"&&(n=n.substr(0,n.length-1)):n=document.location.protocol==="http:"?"http":"https";let i=y(t.mapStyle,ZV.AERIAL),o=Ee.createIfNeeded(e);o.appendForwardSlash();let r={incl:"ImageryProviders",key:t.key,uriScheme:n};l(t.mapLayer)&&(r.mapLayer=t.mapLayer),l(t.culture)&&(r.culture=t.culture);let s=o.getDerivedResource({url:`REST/v1/Imagery/Metadata/${i}`,queryParameters:r}),a=new Vs(t);a._resource=o;let c=new Fbe(t);return await Ott(s,c),c.build(a),a};var ztt=new ce;Vs.prototype.getTileCredits=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(e,t,n,ztt);return Jtt(this._attributionList,n,i)};Vs.prototype.requestImage=function(e,t,n,i){let o=il.loadImage(this,Ktt(this,e,t,n,i));if(l(o))return o.catch(function(r){return l(r.blob)&&r.blob.size===0?LV.EMPTY_IMAGE:Promise.reject(r)})};Vs.prototype.pickFeatures=function(e,t,n,i,o){};Vs.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;e&r&&(s|=1),t&r&&(s|=2),i+=s}return i};Vs.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,s=+e[i-o];s&1&&(t|=r),s&2&&(n|=r)}return{x:t,y:n,level:i}};Vs._logoUrl=void 0;Object.defineProperties(Vs,{logoUrl:{get:function(){return l(Vs._logoUrl)||(Vs._logoUrl=tn("Assets/Images/bing_maps_credit.png")),Vs._logoUrl},set:function(e){Vs._logoUrl=e}}});function Ktt(e,t,n,i,o){let r=e._imageUrlTemplate,s=e._imageUrlSubdomains,a=(t+n+i)%s.length;return e._resource.getDerivedResource({url:r,request:o,templateValues:{quadkey:Vs.tileXYToQuadKey(t,n,i),subdomain:s[a],culture:e._culture},queryParameters:{n:"z"}})}var Htt=new ce;function Jtt(e,t,n){++t;let i=[];for(let o=0,r=e.length;o<r;++o){let s=e[o],a=s.coverageAreas,c=!1;for(let d=0,u=s.coverageAreas.length;!c&&d<u;++d){let m=a[d];if(t>=m.zoomMin&&t<=m.zoomMax){let p=ce.intersection(n,m.bbox,Htt);l(p)&&(c=!0)}}c&&i.push(s.credit)}return i}Vs._metadataCache={};var rw=Vs;var Iyi=S(T(),1);var byi=S(T(),1);var Abe=/{[^}]+}/g,Mbe={x:$tt,y:tnt,z:ont,s:rnt,reverseX:ent,reverseY:nnt,reverseZ:int,westDegrees:snt,southDegrees:ant,eastDegrees:cnt,northDegrees:lnt,westProjected:dnt,southProjected:unt,eastProjected:mnt,northProjected:hnt,width:fnt,height:pnt},Qtt=xt(Mbe,{i:bnt,j:gnt,reverseI:ynt,reverseJ:xnt,longitudeDegrees:Snt,latitudeDegrees:Tnt,longitudeProjected:Cnt,latitudeProjected:Vnt,format:Lnt});function sw(e){e=y(e,y.EMPTY_OBJECT),this._errorEvent=new ge;let t=Ee.createIfNeeded(e.url),n=Ee.createIfNeeded(e.pickFeaturesUrl);this._resource=t,this._urlSchemeZeroPadding=e.urlSchemeZeroPadding,this._getFeatureInfoFormats=e.getFeatureInfoFormats,this._pickFeaturesResource=n;let i=e.subdomains;Array.isArray(i)?i=i.slice():l(i)&&i.length>0?i=i.split(""):i=["a","b","c"],this._subdomains=i,this._tileWidth=y(e.tileWidth,256),this._tileHeight=y(e.tileHeight,256),this._minimumLevel=y(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._tilingScheme=y(e.tilingScheme,new jr({ellipsoid:e.ellipsoid})),this._rectangle=y(e.rectangle,this._tilingScheme.rectangle),this._rectangle=ce.intersection(this._rectangle,this._tilingScheme.rectangle),this._tileDiscardPolicy=e.tileDiscardPolicy;let o=e.credit;typeof o=="string"&&(o=new Vt(o)),this._credit=o,this._hasAlphaChannel=y(e.hasAlphaChannel,!0);let r=e.customTags,s=xt(Mbe,r),a=xt(Qtt,r);this._tags=s,this._pickFeaturesTags=a,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this.enablePickFeatures=y(e.enablePickFeatures,!0)}Object.defineProperties(sw.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}});sw.prototype.getTileCredits=function(e,t,n){};sw.prototype.requestImage=function(e,t,n,i){return il.loadImage(this,jtt(this,e,t,n,i))};sw.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures||!l(this._pickFeaturesResource)||this._getFeatureInfoFormats.length===0)return;let r=0,s=this;function a(d,u){return d.callback(u)}function c(){if(r>=s._getFeatureInfoFormats.length)return Promise.resolve([]);let d=s._getFeatureInfoFormats[r],u=qtt(s,e,t,n,i,o,d.format);return++r,d.type==="json"?u.fetchJson().then(d.callback).catch(c):d.type==="xml"?u.fetchXML().then(d.callback).catch(c):d.type==="text"||d.type==="html"?u.fetchText().then(d.callback).catch(c):u.fetch({responseType:d.format}).then(a.bind(void 0,d)).catch(c)}return c()};var qk=!1,Nd=new ce,$k=!1,aw=new ce;function jtt(e,t,n,i,o){qk=!1,$k=!1;let r=e._resource,s=r.getUrlComponent(!0),a=e._tags,c={},d=s.match(Abe);return l(d)&&d.forEach(function(u){let m=u.substring(1,u.length-1);l(a[m])&&(c[m]=a[m](e,t,n,i))}),r.getDerivedResource({request:o,templateValues:c})}var s4=!1,GV=new D,a4=!1;function qtt(e,t,n,i,o,r,s){qk=!1,$k=!1,s4=!1,a4=!1;let a=e._pickFeaturesResource,c=a.getUrlComponent(!0),d=e._pickFeaturesTags,u={},m=c.match(Abe);return l(m)&&m.forEach(function(p){let g=p.substring(1,p.length-1);l(d[g])&&(u[g]=d[g](e,t,n,i,o,r,s))}),a.getDerivedResource({templateValues:u})}function EV(e,t,n){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){let i=e.urlSchemeZeroPadding[t];if(typeof i=="string"){let o=i.length;o>1&&(n=n.length>=o?n:new Array(o-n.toString().length+1).join("0")+n)}}return n}function $tt(e,t,n,i){return EV(e,"{x}",t)}function ent(e,t,n,i){let o=e.tilingScheme.getNumberOfXTilesAtLevel(i)-t-1;return EV(e,"{reverseX}",o)}function tnt(e,t,n,i){return EV(e,"{y}",n)}function nnt(e,t,n,i){let o=e.tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;return EV(e,"{reverseY}",o)}function int(e,t,n,i){let o=e.maximumLevel,r=l(o)&&i<o?o-i-1:i;return EV(e,"{reverseZ}",r)}function ont(e,t,n,i){return EV(e,"{z}",i)}function rnt(e,t,n,i){let o=(t+n+i)%e._subdomains.length;return e._subdomains[o]}function eD(e,t,n,i){qk||(e.tilingScheme.tileXYToRectangle(t,n,i,Nd),Nd.west=X.toDegrees(Nd.west),Nd.south=X.toDegrees(Nd.south),Nd.east=X.toDegrees(Nd.east),Nd.north=X.toDegrees(Nd.north),qk=!0)}function snt(e,t,n,i){return eD(e,t,n,i),Nd.west}function ant(e,t,n,i){return eD(e,t,n,i),Nd.south}function cnt(e,t,n,i){return eD(e,t,n,i),Nd.east}function lnt(e,t,n,i){return eD(e,t,n,i),Nd.north}function tD(e,t,n,i){$k||(e.tilingScheme.tileXYToNativeRectangle(t,n,i,aw),$k=!0)}function dnt(e,t,n,i){return tD(e,t,n,i),aw.west}function unt(e,t,n,i){return tD(e,t,n,i),aw.south}function mnt(e,t,n,i){return tD(e,t,n,i),aw.east}function hnt(e,t,n,i){return tD(e,t,n,i),aw.north}function fnt(e,t,n,i){return e.tileWidth}function pnt(e,t,n,i){return e.tileHeight}function bnt(e,t,n,i,o,r,s){return nD(e,t,n,i,o,r),GV.x}function gnt(e,t,n,i,o,r,s){return nD(e,t,n,i,o,r),GV.y}function ynt(e,t,n,i,o,r,s){return nD(e,t,n,i,o,r),e.tileWidth-GV.x-1}function xnt(e,t,n,i,o,r,s){return nD(e,t,n,i,o,r),e.tileHeight-GV.y-1}var _nt=new ce,RV=new h;function nD(e,t,n,i,o,r,s){if(s4)return;c4(e,t,n,i,o,r);let a=RV,c=e.tilingScheme.tileXYToNativeRectangle(t,n,i,_nt);GV.x=e.tileWidth*(a.x-c.west)/c.width|0,GV.y=e.tileHeight*(c.north-a.y)/c.height|0,s4=!0}function Snt(e,t,n,i,o,r,s){return X.toDegrees(o)}function Tnt(e,t,n,i,o,r,s){return X.toDegrees(r)}function Cnt(e,t,n,i,o,r,s){return c4(e,t,n,i,o,r),RV.x}function Vnt(e,t,n,i,o,r,s){return c4(e,t,n,i,o,r),RV.y}var Znt=new he;function c4(e,t,n,i,o,r,s){if(!a4){if(e.tilingScheme.projection instanceof Ci)RV.x=X.toDegrees(o),RV.y=X.toDegrees(r);else{let a=Znt;a.longitude=o,a.latitude=r,e.tilingScheme.projection.project(a,RV)}a4=!0}}function Lnt(e,t,n,i,o,r,s){return s}var va=sw;function Qu(e){va.call(this,e)}Qu._requestMetadata=async function(e,t,n,i){try{let o=await n.fetchXML();return Qu._metadataSuccess(o,e,t,n,i)}catch(o){if(o instanceof Ah)return Qu._metadataFailure(e,t);throw o}};Qu.fromUrl=async function(e,t){let n=Ee.createIfNeeded(e);n.appendForwardSlash();let i=n,o=n.getDerivedResource({url:"tilemapresource.xml"});t=y(t,y.EMPTY_OBJECT);let r=await Qu._requestMetadata(t,i,o);return new Qu(r)};l(Object.create)&&(Qu.prototype=Object.create(va.prototype),Qu.prototype.constructor=Qu);function Nbe(e,t){return e.west<t.rectangle.west&&(e.west=t.rectangle.west),e.east>t.rectangle.east&&(e.east=t.rectangle.east),e.south<t.rectangle.south&&(e.south=t.rectangle.south),e.north>t.rectangle.north&&(e.north=t.rectangle.north),e}function Ube(e,t,n){let i=e.positionToTileXY(ce.southwest(t),n),o=e.positionToTileXY(ce.northeast(t),n);return(Math.abs(o.x-i.x)+1)*(Math.abs(o.y-i.y)+1)>4?0:n}Qu._metadataSuccess=function(e,t,n,i,o){let r=/tileformat/i,s=/tileset/i,a=/tilesets/i,c=/boundingbox/i,d,u,m,p=[],g=e.childNodes[0].childNodes;for(let P=0;P<g.length;P++)if(r.test(g.item(P).nodeName))d=g.item(P);else if(a.test(g.item(P).nodeName)){m=g.item(P);let F=g.item(P).childNodes;for(let M=0;M<F.length;M++)s.test(F.item(M).nodeName)&&p.push(F.item(M))}else c.test(g.item(P).nodeName)&&(u=g.item(P));let f;if(!l(m)||!l(u))throw f=`Unable to find expected tilesets or bbox attributes in ${i.url}.`,l(o)&&Co.reportError(void 0,o,o.errorEvent,f),new ue(f);let x=y(t.fileExtension,d.getAttribute("extension")),_=y(t.tileWidth,parseInt(d.getAttribute("width"),10)),C=y(t.tileHeight,parseInt(d.getAttribute("height"),10)),V=y(t.minimumLevel,parseInt(p[0].getAttribute("order"),10)),Z=y(t.maximumLevel,parseInt(p[p.length-1].getAttribute("order"),10)),R=m.getAttribute("profile"),G=t.tilingScheme;if(!l(G))if(R==="geodetic"||R==="global-geodetic")G=new Ni({ellipsoid:t.ellipsoid});else if(R==="mercator"||R==="global-mercator")G=new jr({ellipsoid:t.ellipsoid});else throw f=`${i.url} specifies an unsupported profile attribute, ${R}.`,l(o)&&Co.reportError(void 0,o,o.errorEvent,f),new ue(f);let W=ce.clone(t.rectangle);if(!l(W)){let P,F,M,b;y(t.flipXY,!1)?(M=new D(parseFloat(u.getAttribute("miny")),parseFloat(u.getAttribute("minx"))),b=new D(parseFloat(u.getAttribute("maxy")),parseFloat(u.getAttribute("maxx")))):(M=new D(parseFloat(u.getAttribute("minx")),parseFloat(u.getAttribute("miny"))),b=new D(parseFloat(u.getAttribute("maxx")),parseFloat(u.getAttribute("maxy"))));let E=R==="geodetic"||R==="mercator";if(G.projection instanceof Ci||E)P=he.fromDegrees(M.x,M.y),F=he.fromDegrees(b.x,b.y);else{let I=G.projection;P=I.unproject(M),F=I.unproject(b)}W=new ce(P.longitude,P.latitude,F.longitude,F.latitude)}return W=Nbe(W,G),V=Ube(G,W,V),{url:n.getDerivedResource({url:`{z}/{x}/{reverseY}.${x}`}),tilingScheme:G,rectangle:W,tileWidth:_,tileHeight:C,minimumLevel:V,maximumLevel:Z,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit}};Qu._metadataFailure=function(e,t){let n=y(e.fileExtension,"png"),i=y(e.tileWidth,256),o=y(e.tileHeight,256),r=e.maximumLevel,s=l(e.tilingScheme)?e.tilingScheme:new jr({ellipsoid:e.ellipsoid}),a=y(e.rectangle,s.rectangle);a=Nbe(a,s);let c=Ube(s,a,e.minimumLevel);return{url:t.getDerivedResource({url:`{z}/{x}/{reverseY}.${n}`}),tilingScheme:s,rectangle:a,tileWidth:i,tileHeight:o,minimumLevel:c,maximumLevel:r,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit}};var ly=Qu;var Oyi=S(T(),1);function kbe(e){this.channel=e.channel,this.ellipsoid=e.ellipsoid,this.tilingScheme=void 0,this.version=void 0}kbe.prototype.build=function(e){e._channel=this.channel,e._version=this.version,e._tilingScheme=this.tilingScheme};function Rnt(e,t){let n;try{n=JSON.parse(e)}catch{n=JSON.parse(e.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}let i;for(let o=0;o<n.layers.length;o++)if(n.layers[o].id===t.channel){i=n.layers[o];break}if(!l(i)){let o=`Could not find layer with channel (id) of ${t.channel}.`;throw new ue(o)}if(!l(i.version)){let o=`Could not find a version in channel (id) ${t.channel}.`;throw new ue(o)}if(t.version=i.version,l(n.projection)&&n.projection==="flat")t.tilingScheme=new Ni({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ce(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:t.ellipsoid});else if(!l(n.projection)||n.projection==="mercator")t.tilingScheme=new jr({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:t.ellipsoid});else{let o=`Unsupported projection ${n.projection}.`;throw new ue(o)}return!0}function Gnt(e,t,n){let i=`An error occurred while accessing ${t.url}.`;throw l(e)&&l(e.message)&&(i+=`: ${e.message}`),Co.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new ue(i)}async function Ent(e,t,n){try{let i=await e.fetchText();Rnt(i,t)}catch(i){Gnt(i,e,n)}}function Kl(e){e=y(e,{}),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=1.9,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new Vt(`<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="${Kl.logoUrl}" title="Google Imagery"/></a>`),this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new ge}Object.defineProperties(Kl.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},version:{get:function(){return this._version}},requestType:{get:function(){return this._requestType}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});Kl.fromUrl=async function(e,t,n){n=y(n,{});let i=y(n.path,"/default_map"),o=Ee.createIfNeeded(e).getDerivedResource({url:i[0]==="/"?i.substring(1):i});o.appendForwardSlash();let r=o.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),s=new kbe(n);s.channel=t,await Ent(r,s);let a=new Kl(n);return s.build(a),a._resource=o,a._url=e,a._path=i,a};Kl.prototype.getTileCredits=function(e,t,n){};Kl.prototype.requestImage=function(e,t,n,i){let o=this._resource.getDerivedResource({url:"query",request:i,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:n+1}});return il.loadImage(this,o)};Kl.prototype.pickFeatures=function(e,t,n,i,o){};Kl._logoUrl=void 0;Object.defineProperties(Kl,{logoUrl:{get:function(){return l(Kl._logoUrl)||(Kl._logoUrl=tn("Assets/Images/google_earth_credit.png")),Kl._logoUrl},set:function(e){Kl._logoUrl=e}}});var cw=Kl;var qyi=S(T(),1);var Wnt=/\/$/,Dbe=new Vt('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function WV(e){e=y(e,y.EMPTY_OBJECT);let t=e.mapId,n=e.accessToken;this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=Ee.createIfNeeded(y(e.url,"https://{s}.tiles.mapbox.com/v4/"));this._mapId=t,this._accessToken=n;let o=y(e.format,"png");/\./.test(o)||(o=`.${o}`),this._format=o;let r=i.getUrlComponent();Wnt.test(r)||(r+="/"),r+=`${t}/{z}/{x}/{y}${this._format}`,i.url=r,i.setQueryParameters({access_token:n});let s;l(e.credit)?(s=e.credit,typeof s=="string"&&(s=new Vt(s))):s=Dbe,this._resource=i,this._imageryProvider=new va({url:i,credit:s,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(WV.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});WV.prototype.getTileCredits=function(e,t,n){};WV.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};WV.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};WV._defaultCredit=Dbe;var lw=WV;var dxi=S(T(),1);function hS(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let t=y(e.rectangle,ce.MAX_VALUE),n=new Ni({rectangle:t,numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=n,this._image=void 0,this._texture=void 0,this._hasError=!1,this._errorEvent=new ge;let i=e.credit;typeof i=="string"&&(i=new Vt(i)),this._credit=i;let o=Ee.createIfNeeded(e.url);this._resource=o,this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight}Object.defineProperties(hS.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return 0}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});function Int(e,t,n,i){let o=`Failed to load image ${e.url}`;l(t)&&l(t.message)&&(o+=`: ${t.message}`);let r=Co.reportError(i,n,l(n)?n._errorEvent:void 0,o,0,0,0,t);if(r.retry)return l4(e,n,r);throw l(n)&&(n._hasError=!0),new ue(o)}async function l4(e,t,n){try{return await il.loadImage(null,e)}catch(i){return Int(e,i,t,n)}}hS.fromUrl=async function(e,t){let n=Ee.createIfNeeded(e),i=await l4(n);t=y(t,y.EMPTY_OBJECT);let o=new hS({...t,url:e,tileWidth:i.width,tileHeight:i.height});return o._image=i,o};hS.prototype.getTileCredits=function(e,t,n){};hS.prototype.requestImage=async function(e,t,n,i){if(!this._hasError&&!l(this._image)){let o=await l4(this._resource,this);return this._image=o,Co.reportSuccess(this._errorEvent),o}return this._image};hS.prototype.pickFeatures=function(e,t,n,i,o){};var dw=hS;var vxi=S(T(),1);var bxi=S(T(),1);function Xnt(e,t,n){this.type=e,l(t)||(e==="json"?t="application/json":e==="xml"?t="text/xml":e==="html"?t="text/html":e==="text"&&(t="text/plain")),this.format=t,l(n)||(e==="json"?n=Pnt:e==="xml"?n=Ant:(e==="html"||e==="text")&&(n=Bbe)),this.callback=n}function Pnt(e){let t=[],n=e.features;for(let i=0;i<n.length;++i){let o=n[i],r=new ph;if(r.data=o,r.properties=o.properties,r.configureNameFromProperties(o.properties),r.configureDescriptionFromProperties(o.properties),l(o.geometry)&&o.geometry.type==="Point"){let s=o.geometry.coordinates[0],a=o.geometry.coordinates[1];r.position=he.fromDegrees(s,a)}t.push(r)}return t}var d4="http://www.mapinfo.com/mxp",vnt="http://www.esri.com/wms",wnt="http://www.opengis.net/wfs",Fnt="http://www.opengis.net/gml";function Ant(e){let t=e.documentElement;if(t.localName==="MultiFeatureCollection"&&t.namespaceURI===d4)return Mnt(e);if(t.localName==="FeatureInfoResponse"&&t.namespaceURI===vnt)return Nnt(e);if(t.localName==="FeatureCollection"&&t.namespaceURI===wnt)return Unt(e);if(t.localName==="ServiceExceptionReport")throw new ue(new XMLSerializer().serializeToString(t));return t.localName==="msGMLOutput"?knt(e):Dnt(e)}function Mnt(e){let t=[],i=e.documentElement.getElementsByTagNameNS(d4,"Feature");for(let o=0;o<i.length;++o){let r=i[o],s={},a=r.getElementsByTagNameNS(d4,"Val");for(let d=0;d<a.length;++d){let u=a[d];if(u.hasAttribute("ref")){let m=u.getAttribute("ref"),p=u.textContent.trim();s[m]=p}}let c=new ph;c.data=r,c.properties=s,c.configureNameFromProperties(s),c.configureDescriptionFromProperties(s),t.push(c)}return t}function Nnt(e){let t=e.documentElement,n=[],i,o=t.getElementsByTagNameNS("*","FIELDS");if(o.length>0)for(let r=0;r<o.length;++r){let s=o[r];i={};let a=s.attributes;for(let c=0;c<a.length;++c){let d=a[c];i[d.name]=d.value}n.push(iD(s,i))}else{let r=t.getElementsByTagNameNS("*","FeatureInfo");for(let s=0;s<r.length;++s){let a=r[s];i={};let c=a.childNodes;for(let d=0;d<c.length;++d){let u=c[d];u.nodeType===Node.ELEMENT_NODE&&(i[u.localName]=u.textContent)}n.push(iD(a,i))}}return n}function Unt(e){let t=[],i=e.documentElement.getElementsByTagNameNS(Fnt,"featureMember");for(let o=0;o<i.length;++o){let r=i[o],s={};u4(r,s),t.push(iD(r,s))}return t}function knt(e){let t=[],n,i=e.documentElement.childNodes;for(let r=0;r<i.length;r++)if(i[r].nodeType===Node.ELEMENT_NODE){n=i[r];break}if(!l(n))throw new ue("Unable to find first child of the feature info xml document");let o=n.childNodes;for(let r=0;r<o.length;++r){let s=o[r];if(s.nodeType===Node.ELEMENT_NODE){let a={};u4(s,a),t.push(iD(s,a))}}return t}function u4(e,t){let n=!0;for(let i=0;i<e.childNodes.length;++i){let o=e.childNodes[i];o.nodeType===Node.ELEMENT_NODE&&(n=!1),!(o.localName==="Point"||o.localName==="LineString"||o.localName==="Polygon"||o.localName==="boundedBy")&&o.hasChildNodes()&&u4(o,t)&&(t[o.localName]=o.textContent)}return n}function iD(e,t){let n=new ph;return n.data=e,n.properties=t,n.configureNameFromProperties(t),n.configureDescriptionFromProperties(t),n}function Dnt(e){let t=new XMLSerializer().serializeToString(e),n=document.createElement("div"),i=document.createElement("pre");i.textContent=t,n.appendChild(i);let o=new ph;return o.data=e,o.description=n.innerHTML,[o]}var Bnt=/<body>\s*<\/body>/im,Ynt=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,Ont=/<title>([\s\S]*)<\/title>/im;function Bbe(e){if(Bnt.test(e)||Ynt.test(e))return;let t,n=Ont.exec(e);n&&n.length>1&&(t=n[1]);let i=new ph;return i.name=t,i.description=e,i.data=e,[i]}var fS=Xnt;var Cxi=S(T(),1);function uw(e){e=y(e,y.EMPTY_OBJECT),this._tileCache={},this._tilesRequestedForInterval=[];let t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}Object.defineProperties(uw.prototype,{clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}});uw.prototype.getFromCache=function(e,t,n,i){let o=Ybe(e,t,n),r,s=this._tileCache[this._currentIntervalIndex];if(l(s)&&l(s[o])){let a=s[o];r=a.promise.catch(function(c){throw i.state=a.request.state,c}),delete s[o]}return r};uw.prototype.checkApproachingInterval=function(e,t,n,i){let o=Ybe(e,t,n),r=this._tilesRequestedForInterval,s=Obe(this),a={key:o,priorityFunction:i.priorityFunction};(!l(s)||!zbe(this,a,s))&&r.push(a),r.length>=512&&r.splice(0,256)};uw.prototype._clockOnTick=function(e){let t=e.currentTime,i=this._times.indexOf(t),o=this._currentIntervalIndex;if(i!==o){let s=this._tileCache[o];for(let a in s)s.hasOwnProperty(a)&&s[a].request.cancel();delete this._tileCache[o],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,this._reloadFunction();return}let r=Obe(this);if(l(r)){let s=this._tilesRequestedForInterval,a=!0;for(;a&&s.length!==0;){let c=s.pop();a=zbe(this,c,r),a||s.push(c)}}};function Ybe(e,t,n){return`${e}-${t}-${n}`}function znt(e){let t=e.split("-");if(t.length===3)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function Obe(e){let t=e._times;if(!l(t))return;let n=e._clock,i=n.currentTime,o=n.canAnimate&&n.shouldAnimate,r=n.multiplier;if(!o&&r!==0)return;let s,a=t.indexOf(i);if(a<0)return;let c=t.get(a);return r>0?(s=ne.secondsDifference(c.stop,i),++a):(s=ne.secondsDifference(c.start,i),--a),s/=r,a>=0&&s<=5?t.get(a):void 0}function zbe(e,t,n){let i=e._times.indexOf(n.start),o=e._tileCache,r=o[i];l(r)||(r=o[i]={});let s=t.key;if(l(r[s]))return!0;let a=znt(s),c=new Oo({throttle:!1,throttleByServer:!0,type:is.IMAGERY,priorityFunction:t.priorityFunction}),d=e._requestImageFunction(a.x,a.y,a.level,c,n);return l(d)?(r[s]={promise:d,request:c},!0):!1}var pS=uw;var Knt=[3034,3035,3042,3043,3044],Hnt=[4471,4559];function gh(e){if(e=y(e,y.EMPTY_OBJECT),l(e.times)&&!l(e.clock))throw new fe("options.times was specified, so options.clock is required.");this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=y(e.getFeatureInfoUrl,e.url);let t=Ee.createIfNeeded(e.url),n=Ee.createIfNeeded(this._getFeatureInfoUrl);t.setQueryParameters(gh.DefaultParameters,!0),n.setQueryParameters(gh.GetFeatureInfoDefaultParameters,!0),l(e.parameters)&&t.setQueryParameters(Kbe(e.parameters)),l(e.getFeatureInfoParameters)&&n.setQueryParameters(Kbe(e.getFeatureInfoParameters));let i=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new pS({clock:e.clock,times:e.times,requestImageFunction:function(s,a,c,d,u){return Hbe(i,s,a,c,d,u)},reloadFunction:function(){l(i._reload)&&i._reload()}}));let o={};if(o.layers=e.layers,o.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",o.width="{width}",o.height="{height}",parseFloat(t.queryParameters.version)>=1.3){o.crs=y(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof Zi?"EPSG:3857":"CRS:84");let s=o.crs.split(":");if(s[0]==="EPSG"&&s.length===2){let a=Number(s[1]);(a>=4e3&&a<5e3&&!Hnt.includes(a)||Knt.includes(a))&&(o.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else o.srs=y(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof Zi?"EPSG:3857":"EPSG:4326");t.setQueryParameters(o,!0),n.setQueryParameters(o,!0);let r={query_layers:e.layers,info_format:"{format}"};parseFloat(n.queryParameters.version)>=1.3?(r.i="{i}",r.j="{j}"):(r.x="{i}",r.y="{j}"),n.setQueryParameters(r,!0),this._resource=t,this._pickFeaturesResource=n,this._layers=e.layers,this._tileProvider=new va({url:t,pickFeaturesUrl:n,tilingScheme:y(e.tilingScheme,new Ni({ellipsoid:e.ellipsoid})),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:y(e.getFeatureInfoFormats,gh.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures})}function Hbe(e,t,n,i,o,r){let s=l(r)?r.data:void 0,a=e._tileProvider;return l(s)&&a._resource.setQueryParameters(s),a.requestImage(t,n,i,o)}function Jnt(e,t,n,i,o,r,s){let a=l(s)?s.data:void 0,c=e._tileProvider;return l(a)&&c._pickFeaturesResource.setQueryParameters(a),c.pickFeatures(t,n,i,o,r)}Object.defineProperties(gh.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}});gh.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};gh.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return l(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Hbe(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};gh.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,s=l(r)?r.currentInterval:void 0;return Jnt(this,e,t,n,i,o,s)};gh.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"});gh.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"});gh.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new fS("json","application/json")),Object.freeze(new fS("xml","text/xml")),Object.freeze(new fS("text","text/html"))]);function Kbe(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var mw=gh;var zxi=S(T(),1);var Qnt=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function hw(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let t=Ee.createIfNeeded(e.url),n=e.style,i=e.tileMatrixSetID,o=t.url,r=o.match(/{/g);if(!l(r)||r.length===1&&/{s}/.test(o))t.setQueryParameters(Qnt),this._useKvp=!0;else{let m={style:n,Style:n,TileMatrixSet:i};t.setTemplateValues(m),this._useKvp=!1}this._resource=t,this._layer=e.layer,this._style=n,this._tileMatrixSetID=i,this._tileMatrixLabels=e.tileMatrixLabels,this._format=y(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new jr({ellipsoid:e.ellipsoid}),this._tileWidth=y(e.tileWidth,256),this._tileHeight=y(e.tileHeight,256),this._minimumLevel=y(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=y(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;let s=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new pS({clock:e.clock,times:e.times,requestImageFunction:function(m,p,g,f,x){return Jbe(s,m,p,g,f,x)},reloadFunction:function(){l(s._reload)&&s._reload()}}));let a=this._tilingScheme.positionToTileXY(ce.southwest(this._rectangle),this._minimumLevel),c=this._tilingScheme.positionToTileXY(ce.northeast(this._rectangle),this._minimumLevel),d=(Math.abs(c.x-a.x)+1)*(Math.abs(c.y-a.y)+1);this._errorEvent=new ge;let u=e.credit;this._credit=typeof u=="string"?new Vt(u):u,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():l(this._subdomains)&&this._subdomains.length>0?this._subdomains=this._subdomains.split(""):this._subdomains=["a","b","c"]}function Jbe(e,t,n,i,o,r){let s=e._tileMatrixLabels,a=l(s)?s[i]:i.toString(),c=e._subdomains,d=e._dimensions,u=l(r)?r.data:void 0,m,p;if(!e._useKvp)p={TileMatrix:a,TileRow:n.toString(),TileCol:t.toString(),s:c[(t+n+i)%c.length]},m=e._resource.getDerivedResource({request:o}),m.setTemplateValues(p),l(d)&&m.setTemplateValues(d),l(u)&&m.setTemplateValues(u);else{let g={};g.tilematrix=a,g.layer=e._layer,g.style=e._style,g.tilerow=n,g.tilecol=t,g.tilematrixset=e._tileMatrixSetID,g.format=e._format,l(d)&&(g=xt(g,d)),l(u)&&(g=xt(g,u)),p={s:c[(t+n+i)%c.length]},m=e._resource.getDerivedResource({queryParameters:g,request:o}),m.setTemplateValues(p)}return il.loadImage(e,m)}Object.defineProperties(hw.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,l(this._reload)&&this._reload())}}});hw.prototype.getTileCredits=function(e,t,n){};hw.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return l(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Jbe(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};hw.prototype.pickFeatures=function(e,t,n,i,o){};var fw=hw;var jnt={ARCGIS_MAPSERVER:Bb.fromUrl,BING:async(e,t)=>rw.fromUrl(e,t),GOOGLE_EARTH:async(e,t)=>{let n=t.channel;return delete t.channel,cw.fromUrl(e,n,t)},MAPBOX:(e,t)=>new lw({url:e,...t}),SINGLE_TILE:dw.fromUrl,TMS:ly.fromUrl,URL_TEMPLATE:(e,t)=>new va({url:e,...t}),WMS:(e,t)=>new mw({url:e,...t}),WMTS:(e,t)=>new fw({url:e,...t})};function Mf(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileCredits=void 0,this._errorEvent=new ge}Object.defineProperties(Mf.prototype,{rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}},proxy:{get:function(){}}});Mf.fromAssetId=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n=dd._createEndpointResource(e,t),i=e.toString()+t.accessToken+t.server,o=Mf._endpointCache[i];l(o)||(o=n.fetchJson(),Mf._endpointCache[i]=o);let r=await o;if(r.type!=="IMAGERY")throw new ue(`Cesium ion asset ${e} is not an imagery asset.`);let s,a=r.externalType;if(!l(a))s=await ly.fromUrl(new dd(r,n));else{let d=jnt[a];if(!l(d))throw new ue(`Unrecognized Cesium ion imagery type: ${a}`);let u={...r.options},m=u.url;delete u.url,s=await d(m,u)}let c=new Mf(t);return s.errorEvent.addEventListener(function(d){d.provider=c,c._errorEvent.raiseEvent(d)}),c._tileCredits=dd.getCreditsFromEndpoint(r,n),c._imageryProvider=s,c};Mf.prototype.getTileCredits=function(e,t,n){let i=this._imageryProvider.getTileCredits(e,t,n);return l(i)?this._tileCredits.concat(i):this._tileCredits};Mf.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};Mf.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};Mf._endpointCache={};var Yb=Mf;var d_i=S(T(),1),qnt={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},Ob=Object.freeze(qnt);function $nt(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.style,Ob.AERIAL);return Yb.fromAssetId(t)}var zb=$nt;var __i=S(T(),1);function IV(e,t,n,i,o){if(this.imageryLayer=e,this.x=t,this.y=n,this.level=i,this.request=void 0,i!==0){let r=t/2|0,s=n/2|0,a=i-1;this.parent=e.getImageryFromCache(r,s,a)}this.state=ai.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!l(o)&&e.ready&&(o=e.imageryProvider.tilingScheme.tileXYToRectangle(t,n,i)),this.rectangle=o}IV.createPlaceholder=function(e){let t=new IV(e,0,0,0);return t.addReference(),t.state=ai.PLACEHOLDER,t};IV.prototype.addReference=function(){++this.referenceCount};IV.prototype.releaseReference=function(){return--this.referenceCount,this.referenceCount===0?(this.imageryLayer.removeImageryFromCache(this),l(this.parent)&&this.parent.releaseReference(),l(this.image)&&l(this.image.destroy)&&this.image.destroy(),l(this.texture)&&this.texture.destroy(),l(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),me(this),0):this.referenceCount};IV.prototype.processStateMachine=function(e,t,n){this.state===ai.UNLOADED&&!n&&(this.state=ai.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===ai.RECEIVED&&(this.state=ai.TRANSITIONING,this.imageryLayer._createTexture(e.context,this));let i=this.state===ai.READY&&t&&!this.texture;(this.state===ai.TEXTURE_LOADED||i)&&(this.state=ai.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};var XV=IV;var V_i=S(T(),1);function m4(e,t,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=n}m4.prototype.freeResources=function(){l(this.readyImagery)&&this.readyImagery.releaseReference(),l(this.loadingImagery)&&this.loadingImagery.releaseReference()};m4.prototype.processStateMachine=function(e,t,n){let i=this.loadingImagery,o=i.imageryLayer;if(i.processStateMachine(t,!this.useWebMercatorT,n),i.state===ai.READY)return l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this),!0;let r=i.parent,s;for(;l(r)&&(r.state!==ai.READY||!this.useWebMercatorT&&!l(r.texture));)r.state!==ai.FAILED&&r.state!==ai.INVALID&&(s=s||r),r=r.parent;return this.readyImagery!==r&&(l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=r,l(r)&&(r.addReference(),this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this))),i.state===ai.FAILED||i.state===ai.INVALID?l(s)?(s.processStateMachine(t,!this.useWebMercatorT,n),!1):!0:!1};var PV=m4;function yi(e,t){this._imageryProvider=e,this._readyEvent=new ge,this._errorEvent=new ge,t=y(t,y.EMPTY_OBJECT),e=y(e,y.EMPTY_OBJECT),this.alpha=y(t.alpha,y(e._defaultAlpha,1)),this.nightAlpha=y(t.nightAlpha,y(e._defaultNightAlpha,1)),this.dayAlpha=y(t.dayAlpha,y(e._defaultDayAlpha,1)),this.brightness=y(t.brightness,y(e._defaultBrightness,yi.DEFAULT_BRIGHTNESS)),this.contrast=y(t.contrast,y(e._defaultContrast,yi.DEFAULT_CONTRAST)),this.hue=y(t.hue,y(e._defaultHue,yi.DEFAULT_HUE)),this.saturation=y(t.saturation,y(e._defaultSaturation,yi.DEFAULT_SATURATION)),this.gamma=y(t.gamma,y(e._defaultGamma,yi.DEFAULT_GAMMA)),this.splitDirection=y(t.splitDirection,yi.DEFAULT_SPLIT),this.minificationFilter=y(t.minificationFilter,y(e._defaultMinificationFilter,yi.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=y(t.magnificationFilter,y(e._defaultMagnificationFilter,yi.DEFAULT_MAGNIFICATION_FILTER)),this.show=y(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=y(t.rectangle,ce.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new PV(XV.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this.colorToAlpha=t.colorToAlpha,this.colorToAlphaThreshold=y(t.colorToAlphaThreshold,yi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD)}Object.defineProperties(yi.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},ready:{get:function(){return l(this._imageryProvider)}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},rectangle:{get:function(){return this._rectangle}}});yi.DEFAULT_BRIGHTNESS=1;yi.DEFAULT_CONTRAST=1;yi.DEFAULT_HUE=0;yi.DEFAULT_SATURATION=1;yi.DEFAULT_GAMMA=1;yi.DEFAULT_SPLIT=zc.NONE;yi.DEFAULT_MINIFICATION_FILTER=on.LINEAR;yi.DEFAULT_MAGNIFICATION_FILTER=di.LINEAR;yi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004;yi.fromProviderAsync=function(e,t){let n=new yi(void 0,t);return oit(n,Promise.resolve(e)),n};yi.fromWorldImagery=function(e){return e=y(e,y.EMPTY_OBJECT),yi.fromProviderAsync(zb({style:e.style}),e)};yi.prototype.isBaseLayer=function(){return this._isBaseLayer};yi.prototype.isDestroyed=function(){return!1};yi.prototype.destroy=function(){return me(this)};var qbe=new ce,Qbe=new ce,h4=new ce,$be=new ce;yi.prototype.getImageryRectangle=function(){let e=this._imageryProvider,t=this._rectangle;return ce.intersection(e.rectangle,t)};yi.prototype._createTileImagerySkeletons=function(e,t,n){let i=e.data;if(!l(t)||l(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||l(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;l(n)||(n=i.imagery.length);let o=this._imageryProvider;if(!this.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),i.imagery.splice(n,0,this._skeletonPlaceholder),!0;let r=o.tilingScheme.projection instanceof Zi&&e.rectangle.north<Zi.MaximumLatitude&&e.rectangle.south>-Zi.MaximumLatitude,s=ce.intersection(o.rectangle,this._rectangle,qbe),a=ce.intersection(e.rectangle,s,Qbe);if(!l(a)){if(!this.isBaseLayer())return!1;let E=s,I=e.rectangle;a=Qbe,I.south>=E.north?a.north=a.south=E.north:I.north<=E.south?a.north=a.south=E.south:(a.south=Math.max(I.south,E.south),a.north=Math.min(I.north,E.north)),I.west>=E.east?a.west=a.east=E.east:I.east<=E.west?a.west=a.east=E.west:(a.west=Math.max(I.west,E.west),a.east=Math.min(I.east,E.east))}let c=0;a.south>0?c=a.south:a.north<0&&(c=a.north);let u=1*t.getLevelMaximumGeometricError(e.level),m=nit(this,u,c);m=Math.max(0,m);let p=o.maximumLevel;if(m>p&&(m=p),l(o.minimumLevel)){let E=o.minimumLevel;m<E&&(m=E)}let g=o.tilingScheme,f=g.positionToTileXY(ce.northwest(a),m),x=g.positionToTileXY(ce.southeast(a),m),_=e.rectangle.width/512,C=e.rectangle.height/512,V=g.tileXYToRectangle(f.x,f.y,m);Math.abs(V.south-e.rectangle.north)<C&&f.y<x.y&&++f.y,Math.abs(V.east-e.rectangle.west)<_&&f.x<x.x&&++f.x;let Z=g.tileXYToRectangle(x.x,x.y,m);Math.abs(Z.north-e.rectangle.south)<C&&x.y>f.y&&--x.y,Math.abs(Z.west-e.rectangle.east)<_&&x.x>f.x&&--x.x;let R=ce.clone(e.rectangle,$be),G=g.tileXYToRectangle(f.x,f.y,m),W=ce.intersection(G,s,h4),v;r?(g.rectangleToNativeRectangle(R,R),g.rectangleToNativeRectangle(G,G),g.rectangleToNativeRectangle(W,W),g.rectangleToNativeRectangle(s,s),v=g.tileXYToNativeRectangle.bind(g),_=R.width/512,C=R.height/512):v=g.tileXYToRectangle.bind(g);let P,F=0,M=1,b;!this.isBaseLayer()&&Math.abs(W.west-R.west)>=_&&(F=Math.min(1,(W.west-R.west)/R.width)),!this.isBaseLayer()&&Math.abs(W.north-R.north)>=C&&(M=Math.max(0,(W.north-R.south)/R.height));let L=M;for(let E=f.x;E<=x.x;E++)if(P=F,G=v(E,f.y,m),W=ce.simpleIntersection(G,s,h4),!!l(W)){F=Math.min(1,(W.east-R.west)/R.width),E===x.x&&(this.isBaseLayer()||Math.abs(W.east-R.east)<_)&&(F=1),M=L;for(let I=f.y;I<=x.y;I++){if(b=M,G=v(E,I,m),W=ce.simpleIntersection(G,s,h4),!l(W))continue;M=Math.max(0,(W.south-R.south)/R.height),I===x.y&&(this.isBaseLayer()||Math.abs(W.south-R.south)<C)&&(M=0);let w=new se(P,M,F,b),N=this.getImageryFromCache(E,I,m);i.imagery.splice(n,0,new PV(N,w,r)),++n}}return!0};yi.prototype._calculateTextureTranslationAndScale=function(e,t){let n=t.readyImagery.rectangle,i=e.rectangle;if(t.useWebMercatorT){let c=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;n=c.rectangleToNativeRectangle(n,qbe),i=c.rectangleToNativeRectangle(i,$be)}let o=i.width,r=i.height,s=o/n.width,a=r/n.height;return new se(s*(i.west-n.west)/o,a*(i.south-n.south)/r,s,a)};yi.prototype._requestImagery=function(e){let t=this._imageryProvider,n=this;function i(s){if(!l(s))return o();e.image=s,e.state=ai.RECEIVED,e.request=void 0,Co.reportSuccess(n._requestImageError)}function o(s){if(e.request.state===Qn.CANCELLED){e.state=ai.UNLOADED,e.request=void 0;return}e.state=ai.FAILED,e.request=void 0;let a=`Failed to obtain image tile X: ${e.x} Y: ${e.y} Level: ${e.level}.`;n._requestImageError=Co.reportError(n._requestImageError,t,t.errorEvent,a,e.x,e.y,e.level,s),n._requestImageError.retry&&r()}function r(){let s=new Oo({throttle:!1,throttleByServer:!0,type:is.IMAGERY});e.request=s,e.state=ai.TRANSITIONING;let a=t.requestImage(e.x,e.y,e.level,s);if(!l(a)){e.state=ai.UNLOADED,e.request=void 0;return}l(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),a.then(function(c){i(c)}).catch(function(c){o(c)})}r()};yi.prototype._createTextureWebGL=function(e,t){let n=new rn({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),i=t.image;return l(i.internalFormat)?new Et({context:e,pixelFormat:i.internalFormat,width:i.width,height:i.height,source:{arrayBufferView:i.bufferView},sampler:n}):new Et({context:e,source:i,pixelFormat:this._imageryProvider.hasAlphaChannel?at.RGBA:at.RGB,sampler:n})};yi.prototype._createTexture=function(e,t){let n=this._imageryProvider,i=t.image;if(l(n.tileDiscardPolicy)){let r=n.tileDiscardPolicy;if(l(r)){if(!r.isReady()){t.state=ai.RECEIVED;return}if(r.shouldDiscardImage(i)){t.state=ai.INVALID;return}}}let o=this._createTextureWebGL(e,t);n.tilingScheme.projection instanceof Zi?t.textureWebMercator=o:t.texture=o,t.image=void 0,t.state=ai.TEXTURE_LOADED};function jbe(e,t,n){return`${e}:${t}:${n}`}yi.prototype._finalizeReprojectTexture=function(e,t){let n=this.minificationFilter,i=this.magnificationFilter;if(n===on.LINEAR&&i===di.LINEAR&&!at.isCompressedFormat(t.pixelFormat)&&X.isPowerOfTwo(t.width)&&X.isPowerOfTwo(t.height)){n=on.LINEAR_MIPMAP_LINEAR;let r=Mt.maximumTextureFilterAnisotropy,s=Math.min(r,y(this._maximumAnisotropy,r)),a=jbe(n,i,s),c=e.cache.imageryLayerMipmapSamplers;l(c)||(c={},e.cache.imageryLayerMipmapSamplers=c);let d=c[a];l(d)||(d=c[a]=new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i,maximumAnisotropy:s})),t.generateMipmap(Dh.NICEST),t.sampler=d}else{let r=jbe(n,i,0),s=e.cache.imageryLayerNonMipmapSamplers;l(s)||(s={},e.cache.imageryLayerNonMipmapSamplers=s);let a=s[r];l(a)||(a=s[r]=new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i})),t.sampler=a}};yi.prototype._reprojectTexture=function(e,t,n){let i=t.textureWebMercator||t.texture,o=t.rectangle,r=e.context;if(n=y(n,!0),n&&!(this._imageryProvider.tilingScheme.projection instanceof Ci)&&o.width/i.width>1e-5){let s=this;t.addReference();let a=new Tl({persists:!0,owner:this,preExecute:function(c){tit(c,r,i,t.rectangle)},postExecute:function(c){t.texture=c,s._finalizeReprojectTexture(r,c),t.state=ai.READY,t.releaseReference()},canceled:function(){t.state=ai.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(a)}else n&&(t.texture=i),this._finalizeReprojectTexture(r,i),t.state=ai.READY};yi.prototype.queueReprojectionCommands=function(e){let t=this._reprojectComputeCommands,n=t.length;for(let i=0;i<n;++i)e.commandList.push(t[i]);t.length=0};yi.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach(function(e){l(e.canceled)&&e.canceled()}),this._reprojectComputeCommands.length=0};yi.prototype.getImageryFromCache=function(e,t,n,i){let o=e0e(e,t,n),r=this._imageryCache[o];return l(r)||(r=new XV(this,e,t,n,i),this._imageryCache[o]=r),r.addReference(),r};yi.prototype.removeImageryFromCache=function(e){let t=e0e(e.x,e.y,e.level);delete this._imageryCache[t]};function e0e(e,t,n){return JSON.stringify([e,t,n])}var oD={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new D,texture:void 0},eit=Yt.supportsTypedArrays()?new Float32Array(2*64):void 0;function tit(e,t,n,i){let o=t.cache.imageryLayer_reproject;if(!l(o)){o=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){l(this.framebuffer)&&this.framebuffer.destroy(),l(this.vertexArray)&&this.vertexArray.destroy(),l(this.shaderProgram)&&this.shaderProgram.destroy()}};let _=new Float32Array(2*64*2),C=0;for(let W=0;W<64;++W){let v=W/63;_[C++]=0,_[C++]=v,_[C++]=1,_[C++]=v}let V={position:0,webMercatorT:1},Z=Qr.getRegularGridIndices(2,64),R=ft.createIndexBuffer({context:t,typedArray:Z,usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT});o.vertexArray=new ei({context:t,attributes:[{index:V.position,vertexBuffer:ft.createVertexBuffer({context:t,typedArray:_,usage:Ne.STATIC_DRAW}),componentsPerAttribute:2},{index:V.webMercatorT,vertexBuffer:ft.createVertexBuffer({context:t,sizeInBytes:64*2*4,usage:Ne.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:R});let G=new Ye({sources:[Kv]});o.shaderProgram=qt.fromCache({context:t,vertexShaderSource:G,fragmentShaderSource:zv,attributeLocations:V}),o.sampler=new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.LINEAR,magnificationFilter:di.LINEAR})}n.sampler=o.sampler;let r=n.width,s=n.height;oD.textureDimensions.x=r,oD.textureDimensions.y=s,oD.texture=n;let a=Math.sin(i.south),c=.5*Math.log((1+a)/(1-a));a=Math.sin(i.north);let u=1/(.5*Math.log((1+a)/(1-a))-c),m=new Et({context:t,width:r,height:s,pixelFormat:n.pixelFormat,pixelDatatype:n.pixelDatatype,preMultiplyAlpha:n.preMultiplyAlpha});X.isPowerOfTwo(r)&&X.isPowerOfTwo(s)&&m.generateMipmap(Dh.NICEST);let p=i.south,g=i.north,f=eit,x=0;for(let _=0;_<64;++_){let C=_/63,V=X.lerp(p,g,C);a=Math.sin(V);let R=(.5*Math.log((1+a)/(1-a))-c)*u;f[x++]=R,f[x++]=R}o.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(f),e.shaderProgram=o.shaderProgram,e.outputTexture=m,e.uniformMap=oD,e.vertexArray=o.vertexArray}function nit(e,t,n){let i=e._imageryProvider,o=i.tilingScheme,r=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof Ci?1:Math.cos(n),a=o.rectangle,d=r.maximumRadius*a.width*s/(i.tileWidth*o.getNumberOfXTilesAtLevel(0))/t,u=Math.log(d)/Math.log(2);return Math.round(u)|0}function iit(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function oit(e,t){let n;try{if(n=await Promise.resolve(t),e.isDestroyed())return;e._imageryProvider=n,e._readyEvent.raiseEvent(n)}catch(i){iit(e._errorEvent,i)}}var ma=yi;var FSi=S(T(),1);var mSi=S(T(),1),rit={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},gn=rit;var fSi=S(T(),1),t0e={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=t0e.RENDERED_AND_KICKED},originalResult:function(e){return e&3},kick:function(e){return e|4}},Hn=t0e;function wV(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se}wV.prototype.update=function(e,t,n){this.changedThisFrame&&(c0e(e,t,this.tile,n),this.changedThisFrame=!1)};wV.prototype.destroy=function(e){this._destroyVertexArray(e),l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};wV.prototype._destroyVertexArray=function(e){l(this.vertexArray)&&(l(e)?e.push(this.vertexArray):Ju._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var sit=new ng;wV.updateFillTiles=function(e,t,n,i){let o=e._quadtree,r=o._levelZeroTiles,s=o._lastSelectionFrameNumber,a=sit;a.clear();for(let d=0;d<t.length;++d){let u=t[d];l(u.data.vertexArray)&&a.enqueue(t[d])}let c=a.dequeue();for(;c!==void 0;){let d=c.findTileToWest(r),u=c.findTileToSouth(r),m=c.findTileToEast(r),p=c.findTileToNorth(r);Zs(e,n,c,d,s,gn.EAST,!1,a,i),Zs(e,n,c,u,s,gn.NORTH,!1,a,i),Zs(e,n,c,m,s,gn.WEST,!1,a,i),Zs(e,n,c,p,s,gn.SOUTH,!1,a,i);let g=d.findTileToNorth(r),f=d.findTileToSouth(r),x=m.findTileToNorth(r),_=m.findTileToSouth(r);Zs(e,n,c,g,s,gn.SOUTHEAST,!1,a,i),Zs(e,n,c,x,s,gn.SOUTHWEST,!1,a,i),Zs(e,n,c,f,s,gn.NORTHEAST,!1,a,i),Zs(e,n,c,_,s,gn.NORTHWEST,!1,a,i),c=a.dequeue()}};function Zs(e,t,n,i,o,r,s,a,c){if(i===void 0)return;let d=i;for(;d&&(d._lastSelectionResultFrame!==o||Hn.wasKicked(d._lastSelectionResult)||Hn.originalResult(d._lastSelectionResult)===Hn.CULLED);){if(s)return;let u=d.parent;if(r>=gn.NORTHWEST&&u!==void 0)switch(r){case gn.NORTHWEST:d=d===u.northwestChild?u:void 0;break;case gn.NORTHEAST:d=d===u.northeastChild?u:void 0;break;case gn.SOUTHWEST:d=d===u.southwestChild?u:void 0;break;case gn.SOUTHEAST:d=d===u.southeastChild?u:void 0;break}else d=u}if(d!==void 0){if(d._lastSelectionResult===Hn.RENDERED){if(l(d.data.vertexArray))return;ait(e,t,n,d,r,o,a,c);return}if(Hn.originalResult(i._lastSelectionResult)!==Hn.CULLED)switch(r){case gn.WEST:Zs(e,t,n,i.northwestChild,o,r,!0,a,c),Zs(e,t,n,i.southwestChild,o,r,!0,a,c);break;case gn.EAST:Zs(e,t,n,i.southeastChild,o,r,!0,a,c),Zs(e,t,n,i.northeastChild,o,r,!0,a,c);break;case gn.SOUTH:Zs(e,t,n,i.southwestChild,o,r,!0,a,c),Zs(e,t,n,i.southeastChild,o,r,!0,a,c);break;case gn.NORTH:Zs(e,t,n,i.northeastChild,o,r,!0,a,c),Zs(e,t,n,i.northwestChild,o,r,!0,a,c);break;case gn.NORTHWEST:Zs(e,t,n,i.northwestChild,o,r,!0,a,c);break;case gn.NORTHEAST:Zs(e,t,n,i.northeastChild,o,r,!0,a,c);break;case gn.SOUTHWEST:Zs(e,t,n,i.southwestChild,o,r,!0,a,c);break;case gn.SOUTHEAST:Zs(e,t,n,i.southeastChild,o,r,!0,a,c);break;default:throw new fe("Invalid edge")}}}function ait(e,t,n,i,o,r,s,a){let c=i.data;if(c.fill===void 0)c.fill=new wV(i);else if(c.fill.visitedFrame===r)return;c.fill.enqueuedFrame!==r&&(c.fill.enqueuedFrame=r,c.fill.changedThisFrame=!1,s.enqueue(i)),cit(e,t,n,i,o,a)}function cit(e,t,n,i,o,r){let s=i.data.fill,a,c=n.data.fill;l(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(c0e(e,t,n,r),c.changedThisFrame=!1),a=n.data.fill.mesh):a=n.data.mesh;let d,u;switch(o){case gn.WEST:d=s.westMeshes,u=s.westTiles;break;case gn.SOUTH:d=s.southMeshes,u=s.southTiles;break;case gn.EAST:d=s.eastMeshes,u=s.eastTiles;break;case gn.NORTH:d=s.northMeshes,u=s.northTiles;break;case gn.NORTHWEST:s.changedThisFrame=s.changedThisFrame||s.northwestMesh!==a,s.northwestMesh=a,s.northwestTile=n;return;case gn.NORTHEAST:s.changedThisFrame=s.changedThisFrame||s.northeastMesh!==a,s.northeastMesh=a,s.northeastTile=n;return;case gn.SOUTHWEST:s.changedThisFrame=s.changedThisFrame||s.southwestMesh!==a,s.southwestMesh=a,s.southwestTile=n;return;case gn.SOUTHEAST:s.changedThisFrame=s.changedThisFrame||s.southeastMesh!==a,s.southeastMesh=a,s.southeastTile=n;return}if(n.level<=i.level){s.changedThisFrame=s.changedThisFrame||d[0]!==a||d.length!==1,d[0]=a,u[0]=n,d.length=1,u.length=1;return}let m,p,g,f,x=n.rectangle,_,C=i.rectangle;switch(o){case gn.WEST:for(_=(C.north-C.south)*X.EPSILON5,m=0;m<u.length&&(g=u[m],f=g.rectangle,!X.greaterThan(x.north,f.south,_));++m);for(p=m;p<u.length&&(g=u[p],f=g.rectangle,!X.greaterThanOrEquals(x.south,f.north,_));++p);break;case gn.SOUTH:for(_=(C.east-C.west)*X.EPSILON5,m=0;m<u.length&&(g=u[m],f=g.rectangle,!X.lessThan(x.west,f.east,_));++m);for(p=m;p<u.length&&(g=u[p],f=g.rectangle,!X.lessThanOrEquals(x.east,f.west,_));++p);break;case gn.EAST:for(_=(C.north-C.south)*X.EPSILON5,m=0;m<u.length&&(g=u[m],f=g.rectangle,!X.lessThan(x.south,f.north,_));++m);for(p=m;p<u.length&&(g=u[p],f=g.rectangle,!X.lessThanOrEquals(x.north,f.south,_));++p);break;case gn.NORTH:for(_=(C.east-C.west)*X.EPSILON5,m=0;m<u.length&&(g=u[m],f=g.rectangle,!X.greaterThan(x.east,f.west,_));++m);for(p=m;p<u.length&&(g=u[p],f=g.rectangle,!X.greaterThanOrEquals(x.west,f.east,_));++p);break}p-m===1?(s.changedThisFrame=s.changedThisFrame||d[m]!==a,d[m]=a,u[m]=n):(s.changedThisFrame=!0,d.splice(m,p-m,a),u.splice(m,p-m,n))}var bS=new he,lit=new he,vV=new h,g4=new h,f4=new D,p4=new D,Ud=new D;function uD(){this.height=0,this.encodedNormal=new D}function rD(e,t,n,i,o,r,s,a,c){if(l(o))return o;let d;if(l(r)&&l(s))d=(r.height+s.height)*.5;else if(l(r))d=r.height;else if(l(s))d=s.height;else if(l(a))d=a.height;else{let m=e.tile.data.tileBoundingRegion,p=0,g=0;l(m)&&(p=m.minimumHeight,g=m.maximumHeight),d=(p+g)*.5}return l0e(e,t,n,i,d,c),c}var dit={minimumHeight:0,maximumHeight:0},uit=new h,n0e=new uD,i0e=new uD,o0e=new uD,r0e=new uD,mit=typeof Uint8Array<"u"?new Uint8Array(9*9):void 0,hit={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function c0e(e,t,n,i){Ju.initialize(n,e.terrainProvider,e._imageryLayers);let o=n.data,r=o.fill,s=n.rectangle,a=t.verticalExaggeration,c=t.verticalExaggerationRelativeHeight,d=a!==1,u=n.tilingScheme.ellipsoid,m=aD(r,u,0,1,r.northwestTile,r.northwestMesh,r.northTiles,r.northMeshes,r.westTiles,r.westMeshes,o0e),p=aD(r,u,0,0,r.southwestTile,r.southwestMesh,r.westTiles,r.westMeshes,r.southTiles,r.southMeshes,n0e),g=aD(r,u,1,0,r.southeastTile,r.southeastMesh,r.southTiles,r.southMeshes,r.eastTiles,r.eastMeshes,i0e),f=aD(r,u,1,1,r.northeastTile,r.northeastMesh,r.eastTiles,r.eastMeshes,r.northTiles,r.northMeshes,r0e);m=rD(r,u,0,1,m,p,f,g,o0e),p=rD(r,u,0,0,p,m,g,f,n0e),g=rD(r,u,1,1,g,p,f,m,i0e),f=rD(r,u,1,1,f,g,m,p,r0e);let x=p.height,_=g.height,C=m.height,V=f.height,Z=Math.min(x,_,C,V),R=Math.max(x,_,C,V),G=(Z+R)*.5,W,v,P=e.getLevelMaximumGeometricError(n.level),F=u.maximumRadius-P,M=Math.acos(F/u.maximumRadius)*4;if(M*=1.5,s.width>M&&R-Z<=P){let E=new Pa({width:9,height:9,buffer:mit,structure:{heightOffset:R}}),I=hit;I.tilingScheme=n.tilingScheme,I.x=n.x,I.y=n.y,I.level=n.level,I.exaggeration=a,I.exaggerationRelativeHeight=c,r.mesh=E._createMeshSync(I)}else{let E=d,I=ce.center(s,lit);I.height=G;let w=u.cartographicToCartesian(I,uit),N=new gc(w,void 0,void 0,void 0,void 0,!0,!0,E,a,c),B=5,k;for(k=r.westMeshes,W=0,v=k.length;W<v;++W)B+=k[W].eastIndicesNorthToSouth.length;for(k=r.southMeshes,W=0,v=k.length;W<v;++W)B+=k[W].northIndicesWestToEast.length;for(k=r.eastMeshes,W=0,v=k.length;W<v;++W)B+=k[W].westIndicesSouthToNorth.length;for(k=r.northMeshes,W=0,v=k.length;W<v;++W)B+=k[W].southIndicesEastToWest.length;let O=dit;O.minimumHeight=Z,O.maximumHeight=R;let U=N.stride,J=new Float32Array(B*U),z=0,ee=z;z=sD(u,s,N,J,z,0,1,m.height,m.encodedNormal,1,O),z=lD(r,u,N,J,z,r.westTiles,r.westMeshes,gn.EAST,O);let K=z;z=sD(u,s,N,J,z,0,0,p.height,p.encodedNormal,0,O),z=lD(r,u,N,J,z,r.southTiles,r.southMeshes,gn.NORTH,O);let j=z;z=sD(u,s,N,J,z,1,0,g.height,g.encodedNormal,0,O),z=lD(r,u,N,J,z,r.eastTiles,r.eastMeshes,gn.WEST,O);let q=z;z=sD(u,s,N,J,z,1,1,f.height,f.encodedNormal,1,O),z=lD(r,u,N,J,z,r.northTiles,r.northMeshes,gn.SOUTH,O),Z=O.minimumHeight,R=O.maximumHeight;let be=Gn.fromRectangle(s,Z,R,n.tilingScheme.ellipsoid),Se=Zi.geodeticLatitudeToMercatorAngle(s.south),ae=1/(Zi.geodeticLatitudeToMercatorAngle(s.north)-Se),ye=(Zi.geodeticLatitudeToMercatorAngle(I.latitude)-Se)*ae,Te=u.geodeticSurfaceNormalCartographic(bS,g4),Ze=wn.octEncode(Te,f4),We=z;N.encode(J,z*U,be.center,D.fromElements(.5,.5,Ud),G,Ze,ye,Te),++z;let Pe=z,Ue=Pe<256?1:2,Pt=(Pe-1)*3,Ot=Pt*Ue,ht=(J.length-Pe*U)*Float32Array.BYTES_PER_ELEMENT,Ae;if(ht>=Ot){let Ve=Pe*U*Float32Array.BYTES_PER_ELEMENT;Ae=Pe<256?new Uint8Array(J.buffer,Ve,Pt):new Uint16Array(J.buffer,Ve,Pt)}else Ae=Pe<256?new Uint8Array(Pt):new Uint16Array(Pt);J=new Float32Array(J.buffer,0,Pe*U);let $e=0;for(W=0;W<Pe-2;++W)Ae[$e++]=We,Ae[$e++]=W,Ae[$e++]=W+1;Ae[$e++]=We,Ae[$e++]=W,Ae[$e++]=0;let Qe=[];for(W=K;W>=ee;--W)Qe.push(W);let je=[];for(W=j;W>=K;--W)je.push(W);let Ut=[];for(W=q;W>=j;--W)Ut.push(W);let pe=[];for(pe.push(0),W=We-1;W>=q;--W)pe.push(W);r.mesh=new Hu(N.center,J,Ae,Pt,Pe,Z,R,le.fromOrientedBoundingBox(be),_it(e,be.center,s,Z,R),N.stride,be,N,Qe,je,Ut,pe)}let b=t.context;r._destroyVertexArray(i),r.vertexArray=Ju._createVertexArrayForMesh(b,r.mesh),o.processImagery(n,e.terrainProvider,t,!0);let L=r.waterMaskTexture;if(r.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){let E=o._findAncestorTileWithTerrainData(n);l(E)&&l(E.data.waterMaskTexture)&&(r.waterMaskTexture=E.data.waterMaskTexture,++r.waterMaskTexture.referenceCount,o._computeWaterMaskTranslationAndScale(n,E,r.waterMaskTranslationAndScale))}l(L)&&(--L.referenceCount,L.referenceCount===0&&L.destroy())}function sD(e,t,n,i,o,r,s,a,c,d,u){let m=bS;m.longitude=X.lerp(t.west,t.east,r),m.latitude=X.lerp(t.south,t.north,s),m.height=a;let p=e.cartographicToCartesian(m,vV),g;n.hasGeodeticSurfaceNormals&&(g=e.geodeticSurfaceNormal(p,g4));let f=p4;return f.x=r,f.y=s,n.encode(i,o*n.stride,p,f,a,c,d,g),u.minimumHeight=Math.min(u.minimumHeight,a),u.maximumHeight=Math.max(u.maximumHeight,a),o+1}var dD=new ce;function pw(e,t,n,i){let o=e.rectangle,r=t.rectangle;t.x===0&&n.x===1&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?(o=ce.clone(e.rectangle,dD),o.west-=X.TWO_PI,o.east-=X.TWO_PI):e.x===0&&n.x===0&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&(o=ce.clone(e.rectangle,dD),o.west+=X.TWO_PI,o.east+=X.TWO_PI);let s=o.east-o.west,a=(r.west-o.west)/s,c=(r.east-o.west)/s,d=o.north-o.south,u=(r.south-o.south)/d,m=(r.north-o.south)/d,p=(n.x-a)/(c-a),g=(n.y-u)/(m-u);return Math.abs(p)<Math.EPSILON5?p=0:Math.abs(p-1)<Math.EPSILON5&&(p=1),Math.abs(g)<Math.EPSILON5?g=0:Math.abs(g-1)<Math.EPSILON5&&(g=1),i.x=p,i.y=g,i}var fit=new D;function b4(e,t,n,i,o){let r=e.encoding,s=e.vertices;if(o.height=r.decodeHeight(s,t),r.hasVertexNormals)r.getOctEncodedNormal(s,t,o.encodedNormal);else{let a=o.encodedNormal;a.x=0,a.y=0}}var pit=new D,bit=new h;function git(e,t,n,i,o,r,s,a,c,d){let u=i.encoding,m=i.vertices,p=pw(t,n,u.decodeTextureCoordinates(m,o,Ud),Ud),g=pw(t,n,u.decodeTextureCoordinates(m,r,p4),p4),f;c?f=(s-p.x)/(g.x-p.x):f=(a-p.y)/(g.y-p.y);let x=u.decodeHeight(m,o),_=u.decodeHeight(m,r),C=n.rectangle;bS.longitude=X.lerp(C.west,C.east,s),bS.latitude=X.lerp(C.south,C.north,a),d.height=bS.height=X.lerp(x,_,f);let V;if(u.hasVertexNormals){let Z=u.getOctEncodedNormal(m,o,fit),R=u.getOctEncodedNormal(m,r,pit),G=wn.octDecode(Z.x,Z.y,vV),W=wn.octDecode(R.x,R.y,bit);V=h.lerp(G,W,f,vV),h.normalize(V,V),wn.octEncode(V,d.encodedNormal)}else V=e.geodeticSurfaceNormalCartographic(bS,vV),wn.octEncode(V,d.encodedNormal)}function l0e(e,t,n,i,o,r){r.height=o;let s=t.geodeticSurfaceNormalCartographic(bS,vV);wn.octEncode(s,r.encodedNormal)}function aD(e,t,n,i,o,r,s,a,c,d,u){if(a0e(e,t,a,s,!1,n,i,u)||a0e(e,t,d,c,!0,n,i,u))return u;let p;if(y4(o,r))return n===0?i===0?p=r.eastIndicesNorthToSouth[0]:p=r.southIndicesEastToWest[0]:i===0?p=r.northIndicesWestToEast[0]:p=r.westIndicesSouthToNorth[0],b4(r,p,n,i,u),u;let g;if(n===0?i===0?g=cD(e.westMeshes,e.westTiles,gn.EAST,e.southMeshes,e.southTiles,gn.NORTH,n,i):g=cD(e.northMeshes,e.northTiles,gn.SOUTH,e.westMeshes,e.westTiles,gn.EAST,n,i):i===0?g=cD(e.southMeshes,e.southTiles,gn.NORTH,e.eastMeshes,e.eastTiles,gn.WEST,n,i):g=cD(e.eastMeshes,e.eastTiles,gn.WEST,e.northMeshes,e.northTiles,gn.SOUTH,n,i),l(g))return l0e(e,t,n,i,g,u),u}function cD(e,t,n,i,o,r,s,a){let c=s0e(e,t,!1,n,s,a),d=s0e(i,o,!0,r,s,a);return l(c)&&l(d)?(c+d)*.5:l(c)?c:d}function lD(e,t,n,i,o,r,s,a,c){for(let d=0;d<r.length;++d)o=yit(e,t,n,i,o,r[d],s[d],a,c);return o}function yit(e,t,n,i,o,r,s,a,c){let d=r.rectangle;a===gn.EAST&&e.tile.x===0?(d=ce.clone(r.rectangle,dD),d.west-=X.TWO_PI,d.east-=X.TWO_PI):a===gn.WEST&&r.x===0&&(d=ce.clone(r.rectangle,dD),d.west+=X.TWO_PI,d.east+=X.TWO_PI);let u=e.tile.rectangle,m,p;o>0&&(n.decodeTextureCoordinates(i,o-1,Ud),m=Ud.x,p=Ud.y);let g,f;switch(a){case gn.WEST:g=s.westIndicesSouthToNorth,f=!1;break;case gn.NORTH:g=s.northIndicesWestToEast,f=!0;break;case gn.EAST:g=s.eastIndicesNorthToSouth,f=!1;break;case gn.SOUTH:g=s.southIndicesEastToWest,f=!0;break}let x=r,_=e.tile,C=s.encoding,V=s.vertices,Z=n.stride,R,G;C.hasWebMercatorT&&(R=Zi.geodeticLatitudeToMercatorAngle(u.south),G=1/(Zi.geodeticLatitudeToMercatorAngle(u.north)-R));for(let W=0;W<g.length;++W){let v=g[W],P=C.decodeTextureCoordinates(V,v,Ud);pw(x,_,P,P);let F=P.x,M=P.y,b=f?F:M;if(b<0||b>1||Math.abs(F-m)<X.EPSILON5&&Math.abs(M-p)<X.EPSILON5)continue;let L=Math.abs(F)<X.EPSILON5||Math.abs(F-1)<X.EPSILON5,E=Math.abs(M)<X.EPSILON5||Math.abs(M-1)<X.EPSILON5;if(L&&E)continue;let I=C.decodePosition(V,v,vV),w=C.decodeHeight(V,v),N;C.hasVertexNormals?N=C.getOctEncodedNormal(V,v,f4):(N=f4,N.x=0,N.y=0);let B=M;if(C.hasWebMercatorT){let O=X.lerp(u.south,u.north,M);B=(Zi.geodeticLatitudeToMercatorAngle(O)-R)*G}let k;n.hasGeodeticSurfaceNormals&&(k=t.geodeticSurfaceNormal(I,g4)),n.encode(i,o*Z,I,P,w,N,B,k),c.minimumHeight=Math.min(c.minimumHeight,w),c.maximumHeight=Math.max(c.maximumHeight,w),++o}return o}function s0e(e,t,n,i,o,r){let s,a,c;n?(s=0,a=e.length,c=1):(s=e.length-1,a=-1,c=-1);for(let d=s;d!==a;d+=c){let u=e[d],m=t[d];if(!y4(m,u))continue;let p;switch(i){case gn.WEST:p=u.westIndicesSouthToNorth;break;case gn.SOUTH:p=u.southIndicesEastToWest;break;case gn.EAST:p=u.eastIndicesNorthToSouth;break;case gn.NORTH:p=u.northIndicesWestToEast;break}let g=p[n?0:p.length-1];if(l(g))return u.encoding.decodeHeight(u.vertices,g)}}function y4(e,t){return l(t)&&(!l(e.data.fill)||!e.data.fill.changedThisFrame)}function a0e(e,t,n,i,o,r,s,a){let c,d,u,m,p,g=i[o?0:n.length-1],f=n[o?0:n.length-1];if(y4(g,f)&&(r===0?s===0?(c=o?f.northIndicesWestToEast:f.eastIndicesNorthToSouth,d=o,u=o):(c=o?f.eastIndicesNorthToSouth:f.southIndicesEastToWest,d=!o,u=!1):s===0?(c=o?f.westIndicesSouthToNorth:f.northIndicesWestToEast,d=!o,u=!0):(c=o?f.southIndicesEastToWest:f.westIndicesSouthToNorth,d=o,u=!o),c.length>0)){m=o?0:c.length-1,p=c[m],f.encoding.decodeTextureCoordinates(f.vertices,p,Ud);let x=pw(g,e.tile,Ud,Ud);if(x.x===r&&x.y===s)return b4(f,p,r,s,a),!0;if(m=Lo(c,d?r:s,function(_,C){f.encoding.decodeTextureCoordinates(f.vertices,_,Ud);let V=pw(g,e.tile,Ud,Ud);return u?d?V.x-r:V.y-s:d?r-V.x:s-V.y}),m<0){if(m=~m,m>0&&m<c.length)return git(t,g,e.tile,f,c[m-1],c[m],r,s,d,a),!0}else return b4(f,c[m],r,s,a),!0}return!1}var xit=[new h,new h,new h,new h];function _it(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=xit;return h.fromRadians(n.west,n.south,o,a,c[0]),h.fromRadians(n.east,n.south,o,a,c[1]),h.fromRadians(n.west,n.north,o,a,c[2]),h.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}var FV=wV;function er(e){this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=xn.RECEIVE_ONLY,this.vertexShadowDarkness=.3,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=void 0,this.undergroundColorAlphaByDistance=void 0,this.lambertDiffuseMultiplier=0,this.materialUniformMap=void 0,this._materialUniformMap=void 0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new ge,this._removeLayerAddedListener=this._imageryLayers.layerAdded.addEventListener(er.prototype._onLayerAdded,this),this._removeLayerRemovedListener=this._imageryLayers.layerRemoved.addEventListener(er.prototype._onLayerRemoved,this),this._removeLayerMovedListener=this._imageryLayers.layerMoved.addEventListener(er.prototype._onLayerMoved,this),this._removeLayerShownListener=this._imageryLayers.layerShownOrHidden.addEventListener(er.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new ge,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new Y(0,0,.5,1),this._clippingPlanes=void 0,this._clippingPolygons=void 0,this.cartographicLimitRectangle=ce.clone(ce.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldVerticalExaggeration=void 0,this._oldVerticalExaggerationRelativeHeight=void 0}Object.defineProperties(er.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this._firstPassInitialColor=se.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){this._quadtree=e}},tilingScheme:{get:function(){if(l(this._terrainProvider))return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){this._terrainProvider!==e&&(this._terrainProvider=e,l(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){as.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Pm.setOwner(e,this,"_clippingPolygons")}}});function Sit(e,t){let n=e.loadingImagery;l(n)||(n=e.readyImagery);let i=t.loadingImagery;return l(i)||(i=t.readyImagery),n.imageryLayer._layerIndex-i.imageryLayer._layerIndex}er.prototype.update=function(e){this._imageryLayers._update()};function Tit(e,t){let n=t.creditDisplay,i=e._terrainProvider;l(i)&&l(i.credit)&&n.addCreditToNextFrame(i.credit);let o=e._imageryLayers;for(let r=0,s=o.length;r<s;++r){let a=o.get(r);a.ready&&a.show&&l(a.imageryProvider.credit)&&n.addCreditToNextFrame(a.imageryProvider.credit)}}er.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(i){i.data.imagery.sort(Sit)})),Tit(this,e);let t=this._vertexArraysToDestroy,n=t.length;for(let i=0;i<n;++i)Ju._freeVertexArray(t[i]);t.length=0};er.prototype.beginUpdate=function(e){let t=this._tilesToRenderByTextureCount;for(let o=0,r=t.length;o<r;++o){let s=t[o];l(s)&&(s.length=0)}let n=this._clippingPlanes;l(n)&&n.enabled&&n.update(e);let i=this._clippingPolygons;l(i)&&i.enabled&&(i.update(e),i.queueCommands(e)),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1};er.prototype.endUpdate=function(e){if(!l(this._renderState)){this._renderState=De.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:$a.LESS}}),this._blendRenderState=De.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:$a.LESS_OR_EQUAL},blending:un.ALPHA_BLEND});let s=Oe(this._renderState,!0);s.cull.enabled=!1,this._disableCullingRenderState=De.fromCache(s),s=Oe(this._blendRenderState,!0),s.cull.enabled=!1,this._disableCullingBlendRenderState=De.fromCache(s)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&FV.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);let t=this.quadtree,n=e.verticalExaggeration,i=e.verticalExaggerationRelativeHeight,o=this._oldVerticalExaggeration!==n||this._oldVerticalExaggerationRelativeHeight!==i;this._oldVerticalExaggeration=n,this._oldVerticalExaggerationRelativeHeight=i,o&&t.forEachLoadedTile(function(s){s.data.updateExaggeration(s,e,t)});let r=this._tilesToRenderByTextureCount;for(let s=0,a=r.length;s<a;++s){let c=r[s];if(l(c))for(let d=0,u=c.length;d<u;++d){let m=c[d],p=m.data.tileBoundingRegion;zit(this,m,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,p.minimumHeight)}}};function f0e(e,t){let n=t.globeTranslucencyState;if(n.translucent){let i=e.renderState.blending.enabled;n.pushDerivedCommands(e,i,t)}else t.commandList.push(e)}er.prototype.updateForPick=function(e){let t=this._drawCommands;for(let n=0,i=this._usedDrawCommands;n<i;++n)f0e(t[n],e)};er.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()};er.prototype.getLevelMaximumGeometricError=function(e){return l(this._terrainProvider)?this._terrainProvider.getLevelMaximumGeometricError(e):0};er.prototype.loadTile=function(e,t){let n=t.data,i=!0,o;l(n)&&(i=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===Hn.CULLED_BUT_NEEDED,o=n.terrainState),Ju.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i),n=t.data,i&&o!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)!==lr.NONE&&n.boundingVolumeSourceTile===t&&(i=!1,Ju.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i))};var Cit=new le,p0e=new ce,Vit=new ce,Zit=new he;function hD(e,t){if(t.west<t.east)return t;let n=ce.clone(t,Vit);return ce.center(e,Zit).longitude>0?n.east=X.PI:n.west=-X.PI,n}function b0e(e,t){if(t.cameraUnderground||t.globeTranslucencyState.translucent)return!0;if(e.backFaceCulling)return!1;let n=e._clippingPlanes;if(l(n)&&n.enabled)return!0;let i=e._clippingPolygons;return!!(l(i)&&i.enabled||!ce.equals(e.cartographicLimitRectangle,ce.MAX_VALUE))}er.prototype.computeTileVisibility=function(e,t,n){let i=this.computeDistanceToTile(e,t);e._distance=i;let o=b0e(this,t);if(t.fog.enabled&&!o&&X.fog(i,t.fog.density)>=1)return lr.NONE;let r=e.data,s=r.tileBoundingRegion;if(r.boundingVolumeSourceTile===void 0)return lr.PARTIAL;let a=t.cullingVolume,c=s.boundingVolume;l(c)||(c=s.boundingSphere),r.clippedByBoundaries=!1;let d=hD(e.rectangle,this.cartographicLimitRectangle),u=ce.simpleIntersection(d,e.rectangle,p0e);if(!l(u))return lr.NONE;if(ce.equals(u,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==oe.SCENE3D&&(c=Cit,le.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,s.minimumHeight,s.maximumHeight,c),h.fromElements(c.center.z,c.center.x,c.center.y,c.center),t.mode===oe.MORPHING&&l(r.renderedMesh)&&(c=le.union(s.boundingSphere,c,c))),!l(c))return lr.PARTIAL;let m=this._clippingPlanes;if(l(m)&&m.enabled){let _=m.computeIntersectionWithBoundingVolume(c);if(e.isClipped=_!==Ht.INSIDE,_===Ht.OUTSIDE)return lr.NONE}let p=this._clippingPolygons;if(l(p)&&p.enabled){let _=p.computeIntersectionWithBoundingVolume(s);e.isClipped=_!==Ht.OUTSIDE}let g,f=a.computeVisibility(c);if(f===Ht.OUTSIDE?g=lr.NONE:f===Ht.INTERSECTING?g=lr.PARTIAL:f===Ht.INSIDE&&(g=lr.FULL),g===lr.NONE)return g;let x=t.mode===oe.SCENE3D&&t.camera.frustum instanceof sn;if(t.mode===oe.SCENE3D&&!x&&l(n)&&!o){let _=r.occludeePointInScaledSpace;return!l(_)||n.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(_,s.minimumHeight)?g:lr.NONE}return g};er.prototype.canRefine=function(e){return l(e.data.terrainData)?!0:this.terrainProvider.getTileDataAvailable(e.x*2,e.y*2,e.level+1)!==void 0};var Lit=[],Rit=[];er.prototype.canRenderWithoutLosingDetail=function(e,t){let n=e.data,i=Lit;i.length=this._imageryLayers.length;let o=!1,r=!1,s;l(n)&&(o=n.terrainState===ao.READY,r=!0,s=n.imagery);let a,c;for(a=0,c=i.length;a<c;++a)i[a]=r;if(l(s))for(a=0,c=s.length;a<c;++a){let m=s[a],p=m.loadingImagery,g=!l(p)||p.state===ai.FAILED||p.state===ai.INVALID,f=(m.loadingImagery||m.readyImagery).imageryLayer._layerIndex;i[f]=g&&i[f]}let d=this.quadtree._lastSelectionFrameNumber,u=Rit;for(u.length=0,u.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);u.length>0;){let m=u.pop(),p=m._lastSelectionResultFrame===d?m._lastSelectionResult:Hn.NONE;if(p===Hn.RENDERED){let g=m.data;if(!l(g))continue;if(!o&&m.data.terrainState===ao.READY)return!1;let f=m.data.imagery;for(a=0,c=f.length;a<c;++a){let x=f[a],_=x.loadingImagery,C=!l(_)||_.state===ai.FAILED||_.state===ai.INVALID,V=(x.loadingImagery||x.readyImagery).imageryLayer._layerIndex;if(C&&!i[V])return!1}}else p===Hn.REFINED&&u.push(m.southwestChild,m.southeastChild,m.northwestChild,m.northeastChild)}return!0};var Git=new h;er.prototype.computeTileLoadPriority=function(e,t){let n=e.data;if(n===void 0)return 0;let i=n.tileBoundingRegion.boundingVolume;if(i===void 0)return 0;let o=t.camera.positionWC,r=t.camera.directionWC,s=h.subtract(i.center,o,Git),a=h.magnitude(s);return a<X.EPSILON5?0:(h.divideByScalar(s,a,s),(1-h.dot(s,r))*e._distance)};var d0e=new A,mD=new A,Eit=new se,Wit=new se,Iit=new se,Xit=new h,u0e=new h,Pit=new h,vit=new h;er.prototype.showTileThisFrame=function(e,t){let n=0,i=e.data.imagery;for(let a=0,c=i.length;a<c;++a){let d=i[a];l(d.readyImagery)&&d.readyImagery.imageryLayer.alpha!==0&&++n}let o=this._tilesToRenderByTextureCount[n];l(o)||(o=[],this._tilesToRenderByTextureCount[n]=o),o.push(e);let r=e.data;l(r.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;let s=this._debug;++s.tilesRendered,s.texturesRendered+=n};var wit=[new h,new h,new h,new h];function m0e(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=wit;return h.fromRadians(n.west,n.south,o,a,c[0]),h.fromRadians(n.east,n.south,o,a,c[1]),h.fromRadians(n.west,n.north,o,a,c[2]),h.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}er.prototype.computeDistanceToTile=function(e,t){Fit(e,this,t);let n=e.data;if(n.boundingVolumeSourceTile===void 0)return 9999999999;let o=n.tileBoundingRegion,r=o.minimumHeight,s=o.maximumHeight;if(n.boundingVolumeSourceTile!==e){let c=t.camera.positionCartographic.height,d=Math.abs(c-r),u=Math.abs(c-s);d>u?(o.minimumHeight=r,o.maximumHeight=r):(o.minimumHeight=s,o.maximumHeight=s)}let a=o.distanceToCamera(t);return o.minimumHeight=r,o.maximumHeight=s,a};function Fit(e,t,n){let i=e.data;i===void 0&&(i=e.data=new Ju);let o=e.tilingScheme.ellipsoid;i.tileBoundingRegion===void 0&&(i.tileBoundingRegion=new Wu({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:o,minimumHeight:0,maximumHeight:0}));let r=i.tileBoundingRegion,s=r.minimumHeight,a=r.maximumHeight,c=!1,d=e,u=i.mesh,m=i.terrainData;if(u!==void 0&&u.minimumHeight!==void 0&&u.maximumHeight!==void 0)r.minimumHeight=u.minimumHeight,r.maximumHeight=u.maximumHeight,c=!0;else if(m!==void 0&&m._minimumHeight!==void 0&&m._maximumHeight!==void 0)r.minimumHeight=m._minimumHeight,r.maximumHeight=m._maximumHeight;else{r.minimumHeight=Number.NaN,r.maximumHeight=Number.NaN;let p=e.parent;for(;p!==void 0;){let g=p.data;if(g!==void 0){let f=g.mesh,x=g.terrainData;if(f!==void 0&&f.minimumHeight!==void 0&&f.maximumHeight!==void 0){r.minimumHeight=f.minimumHeight,r.maximumHeight=f.maximumHeight;break}else if(x!==void 0&&x._minimumHeight!==void 0&&x._maximumHeight!==void 0){r.minimumHeight=x._minimumHeight,r.maximumHeight=x._maximumHeight;break}}p=p.parent}d=p}if(d!==void 0){let p=n.verticalExaggeration,g=n.verticalExaggerationRelativeHeight;if(p!==1&&(c=!1,r.minimumHeight=fr.getHeight(r.minimumHeight,p,g),r.maximumHeight=fr.getHeight(r.maximumHeight,p,g)),c)i.boundingVolumeIsFromMesh||(r._orientedBoundingBox=Gn.clone(u.orientedBoundingBox,r._orientedBoundingBox),r._boundingSphere=le.clone(u.boundingSphere3D,r._boundingSphere),i.occludeePointInScaledSpace=h.clone(u.occludeePointInScaledSpace,i.occludeePointInScaledSpace),l(i.occludeePointInScaledSpace)||(i.occludeePointInScaledSpace=m0e(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace)));else{let x=r._orientedBoundingBox===void 0||r._boundingSphere===void 0;(r.minimumHeight!==s||r.maximumHeight!==a||x)&&(r.computeBoundingVolumes(o),i.occludeePointInScaledSpace=m0e(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace))}i.boundingVolumeSourceTile=d,i.boundingVolumeIsFromMesh=c}else i.boundingVolumeSourceTile=void 0,i.boundingVolumeIsFromMesh=!1}er.prototype.isDestroyed=function(){return!1};er.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),this._removeLayerAddedListener=this._removeLayerAddedListener&&this._removeLayerAddedListener(),this._removeLayerRemovedListener=this._removeLayerRemovedListener&&this._removeLayerRemovedListener(),this._removeLayerMovedListener=this._removeLayerMovedListener&&this._removeLayerMovedListener(),this._removeLayerShownListener=this._removeLayerShownListener&&this._removeLayerShownListener(),me(this)};function Ait(e,t,n){return function(i){let o,r,s=-1,a=i.data.imagery,c=a.length,d;for(d=0;d<c;++d)if(o=a[d],r=y(o.readyImagery,o.loadingImagery),r.imageryLayer===t){s=d;break}if(s!==-1){let u=s+e;if(o=a[u],r=l(o)?y(o.readyImagery,o.loadingImagery):void 0,!l(r)||r.imageryLayer!==t)return!t._createTileImagerySkeletons(i,n,u);for(d=s;d<u;++d)a[d].freeResources();a.splice(s,e)}return!0}}er.prototype._onLayerAdded=function(e,t){if(!this.isDestroyed()&&e.show){let n=this._terrainProvider,i=this,o=this._imageryLayersUpdatedEvent,r=function(){e._imageryCache={},i._quadtree.forEachLoadedTile(function(s){if(l(s._loadedCallbacks[e._layerIndex]))return;let a,c=s.data.imagery,d=c.length,u=-1,m=0;for(a=0;a<d;++a){let g=c[a];if(y(g.readyImagery,g.loadingImagery).imageryLayer===e)u===-1&&(u=a),++m;else if(u!==-1)break}if(u===-1)return;let p=u+m;e._createTileImagerySkeletons(s,n,p)&&(s._loadedCallbacks[e._layerIndex]=Ait(m,e,n),s.state=zs.LOADING)})};if(e.ready){let s=e.imageryProvider;s._reload=r}this._quadtree.forEachLoadedTile(function(s){e._createTileImagerySkeletons(s,n)&&(s.state=zs.LOADING,s.level!==0&&(s._lastSelectionResultFrame!==i.quadtree._lastSelectionFrameNumber||s._lastSelectionResult!==Hn.RENDERED)&&(s.renderable=!1))}),this._layerOrderChanged=!0,o.raiseEvent()}};er.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile(function(n){let i=n.data.imagery,o=-1,r=0;for(let s=0,a=i.length;s<a;++s){let c=i[s],d=c.loadingImagery;if(l(d)||(d=c.readyImagery),d.imageryLayer===e)o===-1&&(o=s),c.freeResources(),++r;else if(o!==-1)break}o!==-1&&i.splice(o,r)}),l(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()};er.prototype._onLayerMoved=function(e,t,n){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()};er.prototype._onLayerShownOrHidden=function(e,t,n){n?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var Mit=new A,Nit=new A;function h0e(e,t){let n={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_atmosphereLightIntensity:function(){return this.properties.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return this.properties.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return this.properties.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return this.properties.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return this.properties.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return this.properties.atmosphereMieAnisotropy},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_verticalExaggerationAndRelativeHeight:function(){return this.properties.verticalExaggerationAndRelativeHeight},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){let i=e.context.uniformState.view,o=A.multiplyByPoint(i,this.properties.rtc,u0e);return A.setTranslation(i,o,d0e),d0e},u_modifiedModelViewProjection:function(){let i=e.context.uniformState.view,o=e.context.uniformState.projection,r=A.multiplyByPoint(i,this.properties.rtc,u0e);return A.setTranslation(i,r,mD),A.multiply(o,mD,mD),mD},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureNightAlpha:function(){return this.properties.dayTextureNightAlpha},u_dayTextureDayAlpha:function(){return this.properties.dayTextureDayAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){let i=t._clippingPlanes;return l(i)&&l(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){let i=t._clippingPlanes,o=l(i)?A.multiply(e.context.uniformState.view,i.modelMatrix,Mit):A.IDENTITY;return A.inverseTranspose(o,Nit)},u_clippingPlanesEdgeStyle:function(){let i=this.properties.clippingPlanesEdgeColor;return i.alpha=this.properties.clippingPlanesEdgeWidth,i},u_clippingDistance:function(){let i=t._clippingPolygons.clippingTexture;return l(i)?i:e.context.defaultTexture},u_clippingExtents:function(){let i=t._clippingPolygons.extentsTexture;return l(i)?i:e.context.defaultTexture},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},u_lambertDiffuseMultiplier:function(){return this.properties.lambertDiffuseMultiplier},u_vertexShadowDarkness:function(){return this.properties.vertexShadowDarkness},properties:{initialColor:new se(0,0,.5,1),fillHighlightColor:new Y(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new D(65e5,9e6),nightFadeDistance:new D(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new h(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new h(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new h,center3D:void 0,rtc:new h,modifiedModelView:new A,tileRectangle:new se,verticalExaggerationAndRelativeHeight:new D(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new D,southMercatorYAndOneOverHeight:new D,waterMask:void 0,waterMaskTranslationAndScale:new se,minMaxHeight:new D,scaleAndBias:new A,clippingPlanesEdgeColor:Y.clone(Y.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new se,frontFaceAlphaByDistance:new se,backFaceAlphaByDistance:new se,localizedTranslucencyRectangle:new se,undergroundColor:Y.clone(Y.TRANSPARENT),undergroundColorAlphaByDistance:new se,lambertDiffuseMultiplier:0,vertexShadowDarkness:0}};return l(t.materialUniformMap)?xt(n,t.materialUniformMap):n}function Uit(e,t,n){let i=n.data,o,r;if(l(i.vertexArray)?(o=i.mesh,r=i.vertexArray):l(i.fill)&&l(i.fill.vertexArray)&&(o=i.fill.mesh,r=i.fill.vertexArray),!(!l(o)||!l(r))){if(l(i.wireframeVertexArray)){if(i.wireframeVertexArray.mesh===o)return;i.wireframeVertexArray.destroy(),i.wireframeVertexArray=void 0}i.wireframeVertexArray=kit(e,r,o),i.wireframeVertexArray.mesh=o}}function kit(e,t,n){let o={indices:n.indices,primitiveType:Fe.TRIANGLES};An.toWireframe(o);let r=o.indices,s=ft.createIndexBuffer({context:e,typedArray:r,usage:Ne.STATIC_DRAW,indexDatatype:Me.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new ei({context:e,attributes:t._attributes,indexBuffer:s})}var g0e,y0e,fD;(function(){let e=new Tt({geometry:fm.fromDimensions({dimensions:new h(2,2,2)})}),t=new Tt({geometry:new db({radius:1})}),n=new A,i,o;function r(s){return new En({geometryInstances:s,appearance:new ln({translucent:!1,flat:!0}),asynchronous:!1})}g0e=function(s,a){return s===i||(fD(),i=s,n=A.fromRotationTranslation(s.halfAxes,s.center,n),e.modelMatrix=n,e.attributes.color=zt.fromColor(a),o=r(e)),o},y0e=function(s,a){return s===i||(fD(),i=s,n=A.fromTranslation(s.center,n),n=A.multiplyByUniformScale(n,s.radius,n),t.modelMatrix=n,t.attributes.color=zt.fromColor(a),o=r(t)),o},fD=function(){l(o)&&(o.destroy(),o=void 0,i=void 0)}})();var Dit=new se(0,0,0,0),Bit={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applyDayNightAlpha:void 0,applySplit:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,enableClippingPolygons:void 0,clippingPolygons:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0,hasGeodeticSurfaceNormals:void 0,hasExaggeration:void 0},Yit=Y.TRANSPARENT,Oit=new Ft;function zit(e,t,n){let i=t.data;l(i.vertexArray)||(i.fill===void 0&&(i.fill=new FV(t)),i.fill.update(e,n));let o=n.creditDisplay,r=i.terrainData;if(l(r)&&l(r.credits)){let pe=r.credits;for(let Ve=0,Dt=pe.length;Ve<Dt;++Ve)o.addCreditToNextFrame(pe[Ve])}let s=Mt.maximumTextureImageUnits,a=i.waterMaskTexture,c=i.waterMaskTranslationAndScale;!l(a)&&l(i.fill)&&(a=i.fill.waterMaskTexture,c=i.fill.waterMaskTranslationAndScale);let d=n.cameraUnderground,u=n.globeTranslucencyState,m=u.translucent,p=u.frontFaceAlphaByDistance,g=u.backFaceAlphaByDistance,f=u.rectangle,x=y(e.undergroundColor,Yit),_=y(e.undergroundColorAlphaByDistance,Oit),C=b0e(e,n)&&n.mode===oe.SCENE3D&&x.alpha>0&&(_.nearValue>0||_.farValue>0),V=e.lambertDiffuseMultiplier,Z=e.vertexShadowDarkness,R=e.hasWaterMask&&l(a),G=e.oceanNormalMap,W=R&&l(G),v=e.terrainProvider,P=l(v)&&e.terrainProvider.hasVertexNormals,F=n.fog.enabled&&n.fog.renderable&&!d,M=e.showGroundAtmosphere&&n.mode===oe.SCENE3D,b=xn.castShadows(e.shadows)&&!m,L=xn.receiveShadows(e.shadows)&&!m,E=e.hueShift,I=e.saturationShift,w=e.brightnessShift,N=!(X.equalsEpsilon(E,0,X.EPSILON7)&&X.equalsEpsilon(I,0,X.EPSILON7)&&X.equalsEpsilon(w,0,X.EPSILON7)),B=!1;if(M){let pe=h.magnitude(n.camera.positionWC),Ve=e.nightFadeOutDistance;B=pe>Ve}R&&--s,W&&--s,l(n.shadowState)&&n.shadowState.shadowsEnabled&&--s,l(e.clippingPlanes)&&e.clippingPlanes.enabled&&--s,l(e.clippingPolygons)&&e.clippingPolygons.enabled&&(--s,--s),s-=u.numberOfTextureUniforms;let k=i.renderedMesh,O=k.center,U=k.encoding,J=i.tileBoundingRegion,z=n.verticalExaggeration,ee=n.verticalExaggerationRelativeHeight,K=z!==1,j=U.hasGeodeticSurfaceNormals,q=Eit,be=0,Se=0,ae=0,ye=0,Te=!1;if(n.mode!==oe.SCENE3D){let pe=n.mapProjection,Ve=pe.project(ce.southwest(t.rectangle),Pit),Dt=pe.project(ce.northeast(t.rectangle),vit);if(q.x=Ve.x,q.y=Ve.y,q.z=Dt.x,q.w=Dt.y,n.mode!==oe.MORPHING&&(O=Xit,O.x=0,O.y=(q.z+q.x)*.5,O.z=(q.w+q.y)*.5,q.x-=O.y,q.y-=O.z,q.z-=O.y,q.w-=O.z),n.mode===oe.SCENE2D&&U.quantization===Os.BITS12){let bt=1/(Math.pow(2,12)-1)*.5,li=(q.z-q.x)*bt,Vo=(q.w-q.y)*bt;q.x-=li,q.y-=Vo,q.z+=li,q.w+=Vo}pe instanceof Zi&&(be=t.rectangle.south,Se=t.rectangle.north,ae=Zi.geodeticLatitudeToMercatorAngle(be),ye=1/(Zi.geodeticLatitudeToMercatorAngle(Se)-ae),Te=!0)}let Ze=Bit;Ze.frameState=n,Ze.surfaceTile=i,Ze.showReflectiveOcean=R,Ze.showOceanWaves=W,Ze.enableLighting=e.enableLighting,Ze.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,Ze.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,Ze.showGroundAtmosphere=M,Ze.atmosphereLightIntensity=e.atmosphereLightIntensity,Ze.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,Ze.atmosphereMieCoefficient=e.atmosphereMieCoefficient,Ze.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,Ze.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,Ze.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,Ze.perFragmentGroundAtmosphere=B,Ze.hasVertexNormals=P,Ze.useWebMercatorProjection=Te,Ze.clippedByBoundaries=i.clippedByBoundaries,Ze.hasGeodeticSurfaceNormals=j,Ze.hasExaggeration=K;let We=i.imagery,Pe=0,Ue=We.length,Pt=e.showSkirts&&!d&&!m,Ot=e.backFaceCulling&&!d&&!m,ht=Ot?e._renderState:e._disableCullingRenderState,Ae=Ot?e._blendRenderState:e._disableCullingBlendRenderState,$e=ht,Qe=e._firstPassInitialColor,je=n.context;if(l(e._debug.boundingSphereTile)||fD(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;let pe=e._drawCommands.length;for(let Ve=0;Ve<pe;++Ve)e._uniformMaps[Ve]=h0e(n,e)}do{let pe=0,Ve,Dt;if(e._drawCommands.length<=e._usedDrawCommands?(Ve=new tt,Ve.owner=t,Ve.cull=!1,Ve.boundingVolume=new le,Ve.orientedBoundingBox=void 0,Dt=h0e(n,e),e._drawCommands.push(Ve),e._uniformMaps.push(Dt)):(Ve=e._drawCommands[e._usedDrawCommands],Dt=e._uniformMaps[e._usedDrawCommands]),Ve.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){let xa=J.boundingVolume,ro=J.boundingSphere;l(xa)?g0e(xa,Y.RED).update(n):l(ro)&&y0e(ro,Y.RED).update(n)}let bt=Dt.properties;se.clone(Qe,bt.initialColor),bt.oceanNormalMap=G,bt.lightingFadeDistance.x=e.lightingFadeOutDistance,bt.lightingFadeDistance.y=e.lightingFadeInDistance,bt.nightFadeDistance.x=e.nightFadeOutDistance,bt.nightFadeDistance.y=e.nightFadeInDistance,bt.atmosphereLightIntensity=e.atmosphereLightIntensity,bt.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,bt.atmosphereMieCoefficient=e.atmosphereMieCoefficient,bt.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,bt.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,bt.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,bt.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;let li=d?g:p,Vo=d?p:g;l(li)&&(se.fromElements(li.near,li.nearValue,li.far,li.farValue,bt.frontFaceAlphaByDistance),se.fromElements(Vo.near,Vo.nearValue,Vo.far,Vo.farValue,bt.backFaceAlphaByDistance)),se.fromElements(_.near,_.nearValue,_.far,_.farValue,bt.undergroundColorAlphaByDistance),Y.clone(x,bt.undergroundColor),bt.lambertDiffuseMultiplier=V,bt.vertexShadowDarkness=Z;let Gs=!l(i.vertexArray)&&l(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;Gs&&Y.clone(e.fillHighlightColor,bt.fillHighlightColor),bt.verticalExaggerationAndRelativeHeight.x=z,bt.verticalExaggerationAndRelativeHeight.y=ee,bt.center3D=k.center,h.clone(O,bt.rtc),se.clone(q,bt.tileRectangle),bt.southAndNorthLatitude.x=be,bt.southAndNorthLatitude.y=Se,bt.southMercatorYAndOneOverHeight.x=ae,bt.southMercatorYAndOneOverHeight.y=ye;let Hs=Wit,Ur=hD(t.rectangle,e.cartographicLimitRectangle),ts=Iit,ke=hD(t.rectangle,f);h.fromElements(E,I,w,bt.hsbShift);let ot=t.rectangle,nt=1/ot.width,qe=1/ot.height;Hs.x=(Ur.west-ot.west)*nt,Hs.y=(Ur.south-ot.south)*qe,Hs.z=(Ur.east-ot.west)*nt,Hs.w=(Ur.north-ot.south)*qe,se.clone(Hs,bt.localizedCartographicLimitRectangle),ts.x=(ke.west-ot.west)*nt,ts.y=(ke.south-ot.south)*qe,ts.z=(ke.east-ot.west)*nt,ts.w=(ke.north-ot.south)*qe,se.clone(ts,bt.localizedTranslucencyRectangle);let dt=F&&X.fog(t._distance,n.fog.density)>X.EPSILON3;N=N&&(dt||M);let Bt=!1,Zn=!1,Zo=!1,ir=!1,Ua=!1,ka=!1,oo=!1,Yi=!1,hs=!1,xr=!1;for(;pe<s&&Pe<Ue;){let xa=We[Pe],ro=xa.readyImagery;if(++Pe,!l(ro)||ro.imageryLayer.alpha===0)continue;let RZ=xa.useWebMercatorT?ro.textureWebMercator:ro.texture,$n=ro.imageryLayer;l(xa.textureTranslationAndScale)||(xa.textureTranslationAndScale=$n._calculateTextureTranslationAndScale(t,xa)),bt.dayTextures[pe]=RZ,bt.dayTextureTranslationAndScale[pe]=xa.textureTranslationAndScale,bt.dayTextureTexCoordsRectangle[pe]=xa.textureCoordinateRectangle,bt.dayTextureUseWebMercatorT[pe]=xa.useWebMercatorT,bt.dayTextureAlpha[pe]=$n.alpha,ka=ka||bt.dayTextureAlpha[pe]!==1,bt.dayTextureNightAlpha[pe]=$n.nightAlpha,oo=oo||bt.dayTextureNightAlpha[pe]!==1,bt.dayTextureDayAlpha[pe]=$n.dayAlpha,oo=oo||bt.dayTextureDayAlpha[pe]!==1,bt.dayTextureBrightness[pe]=$n.brightness,Bt=Bt||bt.dayTextureBrightness[pe]!==ma.DEFAULT_BRIGHTNESS,bt.dayTextureContrast[pe]=$n.contrast,Zn=Zn||bt.dayTextureContrast[pe]!==ma.DEFAULT_CONTRAST,bt.dayTextureHue[pe]=$n.hue,Zo=Zo||bt.dayTextureHue[pe]!==ma.DEFAULT_HUE,bt.dayTextureSaturation[pe]=$n.saturation,ir=ir||bt.dayTextureSaturation[pe]!==ma.DEFAULT_SATURATION,bt.dayTextureOneOverGamma[pe]=1/$n.gamma,Ua=Ua||bt.dayTextureOneOverGamma[pe]!==1/ma.DEFAULT_GAMMA,bt.dayTextureSplit[pe]=$n.splitDirection,Yi=Yi||bt.dayTextureSplit[pe]!==0;let Gc=bt.dayTextureCutoutRectangles[pe];if(l(Gc)||(Gc=bt.dayTextureCutoutRectangles[pe]=new se),se.clone(se.ZERO,Gc),l($n.cutoutRectangle)){let Sr=hD(ot,$n.cutoutRectangle),ns=ce.simpleIntersection(Sr,ot,p0e);hs=l(ns)||hs,Gc.x=(Sr.west-ot.west)*nt,Gc.y=(Sr.south-ot.south)*qe,Gc.z=(Sr.east-ot.west)*nt,Gc.w=(Sr.north-ot.south)*qe}let td=bt.colorsToAlpha[pe];l(td)||(td=bt.colorsToAlpha[pe]=new se);let My=l($n.colorToAlpha)&&$n.colorToAlphaThreshold>0;if(xr=xr||My,My){let Sr=$n.colorToAlpha;td.x=Sr.red,td.y=Sr.green,td.z=Sr.blue,td.w=$n.colorToAlphaThreshold}else td.w=-1;if(l(ro.credits)){let Sr=ro.credits;for(let ns=0,f0=Sr.length;ns<f0;++ns)o.addCreditToNextFrame(Sr[ns])}++pe}bt.dayTextures.length=pe,bt.waterMask=a,se.clone(c,bt.waterMaskTranslationAndScale),bt.minMaxHeight.x=U.minimumHeight,bt.minMaxHeight.y=U.maximumHeight,A.clone(U.matrix,bt.scaleAndBias);let ul=e._clippingPlanes,Bo=l(ul)&&ul.enabled&&t.isClipped;Bo&&(bt.clippingPlanesEdgeColor=Y.clone(ul.edgeColor,bt.clippingPlanesEdgeColor),bt.clippingPlanesEdgeWidth=ul.edgeWidth);let _r=e._clippingPolygons,h0=l(_r)&&_r.enabled&&t.isClipped;Ze.numberOfDayTextures=pe,Ze.applyBrightness=Bt,Ze.applyContrast=Zn,Ze.applyHue=Zo,Ze.applySaturation=ir,Ze.applyGamma=Ua,Ze.applyAlpha=ka,Ze.applyDayNightAlpha=oo,Ze.applySplit=Yi,Ze.enableFog=dt,Ze.enableClippingPlanes=Bo,Ze.clippingPlanes=ul,Ze.enableClippingPolygons=h0,Ze.clippingPolygons=_r,Ze.hasImageryLayerCutout=hs,Ze.colorCorrect=N,Ze.highlightFillTile=Gs,Ze.colorToAlpha=xr,Ze.showUndergroundColor=C,Ze.translucent=m;let Rc=i.renderedMesh.indices.length;Pt||(Rc=i.renderedMesh.indexCountWithoutSkirts),Ve.shaderProgram=e._surfaceShaderSet.getShaderProgram(Ze),Ve.castShadows=b,Ve.receiveShadows=L,Ve.renderState=$e,Ve.primitiveType=Fe.TRIANGLES,Ve.vertexArray=i.vertexArray||i.fill.vertexArray,Ve.count=Rc,Ve.uniformMap=Dt,Ve.pass=Le.GLOBE,e._debug.wireframe&&(Uit(je,e,t),l(i.wireframeVertexArray)&&(Ve.vertexArray=i.wireframeVertexArray,Ve.primitiveType=Fe.LINES,Ve.count=Rc*2));let Da=Ve.boundingVolume,ur=Ve.orientedBoundingBox;n.mode!==oe.SCENE3D?(le.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,J.minimumHeight,J.maximumHeight,Da),h.fromElements(Da.center.z,Da.center.x,Da.center.y,Da.center),n.mode===oe.MORPHING&&(Da=le.union(J.boundingSphere,Da,Da))):(Ve.boundingVolume=le.clone(J.boundingSphere,Da),Ve.orientedBoundingBox=Gn.clone(J.boundingVolume,ur)),Ve.dirty=!0,m&&u.updateDerivedCommands(Ve,n),f0e(Ve,n),$e=Ae,Qe=Dit}while(Pe<Ue)}var bw=er;var DTi=S(T(),1);function x0e(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=ce.clone(ce.MAX_VALUE)}Object.defineProperties(x0e.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){this._frontFaceAlphaByDistance=Ft.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){this._backFaceAlphaByDistance=Ft.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){l(e)||(e=ce.clone(ce.MAX_VALUE)),ce.clone(e,this._rectangle)}}});var gw=x0e;var jTi=S(T(),1);function Ls(){this._layers=[],this.layerAdded=new ge,this.layerRemoved=new ge,this.layerMoved=new ge,this.layerShownOrHidden=new ge}Object.defineProperties(Ls.prototype,{length:{get:function(){return this._layers.length}}});Ls.prototype.add=function(e,t){l(t)?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t);let i=e.readyEvent.addEventListener(()=>{this.layerShownOrHidden.raiseEvent(e,e._layerIndex,e.show),i()})};Ls.prototype.addImageryProvider=function(e,t){let n=new ma(e);return this.add(n,t),n};Ls.prototype.remove=function(e,t){t=y(t,!0);let n=this._layers.indexOf(e);return n!==-1?(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0):!1};Ls.prototype.removeAll=function(e){e=y(e,!0);let t=this._layers;for(let n=0,i=t.length;n<i;n++){let o=t[n];this.layerRemoved.raiseEvent(o,n),e&&o.destroy()}this._layers=[]};Ls.prototype.contains=function(e){return this.indexOf(e)!==-1};Ls.prototype.indexOf=function(e){return this._layers.indexOf(e)};Ls.prototype.get=function(e){return this._layers[e]};function pD(e,t){return e.indexOf(t)}function _0e(e,t,n){let i=e._layers;if(t=X.clamp(t,0,i.length-1),n=X.clamp(n,0,i.length-1),t===n)return;let o=i[t];i[t]=i[n],i[n]=o,e._update(),e.layerMoved.raiseEvent(o,n,t)}Ls.prototype.raise=function(e){let t=pD(this._layers,e);_0e(this,t,t+1)};Ls.prototype.lower=function(e){let t=pD(this._layers,e);_0e(this,t,t-1)};Ls.prototype.raiseToTop=function(e){let t=pD(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))};Ls.prototype.lowerToBottom=function(e){let t=pD(this._layers,e);t!==0&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var Kit=new ce;function S0e(e,t,n,i){let o=e.globe._surface._tilesToRender,r;for(let a=0;!l(r)&&a<o.length;++a){let c=o[a];ce.contains(c.rectangle,t)&&(r=c)}if(!l(r))return;let s=r.data.imagery;for(let a=s.length-1;a>=0;--a){let c=s[a],d=c.readyImagery;if(!l(d)||!d.imageryLayer.ready)continue;let u=d.imageryLayer.imageryProvider;if(n&&!l(u.pickFeatures)||!ce.contains(d.rectangle,t))continue;let m=Kit,p=1/1024;m.west=X.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.x-p),m.east=X.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.z+p),m.south=X.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.y-p),m.north=X.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.w+p),ce.contains(m,t)&&i(d)}}Ls.prototype.pickImageryLayers=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[];if(S0e(t,i,!1,function(r){o.push(r.imageryLayer)}),o.length!==0)return o};Ls.prototype.pickImageryLayerFeatures=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[],r=[];if(S0e(t,i,!0,function(s){if(!s.imageryLayer.ready)return;let c=s.imageryLayer.imageryProvider.pickFeatures(s.x,s.y,s.level,i.longitude,i.latitude);l(c)&&(o.push(c),r.push(s.imageryLayer))}),o.length!==0)return Promise.all(o).then(function(s){let a=[];for(let c=0;c<s.length;++c){let d=s[c],u=r[c];if(l(d)&&d.length>0)for(let m=0;m<d.length;++m){let p=d[m];p.imageryLayer=u,l(p.position)||(p.position=i),a.push(p)}}return a})};Ls.prototype.queueReprojectionCommands=function(e){let t=this._layers;for(let n=0,i=t.length;n<i;++n)t[n].queueReprojectionCommands(e)};Ls.prototype.cancelReprojections=function(){let e=this._layers;for(let t=0,n=e.length;t<n;++t)e[t].cancelReprojections()};Ls.prototype.isDestroyed=function(){return!1};Ls.prototype.destroy=function(){return this.removeAll(!0),me(this)};Ls.prototype._update=function(){let e=!0,t=this._layers,n,i,o,r;for(o=0,r=t.length;o<r;++o)i=t[o],i._layerIndex=o,i.show?(i._isBaseLayer=e,e=!1):i._isBaseLayer=!1,i.show!==i._show&&(l(i._show)&&(l(n)||(n=[]),n.push(i)),i._show=i.show);if(l(n))for(o=0,r=n.length;o<r;++o)i=n[o],this.layerShownOrHidden.raiseEvent(i,i._layerIndex,i.show)};var yw=Ls;var ICi=S(T(),1);var tCi=S(T(),1);function T0e(e){this._ellipsoid=new _b(e.ellipsoid,h.ZERO)}Object.defineProperties(T0e.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var xw=T0e;var aCi=S(T(),1);function ol(e){this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=Hn.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=zs.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}ol.createLevelZeroTiles=function(e){let t=e.getNumberOfXTilesAtLevel(0),n=e.getNumberOfYTilesAtLevel(0),i=new Array(t*n),o=0;for(let r=0;r<n;++r)for(let s=0;s<t;++s)i[o++]=new ol({tilingScheme:e,x:s,y:r,level:0});return i};ol.prototype._updateCustomData=function(e,t,n){let i=this.customData,o,r,s;if(l(t)&&l(n)){for(i=i.filter(function(a){return n.indexOf(a)===-1}),this._customData=i,s=this._rectangle,o=0;o<t.length;++o)r=t[o],ce.contains(s,r.positionCartographic)&&i.push(r);this._frameUpdated=e}else{let a=this._parent;if(l(a)&&this._frameUpdated!==a._frameUpdated){i.length=0,s=this._rectangle;let c=a.customData;for(o=0;o<c.length;++o)r=c[o],ce.contains(s,r.positionCartographic)&&i.push(r);this._frameUpdated=a._frameUpdated}}};Object.defineProperties(ol.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return l(this._southwestChild)||(this._southwestChild=new ol({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return l(this._southeastChild)||(this._southeastChild=new ol({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return l(this._northwestChild)||(this._northwestChild=new ol({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return l(this._northeastChild)||(this._northeastChild=new ol({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<zs.DONE}},eligibleForUnloading:{get:function(){let e=!0;return l(this.data)&&(e=this.data.eligibleForUnloading,l(e)||(e=!0)),e}}});ol.prototype.findLevelZeroTile=function(e,t,n){let i=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=i:t>=i&&(t-=i),!(n<0||n>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter(function(o){return o.x===t&&o.y===n})[0]};ol.prototype.findTileToWest=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;let n=t.findTileToWest(e);if(n!==void 0)return t.southwestChild===this?n.southeastChild:n.northeastChild};ol.prototype.findTileToEast=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;let n=t.findTileToEast(e);if(n!==void 0)return t.southeastChild===this?n.southwestChild:n.northwestChild};ol.prototype.findTileToSouth=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;let n=t.findTileToSouth(e);if(n!==void 0)return t.southwestChild===this?n.northwestChild:n.northeastChild};ol.prototype.findTileToNorth=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;let n=t.findTileToNorth(e);if(n!==void 0)return t.northwestChild===this?n.southwestChild:n.southeastChild};ol.prototype.freeResources=function(){this.state=zs.START,this.renderable=!1,this.upsampledFromParent=!1,l(this.data)&&l(this.data.freeResources)&&this.data.freeResources(),bD(this._southwestChild),this._southwestChild=void 0,bD(this._southeastChild),this._southeastChild=void 0,bD(this._northwestChild),this._northwestChild=void 0,bD(this._northeastChild),this._northeastChild=void 0};function bD(e){l(e)&&e.freeResources()}var _w=ol;var dCi=S(T(),1);function gD(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}gD.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head};gD.prototype.trimTiles=function(e){let t=this.tail,n=!0;for(;n&&l(this._lastBeforeStartOfFrame)&&this.count>e&&l(t);){n=t!==this._lastBeforeStartOfFrame;let i=t.replacementPrevious;t.eligibleForUnloading&&(t.freeResources(),C0e(this,t)),t=i}};function C0e(e,t){let n=t.replacementPrevious,i=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=i),t===e.head?e.head=i:n.replacementNext=i,t===e.tail?e.tail=n:i.replacementPrevious=n,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}gD.prototype.markTileRendered=function(e){let t=this.head;if(t===e){e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext);return}if(++this.count,!l(t)){e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,this.tail=e;return}(l(e.replacementPrevious)||l(e.replacementNext))&&C0e(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,this.head=e};var Sw=gD;function ju(e){this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let n=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new Sw,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=y(e.maximumScreenSpaceError,2),this.tileCacheSize=y(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new xw({ellipsoid:n}),this._tileLoadProgressEvent=new ge,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(ju.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});ju.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function Hit(e){let t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,Z0e(e);let n=e._levelZeroTiles;if(l(n))for(let i=0;i<n.length;++i){let r=n[i].customData,s=r.length;for(let a=0;a<s;++a){let c=r[a];c.level=0,e._addHeightCallbacks.push(c)}n[i].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}ju.prototype.forEachLoadedTile=function(e){let t=this._tileReplacementQueue.head;for(;l(t);)t.state!==zs.START&&e(t),t=t.replacementNext};ju.prototype.forEachRenderedTile=function(e){let t=this._tilesToRender;for(let n=0,i=t.length;n<i;++n)e(t[n])};ju.prototype.updateHeight=function(e,t){let n=this,i={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t};return i.removeFunc=function(){let o=n._addHeightCallbacks,r=o.length;for(let s=0;s<r;++s)if(o[s]===i){o.splice(s,1);break}n._removeHeightCallbacks.push(i),i.callback&&(i.callback=void 0)},n._addHeightCallbacks.push(i),i.removeFunc};ju.prototype.update=function(e){l(this._tileProvider.update)&&this._tileProvider.update(e)};function Z0e(e){let t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}ju.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(Hit(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),Z0e(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())};ju.prototype.render=function(e){let t=e.passes,n=this._tileProvider;t.render&&(n.beginUpdate(e),qit(this,e),cot(this,e),n.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&n.updateForPick(e)};function Jit(e,t){let n=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;if(n!==e._lastTileLoadQueueLength||e._tilesInvalidated){let o=ge.prototype.raiseEvent.bind(e._tileLoadProgressEvent,n);t.afterRender.push(()=>(o(),!0)),e._lastTileLoadQueueLength=n}let i=e._debug;i.enableDebugOutput&&!i.suspendLodUpdate&&(i.maxDepth=e._tilesToRender.reduce(function(o,r){return Math.max(o,r.level)},-1),i.tilesRendered=e._tilesToRender.length,(i.tilesVisited!==i.lastTilesVisited||i.tilesRendered!==i.lastTilesRendered||i.tilesCulled!==i.lastTilesCulled||i.maxDepth!==i.lastMaxDepth||i.tilesWaitingForChildren!==i.lastTilesWaitingForChildren||i.maxDepthVisited!==i.lastMaxDepthVisited)&&(console.log(`Visited ${i.tilesVisited}, Rendered: ${i.tilesRendered}, Culled: ${i.tilesCulled}, Max Depth Rendered: ${i.maxDepth}, Max Depth Visited: ${i.maxDepthVisited}, Waiting for children: ${i.tilesWaitingForChildren}`),i.lastTilesVisited=i.tilesVisited,i.lastTilesRendered=i.tilesRendered,i.lastTilesCulled=i.tilesCulled,i.lastMaxDepth=i.maxDepth,i.lastTilesWaitingForChildren=i.tilesWaitingForChildren,i.lastMaxDepthVisited=i.maxDepthVisited))}ju.prototype.endFrame=function(e){!e.passes.render||e.mode===oe.MORPHING||(oot(this,e),aot(this,e),Jit(this,e))};ju.prototype.isDestroyed=function(){return!1};ju.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var Cw,V0e=new he;function Qit(e,t){let n=ce.center(e.rectangle,V0e),i=n.longitude-Cw.longitude,o=n.latitude-Cw.latitude;n=ce.center(t.rectangle,V0e);let r=n.longitude-Cw.longitude,s=n.latitude-Cw.latitude;return i*i+o*o-(r*r+s*s)}var jit=new h,Tw=[];function qit(e,t){let n=e._debug;if(n.suspendLodUpdate)return;let i=e._tilesToRender;i.length=0;let o,r=e._tileProvider;if(!l(e._levelZeroTiles)){let x=r.tilingScheme;if(l(x)){let _=r.tilingScheme;e._levelZeroTiles=_w.createLevelZeroTiles(_);let C=e._levelZeroTiles.length;if(Tw.length<C)for(Tw=new Array(C),o=0;o<C;++o)Tw[o]===void 0&&(Tw[o]=new Vw)}else return}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;let s,a=e._levelZeroTiles,c=a.length>1?e._occluders:void 0;Cw=t.camera.positionCartographic,a.sort(Qit);let d=e._addHeightCallbacks,u=e._removeHeightCallbacks,m=t.frameNumber,p;if(d.length>0||u.length>0){for(o=0,p=a.length;o<p;++o)s=a[o],s._updateCustomData(m,d,u);d.length=0,u.length=0}let g=t.camera;e._cameraPositionCartographic=g.positionCartographic;let f=A.getTranslation(g.transform,jit);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(f,e._cameraReferenceFrameOriginCartographic),o=0,p=a.length;o<p;++o)s=a[o],e._tileReplacementQueue.markTileRendered(s),s.renderable?wa(e,s,r,t,c,!1,Tw[o]):(Kb(e,e._tileLoadQueueHigh,s,t),++n.tilesWaitingForChildren);e._lastSelectionFrameNumber=m}function Kb(e,t,n,i){n.needsLoading&&(e.tileProvider.computeTileLoadPriority!==void 0&&(n._loadPriority=e.tileProvider.computeTileLoadPriority(n,i)),t.push(n))}function Vw(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function L0e(){this.southwest=new Vw,this.southeast=new Vw,this.northwest=new Vw,this.northeast=new Vw}L0e.prototype.combine=function(e){let t=this.southwest,n=this.southeast,i=this.northwest,o=this.northeast;e.allAreRenderable=t.allAreRenderable&&n.allAreRenderable&&i.allAreRenderable&&o.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||o.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+n.notYetRenderableCount+i.notYetRenderableCount+o.notYetRenderableCount};var S4=new Array(31);for(let e=0;e<S4.length;++e)S4[e]=new L0e;function $it(e,t,n,i,o){let r=e._debug;++r.tilesVisited,e._tileReplacementQueue.markTileRendered(n),n._updateCustomData(t.frameNumber),n.level>r.maxDepthVisited&&(r.maxDepthVisited=n.level);let s=not(e,t,n)<e.maximumScreenSpaceError,a=n.southwestChild,c=n.southeastChild,d=n.northwestChild,u=n.northeastChild,m=e._lastSelectionFrameNumber,p=n._lastSelectionResultFrame===m?n._lastSelectionResult:Hn.NONE,g=e.tileProvider;if(s||i){let f=Hn.originalResult(p)===Hn.RENDERED,x=Hn.originalResult(p)===Hn.CULLED||p===Hn.NONE,_=n.state===zs.DONE,C=f||x||_;if(C||l(g.canRenderWithoutLosingDetail)&&(C=g.canRenderWithoutLosingDetail(n)),C){s&&Kb(e,e._tileLoadQueueMedium,n,t),yD(e,n),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===Hn.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Hn.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}i=!0,s&&Kb(e,e._tileLoadQueueHigh,n,t)}if(g.canRefine(n)){if(a.upsampledFromParent&&c.upsampledFromParent&&d.upsampledFromParent&&u.upsampledFromParent){yD(e,n),Kb(e,e._tileLoadQueueMedium,n,t),e._tileReplacementQueue.markTileRendered(a),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(d),e._tileReplacementQueue.markTileRendered(u),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===Hn.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Hn.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Hn.REFINED;let x=e._tilesToRender.length,_=e._tileLoadQueueLow.length,C=e._tileLoadQueueMedium.length,V=e._tileLoadQueueHigh.length,Z=e._tileToUpdateHeights.length;if(eot(e,a,c,d,u,t,i,o),x!==e._tilesToRender.length){let R=o.allAreRenderable,G=o.anyWereRenderedLastFrame,W=o.notYetRenderableCount,v=!1;if(!R&&!G){let P=e._tilesToRender;for(let M=x;M<P.length;++M){let b=P[M];for(;b!==void 0&&b._lastSelectionResult!==Hn.KICKED&&b!==n;)b._lastSelectionResult=Hn.kick(b._lastSelectionResult),b=b.parent}e._tilesToRender.length=x,e._tileToUpdateHeights.length=Z,yD(e,n),n._lastSelectionResult=Hn.RENDERED;let F=p===Hn.RENDERED;!F&&W>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=_,e._tileLoadQueueMedium.length=C,e._tileLoadQueueHigh.length=V,Kb(e,e._tileLoadQueueMedium,n,t),o.notYetRenderableCount=n.renderable?0:1,v=!0),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=F,F||e._tileToUpdateHeights.push(n),++r.tilesWaitingForChildren}e.preloadAncestors&&!v&&Kb(e,e._tileLoadQueueLow,n,t)}return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Hn.RENDERED,yD(e,n),Kb(e,e._tileLoadQueueHigh,n,t),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===Hn.RENDERED,o.notYetRenderableCount=n.renderable?0:1}function eot(e,t,n,i,o,r,s,a){let c=r.camera.positionCartographic,d=e._tileProvider,u=e._occluders,m=S4[t.level],p=m.southwest,g=m.southeast,f=m.northwest,x=m.northeast;c.longitude<t.rectangle.east?c.latitude<t.rectangle.north?(wa(e,t,d,r,u,s,p),wa(e,n,d,r,u,s,g),wa(e,i,d,r,u,s,f),wa(e,o,d,r,u,s,x)):(wa(e,i,d,r,u,s,f),wa(e,t,d,r,u,s,p),wa(e,o,d,r,u,s,x),wa(e,n,d,r,u,s,g)):c.latitude<t.rectangle.north?(wa(e,n,d,r,u,s,g),wa(e,t,d,r,u,s,p),wa(e,o,d,r,u,s,x),wa(e,i,d,r,u,s,f)):(wa(e,o,d,r,u,s,x),wa(e,i,d,r,u,s,f),wa(e,n,d,r,u,s,g),wa(e,t,d,r,u,s,p)),m.combine(a)}function tot(e,t){let n=t.rectangle;return l(e._cameraPositionCartographic)&&ce.contains(n,e._cameraPositionCartographic)||l(e._cameraReferenceFrameOriginCartographic)&&ce.contains(n,e._cameraReferenceFrameOriginCartographic)}function wa(e,t,n,i,o,r,s){if(n.computeTileVisibility(t,i,o)!==lr.NONE)return $it(e,i,t,r,s);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),s.allAreRenderable=!0,s.anyWereRenderedLastFrame=!1,s.notYetRenderableCount=0,tot(e,t)){(!l(t.data)||!l(t.data.vertexArray))&&Kb(e,e._tileLoadQueueMedium,t,i);let a=e._lastSelectionFrameNumber,c=t._lastSelectionResultFrame===a?t._lastSelectionResult:Hn.NONE;c!==Hn.CULLED_BUT_NEEDED&&c!==Hn.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=Hn.CULLED_BUT_NEEDED}else e.preloadSiblings||t.level===0?(Kb(e,e._tileLoadQueueLow,t,i),t._lastSelectionResult=Hn.CULLED):t._lastSelectionResult=Hn.CULLED;t._lastSelectionResultFrame=i.frameNumber}function not(e,t,n){if(t.mode===oe.SCENE2D||t.camera.frustum instanceof sn||t.camera.frustum instanceof Vr)return iot(e,t,n);let i=e._tileProvider.getLevelMaximumGeometricError(n.level),o=n._distance,r=t.context.drawingBufferHeight,s=t.camera.frustum.sseDenominator,a=i*r/(o*s);return t.fog.enabled&&(a-=X.fog(o,t.fog.density)*t.fog.sse),a/=t.pixelRatio,a}function iot(e,t,n){let o=t.camera.frustum,r=o.offCenterFrustum;l(r)&&(o=r);let s=t.context,a=s.drawingBufferWidth,c=s.drawingBufferHeight,d=e._tileProvider.getLevelMaximumGeometricError(n.level),u=Math.max(o.top-o.bottom,o.right-o.left)/Math.max(a,c),m=d/u;return t.fog.enabled&&t.mode!==oe.SCENE2D&&(m-=X.fog(n._distance,t.fog.density)*t.fog.sse),m/=t.pixelRatio,m}function yD(e,t){e._tilesToRender.push(t)}function oot(e,t){let n=e._tileLoadQueueHigh,i=e._tileLoadQueueMedium,o=e._tileLoadQueueLow;if(n.length===0&&i.length===0&&o.length===0)return;e._tileReplacementQueue.trimTiles(e.tileCacheSize);let r=gi()+e._loadQueueTimeSlice,s=e._tileProvider,a=x4(e,t,s,r,n,!1);a=x4(e,t,s,r,i,a),x4(e,t,s,r,o,a)}function rot(e,t){return e._loadPriority-t._loadPriority}function x4(e,t,n,i,o,r){n.computeTileLoadPriority!==void 0&&o.sort(rot);for(let s=0,a=o.length;s<a&&(gi()<i||!r);++s){let c=o[s];e._tileReplacementQueue.markTileRendered(c),n.loadTile(t,c),r=!0}return r}var AV=new pn,_4=new he,dy=new h,sot=[];function aot(e,t){if(!l(e.tileProvider.tilingScheme))return;let n=sot;n.length=0;let i=e._tileToUpdateHeights,o=gi(),r=e._updateHeightsTimeSlice,s=o+r,a=t.mode,c=t.mapProjection,d=e.tileProvider.tilingScheme.ellipsoid,u;for(;i.length>0;){let m=i[0];if(!l(m.data)||!l(m.data.mesh)){let x=m._lastSelectionResultFrame===e._lastSelectionFrameNumber?m._lastSelectionResult:Hn.NONE;(x===Hn.RENDERED||x===Hn.CULLED_BUT_NEEDED)&&n.push(m),i.shift(),e._lastTileIndex=0;continue}let p=m.customData,g=p.length,f=!1;for(u=e._lastTileIndex;u<g;++u){let x=p[u],_=m.data.terrainData,C=l(_)&&_.wasCreatedByUpsampling();if(m.level>x.level&&!C){if(l(x.positionOnEllipsoidSurface)||(x.positionOnEllipsoidSurface=h.fromRadians(x.positionCartographic.longitude,x.positionCartographic.latitude,0,d)),a===oe.SCENE3D){let Z=d.geodeticSurfaceNormal(x.positionOnEllipsoidSurface,AV.direction),R=d.getSurfaceNormalIntersectionWithZAxis(x.positionOnEllipsoidSurface,11500,AV.origin);if(!l(R)){let G=0;l(m.data.tileBoundingRegion)&&(G=m.data.tileBoundingRegion.minimumHeight);let W=Math.min(G,-11500),v=h.multiplyByScalar(Z,Math.abs(W)+1,dy);h.subtract(x.positionOnEllipsoidSurface,v,AV.origin)}}else he.clone(x.positionCartographic,_4),_4.height=-11500,c.project(_4,dy),h.fromElements(dy.z,dy.x,dy.y,dy),h.clone(dy,AV.origin),h.clone(h.UNIT_X,AV.direction);let V=m.data.pick(AV,a,c,!1,dy);l(V)&&(l(x.callback)&&x.callback(V),x.level=m.level)}if(gi()>=s){f=!0;break}}if(f){e._lastTileIndex=u;break}else e._lastTileIndex=0,i.shift()}for(u=0;u<n.length;u++)i.push(n[u])}function cot(e,t){let n=e._tileProvider,i=e._tilesToRender;for(let o=0,r=i.length;o<r;++o){let s=i[o];n.showTileThisFrame(s,t)}}var Zw=ju;function yh(e){e=y(e,te.default);let t=new Ff({ellipsoid:e}),n=new yw;this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new nw,this._material=void 0,this._surface=new Zw({tileProvider:new bw({terrainProvider:t,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new ge,this._undergroundColor=Y.clone(Y.BLACK),this._undergroundColorAlphaByDistance=new Ft(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new gw,C4(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new Ee({url:tn("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.lambertDiffuseMultiplier=.9,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=te.WGS84.equals(e),this.atmosphereLightIntensity=10,this.atmosphereRayleighCoefficient=new h(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new h(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.lightingFadeOutDistance=X.PI_OVER_TWO*e.minimumRadius,this.lightingFadeInDistance=X.PI*e.minimumRadius,this.nightFadeOutDistance=X.PI_OVER_TWO*e.minimumRadius,this.nightFadeInDistance=5*X.PI_OVER_TWO*e.minimumRadius,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=xn.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this.vertexShadowDarkness=.3}Object.defineProperties(yh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tilesLoaded:{get:function(){return l(this._surface)?this._surface._tileLoadQueueHigh.length===0&&this._surface._tileLoadQueueMedium.length===0&&this._surface._tileLoadQueueLow.length===0:!0}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},clippingPolygons:{get:function(){return this._surface.tileProvider.clippingPolygons},set:function(e){this._surface.tileProvider.clippingPolygons=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){l(e)||(e=ce.clone(ce.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),l(this._material)&&C4(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,C4(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=Y.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){this._undergroundColorAlphaByDistance=Ft.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});function C4(e){let t=[],n=l(e._material)&&(l(e._material.shaderSource.match(/slope/))||l(e._material.shaderSource.match("normalEC"))),i=[Ub,xV];l(e._material)&&(!n||e._terrainProvider.requestVertexNormals)?(i.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms):e._surface._tileProvider.materialUniformMap=void 0,i.push(Yv),e._surfaceShaderSet.baseVertexShaderSource=new Ye({sources:[Ub,xV,Ov],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new Ye({sources:i,defines:t}),e._surfaceShaderSet.material=e._material}function lot(e){return function(t,n){let i=le.distanceSquaredTo(t.pickBoundingSphere,e),o=le.distanceSquaredTo(n.pickBoundingSphere,e);return i-o}}var dot=[],uot={start:0,stop:0};yh.prototype.pickWorldCoordinates=function(e,t,n,i){n=y(n,!0);let o=t.mode,r=t.mapProjection,s=dot;s.length=0;let a=this._surface._tilesToRender,c=a.length,d,u;for(u=0;u<c;++u){d=a[u];let p=d.data;if(!l(p))continue;let g=p.pickBoundingSphere;if(o!==oe.SCENE3D)p.pickBoundingSphere=g=le.fromRectangleWithHeights2D(d.rectangle,r,p.tileBoundingRegion.minimumHeight,p.tileBoundingRegion.maximumHeight,g),h.fromElements(g.center.z,g.center.x,g.center.y,g.center);else if(l(p.renderedMesh))le.clone(p.tileBoundingRegion.boundingSphere,g);else continue;let f=jn.raySphere(e,g,uot);l(f)&&s.push(p)}s.sort(lot(e.origin));let m;for(c=s.length,u=0;u<c&&(m=s[u].pick(e,t.mode,t.mapProjection,n,i),!l(m));++u);return m};var mot=new he;yh.prototype.pick=function(e,t,n){if(n=this.pickWorldCoordinates(e,t,!0,n),l(n)&&t.mode!==oe.SCENE3D){n=h.fromElements(n.y,n.z,n.x,n);let i=t.mapProjection.unproject(n,mot);n=this._ellipsoid.cartographicToCartesian(i,n)}return n};var hot=new h,R0e=new h,fot=new he,pot=new pn;function T4(e,t){return l(e)&&ce.contains(e.rectangle,t)?e:void 0}yh.prototype.getHeight=function(e){let t=this._surface._levelZeroTiles;if(!l(t))return;let n,i,o=t.length;for(i=0;i<o&&(n=t[i],!ce.contains(n.rectangle,e));++i);if(i>=o)return;let r=n;for(;l(n);)n=T4(n._southwestChild,e)||T4(n._southeastChild,e)||T4(n._northwestChild,e)||n._northeastChild,l(n)&&l(n.data)&&l(n.data.renderedMesh)&&(r=n);if(n=r,!l(n)||!l(n.data)||!l(n.data.renderedMesh))return;let s=this._surface._tileProvider.tilingScheme.projection,a=this._surface._tileProvider.tilingScheme.ellipsoid,c=h.fromRadians(e.longitude,e.latitude,0,a,hot),d=pot,u=a.geodeticSurfaceNormal(c,d.direction),m=a.getSurfaceNormalIntersectionWithZAxis(c,11500,d.origin);if(!l(m)){let g;l(n.data.tileBoundingRegion)&&(g=n.data.tileBoundingRegion.minimumHeight);let f=Math.min(y(g,0),-11500),x=h.multiplyByScalar(u,Math.abs(f)+1,R0e);h.subtract(c,x,d.origin)}let p=n.data.pick(d,void 0,s,!1,R0e);if(l(p))return a.cartesianToCartographic(p,fot).height};yh.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)};yh.prototype.beginFrame=function(e){let t=this._surface,n=t.tileProvider,i=this.terrainProvider,o=this.showWaterEffect&&l(i)&&i.hasWaterMask&&i.hasWaterMask;if(o&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;let a=this._oceanNormalMapResource,c=a.url;if(l(c)){let d=this;a.fetchImage().then(function(u){c===d._oceanNormalMapResource.url&&(d._oceanNormalMap=d._oceanNormalMap&&d._oceanNormalMap.destroy(),d._oceanNormalMap=new Et({context:e.context,source:u}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}let r=e.passes,s=e.mode;r.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,n.terrainProvider=this.terrainProvider,n.lightingFadeOutDistance=this.lightingFadeOutDistance,n.lightingFadeInDistance=this.lightingFadeInDistance,n.nightFadeOutDistance=this.nightFadeOutDistance,n.nightFadeInDistance=this.nightFadeInDistance,n.zoomedOutOceanSpecularIntensity=s===oe.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,n.hasWaterMask=o,n.oceanNormalMap=this._oceanNormalMap,n.enableLighting=this.enableLighting,n.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,n.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,n.showGroundAtmosphere=this.showGroundAtmosphere,n.atmosphereLightIntensity=this.atmosphereLightIntensity,n.atmosphereRayleighCoefficient=this.atmosphereRayleighCoefficient,n.atmosphereMieCoefficient=this.atmosphereMieCoefficient,n.atmosphereRayleighScaleHeight=this.atmosphereRayleighScaleHeight,n.atmosphereMieScaleHeight=this.atmosphereMieScaleHeight,n.atmosphereMieAnisotropy=this.atmosphereMieAnisotropy,n.shadows=this.shadows,n.hueShift=this.atmosphereHueShift,n.saturationShift=this.atmosphereSaturationShift,n.brightnessShift=this.atmosphereBrightnessShift,n.fillHighlightColor=this.fillHighlightColor,n.showSkirts=this.showSkirts,n.backFaceCulling=this.backFaceCulling,n.vertexShadowDarkness=this.vertexShadowDarkness,n.undergroundColor=this._undergroundColor,n.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,n.lambertDiffuseMultiplier=this.lambertDiffuseMultiplier,t.beginFrame(e))};yh.prototype.render=function(e){this.show&&(l(this._material)&&this._material.update(e.context),this._surface.render(e))};yh.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)};yh.prototype.isDestroyed=function(){return!1};yh.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),me(this)};var Lw=yh;var SVi=S(T(),1);var R1i=S(T(),1);var y1i=S(T(),1);var u1i=S(T(),1);function bot(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i}var Rw=bot;var k0e={},got=32.184,yot=2451545,G0e=-.0529921,E0e=-.1059842,W0e=13.0120009,I0e=13.3407154,X0e=.9856003,P0e=26.4057084,v0e=13.064993,w0e=.3287146,F0e=1.7484877,A0e=-.1589763,M0e=.0036096,N0e=.1643573,U0e=12.9590088,V4=new ne;k0e.ComputeMoon=function(e,t){l(e)||(e=ne.now()),V4=ne.addSeconds(e,got,V4);let n=ne.totalDays(V4)-yot,i=n/Kn.DAYS_PER_JULIAN_CENTURY,o=(125.045+G0e*n)*X.RADIANS_PER_DEGREE,r=(250.089+E0e*n)*X.RADIANS_PER_DEGREE,s=(260.008+W0e*n)*X.RADIANS_PER_DEGREE,a=(176.625+I0e*n)*X.RADIANS_PER_DEGREE,c=(357.529+X0e*n)*X.RADIANS_PER_DEGREE,d=(311.589+P0e*n)*X.RADIANS_PER_DEGREE,u=(134.963+v0e*n)*X.RADIANS_PER_DEGREE,m=(276.617+w0e*n)*X.RADIANS_PER_DEGREE,p=(34.226+F0e*n)*X.RADIANS_PER_DEGREE,g=(15.134+A0e*n)*X.RADIANS_PER_DEGREE,f=(119.743+M0e*n)*X.RADIANS_PER_DEGREE,x=(239.961+N0e*n)*X.RADIANS_PER_DEGREE,_=(25.053+U0e*n)*X.RADIANS_PER_DEGREE,C=Math.sin(o),V=Math.sin(r),Z=Math.sin(s),R=Math.sin(a),G=Math.sin(c),W=Math.sin(d),v=Math.sin(u),P=Math.sin(m),F=Math.sin(p),M=Math.sin(g),b=Math.sin(f),L=Math.sin(x),E=Math.sin(_),I=Math.cos(o),w=Math.cos(r),N=Math.cos(s),B=Math.cos(a),k=Math.cos(c),O=Math.cos(d),U=Math.cos(u),J=Math.cos(m),z=Math.cos(p),ee=Math.cos(g),K=Math.cos(f),j=Math.cos(x),q=Math.cos(_),be=(269.9949+.0031*i-3.8787*C-.1204*V+.07*Z-.0172*R+.0072*W-.0052*M+.0043*E)*X.RADIANS_PER_DEGREE,Se=(66.5392+.013*i+1.5419*I+.0239*w-.0278*N+.0068*B-.0029*O+9e-4*U+8e-4*ee-9e-4*q)*X.RADIANS_PER_DEGREE,ae=(38.3213+13.17635815*n-14e-13*n*n+3.561*C+.1208*V-.0642*Z+.0158*R+.0252*G-.0066*W-.0047*v-.0046*P+.0028*F+.0052*M+.004*b+.0019*L-.0044*E)*X.RADIANS_PER_DEGREE,ye=(13.17635815-14e-13*(2*n)+3.561*I*G0e+.1208*w*E0e-.0642*N*W0e+.0158*B*I0e+.0252*k*X0e-.0066*O*P0e-.0047*U*v0e-.0046*J*w0e+.0028*z*F0e+.0052*ee*A0e+.004*K*M0e+.0019*j*N0e-.0044*q*U0e)/86400*X.RADIANS_PER_DEGREE;return l(t)||(t=new Rw),t.rightAscension=be,t.declination=Se,t.rotation=ae,t.rotationRate=ye,t};var Gw=k0e;function D0e(e){(!l(e)||typeof e!="function")&&(e=Gw.ComputeMoon),this._computeFunction=e}var xot=new h,_ot=new h,Sot=new h;function Tot(e,t,n){let i=xot;i.x=Math.cos(e+X.PI_OVER_TWO),i.y=Math.sin(e+X.PI_OVER_TWO),i.z=0;let o=Math.cos(t),r=Sot;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);let s=h.cross(r,i,_ot);return l(n)||(n=new $),n[0]=i.x,n[1]=s.x,n[2]=r.x,n[3]=i.y,n[4]=s.y,n[5]=r.y,n[6]=i.z,n[7]=s.z,n[8]=r.z,n}var Cot=new $,Vot=new we;D0e.prototype.evaluate=function(e,t){l(e)||(e=ne.now());let n=this._computeFunction(e),i=Tot(n.rightAscension,n.declination,t),o=X.zeroToTwoPi(n.rotation),r=we.fromAxisAngle(h.UNIT_Z,o,Vot),s=$.fromQuaternion(we.conjugate(r,r),Cot);return $.multiply(s,i,i)};var Ew=D0e;var F1i=S(T(),1);var Z4={};function Zot(e){let t=6.239996+.0172019696544*e;return .001657*Math.sin(t+.01671*Math.sin(t))}var Lot=32.184,Rot=2451545;function age(e,t){t=ne.addSeconds(e,Lot,t);let n=ne.totalDays(t)-Rot;return t=ne.addSeconds(t,Zot(n),t),t}var xD=new ne(2451545,0,zn.TAI),Got=1e3,qu=X.RADIANS_PER_DEGREE,kd=X.RADIANS_PER_ARCSECOND,Fa=14959787e4,B0e=new $;function cge(e,t,n,i,o,r,s){n<0&&(n=-n,o+=X.PI);let a=e*(1-t),c=i-o,d=o,u=Wot(r-i,t),m=Eot(t,0);wot(c,n,d,B0e);let p=a*(1+t),g=Math.cos(u),f=Math.sin(u),x=1+t*g,_=p/x;return l(s)?(s.x=_*g,s.y=_*f,s.z=0):s=new h(_*g,_*f,0),$.multiplyByVector(B0e,s,s)}function Eot(e,t){return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function Wot(e,t){let n=Pot(e,t);return vot(n,t)}var Iot=50,Xot=X.EPSILON8;function Pot(e,t){let n=Math.floor(e/X.TWO_PI);e-=n*X.TWO_PI;let i=e+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE,r;for(r=0;r<Iot&&Math.abs(o-i)>Xot;++r){o=i;let s=o-t*Math.sin(o)-e,a=1-t*Math.cos(o);i=o-s/a}return o=i+n*X.TWO_PI,o}function vot(e,t){let n=Math.floor(e/X.TWO_PI);e-=n*X.TWO_PI;let i=Math.cos(e)-t,o=Math.sin(e)*Math.sqrt(1-t*t),r=Math.atan2(o,i);return r=X.zeroToTwoPi(r),e<0&&(r-=X.TWO_PI),r+=n*X.TWO_PI,r}function wot(e,t,n,i){let o=Math.cos(e),r=Math.sin(e),s=Math.cos(t),a=Math.sin(t),c=Math.cos(n),d=Math.sin(n);return l(i)?(i[0]=c*o-d*r*s,i[1]=d*o+c*r*s,i[2]=r*a,i[3]=-c*r-d*o*s,i[4]=-d*r+c*o*s,i[5]=o*a,i[6]=d*a,i[7]=-c*a,i[8]=s):i=new $(c*o-d*r*s,-c*r-d*o*s,d*a,d*o+c*r*s,-d*r+c*o*s,-c*a,r*a,o*a,s),i}var Fot=1.0000010178*Fa,Aot=100.46645683*qu,Mot=129597742283429e-5*kd,Y0e=16002,O0e=21863,z0e=32004,K0e=10931,H0e=14529,J0e=16368,Q0e=15318,j0e=32794,Not=64*1e-7*Fa,Uot=-152*1e-7*Fa,kot=62*1e-7*Fa,Dot=-8*1e-7*Fa,Bot=32*1e-7*Fa,Yot=-41*1e-7*Fa,Oot=19*1e-7*Fa,zot=-11*1e-7*Fa,Kot=-150*1e-7*Fa,Hot=-46*1e-7*Fa,Jot=68*1e-7*Fa,Qot=54*1e-7*Fa,jot=14*1e-7*Fa,qot=24*1e-7*Fa,$ot=-28*1e-7*Fa,ert=22*1e-7*Fa,q0e=10,$0e=16002,ege=21863,tge=10931,nge=1473,ige=32004,oge=4387,rge=73,trt=-325*1e-7,nrt=-322*1e-7,irt=-79*1e-7,ort=232*1e-7,rrt=-52*1e-7,srt=97*1e-7,art=55*1e-7,crt=-41*1e-7,lrt=-105*1e-7,drt=-137*1e-7,urt=258*1e-7,mrt=35*1e-7,hrt=-116*1e-7,frt=-88*1e-7,prt=-112*1e-7,brt=-80*1e-7,MV=new ne(0,0,zn.TAI);function grt(e,t){age(e,MV);let i=(MV.dayNumber-xD.dayNumber+(MV.secondsOfDay-xD.secondsOfDay)/Kn.SECONDS_PER_DAY)/(Kn.DAYS_PER_JULIAN_CENTURY*10),o=.3595362*i,r=Fot+Not*Math.cos(Y0e*o)+Kot*Math.sin(Y0e*o)+Uot*Math.cos(O0e*o)+Hot*Math.sin(O0e*o)+kot*Math.cos(z0e*o)+Jot*Math.sin(z0e*o)+Dot*Math.cos(K0e*o)+Qot*Math.sin(K0e*o)+Bot*Math.cos(H0e*o)+jot*Math.sin(H0e*o)+Yot*Math.cos(J0e*o)+qot*Math.sin(J0e*o)+Oot*Math.cos(Q0e*o)+$ot*Math.sin(Q0e*o)+zot*Math.cos(j0e*o)+ert*Math.sin(j0e*o),s=Aot+Mot*i+trt*Math.cos(q0e*o)+lrt*Math.sin(q0e*o)+nrt*Math.cos($0e*o)+drt*Math.sin($0e*o)+irt*Math.cos(ege*o)+urt*Math.sin(ege*o)+ort*Math.cos(tge*o)+mrt*Math.sin(tge*o)+rrt*Math.cos(nge*o)+hrt*Math.sin(nge*o)+srt*Math.cos(ige*o)+frt*Math.sin(ige*o)+art*Math.cos(oge*o)+prt*Math.sin(oge*o)+crt*Math.cos(rge*o)+brt*Math.sin(rge*o),a=.0167086342-.0004203654*i,c=102.93734808*qu+11612.3529*kd*i,d=469.97289*kd*i,u=174.87317577*qu-8679.27034*kd*i;return cge(r,a,d,c,u,s,t)}function lge(e,t){age(e,MV);let i=(MV.dayNumber-xD.dayNumber+(MV.secondsOfDay-xD.secondsOfDay)/Kn.SECONDS_PER_DAY)/Kn.DAYS_PER_JULIAN_CENTURY,o=i*i,r=o*i,s=r*i,a=383397.7725+.004*i,c=.055545526-16e-9*i,d=5.15668983*qu,u=-8e-5*i+.02966*o-42e-6*r-13e-8*s,m=83.35324312*qu,p=146434202669e-4*i-38.2702*o-.045047*r+21301e-8*s,g=125.04455501*qu,f=-69679193631e-4*i+6.3602*o+.007625*r-3586e-8*s,x=218.31664563*qu,_=17325593434847e-4*i-6.391*o+.006588*r-3169e-8*s,C=297.85019547*qu+kd*(1602961601209e-3*i-6.3706*o+.006593*r-3169e-8*s),V=93.27209062*qu+kd*(17395272628478e-4*i-12.7512*o-.001037*r+417e-8*s),Z=134.96340251*qu+kd*(17179159232178e-4*i+31.8792*o+.051635*r-2447e-7*s),R=357.52910918*qu+kd*(1295965810481e-4*i-.5532*o+136e-6*r-1149e-8*s),G=310.17137918*qu-kd*(6967051436e-3*i+6.2068*o+.007618*r-3219e-8*s),W=2*C,v=4*C,P=6*C,F=2*Z,M=3*Z,b=4*Z,L=2*V;a+=3400.4*Math.cos(W)-635.6*Math.cos(W-Z)-235.6*Math.cos(Z)+218.1*Math.cos(W-R)+181*Math.cos(W+Z),c+=.014216*Math.cos(W-Z)+.008551*Math.cos(W-F)-.001383*Math.cos(Z)+.001356*Math.cos(W+Z)-.001147*Math.cos(v-M)-914e-6*Math.cos(v-F)+869e-6*Math.cos(W-R-Z)-627e-6*Math.cos(W)-394e-6*Math.cos(v-b)+282e-6*Math.cos(W-R-F)-279e-6*Math.cos(C-Z)-236e-6*Math.cos(F)+231e-6*Math.cos(v)+229e-6*Math.cos(P-b)-201e-6*Math.cos(F-L),u+=486.26*Math.cos(W-L)-40.13*Math.cos(W)+37.51*Math.cos(L)+25.73*Math.cos(F-L)+19.97*Math.cos(W-R-L),p+=-55609*Math.sin(W-Z)-34711*Math.sin(W-F)-9792*Math.sin(Z)+9385*Math.sin(v-M)+7505*Math.sin(v-F)+5318*Math.sin(W+Z)+3484*Math.sin(v-b)-3417*Math.sin(W-R-Z)-2530*Math.sin(P-b)-2376*Math.sin(W)-2075*Math.sin(W-M)-1883*Math.sin(F)-1736*Math.sin(P-5*Z)+1626*Math.sin(R)-1370*Math.sin(P-M),f+=-5392*Math.sin(W-L)-540*Math.sin(R)-441*Math.sin(W)+423*Math.sin(L)-288*Math.sin(F-L),_+=-3332.9*Math.sin(W)+1197.4*Math.sin(W-Z)-662.5*Math.sin(R)+396.3*Math.sin(Z)-218*Math.sin(W-R);let E=2*G,I=3*G;u+=46.997*Math.cos(G)*i-.614*Math.cos(W-L+G)*i+.614*Math.cos(W-L-G)*i-.0297*Math.cos(E)*o-.0335*Math.cos(G)*o+.0012*Math.cos(W-L+E)*o-16e-5*Math.cos(G)*r+4e-5*Math.cos(I)*r+4e-5*Math.cos(E)*r;let w=2.116*Math.sin(G)*i-.111*Math.sin(W-L-G)*i-.0015*Math.sin(G)*o;p+=w,_+=w,f+=-520.77*Math.sin(G)*i+13.66*Math.sin(W-L+G)*i+1.12*Math.sin(W-G)*i-1.06*Math.sin(L-G)*i+.66*Math.sin(E)*o+.371*Math.sin(G)*o-.035*Math.sin(W-L+E)*o-.015*Math.sin(W-L+G)*o+.0014*Math.sin(G)*r-.0011*Math.sin(I)*r-9e-4*Math.sin(E)*r,a*=Got;let N=d+u*kd,B=m+p*kd,k=x+_*kd,O=g+f*kd;return cge(a,c,N,B,O,k,t)}var sge=.012300034,yrt=sge/(sge+1)*-1;function xrt(e,t){return t=lge(e,t),h.multiplyByScalar(t,yrt,t)}var dge=new $(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),Ww=new h;Z4.computeSunPositionInEarthInertialFrame=function(e,t){return l(e)||(e=ne.now()),l(t)||(t=new h),Ww=grt(e,Ww),t=h.negate(Ww,t),xrt(e,Ww),h.subtract(t,Ww,t),$.multiplyByVector(dge,t,t),t};Z4.computeMoonPositionInEarthInertialFrame=function(e,t){return l(e)||(e=ne.now()),t=lge(e,t),$.multiplyByVector(dge,t,t),t};var uy=Z4;var sVi=S(T(),1);var L4={position:0};function _D(e){e=y(e,y.EMPTY_OBJECT),this.center=h.clone(y(e.center,h.ZERO)),this._center=new h,this.radii=h.clone(e.radii),this._radii=new h,this._oneOverEllipsoidRadiiSquared=new h,this._boundingSphere=new le,this.modelMatrix=A.clone(y(e.modelMatrix,A.IDENTITY)),this._modelMatrix=new A,this._computedModelMatrix=new A,this.show=y(e.show,!0),this.material=y(e.material,Mi.fromType(Mi.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=y(e.debugShowBoundingVolume,!1),this.onlySunLighting=y(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=y(e.depthTestEnabled,!0),this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new tt({owner:y(e._owner,this)}),this._pickCommand=new tt({owner:y(e._owner,this),pickOnly:!0});let t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function _rt(e){let t=e.cache.ellipsoidPrimitive_vertexArray;if(l(t))return t;let n=bl.createGeometry(bl.fromDimensions({dimensions:new h(2,2,2),vertexFormat:Xe.POSITION_ONLY}));return t=ei.fromGeometry({context:e,geometry:n,attributeLocations:L4,bufferUsage:Ne.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}_D.prototype.update=function(e){if(!this.show||e.mode!==oe.SCENE3D||!l(this.center)||!l(this.radii))return;let t=e.context,n=this.material.isTranslucent(),i=this._translucent!==n;(!l(this._rs)||i)&&(this._translucent=n,this._rs=De.fromCache({cull:{enabled:!0,face:pi.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!n&&t.fragmentDepth,blending:n?un.ALPHA_BLEND:void 0})),l(this._va)||(this._va=_rt(t));let o=!1,r=this.radii;if(!h.equals(this._radii,r)){h.clone(r,this._radii);let x=this._oneOverEllipsoidRadiiSquared;x.x=1/(r.x*r.x),x.y=1/(r.y*r.y),x.z=1/(r.z*r.z),o=!0}(!A.equals(this.modelMatrix,this._modelMatrix)||!h.equals(this.center,this._center))&&(A.clone(this.modelMatrix,this._modelMatrix),h.clone(this.center,this._center),A.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(h.clone(h.ZERO,this._boundingSphere.center),this._boundingSphere.radius=h.maximumComponent(r),le.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));let s=this._material!==this.material;this._material=this.material,this._material.update(t);let a=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;let c=e.useLogDepth,d=this._useLogDepth!==c;this._useLogDepth=c;let u=this._colorCommand,m,p;(s||a||i||d)&&(m=new Ye({sources:[yV]}),p=new Ye({sources:[this.material.shaderSource,gV]}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(m.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._sp=qt.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:L4}),u.vertexArray=this._va,u.renderState=this._rs,u.shaderProgram=this._sp,u.uniformMap=xt(this._uniforms,this.material._uniforms),u.executeInClosestFrustum=n);let g=e.commandList,f=e.passes;if(f.render&&(u.boundingVolume=this._boundingSphere,u.debugShowBoundingVolume=this.debugShowBoundingVolume,u.modelMatrix=this._computedModelMatrix,u.pass=n?Le.TRANSLUCENT:Le.OPAQUE,g.push(u)),f.pick){let x=this._pickCommand;(!l(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(s||a||!l(this._pickSP)||d)&&(m=new Ye({sources:[yV]}),p=new Ye({sources:[this.material.shaderSource,gV],pickColorQualifier:"uniform"}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(m.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._pickSP=qt.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:L4}),x.vertexArray=this._va,x.renderState=this._rs,x.shaderProgram=this._pickSP,x.uniformMap=xt(xt(this._uniforms,this._pickUniforms),this.material._uniforms),x.executeInClosestFrustum=n),x.boundingVolume=this._boundingSphere,x.modelMatrix=this._computedModelMatrix,x.pass=n?Le.TRANSLUCENT:Le.OPAQUE,g.push(x)}};_D.prototype.isDestroyed=function(){return!1};_D.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),me(this)};var Iw=_D;function Xw(e){e=y(e,y.EMPTY_OBJECT);let t=e.textureUrl;l(t)||(t=tn("Assets/Textures/moonSmall.jpg")),this.show=y(e.show,!0),this.textureUrl=t,this._ellipsoid=y(e.ellipsoid,te.MOON),this.onlySunLighting=y(e.onlySunLighting,!0),this._ellipsoidPrimitive=new Iw({radii:this.ellipsoid.radii,material:Mi.fromType(Mi.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new Ew}Object.defineProperties(Xw.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var SD=new $,Srt=new $,Trt=new h,TD=[];Xw.prototype.update=function(e){if(!this.show)return;let t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;let n=e.time;l(Gt.computeIcrfToFixedMatrix(n,SD))||Gt.computeTemeToPseudoFixedMatrix(n,SD);let i=this._axes.evaluate(n,Srt);$.transpose(i,i),$.multiply(SD,i,i);let o=uy.computeMoonPositionInEarthInertialFrame(n,Trt);$.multiplyByVector(SD,o,o),A.fromRotationTranslation(i,o,t.modelMatrix);let r=e.commandList;return e.commandList=TD,TD.length=0,t.update(e),e.commandList=r,TD.length===1?TD[0]:void 0};Xw.prototype.isDestroyed=function(){return!1};Xw.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),me(this)};var Pw=Xw;var mki=S(T(),1);var CVi=S(T(),1);var R4=[],G4=[];function Crt(e,t,n,i,o,r){let s=o-i+1,a=r-o,c=R4,d=G4,u,m;for(u=0;u<s;++u)c[u]=e[i+u];for(m=0;m<a;++m)d[m]=e[o+m+1];u=0,m=0;for(let p=i;p<=r;++p){let g=c[u],f=d[m];u<s&&(m>=a||t(g,f,n)<=0)?(e[p]=g,++u):m<a&&(e[p]=f,++m)}}function E4(e,t,n,i,o){if(i>=o)return;let r=Math.floor((i+o)*.5);E4(e,t,n,i,r),E4(e,t,n,r+1,o),Crt(e,t,n,i,r,o)}function Vrt(e,t,n){let i=e.length,o=Math.ceil(i*.5);R4.length=o,G4.length=o,E4(e,t,n,0,i-1),R4.length=0,G4.length=0}var Hb=Vrt;var PVi=S(T(),1);function yc(e,t){this._occluderPosition=h.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var CD=new h;Object.defineProperties(yc.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=h.clone(e,this._cameraPosition);let t=h.subtract(this._occluderPosition,e,CD),n=h.magnitudeSquared(t),i=this._occluderRadius*this._occluderRadius,o,r,s;if(n>i){o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=h.multiplyByScalar(t,n,CD);let a=o*o*n;s=h.add(e,h.multiplyByScalar(r,a,CD),CD)}else o=Number.MAX_VALUE;this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=s,this._cameraPosition=e}}});yc.fromBoundingSphere=function(e,t,n){return l(n)?(h.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new yc(e,t)};var mge=new h;yc.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=h.subtract(e,this._occluderPosition,mge),n=this._occluderRadius;if(n=h.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=h.subtract(e,this._cameraPosition,t),n*n>h.magnitudeSquared(t)}return!1};var Zrt=new h;yc.prototype.isBoundingSphereVisible=function(e){let t=h.clone(e.center,Zrt),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,mge),o=this._occluderRadius-n;if(o=h.magnitudeSquared(i)-o*o,n<this._occluderRadius)return o>0?(o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i),o*o+n*n>h.magnitudeSquared(i)):!1;if(o>0){i=h.subtract(t,this._cameraPosition,i);let r=h.magnitudeSquared(i),s=this._occluderRadius*this._occluderRadius,a=n*n;return(this._horizonDistance*this._horizonDistance+s)*a>r*s?!0:(o=Math.sqrt(o)+this._horizonDistance,o*o+a>r)}return!0}return!1};var Lrt=new h;yc.prototype.computeVisibility=function(e){let t=h.clone(e.center),n=e.radius;if(n>this._occluderRadius)return lr.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,Lrt),o=this._occluderRadius-n,r=h.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i);let s=h.magnitudeSquared(i);return o*o+n*n<s?lr.NONE:(o=this._occluderRadius+n,o=r-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,s<o*o+n*n?lr.FULL:lr.PARTIAL):(i=h.subtract(t,this._horizonPlanePosition,i),h.dot(i,this._horizonPlaneNormal)>-n?lr.PARTIAL:lr.FULL))}}return lr.NONE};var VD=new h;yc.computeOccludeePoint=function(e,t,n){let i=h.clone(t),o=h.clone(e.center),r=e.radius,s=n.length,a=h.normalize(h.subtract(i,o,VD),VD),c=-h.dot(a,o),d=yc._anyRotationVector(o,a,c),u=yc._horizonToPlaneNormalDotProduct(e,a,c,d,n[0]);if(!u)return;let m;for(let g=1;g<s;++g){if(m=yc._horizonToPlaneNormalDotProduct(e,a,c,d,n[g]),!m)return;m<u&&(u=m)}if(u<.0017453283658983088)return;let p=r/u;return h.add(o,h.multiplyByScalar(a,p,VD),VD)};var Rrt=[];yc.computeOccludeePointFromRectangle=function(e,t){t=y(t,te.default);let n=ce.subsample(e,t,0,Rrt),i=le.fromPoints(n),o=h.ZERO;if(!h.equals(o,i.center))return yc.computeOccludeePoint(new le(o,t.minimumRadius),i.center,n)};var Grt=new h;yc._anyRotationVector=function(e,t,n){let i=h.abs(t,Grt),o=i.x>i.y?0:1;(o===0&&i.z>i.x||o===1&&i.z>i.y)&&(o=2);let r=new h,s;o===0?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=h.UNIT_X):o===1?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=h.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=h.UNIT_Z);let a=(h.dot(t,i)+n)/-h.dot(t,s);return h.normalize(h.subtract(h.add(i,h.multiplyByScalar(s,a,r),i),e,i),i)};var Ert=new h;yc._rotationVector=function(e,t,n,i,o){let r=h.subtract(i,e,Ert);if(r=h.normalize(r,r),h.dot(t,r)<.9999999847691291){let s=h.cross(t,r,r);if(h.magnitude(s)>X.EPSILON13)return h.normalize(s,new h)}return o};var W4=new h,Wrt=new h,ZD=new h,uge=new h;yc._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){let r=h.clone(o,W4),s=h.clone(e.center,Wrt),a=e.radius,c=h.subtract(s,r,ZD),d=h.magnitudeSquared(c),u=a*a;if(d<u)return!1;let m=d-u,p=Math.sqrt(m),f=1/Math.sqrt(d),_=p*f*p;c=h.normalize(c,c);let C=h.add(r,h.multiplyByScalar(c,_,uge),uge),V=Math.sqrt(m-_*_),Z=this._rotationVector(s,t,n,r,i),R=h.fromElements(Z.x*Z.x*c.x+(Z.x*Z.y-Z.z)*c.y+(Z.x*Z.z+Z.y)*c.z,(Z.x*Z.y+Z.z)*c.x+Z.y*Z.y*c.y+(Z.y*Z.z-Z.x)*c.z,(Z.x*Z.z-Z.y)*c.x+(Z.y*Z.z+Z.x)*c.y+Z.z*Z.z*c.z,W4);R=h.normalize(R,R);let G=h.multiplyByScalar(R,V,W4);Z=h.normalize(h.subtract(h.add(C,G,ZD),s,ZD),ZD);let W=h.dot(t,Z);Z=h.normalize(h.subtract(h.subtract(C,G,Z),s,Z),Z);let v=h.dot(t,Z);return W<v?W:v};var vw=yc;var HVi=S(T(),1);var DVi=S(T(),1);function Nf(e){e=y(e,y.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this._cullingVolume=new ss,this._perspectiveMatrix=new A,this._infinitePerspective=new A}function I4(e){let t=e.top,n=e.bottom,i=e.right,o=e.left,r=e.near,s=e.far;(t!==e._top||n!==e._bottom||o!==e._left||i!==e._right||r!==e._near||s!==e._far)&&(e._left=o,e._right=i,e._top=t,e._bottom=n,e._near=r,e._far=s,e._perspectiveMatrix=A.computePerspectiveOffCenter(o,i,n,t,r,s,e._perspectiveMatrix),e._infinitePerspective=A.computeInfinitePerspectiveOffCenter(o,i,n,t,r,e._infinitePerspective))}Object.defineProperties(Nf.prototype,{projectionMatrix:{get:function(){return I4(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return I4(this),this._infinitePerspective}}});var Irt=new h,Xrt=new h,Prt=new h,vrt=new h;Nf.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,d=this.far,u=h.cross(t,n,Irt),m=Xrt;h.multiplyByScalar(t,c,m),h.add(e,m,m);let p=Prt;h.multiplyByScalar(t,d,p),h.add(e,p,p);let g=vrt;h.multiplyByScalar(u,a,g),h.add(m,g,g),h.subtract(g,e,g),h.normalize(g,g),h.cross(g,n,g),h.normalize(g,g);let f=i[0];return l(f)||(f=i[0]=new se),f.x=g.x,f.y=g.y,f.z=g.z,f.w=-h.dot(g,e),h.multiplyByScalar(u,s,g),h.add(m,g,g),h.subtract(g,e,g),h.cross(n,g,g),h.normalize(g,g),f=i[1],l(f)||(f=i[1]=new se),f.x=g.x,f.y=g.y,f.z=g.z,f.w=-h.dot(g,e),h.multiplyByScalar(n,r,g),h.add(m,g,g),h.subtract(g,e,g),h.cross(u,g,g),h.normalize(g,g),f=i[2],l(f)||(f=i[2]=new se),f.x=g.x,f.y=g.y,f.z=g.z,f.w=-h.dot(g,e),h.multiplyByScalar(n,o,g),h.add(m,g,g),h.subtract(g,e,g),h.cross(g,u,g),h.normalize(g,g),f=i[3],l(f)||(f=i[3]=new se),f.x=g.x,f.y=g.y,f.z=g.z,f.w=-h.dot(g,e),f=i[4],l(f)||(f=i[4]=new se),f.x=t.x,f.y=t.y,f.z=t.z,f.w=-h.dot(t,m),h.negate(t,g),f=i[5],l(f)||(f=i[5]=new se),f.x=g.x,f.y=g.y,f.z=g.z,f.w=-h.dot(g,p),this._cullingVolume};Nf.prototype.getPixelDimensions=function(e,t,n,i,o){I4(this);let r=1/this.near,s=this.top*r,a=2*i*n*s/t;s=this.right*r;let c=2*i*n*s/e;return o.x=c,o.y=a,o};Nf.prototype.clone=function(e){return l(e)||(e=new Nf),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};Nf.prototype.equals=function(e){return l(e)&&e instanceof Nf&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};Nf.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof Nf&&X.equalsEpsilon(this.right,e.right,t,n)&&X.equalsEpsilon(this.left,e.left,t,n)&&X.equalsEpsilon(this.top,e.top,t,n)&&X.equalsEpsilon(this.bottom,e.bottom,t,n)&&X.equalsEpsilon(this.near,e.near,t,n)&&X.equalsEpsilon(this.far,e.far,t,n)};var rl=Nf;function Hl(e){e=y(e,y.EMPTY_OBJECT),this._offCenterFrustum=new rl,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this.xOffset=y(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=y(e.yOffset,0),this._yOffset=this.yOffset}Hl.packedLength=6;Hl.pack=function(e,t,n){return n=y(n,0),t[n++]=e.fov,t[n++]=e.aspectRatio,t[n++]=e.near,t[n++]=e.far,t[n++]=e.xOffset,t[n]=e.yOffset,t};Hl.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Hl),n.fov=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t++],n.xOffset=e[t++],n.yOffset=e[t],n};function xh(e){let t=e._offCenterFrustum;(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset)&&(e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:Math.atan(Math.tan(e.fov*.5)/e.aspectRatio)*2,e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset)}Object.defineProperties(Hl.prototype,{projectionMatrix:{get:function(){return xh(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return xh(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return xh(this),this._fovy}},sseDenominator:{get:function(){return xh(this),this._sseDenominator}},offCenterFrustum:{get:function(){return xh(this),this._offCenterFrustum}}});Hl.prototype.computeCullingVolume=function(e,t,n){return xh(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};Hl.prototype.getPixelDimensions=function(e,t,n,i,o){return xh(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};Hl.prototype.clone=function(e){return l(e)||(e=new Hl),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};Hl.prototype.equals=function(e){return!l(e)||!(e instanceof Hl)?!1:(xh(this),xh(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};Hl.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof Hl)?!1:(xh(this),xh(e),X.equalsEpsilon(this.fov,e.fov,t,n)&&X.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var Ti=Hl;var aZi=S(T(),1);function LD(e){this._context=e}var ww,wrt=new tt({primitiveType:Fe.TRIANGLES}),Frt=new ii({color:new Y(0,0,0,0)});function Art(e,t){return new na({context:e,colorTextures:[t],destroyAttachments:!1})}function Mrt(e,t){return qt.fromCache({context:e,vertexShaderSource:uS,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function Nrt(e,t){return(!l(ww)||ww.viewport.width!==e||ww.viewport.height!==t)&&(ww=De.fromCache({viewport:new ze(0,0,e,t)})),ww}LD.prototype.execute=function(e){l(e.preExecute)&&e.preExecute(e);let t=e.outputTexture,n=t.width,i=t.height,o=this._context,r=l(e.vertexArray)?e.vertexArray:o.getViewportQuadVertexArray(),s=l(e.shaderProgram)?e.shaderProgram:Mrt(o,e.fragmentShaderSource),a=Art(o,t),c=Nrt(n,i),d=e.uniformMap,u=Frt;u.framebuffer=a,u.renderState=c,u.execute(o);let m=wrt;m.vertexArray=r,m.renderState=c,m.shaderProgram=s,m.uniformMap=d,m.framebuffer=a,m.execute(o),a.destroy(),e.persists||(s.destroy(),l(e.vertexArray)&&r.destroy()),l(e.postExecute)&&e.postExecute(t)};LD.prototype.isDestroyed=function(){return!1};LD.prototype.destroy=function(){return me(this)};var Fw=LD;var SLi=S(T(),1);var lZi=S(T(),1);function Urt(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}var xc=Urt;var pZi=S(T(),1);function _h(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}Object.defineProperties(_h.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}});_h.prototype.replaceShaderProgram=function(e){return l(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)};function krt(e){let t=Object.keys(e).sort();return JSON.stringify(e,t)}_h.prototype.getShaderProgram=function(e){let t=e.vertexShaderSource,n=e.fragmentShaderSource,i=e.attributeLocations;typeof t=="string"&&(t=new Ye({sources:[t]})),typeof n=="string"&&(n=new Ye({sources:[n]}));let o=t.getCacheKey(),r=n.getCacheKey(),s=l(i)?krt(i):"",a=`${o}:${r}:${s}`,c;if(l(this._shaders[a]))c=this._shaders[a],delete this._shadersToRelease[a];else{let d=this._context,u=t.createCombinedVertexShader(d),m=n.createCombinedFragmentShader(d),p=new qt({gl:d._gl,logShaderCompilation:d.logShaderCompilation,debugShaders:d.debugShaders,vertexShaderSource:t,vertexShaderText:u,fragmentShaderSource:n,fragmentShaderText:m,attributeLocations:i});c={cache:this,shaderProgram:p,keyword:a,derivedKeywords:[],count:0},p._cachedShader=c,this._shaders[a]=c,++this._numberOfShaders}return++c.count,c.shaderProgram};_h.prototype.replaceDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=this._shaders[o];if(l(r)){X4(this,r);let s=i.derivedKeywords.indexOf(t);s>-1&&i.derivedKeywords.splice(s,1)}return this.createDerivedShaderProgram(e,t,n)};_h.prototype.getDerivedShaderProgram=function(e,t){let n=e._cachedShader,i=t+n.keyword,o=this._shaders[i];if(l(o))return o.shaderProgram};_h.prototype.createDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=n.vertexShaderSource,s=n.fragmentShaderSource,a=n.attributeLocations;typeof r=="string"&&(r=new Ye({sources:[r]})),typeof s=="string"&&(s=new Ye({sources:[s]}));let c=this._context,d=r.createCombinedVertexShader(c),u=s.createCombinedFragmentShader(c),m=new qt({gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:r,vertexShaderText:d,fragmentShaderSource:s,fragmentShaderText:u,attributeLocations:a}),p={cache:this,shaderProgram:m,keyword:o,derivedKeywords:[],count:0};return i.derivedKeywords.push(t),m._cachedShader=p,this._shaders[o]=p,m};function X4(e,t){let n=t.derivedKeywords,i=n.length;for(let o=0;o<i;++o){let r=n[o]+t.keyword,s=e._shaders[r];X4(e,s)}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}_h.prototype.destroyReleasedShaderPrograms=function(){let e=this._shadersToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];X4(this,n),--this._numberOfShaders}this._shadersToRelease={}};_h.prototype.releaseShaderProgram=function(e){if(l(e)){let t=e._cachedShader;t&&--t.count===0&&(this._shadersToRelease[t.keyword]=t)}};_h.prototype.isDestroyed=function(){return!1};_h.prototype.destroy=function(){let e=this._shaders;for(let t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return me(this)};var Aw=_h;var xZi=S(T(),1);function gS(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}Object.defineProperties(gS.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}});gS.prototype.getTexture=function(e){let t=this._textures[e];if(l(t))return delete this._texturesToRelease[e],++t.count,t.texture};gS.prototype.addTexture=function(e,t){let n={texture:t,count:1};t.finalDestroy=t.destroy;let i=this;t.destroy=function(){--n.count===0&&(i._texturesToRelease[e]=n)},this._textures[e]=n,++this._numberOfTextures};gS.prototype.destroyReleasedTextures=function(){let e=this._texturesToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];delete this._textures[t],n.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}};gS.prototype.isDestroyed=function(){return!1};gS.prototype.destroy=function(){let e=this._textures;for(let t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return me(this)};var Mw=gS;var BZi=S(T(),1);var CZi=S(T(),1);function Drt(e){e=y(e,y.EMPTY_OBJECT),this.color=Y.clone(y(e.color,Y.WHITE)),this.intensity=y(e.intensity,2)}var Jb=Drt;function NV(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new ze,this._viewportCartesian4=new se,this._viewportDirty=!1,this._viewportOrthographicMatrix=A.clone(A.IDENTITY),this._viewportTransformation=A.clone(A.IDENTITY),this._model=A.clone(A.IDENTITY),this._view=A.clone(A.IDENTITY),this._inverseView=A.clone(A.IDENTITY),this._projection=A.clone(A.IDENTITY),this._infiniteProjection=A.clone(A.IDENTITY),this._entireFrustum=new D,this._currentFrustum=new D,this._frustumPlanes=new se,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=$.clone(A.IDENTITY),this._view3DDirty=!0,this._view3D=new A,this._inverseView3DDirty=!0,this._inverseView3D=new A,this._inverseModelDirty=!0,this._inverseModel=new A,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new $,this._viewRotation=new $,this._inverseViewRotation=new $,this._viewRotation3D=new $,this._inverseViewRotation3D=new $,this._inverseProjectionDirty=!0,this._inverseProjection=new A,this._modelViewDirty=!0,this._modelView=new A,this._modelView3DDirty=!0,this._modelView3D=new A,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new A,this._inverseModelViewDirty=!0,this._inverseModelView=new A,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new A,this._viewProjectionDirty=!0,this._viewProjection=new A,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new A,this._modelViewProjectionDirty=!0,this._modelViewProjection=new A,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new A,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new A,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new A,this._normalDirty=!0,this._normal=new $,this._normal3DDirty=!0,this._normal3D=new $,this._inverseNormalDirty=!0,this._inverseNormal=new $,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new $,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new Yn,this._cameraPosition=new h,this._sunPositionWC=new h,this._sunPositionColumbusView=new h,this._sunDirectionWC=new h,this._sunDirectionEC=new h,this._moonDirectionEC=new h,this._lightDirectionWC=new h,this._lightDirectionEC=new h,this._lightColor=new h,this._lightColorHdr=new h,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new h,this._cameraRight=new h,this._cameraUp=new h,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new D,this._eyeEllipsoidNormalEC=new h,this._eyeEllipsoidCurvature=new D,this._modelToEnu=new A,this._enuToModel=new A,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new Y,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new D,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._fogMinimumBrightness=void 0,this._atmosphereHsbShift=void 0,this._atmosphereLightIntensity=void 0,this._atmosphereRayleighCoefficient=new h,this._atmosphereRayleighScaleHeight=new h,this._atmosphereMieCoefficient=new h,this._atmosphereMieScaleHeight=void 0,this._atmosphereMieAnisotropy=void 0,this._atmosphereDynamicLighting=void 0,this._invertClassificationColor=void 0,this._splitPosition=0,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0}Object.defineProperties(NV.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!ze.equals(e,this._viewport)){ze.clone(e,this._viewport);let t=this._viewport,n=this._viewportCartesian4;n.x=t.x,n.y=t.y,n.z=t.width,n.w=t.height,this._viewportDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return fge(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return fge(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){A.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,A.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){let e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,A.getMatrix3(this.inverseModel,e),$.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return P4(this),this._view3D}},viewRotation:{get:function(){return P4(this),this._viewRotation}},viewRotation3D:{get:function(){return P4(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return gge(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return gge(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return $rt(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return est(this),this._modelView}},modelView3D:{get:function(){return tst(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return ast(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return nst(this),this._inverseModelView}},inverseModelView3D:{get:function(){return ist(this),this._inverseModelView3D}},viewProjection:{get:function(){return ost(this),this._viewProjection}},inverseViewProjection:{get:function(){return rst(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return sst(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return cst(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return lst(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return dst(this),this._modelViewInfiniteProjection}},normal:{get:function(){return ust(this),this._normal}},normal3D:{get:function(){return mst(this),this._normal3D}},inverseNormal:{get:function(){return hst(this),this._inverseNormal}},inverseNormal3D:{get:function(){return fst(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight:{get:function(){return this._eyeHeight}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},eyeEllipsoidNormalEC:{get:function(){return this._eyeEllipsoidNormalEC}},eyeEllipsoidCurvature:{get:function(){return this._eyeEllipsoidCurvature}},modelToEnu:{get:function(){return this._modelToEnu}},enuToModel:{get:function(){return this._enuToModel}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return bge(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return bge(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},fogMinimumBrightness:{get:function(){return this._fogMinimumBrightness}},atmosphereHsbShift:{get:function(){return this._atmosphereHsbShift}},atmosphereLightIntensity:{get:function(){return this._atmosphereLightIntensity}},atmosphereRayleighCoefficient:{get:function(){return this._atmosphereRayleighCoefficient}},atmosphereRayleighScaleHeight:{get:function(){return this._atmosphereRayleighScaleHeight}},atmosphereMieCoefficient:{get:function(){return this._atmosphereMieCoefficient}},atmosphereMieScaleHeight:{get:function(){return this._atmosphereMieScaleHeight}},atmosphereMieAnisotropy:{get:function(){return this._atmosphereMieAnisotropy}},atmosphereDynamicLighting:{get:function(){return this._atmosphereDynamicLighting}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsDimensions:{get:function(){return this._specularEnvironmentMapsDimensions}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},splitPosition:{get:function(){return this._splitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},ellipsoid:{get:function(){return y(this._ellipsoid,te.default)}}});function Brt(e,t){A.clone(t,e._view),A.getMatrix3(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0}function Yrt(e,t){A.clone(t,e._inverseView),A.getMatrix3(t,e._inverseViewRotation)}function Ort(e,t){A.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function zrt(e,t){A.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}var hge=new h,Krt=new A;function Hrt(e,t){h.clone(t.positionWC,e._cameraPosition),h.clone(t.directionWC,e._cameraDirection),h.clone(t.rightWC,e._cameraRight),h.clone(t.upWC,e._cameraUp);let n=e._ellipsoid,i,o=t.positionCartographic;if(l(o)?(e._eyeHeight=o.height,e._eyeEllipsoidNormalEC=n.geodeticSurfaceNormalCartographic(o,e._eyeEllipsoidNormalEC),i=h.fromRadians(o.longitude,o.latitude,0,n,hge)):(e._eyeHeight=-n.maximumRadius,h.magnitude(t.positionWC)>0&&(e._eyeEllipsoidNormalEC=h.normalize(t.positionWC,e._eyeEllipsoidNormalEC)),i=n.scaleToGeodeticSurface(t.positionWC,hge)),e._encodedCameraPositionMCDirty=!0,!l(i))return;e._eyeEllipsoidNormalEC=$.multiplyByVector(e._viewRotation,e._eyeEllipsoidNormalEC,e._eyeEllipsoidNormalEC);let r=Gt.eastNorthUpToFixedFrame(i,n,Krt);e._enuToModel=A.multiplyTransformation(e.inverseModel,r,e._enuToModel),e._modelToEnu=A.inverseTransformation(e._enuToModel,e._modelToEnu),X.equalsEpsilon(n._radii.x,n._radii.y,X.EPSILON15)&&(e._eyeEllipsoidCurvature=n.getLocalCurvature(i,e._eyeEllipsoidCurvature))}var Nw=new $,Jrt=new he;function Qrt(e,t){l(Gt.computeIcrfToFixedMatrix(t.time,Nw))||(Nw=Gt.computeTemeToPseudoFixedMatrix(t.time,Nw));let n=uy.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);$.multiplyByVector(Nw,n,n),h.normalize(n,e._sunDirectionWC),n=$.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),h.normalize(n,n),n=uy.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),$.multiplyByVector(Nw,n,n),$.multiplyByVector(e.viewRotation3D,n,n),h.normalize(n,n);let i=t.mapProjection,r=i.ellipsoid.cartesianToCartographic(e._sunPositionWC,Jrt);i.project(r,e._sunPositionColumbusView)}NV.prototype.updateCamera=function(e){Brt(this,e.viewMatrix),Yrt(this,e.inverseViewMatrix),Hrt(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==oe.SCENE2D&&e.frustum instanceof sn};NV.prototype.updateFrustum=function(e){Ort(this,e.projectionMatrix),l(e.infiniteProjectionMatrix)&&zrt(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=X.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne;let t=e.offCenterFrustum;l(t)&&(e=t),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right};NV.prototype.updatePass=function(e){this._pass=e};var jrt=[],qrt=new Jb;NV.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,this._pixelRatio=e.pixelRatio;let t=e.camera;this.updateCamera(t),e.mode===oe.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=this._frustum2DWidth*.5,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),Qrt(this,e);let n=y(e.light,qrt);n instanceof Jb?(this._lightDirectionWC=h.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=h.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=h.normalize(h.negate(n.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=$.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));let i=n.color,o=h.fromElements(i.red,i.green,i.blue,this._lightColorHdr);o=h.multiplyByScalar(o,n.intensity,o);let r=h.maximumComponent(o);r>1?h.divideByScalar(o,r,this._lightColor):h.clone(o,this._lightColor);let s=e.brdfLutGenerator,a=l(s)?s.colorTexture:void 0;this._brdfLut=a,this._environmentMap=y(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=y(e.sphericalHarmonicCoefficients,jrt),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,l(this._specularEnvironmentMaps)&&D.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._fogMinimumBrightness=e.fog.minimumBrightness;let c=e.atmosphere;l(c)&&(this._atmosphereHsbShift=h.fromElements(c.hueShift,c.saturationShift,c.brightnessShift,this._atmosphereHsbShift),this._atmosphereLightIntensity=c.lightIntensity,this._atmosphereRayleighCoefficient=h.clone(c.rayleighCoefficient,this._atmosphereRayleighCoefficient),this._atmosphereRayleighScaleHeight=c.rayleighScaleHeight,this._atmosphereMieCoefficient=h.clone(c.mieCoefficient,this._atmosphereMieCoefficient),this._atmosphereMieScaleHeight=c.mieScaleHeight,this._atmosphereMieAnisotropy=c.mieAnisotropy,this._atmosphereDynamicLighting=c.dynamicLighting),this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=Gt.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._splitPosition=e.splitPosition*e.context.drawingBufferWidth;let d=t.frustum.fov,u=this._viewport,m;l(d)?u.height>u.width?m=Math.tan(.5*d)*2/u.height:m=Math.tan(.5*d)*2/u.width:m=1/Math.max(u.width,u.height),this._geometricToleranceOverMeter=m*e.maximumScreenSpaceError,Y.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};function fge(e){if(e._viewportDirty){let t=e._viewport;A.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),A.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1}}function $rt(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode!==oe.SCENE2D&&e._mode!==oe.MORPHING&&!e._orthographicIn3D?A.inverse(e._projection,e._inverseProjection):A.clone(A.ZERO,e._inverseProjection))}function est(e){e._modelViewDirty&&(e._modelViewDirty=!1,A.multiplyTransformation(e._view,e._model,e._modelView))}function tst(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,A.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function nst(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,A.inverse(e.modelView,e._inverseModelView))}function ist(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,A.inverse(e.modelView3D,e._inverseModelView3D))}function ost(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,A.multiply(e._projection,e._view,e._viewProjection))}function rst(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,A.inverse(e.viewProjection,e._inverseViewProjection))}function sst(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,A.multiply(e._projection,e.modelView,e._modelViewProjection))}function ast(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;let t=e.modelView,n=e._modelViewRelativeToEye;n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=0,n[13]=0,n[14]=0,n[15]=t[15]}}function cst(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,A.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function lst(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,A.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function dst(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,A.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function ust(e){if(e._normalDirty){e._normalDirty=!1;let t=e._normal;A.getMatrix3(e.inverseModelView,t),$.transpose(t,t)}}function mst(e){if(e._normal3DDirty){e._normal3DDirty=!1;let t=e._normal3D;A.getMatrix3(e.inverseModelView3D,t),$.transpose(t,t)}}function hst(e){if(e._inverseNormalDirty){e._inverseNormalDirty=!1;let t=e._inverseNormal;A.getMatrix3(e.modelView,t),$.transpose(t,t)}}function fst(e){if(e._inverseNormal3DDirty){e._inverseNormal3DDirty=!1;let t=e._inverseNormal3D;A.getMatrix3(e.modelView3D,t),$.transpose(t,t)}}var pge=new h;function bge(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,A.multiplyByPoint(e.inverseModel,e._cameraPosition,pge),Yn.fromCartesian(pge,e._encodedCameraPositionMC))}var pst=new h,bst=new h,gst=new h,yst=new h,xst=new he,_st=new h,Sst=new A;function Tst(e,t,n,i,o,r,s,a){let c=pst;c.x=e.y,c.y=e.z,c.z=e.x;let d=bst;d.x=n.y,d.y=n.z,d.z=n.x;let u=gst;u.x=i.y,u.y=i.z,u.z=i.x;let m=yst;m.x=t.y,m.y=t.z,m.z=t.x,r===oe.SCENE2D&&(c.z=o*.5);let p=s.unproject(c,xst);p.longitude=X.clamp(p.longitude,-Math.PI,Math.PI),p.latitude=X.clamp(p.latitude,-X.PI_OVER_TWO,X.PI_OVER_TWO);let g=s.ellipsoid,f=g.cartographicToCartesian(p,_st),x=Gt.eastNorthUpToFixedFrame(f,g,Sst);return A.multiplyByPointAsVector(x,d,d),A.multiplyByPointAsVector(x,u,u),A.multiplyByPointAsVector(x,m,m),l(a)||(a=new A),a[0]=d.x,a[1]=u.x,a[2]=-m.x,a[3]=0,a[4]=d.y,a[5]=u.y,a[6]=-m.y,a[7]=0,a[8]=d.z,a[9]=u.z,a[10]=-m.z,a[11]=0,a[12]=-h.dot(d,f),a[13]=-h.dot(u,f),a[14]=h.dot(m,f),a[15]=1,a}function P4(e){e._view3DDirty&&(e._mode===oe.SCENE3D?A.clone(e._view,e._view3D):Tst(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),A.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function gge(e){e._inverseView3DDirty&&(A.inverseTransformation(e.view3D,e._inverseView3D),A.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}var Uw=NV;function Dd(e,t){let{getWebGLStub:n,requestWebgl1:i,webgl:o={},allowTextureFilterAnisotropic:r=!0}=y(t,{});o.alpha=y(o.alpha,!1),o.stencil=y(o.stencil,!0),o.powerPreference=y(o.powerPreference,"high-performance");let s=l(n)?n(e,o):Cst(e,o,i),c=typeof WebGL2RenderingContext<"u"&&s instanceof WebGL2RenderingContext;this._canvas=e,this._originalGLContext=s,this._gl=s,this._webgl2=c,this._id=Bn(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new Aw(this),this._textureCache=new Mw;let d=s;this._stencilBits=d.getParameter(d.STENCIL_BITS),Mt._maximumCombinedTextureImageUnits=d.getParameter(d.MAX_COMBINED_TEXTURE_IMAGE_UNITS),Mt._maximumCubeMapSize=d.getParameter(d.MAX_CUBE_MAP_TEXTURE_SIZE),Mt._maximumFragmentUniformVectors=d.getParameter(d.MAX_FRAGMENT_UNIFORM_VECTORS),Mt._maximumTextureImageUnits=d.getParameter(d.MAX_TEXTURE_IMAGE_UNITS),Mt._maximumRenderbufferSize=d.getParameter(d.MAX_RENDERBUFFER_SIZE),Mt._maximumTextureSize=d.getParameter(d.MAX_TEXTURE_SIZE),Mt._maximumVaryingVectors=d.getParameter(d.MAX_VARYING_VECTORS),Mt._maximumVertexAttributes=d.getParameter(d.MAX_VERTEX_ATTRIBS),Mt._maximumVertexTextureImageUnits=d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Mt._maximumVertexUniformVectors=d.getParameter(d.MAX_VERTEX_UNIFORM_VECTORS),Mt._maximumSamples=this._webgl2?d.getParameter(d.MAX_SAMPLES):0;let u=d.getParameter(d.ALIASED_LINE_WIDTH_RANGE);Mt._minimumAliasedLineWidth=u[0],Mt._maximumAliasedLineWidth=u[1];let m=d.getParameter(d.ALIASED_POINT_SIZE_RANGE);Mt._minimumAliasedPointSize=m[0],Mt._maximumAliasedPointSize=m[1];let p=d.getParameter(d.MAX_VIEWPORT_DIMS);Mt._maximumViewportWidth=p[0],Mt._maximumViewportHeight=p[1];let g=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_FLOAT);Mt._highpFloatSupported=g.precision!==0;let f=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_INT);Mt._highpIntSupported=f.rangeMax!==0,this._antialias=d.getContextAttributes().antialias,this._standardDerivatives=!!Mr(d,["OES_standard_derivatives"]),this._blendMinmax=!!Mr(d,["EXT_blend_minmax"]),this._elementIndexUint=!!Mr(d,["OES_element_index_uint"]),this._depthTexture=!!Mr(d,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!Mr(d,["EXT_frag_depth"]),this._debugShaders=Mr(d,["WEBGL_debug_shaders"]),this._textureFloat=!!Mr(d,["OES_texture_float"]),this._textureHalfFloat=!!Mr(d,["OES_texture_half_float"]),this._textureFloatLinear=!!Mr(d,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!Mr(d,["OES_texture_half_float_linear"]),this._colorBufferFloat=!!Mr(d,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!Mr(d,["EXT_float_blend"]),this._colorBufferHalfFloat=!!Mr(d,["EXT_color_buffer_half_float"]),this._s3tc=!!Mr(d,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!Mr(d,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._astc=!!Mr(d,["WEBGL_compressed_texture_astc"]),this._etc=!!Mr(d,["WEBG_compressed_texture_etc"]),this._etc1=!!Mr(d,["WEBGL_compressed_texture_etc1"]),this._bc7=!!Mr(d,["EXT_texture_compression_bptc"]),gl.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);let x=r?Mr(d,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;this._textureFilterAnisotropic=x,Mt._maximumTextureFilterAnisotropy=l(x)?d.getParameter(x.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1;let _,C,V,Z,R,G,W,v,P,F;if(c){let E=this;_=function(){return E._gl.createVertexArray()},C=function(I){E._gl.bindVertexArray(I)},V=function(I){E._gl.deleteVertexArray(I)},Z=function(I,w,N,B,k){d.drawElementsInstanced(I,w,N,B,k)},R=function(I,w,N,B){d.drawArraysInstanced(I,w,N,B)},G=function(I,w){d.vertexAttribDivisor(I,w)},W=function(I){d.drawBuffers(I)}}else v=Mr(d,["OES_vertex_array_object"]),l(v)&&(_=function(){return v.createVertexArrayOES()},C=function(E){v.bindVertexArrayOES(E)},V=function(E){v.deleteVertexArrayOES(E)}),P=Mr(d,["ANGLE_instanced_arrays"]),l(P)&&(Z=function(E,I,w,N,B){P.drawElementsInstancedANGLE(E,I,w,N,B)},R=function(E,I,w,N){P.drawArraysInstancedANGLE(E,I,w,N)},G=function(E,I){P.vertexAttribDivisorANGLE(E,I)}),F=Mr(d,["WEBGL_draw_buffers"]),l(F)&&(W=function(E){F.drawBuffersWEBGL(E)});this.glCreateVertexArray=_,this.glBindVertexArray=C,this.glDeleteVertexArray=V,this.glDrawElementsInstanced=Z,this.glDrawArraysInstanced=R,this.glVertexAttribDivisor=G,this.glDrawBuffers=W,this._vertexArrayObject=!!v,this._instancedArrays=!!P,this._drawBuffers=!!F,Mt._maximumDrawBuffers=this.drawBuffers?d.getParameter(ie.MAX_DRAW_BUFFERS):1,Mt._maximumColorAttachments=this.drawBuffers?d.getParameter(ie.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new Y(0,0,0,0),this._clearDepth=1,this._clearStencil=0;let M=new Uw,b=new xc(this),L=De.fromCache();this._defaultPassState=b,this._defaultRenderState=L,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=M,this._currentRenderState=L,this._currentPassState=b,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(let E=0;E<Mt._maximumVertexAttributes;E++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this.options={getWebGLStub:n,requestWebgl1:i,webgl:o,allowTextureFilterAnisotropic:r},this.cache={},De.apply(d,L,b)}function Cst(e,t,n){if(typeof WebGLRenderingContext>"u")throw new ue("The browser does not support WebGL. Visit http://get.webgl.org.");!n&&!(typeof WebGL2RenderingContext<"u")&&(n=!0);let o=n?"webgl":"webgl2",r=e.getContext(o,t);if(!l(r))throw new ue("The browser supports WebGL, but initialization failed.");return r}function Vst(e,t){let n="WebGL Error: ";switch(t){case e.INVALID_ENUM:n+="INVALID_ENUM";break;case e.INVALID_VALUE:n+="INVALID_VALUE";break;case e.INVALID_OPERATION:n+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:n+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:n+="CONTEXT_LOST_WEBGL lost";break;default:n+=`Unknown (${t})`}return n}function Zst(e,t,n,i){let o=`${Vst(e,i)}: ${t.name}(`;for(let r=0;r<n.length;++r)r!==0&&(o+=", "),o+=n[r];return o+=");",o}function Lst(e,t,n){let i=e.getError();if(i!==e.NO_ERROR)throw new ue(Zst(e,t,n,i))}function Rst(e,t,n){return{get:function(){let i=e[t];return n(e,`get: ${t}`,i),e[t]},set:function(i){e[t]=i,n(e,`set: ${t}`,i)}}}function Gst(e,t){if(!l(t))return e;function n(o){return function(){let r=o.apply(e,arguments);return t(e,o,arguments),r}}let i={};for(let o in e){let r=e[o];r instanceof Function?i[o]=n(r):Object.defineProperty(i,o,Rst(e,o,t))}return i}function Mr(e,t){let n=t.length;for(let i=0;i<n;++i){let o=e.getExtension(t[i]);if(o)return o}}var Est={};Object.defineProperties(Dd.prototype,{id:{get:function(){return this._id}},webgl2:{get:function(){return this._webgl2}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return this._stencilBits>=8}},antialias:{get:function(){return this._antialias}},msaa:{get:function(){return this._webgl2}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},astc:{get:function(){return this._astc}},etc:{get:function(){return this._etc}},etc1:{get:function(){return this._etc1}},bc7:{get:function(){return this._bc7}},supportsBasis:{get:function(){return this._s3tc||this._pvrtc||this._astc||this._etc||this._etc1||this._bc7}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=Gst(this._originalGLContext,e?Lst:void 0)}},defaultTexture:{get:function(){return this._defaultTexture===void 0&&(this._defaultTexture=new Et({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultEmissiveTexture:{get:function(){return this._defaultEmissiveTexture===void 0&&(this._defaultEmissiveTexture=new Et({context:this,pixelFormat:at.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0])},flipY:!1})),this._defaultEmissiveTexture}},defaultNormalTexture:{get:function(){return this._defaultNormalTexture===void 0&&(this._defaultNormalTexture=new Et({context:this,pixelFormat:at.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([128,128,255])},flipY:!1})),this._defaultNormalTexture}},defaultCubeMap:{get:function(){if(this._defaultCubeMap===void 0){let e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new ja({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},drawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth}},defaultFramebuffer:{get:function(){return Est}}});function yge(e,t,n,i){let o=e._currentRenderState,r=e._currentPassState;e._currentRenderState=t,e._currentPassState=n,De.partialApply(e._gl,o,t,r,n,i)}var v4;typeof WebGLRenderingContext<"u"&&(v4=[ie.BACK]);function w4(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;let n=v4;if(l(t))t._bind(),n=t._getActiveColorAttachments();else{let i=e._gl;i.bindFramebuffer(i.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}var Wst=new ii;Dd.prototype.clear=function(e,t){e=y(e,Wst),t=y(t,this._defaultPassState);let n=this._gl,i=0,o=e.color,r=e.depth,s=e.stencil;l(o)&&(Y.equals(this._clearColor,o)||(Y.clone(o,this._clearColor),n.clearColor(o.red,o.green,o.blue,o.alpha)),i|=n.COLOR_BUFFER_BIT),l(r)&&(r!==this._clearDepth&&(this._clearDepth=r,n.clearDepth(r)),i|=n.DEPTH_BUFFER_BIT),l(s)&&(s!==this._clearStencil&&(this._clearStencil=s,n.clearStencil(s)),i|=n.STENCIL_BUFFER_BIT);let a=y(e.renderState,this._defaultRenderState);yge(this,a,t,!0);let c=y(e.framebuffer,t.framebuffer);w4(this,c),n.clear(i)};function Ist(e,t,n,i,o){w4(e,t),yge(e,o,n,!1),i._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,i.maximumTextureUnitIndex)}function Xst(e,t,n,i){let o=t._primitiveType,r=t._vertexArray,s=t._offset,a=t._count,c=t.instanceCount;e._us.model=y(t._modelMatrix,A.IDENTITY),n._setUniforms(i,e._us,e.validateShaderProgram),r._bind();let d=r.indexBuffer;l(d)?(s=s*d.bytesPerIndex,l(a)?a=Math.min(a,d.numberOfIndices):a=d.numberOfIndices,c===0?e._gl.drawElements(o,a,d.indexDatatype,s):e.glDrawElementsInstanced(o,a,d.indexDatatype,s,c)):(l(a)?a=Math.min(a,r.numberOfVertices):a=r.numberOfVertices,c===0?e._gl.drawArrays(o,s,a):e.glDrawArraysInstanced(o,s,a,c)),r._unBind()}Dd.prototype.draw=function(e,t,n,i){t=y(t,this._defaultPassState);let o=y(e._framebuffer,t.framebuffer),r=y(e._renderState,this._defaultRenderState);n=y(n,e._shaderProgram),i=y(i,e._uniformMap),Ist(this,o,t,n,r),Xst(this,e,n,i)};Dd.prototype.endFrame=function(){let e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);let t=v4;this.drawBuffers&&this.glDrawBuffers(t);let n=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(let i=0;i<n;++i)e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)};Dd.prototype.readPixels=function(e){let t=this._gl;e=y(e,y.EMPTY_OBJECT);let n=Math.max(y(e.x,0),0),i=Math.max(y(e.y,0),0),o=y(e.width,t.drawingBufferWidth),r=y(e.height,t.drawingBufferHeight),s=e.framebuffer,a=Ke.UNSIGNED_BYTE;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype);let c=at.createTypedArray(at.RGBA,a,o,r);return w4(this,s),t.readPixels(n,i,o,r,at.RGBA,Ke.toWebGLConstant(a,this),c),c};var xge={position:0,textureCoordinates:1};Dd.prototype.getViewportQuadVertexArray=function(){let e=this.cache.viewportQuad_vertexArray;if(!l(e)){let t=new ut({attributes:{position:new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:Fe.TRIANGLES});e=ei.fromGeometry({context:this,geometry:t,attributeLocations:xge,bufferUsage:Ne.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e};Dd.prototype.createViewportQuadCommand=function(e,t){return t=y(t,y.EMPTY_OBJECT),new tt({vertexArray:this.getViewportQuadVertexArray(),primitiveType:Fe.TRIANGLES,renderState:t.renderState,shaderProgram:qt.fromCache({context:this,vertexShaderSource:uS,fragmentShaderSource:e,attributeLocations:xge}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})};Dd.prototype.getObjectByPickColor=function(e){return this._pickObjects[e.toRgba()]};function F4(e,t,n){this._pickObjects=e,this.key=t,this.color=n}Object.defineProperties(F4.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}});F4.prototype.destroy=function(){delete this._pickObjects[this.key]};Dd.prototype.createPickId=function(e){++this._nextPickColor[0];let t=this._nextPickColor[0];if(t===0)throw new ue("Out of unique Pick IDs.");return this._pickObjects[t]=e,new F4(this._pickObjects,t,Y.fromRgba(t))};Dd.prototype.isDestroyed=function(){return!1};Dd.prototype.destroy=function(){let e=this.cache;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];l(n.destroy)&&n.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultEmissiveTexture=this._defaultEmissiveTexture&&this._defaultEmissiveTexture.destroy(),this._defaultNormalTexture=this._defaultNormalTexture&&this._defaultNormalTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),me(this)};Dd._deprecationWarning=Yr;var kw=Dd;var RLi=S(T(),1);var CLi=S(T(),1),Dw={NONE:0,SCENE_LIGHT:1,SUNLIGHT:2};Dw.fromGlobeFlags=function(e){return e.enableLighting&&e.dynamicAtmosphereLighting?e.dynamicAtmosphereLightingFromSun?Dw.SUNLIGHT:Dw.SCENE_LIGHT:Dw.NONE};var yS=Object.freeze(Dw);function Pst(){this.lightIntensity=10,this.rayleighCoefficient=new h(55e-7,13e-6,284e-7),this.mieCoefficient=new h(21e-6,21e-6,21e-6),this.rayleighScaleHeight=1e4,this.mieScaleHeight=3200,this.mieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.dynamicLighting=yS.NONE}var Bw=Pst;var NLi=S(T(),1);function Yw(){this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(Yw.prototype,{colorTexture:{get:function(){return this._colorTexture}}});function vst(e,t,n){let i=t.createViewportQuadCommand(vv,{framebuffer:n,renderState:De.fromCache({viewport:new ze(0,0,256,256)})});e._drawCommand=i}Yw.prototype.update=function(e){if(!l(this._colorTexture)){let t=e.context,n=new Et({context:t,width:256,height:256,pixelFormat:at.RGBA,pixelDatatype:Ke.UNSIGNED_BYTE,sampler:rn.NEAREST});this._colorTexture=n;let i=new na({context:t,colorTextures:[n],destroyAttachments:!1});vst(this,t,i),this._drawCommand.execute(t),i.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}};Yw.prototype.isDestroyed=function(){return!1};Yw.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),me(this)};var Ow=Yw;var ERi=S(T(),1);var jLi=S(T(),1);var Cge={};function wst(e,t,n){let i,o,r;if(e instanceof Ti){let s=Math.tan(.5*e.fovy);return i=e.near,o=e.near*s,r=e.aspectRatio*o,Math.max(t*i/r,n*i/o)}else if(e instanceof rl)return i=e.near,o=e.top,r=e.right,Math.max(t*i/r,n*i/o);return Math.max(t,n)}var Fst=new h,_ge=new h;function Vge(e,t,n,i){if(l(i)&&n(.5)>i){let o=n(0),r=n(1),s=n(.5),a=s-o,c=s-r;return function(d){let u=n(d);if(d<=.5){let p=(u-o)/a;return X.lerp(e,-X.PI_OVER_TWO,p)}let m=(u-r)/c;return X.lerp(-X.PI_OVER_TWO,t,1-m)}}return function(o){return X.lerp(e,t,o)}}function M4(e,t,n,i,o){let r=o,s=Math.max(n,i);if(!l(r)){let a=e.position,c=t,d=e.up,u=e.right,m=e.frustum,p=h.subtract(a,c,Fst),g=h.magnitude(h.multiplyByScalar(d,h.dot(p,d),_ge)),f=h.magnitude(h.multiplyByScalar(u,h.dot(p,u),_ge));r=Math.min(wst(m,g,f)*.2,1e9)}if(s<r){let d=-Math.pow((r-n)*1e6,.125),u=Math.pow((r-i)*1e6,1/8);return function(m){let p=m*(u-d)+d;return-Math.pow(p,8)/1e6+r}}return function(a){return X.lerp(n,i,a)}}function zw(e,t){return X.equalsEpsilon(e,X.TWO_PI,X.EPSILON11)&&(e=0),t>e+Math.PI?e+=X.TWO_PI:t<e-Math.PI&&(e-=X.TWO_PI),e}var Zge=new h;function Ast(e,t,n,i,o,r,s,a){let c=e.camera,d=h.clone(c.position,Zge),u=c.pitch,m=zw(c.heading,i),p=zw(c.roll,r),g=M4(c,n,d.z,n.z,s),f=Vge(u,o,g,a);function x(_){let C=_.time/t;c.setView({orientation:{heading:X.lerp(m,i,C),pitch:f(C),roll:X.lerp(p,r,C)}}),D.lerp(d,n,C,c.position),c.position.z=g(C)}return x}function Mst(e,t){e.longitude<t.longitude?e.longitude+=X.TWO_PI:t.longitude+=X.TWO_PI}function Nst(e,t){let n=e.longitude-t.longitude;n<-X.PI?e.longitude+=X.TWO_PI:n>X.PI&&(t.longitude+=X.TWO_PI)}var Ust=new he,kst=new he;function Dst(e,t,n,i,o,r,s,a,c,d){let u=e.camera,p=e.mapProjection.ellipsoid,g=he.clone(u.positionCartographic,Ust),f=u.pitch,x=zw(u.heading,i),_=zw(u.roll,r),C=p.cartesianToCartographic(n,kst);g.longitude=X.zeroToTwoPi(g.longitude),C.longitude=X.zeroToTwoPi(C.longitude);let V=!1;if(l(a)){let W=X.zeroToTwoPi(a),v=Math.min(g.longitude,C.longitude),P=Math.max(g.longitude,C.longitude),F=W>=v&&W<=P;if(l(c)){let M=Math.abs(g.longitude-C.longitude),b=X.TWO_PI-M;(F?M:b)<(F?b:M)*c&&!F&&(V=!0)}else F||(V=!0)}V?Mst(g,C):Nst(g,C);let Z=M4(u,n,g.height,C.height,s),R=Vge(f,o,Z,d);function G(){let W=g.longitude,v=C.longitude,P=g.latitude,F=C.latitude;return function(b){let L=b.time/t,E=h.fromRadians(X.lerp(W,v,L),X.lerp(P,F,L),Z(L),p);u.setView({destination:E,orientation:{heading:X.lerp(x,i,L),pitch:R(L),roll:X.lerp(_,r,L)}})}}return G()}function Bst(e,t,n,i,o,r,s){let a=e.camera,c=h.clone(a.position,Zge),d=zw(a.heading,i),u=a.frustum.right-a.frustum.left,m=M4(a,n,u,n.z,s);function p(g){let f=g.time/t;a.setView({orientation:{heading:X.lerp(d,i,f)}}),D.lerp(c,n,f,a.position);let x=m(f),_=a.frustum,C=_.top/_.right,V=(x-(_.right-_.left))*.5;_.right+=V,_.left-=V,_.top=C*_.right,_.bottom=-_.top}return p}var Sge=new he,Yst=new h;function A4(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function Tge(e,t){function n(){typeof t=="function"&&t(),e.enableInputs=!0}return n}Cge.createTween=function(e,t){t=y(t,y.EMPTY_OBJECT);let n=t.destination,i=e.mode;if(i===oe.MORPHING)return A4();let o=y(t.convert,!0),r=e.mapProjection,s=r.ellipsoid,a=t.maximumHeight,c=t.flyOverLongitude,d=t.flyOverLongitudeWeight,u=t.pitchAdjustHeight,m=t.easingFunction;o&&i!==oe.SCENE3D&&(s.cartesianToCartographic(n,Sge),n=r.project(Sge,Yst));let p=e.camera,g=t.endTransform;l(g)&&p._setTransform(g);let f=t.duration;l(f)||(f=Math.ceil(h.distance(p.position,n)/1e6)+2,f=Math.min(f,3));let x=y(t.heading,0),_=y(t.pitch,-X.PI_OVER_TWO),C=y(t.roll,0),V=e.screenSpaceCameraController;V.enableInputs=!1;let Z=Tge(V,t.complete),R=Tge(V,t.cancel),G=p.frustum,W=e.mode===oe.SCENE2D;if(W=W&&D.equalsEpsilon(p.position,n,X.EPSILON6),W=W&&X.equalsEpsilon(Math.max(G.right-G.left,G.top-G.bottom),n.z,X.EPSILON6),W=W||e.mode!==oe.SCENE2D&&h.equalsEpsilon(n,p.position,X.EPSILON10),W=W&&X.equalsEpsilon(X.negativePiToPi(x),X.negativePiToPi(p.heading),X.EPSILON10)&&X.equalsEpsilon(X.negativePiToPi(_),X.negativePiToPi(p.pitch),X.EPSILON10)&&X.equalsEpsilon(X.negativePiToPi(C),X.negativePiToPi(p.roll),X.EPSILON10),W)return A4(Z,R);let v=new Array(4);if(v[oe.SCENE2D]=Bst,v[oe.SCENE3D]=Dst,v[oe.COLUMBUS_VIEW]=Ast,f<=0)return A4(function(){v[i](e,1,n,x,_,C,a,c,d,u)({time:1}),typeof Z=="function"&&Z()},R);let P=v[i](e,f,n,x,_,C,a,c,d,u);if(!l(m)){let F=p.positionCartographic.height,M=i===oe.SCENE3D?s.cartesianToCartographic(n).height:n.z;F>M&&F>11500?m=Ar.CUBIC_OUT:m=Ar.QUINTIC_IN_OUT}return{duration:f,easingFunction:m,startObject:{time:0},stopObject:{time:f},update:P,complete:Z,cancel:R}};var Kw=Cge;var $Li=S(T(),1),Ost={ROTATE:0,INFINITE_SCROLL:1},Jl=Object.freeze(Ost);function en(e){this._scene=e,this._transform=A.clone(A.IDENTITY),this._invTransform=A.clone(A.IDENTITY),this._actualTransform=A.clone(A.IDENTITY),this._actualInvTransform=A.clone(A.IDENTITY),this._transformChanged=!1,this.position=new h,this._position=new h,this._positionWC=new h,this._positionCartographic=new he,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new h,this._direction=new h,this._directionWC=new h,this.up=new h,this._up=new h,this._upWC=new h,this.right=new h,this._right=new h,this._rightWC=new h,this.frustum=new Ti,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=X.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new ge,this._moveEnd=new ge,this._changed=new ge,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this._changedHeading=void 0,this._changedRoll=void 0,this.percentageChanged=.5,this._viewMatrix=new A,this._invViewMatrix=new A,Pge(this),this._mode=oe.SCENE3D,this._modeChanged=!0;let t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new he(Math.PI,X.PI_OVER_TWO)),this._max2Dfrustum=void 0,Oge(this,en.DEFAULT_VIEW_RECTANGLE,this.position,!0);let n=h.magnitude(this.position);n+=n*en.DEFAULT_VIEW_FACTOR,h.normalize(this.position,this.position),h.multiplyByScalar(this.position,n,this.position)}en.TRANSFORM_2D=new A(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);en.TRANSFORM_2D_INVERSE=A.inverseTransformation(en.TRANSFORM_2D,new A);en.DEFAULT_VIEW_RECTANGLE=ce.fromDegrees(-95,-20,-70,90);en.DEFAULT_VIEW_FACTOR=.5;en.DEFAULT_OFFSET=new Bu(0,-X.PI_OVER_FOUR,0);function Pge(e){A.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),A.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),A.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function zst(e){if(!l(e._oldPositionWC))e._oldPositionWC=h.clone(e.positionWC,e._oldPositionWC);else{e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;let t=h.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=h.magnitude(t),e._oldPositionWC=h.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=gi()):e.timeSinceMoved=Math.max(gi()-e._lastMovedTimestamp,0)/1e3}}en.prototype.canPreloadFlight=function(){return l(this._currentFlight)&&this._mode!==oe.SCENE2D};en.prototype._updateCameraChanged=function(){let e=this;if(zst(e),e._changed.numberOfListeners===0)return;let t=e.percentageChanged,n=e.heading;l(e._changedHeading)||(e._changedHeading=n);let i=Math.abs(e._changedHeading-n)%X.TWO_PI;i=i>X.PI?X.TWO_PI-i:i;let o=i/Math.PI;o>t&&(e._changedHeading=n);let r=e.roll;l(e._changedRoll)||(e._changedRoll=r);let s=Math.abs(e._changedRoll-r)%X.TWO_PI;s=s>X.PI?X.TWO_PI-s:s;let a=s/Math.PI;if(a>t&&(e._changedRoll=r),(a>t||o>t)&&e._changed.raiseEvent(Math.max(a,o)),e._mode===oe.SCENE2D){if(!l(e._changedFrustum)){e._changedPosition=h.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone();return}let p=e.position,g=e._changedPosition,f=e.frustum,x=e._changedFrustum,_=p.x+f.left,C=p.x+f.right,V=g.x+x.left,Z=g.x+x.right,R=p.y+f.bottom,G=p.y+f.top,W=g.y+x.bottom,v=g.y+x.top,P=Math.max(_,V),F=Math.min(C,Z),M=Math.max(R,W),b=Math.min(G,v),L;if(P>=F||M>=G)L=1;else{let E=x;_<V&&C>Z&&R<W&&G>v&&(E=f),L=1-(F-P)*(b-M)/((E.right-E.left)*(E.top-E.bottom))}L>t&&(e._changed.raiseEvent(L),e._changedPosition=h.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum));return}if(!l(e._changedDirection)){e._changedPosition=h.clone(e.positionWC,e._changedPosition),e._changedDirection=h.clone(e.directionWC,e._changedDirection);return}let c=X.acosClamped(h.dot(e.directionWC,e._changedDirection)),d;l(e.frustum.fovy)?d=c/(e.frustum.fovy*.5):d=c;let m=h.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(d>t||m>t)&&(e._changed.raiseEvent(Math.max(d,m)),e._changedPosition=h.clone(e.positionWC,e._changedPosition),e._changedDirection=h.clone(e.directionWC,e._changedDirection))};function Kst(e){Gt.basisTo2D(e._projection,e._transform,e._actualTransform)}var Hst=new he,Jst=new h,RD=new h,Qst=new se,jst=new se,qst=new se,$st=new se,eat=new se;function tat(e){let t=e._projection,n=t.ellipsoid,i=A.getColumn(e._transform,3,Qst),o=n.cartesianToCartographic(i,Hst),r=t.project(o,Jst),s=jst;s.x=r.z,s.y=r.x,s.z=r.y,s.w=1;let a=se.clone(se.UNIT_X,eat),c=se.add(A.getColumn(e._transform,0,RD),i,RD);n.cartesianToCartographic(c,o),t.project(o,r);let d=qst;d.x=r.z,d.y=r.x,d.z=r.y,d.w=0,h.subtract(d,s,d),d.x=0;let u=$st;if(h.magnitudeSquared(d)>X.EPSILON10)h.cross(a,d,u);else{let m=se.add(A.getColumn(e._transform,1,RD),i,RD);n.cartesianToCartographic(m,o),t.project(o,r),u.x=r.z,u.y=r.x,u.z=r.y,u.w=0,h.subtract(u,s,u),u.x=0,h.magnitudeSquared(u)<X.EPSILON10&&(se.clone(se.UNIT_Y,d),se.clone(se.UNIT_Z,u))}h.cross(u,a,d),h.normalize(d,d),h.cross(a,d,u),h.normalize(u,u),A.setColumn(e._actualTransform,0,d,e._actualTransform),A.setColumn(e._actualTransform,1,u,e._actualTransform),A.setColumn(e._actualTransform,2,a,e._actualTransform),A.setColumn(e._actualTransform,3,s,e._actualTransform)}var N4=new h;function Sc(e){let t=e._mode,n=!1,i=0;t===oe.SCENE2D&&(i=e.frustum.right-e.frustum.left,n=i!==e._positionCartographic.height);let o=e._position,r=!h.equals(o,e.position)||n;r&&(o=h.clone(e.position,e._position));let s=e._direction,a=!h.equals(s,e.direction);a&&(h.normalize(e.direction,e.direction),s=h.clone(e.direction,e._direction));let c=e._up,d=!h.equals(c,e.up);d&&(h.normalize(e.up,e.up),c=h.clone(e.up,e._up));let u=e._right,m=!h.equals(u,e.right);m&&(h.normalize(e.right,e.right),u=h.clone(e.right,e._right));let p=e._transformChanged||e._modeChanged;e._transformChanged=!1,p&&(A.inverseTransformation(e._transform,e._invTransform),e._mode===oe.COLUMBUS_VIEW||e._mode===oe.SCENE2D?A.equals(A.IDENTITY,e._transform)?A.clone(en.TRANSFORM_2D,e._actualTransform):e._mode===oe.COLUMBUS_VIEW?Kst(e):tat(e):A.clone(e._transform,e._actualTransform),A.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);let g=e._actualTransform;if(r||p)if(e._positionWC=A.multiplyByPoint(g,o,e._positionWC),t===oe.SCENE3D||t===oe.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{let f=N4;f.x=e._positionWC.y,f.y=e._positionWC.z,f.z=e._positionWC.x,t===oe.SCENE2D&&(f.z=i),e._projection.unproject(f,e._positionCartographic)}if(a||d||m){let f=h.dot(s,h.cross(c,u,N4));if(Math.abs(1-f)>X.EPSILON2){let x=1/h.magnitudeSquared(c),_=h.dot(c,s)*x,C=h.multiplyByScalar(s,_,N4);c=h.normalize(h.subtract(c,C,e._up),e._up),h.clone(c,e.up),u=h.cross(s,c,e._right),h.clone(u,e.right)}}(a||p)&&(e._directionWC=A.multiplyByPointAsVector(g,s,e._directionWC),h.normalize(e._directionWC,e._directionWC)),(d||p)&&(e._upWC=A.multiplyByPointAsVector(g,c,e._upWC),h.normalize(e._upWC,e._upWC)),(m||p)&&(e._rightWC=A.multiplyByPointAsVector(g,u,e._rightWC),h.normalize(e._rightWC,e._rightWC)),(r||a||d||m||p)&&Pge(e)}function vge(e,t){let n;return X.equalsEpsilon(Math.abs(e.z),1,X.EPSILON3)?n=Math.atan2(t.y,t.x)-X.PI_OVER_TWO:n=Math.atan2(e.y,e.x)-X.PI_OVER_TWO,X.TWO_PI-X.zeroToTwoPi(n)}function wge(e){return X.PI_OVER_TWO-X.acosClamped(e.z)}function Fge(e,t,n){let i=0;return X.equalsEpsilon(Math.abs(e.z),1,X.EPSILON3)||(i=Math.atan2(-n.z,t.z),i=X.zeroToTwoPi(i+X.TWO_PI)),i}var WD=new A,ID=new A;Object.defineProperties(en.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return Sc(this),this._invTransform}},viewMatrix:{get:function(){return Sc(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return Sc(this),this._invViewMatrix}},positionCartographic:{get:function(){return Sc(this),this._positionCartographic}},positionWC:{get:function(){return Sc(this),this._positionWC}},directionWC:{get:function(){return Sc(this),this._directionWC}},upWC:{get:function(){return Sc(this),this._upWC}},rightWC:{get:function(){return Sc(this),this._rightWC}},heading:{get:function(){if(this._mode!==oe.MORPHING){let e=this._projection.ellipsoid,t=A.clone(this._transform,WD),n=Gt.eastNorthUpToFixedFrame(this.positionWC,e,ID);this._setTransform(n);let i=vge(this.direction,this.up);return this._setTransform(t),i}}},pitch:{get:function(){if(this._mode!==oe.MORPHING){let e=this._projection.ellipsoid,t=A.clone(this._transform,WD),n=Gt.eastNorthUpToFixedFrame(this.positionWC,e,ID);this._setTransform(n);let i=wge(this.direction);return this._setTransform(t),i}}},roll:{get:function(){if(this._mode!==oe.MORPHING){let e=this._projection.ellipsoid,t=A.clone(this._transform,WD),n=Gt.eastNorthUpToFixedFrame(this.positionWC,e,ID);this._setTransform(n);let i=Fge(this.direction,this.up,this.right);return this._setTransform(t),i}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}}});en.prototype.update=function(e){let t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==oe.MORPHING,t=this._mode===oe.SCENE2D),t){let n=this._max2Dfrustum=this.frustum.clone(),i=2,o=n.top/n.right;n.right=this._maxCoord.x*i,n.left=-n.right,n.top=o*n.right,n.bottom=-n.top}this._mode===oe.SCENE2D&&Uge(this,this.position)};var nat=new h,iat=new h,oat=new h;en.prototype._setTransform=function(e){let t=h.clone(this.positionWC,nat),n=h.clone(this.upWC,iat),i=h.clone(this.directionWC,oat);A.clone(e,this._transform),this._transformChanged=!0,Sc(this);let o=this._actualInvTransform;A.multiplyByPoint(o,t,this.position),A.multiplyByPointAsVector(o,i,this.direction),A.multiplyByPointAsVector(o,n,this.up),h.cross(this.direction,this.up,this.right),Sc(this)};var rat=new D,sat=new pn,aat=new h,cat=new h;function Age(e){if(!A.equals(A.IDENTITY,e.transform))return h.magnitude(e.position);let t=e._scene,n=t.globe,i=rat;i.x=t.drawingBufferWidth/2,i.y=t.drawingBufferHeight/2;let o;if(l(n)){let a=e.getPickRay(i,sat);o=n.pickWorldCoordinates(a,t,!0,aat)}let r;t.pickPositionSupported&&(r=t.pickPositionWorldCoordinates(i,cat));let s;if(l(o)||l(r)){let a=l(r)?h.distance(r,e.positionWC):Number.POSITIVE_INFINITY,c=l(o)?h.distance(o,e.positionWC):Number.POSITIVE_INFINITY;s=Math.min(a,c)}else s=Math.max(e.positionCartographic.height,0);return s}en.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof sn&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=Age(this)))};var XD=new h,Y4=new A,lat=new A,O4=new we,z4=new $,Mge=new he;function dat(e,t,n){let i=A.clone(e.transform,Y4),o=Gt.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,lat);e._setTransform(o),h.clone(h.ZERO,e.position),n.heading=n.heading-X.PI_OVER_TWO;let r=we.fromHeadingPitchRoll(n,O4),s=$.fromQuaternion(r,z4);$.getColumn(s,0,e.direction),$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right),e._setTransform(i),e._adjustOrthographicFrustum(!0)}function uat(e,t,n,i){let o=A.clone(e.transform,Y4);if(e._setTransform(A.IDENTITY),!h.equals(t,e.positionWC)){if(i){let a=e._projection,c=a.ellipsoid.cartesianToCartographic(t,Mge);t=a.project(c,XD)}h.clone(t,e.position)}n.heading=n.heading-X.PI_OVER_TWO;let r=we.fromHeadingPitchRoll(n,O4),s=$.fromQuaternion(r,z4);$.getColumn(s,0,e.direction),$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right),e._setTransform(o),e._adjustOrthographicFrustum(!0)}function mat(e,t,n,i){let o=A.clone(e.transform,Y4);if(e._setTransform(A.IDENTITY),!h.equals(t,e.positionWC)){if(i){let c=e._projection,d=c.ellipsoid.cartesianToCartographic(t,Mge);t=c.project(d,XD)}D.clone(t,e.position);let r=-t.z*.5,s=-r,a=e.frustum;if(s>r){let c=a.top/a.right;a.right=s,a.left=r,a.top=a.right*c,a.bottom=-a.top}}if(e._scene.mapMode2D===Jl.ROTATE){n.heading=n.heading-X.PI_OVER_TWO,n.pitch=-X.PI_OVER_TWO,n.roll=0;let r=we.fromHeadingPitchRoll(n,O4),s=$.fromQuaternion(r,z4);$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right)}e._setTransform(o)}var hat=new h,fat=new h,pat=new h;function Nge(e,t,n,i){let o=h.clone(n.direction,hat),r=h.clone(n.up,fat);if(e._scene.mode===oe.SCENE3D){let a=e._projection.ellipsoid,c=Gt.eastNorthUpToFixedFrame(t,a,WD),d=A.inverseTransformation(c,ID);A.multiplyByPointAsVector(d,o,o),A.multiplyByPointAsVector(d,r,r)}let s=h.cross(o,r,pat);return i.heading=vge(o,r),i.pitch=wge(o),i.roll=Fge(o,r,s),i}var B4={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},UV=new Ja;en.prototype.setView=function(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.orientation,y.EMPTY_OBJECT),n=this._mode;if(n===oe.MORPHING)return;l(e.endTransform)&&this._setTransform(e.endTransform);let i=y(e.convert,!0),o=y(e.destination,h.clone(this.positionWC,XD));l(o)&&l(o.west)&&(o=this.getRectangleCameraCoordinates(o,XD),i=!1),l(t.direction)&&(t=Nge(this,o,t,B4.orientation)),UV.heading=y(t.heading,0),UV.pitch=y(t.pitch,-X.PI_OVER_TWO),UV.roll=y(t.roll,0),n===oe.SCENE3D?dat(this,o,UV):n===oe.SCENE2D?mat(this,o,UV,i):uat(this,o,UV,i)};var bat=new h;en.prototype.flyHome=function(e){let t=this._mode;if(t===oe.MORPHING&&this._scene.completeMorph(),t===oe.SCENE2D)this.flyTo({destination:en.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:A.IDENTITY});else if(t===oe.SCENE3D){let n=this.getRectangleCameraCoordinates(en.DEFAULT_VIEW_RECTANGLE),i=h.magnitude(n);i+=i*en.DEFAULT_VIEW_FACTOR,h.normalize(n,n),h.multiplyByScalar(n,i,n),this.flyTo({destination:n,duration:e,endTransform:A.IDENTITY})}else if(t===oe.COLUMBUS_VIEW){let n=this._projection.ellipsoid.maximumRadius,i=new h(0,-1,1);i=h.multiplyByScalar(h.normalize(i,i),5*n,i),this.flyTo({destination:i,duration:e,orientation:{heading:0,pitch:-Math.acos(h.normalize(i,bat).z),roll:0},endTransform:A.IDENTITY,convert:!1})}};en.prototype.worldToCameraCoordinates=function(e,t){return l(t)||(t=new se),Sc(this),A.multiplyByVector(this._actualInvTransform,e,t)};en.prototype.worldToCameraCoordinatesPoint=function(e,t){return l(t)||(t=new h),Sc(this),A.multiplyByPoint(this._actualInvTransform,e,t)};en.prototype.worldToCameraCoordinatesVector=function(e,t){return l(t)||(t=new h),Sc(this),A.multiplyByPointAsVector(this._actualInvTransform,e,t)};en.prototype.cameraToWorldCoordinates=function(e,t){return l(t)||(t=new se),Sc(this),A.multiplyByVector(this._actualTransform,e,t)};en.prototype.cameraToWorldCoordinatesPoint=function(e,t){return l(t)||(t=new h),Sc(this),A.multiplyByPoint(this._actualTransform,e,t)};en.prototype.cameraToWorldCoordinatesVector=function(e,t){return l(t)||(t=new h),Sc(this),A.multiplyByPointAsVector(this._actualTransform,e,t)};function Uge(e,t){let n=e._scene.mapMode2D===Jl.ROTATE,i=e._maxCoord.x,o=e._maxCoord.y,r,s;n?(s=i,r=-s):(s=t.x-i*2,r=t.x+i*2),t.x>i&&(t.x=s),t.x<-i&&(t.x=r),t.y>o&&(t.y=o),t.y<-o&&(t.y=-o)}var Lge=new h;en.prototype.move=function(e,t){let n=this.position;h.multiplyByScalar(e,t,Lge),h.add(n,Lge,n),this._mode===oe.SCENE2D&&Uge(this,n),this._adjustOrthographicFrustum(!0)};en.prototype.moveForward=function(e){e=y(e,this.defaultMoveAmount),this._mode===oe.SCENE2D?PD(this,e):this.move(this.direction,e)};en.prototype.moveBackward=function(e){e=y(e,this.defaultMoveAmount),this._mode===oe.SCENE2D?PD(this,-e):this.move(this.direction,-e)};en.prototype.moveUp=function(e){e=y(e,this.defaultMoveAmount),this.move(this.up,e)};en.prototype.moveDown=function(e){e=y(e,this.defaultMoveAmount),this.move(this.up,-e)};en.prototype.moveRight=function(e){e=y(e,this.defaultMoveAmount),this.move(this.right,e)};en.prototype.moveLeft=function(e){e=y(e,this.defaultMoveAmount),this.move(this.right,-e)};en.prototype.lookLeft=function(e){e=y(e,this.defaultLookAmount),this._mode!==oe.SCENE2D&&this.look(this.up,-e)};en.prototype.lookRight=function(e){e=y(e,this.defaultLookAmount),this._mode!==oe.SCENE2D&&this.look(this.up,e)};en.prototype.lookUp=function(e){e=y(e,this.defaultLookAmount),this._mode!==oe.SCENE2D&&this.look(this.right,-e)};en.prototype.lookDown=function(e){e=y(e,this.defaultLookAmount),this._mode!==oe.SCENE2D&&this.look(this.right,e)};var gat=new we,yat=new $;en.prototype.look=function(e,t){let n=y(t,this.defaultLookAmount),i=we.fromAxisAngle(e,-n,gat),o=$.fromQuaternion(i,yat),r=this.direction,s=this.up,a=this.right;$.multiplyByVector(o,r,r),$.multiplyByVector(o,s,s),$.multiplyByVector(o,a,a)};en.prototype.twistLeft=function(e){e=y(e,this.defaultLookAmount),this.look(this.direction,e)};en.prototype.twistRight=function(e){e=y(e,this.defaultLookAmount),this.look(this.direction,-e)};var xat=new we,_at=new $;en.prototype.rotate=function(e,t){let n=y(t,this.defaultRotateAmount),i=we.fromAxisAngle(e,-n,xat),o=$.fromQuaternion(i,_at);$.multiplyByVector(o,this.position,this.position),$.multiplyByVector(o,this.direction,this.direction),$.multiplyByVector(o,this.up,this.up),h.cross(this.direction,this.up,this.right),h.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)};en.prototype.rotateDown=function(e){e=y(e,this.defaultRotateAmount),kge(this,e)};en.prototype.rotateUp=function(e){e=y(e,this.defaultRotateAmount),kge(this,-e)};var Sat=new h,Tat=new h,Cat=new h,Rge=new h;function kge(e,t){let n=e.position;if(l(e.constrainedAxis)&&!h.equalsEpsilon(e.position,h.ZERO,X.EPSILON2)){let i=h.normalize(n,Sat),o=h.equalsEpsilon(i,e.constrainedAxis,X.EPSILON2),r=h.equalsEpsilon(i,h.negate(e.constrainedAxis,Rge),X.EPSILON2);if(!o&&!r){let s=h.normalize(e.constrainedAxis,Tat),a=h.dot(i,s),c=X.acosClamped(a);t>0&&t>c&&(t=c-X.EPSILON4),a=h.dot(i,h.negate(s,Rge)),c=X.acosClamped(a),t<0&&-t>c&&(t=-c+X.EPSILON4);let d=h.cross(s,i,Cat);e.rotate(d,t)}else(o&&t<0||r&&t>0)&&e.rotate(e.right,t)}else e.rotate(e.right,t)}en.prototype.rotateRight=function(e){e=y(e,this.defaultRotateAmount),Dge(this,-e)};en.prototype.rotateLeft=function(e){e=y(e,this.defaultRotateAmount),Dge(this,e)};function Dge(e,t){l(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function PD(e,t){let n=e.frustum,i;if(t=t*.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){let o=n.top-t,r=n.bottom+t,s=e._maxCoord.y;e._scene.mapMode2D===Jl.ROTATE&&(s*=e.maximumZoomFactor),r>s&&(r=s,o=-s),o<=r&&(o=1,r=-1),i=n.right/n.top,n.top=o,n.bottom=r,n.right=n.top*i,n.left=-n.right}else{let o=n.right-t,r=n.left+t,s=e._maxCoord.x;e._scene.mapMode2D===Jl.ROTATE&&(s*=e.maximumZoomFactor),o>s&&(o=s,r=-s),o<=r&&(o=1,r=-1),i=n.top/n.right,n.right=o,n.left=r,n.top=n.right*i,n.bottom=-n.top}}function Bge(e,t){e.move(e.direction,t)}en.prototype.zoomIn=function(e){e=y(e,this.defaultZoomAmount),this._mode===oe.SCENE2D?PD(this,e):Bge(this,e)};en.prototype.zoomOut=function(e){e=y(e,this.defaultZoomAmount),this._mode===oe.SCENE2D?PD(this,-e):Bge(this,-e)};en.prototype.getMagnitude=function(){if(this._mode===oe.SCENE3D)return h.magnitude(this.position);if(this._mode===oe.COLUMBUS_VIEW)return Math.abs(this.position.z);if(this._mode===oe.SCENE2D)return Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom)};var Vat=new A;en.prototype.lookAt=function(e,t){let n=this._scene,i=y(n.ellipsoid,te.default),o=Gt.eastNorthUpToFixedFrame(e,i,Vat);this.lookAtTransform(o,t)};var Zat=new h,Lat=new we,Rat=new we,Gat=new $;function Yge(e,t,n){t=X.clamp(t,-X.PI_OVER_TWO,X.PI_OVER_TWO),e=X.zeroToTwoPi(e)-X.PI_OVER_TWO;let i=we.fromAxisAngle(h.UNIT_Y,-t,Lat),o=we.fromAxisAngle(h.UNIT_Z,-e,Rat),r=we.multiply(o,i,o),s=$.fromQuaternion(r,Gat),a=h.clone(h.UNIT_X,Zat);return $.multiplyByVector(s,a,a),h.negate(a,a),h.multiplyByScalar(a,n,a),a}en.prototype.lookAtTransform=function(e,t){if(this._setTransform(e),!l(t))return;let n;if(l(t.heading)?n=Yge(t.heading,t.pitch,t.range):n=t,this._mode===oe.SCENE2D){D.clone(D.ZERO,this.position),h.negate(n,this.up),this.up.z=0,h.magnitudeSquared(this.up)<X.EPSILON10&&h.clone(h.UNIT_Y,this.up),h.normalize(this.up,this.up),this._setTransform(A.IDENTITY),h.negate(h.UNIT_Z,this.direction),h.cross(this.direction,this.up,this.right),h.normalize(this.right,this.right);let i=this.frustum,o=i.top/i.right;i.right=h.magnitude(n)*.5,i.left=-i.right,i.top=o*i.right,i.bottom=-i.top,this._setTransform(e);return}h.clone(n,this.position),h.negate(this.position,this.direction),h.normalize(this.direction,this.direction),h.cross(this.direction,h.UNIT_Z,this.right),h.magnitudeSquared(this.right)<X.EPSILON10&&h.clone(h.UNIT_X,this.right),h.normalize(this.right,this.right),h.cross(this.right,this.direction,this.up),h.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)};var Hw=new he,Eat=new he,Wat=new h,Iat=new h,Xat=new h,Pat=new h,vat=new h,wat=new h,Fat=new h,U4=new h,Aat={direction:new h,right:new h,up:new h},Gge;function _c(e,t,n,i){return Math.abs(h.dot(t,n))/i-h.dot(e,n)}function Oge(e,t,n,i){let o=e._projection.ellipsoid,r=i?e:Aat,s=t.north,a=t.south,c=t.east,d=t.west;d>c&&(c+=X.TWO_PI);let u=(d+c)*.5,m;if(a<-X.PI_OVER_TWO+X.RADIANS_PER_DEGREE&&s>X.PI_OVER_TWO-X.RADIANS_PER_DEGREE)m=0;else{let F=Hw;F.longitude=u,F.latitude=s,F.height=0;let M=Eat;M.longitude=u,M.latitude=a,M.height=0;let b=Gge;(!l(b)||b.ellipsoid!==o)&&(Gge=b=new gp(void 0,void 0,o)),b.setEndPoints(F,M),m=b.interpolateUsingFraction(.5,Hw).latitude}let p=Hw;p.longitude=u,p.latitude=m,p.height=0;let g=o.cartographicToCartesian(p,Fat),f=Hw;f.longitude=c,f.latitude=s;let x=o.cartographicToCartesian(f,Wat);f.longitude=d;let _=o.cartographicToCartesian(f,Xat);f.longitude=u;let C=o.cartographicToCartesian(f,vat);f.latitude=a;let V=o.cartographicToCartesian(f,wat);f.longitude=c;let Z=o.cartographicToCartesian(f,Pat);f.longitude=d;let R=o.cartographicToCartesian(f,Iat);h.subtract(_,g,_),h.subtract(Z,g,Z),h.subtract(x,g,x),h.subtract(R,g,R),h.subtract(C,g,C),h.subtract(V,g,V);let G=o.geodeticSurfaceNormal(g,r.direction);h.negate(G,G);let W=h.cross(G,h.UNIT_Z,r.right);h.normalize(W,W);let v=h.cross(W,G,r.up),P;if(e.frustum instanceof sn){let F=Math.max(h.distance(x,_),h.distance(Z,R)),M=Math.max(h.distance(x,Z),h.distance(_,R)),b,L,E=e.frustum._offCenterFrustum,I=E.right/E.top,w=M*I;F>w?(b=F,L=b/I):(L=M,b=w),P=Math.max(b,L)}else{let F=Math.tan(e.frustum.fovy*.5),M=e.frustum.aspectRatio*F;if(P=Math.max(_c(G,v,_,F),_c(G,v,Z,F),_c(G,v,x,F),_c(G,v,R,F),_c(G,v,C,F),_c(G,v,V,F),_c(G,W,_,M),_c(G,W,Z,M),_c(G,W,x,M),_c(G,W,R,M),_c(G,W,C,M),_c(G,W,V,M)),a<0&&s>0){let b=Hw;b.longitude=d,b.latitude=0,b.height=0;let L=o.cartographicToCartesian(b,U4);h.subtract(L,g,L),P=Math.max(P,_c(G,v,L,F),_c(G,W,L,M)),b.longitude=c,L=o.cartographicToCartesian(b,U4),h.subtract(L,g,L),P=Math.max(P,_c(G,v,L,F),_c(G,W,L,M))}}return h.add(g,h.multiplyByScalar(G,-P,U4),n)}var Mat=new he,Nat=new h,Uat=new h;function kat(e,t,n){let i=e._projection;t.west>t.east&&(t=ce.MAX_VALUE);let o=e._actualTransform,r=e._actualInvTransform,s=Mat;s.longitude=t.east,s.latitude=t.north;let a=i.project(s,Nat);A.multiplyByPoint(o,a,a),A.multiplyByPoint(r,a,a),s.longitude=t.west,s.latitude=t.south;let c=i.project(s,Uat);if(A.multiplyByPoint(o,c,c),A.multiplyByPoint(r,c,c),n.x=(a.x-c.x)*.5+c.x,n.y=(a.y-c.y)*.5+c.y,l(e.frustum.fovy)){let d=Math.tan(e.frustum.fovy*.5),u=e.frustum.aspectRatio*d;n.z=Math.max((a.x-c.x)/u,(a.y-c.y)/d)*.5}else{let d=a.x-c.x,u=a.y-c.y;n.z=Math.max(d,u)}return n}var Dat=new he,Bat=new h,Yat=new h;function Oat(e,t,n){let i=e._projection,o=t.east;t.west>t.east&&(e._scene.mapMode2D===Jl.INFINITE_SCROLL?o+=X.TWO_PI:(t=ce.MAX_VALUE,o=t.east));let r=Dat;r.longitude=o,r.latitude=t.north;let s=i.project(r,Bat);r.longitude=t.west,r.latitude=t.south;let a=i.project(r,Yat),c=Math.abs(s.x-a.x)*.5,d=Math.abs(s.y-a.y)*.5,u,m,p=e.frustum.right/e.frustum.top,g=d*p;return c>g?(u=c,m=u/p):(m=d,u=g),d=Math.max(2*u,2*m),n.x=(s.x-a.x)*.5+a.x,n.y=(s.y-a.y)*.5+a.y,r=i.unproject(n,r),r.height=d,n=i.project(r,n),n}en.prototype.getRectangleCameraCoordinates=function(e,t){let n=this._mode;if(l(t)||(t=new h),n===oe.SCENE3D)return Oge(this,e,t);if(n===oe.COLUMBUS_VIEW)return kat(this,e,t);if(n===oe.SCENE2D)return Oat(this,e,t)};var zat=new pn;function Kat(e,t,n,i){n=y(n,te.default);let o=e.getPickRay(t,zat),r=jn.rayEllipsoid(o,n);if(!r)return;let s=r.start>0?r.start:r.stop;return pn.getPoint(o,s,i)}var Hat=new pn;function Jat(e,t,n,i){let r=e.getPickRay(t,Hat).origin;r=h.fromElements(r.y,r.z,0,r);let s=n.unproject(r);if(!(s.latitude<-X.PI_OVER_TWO||s.latitude>X.PI_OVER_TWO))return n.ellipsoid.cartographicToCartesian(s,i)}var Qat=new pn;function jat(e,t,n,i){let o=e.getPickRay(t,Qat),r=-o.origin.x/o.direction.x;pn.getPoint(o,r,i);let s=n.unproject(new h(i.y,i.z,0));if(!(s.latitude<-X.PI_OVER_TWO||s.latitude>X.PI_OVER_TWO||s.longitude<-Math.PI||s.longitude>Math.PI))return n.ellipsoid.cartographicToCartesian(s,i)}en.prototype.pickEllipsoid=function(e,t,n){let i=this._scene.canvas;if(!(i.clientWidth===0||i.clientHeight===0)){if(l(n)||(n=new h),t=y(t,te.default),this._mode===oe.SCENE3D)n=Kat(this,e,t,n);else if(this._mode===oe.SCENE2D)n=Jat(this,e,this._projection,n);else if(this._mode===oe.COLUMBUS_VIEW)n=jat(this,e,this._projection,n);else return;return n}};var qat=new h,$at=new h,ect=new h;function tct(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=Math.tan(e.frustum.fovy*.5),a=e.frustum.aspectRatio*s,c=e.frustum.near,d=2/o*t.x-1,u=2/r*(r-t.y)-1,m=e.positionWC;h.clone(m,n.origin);let p=h.multiplyByScalar(e.directionWC,c,qat);h.add(m,p,p);let g=h.multiplyByScalar(e.rightWC,d*c*a,$at),f=h.multiplyByScalar(e.upWC,u*c*s,ect),x=h.add(p,g,n.direction);return h.add(x,f,x),h.subtract(x,m,x),h.normalize(x,x),n}var GD=new h;function nct(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=e.frustum,a=s.offCenterFrustum;l(a)&&(s=a);let c=2/o*t.x-1;c*=(s.right-s.left)*.5;let d=2/r*(r-t.y)-1;d*=(s.top-s.bottom)*.5;let u=n.origin;return h.clone(e.position,u),h.multiplyByScalar(e.right,c,GD),h.add(GD,u,u),h.multiplyByScalar(e.up,d,GD),h.add(GD,u,u),h.clone(e.directionWC,n.direction),(e._mode===oe.COLUMBUS_VIEW||e._mode===oe.SCENE2D)&&h.fromElements(n.origin.z,n.origin.x,n.origin.y,n.origin),n}en.prototype.getPickRay=function(e,t){l(t)||(t=new pn);let n=this._scene.canvas;if(n.clientWidth<=0||n.clientHeight<=0)return;let i=this.frustum;return l(i.aspectRatio)&&l(i.fov)&&l(i.near)?tct(this,e,t):nct(this,e,t)};var ict=new h,oct=new h;en.prototype.distanceToBoundingSphere=function(e){let t=h.subtract(this.positionWC,e.center,ict),n=h.multiplyByScalar(this.directionWC,h.dot(t,this.directionWC),oct);return Math.max(0,h.magnitude(n)-e.radius)};var rct=new D;en.prototype.getPixelSize=function(e,t,n){let i=this.distanceToBoundingSphere(e),o=this.frustum.getPixelDimensions(t,n,i,this._scene.pixelRatio,rct);return Math.max(o.x,o.y)};function sct(e,t,n,i,o,r){let s=h.clone(t);n.y>i?s.y-=n.y-i:n.y<-i&&(s.y+=-i-n.y),n.z>o?s.z-=n.z-o:n.z<-o&&(s.z+=-o-n.z);function a(c){let d=h.lerp(t,s,c.time,new h);e.worldToCameraCoordinatesPoint(d,e.position)}return{easingFunction:Ar.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:r,update:a}}var act=new h,Ege=new h,cct=new h,lct=new h;function dct(e,t){let n=e.position,i=e.direction,o=e.worldToCameraCoordinatesVector(h.UNIT_X,act),r=-h.dot(o,n)/h.dot(o,i),s=h.add(n,h.multiplyByScalar(i,r,Ege),Ege);e.cameraToWorldCoordinatesPoint(s,s),n=e.cameraToWorldCoordinatesPoint(e.position,cct);let a=Math.tan(e.frustum.fovy*.5),c=e.frustum.aspectRatio*a,d=h.magnitude(h.subtract(n,s,lct)),u=c*d,m=a*d,p=e._maxCoord.x,g=e._maxCoord.y,f=Math.max(u-p,p),x=Math.max(m-g,g);if(n.z<-f||n.z>f||n.y<-x||n.y>x){let _=s.y<-f||s.y>f,C=s.z<-x||s.z>x;if(_||C)return sct(e,n,s,f,x,t)}}en.prototype.createCorrectPositionTween=function(e){if(this._mode===oe.COLUMBUS_VIEW)return dct(this,e)};var uct=new h,Ks={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};en.prototype.cancelFlight=function(){l(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)};en.prototype.completeFlight=function(){if(l(this._currentFlight)){this._currentFlight.cancelTween();let e={destination:void 0,orientation:{heading:void 0,pitch:void 0,roll:void 0}};e.destination=Ks.destination,e.orientation.heading=Ks.heading,e.orientation.pitch=Ks.pitch,e.orientation.roll=Ks.roll,this.setView(e),l(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0}};en.prototype.flyTo=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.destination;if(this._mode===oe.MORPHING)return;this.cancelFlight();let i=t instanceof ce;i&&(t=this.getRectangleCameraCoordinates(t,uct));let o=y(e.orientation,y.EMPTY_OBJECT);if(l(o.direction)&&(o=Nge(this,t,o,B4.orientation)),l(e.duration)&&e.duration<=0){let u=B4;u.destination=e.destination,u.orientation.heading=o.heading,u.orientation.pitch=o.pitch,u.orientation.roll=o.roll,u.convert=e.convert,u.endTransform=e.endTransform,this.setView(u),typeof e.complete=="function"&&e.complete();return}let r=this,s;Ks.destination=t,Ks.heading=o.heading,Ks.pitch=o.pitch,Ks.roll=o.roll,Ks.duration=e.duration,Ks.complete=function(){s===r._currentFlight&&(r._currentFlight=void 0),l(e.complete)&&e.complete()},Ks.cancel=e.cancel,Ks.endTransform=e.endTransform,Ks.convert=i?!1:e.convert,Ks.maximumHeight=e.maximumHeight,Ks.pitchAdjustHeight=e.pitchAdjustHeight,Ks.flyOverLongitude=e.flyOverLongitude,Ks.flyOverLongitudeWeight=e.flyOverLongitudeWeight,Ks.easingFunction=e.easingFunction;let a=this._scene,c=Kw.createTween(a,Ks);if(c.duration===0){typeof c.complete=="function"&&c.complete();return}s=a.tweens.add(c),this._currentFlight=s;let d=this._scene.preloadFlightCamera;this._mode!==oe.SCENE2D&&(l(d)||(d=en.clone(this)),d.setView({destination:t,orientation:o}),this._scene.preloadFlightCullingVolume=d.frustum.computeCullingVolume(d.positionWC,d.directionWC,d.upWC))};function mct(e,t){let n=e.frustum,i=Math.tan(n.fovy*.5),o=n.aspectRatio*i;return Math.max(t/o,t/i)}function hct(e,t){let n=e.frustum,i=n.offCenterFrustum;l(i)&&(n=i);let o,r,s=n.right/n.top,a=t*s;return t>a?(o=t,r=o/s):(r=t,o=a),Math.max(o,r)*1.5}var fct=100;function zge(e,t,n){n=Bu.clone(l(n)?n:en.DEFAULT_OFFSET);let i=e._scene.screenSpaceCameraController.minimumZoomDistance,o=e._scene.screenSpaceCameraController.maximumZoomDistance,r=n.range;if(!l(r)||r===0){let s=t.radius;s===0?n.range=fct:e.frustum instanceof sn||e._mode===oe.SCENE2D?n.range=hct(e,s):n.range=mct(e,s),n.range=X.clamp(n.range,i,o)}return n}en.prototype.viewBoundingSphere=function(e,t){t=zge(this,e,t),this.lookAt(e.center,t)};var pct=new A,bct=new h,gct=new h,yct=new h,xct=new h,_ct=new se,Sct=new we,Tct=new $;en.prototype.flyToBoundingSphere=function(e,t){t=y(t,y.EMPTY_OBJECT);let n=this._mode===oe.SCENE2D||this._mode===oe.COLUMBUS_VIEW;this._setTransform(A.IDENTITY);let i=zge(this,e,t.offset),o;n?o=h.multiplyByScalar(h.UNIT_Z,i.range,bct):o=Yge(i.heading,i.pitch,i.range);let r=this._scene,s=y(r.ellipsoid,te.default),a=Gt.eastNorthUpToFixedFrame(e.center,s,pct);A.multiplyByPoint(a,o,o);let c,d;if(!n){if(c=h.subtract(e.center,o,gct),h.normalize(c,c),d=A.multiplyByPointAsVector(a,h.UNIT_Z,yct),1-Math.abs(h.dot(c,d))<X.EPSILON6){let m=we.fromAxisAngle(c,i.heading,Sct),p=$.fromQuaternion(m,Tct);h.fromCartesian4(A.getColumn(a,1,_ct),d),$.multiplyByVector(p,d,d)}let u=h.cross(c,d,xct);h.cross(u,c,d),h.normalize(d,d)}this.flyTo({destination:o,orientation:{direction:c,up:d},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var Wge=new h,Ige=new h,k4=new h,Xge=new h,Jw=[new h,new h,new h,new h];function Cct(e,t){let n=t.radii,i=e.positionWC,o=h.multiplyComponents(t.oneOverRadii,i,Wge),r=h.magnitude(o),s=h.normalize(o,Ige),a,c;h.equalsEpsilon(s,h.UNIT_Z,X.EPSILON10)?(a=new h(0,1,0),c=new h(0,0,1)):(a=h.normalize(h.cross(h.UNIT_Z,s,k4),k4),c=h.normalize(h.cross(s,a,Xge),Xge));let d=Math.sqrt(h.magnitudeSquared(o)-1),u=h.multiplyByScalar(s,1/r,Wge),m=d/r,p=h.multiplyByScalar(a,m,Ige),g=h.multiplyByScalar(c,m,k4),f=h.add(u,g,Jw[0]);h.subtract(f,p,f),h.multiplyComponents(n,f,f);let x=h.subtract(u,g,Jw[1]);h.subtract(x,p,x),h.multiplyComponents(n,x,x);let _=h.subtract(u,g,Jw[2]);h.add(_,p,_),h.multiplyComponents(n,_,_);let C=h.add(u,g,Jw[3]);return h.add(C,p,C),h.multiplyComponents(n,C,C),Jw}var D4=new D,Vct=new h,my=[new he,new he,new he,new he];function ED(e,t,n,i,o,r){D4.x=e,D4.y=t;let s=i.pickEllipsoid(D4,o,Vct);return l(s)?(my[n]=o.cartesianToCartographic(s,my[n]),1):(my[n]=o.cartesianToCartographic(r[n],my[n]),0)}en.prototype.computeViewRectangle=function(e,t){e=y(e,te.default);let n=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),i=new le(h.ZERO,e.maximumRadius);if(n.computeVisibility(i)===Ht.OUTSIDE)return;let r=this._scene.canvas,s=r.clientWidth,a=r.clientHeight,c=0,d=Cct(this,e);if(c+=ED(0,0,0,this,e,d),c+=ED(0,a,1,this,e,d),c+=ED(s,a,2,this,e,d),c+=ED(s,0,3,this,e,d),c<2)return ce.MAX_VALUE;t=ce.fromCartographicArray(my,t);let u=0,m=my[3].longitude;for(let p=0;p<4;++p){let g=my[p].longitude,f=Math.abs(g-m);f>X.PI?u+=X.TWO_PI-f:u+=f,m=g}return X.equalsEpsilon(Math.abs(u),X.TWO_PI,X.EPSILON9)&&(t.west=-X.PI,t.east=X.PI,my[0].latitude>=0?t.north=X.PI_OVER_TWO:t.south=-X.PI_OVER_TWO),t};en.prototype.switchToPerspectiveFrustum=function(){if(this._mode===oe.SCENE2D||this.frustum instanceof Ti)return;let e=this._scene;this.frustum=new Ti,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=X.toRadians(60)};en.prototype.switchToOrthographicFrustum=function(){if(this._mode===oe.SCENE2D||this.frustum instanceof sn)return;let e=Age(this),t=this._scene;this.frustum=new sn,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e};en.clone=function(e,t){return l(t)||(t=new en(e._scene)),h.clone(e.position,t.position),h.clone(e.direction,t.direction),h.clone(e.up,t.up),h.clone(e.right,t.right),A.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};var io=en;var IRi=S(T(),1);function Zct(e){this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}var $u=Zct;var NRi=S(T(),1);var jge=S(nd(),1),Kge=576,Lct=100,Qw="#ffffff",vD="#48b";function qge(e,t){this.credit=e,this.count=y(t,1)}function Rct(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i];if(Vt.equals(o,t))return!0}return!1}function Gct(e){let t=e._previousCesiumCredit,n=e._currentCesiumCredit;Vt.equals(n,t)||(l(t)&&e._cesiumCreditContainer.removeChild(t.element),l(n)&&e._cesiumCreditContainer.appendChild(n.element),e._previousCesiumCredit=n)}var $ge="cesium-credit-delimiter";function Hge(e){let t=document.createElement("span");return t.textContent=e,t.className=$ge,t}function Jge(e,t){if(l(t)){let n=document.createElement(t);n._creditId=e._creditId,n.appendChild(e),e=n}return e}function Qge(e,t,n,i){let o=e.childNodes,r=-1;t.sort(function(s,a){return a.count-s.count});for(let s=0;s<t.length;++s){let a=t[s].credit;if(l(a)){if(r=s,l(n)&&(r*=2,s>0)){let d=r-1;if(o.length<=d)e.appendChild(Hge(n));else{let u=o[d];u.className!==$ge&&e.replaceChild(Hge(n),u)}}let c=a.element;if(o.length<=r)e.appendChild(Jge(c,i));else{let d=o[r];d._creditId!==a._id&&e.replaceChild(Jge(c,i),d)}}}for(++r;r<o.length;)e.removeChild(o[r])}function Ect(e){let t=e._lightboxCredits,n=e.viewport.clientWidth,i=e.viewport.clientHeight;n!==e._lastViewportWidth&&(n<Kge?(t.className="cesium-credit-lightbox cesium-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="cesium-credit-lightbox cesium-credit-lightbox-expanded",t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`),e._lastViewportWidth=n),n>=Kge&&i!==e._lastViewportHeight&&(t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`,e._lastViewportHeight=i)}function Wct(e){let t=` +.cesium-credit-lightbox-overlay { + display: none; + z-index: 1; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(80, 80, 80, 0.8); +} + +.cesium-credit-lightbox { + background-color: #303336; + color: ${Qw}; + position: relative; + min-height: ${Lct}px; + margin: auto; +} +.cesium-credit-lightbox > ul > li a, +.cesium-credit-lightbox > ul > li a:visited, +.cesium-credit-wrapper a, +.cesium-credit-wrapper a:visited { + color: ${Qw}; +} +.cesium-credit-lightbox > ul > li a:hover { + color: ${vD}; +} +.cesium-credit-lightbox.cesium-credit-lightbox-expanded { + border: 1px solid #444; + border-radius: 5px; + max-width: 370px; +} +.cesium-credit-lightbox.cesium-credit-lightbox-mobile { + height: 100%; + width: 100%; +} +.cesium-credit-lightbox-title { + padding: 20px 20px 0 20px; +} +.cesium-credit-lightbox-close { + font-size: 18pt; + cursor: pointer; + position: absolute; + top: 0; + right: 6px; + color: ${Qw}; +} +.cesium-credit-lightbox-close:hover { + color: ${vD}; +} +.cesium-credit-lightbox > ul { + margin: 0; + padding: 12px 20px 12px 40px; + font-size: 13px; +} +.cesium-credit-lightbox > ul > li { + padding-bottom: 6px; +} +.cesium-credit-lightbox > ul > li * { + padding: 0; + margin: 0; +} + +.cesium-credit-expand-link { + padding-left: 5px; + cursor: pointer; + text-decoration: underline; + color: ${Qw}; +} +.cesium-credit-expand-link:hover { + color: ${vD}; +} + +.cesium-credit-text { + color: ${Qw}; +} + +.cesium-credit-delimiter { + padding: 0 5px; +} + +.cesium-credit-textContainer *, +.cesium-credit-logoContainer * { + display: inline; +} + +.cesium-credit-textContainer a:hover { + color: ${vD} +} + +.cesium-credit-textContainer .cesium-credit-wrapper:first-of-type { + padding-left: 5px; +} +`;function n(r){if(r.shadowRoot)return r.shadowRoot;if(r.getRootNode){let s=r.getRootNode();if(s instanceof ShadowRoot)return s}}let i=y(n(e),document.head),o=document.createElement("style");o.innerHTML=t,i.appendChild(o)}function dr(e,t,n){let i=this;n=y(n,document.body);let o=document.createElement("div");o.className="cesium-credit-lightbox-overlay",n.appendChild(o);let r=document.createElement("div");r.className="cesium-credit-lightbox",o.appendChild(r);function s(f){r.contains(f.target)||i.hideLightbox()}o.addEventListener("click",s,!1);let a=document.createElement("div");a.className="cesium-credit-lightbox-title",a.textContent="Data provided by:",r.appendChild(a);let c=document.createElement("a");c.onclick=this.hideLightbox.bind(this),c.innerHTML="×",c.className="cesium-credit-lightbox-close",r.appendChild(c);let d=document.createElement("ul");r.appendChild(d);let u=document.createElement("div");u.className="cesium-credit-logoContainer",u.style.display="inline",e.appendChild(u);let m=document.createElement("div");m.className="cesium-credit-textContainer",m.style.display="inline",e.appendChild(m);let p=document.createElement("a");p.className="cesium-credit-expand-link",p.onclick=this.showLightbox.bind(this),p.textContent="Data attribution",e.appendChild(p),Wct(e);let g=Vt.clone(dr.cesiumCredit);this._delimiter=y(t,"\u2022"),this._screenContainer=m,this._cesiumCreditContainer=u,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=r,this._creditList=d,this._lightbox=o,this._hideLightbox=s,this._expandLink=p,this._expanded=!1,this._staticCredits=[],this._cesiumCredit=g,this._previousCesiumCredit=void 0,this._currentCesiumCredit=g,this._creditDisplayElementPool=[],this._creditDisplayElementIndex=0,this._currentFrameCredits={screenCredits:new Ct,lightboxCredits:new Ct},this._defaultCredit=void 0,this.viewport=n,this.container=e}function eye(e,t,n,i){i=y(i,1);let o=t.get(n.id);if(l(o))o.count<Number.MAX_VALUE&&(o.count+=i);else{let r=e._creditDisplayElementPool,s=e._creditDisplayElementPoolIndex;s<r.length?(o=r[s],o.credit=n,o.count=i):(o=new qge(n,i),r.push(o)),++e._creditDisplayElementPoolIndex,t.set(n.id,o)}}dr.prototype.addCreditToNextFrame=function(e){if(e.isIon()){l(this._defaultCredit)||(this._defaultCredit=Vt.clone(tye())),this._currentCesiumCredit=this._defaultCredit;return}let t;e.showOnScreen?t=this._currentFrameCredits.screenCredits:t=this._currentFrameCredits.lightboxCredits,eye(this,t,e)};dr.prototype.addStaticCredit=function(e){let t=this._staticCredits;Rct(t,e)||t.push(e)};dr.prototype.removeStaticCredit=function(e){let t=this._staticCredits,n=t.indexOf(e);n!==-1&&t.splice(n,1)};dr.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0};dr.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1};dr.prototype.update=function(){this._expanded&&Ect(this)};dr.prototype.beginFrame=function(){let e=this._currentFrameCredits;this._creditDisplayElementPoolIndex=0;let t=e.screenCredits,n=e.lightboxCredits;t.removeAll(),n.removeAll();let i=this._staticCredits;for(let o=0;o<i.length;++o){let r=i[o],s=r.showOnScreen?t:n;r.isIon()&&Vt.equals(dr.cesiumCredit,this._cesiumCredit)||eye(this,s,r,Number.MAX_VALUE)}Vt.equals(dr.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=Vt.clone(dr.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit};dr.prototype.endFrame=function(){let e=this._currentFrameCredits.screenCredits.values;Qge(this._screenContainer,e,this._delimiter,void 0);let t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",Qge(this._creditList,t,void 0,"li"),Gct(this)};dr.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._cesiumCreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),me(this)};dr.prototype.isDestroyed=function(){return!1};dr._cesiumCredit=void 0;dr._cesiumCreditInitialized=!1;var wD;function tye(){if(!l(wD)){let e=tn("Assets/Images/ion-credit.png");e.indexOf("http://")!==0&&e.indexOf("https://")!==0&&e.indexOf("data:")!==0&&(e=new jge.default(e).path()),wD=new Vt(`<a href="https://cesium.com/" target="_blank"><img src="${e}" style="vertical-align: -7px" title="Cesium ion"/></a>`,!0)}return dr._cesiumCreditInitialized||(dr._cesiumCredit=wD,dr._cesiumCreditInitialized=!0),wD}Object.defineProperties(dr,{cesiumCredit:{get:function(){return tye(),dr._cesiumCredit},set:function(e){dr._cesiumCredit=e,dr._cesiumCreditInitialized=!0}}});dr.CreditDisplayElement=qge;var jw=dr;var AGi=S(T(),1);var iGi=S(T(),1);var FD=0,Ict=1;function xS(e){let t=e.frustum,n=e.orientation,i=e.origin,o=y(e.vertexFormat,Xe.DEFAULT),r=y(e._drawNearPlane,!0),s,a;t instanceof Ti?(s=FD,a=Ti.packedLength):t instanceof sn&&(s=Ict,a=sn.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=we.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+h.packedLength+we.packedLength+Xe.packedLength}xS.pack=function(e,t,n){n=y(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===FD?(Ti.pack(o,t,n),n+=Ti.packedLength):(sn.pack(o,t,n),n+=sn.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,we.pack(e._orientation,t,n),n+=we.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n]=e._drawNearPlane?1:0,t};var Xct=new Ti,Pct=new sn,vct=new we,wct=new h,Fct=new Xe;xS.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o;i===FD?(o=Ti.unpack(e,t,Xct),t+=Ti.packedLength):(o=sn.unpack(e,t,Pct),t+=sn.packedLength);let r=h.unpack(e,t,wct);t+=h.packedLength;let s=we.unpack(e,t,vct);t+=we.packedLength;let a=Xe.unpack(e,t,Fct);t+=Xe.packedLength;let c=e[t]===1;if(!l(n))return new xS({frustum:o,origin:r,orientation:s,vertexFormat:a,_drawNearPlane:c});let d=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(d),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=we.clone(s,n._orientation),n._vertexFormat=Xe.clone(a,n._vertexFormat),n._drawNearPlane=c,n};function kV(e,t,n,i,o,r,s,a){let c=e/3*2;for(let d=0;d<4;++d)l(t)&&(t[e]=r.x,t[e+1]=r.y,t[e+2]=r.z),l(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),l(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e+=3;o[c]=0,o[c+1]=0,o[c+2]=1,o[c+3]=0,o[c+4]=1,o[c+5]=1,o[c+6]=0,o[c+7]=1}var Act=new $,Mct=new A,K4=new A,nye=new h,iye=new h,oye=new h,Nct=new h,Uct=new h,kct=new h,hy=new Array(3),qw=new Array(4);qw[0]=new se(-1,-1,1,1);qw[1]=new se(1,-1,1,1);qw[2]=new se(1,1,1,1);qw[3]=new se(-1,1,1,1);var rye=new Array(4);for(let e=0;e<4;++e)rye[e]=new se;xS._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){let c=$.fromQuaternion(t,Act),d=y(r,nye),u=y(s,iye),m=y(a,oye);d=$.getColumn(c,0,d),u=$.getColumn(c,1,u),m=$.getColumn(c,2,m),h.normalize(d,d),h.normalize(u,u),h.normalize(m,m),h.negate(d,d);let p=A.computeView(e,m,u,d,Mct),g,f,x=i.projectionMatrix;if(n===FD){let _=A.multiply(x,p,K4);f=A.inverse(_,K4)}else g=A.inverseTransformation(p,K4);l(f)?(hy[0]=i.near,hy[1]=i.far):(hy[0]=0,hy[1]=i.near,hy[2]=i.far);for(let _=0;_<2;++_)for(let C=0;C<4;++C){let V=se.clone(qw[C],rye[C]);if(l(f)){V=A.multiplyByVector(f,V,V);let Z=1/V.w;h.multiplyByScalar(V,Z,V),h.subtract(V,e,V),h.normalize(V,V);let R=h.dot(m,V);h.multiplyByScalar(V,hy[_]/R,V),h.add(V,e,V)}else{let Z=i.offCenterFrustum;l(Z)&&(i=Z);let R=hy[_],G=hy[_+1];V.x=(V.x*(i.right-i.left)+i.left+i.right)*.5,V.y=(V.y*(i.top-i.bottom)+i.bottom+i.top)*.5,V.z=(V.z*(R-G)-R-G)*.5,V.w=1,A.multiplyByVector(g,V,V)}o[12*_+C*3]=V.x,o[12*_+C*3+1]=V.y,o[12*_+C*3+2]=V.z}};xS.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=e._vertexFormat,a=r?6:5,c=new Float64Array(3*4*6);xS._computeNearFarPlanes(i,o,t,n,c);let d=3*4*2;c[d]=c[3*4],c[d+1]=c[3*4+1],c[d+2]=c[3*4+2],c[d+3]=c[0],c[d+4]=c[1],c[d+5]=c[2],c[d+6]=c[3*3],c[d+7]=c[3*3+1],c[d+8]=c[3*3+2],c[d+9]=c[3*7],c[d+10]=c[3*7+1],c[d+11]=c[3*7+2],d+=3*4,c[d]=c[3*5],c[d+1]=c[3*5+1],c[d+2]=c[3*5+2],c[d+3]=c[3],c[d+4]=c[4],c[d+5]=c[5],c[d+6]=c[0],c[d+7]=c[1],c[d+8]=c[2],c[d+9]=c[3*4],c[d+10]=c[3*4+1],c[d+11]=c[3*4+2],d+=3*4,c[d]=c[3],c[d+1]=c[4],c[d+2]=c[5],c[d+3]=c[3*5],c[d+4]=c[3*5+1],c[d+5]=c[3*5+2],c[d+6]=c[3*6],c[d+7]=c[3*6+1],c[d+8]=c[3*6+2],c[d+9]=c[3*2],c[d+10]=c[3*2+1],c[d+11]=c[3*2+2],d+=3*4,c[d]=c[3*2],c[d+1]=c[3*2+1],c[d+2]=c[3*2+2],c[d+3]=c[3*6],c[d+4]=c[3*6+1],c[d+5]=c[3*6+2],c[d+6]=c[3*7],c[d+7]=c[3*7+1],c[d+8]=c[3*7+2],c[d+9]=c[3*3],c[d+10]=c[3*3+1],c[d+11]=c[3*3+2],r||(c=c.subarray(3*4));let u=new mn({position:new Ge({componentDatatype:Q.DOUBLE,componentsPerAttribute:3,values:c})});if(l(s.normal)||l(s.tangent)||l(s.bitangent)||l(s.st)){let p=l(s.normal)?new Float32Array(12*a):void 0,g=l(s.tangent)?new Float32Array(3*4*a):void 0,f=l(s.bitangent)?new Float32Array(3*4*a):void 0,x=l(s.st)?new Float32Array(2*4*a):void 0,_=nye,C=iye,V=oye,Z=h.negate(_,Nct),R=h.negate(C,Uct),G=h.negate(V,kct);d=0,r&&(kV(d,p,g,f,x,G,_,C),d+=3*4),kV(d,p,g,f,x,V,Z,C),d+=3*4,kV(d,p,g,f,x,Z,G,C),d+=3*4,kV(d,p,g,f,x,R,G,Z),d+=3*4,kV(d,p,g,f,x,_,V,C),d+=3*4,kV(d,p,g,f,x,C,V,Z),l(p)&&(u.normal=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:p})),l(g)&&(u.tangent=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:g})),l(f)&&(u.bitangent=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:f})),l(x)&&(u.st=new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:2,values:x}))}let m=new Uint16Array(6*a);for(let p=0;p<a;++p){let g=p*6,f=p*4;m[g]=f,m[g+1]=f+1,m[g+2]=f+2,m[g+3]=f,m[g+4]=f+2,m[g+5]=f+3}return new ut({attributes:u,indices:m,primitiveType:Fe.TRIANGLES,boundingSphere:le.fromVertices(c)})};var _S=xS;var yGi=S(T(),1);var H4=0,Dct=1;function $w(e){let t=e.frustum,n=e.orientation,i=e.origin,o=y(e._drawNearPlane,!0),r,s;t instanceof Ti?(r=H4,s=Ti.packedLength):t instanceof sn&&(r=Dct,s=sn.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=we.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+h.packedLength+we.packedLength}$w.pack=function(e,t,n){n=y(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===H4?(Ti.pack(o,t,n),n+=Ti.packedLength):(sn.pack(o,t,n),n+=sn.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,we.pack(e._orientation,t,n),n+=we.packedLength,t[n]=e._drawNearPlane?1:0,t};var Bct=new Ti,Yct=new sn,Oct=new we,zct=new h;$w.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o;i===H4?(o=Ti.unpack(e,t,Bct),t+=Ti.packedLength):(o=sn.unpack(e,t,Yct),t+=sn.packedLength);let r=h.unpack(e,t,zct);t+=h.packedLength;let s=we.unpack(e,t,Oct);t+=we.packedLength;let a=e[t]===1;if(!l(n))return new $w({frustum:o,origin:r,orientation:s,_drawNearPlane:a});let c=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(c),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=we.clone(s,n._orientation),n._drawNearPlane=a,n};$w.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(3*4*2);_S._computeNearFarPlanes(i,o,t,n,s);let a=new mn({position:new Ge({componentDatatype:Q.DOUBLE,componentsPerAttribute:3,values:s})}),c,d,u=r?2:1,m=new Uint16Array(8*(u+1)),p=r?0:1;for(;p<2;++p)c=r?p*8:0,d=p*4,m[c]=d,m[c+1]=d+1,m[c+2]=d+1,m[c+3]=d+2,m[c+4]=d+2,m[c+5]=d+3,m[c+6]=d+3,m[c+7]=d;for(p=0;p<2;++p)c=(u+p)*8,d=p*4,m[c]=d,m[c+1]=d+4,m[c+2]=d+1,m[c+3]=d+5,m[c+4]=d+2,m[c+5]=d+6,m[c+6]=d+3,m[c+7]=d+7;return new ut({attributes:a,indices:m,primitiveType:Fe.LINES,boundingSphere:le.fromVertices(s)})};var eF=$w;function AD(e){e=y(e,y.EMPTY_OBJECT),this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=y(e.color,Y.CYAN),this._updateOnChange=y(e.updateOnChange,!0),this.show=y(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}var Kct=new h,Hct=new $,Jct=new we,Qct=new Ti,jct=new rl,qct=new sn,$ct=new Vr,elt=new Y,tlt=[1,1e5];AD.prototype.update=function(e){if(!this.show)return;let t=this._planesPrimitives,n=this._outlinePrimitives,i,o;if(this._updateOnChange){for(o=t.length,i=0;i<o;++i)n[i]=n[i]&&n[i].destroy(),t[i]=t[i]&&t[i].destroy();t.length=0,n.length=0}if(t.length===0){let r=this._camera,s=r.frustum,a;s instanceof Ti?a=Qct:s instanceof rl?a=jct:s instanceof sn?a=qct:a=$ct,a=s.clone(a);let c,d=this._frustumSplits;!l(d)||d.length<=1?(d=tlt,d[0]=this._camera.frustum.near,d[1]=this._camera.frustum.far,c=1):c=d.length-1;let u=r.positionWC,m=r.directionWC,p=r.upWC,g=r.rightWC;g=h.negate(g,Kct);let f=Hct;$.setColumn(f,0,g,f),$.setColumn(f,1,p,f),$.setColumn(f,2,m,f);let x=we.fromRotationMatrix(f,Jct);for(t.length=n.length=c,i=0;i<c;++i)a.near=d[i],a.far=d[i+1],t[i]=new En({geometryInstances:new Tt({geometry:new _S({origin:u,orientation:x,frustum:a,_drawNearPlane:i===0}),attributes:{color:zt.fromColor(Y.fromAlpha(this._color,.1,elt))},id:this.id,pickPrimitive:this}),appearance:new ln({translucent:!0,flat:!0}),asynchronous:!1}),n[i]=new En({geometryInstances:new Tt({geometry:new eF({origin:u,orientation:x,frustum:a,_drawNearPlane:i===0}),attributes:{color:zt.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new ln({translucent:!1,flat:!0}),asynchronous:!1})}for(o=t.length,i=0;i<o;++i)n[i].update(e),t[i].update(e)};AD.prototype.isDestroyed=function(){return!1};AD.prototype.destroy=function(){let e=this._planesPrimitives.length;for(let t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return me(this)};var Uf=AD;var sEi=S(T(),1);function nF(e){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1,this._ellipsoidOffset=y(e,0)}var tF=Yt.supportsTypedArrays()?new Float32Array(12):[],sye=new h,aye=new h,J4=new h,cye=new h,MD=new h;function nlt(e,t){let n=e.radii,i=t.camera,o,r,s;if(i.frustum instanceof sn)o=h.ZERO,r=i.rightWC,s=i.upWC;else{let m=i.positionWC,p=h.multiplyComponents(e.oneOverRadii,m,sye),g=h.normalize(p,aye),f=h.normalize(h.cross(h.UNIT_Z,p,J4),J4),x=h.normalize(h.cross(g,f,cye),cye),_=h.magnitude(p),C=Math.sqrt(_*_-1);o=h.multiplyByScalar(g,1/_,sye);let V=C/_;r=h.multiplyByScalar(f,V,aye),s=h.multiplyByScalar(x,V,J4)}let a=h.add(o,s,MD);h.subtract(a,r,a),h.multiplyComponents(n,a,a),h.pack(a,tF,0);let c=h.subtract(o,s,MD);h.subtract(c,r,c),h.multiplyComponents(n,c,c),h.pack(c,tF,3);let d=h.add(o,s,MD);h.add(d,r,d),h.multiplyComponents(n,d,d),h.pack(d,tF,6);let u=h.subtract(o,s,MD);return h.add(u,r,u),h.multiplyComponents(n,u,u),h.pack(u,tF,9),tF}nF.prototype.update=function(e){if(this._mode=e.mode,e.mode!==oe.SCENE3D)return;let t=e.context,n=e.mapProjection.ellipsoid.radii,i=new te(n.x+this._ellipsoidOffset,n.y+this._ellipsoidOffset,n.z+this._ellipsoidOffset),o=e.useLogDepth;if(l(this._command)||(this._rs=De.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new tt({renderState:this._rs,boundingVolume:new le(h.ZERO,i.maximumRadius),pass:Le.OPAQUE,owner:this})),!l(this._sp)||this._useLogDepth!==o){this._useLogDepth=o;let s=new Ye({sources:[Dv]}),a=new Ye({sources:[kv]});o&&(a.defines.push("LOG_DEPTH"),s.defines.push("LOG_DEPTH")),this._sp=qt.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}let r=nlt(i,e);if(l(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(r);else{let s=new ut({attributes:{position:new Ge({componentDatatype:Q.FLOAT,componentsPerAttribute:3,values:r})},indices:[0,1,2,2,1,3],primitiveType:Fe.TRIANGLES});this._va=ei.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:Ne.DYNAMIC_DRAW}),this._command.vertexArray=this._va}};nF.prototype.execute=function(e,t){this._mode===oe.SCENE3D&&this._command.execute(e,t)};nF.prototype.isDestroyed=function(){return!1};nF.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var iF=nF;var mEi=S(T(),1);function oF(){}var ilt=/\bgl_FragDepth\b/,olt=/\bdiscard\b/;function rlt(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(!l(n)){let i=t._attributeLocations,o=t.fragmentShaderSource,r,s=!1,a=o.sources,c=a.length;for(r=0;r<c;++r)if(ilt.test(a[r])||olt.test(a[r])){s=!0;break}let d=!1,u=o.defines;for(c=u.length,r=0;r<c;++r)if(u[r]==="LOG_DEPTH"){d=!0;break}let m;!s&&!d?(m=`void main() { out_FragColor = vec4(1.0); } @@ -12410,31 +12507,31 @@ ${o?`u_dayTextureBrightness[${ht}]`:"0.0"}, out_FragColor = vec4(1.0); czm_writeLogDepth(); } -`,o=new Ye({defines:["LOG_DEPTH"],sources:[m]})),n=e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:i})}return n}function Qdt(e,t){let n=e._depthOnlyRenderStateCache,i=n[t.id];if(!l(i)){let o=De.getState(t);o.depthMask=!0,o.colorMask={red:!1,green:!1,blue:!1,alpha:!1},i=De.fromCache(o),n[t.id]=i}return i}yF.createDepthOnlyDerivedCommand=function(e,t,n,i){l(i)||(i={});let o,r;return l(i.depthOnlyCommand)&&(o=i.depthOnlyCommand.shaderProgram,r=i.depthOnlyCommand.renderState),i.depthOnlyCommand=et.shallowClone(t,i.depthOnlyCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.depthOnlyCommand.shaderProgram=Jdt(n,t.shaderProgram),i.depthOnlyCommand.renderState=Qdt(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.depthOnlyCommand.shaderProgram=o,i.depthOnlyCommand.renderState=r),i};var jdt=/\s+czm_writeLogDepth\(/,qdt=/\s+czm_vertexLogDepth\(/;function $dt(e,t){if(t.fragmentShaderSource.defines.indexOf("LOG_DEPTH_READ_ONLY")>=0)return t;let i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!l(i)){let o=t._attributeLocations,r=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),s.defines=l(s.defines)?s.defines.slice(0):[],s.defines.push("LOG_DEPTH");let a,c,d=!1,u=r.sources,m=u.length;for(a=0;a<m;++a)if(qdt.test(u[a])){d=!0;break}if(!d){for(a=0;a<m;++a)u[a]=Ye.replaceMain(u[a],"czm_log_depth_main");c=` +`,o=new Ye({defines:["LOG_DEPTH"],sources:[m]})),n=e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:i})}return n}function slt(e,t){let n=e._depthOnlyRenderStateCache,i=n[t.id];if(!l(i)){let o=De.getState(t);o.depthMask=!0,o.colorMask={red:!1,green:!1,blue:!1,alpha:!1},i=De.fromCache(o),n[t.id]=i}return i}oF.createDepthOnlyDerivedCommand=function(e,t,n,i){l(i)||(i={});let o,r;return l(i.depthOnlyCommand)&&(o=i.depthOnlyCommand.shaderProgram,r=i.depthOnlyCommand.renderState),i.depthOnlyCommand=tt.shallowClone(t,i.depthOnlyCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.depthOnlyCommand.shaderProgram=rlt(n,t.shaderProgram),i.depthOnlyCommand.renderState=slt(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.depthOnlyCommand.shaderProgram=o,i.depthOnlyCommand.renderState=r),i};var alt=/\s+czm_writeLogDepth\(/,clt=/\s+czm_vertexLogDepth\(/;function llt(e,t){if(t.fragmentShaderSource.defines.indexOf("LOG_DEPTH_READ_ONLY")>=0)return t;let i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!l(i)){let o=t._attributeLocations,r=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),s.defines=l(s.defines)?s.defines.slice(0):[],s.defines.push("LOG_DEPTH");let a,c,d=!1,u=r.sources,m=u.length;for(a=0;a<m;++a)if(clt.test(u[a])){d=!0;break}if(!d){for(a=0;a<m;++a)u[a]=Ye.replaceMain(u[a],"czm_log_depth_main");c=` void main() { czm_log_depth_main(); czm_vertexLogDepth(); } -`,u.push(c)}for(u=s.sources,m=u.length,d=!1,a=0;a<m;++a)jdt.test(u[a])&&(d=!0);s.defines.indexOf("LOG_DEPTH_WRITE")!==-1&&(d=!0);let p="";if(!d){for(a=0;a<m;a++)u[a]=Ye.replaceMain(u[a],"czm_log_depth_main");p+=` +`,u.push(c)}for(u=s.sources,m=u.length,d=!1,a=0;a<m;++a)alt.test(u[a])&&(d=!0);s.defines.indexOf("LOG_DEPTH_WRITE")!==-1&&(d=!0);let p="";if(!d){for(a=0;a<m;a++)u[a]=Ye.replaceMain(u[a],"czm_log_depth_main");p+=` void main() { czm_log_depth_main(); czm_writeLogDepth(); } -`}u.push(p),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o})}return i}yF.createLogDepthCommand=function(e,t,n){l(n)||(n={});let i;return l(n.command)&&(i=n.command.shaderProgram),n.command=et.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=$dt(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};function eut(e,t,n){let i=e.shaderCache.getDerivedShaderProgram(t,"pick");if(!l(i)){let o=t._attributeLocations,r=t.fragmentShaderSource,s=r.sources,a=s.length,d=s.some(p=>p.includes("out_FragData"))?"out_FragData_0":"out_FragColor",u=`void main () +`}u.push(p),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o})}return i}oF.createLogDepthCommand=function(e,t,n){l(n)||(n={});let i;return l(n.command)&&(i=n.command.shaderProgram),n.command=tt.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=llt(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};function dlt(e,t,n){let i=e.shaderCache.getDerivedShaderProgram(t,"pick");if(!l(i)){let o=t._attributeLocations,r=t.fragmentShaderSource,s=r.sources,a=s.length,d=s.some(p=>p.includes("out_FragData"))?"out_FragData_0":"out_FragColor",u=`void main () { czm_non_pick_main(); if (${d}.a == 0.0) { discard; } ${d} = ${n}; -} `,m=new Array(a+1);for(let p=0;p<a;++p)m[p]=Ye.replaceMain(s[p],"czm_non_pick_main");m[a]=u,r=new Ye({sources:m,defines:r.defines}),i=e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:o})}return i}function tut(e,t){let n=e.picking.pickRenderStateCache,i=n[t.id];if(!l(i)){let o=De.getState(t);o.blending.enabled=!1,o.depthMask=!0,i=De.fromCache(o),n[t.id]=i}return i}yF.createPickDerivedCommand=function(e,t,n,i){l(i)||(i={});let o,r;return l(i.pickCommand)&&(o=i.pickCommand.shaderProgram,r=i.pickCommand.renderState),i.pickCommand=et.shallowClone(t,i.pickCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.pickCommand.shaderProgram=eut(n,t.shaderProgram,t.pickId),i.pickCommand.renderState=tut(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.pickCommand.shaderProgram=o,i.pickCommand.renderState=r),i};function nut(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(!l(n)){let i=t._attributeLocations,o=t.vertexShaderSource.clone(),r=t.fragmentShaderSource.clone();o.defines=l(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),n=e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:i})}return n}yF.createHdrCommand=function(e,t,n){l(n)||(n={});let i;return l(n.command)&&(i=n.command.shaderProgram),n.command=et.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=nut(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};var eb=yF;var Fvi=T(S(),1);function jD(e){this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;let t=this;function n(i){let o=i.alpha;if(!l(o)){t._alpha=void 0,t._beta=void 0,t._gamma=void 0;return}t._alpha=W.toRadians(o),t._beta=W.toRadians(i.beta),t._gamma=W.toRadians(i.gamma)}window.addEventListener("deviceorientation",n,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",n,!1)}}var iut=new we,Jye=new we,out=new $;function rut(e,t,n,i){let o=e.direction,r=e.right,s=e.up,a=we.fromAxisAngle(o,n,Jye),c=we.fromAxisAngle(r,i,iut),d=we.multiply(c,a,c),u=we.fromAxisAngle(s,t,Jye);we.multiply(u,d,d);let m=$.fromQuaternion(d,out);$.multiplyByVector(m,r,r),$.multiplyByVector(m,s,s),$.multiplyByVector(m,o,o)}jD.prototype.update=function(){if(!l(this._alpha))return;l(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);let e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,n=this._lastGamma-this._gamma;rut(this._scene.camera,-e,t,n),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma};jD.prototype.isDestroyed=function(){return!1};jD.prototype.destroy=function(){return this._removeListener(),me(this)};var xF=jD;var Dvi=T(S(),1);function Qye(){this.enabled=!0,this.renderable=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}var qD=[359.393,800.749,1275.6501,2151.1192,3141.7763,4777.5198,6281.2493,12364.307,15900.765,49889.0549,78026.8259,99260.7344,120036.3873,151011.0158,156091.1953,203849.3112,274866.9803,319916.3149,493552.0528,628733.5874],Bf=[2e-5,2e-4,1e-4,7e-5,5e-5,4e-5,3e-5,19e-6,1e-5,85e-7,62e-7,58e-7,53e-7,52e-7,51e-7,42e-7,4e-6,34e-7,26e-7,22e-7];for(let e=0;e<Bf.length;++e)Bf[e]*=1e6;var jye=Bf[1],$j=Bf[Bf.length-1];for(let e=0;e<Bf.length;++e)Bf[e]=(Bf[e]-$j)/(jye-$j);var ha=0;function sut(e){let t=qD,n=t.length;if(e<t[0])return ha=0,ha;if(e>t[n-1])return ha=n-2,ha;if(e>=t[ha]){if(ha+1<n&&e<t[ha+1])return ha;if(ha+2<n&&e<t[ha+2])return++ha,ha}else if(ha-1>=0&&e>=t[ha-1])return--ha,ha;let i;for(i=0;i<n-2&&!(e>=t[i]&&e<t[i+1]);++i);return ha=i,ha}var aut=new h;Qye.prototype.update=function(e){if(!(e.fog.enabled=this.enabled))return;e.fog.renderable=this.renderable;let n=e.camera,i=n.positionCartographic;if(!l(i)||i.height>8e5||e.mode!==oe.SCENE3D){e.fog.enabled=!1,e.fog.density=0;return}let o=i.height,r=sut(o),s=W.clamp((o-qD[r])/(qD[r+1]-qD[r]),0,1),a=W.lerp(Bf[r],Bf[r+1],s),c=this.density*1e6,d=c/jye*$j;a=a*(c-d)*1e-6;let u=h.normalize(n.positionWC,aut),m=Math.abs(h.dot(n.directionWC,u));a*=1-m,e.fog.density=a,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness};var _F=Qye;var Ovi=T(S(),1);function cut(e,t,n){this.context=e,this.commandList=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=oe.SCENE3D,this.morphTime=oe.getMorphTime(oe.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=n,this.mapProjection=void 0,this.camera=void 0,this.cameraUnderground=!1,this.globeTranslucencyState=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,pickVoxel:!1,depth:!1,postProcess:!1,offscreen:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,renderable:!1,density:void 0,sse:void 0,minimumBrightness:void 0},this.atmosphere=void 0,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.shadowState={shadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.splitPosition=0,this.frustumSplits=[],this.backgroundColor=void 0,this.light=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this.tilesetPassState=void 0,this.minimumTerrainHeight=0}var TF=cut;var rwi=T(S(),1);var fa={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},PT=fa.DERIVED_COMMANDS_MAXIMUM_LENGTH,axe=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function vT(){this._frontFaceAlphaByDistance=new Ft(0,1,0,1),this._backFaceAlphaByDistance=new Ft(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=ce.clone(ce.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(PT),this._derivedBlendCommandTypes=new Array(PT),this._derivedPickCommandTypes=new Array(PT),this._derivedCommandTypesToUpdate=new Array(PT),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}Object.defineProperties(vT.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}});vT.prototype.update=function(e){let t=e.globe;if(!l(t)||!t.show){this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,this._useDepthPlane=!1;return}this._frontFaceAlphaByDistance=qye(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=qye(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=$ye(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=$ye(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=mut(this,e,t),this._sunVisibleThroughGlobe=lut(this,e),this._environmentVisible=dut(this,e),this._useDepthPlane=uut(this,e),this._numberOfTextureUniforms=hut(this),this._rectangle=ce.clone(t.translucency.rectangle,this._rectangle),fut(this,e)};function qye(e,t,n,i){return e?l(n)?(Ft.clone(n,i),i.nearValue*=t,i.farValue*=t,i):(i.nearValue=t,i.farValue=t,i):(i.nearValue=1,i.farValue=1,i)}function $ye(e,t,n){return e&&(n.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function lut(e,t){let n=e._frontFaceTranslucent,i=e._backFaceTranslucent;return n&&(t.cameraUnderground||i)}function dut(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function uut(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function mut(e,t,n){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!n.depthTestAgainstTerrain&&t.mode!==oe.SCENE2D&&t.context.depthTexture}function hut(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function fut(e,t){e._derivedCommandsLength=e8(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=e8(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=e8(e,t,!1,!0,e._derivedPickCommandTypes);let n,i=0;for(n=0;n<e._derivedCommandsLength;++n)i|=1<<e._derivedCommandTypes[n];for(n=0;n<e._derivedBlendCommandsLength;++n)i|=1<<e._derivedBlendCommandTypes[n];for(n=0;n<e._derivedPickCommandsLength;++n)i|=1<<e._derivedPickCommandTypes[n];let o=0;for(n=0;n<PT;++n)(i&1<<n)>0&&(e._derivedCommandTypesToUpdate[o++]=n);e._derivedCommandsToUpdateLength=o;let r=i!==e._derivedCommandKey;e._derivedCommandKey=i,e._derivedCommandsDirty=r,!l(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=Eut())}function e8(e,t,n,i,o){let r=0,s=e._frontFaceTranslucent,a=e._backFaceTranslucent;if(!s)return r;let c=t.cameraUnderground,d=e._requiresManualDepthTest,u=i?fa.PICK_FRONT_FACE:d?fa.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:fa.TRANSLUCENT_FRONT_FACE,m=i?fa.PICK_BACK_FACE:d?fa.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:fa.TRANSLUCENT_BACK_FACE;return t.mode===oe.SCENE2D?(o[r++]=fa.DEPTH_ONLY_FRONT_FACE,o[r++]=u,r):(a?(n||(o[r++]=fa.DEPTH_ONLY_FRONT_AND_BACK_FACE),c?(o[r++]=u,o[r++]=m):(o[r++]=m,o[r++]=u)):c?(n||(o[r++]=fa.DEPTH_ONLY_BACK_FACE),o[r++]=fa.OPAQUE_FRONT_FACE,o[r++]=m):(n||(o[r++]=fa.DEPTH_ONLY_FRONT_FACE),o[r++]=fa.OPAQUE_BACK_FACE,o[r++]=u),r)}function nm(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function exe(e,t){return e.indexOf(t)>-1}function put(e,t){nm(e.defines,"TRANSLUCENT"),nm(t.defines,"TRANSLUCENT")}function but(e,t){nm(e.defines,"GROUND_ATMOSPHERE"),nm(t.defines,"GROUND_ATMOSPHERE"),nm(e.defines,"FOG"),nm(t.defines,"FOG"),nm(e.defines,"TRANSLUCENT"),nm(t.defines,"TRANSLUCENT")}function t8(e,t){if(exe(t.defines,"TILE_LIMIT_RECTANGLE")||exe(t.defines,"ENABLE_CLIPPING_PLANES"))return;let n=`void main() +} `,m=new Array(a+1);for(let p=0;p<a;++p)m[p]=Ye.replaceMain(s[p],"czm_non_pick_main");m[a]=u,r=new Ye({sources:m,defines:r.defines}),i=e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:o})}return i}function ult(e,t){let n=e.picking.pickRenderStateCache,i=n[t.id];if(!l(i)){let o=De.getState(t);o.blending.enabled=!1,o.depthMask=!0,i=De.fromCache(o),n[t.id]=i}return i}oF.createPickDerivedCommand=function(e,t,n,i){l(i)||(i={});let o,r;return l(i.pickCommand)&&(o=i.pickCommand.shaderProgram,r=i.pickCommand.renderState),i.pickCommand=tt.shallowClone(t,i.pickCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.pickCommand.shaderProgram=dlt(n,t.shaderProgram,t.pickId),i.pickCommand.renderState=ult(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.pickCommand.shaderProgram=o,i.pickCommand.renderState=r),i};function mlt(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(!l(n)){let i=t._attributeLocations,o=t.vertexShaderSource.clone(),r=t.fragmentShaderSource.clone();o.defines=l(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),n=e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:i})}return n}oF.createHdrCommand=function(e,t,n){l(n)||(n={});let i;return l(n.command)&&(i=n.command.shaderProgram),n.command=tt.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=mlt(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};var Qb=oF;var xEi=S(T(),1);function ND(e){this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;let t=this;function n(i){let o=i.alpha;if(!l(o)){t._alpha=void 0,t._beta=void 0,t._gamma=void 0;return}t._alpha=X.toRadians(o),t._beta=X.toRadians(i.beta),t._gamma=X.toRadians(i.gamma)}window.addEventListener("deviceorientation",n,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",n,!1)}}var hlt=new we,lye=new we,flt=new $;function plt(e,t,n,i){let o=e.direction,r=e.right,s=e.up,a=we.fromAxisAngle(o,n,lye),c=we.fromAxisAngle(r,i,hlt),d=we.multiply(c,a,c),u=we.fromAxisAngle(s,t,lye);we.multiply(u,d,d);let m=$.fromQuaternion(d,flt);$.multiplyByVector(m,r,r),$.multiplyByVector(m,s,s),$.multiplyByVector(m,o,o)}ND.prototype.update=function(){if(!l(this._alpha))return;l(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);let e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,n=this._lastGamma-this._gamma;plt(this._scene.camera,-e,t,n),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma};ND.prototype.isDestroyed=function(){return!1};ND.prototype.destroy=function(){return this._removeListener(),me(this)};var rF=ND;var ZEi=S(T(),1);function dye(){this.enabled=!0,this.renderable=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}var UD=[359.393,800.749,1275.6501,2151.1192,3141.7763,4777.5198,6281.2493,12364.307,15900.765,49889.0549,78026.8259,99260.7344,120036.3873,151011.0158,156091.1953,203849.3112,274866.9803,319916.3149,493552.0528,628733.5874],kf=[2e-5,2e-4,1e-4,7e-5,5e-5,4e-5,3e-5,19e-6,1e-5,85e-7,62e-7,58e-7,53e-7,52e-7,51e-7,42e-7,4e-6,34e-7,26e-7,22e-7];for(let e=0;e<kf.length;++e)kf[e]*=1e6;var uye=kf[1],Q4=kf[kf.length-1];for(let e=0;e<kf.length;++e)kf[e]=(kf[e]-Q4)/(uye-Q4);var ha=0;function blt(e){let t=UD,n=t.length;if(e<t[0])return ha=0,ha;if(e>t[n-1])return ha=n-2,ha;if(e>=t[ha]){if(ha+1<n&&e<t[ha+1])return ha;if(ha+2<n&&e<t[ha+2])return++ha,ha}else if(ha-1>=0&&e>=t[ha-1])return--ha,ha;let i;for(i=0;i<n-2&&!(e>=t[i]&&e<t[i+1]);++i);return ha=i,ha}var glt=new h;dye.prototype.update=function(e){if(!(e.fog.enabled=this.enabled))return;e.fog.renderable=this.renderable;let n=e.camera,i=n.positionCartographic;if(!l(i)||i.height>8e5||e.mode!==oe.SCENE3D){e.fog.enabled=!1,e.fog.density=0;return}let o=i.height,r=blt(o),s=X.clamp((o-UD[r])/(UD[r+1]-UD[r]),0,1),a=X.lerp(kf[r],kf[r+1],s),c=this.density*1e6,d=c/uye*Q4;a=a*(c-d)*1e-6;let u=h.normalize(n.positionWC,glt),m=Math.abs(h.dot(n.directionWC,u));a*=1-m,e.fog.density=a,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness};var sF=dye;var GEi=S(T(),1);function ylt(e,t,n){this.context=e,this.commandList=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=oe.SCENE3D,this.morphTime=oe.getMorphTime(oe.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=n,this.mapProjection=void 0,this.camera=void 0,this.cameraUnderground=!1,this.globeTranslucencyState=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,pickVoxel:!1,depth:!1,postProcess:!1,offscreen:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,renderable:!1,density:void 0,sse:void 0,minimumBrightness:void 0},this.atmosphere=void 0,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.shadowState={shadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.splitPosition=0,this.frustumSplits=[],this.backgroundColor=void 0,this.light=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this.tilesetPassState=void 0,this.minimumTerrainHeight=0}var aF=ylt;var DEi=S(T(),1);var fa={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},SS=fa.DERIVED_COMMANDS_MAXIMUM_LENGTH,Sye=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function TS(){this._frontFaceAlphaByDistance=new Ft(0,1,0,1),this._backFaceAlphaByDistance=new Ft(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=ce.clone(ce.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(SS),this._derivedBlendCommandTypes=new Array(SS),this._derivedPickCommandTypes=new Array(SS),this._derivedCommandTypesToUpdate=new Array(SS),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}Object.defineProperties(TS.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}});TS.prototype.update=function(e){let t=e.globe;if(!l(t)||!t.show){this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,this._useDepthPlane=!1;return}this._frontFaceAlphaByDistance=mye(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=mye(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=hye(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=hye(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=Tlt(this,e,t),this._sunVisibleThroughGlobe=xlt(this,e),this._environmentVisible=_lt(this,e),this._useDepthPlane=Slt(this,e),this._numberOfTextureUniforms=Clt(this),this._rectangle=ce.clone(t.translucency.rectangle,this._rectangle),Vlt(this,e)};function mye(e,t,n,i){return e?l(n)?(Ft.clone(n,i),i.nearValue*=t,i.farValue*=t,i):(i.nearValue=t,i.farValue=t,i):(i.nearValue=1,i.farValue=1,i)}function hye(e,t,n){return e&&(n.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function xlt(e,t){let n=e._frontFaceTranslucent,i=e._backFaceTranslucent;return n&&(t.cameraUnderground||i)}function _lt(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function Slt(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function Tlt(e,t,n){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!n.depthTestAgainstTerrain&&t.mode!==oe.SCENE2D&&t.context.depthTexture}function Clt(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function Vlt(e,t){e._derivedCommandsLength=j4(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=j4(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=j4(e,t,!1,!0,e._derivedPickCommandTypes);let n,i=0;for(n=0;n<e._derivedCommandsLength;++n)i|=1<<e._derivedCommandTypes[n];for(n=0;n<e._derivedBlendCommandsLength;++n)i|=1<<e._derivedBlendCommandTypes[n];for(n=0;n<e._derivedPickCommandsLength;++n)i|=1<<e._derivedPickCommandTypes[n];let o=0;for(n=0;n<SS;++n)(i&1<<n)>0&&(e._derivedCommandTypesToUpdate[o++]=n);e._derivedCommandsToUpdateLength=o;let r=i!==e._derivedCommandKey;e._derivedCommandKey=i,e._derivedCommandsDirty=r,!l(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=Nlt())}function j4(e,t,n,i,o){let r=0,s=e._frontFaceTranslucent,a=e._backFaceTranslucent;if(!s)return r;let c=t.cameraUnderground,d=e._requiresManualDepthTest,u=i?fa.PICK_FRONT_FACE:d?fa.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:fa.TRANSLUCENT_FRONT_FACE,m=i?fa.PICK_BACK_FACE:d?fa.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:fa.TRANSLUCENT_BACK_FACE;return t.mode===oe.SCENE2D?(o[r++]=fa.DEPTH_ONLY_FRONT_FACE,o[r++]=u,r):(a?(n||(o[r++]=fa.DEPTH_ONLY_FRONT_AND_BACK_FACE),c?(o[r++]=u,o[r++]=m):(o[r++]=m,o[r++]=u)):c?(n||(o[r++]=fa.DEPTH_ONLY_BACK_FACE),o[r++]=fa.OPAQUE_FRONT_FACE,o[r++]=m):(n||(o[r++]=fa.DEPTH_ONLY_FRONT_FACE),o[r++]=fa.OPAQUE_BACK_FACE,o[r++]=u),r)}function em(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function fye(e,t){return e.indexOf(t)>-1}function Zlt(e,t){em(e.defines,"TRANSLUCENT"),em(t.defines,"TRANSLUCENT")}function Llt(e,t){em(e.defines,"GROUND_ATMOSPHERE"),em(t.defines,"GROUND_ATMOSPHERE"),em(e.defines,"FOG"),em(t.defines,"FOG"),em(e.defines,"TRANSLUCENT"),em(t.defines,"TRANSLUCENT")}function q4(e,t){if(fye(t.defines,"TILE_LIMIT_RECTANGLE")||fye(t.defines,"ENABLE_CLIPPING_PLANES"))return;let n=`void main() { out_FragColor = vec4(1.0); } -`;t.sources=[n]}function n8(e,t){let n=t.sources,i=n.length;for(let r=0;r<i;++r)n[r]=Ye.replaceMain(n[r],"czm_globe_translucency_main");n.push(` +`;t.sources=[n]}function $4(e,t){let n=t.sources,i=n.length;for(let r=0;r<i;++r)n[r]=Ye.replaceMain(n[r],"czm_globe_translucency_main");n.push(` uniform sampler2D u_classificationTexture; void main() @@ -12461,7 +12558,7 @@ void main() } out_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + out_FragColor * (1.0 - classificationColor.a); } -`)}function cxe(e,t){n8(e,t),nm(e.defines,"GROUND_ATMOSPHERE"),nm(t.defines,"GROUND_ATMOSPHERE"),nm(e.defines,"FOG"),nm(t.defines,"FOG")}function gut(e,t){n8(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function yut(e,t){cxe(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function txe(e,t){let n=`uniform sampler2D u_classificationTexture; +`)}function Tye(e,t){$4(e,t),em(e.defines,"GROUND_ATMOSPHERE"),em(t.defines,"GROUND_ATMOSPHERE"),em(e.defines,"FOG"),em(t.defines,"FOG")}function Rlt(e,t){$4(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function Glt(e,t){Tye(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function pye(e,t){let n=`uniform sampler2D u_classificationTexture; void main() { vec2 st = gl_FragCoord.xy / czm_viewport.zw; @@ -12472,7 +12569,7 @@ void main() } out_FragColor = pickColor; } -`;t.sources=[n]}function xut(e,t,n,i,o,r){if(!l(o))return t;if(!i&&l(n))return n;let s=e.shaderCache.getDerivedShaderProgram(t,r);if(!l(s)){let a=t._attributeLocations,c=t.vertexShaderSource.clone(),d=t.fragmentShaderSource.clone();c.defines=l(c.defines)?c.defines.slice(0):[],d.defines=l(d.defines)?d.defines.slice(0):[],o(c,d),s=e.shaderCache.createDerivedShaderProgram(t,r,{vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:a})}return s}function _ut(e){e.cull.face=fi.BACK,e.cull.enabled=!0}function Tut(e){e.cull.face=fi.FRONT,e.cull.enabled=!0}function Sut(e){e.cull.face=fi.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function Cut(e){e.cull.face=fi.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function Vut(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function nxe(e){e.cull.face=fi.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=un.ALPHA_BLEND}function ixe(e){e.cull.face=fi.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=un.ALPHA_BLEND}function Lut(e){e.cull.face=fi.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function Rut(e){e.cull.face=fi.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function Zut(e,t,n,i,o){if(!l(i))return e;if(!n&&l(t))return t;let r=o[e.id];if(!l(r)){let s=De.getState(e);i(s),r=De.fromCache(s),o[e.id]=r}return r}function $V(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function Gut(e,t,n,i,o){return l(o)?!i&&l(n)?n:xt(t,o(e),!1):t}function Rh(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function Eut(){return[new Rh({pass:Re.GLOBE,pickOnly:!1,getShaderProgramFunction:put,getRenderStateFunction:_ut,getUniformMapFunction:void 0}),new Rh({pass:Re.GLOBE,pickOnly:!1,getShaderProgramFunction:but,getRenderStateFunction:Tut,getUniformMapFunction:void 0}),new Rh({pass:Re.GLOBE,pickOnly:!1,getShaderProgramFunction:t8,getRenderStateFunction:Sut,getUniformMapFunction:void 0}),new Rh({pass:Re.GLOBE,pickOnly:!1,getShaderProgramFunction:t8,getRenderStateFunction:Cut,getUniformMapFunction:void 0}),new Rh({pass:Re.GLOBE,pickOnly:!1,getShaderProgramFunction:t8,getRenderStateFunction:Vut,getUniformMapFunction:void 0}),new Rh({pass:Re.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:n8,getRenderStateFunction:nxe,getUniformMapFunction:$V}),new Rh({pass:Re.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:cxe,getRenderStateFunction:ixe,getUniformMapFunction:$V}),new Rh({pass:Re.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:gut,getRenderStateFunction:nxe,getUniformMapFunction:$V}),new Rh({pass:Re.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:yut,getRenderStateFunction:ixe,getUniformMapFunction:$V}),new Rh({pass:Re.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:txe,getRenderStateFunction:Lut,getUniformMapFunction:$V}),new Rh({pass:Re.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:txe,getRenderStateFunction:Rut,getUniformMapFunction:$V})]}var oxe=new Array(PT),rxe=new Array(PT);vT.prototype.updateDerivedCommands=function(e,t){let n=this._derivedCommandTypesToUpdate,i=this._derivedCommandsToUpdateLength;if(i!==0){for(let o=0;o<i;++o)rxe[o]=this._derivedCommandPacks[n[o]],oxe[o]=axe[n[o]];Xut(this,e,i,n,oxe,rxe,t)}};function Xut(e,t,n,i,o,r,s){let a=t.derivedCommands.globeTranslucency,c=e._derivedCommandsDirty;if(t.dirty||!l(a)||c){t.dirty=!1,l(a)||(a={},t.derivedCommands.globeTranslucency=a);let d=s.frameNumber,u=y(a.uniformMapDirtyFrame,0),m=y(a.shaderProgramDirtyFrame,0),p=y(a.renderStateDirtyFrame,0),g=a.uniformMap!==t.uniformMap,f=a.shaderProgramId!==t.shaderProgram.id,x=a.renderStateId!==t.renderState.id;g&&(a.uniformMapDirtyFrame=d),f&&(a.shaderProgramDirtyFrame=d),x&&(a.renderStateDirtyFrame=d),a.uniformMap=t.uniformMap,a.shaderProgramId=t.shaderProgram.id,a.renderStateId=t.renderState.id;for(let _=0;_<n;++_){let C=r[_],V=i[_],L=o[_],Z=a[L],G,X,v;l(Z)?(G=Z.uniformMap,X=Z.shaderProgram,v=Z.renderState):(G=void 0,X=void 0,v=void 0),Z=et.shallowClone(t,Z),a[L]=Z;let P=y(Z.derivedCommands.uniformMapDirtyFrame,0),F=y(Z.derivedCommands.shaderProgramDirtyFrame,0),A=y(Z.derivedCommands.renderStateDirtyFrame,0),b=g||P<u,R=f||F<m,E=x||A<p;b&&(Z.derivedCommands.uniformMapDirtyFrame=d),R&&(Z.derivedCommands.shaderProgramDirtyFrame=d),E&&(Z.derivedCommands.renderStateDirtyFrame=d),Z.derivedCommands.type=V,Z.pass=C.pass,Z.pickOnly=C.pickOnly,Z.uniformMap=Gut(e,t.uniformMap,G,b,C.getUniformMapFunction),Z.shaderProgram=xut(s.context,t.shaderProgram,X,R,C.getShaderProgramFunction,L),Z.renderState=Zut(t.renderState,v,E,C.getRenderStateFunction,C.renderStateCache)}}}vT.prototype.pushDerivedCommands=function(e,t,n){let i=n.passes.pick||n.passes.pickVoxel;if(i&&t)return;let o=this._derivedCommandTypes,r=this._derivedCommandsLength;if(i?(o=this._derivedPickCommandTypes,r=this._derivedPickCommandsLength):t&&(o=this._derivedBlendCommandTypes,r=this._derivedBlendCommandsLength),r===0){n.commandList.push(e);return}let s=e.derivedCommands.globeTranslucency;for(let a=0;a<r;++a){let c=axe[o[a]];n.commandList.push(s[c])}};function lxe(e,t,n,i,o,r,s){for(let a=0;a<t;++a){let c=e[a],d=c.derivedCommands.type;(!l(s)||s.indexOf(d)>-1)&&n(c,i,o,r)}}function sxe(e,t,n,i,o,r){for(let s=0;s<t;++s)n(e[s],i,o,r)}var Iut=[fa.OPAQUE_FRONT_FACE,fa.OPAQUE_BACK_FACE],Wut=[fa.DEPTH_ONLY_FRONT_FACE,fa.DEPTH_ONLY_BACK_FACE,fa.DEPTH_ONLY_FRONT_AND_BACK_FACE];vT.prototype.executeGlobeCommands=function(e,t,n,i,o){let r=i.context,s=e.commands[Re.GLOBE],a=e.indices[Re.GLOBE];a!==0&&(this._globeTranslucencyFramebuffer=n,n.clearClassification(r,o),lxe(s,a,t,i,r,o,Iut))};vT.prototype.executeGlobeClassificationCommands=function(e,t,n,i,o){let r=i.context,s=e.commands[Re.GLOBE],a=e.indices[Re.GLOBE],c=e.commands[Re.TERRAIN_CLASSIFICATION],d=e.indices[Re.TERRAIN_CLASSIFICATION];if(a===0||d===0)return;let u=this._frontFaceTranslucent,m=this._backFaceTranslucent;if((!u||!m)&&sxe(c,d,t,i,r,o),!u&&!m)return;this._globeTranslucencyFramebuffer=n;let p=r.uniformState.globeDepthTexture,g=o.framebuffer;if(o.framebuffer=n.classificationFramebuffer,lxe(s,a,t,i,r,o,Wut),r.depthTexture){let f=n.packDepth(r,o);r.uniformState.globeDepthTexture=f}sxe(c,d,t,i,r,o),r.uniformState.globeDepthTexture=p,o.framebuffer=g};var SF=vT;var Rwi=T(S(),1);var awi=T(S(),1),jl=`uniform sampler2D colorTexture; +`;t.sources=[n]}function Elt(e,t,n,i,o,r){if(!l(o))return t;if(!i&&l(n))return n;let s=e.shaderCache.getDerivedShaderProgram(t,r);if(!l(s)){let a=t._attributeLocations,c=t.vertexShaderSource.clone(),d=t.fragmentShaderSource.clone();c.defines=l(c.defines)?c.defines.slice(0):[],d.defines=l(d.defines)?d.defines.slice(0):[],o(c,d),s=e.shaderCache.createDerivedShaderProgram(t,r,{vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:a})}return s}function Wlt(e){e.cull.face=pi.BACK,e.cull.enabled=!0}function Ilt(e){e.cull.face=pi.FRONT,e.cull.enabled=!0}function Xlt(e){e.cull.face=pi.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function Plt(e){e.cull.face=pi.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function vlt(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function bye(e){e.cull.face=pi.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=un.ALPHA_BLEND}function gye(e){e.cull.face=pi.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=un.ALPHA_BLEND}function wlt(e){e.cull.face=pi.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function Flt(e){e.cull.face=pi.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function Alt(e,t,n,i,o){if(!l(i))return e;if(!n&&l(t))return t;let r=o[e.id];if(!l(r)){let s=De.getState(e);i(s),r=De.fromCache(s),o[e.id]=r}return r}function DV(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function Mlt(e,t,n,i,o){return l(o)?!i&&l(n)?n:xt(t,o(e),!1):t}function Sh(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function Nlt(){return[new Sh({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:Zlt,getRenderStateFunction:Wlt,getUniformMapFunction:void 0}),new Sh({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:Llt,getRenderStateFunction:Ilt,getUniformMapFunction:void 0}),new Sh({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:q4,getRenderStateFunction:Xlt,getUniformMapFunction:void 0}),new Sh({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:q4,getRenderStateFunction:Plt,getUniformMapFunction:void 0}),new Sh({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:q4,getRenderStateFunction:vlt,getUniformMapFunction:void 0}),new Sh({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:$4,getRenderStateFunction:bye,getUniformMapFunction:DV}),new Sh({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Tye,getRenderStateFunction:gye,getUniformMapFunction:DV}),new Sh({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Rlt,getRenderStateFunction:bye,getUniformMapFunction:DV}),new Sh({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Glt,getRenderStateFunction:gye,getUniformMapFunction:DV}),new Sh({pass:Le.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:pye,getRenderStateFunction:wlt,getUniformMapFunction:DV}),new Sh({pass:Le.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:pye,getRenderStateFunction:Flt,getUniformMapFunction:DV})]}var yye=new Array(SS),xye=new Array(SS);TS.prototype.updateDerivedCommands=function(e,t){let n=this._derivedCommandTypesToUpdate,i=this._derivedCommandsToUpdateLength;if(i!==0){for(let o=0;o<i;++o)xye[o]=this._derivedCommandPacks[n[o]],yye[o]=Sye[n[o]];Ult(this,e,i,n,yye,xye,t)}};function Ult(e,t,n,i,o,r,s){let a=t.derivedCommands.globeTranslucency,c=e._derivedCommandsDirty;if(t.dirty||!l(a)||c){t.dirty=!1,l(a)||(a={},t.derivedCommands.globeTranslucency=a);let d=s.frameNumber,u=y(a.uniformMapDirtyFrame,0),m=y(a.shaderProgramDirtyFrame,0),p=y(a.renderStateDirtyFrame,0),g=a.uniformMap!==t.uniformMap,f=a.shaderProgramId!==t.shaderProgram.id,x=a.renderStateId!==t.renderState.id;g&&(a.uniformMapDirtyFrame=d),f&&(a.shaderProgramDirtyFrame=d),x&&(a.renderStateDirtyFrame=d),a.uniformMap=t.uniformMap,a.shaderProgramId=t.shaderProgram.id,a.renderStateId=t.renderState.id;for(let _=0;_<n;++_){let C=r[_],V=i[_],Z=o[_],R=a[Z],G,W,v;l(R)?(G=R.uniformMap,W=R.shaderProgram,v=R.renderState):(G=void 0,W=void 0,v=void 0),R=tt.shallowClone(t,R),a[Z]=R;let P=y(R.derivedCommands.uniformMapDirtyFrame,0),F=y(R.derivedCommands.shaderProgramDirtyFrame,0),M=y(R.derivedCommands.renderStateDirtyFrame,0),b=g||P<u,L=f||F<m,E=x||M<p;b&&(R.derivedCommands.uniformMapDirtyFrame=d),L&&(R.derivedCommands.shaderProgramDirtyFrame=d),E&&(R.derivedCommands.renderStateDirtyFrame=d),R.derivedCommands.type=V,R.pass=C.pass,R.pickOnly=C.pickOnly,R.uniformMap=Mlt(e,t.uniformMap,G,b,C.getUniformMapFunction),R.shaderProgram=Elt(s.context,t.shaderProgram,W,L,C.getShaderProgramFunction,Z),R.renderState=Alt(t.renderState,v,E,C.getRenderStateFunction,C.renderStateCache)}}}TS.prototype.pushDerivedCommands=function(e,t,n){let i=n.passes.pick||n.passes.pickVoxel;if(i&&t)return;let o=this._derivedCommandTypes,r=this._derivedCommandsLength;if(i?(o=this._derivedPickCommandTypes,r=this._derivedPickCommandsLength):t&&(o=this._derivedBlendCommandTypes,r=this._derivedBlendCommandsLength),r===0){n.commandList.push(e);return}let s=e.derivedCommands.globeTranslucency;for(let a=0;a<r;++a){let c=Sye[o[a]];n.commandList.push(s[c])}};function Cye(e,t,n,i,o,r,s){for(let a=0;a<t;++a){let c=e[a],d=c.derivedCommands.type;(!l(s)||s.indexOf(d)>-1)&&n(c,i,o,r)}}function _ye(e,t,n,i,o,r){for(let s=0;s<t;++s)n(e[s],i,o,r)}var klt=[fa.OPAQUE_FRONT_FACE,fa.OPAQUE_BACK_FACE],Dlt=[fa.DEPTH_ONLY_FRONT_FACE,fa.DEPTH_ONLY_BACK_FACE,fa.DEPTH_ONLY_FRONT_AND_BACK_FACE];TS.prototype.executeGlobeCommands=function(e,t,n,i,o){let r=i.context,s=e.commands[Le.GLOBE],a=e.indices[Le.GLOBE];a!==0&&(this._globeTranslucencyFramebuffer=n,n.clearClassification(r,o),Cye(s,a,t,i,r,o,klt))};TS.prototype.executeGlobeClassificationCommands=function(e,t,n,i,o){let r=i.context,s=e.commands[Le.GLOBE],a=e.indices[Le.GLOBE],c=e.commands[Le.TERRAIN_CLASSIFICATION],d=e.indices[Le.TERRAIN_CLASSIFICATION];if(a===0||d===0)return;let u=this._frontFaceTranslucent,m=this._backFaceTranslucent;if((!u||!m)&&_ye(c,d,t,i,r,o),!u&&!m)return;this._globeTranslucencyFramebuffer=n;let p=r.uniformState.globeDepthTexture,g=o.framebuffer;if(o.framebuffer=n.classificationFramebuffer,Cye(s,a,t,i,r,o,Dlt),r.depthTexture){let f=n.packDepth(r,o);r.uniformState.globeDepthTexture=f}_ye(c,d,t,i,r,o),r.uniformState.globeDepthTexture=p,o.framebuffer=g};var cF=TS;var lWi=S(T(),1);var YEi=S(T(),1),Ql=`uniform sampler2D colorTexture; in vec2 v_textureCoordinates; @@ -12480,7 +12577,7 @@ void main() { out_FragColor = texture(colorTexture, v_textureCoordinates); } -`;function Yf(){this._numSamples=1,this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._fbo=new ui({depthStencil:!0,createDepthAttachments:!1}),this._fboClassified=new ui({depthStencil:!0,createDepthAttachments:!1}),this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new ii({color:new Y(0,0,0,0),owner:this}),this._clearCommand=new ii({color:new Y(0,0,0,0),depth:1,stencil:0});let e=this;this._uniformMap={colorTexture:function(){return e._fbo.getColorTexture()},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._fboClassified.getColorTexture()}}}Object.defineProperties(Yf.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}});Yf.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var Put={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Un.EQUAL,frontOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.KEEP},backFunction:Un.NEVER,reference:0,mask:Nt.CLASSIFICATION_MASK},blending:un.ALPHA_BLEND},vut={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Un.NOT_EQUAL,frontOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.KEEP},backFunction:Un.NEVER,reference:0,mask:Nt.CLASSIFICATION_MASK},blending:un.ALPHA_BLEND},wut={depthMask:!0,depthTest:{enabled:!0},stencilTest:Nt.setCesium3DTileBit(),stencilMask:Nt.CESIUM_3D_TILE_MASK,blending:un.ALPHA_BLEND},Fut=`uniform sampler2D colorTexture; +`;function Df(){this._numSamples=1,this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._fbo=new ui({depthStencil:!0,createDepthAttachments:!1}),this._fboClassified=new ui({depthStencil:!0,createDepthAttachments:!1}),this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new ii({color:new Y(0,0,0,0),owner:this}),this._clearCommand=new ii({color:new Y(0,0,0,0),depth:1,stencil:0});let e=this;this._uniformMap={colorTexture:function(){return e._fbo.getColorTexture()},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._fboClassified.getColorTexture()}}}Object.defineProperties(Df.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}});Df.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var Blt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:kn.EQUAL,frontOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.KEEP},backFunction:kn.NEVER,reference:0,mask:Nt.CLASSIFICATION_MASK},blending:un.ALPHA_BLEND},Ylt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:kn.NOT_EQUAL,frontOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.KEEP},backFunction:kn.NEVER,reference:0,mask:Nt.CLASSIFICATION_MASK},blending:un.ALPHA_BLEND},Olt={depthMask:!0,depthTest:{enabled:!0},stencilTest:Nt.setCesium3DTileBit(),stencilMask:Nt.CESIUM_3D_TILE_MASK,blending:un.ALPHA_BLEND},zlt=`uniform sampler2D colorTexture; uniform sampler2D depthTexture; uniform sampler2D classifiedTexture; in vec2 v_textureCoordinates; @@ -12508,7 +12605,7 @@ void main() out_FragColor = color * highlightColor; gl_FragDepth = texture(depthTexture, v_textureCoordinates).r; } -`,Aut=`uniform sampler2D colorTexture; +`,Klt=`uniform sampler2D colorTexture; in vec2 v_textureCoordinates; void main() { @@ -12523,7 +12620,7 @@ void main() out_FragColor = color; #endif } -`;Yf.prototype.update=function(e,t,n){let i=this._fbo.getColorTexture(),o=this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;let r=this._numSamples!==t,s=e.drawingBufferWidth,a=e.drawingBufferHeight,c=!l(i)||i.width!==s||i.height!==a;if((c||o||r)&&(this._numSamples=t,this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),l(this._previousFramebuffer)||(this._depthStencilTexture=new Et({context:e,width:s,height:a,pixelFormat:at.DEPTH_STENCIL,pixelDatatype:ze.UNSIGNED_INT_24_8}),t>1&&(this._depthStencilRenderbuffer=new bd({context:e,width:s,height:a,format:Hc.DEPTH24_STENCIL8,numSamples:t})))),!l(this._fbo.framebuffer)||c||o||r){this._fbo.destroy(),this._fboClassified.destroy();let d,u;l(this._previousFramebuffer)?(d=n.getDepthStencilTexture(),u=n.getDepthStencilRenderbuffer()):(d=this._depthStencilTexture,u=this._depthStencilRenderbuffer),this._fbo.setDepthStencilTexture(d),l(u)&&this._fbo.setDepthStencilRenderbuffer(u),this._fbo.update(e,s,a,t),l(this._previousFramebuffer)||(this._fboClassified.setDepthStencilTexture(d),this._fboClassified.update(e,s,a))}if(l(this._rsUnclassified)||(this._rsUnclassified=De.fromCache(Put),this._rsClassified=De.fromCache(vut),this._rsDefault=De.fromCache(wut)),!l(this._unclassifiedCommand)||o||r){l(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());let d=l(this._previousFramebuffer)?Aut:Fut,u=new Ye({defines:["UNCLASSIFIED"],sources:[d]}),m=new Ye({sources:[d]});this._unclassifiedCommand=e.createViewportQuadCommand(u,{renderState:l(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(m,{renderState:l(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),l(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),l(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(jl,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}};Yf.prototype.prepareTextures=function(e,t){this._fbo._numSamples>1&&this._fbo.prepareTextures(e,t)};Yf.prototype.clear=function(e,t){l(this._previousFramebuffer)?this._fbo.clear(e,this._clearColorCommand,t):(this._fbo.clear(e,this._clearCommand,t),this._fboClassified.clear(e,this._clearCommand,t))};Yf.prototype.executeClassified=function(e,t){if(!l(this._previousFramebuffer)){let n=t.framebuffer;this.prepareTextures(e,!0),t.framebuffer=this._fboClassified.framebuffer,this._translucentCommand.execute(e,t),t.framebuffer=n}this._classifiedCommand.execute(e,t)};Yf.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)};Yf.prototype.isDestroyed=function(){return!1};Yf.prototype.destroy=function(){return this._fbo.destroy(),this._fboClassified.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),l(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),me(this)};var eL=Yf;var Iwi=T(S(),1);function $D(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}Object.defineProperties($D.prototype,{total:{get:function(){return this._total}}});function Vy(e){let t=new Array(Ra.NUMBER_OF_JOB_TYPES);t[Ra.TEXTURE]=new $D(l(e)?e[Ra.TEXTURE]:10),t[Ra.PROGRAM]=new $D(l(e)?e[Ra.PROGRAM]:10),t[Ra.BUFFER]=new $D(l(e)?e[Ra.BUFFER]:30);let n=t.length,i,o=0;for(i=0;i<n;++i)o+=t[i].total;let r=new Array(n);for(i=0;i<n;++i)r[i]=!1;this._totalBudget=o,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=r}Vy.getTimestamp=bi;Object.defineProperties(Vy.prototype,{totalBudget:{get:function(){return this._totalBudget}}});Vy.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget};Vy.prototype.resetBudgets=function(){let e=this._budgets,t=e.length;for(let n=0;n<t;++n){let i=e[n];i.starvedLastFrame=i.starvedThisFrame,i.starvedThisFrame=!1,i.usedThisFrame=0,i.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0};Vy.prototype.execute=function(e,t){let n=this._budgets,i=n[t],o=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&o)return i.starvedThisFrame=!0,!1;let r;if(i.usedThisFrame+i.stolenFromMeThisFrame>=i.total){let c=n.length,d;for(d=0;d<c&&(r=n[d],!(r.usedThisFrame+r.stolenFromMeThisFrame<r.total&&!r.starvedLastFrame));++d);if(d===c&&o)return!1;o&&(i.starvedThisFrame=!0)}let s=Vy.getTimestamp();e.execute();let a=Vy.getTimestamp()-s;return this._totalUsedThisFrame+=a,r?r.stolenFromMeThisFrame+=a:i.usedThisFrame+=a,this._executedThisFrame[t]=!0,!0};var CF=Vy;var Awi=T(S(),1);function e3(e){e=y(e,y.EMPTY_OBJECT);let t=In(e.container);this._container=t;let n=document.createElement("div");n.className="cesium-performanceDisplay";let i=document.createElement("div");i.className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),i.appendChild(this._fpsText);let o=document.createElement("div");o.className="cesium-performanceDisplay-ms",this._msText=document.createTextNode(""),o.appendChild(this._msText),n.appendChild(o),n.appendChild(i),this._container.appendChild(n),this._lastFpsSampleTime=bi(),this._lastMsSampleTime=bi(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;let r=document.createElement("div");r.className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),r.appendChild(this._throttledText),n.appendChild(r)}Object.defineProperties(e3.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(e?this._throttledText.nodeValue="(throttled)":this._throttledText.nodeValue="",this._throttled=e)}}});e3.prototype.update=function(e){let t=bi(),n=y(e,!0);this._fpsFrameCount++;let i=t-this._lastFpsSampleTime;if(i>1e3){let r="N/A";n&&(r=this._fpsFrameCount*1e3/i|0),this._fpsText.nodeValue=`${r} FPS`,this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;let o=t-this._lastMsSampleTime;if(o>200){let r="N/A";n&&(r=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=`${r} MS`,this._lastMsSampleTime=t,this._msFrameCount=0}};e3.prototype.destroy=function(){return me(this)};var tb=e3;var RMi=T(S(),1);var Ywi=T(S(),1);function wT(){this._framebuffer=new ui,this._textureToCopy=void 0,this._copyDepthCommand=void 0}Object.defineProperties(wT.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function Mut(e,t,n){let i=n.width,o=n.height;e._framebuffer.update(t,i,o)}function Nut(e,t,n){l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(`uniform highp sampler2D colorTexture; +`;Df.prototype.update=function(e,t,n){let i=this._fbo.getColorTexture(),o=this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;let r=this._numSamples!==t,s=e.drawingBufferWidth,a=e.drawingBufferHeight,c=!l(i)||i.width!==s||i.height!==a;if((c||o||r)&&(this._numSamples=t,this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),l(this._previousFramebuffer)||(this._depthStencilTexture=new Et({context:e,width:s,height:a,pixelFormat:at.DEPTH_STENCIL,pixelDatatype:Ke.UNSIGNED_INT_24_8}),t>1&&(this._depthStencilRenderbuffer=new pd({context:e,width:s,height:a,format:Oc.DEPTH24_STENCIL8,numSamples:t})))),!l(this._fbo.framebuffer)||c||o||r){this._fbo.destroy(),this._fboClassified.destroy();let d,u;l(this._previousFramebuffer)?(d=n.getDepthStencilTexture(),u=n.getDepthStencilRenderbuffer()):(d=this._depthStencilTexture,u=this._depthStencilRenderbuffer),this._fbo.setDepthStencilTexture(d),l(u)&&this._fbo.setDepthStencilRenderbuffer(u),this._fbo.update(e,s,a,t),l(this._previousFramebuffer)||(this._fboClassified.setDepthStencilTexture(d),this._fboClassified.update(e,s,a))}if(l(this._rsUnclassified)||(this._rsUnclassified=De.fromCache(Blt),this._rsClassified=De.fromCache(Ylt),this._rsDefault=De.fromCache(Olt)),!l(this._unclassifiedCommand)||o||r){l(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());let d=l(this._previousFramebuffer)?Klt:zlt,u=new Ye({defines:["UNCLASSIFIED"],sources:[d]}),m=new Ye({sources:[d]});this._unclassifiedCommand=e.createViewportQuadCommand(u,{renderState:l(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(m,{renderState:l(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),l(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),l(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(Ql,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}};Df.prototype.prepareTextures=function(e,t){this._fbo._numSamples>1&&this._fbo.prepareTextures(e,t)};Df.prototype.clear=function(e,t){l(this._previousFramebuffer)?this._fbo.clear(e,this._clearColorCommand,t):(this._fbo.clear(e,this._clearCommand,t),this._fboClassified.clear(e,this._clearCommand,t))};Df.prototype.executeClassified=function(e,t){if(!l(this._previousFramebuffer)){let n=t.framebuffer;this.prepareTextures(e,!0),t.framebuffer=this._fboClassified.framebuffer,this._translucentCommand.execute(e,t),t.framebuffer=n}this._classifiedCommand.execute(e,t)};Df.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)};Df.prototype.isDestroyed=function(){return!1};Df.prototype.destroy=function(){return this._fbo.destroy(),this._fboClassified.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),l(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),me(this)};var BV=Df;var fWi=S(T(),1);function kD(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}Object.defineProperties(kD.prototype,{total:{get:function(){return this._total}}});function fy(e){let t=new Array(Ra.NUMBER_OF_JOB_TYPES);t[Ra.TEXTURE]=new kD(l(e)?e[Ra.TEXTURE]:10),t[Ra.PROGRAM]=new kD(l(e)?e[Ra.PROGRAM]:10),t[Ra.BUFFER]=new kD(l(e)?e[Ra.BUFFER]:30);let n=t.length,i,o=0;for(i=0;i<n;++i)o+=t[i].total;let r=new Array(n);for(i=0;i<n;++i)r[i]=!1;this._totalBudget=o,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=r}fy.getTimestamp=gi;Object.defineProperties(fy.prototype,{totalBudget:{get:function(){return this._totalBudget}}});fy.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget};fy.prototype.resetBudgets=function(){let e=this._budgets,t=e.length;for(let n=0;n<t;++n){let i=e[n];i.starvedLastFrame=i.starvedThisFrame,i.starvedThisFrame=!1,i.usedThisFrame=0,i.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0};fy.prototype.execute=function(e,t){let n=this._budgets,i=n[t],o=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&o)return i.starvedThisFrame=!0,!1;let r;if(i.usedThisFrame+i.stolenFromMeThisFrame>=i.total){let c=n.length,d;for(d=0;d<c&&(r=n[d],!(r.usedThisFrame+r.stolenFromMeThisFrame<r.total&&!r.starvedLastFrame));++d);if(d===c&&o)return!1;o&&(i.starvedThisFrame=!0)}let s=fy.getTimestamp();e.execute();let a=fy.getTimestamp()-s;return this._totalUsedThisFrame+=a,r?r.stolenFromMeThisFrame+=a:i.usedThisFrame+=a,this._executedThisFrame[t]=!0,!0};var lF=fy;var _Wi=S(T(),1);function DD(e){e=y(e,y.EMPTY_OBJECT);let t=In(e.container);this._container=t;let n=document.createElement("div");n.className="cesium-performanceDisplay";let i=document.createElement("div");i.className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),i.appendChild(this._fpsText);let o=document.createElement("div");o.className="cesium-performanceDisplay-ms",this._msText=document.createTextNode(""),o.appendChild(this._msText),n.appendChild(o),n.appendChild(i),this._container.appendChild(n),this._lastFpsSampleTime=gi(),this._lastMsSampleTime=gi(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;let r=document.createElement("div");r.className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),r.appendChild(this._throttledText),n.appendChild(r)}Object.defineProperties(DD.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(e?this._throttledText.nodeValue="(throttled)":this._throttledText.nodeValue="",this._throttled=e)}}});DD.prototype.update=function(e){let t=gi(),n=y(e,!0);this._fpsFrameCount++;let i=t-this._lastFpsSampleTime;if(i>1e3){let r="N/A";n&&(r=this._fpsFrameCount*1e3/i|0),this._fpsText.nodeValue=`${r} FPS`,this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;let o=t-this._lastMsSampleTime;if(o>200){let r="N/A";n&&(r=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=`${r} MS`,this._lastMsSampleTime=t,this._msFrameCount=0}};DD.prototype.destroy=function(){return me(this)};var jb=DD;var lPi=S(T(),1);var RWi=S(T(),1);function CS(){this._framebuffer=new ui,this._textureToCopy=void 0,this._copyDepthCommand=void 0}Object.defineProperties(CS.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function Hlt(e,t,n){let i=n.width,o=n.height;e._framebuffer.update(t,i,o)}function Jlt(e,t,n){l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(`uniform highp sampler2D colorTexture; in vec2 v_textureCoordinates; @@ -12535,7 +12632,7 @@ void main() out_FragColor = czm_branchFreeTernary(globeDepth <= 0.0 || globeDepth >= 1.0 || depth < globeDepth && depth > 0.0 && depth < 1.0, czm_packDepth(depth), globeDepthPacked); } -`,{renderState:De.fromCache(),uniformMap:{colorTexture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=n,e._copyDepthCommand.framebuffer=e.framebuffer}wT.prototype.update=function(e,t){Mut(this,e,t),Nut(this,e,t)};var kut=new se,Uut=new se(1,1/255,1/65025,1/16581375);wT.prototype.getDepth=function(e,t,n){if(!l(this.framebuffer))return;let i=e.readPixels({x:t,y:n,width:1,height:1,framebuffer:this.framebuffer}),o=se.unpack(i,0,kut);return se.divideByScalar(o,255,o),se.dot(o,Uut)};wT.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)};wT.prototype.isDestroyed=function(){return!1};wT.prototype.destroy=function(){return this._framebuffer.destroy(),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=l(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),me(this)};var VF=wT;var eMi=T(S(),1);var Kwi=T(S(),1);function Dut(e,t){this.near=y(e,0),this.far=y(t,0);let n=Re.NUMBER_OF_PASSES,i=new Array(n),o=new Array(n);for(let r=0;r<n;++r)i[r]=[],o[r]=0;this.commands=i,this.indices=o}var LF=Dut;var mFi=T(S(),1);var Qwi=T(S(),1),Ly=`uniform highp sampler2D u_depthTexture; +`,{renderState:De.fromCache(),uniformMap:{colorTexture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=n,e._copyDepthCommand.framebuffer=e.framebuffer}CS.prototype.update=function(e,t){Hlt(this,e,t),Jlt(this,e,t)};var Qlt=new se,jlt=new se(1,1/255,1/65025,1/16581375);CS.prototype.getDepth=function(e,t,n){if(!l(this.framebuffer))return;let i=e.readPixels({x:t,y:n,width:1,height:1,framebuffer:this.framebuffer}),o=se.unpack(i,0,Qlt);return se.divideByScalar(o,255,o),se.dot(o,jlt)};CS.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)};CS.prototype.isDestroyed=function(){return!1};CS.prototype.destroy=function(){return this._framebuffer.destroy(),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=l(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),me(this)};var dF=CS;var A2i=S(T(),1);var IWi=S(T(),1);function qlt(e,t){this.near=y(e,0),this.far=y(t,0);let n=Le.NUMBER_OF_PASSES,i=new Array(n),o=new Array(n);for(let r=0;r<n;++r)i[r]=[],o[r]=0;this.commands=i,this.indices=o}var uF=qlt;var JWi=S(T(),1);var PWi=S(T(),1),py=`uniform highp sampler2D u_depthTexture; in vec2 v_textureCoordinates; @@ -12543,18 +12640,18 @@ void main() { out_FragColor = czm_packDepth(texture(u_depthTexture, v_textureCoordinates).r); } -`;function Of(){this._picking=!1,this._numSamples=1,this._tempCopyDepthTexture=void 0,this._pickColorFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._outputFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._copyDepthFramebuffer=new ui,this._tempCopyDepthFramebuffer=new ui,this._updateDepthFramebuffer=new ui({createColorAttachments:!1,createDepthAttachments:!1,depthStencil:!0}),this._clearGlobeColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new He,this._rs=void 0,this._rsBlend=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0,this._clearGlobeDepth=void 0}Object.defineProperties(Of.prototype,{colorFramebufferManager:{get:function(){return this._picking?this._pickColorFramebuffer:this._outputFramebuffer}},framebuffer:{get:function(){return this.colorFramebufferManager.framebuffer}},depthStencilTexture:{get:function(){return this.colorFramebufferManager.getDepthStencilTexture()}},picking:{get:function(){return this._picking},set:function(e){this._picking=e}}});function But(e){e._pickColorFramebuffer.destroy(),e._outputFramebuffer.destroy(),e._copyDepthFramebuffer.destroy(),e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer.destroy()}function dxe(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;let r=!He.equals(e._viewport,o.viewport),s=r!==e._useScissorTest;e._useScissorTest=r,He.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=He.clone(o.viewport,e._scissorRectangle),s=!0),(!l(e._rs)||!He.equals(e._viewport,e._rs.viewport)||s)&&(e._rs=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:un.ALPHA_BLEND}),e._rsUpdate=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:Un.EQUAL,frontOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.KEEP},backFunction:Un.NEVER,reference:Nt.CESIUM_3D_TILE_MASK,mask:Nt.CESIUM_3D_TILE_MASK}})),l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(Ly,{uniformMap:{u_depthTexture:function(){return e.colorFramebufferManager.getDepthStencilTexture()}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer.framebuffer,e._copyDepthCommand.renderState=e._rs,l(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(jl,{uniformMap:{colorTexture:function(){return e.colorFramebufferManager.getColorTexture()}},owner:e})),e._copyColorCommand.renderState=e._rs,l(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(Ly,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer.framebuffer,e._tempCopyDepthCommand.renderState=e._rs,l(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(jl,{uniformMap:{colorTexture:function(){return e._tempCopyDepthFramebuffer.getColorTexture()}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer.framebuffer,e._updateDepthCommand.renderState=e._rsUpdate,l(e._clearGlobeColorCommand)||(e._clearGlobeColorCommand=new ii({color:new Y(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e.framebuffer}Of.prototype.update=function(e,t,n,i,o,r){let s=n.width,a=n.height,c=o?e.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT:ze.UNSIGNED_BYTE;this._numSamples=i,this.picking?this._pickColorFramebuffer.update(e,s,a):this._outputFramebuffer.update(e,s,a,i,c),this._copyDepthFramebuffer.update(e,s,a),dxe(this,e,s,a,t),e.uniformState.globeDepthTexture=void 0,this._useHdr=o,this._clearGlobeDepth=r};Of.prototype.prepareColorTextures=function(e,t){!this.picking&&this._numSamples>1&&this._outputFramebuffer.prepareTextures(e,t)};Of.prototype.executeCopyDepth=function(e,t){l(this._copyDepthCommand)&&(this.prepareColorTextures(e),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._copyDepthFramebuffer.getColorTexture())};Of.prototype.executeUpdateDepth=function(e,t,n,i){let o=l(i)?i:t.framebuffer.depthStencilTexture;if(n||o!==this.colorFramebufferManager.getDepthStencilTexture()){if(l(this._updateDepthCommand)){if(!l(this._updateDepthFramebuffer.framebuffer)||this._updateDepthFramebuffer.getDepthStencilTexture()!==o||this._updateDepthFramebuffer.getColorTexture()!==this._copyDepthFramebuffer.getColorTexture()){let r=this._copyDepthFramebuffer.getColorTexture().width,s=this._copyDepthFramebuffer.getColorTexture().height;this._tempCopyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.update(e,r,s);let a=this._copyDepthFramebuffer.getColorTexture();this._updateDepthFramebuffer.setColorTexture(a,0),this._updateDepthFramebuffer.setDepthStencilTexture(o),this._updateDepthFramebuffer.update(e,r,s),dxe(this,e,r,s,t)}this._tempCopyDepthTexture=o,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)}return}l(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)};Of.prototype.executeCopyColor=function(e,t){l(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)};Of.prototype.clear=function(e,t,n){let i=this._clearGlobeColorCommand;l(i)&&(Y.clone(n,i.color),this.colorFramebufferManager.clear(e,i,t))};Of.prototype.isDestroyed=function(){return!1};Of.prototype.destroy=function(){return But(this),l(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),l(this._tempCopyDepthCommand)&&(this._tempCopyDepthCommand.shaderProgram=this._tempCopyDepthCommand.shaderProgram.destroy()),l(this._updateDepthCommand)&&(this._updateDepthCommand.shaderProgram=this._updateDepthCommand.shaderProgram.destroy()),me(this)};var RF=Of;var CFi=T(S(),1);function FT(){this._framebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new ui,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new He,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}Object.defineProperties(FT.prototype,{classificationTexture:{get:function(){return this._framebuffer.getColorTexture()}},classificationFramebuffer:{get:function(){return this._framebuffer.framebuffer}},packedDepthFramebuffer:{get:function(){return this._packedDepthFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._framebuffer.getDepthStencilTexture()}},depthStencilRenderbuffer:{get:function(){return this._framebuffer.getDepthStencilRenderbuffer()}},packedDepthTexture:{get:function(){return this._packedDepthFramebuffer.getColorTexture()}}});function Yut(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function Out(e,t,n,i,o){let r=o?t.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT:ze.UNSIGNED_BYTE;e._framebuffer.update(t,n,i,1,r),e._packedDepthFramebuffer.update(t,n,i)}function Hut(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;let r=!He.equals(e._viewport,o.viewport),s=r!==e._useScissorTest;e._useScissorTest=r,He.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=He.clone(o.viewport,e._scissorRectangle),s=!0),(!l(e._renderState)||!He.equals(e._viewport,e._renderState.viewport)||s)&&(e._renderState=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(Ly,{uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),l(e._clearCommand)||(e._clearCommand=new ii({color:new Y(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer.framebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e.classificationFramebuffer,e._clearCommand.renderState=e._renderState}FT.prototype.updateAndClear=function(e,t,n,i){let o=t.width,r=t.height;Out(this,n,o,r,e),Hut(this,n,o,r,i),this._useHdr=e};FT.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)};FT.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture};FT.prototype.isDestroyed=function(){return!1};FT.prototype.destroy=function(){return Yut(this),me(this)};var ZF=FT;var DFi=T(S(),1);function nb(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;let t=e.colorBufferFloat&&e.depthTexture&&e.floatBlend;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=new ui({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._alphaFBO=new ui({createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._adjustTranslucentFBO=new ui({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1}),this._adjustAlphaFBO=new ui({createColorAttachments:!1}),this._opaqueClearCommand=new ii({color:new Y(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new ii({color:new Y(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new ii({color:new Y(0,0,0,0),owner:this}),this._alphaClearCommand=new ii({color:new Y(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new He,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function uxe(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function i8(e){e._translucentFBO.destroy(),e._alphaFBO.destroy(),e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO.destroy()}function mxe(e){uxe(e),i8(e)}function zut(e,t,n,i){uxe(e),e._accumulationTexture=new Et({context:t,width:n,height:i,pixelFormat:at.RGBA,pixelDatatype:ze.FLOAT});let o=new Float32Array(n*i*4);e._revealageTexture=new Et({context:t,pixelFormat:at.RGBA,pixelDatatype:ze.FLOAT,source:{arrayBufferView:o,width:n,height:i},flipY:!1})}function Kut(e,t){i8(e);let n=ne.FRAMEBUFFER_COMPLETE,i=!0,{width:o,height:r}=e._accumulationTexture;if(e._translucentMRTSupport&&(e._translucentFBO.setColorTexture(e._accumulationTexture,0),e._translucentFBO.setColorTexture(e._revealageTexture,1),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture,0),e._adjustTranslucentFBO.setColorTexture(e._revealageTexture,1),e._adjustTranslucentFBO.update(t,o,r),(e._translucentFBO.status!==n||e._adjustTranslucentFBO.status!==n)&&(i8(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO.setColorTexture(e._accumulationTexture),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,o,r),e._alphaFBO.setColorTexture(e._revealageTexture),e._alphaFBO.setDepthStencilTexture(e._depthStencilTexture),e._alphaFBO.update(t,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture),e._adjustTranslucentFBO.update(t,o,r),e._adjustAlphaFBO.setColorTexture(e._revealageTexture),e._adjustAlphaFBO.update(t,o,r);let s=e._translucentFBO.status===n,a=e._alphaFBO.status===n,c=e._adjustTranslucentFBO.status===n,d=e._adjustAlphaFBO.status===n;(!s||!a||!c||!d)&&(mxe(e),e._translucentMultipassSupport=!1,i=!1)}return i}nb.prototype.update=function(e,t,n,i,o){if(!this.isSupported())return;this._opaqueFBO=n,this._opaqueTexture=n.getColorTexture(0),this._depthStencilTexture=n.getDepthStencilTexture();let{width:r,height:s}=this._opaqueTexture,a=this._accumulationTexture,c=!l(a)||a.width!==r||a.height!==s||i!==this._useHDR,d=this._numSamples!==o;if((c||d)&&(this._numSamples=o,zut(this,e,r,s)),(!l(this._translucentFBO.framebuffer)||c||d)&&!Kut(this,e))return;this._useHDR=i;let u=this,m,p;l(this._compositeCommand)||(m=new Ye({sources:[pw]}),this._translucentMRTSupport&&m.defines.push("MRT"),p={u_opaque:function(){return u._opaqueTexture},u_accumulation:function(){return u._accumulationTexture},u_revealage:function(){return u._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(m,{uniformMap:p,owner:this})),l(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(m=new Ye({defines:["MRT"],sources:[WV]}),p={u_bgColor:function(){return u._translucentMRTClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(m,{uniformMap:p,owner:this})):this._translucentMultipassSupport&&(m=new Ye({sources:[WV]}),p={u_bgColor:function(){return u._translucentMultipassClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(m,{uniformMap:p,owner:this}),p={u_bgColor:function(){return u._alphaClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(m,{uniformMap:p,owner:this}))),this._viewport.width=r,this._viewport.height=s;let g=!He.equals(this._viewport,t.viewport),f=g!==this._useScissorTest;this._useScissorTest=g,He.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=He.clone(t.viewport,this._scissorRectangle),f=!0),(!l(this._rs)||!He.equals(this._viewport,this._rs.viewport)||f)&&(this._rs=De.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),l(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),l(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)};var Jut={enabled:!0,color:new Y(0,0,0,0),equationRgb:Sa.ADD,equationAlpha:Sa.ADD,functionSourceRgb:xo.ONE,functionDestinationRgb:xo.ONE,functionSourceAlpha:xo.ZERO,functionDestinationAlpha:xo.ONE_MINUS_SOURCE_ALPHA},Qut={enabled:!0,color:new Y(0,0,0,0),equationRgb:Sa.ADD,equationAlpha:Sa.ADD,functionSourceRgb:xo.ONE,functionDestinationRgb:xo.ONE,functionSourceAlpha:xo.ONE,functionDestinationAlpha:xo.ONE},jut={enabled:!0,color:new Y(0,0,0,0),equationRgb:Sa.ADD,equationAlpha:Sa.ADD,functionSourceRgb:xo.ZERO,functionDestinationRgb:xo.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:xo.ZERO,functionDestinationAlpha:xo.ONE_MINUS_SOURCE_ALPHA};function o8(e,t,n,i){let o=n[i.id];if(!l(o)){let r=De.getState(i);r.depthMask=!1,r.blending=t,o=De.fromCache(r),n[i.id]=o}return o}function qut(e,t,n){return o8(t,Jut,e._translucentRenderStateCache,n)}function $ut(e,t,n){return o8(t,Qut,e._translucentRenderStateCache,n)}function emt(e,t,n){return o8(t,jut,e._alphaRenderStateCache,n)}var tmt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a; +`;function Bf(){this._picking=!1,this._numSamples=1,this._tempCopyDepthTexture=void 0,this._pickColorFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._outputFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._copyDepthFramebuffer=new ui,this._tempCopyDepthFramebuffer=new ui,this._updateDepthFramebuffer=new ui({createColorAttachments:!1,createDepthAttachments:!1,depthStencil:!0}),this._clearGlobeColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new ze,this._rs=void 0,this._rsBlend=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0,this._clearGlobeDepth=void 0}Object.defineProperties(Bf.prototype,{colorFramebufferManager:{get:function(){return this._picking?this._pickColorFramebuffer:this._outputFramebuffer}},framebuffer:{get:function(){return this.colorFramebufferManager.framebuffer}},depthStencilTexture:{get:function(){return this.colorFramebufferManager.getDepthStencilTexture()}},picking:{get:function(){return this._picking},set:function(e){this._picking=e}}});function $lt(e){e._pickColorFramebuffer.destroy(),e._outputFramebuffer.destroy(),e._copyDepthFramebuffer.destroy(),e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer.destroy()}function Vye(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;let r=!ze.equals(e._viewport,o.viewport),s=r!==e._useScissorTest;e._useScissorTest=r,ze.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=ze.clone(o.viewport,e._scissorRectangle),s=!0),(!l(e._rs)||!ze.equals(e._viewport,e._rs.viewport)||s)&&(e._rs=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:un.ALPHA_BLEND}),e._rsUpdate=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:kn.EQUAL,frontOperation:{fail:pt.KEEP,zFail:pt.KEEP,zPass:pt.KEEP},backFunction:kn.NEVER,reference:Nt.CESIUM_3D_TILE_MASK,mask:Nt.CESIUM_3D_TILE_MASK}})),l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(py,{uniformMap:{u_depthTexture:function(){return e.colorFramebufferManager.getDepthStencilTexture()}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer.framebuffer,e._copyDepthCommand.renderState=e._rs,l(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(Ql,{uniformMap:{colorTexture:function(){return e.colorFramebufferManager.getColorTexture()}},owner:e})),e._copyColorCommand.renderState=e._rs,l(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(py,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer.framebuffer,e._tempCopyDepthCommand.renderState=e._rs,l(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(Ql,{uniformMap:{colorTexture:function(){return e._tempCopyDepthFramebuffer.getColorTexture()}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer.framebuffer,e._updateDepthCommand.renderState=e._rsUpdate,l(e._clearGlobeColorCommand)||(e._clearGlobeColorCommand=new ii({color:new Y(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e.framebuffer}Bf.prototype.update=function(e,t,n,i,o,r){let s=n.width,a=n.height,c=o?e.halfFloatingPointTexture?Ke.HALF_FLOAT:Ke.FLOAT:Ke.UNSIGNED_BYTE;this._numSamples=i,this.picking?this._pickColorFramebuffer.update(e,s,a):this._outputFramebuffer.update(e,s,a,i,c),this._copyDepthFramebuffer.update(e,s,a),Vye(this,e,s,a,t),e.uniformState.globeDepthTexture=void 0,this._useHdr=o,this._clearGlobeDepth=r};Bf.prototype.prepareColorTextures=function(e,t){!this.picking&&this._numSamples>1&&this._outputFramebuffer.prepareTextures(e,t)};Bf.prototype.executeCopyDepth=function(e,t){l(this._copyDepthCommand)&&(this.prepareColorTextures(e),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._copyDepthFramebuffer.getColorTexture())};Bf.prototype.executeUpdateDepth=function(e,t,n,i){let o=l(i)?i:t.framebuffer.depthStencilTexture;if(n||o!==this.colorFramebufferManager.getDepthStencilTexture()){if(l(this._updateDepthCommand)){if(!l(this._updateDepthFramebuffer.framebuffer)||this._updateDepthFramebuffer.getDepthStencilTexture()!==o||this._updateDepthFramebuffer.getColorTexture()!==this._copyDepthFramebuffer.getColorTexture()){let r=this._copyDepthFramebuffer.getColorTexture().width,s=this._copyDepthFramebuffer.getColorTexture().height;this._tempCopyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.update(e,r,s);let a=this._copyDepthFramebuffer.getColorTexture();this._updateDepthFramebuffer.setColorTexture(a,0),this._updateDepthFramebuffer.setDepthStencilTexture(o),this._updateDepthFramebuffer.update(e,r,s),Vye(this,e,r,s,t)}this._tempCopyDepthTexture=o,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)}return}l(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)};Bf.prototype.executeCopyColor=function(e,t){l(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)};Bf.prototype.clear=function(e,t,n){let i=this._clearGlobeColorCommand;l(i)&&(Y.clone(n,i.color),this.colorFramebufferManager.clear(e,i,t))};Bf.prototype.isDestroyed=function(){return!1};Bf.prototype.destroy=function(){return $lt(this),l(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),l(this._tempCopyDepthCommand)&&(this._tempCopyDepthCommand.shaderProgram=this._tempCopyDepthCommand.shaderProgram.destroy()),l(this._updateDepthCommand)&&(this._updateDepthCommand.shaderProgram=this._updateDepthCommand.shaderProgram.destroy()),me(this)};var mF=Bf;var sIi=S(T(),1);function VS(){this._framebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new ui,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new ze,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}Object.defineProperties(VS.prototype,{classificationTexture:{get:function(){return this._framebuffer.getColorTexture()}},classificationFramebuffer:{get:function(){return this._framebuffer.framebuffer}},packedDepthFramebuffer:{get:function(){return this._packedDepthFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._framebuffer.getDepthStencilTexture()}},depthStencilRenderbuffer:{get:function(){return this._framebuffer.getDepthStencilRenderbuffer()}},packedDepthTexture:{get:function(){return this._packedDepthFramebuffer.getColorTexture()}}});function edt(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function tdt(e,t,n,i,o){let r=o?t.halfFloatingPointTexture?Ke.HALF_FLOAT:Ke.FLOAT:Ke.UNSIGNED_BYTE;e._framebuffer.update(t,n,i,1,r),e._packedDepthFramebuffer.update(t,n,i)}function ndt(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;let r=!ze.equals(e._viewport,o.viewport),s=r!==e._useScissorTest;e._useScissorTest=r,ze.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=ze.clone(o.viewport,e._scissorRectangle),s=!0),(!l(e._renderState)||!ze.equals(e._viewport,e._renderState.viewport)||s)&&(e._renderState=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(py,{uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),l(e._clearCommand)||(e._clearCommand=new ii({color:new Y(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer.framebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e.classificationFramebuffer,e._clearCommand.renderState=e._renderState}VS.prototype.updateAndClear=function(e,t,n,i){let o=t.width,r=t.height;tdt(this,n,o,r,e),ndt(this,n,o,r,i),this._useHdr=e};VS.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)};VS.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture};VS.prototype.isDestroyed=function(){return!1};VS.prototype.destroy=function(){return edt(this),me(this)};var hF=VS;var ZIi=S(T(),1);function qb(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;let t=e.colorBufferFloat&&e.depthTexture&&e.floatBlend;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=new ui({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._alphaFBO=new ui({createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._adjustTranslucentFBO=new ui({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1}),this._adjustAlphaFBO=new ui({createColorAttachments:!1}),this._opaqueClearCommand=new ii({color:new Y(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new ii({color:new Y(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new ii({color:new Y(0,0,0,0),owner:this}),this._alphaClearCommand=new ii({color:new Y(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new ze,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function Zye(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function ej(e){e._translucentFBO.destroy(),e._alphaFBO.destroy(),e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO.destroy()}function Lye(e){Zye(e),ej(e)}function idt(e,t,n,i){Zye(e),e._accumulationTexture=new Et({context:t,width:n,height:i,pixelFormat:at.RGBA,pixelDatatype:Ke.FLOAT});let o=new Float32Array(n*i*4);e._revealageTexture=new Et({context:t,pixelFormat:at.RGBA,pixelDatatype:Ke.FLOAT,source:{arrayBufferView:o,width:n,height:i},flipY:!1})}function odt(e,t){ej(e);let n=ie.FRAMEBUFFER_COMPLETE,i=!0,{width:o,height:r}=e._accumulationTexture;if(e._translucentMRTSupport&&(e._translucentFBO.setColorTexture(e._accumulationTexture,0),e._translucentFBO.setColorTexture(e._revealageTexture,1),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture,0),e._adjustTranslucentFBO.setColorTexture(e._revealageTexture,1),e._adjustTranslucentFBO.update(t,o,r),(e._translucentFBO.status!==n||e._adjustTranslucentFBO.status!==n)&&(ej(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO.setColorTexture(e._accumulationTexture),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,o,r),e._alphaFBO.setColorTexture(e._revealageTexture),e._alphaFBO.setDepthStencilTexture(e._depthStencilTexture),e._alphaFBO.update(t,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture),e._adjustTranslucentFBO.update(t,o,r),e._adjustAlphaFBO.setColorTexture(e._revealageTexture),e._adjustAlphaFBO.update(t,o,r);let s=e._translucentFBO.status===n,a=e._alphaFBO.status===n,c=e._adjustTranslucentFBO.status===n,d=e._adjustAlphaFBO.status===n;(!s||!a||!c||!d)&&(Lye(e),e._translucentMultipassSupport=!1,i=!1)}return i}qb.prototype.update=function(e,t,n,i,o){if(!this.isSupported())return;this._opaqueFBO=n,this._opaqueTexture=n.getColorTexture(0),this._depthStencilTexture=n.getDepthStencilTexture();let{width:r,height:s}=this._opaqueTexture,a=this._accumulationTexture,c=!l(a)||a.width!==r||a.height!==s||i!==this._useHDR,d=this._numSamples!==o;if((c||d)&&(this._numSamples=o,idt(this,e,r,s)),(!l(this._translucentFBO.framebuffer)||c||d)&&!odt(this,e))return;this._useHDR=i;let u=this,m,p;l(this._compositeCommand)||(m=new Ye({sources:[Uv]}),this._translucentMRTSupport&&m.defines.push("MRT"),p={u_opaque:function(){return u._opaqueTexture},u_accumulation:function(){return u._accumulationTexture},u_revealage:function(){return u._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(m,{uniformMap:p,owner:this})),l(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(m=new Ye({defines:["MRT"],sources:[bV]}),p={u_bgColor:function(){return u._translucentMRTClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(m,{uniformMap:p,owner:this})):this._translucentMultipassSupport&&(m=new Ye({sources:[bV]}),p={u_bgColor:function(){return u._translucentMultipassClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(m,{uniformMap:p,owner:this}),p={u_bgColor:function(){return u._alphaClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(m,{uniformMap:p,owner:this}))),this._viewport.width=r,this._viewport.height=s;let g=!ze.equals(this._viewport,t.viewport),f=g!==this._useScissorTest;this._useScissorTest=g,ze.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=ze.clone(t.viewport,this._scissorRectangle),f=!0),(!l(this._rs)||!ze.equals(this._viewport,this._rs.viewport)||f)&&(this._rs=De.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),l(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),l(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)};var rdt={enabled:!0,color:new Y(0,0,0,0),equationRgb:Ca.ADD,equationAlpha:Ca.ADD,functionSourceRgb:xo.ONE,functionDestinationRgb:xo.ONE,functionSourceAlpha:xo.ZERO,functionDestinationAlpha:xo.ONE_MINUS_SOURCE_ALPHA},sdt={enabled:!0,color:new Y(0,0,0,0),equationRgb:Ca.ADD,equationAlpha:Ca.ADD,functionSourceRgb:xo.ONE,functionDestinationRgb:xo.ONE,functionSourceAlpha:xo.ONE,functionDestinationAlpha:xo.ONE},adt={enabled:!0,color:new Y(0,0,0,0),equationRgb:Ca.ADD,equationAlpha:Ca.ADD,functionSourceRgb:xo.ZERO,functionDestinationRgb:xo.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:xo.ZERO,functionDestinationAlpha:xo.ONE_MINUS_SOURCE_ALPHA};function tj(e,t,n,i){let o=n[i.id];if(!l(o)){let r=De.getState(i);r.depthMask=!1,r.blending=t,o=De.fromCache(r),n[i.id]=o}return o}function cdt(e,t,n){return tj(t,rdt,e._translucentRenderStateCache,n)}function ldt(e,t,n){return tj(t,sdt,e._translucentRenderStateCache,n)}function ddt(e,t,n){return tj(t,adt,e._alphaRenderStateCache,n)}var udt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a; float ai = czm_out_FragColor.a; float wzi = czm_alphaWeight(ai); out_FragData_0 = vec4(Ci * wzi, ai); out_FragData_1 = vec4(ai * wzi); -`,nmt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a; +`,mdt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a; float ai = czm_out_FragColor.a; float wzi = czm_alphaWeight(ai); out_FragColor = vec4(Ci, ai) * wzi; -`,imt=` float ai = czm_out_FragColor.a; +`,hdt=` float ai = czm_out_FragColor.a; out_FragColor = vec4(ai); -`;function r8(e,t,n,i){let{shaderCache:o}=e,r=o.getDerivedShaderProgram(t,n);if(l(r))return r;let s=t._attributeLocations,a=t.fragmentShaderSource.clone();a.sources=a.sources.map(function(u){return Ye.replaceMain(u,"czm_translucent_main").replace(/out_FragColor/g,"czm_out_FragColor").replace(/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,"").replace(/\bdiscard\b/g,"czm_discard = true").replace(/czm_phong/g,"czm_translucentPhong")}),a.sources.splice(0,0,`vec4 czm_out_FragColor; +`;function nj(e,t,n,i){let{shaderCache:o}=e,r=o.getDerivedShaderProgram(t,n);if(l(r))return r;let s=t._attributeLocations,a=t.fragmentShaderSource.clone();a.sources=a.sources.map(function(u){return Ye.replaceMain(u,"czm_translucent_main").replace(/out_FragColor/g,"czm_out_FragColor").replace(/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,"").replace(/\bdiscard\b/g,"czm_discard = true").replace(/czm_phong/g,"czm_translucentPhong")}),a.sources.splice(0,0,`vec4 czm_out_FragColor; bool czm_discard = false; `);let c=[...i.matchAll(/out_FragData_(\d+)/g)],d="";for(let u=0;u<c.length;u++){let m=c[u];d=`layout (location = ${m[1]}) out vec4 ${m[0]}; ${d}`}return a.sources.push(d),a.sources.push(`void main() @@ -12565,12 +12662,12 @@ ${d}`}return a.sources.push(d),a.sources.push(`void main() discard; } ${i}} -`),o.createDerivedShaderProgram(t,n,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:s})}function omt(e,t){return r8(e,t,"translucentMRT",tmt)}function rmt(e,t){return r8(e,t,"translucentMultipass",nmt)}function smt(e,t){return r8(e,t,"alphaMultipass",imt)}nb.prototype.createDerivedCommands=function(e,t,n){if(l(n)||(n={}),this._translucentMRTSupport){let a,c;return l(n.translucentCommand)&&(a=n.translucentCommand.shaderProgram,c=n.translucentCommand.renderState),n.translucentCommand=et.shallowClone(e,n.translucentCommand),!l(a)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=omt(t,e.shaderProgram),n.translucentCommand.renderState=qut(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=a,n.translucentCommand.renderState=c),n}let i,o,r,s;return l(n.translucentCommand)&&(i=n.translucentCommand.shaderProgram,o=n.translucentCommand.renderState,r=n.alphaCommand.shaderProgram,s=n.alphaCommand.renderState),n.translucentCommand=et.shallowClone(e,n.translucentCommand),n.alphaCommand=et.shallowClone(e,n.alphaCommand),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=rmt(t,e.shaderProgram),n.translucentCommand.renderState=$ut(this,t,e.renderState),n.alphaCommand.shaderProgram=smt(t,e.shaderProgram),n.alphaCommand.renderState=emt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=i,n.translucentCommand.renderState=o,n.alphaCommand.shaderProgram=r,n.alphaCommand.renderState=s),n};function amt(e,t,n,i,o,r){let s,a,c,{context:d,frameState:u}=t,{useLogDepth:m,shadowState:p}=u,g=t._hdr,f=i.framebuffer,x=p.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(d,i),i.framebuffer=e._adjustAlphaFBO.framebuffer,e._adjustAlphaCommand.execute(d,i);let _=e._opaqueFBO.framebuffer;for(i.framebuffer=e._translucentFBO.framebuffer,c=0;c<o.length;++c)s=o[c],s=m?s.derivedCommands.logDepth.command:s,s=g?s.derivedCommands.hdr.command:s,a=x&&s.receiveShadows?s.derivedCommands.oit.shadows.translucentCommand:s.derivedCommands.oit.translucentCommand,n(a,t,d,i,_);for(l(r)&&(s=r.unclassifiedCommand,a=x&&s.receiveShadows?s.derivedCommands.oit.shadows.translucentCommand:s.derivedCommands.oit.translucentCommand,n(a,t,d,i,_)),i.framebuffer=e._alphaFBO.framebuffer,c=0;c<o.length;++c)s=o[c],s=m?s.derivedCommands.logDepth.command:s,s=g?s.derivedCommands.hdr.command:s,a=x&&s.receiveShadows?s.derivedCommands.oit.shadows.alphaCommand:s.derivedCommands.oit.alphaCommand,n(a,t,d,i,_);l(r)&&(s=r.unclassifiedCommand,a=x&&s.receiveShadows?s.derivedCommands.oit.shadows.alphaCommand:s.derivedCommands.oit.alphaCommand,n(a,t,d,i,_)),i.framebuffer=f}function cmt(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:d}=a,u=t._hdr,m=i.framebuffer,p=d.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i);let g=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;let f,x;for(let _=0;_<o.length;++_)f=o[_],f=c?f.derivedCommands.logDepth.command:f,f=u?f.derivedCommands.hdr.command:f,x=p&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,n(x,t,s,i,g);l(r)&&(f=r.unclassifiedCommand,x=p&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,n(x,t,s,i,g)),i.framebuffer=m}nb.prototype.executeCommands=function(e,t,n,i,o){if(this._translucentMRTSupport){cmt(this,e,t,n,i,o);return}amt(this,e,t,n,i,o)};nb.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)};nb.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this._opaqueFBO.framebuffer,Y.clone(n,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO.framebuffer,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO.framebuffer,this._alphaClearCommand.execute(e,t)),t.framebuffer=i};nb.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport};nb.prototype.isDestroyed=function(){return!1};nb.prototype.destroy=function(){return mxe(this),l(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),l(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),l(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),me(this)};var GF=nb;var KFi=T(S(),1);function EF(){this._framebuffer=new ui({color:!1,depthStencil:!0,supportsDepthTexture:!0}),this._passState=void 0}Object.defineProperties(EF.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function lmt(e){e._framebuffer.destroy()}function dmt(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i);let o=new pc(t);o.blendingEnabled=!1,o.scissorTest={enabled:!0,rectangle:new He},o.viewport=new He,e._passState=o}EF.prototype.update=function(e,t,n){let i=n.width,o=n.height;this._framebuffer.isDirty(i,o)&&dmt(this,e);let r=this.framebuffer,s=this._passState;return s.framebuffer=r,s.viewport.width=i,s.viewport.height=o,s.scissorTest.rectangle.x=t.x,s.scissorTest.rectangle.y=o-t.y,s.scissorTest.rectangle.width=1,s.scissorTest.rectangle.height=1,s};EF.prototype.isDestroyed=function(){return!1};EF.prototype.destroy=function(){return lmt(this),me(this)};var XF=EF;var i9i=T(S(),1);function tL(e){let t=new pc(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new He},t.viewport=new He,this._context=e,this._fb=new ui({depthStencil:!0}),this._passState=t,this._width=0,this._height=0}tL.prototype.begin=function(e,t){let n=this._context,{width:i,height:o}=t;return He.clone(e,this._passState.scissorTest.rectangle),this._width=i,this._height=o,this._fb.update(n,i,o),this._passState.framebuffer=this._fb.framebuffer,this._passState.viewport.width=i,this._passState.viewport.height=o,this._passState};var IF=new Y;tL.prototype.end=function(e){let t=y(e.width,1),n=y(e.height,1),i=this._context,o=i.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),r=Math.max(t,n),s=r*r,a=Math.floor(t*.5),c=Math.floor(n*.5),d=0,u=0,m=0,p=-1;for(let g=0;g<s;++g){if(-a<=d&&d<=a&&-c<=u&&u<=c){let f=4*((c-u)*t+d+a);IF.red=Y.byteToFloat(o[f]),IF.green=Y.byteToFloat(o[f+1]),IF.blue=Y.byteToFloat(o[f+2]),IF.alpha=Y.byteToFloat(o[f+3]);let x=i.getObjectByPickColor(IF);if(l(x))return x}if(d===u||d<0&&-d===u||d>0&&d===1-u){let f=m;m=-p,p=f}d+=m,u+=p}};tL.prototype.readVoxelInfo=function(e){let t=y(e.width,1),n=y(e.height,1),o=this._context.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),r=Math.floor(t*.5),a=4*(Math.floor(n*.5)*t+r);return o.slice(a,a+4)};tL.prototype.isDestroyed=function(){return!1};tL.prototype.destroy=function(){return this._fb.destroy(),me(this)};var WF=tL;var d9i=T(S(),1);function ib(){this._numSamples=1,this._colorFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._idFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._idClearColor=new Y(0,0,0,0),this._clearCommand=new ii({color:new Y(0,0,0,0),depth:1,owner:this})}function umt(e){e._colorFramebuffer.destroy(),e._idFramebuffer.destroy()}Object.defineProperties(ib.prototype,{framebuffer:{get:function(){return this._colorFramebuffer.framebuffer}},idFramebuffer:{get:function(){return this._idFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._colorFramebuffer.getDepthStencilTexture()}}});ib.prototype.update=function(e,t,n,i){let o=t.width,r=t.height,s=n?e.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT:ze.UNSIGNED_BYTE;this._numSamples=i,this._colorFramebuffer.update(e,o,r,i,s),this._idFramebuffer.update(e,o,r)};ib.prototype.clear=function(e,t,n){Y.clone(n,this._clearCommand.color),Y.clone(this._idClearColor,this._clearCommand.color),this._colorFramebuffer.clear(e,this._clearCommand,t),this._idFramebuffer.clear(e,this._clearCommand,t)};ib.prototype.getFramebuffer=function(){return this._colorFramebuffer.framebuffer};ib.prototype.getIdFramebuffer=function(){return this._idFramebuffer.framebuffer};ib.prototype.prepareColorTextures=function(e){this._numSamples>1&&this._colorFramebuffer.prepareTextures(e)};ib.prototype.isDestroyed=function(){return!1};ib.prototype.destroy=function(){return umt(this),me(this)};var AT=ib;var aAi=T(S(),1);var f9i=T(S(),1);function MT(){}MT.getShadowCastShaderKeyword=function(e,t,n,i){return`castShadow ${e} ${t} ${n} ${i}`};MT.createShadowCastVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);i.push("SHADOW_MAP"),n&&i.push("GENERATE_POSITION");let r=Ye.findPositionVarying(e),s=l(r);if(t&&!s){let a=o.length;for(let d=0;d<a;++d)o[d]=Ye.replaceMain(o[d],"czm_shadow_cast_main");o.push(`out vec3 v_positionEC; +`),o.createDerivedShaderProgram(t,n,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:s})}function fdt(e,t){return nj(e,t,"translucentMRT",udt)}function pdt(e,t){return nj(e,t,"translucentMultipass",mdt)}function bdt(e,t){return nj(e,t,"alphaMultipass",hdt)}qb.prototype.createDerivedCommands=function(e,t,n){if(l(n)||(n={}),this._translucentMRTSupport){let a,c;return l(n.translucentCommand)&&(a=n.translucentCommand.shaderProgram,c=n.translucentCommand.renderState),n.translucentCommand=tt.shallowClone(e,n.translucentCommand),!l(a)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=fdt(t,e.shaderProgram),n.translucentCommand.renderState=cdt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=a,n.translucentCommand.renderState=c),n}let i,o,r,s;return l(n.translucentCommand)&&(i=n.translucentCommand.shaderProgram,o=n.translucentCommand.renderState,r=n.alphaCommand.shaderProgram,s=n.alphaCommand.renderState),n.translucentCommand=tt.shallowClone(e,n.translucentCommand),n.alphaCommand=tt.shallowClone(e,n.alphaCommand),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=pdt(t,e.shaderProgram),n.translucentCommand.renderState=ldt(this,t,e.renderState),n.alphaCommand.shaderProgram=bdt(t,e.shaderProgram),n.alphaCommand.renderState=ddt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=i,n.translucentCommand.renderState=o,n.alphaCommand.shaderProgram=r,n.alphaCommand.renderState=s),n};function gdt(e,t,n,i,o,r){let s,a,c,{context:d,frameState:u}=t,{useLogDepth:m,shadowState:p}=u,g=t._hdr,f=i.framebuffer,x=p.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(d,i),i.framebuffer=e._adjustAlphaFBO.framebuffer,e._adjustAlphaCommand.execute(d,i);let _=e._opaqueFBO.framebuffer;for(i.framebuffer=e._translucentFBO.framebuffer,c=0;c<o.length;++c)s=o[c],s=m?s.derivedCommands.logDepth.command:s,s=g?s.derivedCommands.hdr.command:s,a=x&&s.receiveShadows?s.derivedCommands.oit.shadows.translucentCommand:s.derivedCommands.oit.translucentCommand,n(a,t,d,i,_);for(l(r)&&(s=r.unclassifiedCommand,a=x&&s.receiveShadows?s.derivedCommands.oit.shadows.translucentCommand:s.derivedCommands.oit.translucentCommand,n(a,t,d,i,_)),i.framebuffer=e._alphaFBO.framebuffer,c=0;c<o.length;++c)s=o[c],s=m?s.derivedCommands.logDepth.command:s,s=g?s.derivedCommands.hdr.command:s,a=x&&s.receiveShadows?s.derivedCommands.oit.shadows.alphaCommand:s.derivedCommands.oit.alphaCommand,n(a,t,d,i,_);l(r)&&(s=r.unclassifiedCommand,a=x&&s.receiveShadows?s.derivedCommands.oit.shadows.alphaCommand:s.derivedCommands.oit.alphaCommand,n(a,t,d,i,_)),i.framebuffer=f}function ydt(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:d}=a,u=t._hdr,m=i.framebuffer,p=d.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i);let g=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;let f,x;for(let _=0;_<o.length;++_)f=o[_],f=c?f.derivedCommands.logDepth.command:f,f=u?f.derivedCommands.hdr.command:f,x=p&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,n(x,t,s,i,g);l(r)&&(f=r.unclassifiedCommand,x=p&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,n(x,t,s,i,g)),i.framebuffer=m}qb.prototype.executeCommands=function(e,t,n,i,o){if(this._translucentMRTSupport){ydt(this,e,t,n,i,o);return}gdt(this,e,t,n,i,o)};qb.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)};qb.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this._opaqueFBO.framebuffer,Y.clone(n,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO.framebuffer,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO.framebuffer,this._alphaClearCommand.execute(e,t)),t.framebuffer=i};qb.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport};qb.prototype.isDestroyed=function(){return!1};qb.prototype.destroy=function(){return Lye(this),l(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),l(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),l(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),me(this)};var fF=qb;var IIi=S(T(),1);function pF(){this._framebuffer=new ui({color:!1,depthStencil:!0,supportsDepthTexture:!0}),this._passState=void 0}Object.defineProperties(pF.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function xdt(e){e._framebuffer.destroy()}function _dt(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i);let o=new xc(t);o.blendingEnabled=!1,o.scissorTest={enabled:!0,rectangle:new ze},o.viewport=new ze,e._passState=o}pF.prototype.update=function(e,t,n){let i=n.width,o=n.height;this._framebuffer.isDirty(i,o)&&_dt(this,e);let r=this.framebuffer,s=this._passState;return s.framebuffer=r,s.viewport.width=i,s.viewport.height=o,s.scissorTest.rectangle.x=t.x,s.scissorTest.rectangle.y=o-t.y,s.scissorTest.rectangle.width=1,s.scissorTest.rectangle.height=1,s};pF.prototype.isDestroyed=function(){return!1};pF.prototype.destroy=function(){return xdt(this),me(this)};var bF=pF;var UIi=S(T(),1);function YV(e){let t=new xc(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new ze},t.viewport=new ze,this._context=e,this._fb=new ui({depthStencil:!0}),this._passState=t,this._width=0,this._height=0}YV.prototype.begin=function(e,t){let n=this._context,{width:i,height:o}=t;return ze.clone(e,this._passState.scissorTest.rectangle),this._width=i,this._height=o,this._fb.update(n,i,o),this._passState.framebuffer=this._fb.framebuffer,this._passState.viewport.width=i,this._passState.viewport.height=o,this._passState};var gF=new Y;YV.prototype.end=function(e){let t=y(e.width,1),n=y(e.height,1),i=this._context,o=i.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),r=Math.max(t,n),s=r*r,a=Math.floor(t*.5),c=Math.floor(n*.5),d=0,u=0,m=0,p=-1;for(let g=0;g<s;++g){if(-a<=d&&d<=a&&-c<=u&&u<=c){let f=4*((c-u)*t+d+a);gF.red=Y.byteToFloat(o[f]),gF.green=Y.byteToFloat(o[f+1]),gF.blue=Y.byteToFloat(o[f+2]),gF.alpha=Y.byteToFloat(o[f+3]);let x=i.getObjectByPickColor(gF);if(l(x))return x}if(d===u||d<0&&-d===u||d>0&&d===1-u){let f=m;m=-p,p=f}d+=m,u+=p}};YV.prototype.readVoxelInfo=function(e){let t=y(e.width,1),n=y(e.height,1),o=this._context.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),r=Math.floor(t*.5),a=4*(Math.floor(n*.5)*t+r);return o.slice(a,a+4)};YV.prototype.isDestroyed=function(){return!1};YV.prototype.destroy=function(){return this._fb.destroy(),me(this)};var yF=YV;var KIi=S(T(),1);function $b(){this._numSamples=1,this._colorFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._idFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._idClearColor=new Y(0,0,0,0),this._clearCommand=new ii({color:new Y(0,0,0,0),depth:1,owner:this})}function Sdt(e){e._colorFramebuffer.destroy(),e._idFramebuffer.destroy()}Object.defineProperties($b.prototype,{framebuffer:{get:function(){return this._colorFramebuffer.framebuffer}},idFramebuffer:{get:function(){return this._idFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._colorFramebuffer.getDepthStencilTexture()}}});$b.prototype.update=function(e,t,n,i){let o=t.width,r=t.height,s=n?e.halfFloatingPointTexture?Ke.HALF_FLOAT:Ke.FLOAT:Ke.UNSIGNED_BYTE;this._numSamples=i,this._colorFramebuffer.update(e,o,r,i,s),this._idFramebuffer.update(e,o,r)};$b.prototype.clear=function(e,t,n){Y.clone(n,this._clearCommand.color),Y.clone(this._idClearColor,this._clearCommand.color),this._colorFramebuffer.clear(e,this._clearCommand,t),this._idFramebuffer.clear(e,this._clearCommand,t)};$b.prototype.getFramebuffer=function(){return this._colorFramebuffer.framebuffer};$b.prototype.getIdFramebuffer=function(){return this._idFramebuffer.framebuffer};$b.prototype.prepareColorTextures=function(e){this._numSamples>1&&this._colorFramebuffer.prepareTextures(e)};$b.prototype.isDestroyed=function(){return!1};$b.prototype.destroy=function(){return Sdt(this),me(this)};var ZS=$b;var YXi=S(T(),1);var jIi=S(T(),1);function LS(){}LS.getShadowCastShaderKeyword=function(e,t,n,i){return`castShadow ${e} ${t} ${n} ${i}`};LS.createShadowCastVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);i.push("SHADOW_MAP"),n&&i.push("GENERATE_POSITION");let r=Ye.findPositionVarying(e),s=l(r);if(t&&!s){let a=o.length;for(let d=0;d<a;++d)o[d]=Ye.replaceMain(o[d],"czm_shadow_cast_main");o.push(`out vec3 v_positionEC; void main() { czm_shadow_cast_main(); v_positionEC = (czm_inverseProjection * gl_Position).xyz; -}`)}return new Ye({defines:i,sources:o})};MT.createShadowCastFragmentShader=function(e,t,n,i){let o=e.defines.slice(0),r=e.sources.slice(0);o.push("SHADOW_MAP");let s=Ye.findPositionVarying(e),a=l(s);a||(s="v_positionEC");let c=r.length;for(let u=0;u<c;++u)r[u]=Ye.replaceMain(r[u],"czm_shadow_cast_main");let d="";return t&&(a||(d+=`in vec3 v_positionEC; +}`)}return new Ye({defines:i,sources:o})};LS.createShadowCastFragmentShader=function(e,t,n,i){let o=e.defines.slice(0),r=e.sources.slice(0);o.push("SHADOW_MAP");let s=Ye.findPositionVarying(e),a=l(s);a||(s="v_positionEC");let c=r.length;for(let u=0;u<c;++u)r[u]=Ye.replaceMain(r[u],"czm_shadow_cast_main");let d="";return t&&(a||(d+=`in vec3 v_positionEC; `),d+=`uniform vec4 shadowMap_lightPositionEC; `),i?d+=`void main() { @@ -12591,15 +12688,15 @@ void main() `:n?d+=` out_FragColor = vec4(1.0); `:d+=` out_FragColor = czm_packDepth(gl_FragCoord.z); `,d+=`} -`,r.push(d),new Ye({defines:o,sources:r})};MT.getShadowReceiveShaderKeyword=function(e,t,n,i){let o=e._usesDepthTexture,r=e._polygonOffsetSupported,s=e._isPointLight,a=e._isSpotLight,c=e._numberOfCascades>1,d=e.debugCascadeColors,u=e.softShadows;return`receiveShadow ${o}${r}${s}${a}${c}${d}${u}${t}${n}${i}`};MT.createShadowReceiveVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);return i.push("SHADOW_MAP"),t&&(n?i.push("GENERATE_POSITION_AND_NORMAL"):i.push("GENERATE_POSITION")),new Ye({defines:i,sources:o})};MT.createShadowReceiveFragmentShader=function(e,t,n,i,o){let r=Ye.findNormalVarying(e),s=!i&&l(r)||i&&o,a=Ye.findPositionVarying(e),c=l(a),d=t._usesDepthTexture,u=t._polygonOffsetSupported,m=t._isPointLight,p=t._isSpotLight,g=t._numberOfCascades>1,f=t.debugCascadeColors,x=t.softShadows,_=m?t._pointBias:i?t._terrainBias:t._primitiveBias,C=e.defines.slice(0),V=e.sources.slice(0),L=V.length;for(let X=0;X<L;++X)V[X]=Ye.replaceMain(V[X],"czm_shadow_receive_main");m?C.push("USE_CUBE_MAP_SHADOW"):d&&C.push("USE_SHADOW_DEPTH_TEXTURE"),x&&!m&&C.push("USE_SOFT_SHADOWS"),g&&n&&i&&(s?C.push("ENABLE_VERTEX_LIGHTING"):C.push("ENABLE_DAYNIGHT_SHADING")),n&&_.normalShading&&s&&(C.push("USE_NORMAL_SHADING"),_.normalShadingSmooth>0&&C.push("USE_NORMAL_SHADING_SMOOTH"));let Z="";m?Z+=`uniform samplerCube shadowMap_textureCube; -`:Z+=`uniform sampler2D shadowMap_texture; +`,r.push(d),new Ye({defines:o,sources:r})};LS.getShadowReceiveShaderKeyword=function(e,t,n,i){let o=e._usesDepthTexture,r=e._polygonOffsetSupported,s=e._isPointLight,a=e._isSpotLight,c=e._numberOfCascades>1,d=e.debugCascadeColors,u=e.softShadows;return`receiveShadow ${o}${r}${s}${a}${c}${d}${u}${t}${n}${i}`};LS.createShadowReceiveVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);return i.push("SHADOW_MAP"),t&&(n?i.push("GENERATE_POSITION_AND_NORMAL"):i.push("GENERATE_POSITION")),new Ye({defines:i,sources:o})};LS.createShadowReceiveFragmentShader=function(e,t,n,i,o){let r=Ye.findNormalVarying(e),s=!i&&l(r)||i&&o,a=Ye.findPositionVarying(e),c=l(a),d=t._usesDepthTexture,u=t._polygonOffsetSupported,m=t._isPointLight,p=t._isSpotLight,g=t._numberOfCascades>1,f=t.debugCascadeColors,x=t.softShadows,_=m?t._pointBias:i?t._terrainBias:t._primitiveBias,C=e.defines.slice(0),V=e.sources.slice(0),Z=V.length;for(let W=0;W<Z;++W)V[W]=Ye.replaceMain(V[W],"czm_shadow_receive_main");m?C.push("USE_CUBE_MAP_SHADOW"):d&&C.push("USE_SHADOW_DEPTH_TEXTURE"),x&&!m&&C.push("USE_SOFT_SHADOWS"),g&&n&&i&&(s?C.push("ENABLE_VERTEX_LIGHTING"):C.push("ENABLE_DAYNIGHT_SHADING")),n&&_.normalShading&&s&&(C.push("USE_NORMAL_SHADING"),_.normalShadingSmooth>0&&C.push("USE_NORMAL_SHADING_SMOOTH"));let R="";m?R+=`uniform samplerCube shadowMap_textureCube; +`:R+=`uniform sampler2D shadowMap_texture; `;let G;return c?G=` return vec4(${a}, 1.0); `:G=`#ifndef LOG_DEPTH return czm_windowToEyeCoordinates(gl_FragCoord); #else return vec4(v_logPositionEC, 1.0); #endif -`,Z+=`uniform mat4 shadowMap_matrix; +`,R+=`uniform mat4 shadowMap_matrix; uniform vec3 shadowMap_lightDirectionEC; uniform vec4 shadowMap_lightPositionEC; uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness; @@ -12622,20 +12719,20 @@ ${_.normalOffset&&s?` float normalOffset = shadowMap_normalOffsetScaleDistanc vec3 offset = normalOffset * normalOffsetScale * normalEC; positionEC.xyz += offset; `:""}} -`,Z+=`void main() +`,R+=`void main() { czm_shadow_receive_main(); vec4 positionEC = getPositionEC(); vec3 normalEC = getNormalEC(); float depth = -positionEC.z; -`,Z+=` czm_shadowParameters shadowParameters; +`,R+=` czm_shadowParameters shadowParameters; shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy; shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z; shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w; shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w; -`,i?Z+=` shadowParameters.depthBias *= max(depth * 0.01, 1.0); -`:u||(Z+=` shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015); -`),m?Z+=` vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz; +`,i?R+=` shadowParameters.depthBias *= max(depth * 0.01, 1.0); +`:u||(R+=` shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015); +`),m?R+=` vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz; float distance = length(directionEC); directionEC = normalize(directionEC); float radius = shadowMap_lightPositionEC.w; @@ -12649,7 +12746,7 @@ ${_.normalOffset&&s?` float normalOffset = shadowMap_normalOffsetScaleDistanc shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); shadowParameters.texCoords = directionWC; float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters); -`:p?Z+=` vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz); +`:p?R+=` vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz); float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); applyNormalOffset(positionEC, normalEC, nDotL); vec4 shadowPosition = shadowMap_matrix * positionEC; @@ -12664,7 +12761,7 @@ ${_.normalOffset&&s?` float normalOffset = shadowMap_normalOffsetScaleDistanc shadowParameters.depth = shadowPosition.z; shadowParameters.nDotL = nDotL; float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); -`:g?Z+=` float maxDepth = shadowMap_cascadeSplits[1].w; +`:g?R+=` float maxDepth = shadowMap_cascadeSplits[1].w; // Stop early if the eye depth exceeds the last cascade if (depth > maxDepth) { @@ -12688,7 +12785,7 @@ ${_.normalOffset&&s?` float normalOffset = shadowMap_normalOffsetScaleDistanc visibility = mix(visibility, 1.0, fade); ${f?` // Draw cascade colors for debugging out_FragColor *= czm_cascadeColor(weights); -`:""}`:Z+=` float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); +`:""}`:R+=` float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); applyNormalOffset(positionEC, normalEC, nDotL); vec4 shadowPosition = shadowMap_matrix * positionEC; // Stop early if the fragment is not in the shadow bounds @@ -12700,9 +12797,9 @@ ${f?` // Draw cascade colors for debugging shadowParameters.depth = shadowPosition.z; shadowParameters.nDotL = nDotL; float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); -`,Z+=` out_FragColor.rgb *= visibility; +`,R+=` out_FragColor.rgb *= visibility; } -`,V.push(Z),new Ye({defines:C,sources:V})};var Hf=MT;function zf(e){e=y(e,y.EMPTY_OBJECT);let t=e.context;this._enabled=y(e.enabled,!0),this._softShadows=y(e.softShadows,!1),this._normalOffset=y(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=y(e.fromLightSource,!0),this.darkness=y(e.darkness,.3),this._darkness=this.darkness,this.fadingEnabled=y(e.fadingEnabled,!0),this.maximumDistance=y(e.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let n=!0;(Yt.isInternetExplorer()||Yt.isEdge()||(Yt.isChrome()||Yt.isFirefox())&&Yt.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new M,this._shadowMapTexture=void 0,this._lightDirectionEC=new h,this._lightPositionEC=new se,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new t3,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new le,this._isPointLight=y(e.isPointLight,!1),this._pointLightRadius=y(e.pointLightRadius,100),this._cascadesEnabled=this._isPointLight?!1:y(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?y(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new D,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new Cr:l(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new se,new se],this._cascadeMatrices=[new M,new M,new M,new M],this._cascadeDistances=new se;let i;this._isPointLight?i=6:this._cascadesEnabled?i=this._numberOfCascades:i=1,this._passes=new Array(i);for(let o=0;o<i;++o)this._passes[o]=new mmt(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=t.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,a8(this),this._clearCommand=new ii({depth:1,color:new Y}),this._clearPassState=new pc(t),this._size=y(e.size,2048),this.size=this._size}zf.MAXIMUM_DISTANCE=2e4;function mmt(e){this.camera=new t3,this.passState=new pc(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function s8(e,t){return De.fromCache({cull:{enabled:!0,face:fi.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function a8(e){let t=!e._usesDepthTexture;e._primitiveRenderState=s8(t,e._primitiveBias),e._terrainRenderState=s8(t,e._terrainBias),e._pointRenderState=s8(t,e._pointBias)}zf.prototype.debugCreateRenderStates=function(){a8(this)};Object.defineProperties(zf.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){ymt(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});function c8(e){let t=e._passes.length;for(let n=0;n<t;++n){let i=e._passes[n],o=i.framebuffer;l(o)&&!o.isDestroyed()&&o.destroy(),i.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function hmt(e,t){let n=new bd({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Hc.DEPTH_COMPONENT16}),i=new Et({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:at.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,sampler:rn.NEAREST}),o=new ta({context:t,depthRenderbuffer:n,colorTextures:[i],destroyAttachments:!1}),r=e._passes.length;for(let s=0;s<r;++s){let a=e._passes[s];a.framebuffer=o,a.passState.framebuffer=o}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function fmt(e,t){let n=new Et({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:at.DEPTH_STENCIL,pixelDatatype:ze.UNSIGNED_INT_24_8,sampler:rn.NEAREST}),i=new ta({context:t,depthStencilTexture:n,destroyAttachments:!1}),o=e._passes.length;for(let r=0;r<o;++r){let s=e._passes[r];s.framebuffer=i,s.passState.framebuffer=i}e._shadowMapTexture=n,e._depthAttachment=n}function pmt(e,t){let n=new bd({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Hc.DEPTH_COMPONENT16}),i=new Qa({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:at.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,sampler:rn.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){let s=new ta({context:t,depthRenderbuffer:n,colorTextures:[o[r]],destroyAttachments:!1}),a=e._passes[r];a.framebuffer=s,a.passState.framebuffer=s}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function pxe(e,t){e._isPointLight?pmt(e,t):e._usesDepthTexture?fmt(e,t):hmt(e,t)}function bmt(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==ne.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,a8(e),c8(e),pxe(e,t))}function gmt(e,t){(!l(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(c8(e),pxe(e,t),bmt(e,t),bxe(e,t))}function bxe(e,t,n){n=y(n,0),(e._isPointLight||n===0)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function ymt(e,t){e._size=t;let n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){t=Mt.maximumCubeMapSize>=t?t:Mt.maximumCubeMapSize,o.x=t,o.y=t;let r=new He(0,0,t,t);n[0].passState.viewport=r,n[1].passState.viewport=r,n[2].passState.viewport=r,n[3].passState.viewport=r,n[4].passState.viewport=r,n[5].passState.viewport=r}else i===1?(t=Mt.maximumTextureSize>=t?t:Mt.maximumTextureSize,o.x=t,o.y=t,n[0].passState.viewport=new He(0,0,t,t)):i===4&&(t=Mt.maximumTextureSize>=t*2?t:Mt.maximumTextureSize/2,o.x=t*2,o.y=t*2,n[0].passState.viewport=new He(0,0,t,t),n[1].passState.viewport=new He(t,0,t,t),n[2].passState.viewport=new He(0,t,t,t),n[3].passState.viewport=new He(t,t,t,t));e._clearPassState.viewport=new He(0,0,o.x,o.y);for(let r=0;r<i;++r){let s=n[r],a=s.passState.viewport,c=a.x/o.x,d=a.y/o.y,u=a.width/o.x,m=a.height/o.y;s.textureOffsets=new M(u,0,0,c,0,m,0,d,0,0,1,0,0,0,0,1)}}var xmt=new He;function _mt(e,t){let n;e._isPointLight?n=`uniform samplerCube shadowMap_textureCube; +`,V.push(R),new Ye({defines:C,sources:V})};var Yf=LS;function Of(e){e=y(e,y.EMPTY_OBJECT);let t=e.context;this._enabled=y(e.enabled,!0),this._softShadows=y(e.softShadows,!1),this._normalOffset=y(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=y(e.fromLightSource,!0),this.darkness=y(e.darkness,.3),this._darkness=this.darkness,this.fadingEnabled=y(e.fadingEnabled,!0),this.maximumDistance=y(e.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let n=!0;(Yt.isInternetExplorer()||Yt.isEdge()||(Yt.isChrome()||Yt.isFirefox())&&Yt.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new A,this._shadowMapTexture=void 0,this._lightDirectionEC=new h,this._lightPositionEC=new se,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new BD,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new le,this._isPointLight=y(e.isPointLight,!1),this._pointLightRadius=y(e.pointLightRadius,100),this._cascadesEnabled=this._isPointLight?!1:y(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?y(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new D,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new Vr:l(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new se,new se],this._cascadeMatrices=[new A,new A,new A,new A],this._cascadeDistances=new se;let i;this._isPointLight?i=6:this._cascadesEnabled?i=this._numberOfCascades:i=1,this._passes=new Array(i);for(let o=0;o<i;++o)this._passes[o]=new Tdt(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=t.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,oj(this),this._clearCommand=new ii({depth:1,color:new Y}),this._clearPassState=new xc(t),this._size=y(e.size,2048),this.size=this._size}Of.MAXIMUM_DISTANCE=2e4;function Tdt(e){this.camera=new BD,this.passState=new xc(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function ij(e,t){return De.fromCache({cull:{enabled:!0,face:pi.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function oj(e){let t=!e._usesDepthTexture;e._primitiveRenderState=ij(t,e._primitiveBias),e._terrainRenderState=ij(t,e._terrainBias),e._pointRenderState=ij(t,e._pointBias)}Of.prototype.debugCreateRenderStates=function(){oj(this)};Object.defineProperties(Of.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){Gdt(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});function rj(e){let t=e._passes.length;for(let n=0;n<t;++n){let i=e._passes[n],o=i.framebuffer;l(o)&&!o.isDestroyed()&&o.destroy(),i.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function Cdt(e,t){let n=new pd({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Oc.DEPTH_COMPONENT16}),i=new Et({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:at.RGBA,pixelDatatype:Ke.UNSIGNED_BYTE,sampler:rn.NEAREST}),o=new na({context:t,depthRenderbuffer:n,colorTextures:[i],destroyAttachments:!1}),r=e._passes.length;for(let s=0;s<r;++s){let a=e._passes[s];a.framebuffer=o,a.passState.framebuffer=o}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function Vdt(e,t){let n=new Et({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:at.DEPTH_STENCIL,pixelDatatype:Ke.UNSIGNED_INT_24_8,sampler:rn.NEAREST}),i=new na({context:t,depthStencilTexture:n,destroyAttachments:!1}),o=e._passes.length;for(let r=0;r<o;++r){let s=e._passes[r];s.framebuffer=i,s.passState.framebuffer=i}e._shadowMapTexture=n,e._depthAttachment=n}function Zdt(e,t){let n=new pd({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Oc.DEPTH_COMPONENT16}),i=new ja({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:at.RGBA,pixelDatatype:Ke.UNSIGNED_BYTE,sampler:rn.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){let s=new na({context:t,depthRenderbuffer:n,colorTextures:[o[r]],destroyAttachments:!1}),a=e._passes[r];a.framebuffer=s,a.passState.framebuffer=s}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function Eye(e,t){e._isPointLight?Zdt(e,t):e._usesDepthTexture?Vdt(e,t):Cdt(e,t)}function Ldt(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==ie.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,oj(e),rj(e),Eye(e,t))}function Rdt(e,t){(!l(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(rj(e),Eye(e,t),Ldt(e,t),Wye(e,t))}function Wye(e,t,n){n=y(n,0),(e._isPointLight||n===0)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function Gdt(e,t){e._size=t;let n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){t=Mt.maximumCubeMapSize>=t?t:Mt.maximumCubeMapSize,o.x=t,o.y=t;let r=new ze(0,0,t,t);n[0].passState.viewport=r,n[1].passState.viewport=r,n[2].passState.viewport=r,n[3].passState.viewport=r,n[4].passState.viewport=r,n[5].passState.viewport=r}else i===1?(t=Mt.maximumTextureSize>=t?t:Mt.maximumTextureSize,o.x=t,o.y=t,n[0].passState.viewport=new ze(0,0,t,t)):i===4&&(t=Mt.maximumTextureSize>=t*2?t:Mt.maximumTextureSize/2,o.x=t*2,o.y=t*2,n[0].passState.viewport=new ze(0,0,t,t),n[1].passState.viewport=new ze(t,0,t,t),n[2].passState.viewport=new ze(0,t,t,t),n[3].passState.viewport=new ze(t,t,t,t));e._clearPassState.viewport=new ze(0,0,o.x,o.y);for(let r=0;r<i;++r){let s=n[r],a=s.passState.viewport,c=a.x/o.x,d=a.y/o.y,u=a.width/o.x,m=a.height/o.y;s.textureOffsets=new A(u,0,0,c,0,m,0,d,0,0,1,0,0,0,0,1)}}var Edt=new ze;function Wdt(e,t){let n;e._isPointLight?n=`uniform samplerCube shadowMap_textureCube; in vec2 v_textureCoordinates; void main() { @@ -12763,7 +12860,7 @@ ${e._usesDepthTexture?` float shadow = texture(shadowMap_texture, v_textureCo `:` float shadow = czm_unpackDepth(texture(shadowMap_texture, v_textureCoordinates)); `} out_FragColor = vec4(vec3(shadow), 1.0); } -`;let i=t.createViewportQuadCommand(n,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return i.pass=Re.OVERLAY,i}function Tmt(e,t){let n=t.context,i=t.context.drawingBufferWidth,o=t.context.drawingBufferHeight,r=Math.min(i,o)*.3,s=xmt;s.x=i-r,s.y=0,s.width=r,s.height=r;let a=e._debugShadowViewCommand;l(a)||(a=_mt(e,n),e._debugShadowViewCommand=a),(!l(a.renderState)||!He.equals(a.renderState.viewport,s))&&(a.renderState=De.fromCache({viewport:He.clone(s)})),t.commandList.push(e._debugShadowViewCommand)}var Kf=new Array(8);Kf[0]=new se(-1,-1,-1,1);Kf[1]=new se(1,-1,-1,1);Kf[2]=new se(1,1,-1,1);Kf[3]=new se(-1,1,-1,1);Kf[4]=new se(-1,-1,1,1);Kf[5]=new se(1,-1,1,1);Kf[6]=new se(1,1,1,1);Kf[7]=new se(-1,1,1,1);var Ry=new M,l8=new Array(8);for(let e=0;e<8;++e)l8[e]=new se;function Smt(e,t){let n=new St({geometry:new pm({minimum:new h(-.5,-.5,-.5),maximum:new h(.5,.5,.5)}),attributes:{color:Ht.fromColor(t)}}),i=new St({geometry:new u0({radius:.5}),attributes:{color:Ht.fromColor(t)}});return new En({geometryInstances:[n,i],appearance:new ln({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var Cmt=[Y.RED,Y.GREEN,Y.BLUE,Y.MAGENTA],Vmt=new h;function Lmt(e,t){Tmt(e,t);let n=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(n&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new Df({camera:e._sceneCamera,color:Y.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){n&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new Df({camera:e._shadowMapCamera,color:Y.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(let i=0;i<e._numberOfCascades;++i)n&&(e._debugCascadeFrustums[i]=e._debugCascadeFrustums[i]&&e._debugCascadeFrustums[i].destroy(),e._debugCascadeFrustums[i]=new Df({camera:e._passes[i].camera,color:Cmt[i],updateOnChange:!1})),e._debugCascadeFrustums[i].update(t)}}else if(e._isPointLight){if(!l(e._debugLightFrustum)||e._needsUpdate){let i=e._shadowMapCamera.positionWC,o=we.IDENTITY,r=e._pointLightRadius*2,s=h.fromElements(r,r,r,Vmt),a=M.fromTranslationQuaternionRotationScale(i,o,s,Ry);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=Smt(a,Y.YELLOW)}e._debugLightFrustum.update(t)}else(!l(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new Df({camera:e._shadowMapCamera,color:Y.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function t3(){this.viewMatrix=new M,this.inverseViewMatrix=new M,this.frustum=void 0,this.positionCartographic=new he,this.positionWC=new h,this.directionWC=h.clone(h.UNIT_Z),this.upWC=h.clone(h.UNIT_Y),this.rightWC=h.clone(h.UNIT_X),this.viewProjectionMatrix=new M}t3.prototype.clone=function(e){M.clone(e.viewMatrix,this.viewMatrix),M.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),he.clone(e.positionCartographic,this.positionCartographic),h.clone(e.positionWC,this.positionWC),h.clone(e.directionWC,this.directionWC),h.clone(e.upWC,this.upWC),h.clone(e.rightWC,this.rightWC)};var Rmt=new M(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);t3.prototype.getViewProjection=function(){let e=this.viewMatrix,t=this.frustum.projectionMatrix;return M.multiply(t,e,this.viewProjectionMatrix),M.multiply(Rmt,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var Zmt=new Array(5),Gmt=new Ti,Emt=new Array(4),gxe=new h,yxe=new h;function Xmt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=i.frustum.near,r=i.frustum.far,s=e._numberOfCascades,a,c=r-o,d=r/o,u=.9,m=!1;t.shadowState.closestObjectSize<200&&(m=!0,u=.9);let p=Emt,g=Zmt;for(g[0]=o,g[s]=r,a=0;a<s;++a){let A=(a+1)/s,b=o*Math.pow(d,A),R=o+c*A,E=W.lerp(R,b,u);g[a+1]=E,p[a]=E-g[a]}if(m){for(a=0;a<s;++a)p[a]=Math.min(p[a],e._maximumCascadeDistances[a]);let A=g[0];for(a=0;a<s-1;++a)A+=p[a],g[a+1]=A}se.unpack(g,0,e._cascadeSplits[0]),se.unpack(g,1,e._cascadeSplits[1]),se.unpack(p,0,e._cascadeDistances);let f=n.frustum,x=f.left,_=f.right,C=f.bottom,V=f.top,L=f.near,Z=f.far,G=n.positionWC,X=n.directionWC,v=n.upWC,P=i.frustum.clone(Gmt),F=n.getViewProjection();for(a=0;a<s;++a){P.near=g[a],P.far=g[a+1];let A=M.multiply(P.projectionMatrix,i.viewMatrix,Ry),b=M.inverse(A,Ry),R=M.multiply(F,b,Ry),E=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,gxe),I=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,yxe);for(let O=0;O<8;++O){let k=se.clone(Kf[O],l8[O]);M.multiplyByVector(R,k,k),h.divideByScalar(k,k.w,k),h.minimumByComponent(k,E,E),h.maximumByComponent(k,I,I)}E.x=Math.max(E.x,0),E.y=Math.max(E.y,0),E.z=0,I.x=Math.min(I.x,1),I.y=Math.min(I.y,1),I.z=Math.min(I.z,1);let w=e._passes[a],N=w.camera;N.clone(n);let B=N.frustum;B.left=x+E.x*(_-x),B.right=x+I.x*(_-x),B.bottom=C+E.y*(V-C),B.top=C+I.y*(V-C),B.near=L+E.z*(Z-L),B.far=L+I.z*(Z-L),w.cullingVolume=N.frustum.computeCullingVolume(G,X,v);let U=e._cascadeMatrices[a];M.multiply(N.getViewProjection(),i.inverseViewMatrix,U),M.multiply(w.textureOffsets,U,U)}}var Imt=new M,Wmt=new h,Pmt=new h,hxe=new h;function vmt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=M.multiply(i.frustum.projectionMatrix,i.viewMatrix,Ry),r=M.inverse(o,Ry),s=n.directionWC,a=i.directionWC;h.equalsEpsilon(s,a,W.EPSILON10)&&(a=i.upWC);let c=h.cross(s,a,Wmt);a=h.cross(c,s,Pmt),h.normalize(a,a),h.normalize(c,c);let d=h.fromElements(0,0,0,hxe),u=M.computeView(d,s,a,c,Imt),m=M.multiply(u,r,Ry),p=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,gxe),g=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,yxe);for(let Z=0;Z<8;++Z){let G=se.clone(Kf[Z],l8[Z]);M.multiplyByVector(m,G,G),h.divideByScalar(G,G.w,G),h.minimumByComponent(G,p,p),h.maximumByComponent(G,g,g)}g.z+=1e3,p.z-=10;let f=hxe;f.x=-(.5*(p.x+g.x)),f.y=-(.5*(p.y+g.y)),f.z=-g.z;let x=M.fromTranslation(f,Ry);u=M.multiply(x,u,u);let _=.5*(g.x-p.x),C=.5*(g.y-p.y),V=g.z-p.z,L=n.frustum;L.left=-_,L.right=_,L.bottom=-C,L.top=C,L.near=.01,L.far=V,M.clone(u,n.viewMatrix),M.inverse(u,n.inverseViewMatrix),M.getTranslation(n.inverseViewMatrix,n.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),h.clone(s,n.directionWC),h.clone(a,n.upWC),h.clone(c,n.rightWC)}var wmt=[new h(-1,0,0),new h(0,-1,0),new h(0,0,-1),new h(1,0,0),new h(0,1,0),new h(0,0,1)],Fmt=[new h(0,-1,0),new h(0,0,-1),new h(0,-1,0),new h(0,-1,0),new h(0,0,1),new h(0,-1,0)],Amt=[new h(0,0,1),new h(1,0,0),new h(-1,0,0),new h(0,0,-1),new h(1,0,0),new h(1,0,0)];function Mmt(e,t){let n=new Ti;n.fov=W.PI_OVER_TWO,n.near=1,n.far=e._pointLightRadius,n.aspectRatio=1;for(let i=0;i<6;++i){let o=e._passes[i].camera;o.positionWC=e._shadowMapCamera.positionWC,o.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(o.positionWC,o.positionCartographic),o.directionWC=wmt[i],o.upWC=Fmt[i],o.rightWC=Amt[i],M.computeView(o.positionWC,o.directionWC,o.upWC,o.rightWC,o.viewMatrix),M.inverse(o.viewMatrix,o.inverseViewMatrix),o.frustum=n}}var Nmt=new h,kmt=new h,xxe=new le,fxe=xxe.center;function Umt(e,t){let n=e._sceneCamera,i=e._shadowMapCamera,o=xxe;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance){e._outOfView=!0,e._needsUpdate=!1;return}let r=t.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,Nmt),s=h.negate(i.directionWC,kmt),a=h.dot(r,s);if(e.fadingEnabled){let c=W.clamp(a/.1,0,1);e._darkness=W.lerp(1,e.darkness,c)}else e._darkness=e.darkness;if(a<0){e._outOfView=!0,e._needsUpdate=!1;return}e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)o.center=i.positionWC,o.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(o)===Kt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),le.clone(o,e._boundingSphere);else{let r=i.frustum.far/2,s=h.add(i.positionWC,h.multiplyByScalar(i.directionWC,r,fxe),fxe);o.center=s,o.radius=r,e._outOfView=t.cullingVolume.computeVisibility(o)===Kt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),le.clone(o,e._boundingSphere)}}function Dmt(e,t){let n=t.camera,i=e._lightCamera,o=e._sceneCamera,r=e._shadowMapCamera;e._cascadesEnabled?h.clone(i.directionWC,r.directionWC):e._isPointLight?h.clone(i.positionWC,r.positionWC):r.clone(i);let s=e._lightDirectionEC;M.multiplyByPointAsVector(n.viewMatrix,r.directionWC,s),h.normalize(s,s),h.negate(s,s),M.multiplyByPoint(n.viewMatrix,r.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius;let a,c;e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),c=Math.min(t.shadowState.farPlane,e.maximumDistance),c=Math.max(c,a+1)):(a=n.frustum.near,c=e.maximumDistance),e._sceneCamera=ao.clone(n,o),n.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=c,e._distance=c-a,Umt(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}zf.prototype.update=function(e){if(Dmt(this,e),this._needsUpdate)if(gmt(this,e.context),this._isPointLight&&Mmt(this,e),this._cascadesEnabled&&(vmt(this,e),this._numberOfCascades>1&&Xmt(this,e)),this._isPointLight)this._shadowMapCullingVolume=rs.fromBoundingSphere(this._boundingSphere);else{let t=this._shadowMapCamera,n=t.positionWC,i=t.directionWC,o=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(n,i,o),this._passes.length===1&&this._passes[0].camera.clone(t)}if(this._passes.length===1){let t=this._sceneCamera.inverseViewMatrix;M.multiply(this._shadowMapCamera.getViewProjection(),t,this._shadowMapMatrix)}this.debugShow&&Lmt(this,e)};zf.prototype.updatePass=function(e,t){bxe(this,e,t)};var Bmt=new D;function _xe(e,t,n){let i=e._isPointLight?e._pointBias:n?e._terrainBias:e._primitiveBias,o={shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture},shadowMap_matrix:function(){return e._shadowMapMatrix},shadowMap_cascadeSplits:function(){return e._cascadeSplits},shadowMap_cascadeMatrices:function(){return e._cascadeMatrices},shadowMap_lightDirectionEC:function(){return e._lightDirectionEC},shadowMap_lightPositionEC:function(){return e._lightPositionEC},shadowMap_cascadeDistances:function(){return e._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){let r=Bmt;return r.x=1/e._textureSize.x,r.y=1/e._textureSize.y,se.fromElements(r.x,r.y,i.depthBias,i.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return se.fromElements(i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new se,combinedUniforms2:new se};return xt(t,o,!1)}function Ymt(e,t,n,i,o,r){let s,a,c;if(l(r)&&(s=r.shaderProgram,a=r.renderState,c=r.uniformMap),r=et.shallowClone(n,r),r.castShadows=!0,r.receiveShadows=!1,!l(s)||o!==n.shaderProgram.id||t){let d=n.shaderProgram,u=n.pass===Re.GLOBE,m=n.pass!==Re.TRANSLUCENT,p=e._isPointLight,g=e._usesDepthTexture,f=Hf.getShadowCastShaderKeyword(p,u,g,m);if(s=i.shaderCache.getDerivedShaderProgram(d,f),!l(s)){let _=d.vertexShaderSource,C=d.fragmentShaderSource,V=Hf.createShadowCastVertexShader(_,p,u),L=Hf.createShadowCastFragmentShader(C,p,g,m);s=i.shaderCache.createDerivedShaderProgram(d,f,{vertexShaderSource:V,fragmentShaderSource:L,attributeLocations:d._attributeLocations})}a=e._primitiveRenderState,p?a=e._pointRenderState:u&&(a=e._terrainRenderState),n.renderState.cull.enabled||(a=Oe(a,!1),a.cull=Oe(a.cull,!1),a.cull.enabled=!1,a=De.fromCache(a)),c=_xe(e,n.uniformMap,u)}return r.shaderProgram=s,r.renderState=a,r.uniformMap=c,r}zf.createReceiveDerivedCommand=function(e,t,n,i,o){l(o)||(o={});let r=e.length>0,s=t.shaderProgram,a=s.vertexShaderSource,c=s.fragmentShaderSource,d=t.pass===Re.GLOBE,u=!1;if(d&&(u=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&r){let m,p;l(o.receiveCommand)&&(m=o.receiveCommand.shaderProgram,p=o.receiveCommand.uniformMap),o.receiveCommand=et.shallowClone(t,o.receiveCommand),o.castShadows=!1,o.receiveShadows=!0;let g=o.receiveShaderCastShadows!==t.castShadows,f=o.receiveShaderProgramId!==t.shaderProgram.id;if(!l(m)||f||n||g){let x=Hf.getShadowReceiveShaderKeyword(e[0],t.castShadows,d,u);if(m=i.shaderCache.getDerivedShaderProgram(s,x),!l(m)){let _=Hf.createShadowReceiveVertexShader(a,d,u),C=Hf.createShadowReceiveFragmentShader(c,e[0],t.castShadows,d,u);m=i.shaderCache.createDerivedShaderProgram(s,x,{vertexShaderSource:_,fragmentShaderSource:C,attributeLocations:s._attributeLocations})}p=_xe(e[0],t.uniformMap,d)}o.receiveCommand.shaderProgram=m,o.receiveCommand.uniformMap=p,o.receiveShaderProgramId=t.shaderProgram.id,o.receiveShaderCastShadows=t.castShadows}return o};zf.createCastDerivedCommand=function(e,t,n,i,o){if(l(o)||(o={}),t.castShadows){let r=o.castCommands;l(r)||(r=o.castCommands=[]);let s=o.castShaderProgramId,a=e.length;r.length=a;for(let c=0;c<a;++c)r[c]=Ymt(e[c],n,t,i,s,r[c]);o.castShaderProgramId=t.shaderProgram.id}return o};zf.prototype.isDestroyed=function(){return!1};zf.prototype.destroy=function(){c8(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(let e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return me(this)};var ob=zf;var XAi=T(S(),1);var lAi=T(S(),1),NT=`uniform sampler2D colorTexture; +`;let i=t.createViewportQuadCommand(n,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return i.pass=Le.OVERLAY,i}function Idt(e,t){let n=t.context,i=t.context.drawingBufferWidth,o=t.context.drawingBufferHeight,r=Math.min(i,o)*.3,s=Edt;s.x=i-r,s.y=0,s.width=r,s.height=r;let a=e._debugShadowViewCommand;l(a)||(a=Wdt(e,n),e._debugShadowViewCommand=a),(!l(a.renderState)||!ze.equals(a.renderState.viewport,s))&&(a.renderState=De.fromCache({viewport:ze.clone(s)})),t.commandList.push(e._debugShadowViewCommand)}var zf=new Array(8);zf[0]=new se(-1,-1,-1,1);zf[1]=new se(1,-1,-1,1);zf[2]=new se(1,1,-1,1);zf[3]=new se(-1,1,-1,1);zf[4]=new se(-1,-1,1,1);zf[5]=new se(1,-1,1,1);zf[6]=new se(1,1,1,1);zf[7]=new se(-1,1,1,1);var by=new A,sj=new Array(8);for(let e=0;e<8;++e)sj[e]=new se;function Xdt(e,t){let n=new Tt({geometry:new fm({minimum:new h(-.5,-.5,-.5),maximum:new h(.5,.5,.5)}),attributes:{color:zt.fromColor(t)}}),i=new Tt({geometry:new db({radius:.5}),attributes:{color:zt.fromColor(t)}});return new En({geometryInstances:[n,i],appearance:new ln({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var Pdt=[Y.RED,Y.GREEN,Y.BLUE,Y.MAGENTA],vdt=new h;function wdt(e,t){Idt(e,t);let n=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(n&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new Uf({camera:e._sceneCamera,color:Y.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){n&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new Uf({camera:e._shadowMapCamera,color:Y.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(let i=0;i<e._numberOfCascades;++i)n&&(e._debugCascadeFrustums[i]=e._debugCascadeFrustums[i]&&e._debugCascadeFrustums[i].destroy(),e._debugCascadeFrustums[i]=new Uf({camera:e._passes[i].camera,color:Pdt[i],updateOnChange:!1})),e._debugCascadeFrustums[i].update(t)}}else if(e._isPointLight){if(!l(e._debugLightFrustum)||e._needsUpdate){let i=e._shadowMapCamera.positionWC,o=we.IDENTITY,r=e._pointLightRadius*2,s=h.fromElements(r,r,r,vdt),a=A.fromTranslationQuaternionRotationScale(i,o,s,by);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=Xdt(a,Y.YELLOW)}e._debugLightFrustum.update(t)}else(!l(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new Uf({camera:e._shadowMapCamera,color:Y.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function BD(){this.viewMatrix=new A,this.inverseViewMatrix=new A,this.frustum=void 0,this.positionCartographic=new he,this.positionWC=new h,this.directionWC=h.clone(h.UNIT_Z),this.upWC=h.clone(h.UNIT_Y),this.rightWC=h.clone(h.UNIT_X),this.viewProjectionMatrix=new A}BD.prototype.clone=function(e){A.clone(e.viewMatrix,this.viewMatrix),A.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),he.clone(e.positionCartographic,this.positionCartographic),h.clone(e.positionWC,this.positionWC),h.clone(e.directionWC,this.directionWC),h.clone(e.upWC,this.upWC),h.clone(e.rightWC,this.rightWC)};var Fdt=new A(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);BD.prototype.getViewProjection=function(){let e=this.viewMatrix,t=this.frustum.projectionMatrix;return A.multiply(t,e,this.viewProjectionMatrix),A.multiply(Fdt,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var Adt=new Array(5),Mdt=new Ti,Ndt=new Array(4),Iye=new h,Xye=new h;function Udt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=i.frustum.near,r=i.frustum.far,s=e._numberOfCascades,a,c=r-o,d=r/o,u=.9,m=!1;t.shadowState.closestObjectSize<200&&(m=!0,u=.9);let p=Ndt,g=Adt;for(g[0]=o,g[s]=r,a=0;a<s;++a){let M=(a+1)/s,b=o*Math.pow(d,M),L=o+c*M,E=X.lerp(L,b,u);g[a+1]=E,p[a]=E-g[a]}if(m){for(a=0;a<s;++a)p[a]=Math.min(p[a],e._maximumCascadeDistances[a]);let M=g[0];for(a=0;a<s-1;++a)M+=p[a],g[a+1]=M}se.unpack(g,0,e._cascadeSplits[0]),se.unpack(g,1,e._cascadeSplits[1]),se.unpack(p,0,e._cascadeDistances);let f=n.frustum,x=f.left,_=f.right,C=f.bottom,V=f.top,Z=f.near,R=f.far,G=n.positionWC,W=n.directionWC,v=n.upWC,P=i.frustum.clone(Mdt),F=n.getViewProjection();for(a=0;a<s;++a){P.near=g[a],P.far=g[a+1];let M=A.multiply(P.projectionMatrix,i.viewMatrix,by),b=A.inverse(M,by),L=A.multiply(F,b,by),E=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Iye),I=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,Xye);for(let O=0;O<8;++O){let U=se.clone(zf[O],sj[O]);A.multiplyByVector(L,U,U),h.divideByScalar(U,U.w,U),h.minimumByComponent(U,E,E),h.maximumByComponent(U,I,I)}E.x=Math.max(E.x,0),E.y=Math.max(E.y,0),E.z=0,I.x=Math.min(I.x,1),I.y=Math.min(I.y,1),I.z=Math.min(I.z,1);let w=e._passes[a],N=w.camera;N.clone(n);let B=N.frustum;B.left=x+E.x*(_-x),B.right=x+I.x*(_-x),B.bottom=C+E.y*(V-C),B.top=C+I.y*(V-C),B.near=Z+E.z*(R-Z),B.far=Z+I.z*(R-Z),w.cullingVolume=N.frustum.computeCullingVolume(G,W,v);let k=e._cascadeMatrices[a];A.multiply(N.getViewProjection(),i.inverseViewMatrix,k),A.multiply(w.textureOffsets,k,k)}}var kdt=new A,Ddt=new h,Bdt=new h,Rye=new h;function Ydt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=A.multiply(i.frustum.projectionMatrix,i.viewMatrix,by),r=A.inverse(o,by),s=n.directionWC,a=i.directionWC;h.equalsEpsilon(s,a,X.EPSILON10)&&(a=i.upWC);let c=h.cross(s,a,Ddt);a=h.cross(c,s,Bdt),h.normalize(a,a),h.normalize(c,c);let d=h.fromElements(0,0,0,Rye),u=A.computeView(d,s,a,c,kdt),m=A.multiply(u,r,by),p=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Iye),g=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,Xye);for(let R=0;R<8;++R){let G=se.clone(zf[R],sj[R]);A.multiplyByVector(m,G,G),h.divideByScalar(G,G.w,G),h.minimumByComponent(G,p,p),h.maximumByComponent(G,g,g)}g.z+=1e3,p.z-=10;let f=Rye;f.x=-(.5*(p.x+g.x)),f.y=-(.5*(p.y+g.y)),f.z=-g.z;let x=A.fromTranslation(f,by);u=A.multiply(x,u,u);let _=.5*(g.x-p.x),C=.5*(g.y-p.y),V=g.z-p.z,Z=n.frustum;Z.left=-_,Z.right=_,Z.bottom=-C,Z.top=C,Z.near=.01,Z.far=V,A.clone(u,n.viewMatrix),A.inverse(u,n.inverseViewMatrix),A.getTranslation(n.inverseViewMatrix,n.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),h.clone(s,n.directionWC),h.clone(a,n.upWC),h.clone(c,n.rightWC)}var Odt=[new h(-1,0,0),new h(0,-1,0),new h(0,0,-1),new h(1,0,0),new h(0,1,0),new h(0,0,1)],zdt=[new h(0,-1,0),new h(0,0,-1),new h(0,-1,0),new h(0,-1,0),new h(0,0,1),new h(0,-1,0)],Kdt=[new h(0,0,1),new h(1,0,0),new h(-1,0,0),new h(0,0,-1),new h(1,0,0),new h(1,0,0)];function Hdt(e,t){let n=new Ti;n.fov=X.PI_OVER_TWO,n.near=1,n.far=e._pointLightRadius,n.aspectRatio=1;for(let i=0;i<6;++i){let o=e._passes[i].camera;o.positionWC=e._shadowMapCamera.positionWC,o.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(o.positionWC,o.positionCartographic),o.directionWC=Odt[i],o.upWC=zdt[i],o.rightWC=Kdt[i],A.computeView(o.positionWC,o.directionWC,o.upWC,o.rightWC,o.viewMatrix),A.inverse(o.viewMatrix,o.inverseViewMatrix),o.frustum=n}}var Jdt=new h,Qdt=new h,Pye=new le,Gye=Pye.center;function jdt(e,t){let n=e._sceneCamera,i=e._shadowMapCamera,o=Pye;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance){e._outOfView=!0,e._needsUpdate=!1;return}let r=t.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,Jdt),s=h.negate(i.directionWC,Qdt),a=h.dot(r,s);if(e.fadingEnabled){let c=X.clamp(a/.1,0,1);e._darkness=X.lerp(1,e.darkness,c)}else e._darkness=e.darkness;if(a<0){e._outOfView=!0,e._needsUpdate=!1;return}e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)o.center=i.positionWC,o.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(o)===Ht.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),le.clone(o,e._boundingSphere);else{let r=i.frustum.far/2,s=h.add(i.positionWC,h.multiplyByScalar(i.directionWC,r,Gye),Gye);o.center=s,o.radius=r,e._outOfView=t.cullingVolume.computeVisibility(o)===Ht.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),le.clone(o,e._boundingSphere)}}function qdt(e,t){let n=t.camera,i=e._lightCamera,o=e._sceneCamera,r=e._shadowMapCamera;e._cascadesEnabled?h.clone(i.directionWC,r.directionWC):e._isPointLight?h.clone(i.positionWC,r.positionWC):r.clone(i);let s=e._lightDirectionEC;A.multiplyByPointAsVector(n.viewMatrix,r.directionWC,s),h.normalize(s,s),h.negate(s,s),A.multiplyByPoint(n.viewMatrix,r.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius;let a,c;e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),c=Math.min(t.shadowState.farPlane,e.maximumDistance),c=Math.max(c,a+1)):(a=n.frustum.near,c=e.maximumDistance),e._sceneCamera=io.clone(n,o),n.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=c,e._distance=c-a,jdt(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}Of.prototype.update=function(e){if(qdt(this,e),this._needsUpdate)if(Rdt(this,e.context),this._isPointLight&&Hdt(this,e),this._cascadesEnabled&&(Ydt(this,e),this._numberOfCascades>1&&Udt(this,e)),this._isPointLight)this._shadowMapCullingVolume=ss.fromBoundingSphere(this._boundingSphere);else{let t=this._shadowMapCamera,n=t.positionWC,i=t.directionWC,o=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(n,i,o),this._passes.length===1&&this._passes[0].camera.clone(t)}if(this._passes.length===1){let t=this._sceneCamera.inverseViewMatrix;A.multiply(this._shadowMapCamera.getViewProjection(),t,this._shadowMapMatrix)}this.debugShow&&wdt(this,e)};Of.prototype.updatePass=function(e,t){Wye(this,e,t)};var $dt=new D;function vye(e,t,n){let i=e._isPointLight?e._pointBias:n?e._terrainBias:e._primitiveBias,o={shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture},shadowMap_matrix:function(){return e._shadowMapMatrix},shadowMap_cascadeSplits:function(){return e._cascadeSplits},shadowMap_cascadeMatrices:function(){return e._cascadeMatrices},shadowMap_lightDirectionEC:function(){return e._lightDirectionEC},shadowMap_lightPositionEC:function(){return e._lightPositionEC},shadowMap_cascadeDistances:function(){return e._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){let r=$dt;return r.x=1/e._textureSize.x,r.y=1/e._textureSize.y,se.fromElements(r.x,r.y,i.depthBias,i.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return se.fromElements(i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new se,combinedUniforms2:new se};return xt(t,o,!1)}function eut(e,t,n,i,o,r){let s,a,c;if(l(r)&&(s=r.shaderProgram,a=r.renderState,c=r.uniformMap),r=tt.shallowClone(n,r),r.castShadows=!0,r.receiveShadows=!1,!l(s)||o!==n.shaderProgram.id||t){let d=n.shaderProgram,u=n.pass===Le.GLOBE,m=n.pass!==Le.TRANSLUCENT,p=e._isPointLight,g=e._usesDepthTexture,f=Yf.getShadowCastShaderKeyword(p,u,g,m);if(s=i.shaderCache.getDerivedShaderProgram(d,f),!l(s)){let _=d.vertexShaderSource,C=d.fragmentShaderSource,V=Yf.createShadowCastVertexShader(_,p,u),Z=Yf.createShadowCastFragmentShader(C,p,g,m);s=i.shaderCache.createDerivedShaderProgram(d,f,{vertexShaderSource:V,fragmentShaderSource:Z,attributeLocations:d._attributeLocations})}a=e._primitiveRenderState,p?a=e._pointRenderState:u&&(a=e._terrainRenderState),n.renderState.cull.enabled||(a=Oe(a,!1),a.cull=Oe(a.cull,!1),a.cull.enabled=!1,a=De.fromCache(a)),c=vye(e,n.uniformMap,u)}return r.shaderProgram=s,r.renderState=a,r.uniformMap=c,r}Of.createReceiveDerivedCommand=function(e,t,n,i,o){l(o)||(o={});let r=e.length>0,s=t.shaderProgram,a=s.vertexShaderSource,c=s.fragmentShaderSource,d=t.pass===Le.GLOBE,u=!1;if(d&&(u=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&r){let m,p;l(o.receiveCommand)&&(m=o.receiveCommand.shaderProgram,p=o.receiveCommand.uniformMap),o.receiveCommand=tt.shallowClone(t,o.receiveCommand),o.castShadows=!1,o.receiveShadows=!0;let g=o.receiveShaderCastShadows!==t.castShadows,f=o.receiveShaderProgramId!==t.shaderProgram.id;if(!l(m)||f||n||g){let x=Yf.getShadowReceiveShaderKeyword(e[0],t.castShadows,d,u);if(m=i.shaderCache.getDerivedShaderProgram(s,x),!l(m)){let _=Yf.createShadowReceiveVertexShader(a,d,u),C=Yf.createShadowReceiveFragmentShader(c,e[0],t.castShadows,d,u);m=i.shaderCache.createDerivedShaderProgram(s,x,{vertexShaderSource:_,fragmentShaderSource:C,attributeLocations:s._attributeLocations})}p=vye(e[0],t.uniformMap,d)}o.receiveCommand.shaderProgram=m,o.receiveCommand.uniformMap=p,o.receiveShaderProgramId=t.shaderProgram.id,o.receiveShaderCastShadows=t.castShadows}return o};Of.createCastDerivedCommand=function(e,t,n,i,o){if(l(o)||(o={}),t.castShadows){let r=o.castCommands;l(r)||(r=o.castCommands=[]);let s=o.castShaderProgramId,a=e.length;r.length=a;for(let c=0;c<a;++c)r[c]=eut(e[c],n,t,i,s,r[c]);o.castShaderProgramId=t.shaderProgram.id}return o};Of.prototype.isDestroyed=function(){return!1};Of.prototype.destroy=function(){rj(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(let e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return me(this)};var e0=Of;var h2i=S(T(),1);var zXi=S(T(),1),RS=`uniform sampler2D colorTexture; #ifdef DEBUG_SHOW_DEPTH uniform sampler2D u_packedTranslucentDepth; @@ -12794,7 +12891,7 @@ void main() out_FragColor = color; #endif } -`;var Omt=!1;function Zy(e){this._drawClassificationFBO=new ui({createDepthAttachments:!1}),this._accumulationFBO=new ui({createDepthAttachments:!1}),this._packFBO=new ui,this._opaqueDepthStencilTexture=void 0,this._textureToComposite=void 0,this._translucentDepthStencilTexture=void 0,this._packDepthCommand=void 0,this._accumulateCommand=void 0,this._compositeCommand=void 0,this._copyCommand=void 0,this._clearColorCommand=new ii({color:new Y(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new ii({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new He,this._rsDepth=void 0,this._rsAccumulate=void 0,this._rsComp=void 0,this._useScissorTest=void 0,this._scissorRectangle=void 0,this._hasTranslucentDepth=!1,this._frustumsDrawn=0}Object.defineProperties(Zy.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}});function Txe(e){e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy()}function Sxe(e){e._drawClassificationFBO.destroy(),e._accumulationFBO.destroy(),e._packFBO.destroy()}function Hmt(e,t,n,i){Txe(e),e._translucentDepthStencilTexture=new Et({context:t,width:n,height:i,pixelFormat:at.DEPTH_STENCIL,pixelDatatype:ze.UNSIGNED_INT_24_8,sampler:rn.NEAREST})}function zmt(e,t,n,i){Sxe(e),e._drawClassificationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._drawClassificationFBO.update(t,n,i),e._accumulationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._accumulationFBO.update(t,n,i),e._packFBO.update(t,n,i)}function Kmt(e,t,n,i){if(!e.isSupported())return;e._opaqueDepthStencilTexture=i;let o=e._opaqueDepthStencilTexture.width,r=e._opaqueDepthStencilTexture.height;e._drawClassificationFBO.isDirty(o,r)&&(Hmt(e,t,o,r),zmt(e,t,o,r));let s,a;if(l(e._packDepthCommand)||(s=new Ye({sources:[fw]}),a={u_opaqueDepthTexture:function(){return e._opaqueDepthStencilTexture},u_translucentDepthTexture:function(){return e._translucentDepthStencilTexture}},e._packDepthCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),!l(e._compositeCommand)){s=new Ye({sources:[NT]}),a={colorTexture:function(){return e._textureToComposite}},Omt&&(s.defines=["DEBUG_SHOW_DEPTH"],a.u_packedTranslucentDepth=function(){return e._packFBO.getColorTexture()}),e._compositeCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e});let u=e._compositeCommand,m=u.shaderProgram,p=t.shaderCache.createDerivedShaderProgram(m,"pick",{vertexShaderSource:m.vertexShaderSource,fragmentShaderSource:new Ye({sources:s.sources,defines:["PICK"]}),attributeLocations:m._attributeLocations}),g=et.shallowClone(u);g.shaderProgram=p,u.derivedCommands.pick=g}l(e._copyCommand)||(s=new Ye({sources:[NT]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._copyCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),l(e._accumulateCommand)||(s=new Ye({sources:[NT]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._accumulateCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),e._viewport.width=o,e._viewport.height=r;let c=!He.equals(e._viewport,n.viewport),d=c!==e._useScissorTest;e._useScissorTest=c,He.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=He.clone(n.viewport,e._scissorRectangle),d=!0),(!l(e._rsDepth)||!He.equals(e._viewport,e._rsDepth.viewport)||d)&&(e._rsDepth=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packDepthCommand)&&(e._packDepthCommand.renderState=e._rsDepth),(!l(e._rsAccumulate)||!He.equals(e._viewport,e._rsAccumulate.viewport)||d)&&(e._rsAccumulate=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:Un.EQUAL,reference:Nt.CESIUM_3D_TILE_MASK}})),l(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),(!l(e._rsComp)||!He.equals(e._viewport,e._rsComp.viewport)||d)&&(e._rsComp=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:un.ALPHA_BLEND})),l(e._compositeCommand)&&(e._compositeCommand.renderState=e._rsComp,e._compositeCommand.derivedCommands.pick.renderState=e._rsComp)}Zy.prototype.executeTranslucentCommands=function(e,t,n,i,o){let r=i.length,s,a,c=e.frameState.useLogDepth,d=e.context,u=n.framebuffer;for(a=0;a<r;++a)if(s=i[a],s=c?s.derivedCommands.logDepth.command:s,s.depthForTranslucentClassification){this._hasTranslucentDepth=!0;break}if(this._hasTranslucentDepth){for(Kmt(this,d,n,o),n.framebuffer=this._drawClassificationFBO.framebuffer,this._clearDepthStencilCommand.execute(d,n),a=0;a<r;++a){if(s=i[a],s=c?s.derivedCommands.logDepth.command:s,!s.depthForTranslucentClassification)continue;let m=s.derivedCommands.depth.depthOnlyCommand;t(m,e,d,n)}this._frustumsDrawn+=this._hasTranslucentDepth?1:0,this._hasTranslucentDepth&&(n.framebuffer=this._packFBO.framebuffer,this._packDepthCommand.execute(d,n)),n.framebuffer=u}};Zy.prototype.executeClassificationCommands=function(e,t,n,i){if(!this._hasTranslucentDepth)return;let o=e.context,r=o.uniformState,s=n.framebuffer;this._frustumsDrawn===2&&(n.framebuffer=this._accumulationFBO.framebuffer,this._copyCommand.execute(o,n)),n.framebuffer=this._drawClassificationFBO.framebuffer,this._frustumsDrawn>1&&this._clearColorCommand.execute(o,n),r.updatePass(Re.CESIUM_3D_TILE_CLASSIFICATION);let a=r.globeDepthTexture;r.globeDepthTexture=this._packFBO.getColorTexture();let c=i.commands[Re.CESIUM_3D_TILE_CLASSIFICATION],d=i.indices[Re.CESIUM_3D_TILE_CLASSIFICATION];for(let u=0;u<d;++u)t(c[u],e,o,n);r.globeDepthTexture=a,n.framebuffer=s,this._frustumsDrawn!==1&&(n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=s)};Zy.prototype.execute=function(e,t){if(!this._hasTranslucentDepth)return;this._frustumsDrawn===1?this._textureToComposite=this._drawClassificationFBO.getColorTexture():this._textureToComposite=this._accumulationFBO.getColorTexture(),(e.frameState.passes.pick?this._compositeCommand.derivedCommands.pick:this._compositeCommand).execute(e.context,t),Jmt(this,e,t)};function Jmt(e,t,n){if(!e._hasTranslucentDepth)return;let i=n.framebuffer;n.framebuffer=e._drawClassificationFBO.framebuffer,e._clearColorCommand.execute(t._context,n),n.framebuffer=i,e._frustumsDrawn>1&&(n.framebuffer=e._accumulationFBO.framebuffer,e._clearColorCommand.execute(t._context,n)),e._hasTranslucentDepth=!1,e._frustumsDrawn=0}Zy.prototype.isSupported=function(){return this._supported};Zy.prototype.isDestroyed=function(){return!1};Zy.prototype.destroy=function(){return Txe(this),Sxe(this),l(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),l(this._packDepthCommand)&&(this._packDepthCommand.shaderProgram=this._packDepthCommand.shaderProgram&&this._packDepthCommand.shaderProgram.destroy()),me(this)};var PF=Zy;function Qmt(){this.command=void 0,this.near=void 0,this.far=void 0}function n3(e,t,n){let i=e.context,o;i.depthTexture&&(o=new RF);let r;e._useOIT&&i.depthTexture&&(r=new GF(i));let s=new pc(i);s.viewport=He.clone(n),this.camera=t,this._cameraClone=ao.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=n,this.passState=s,this.pickFramebuffer=new WF(i),this.pickDepthFramebuffer=new XF,this.sceneFramebuffer=new AT,this.globeDepth=o,this.globeTranslucencyFramebuffer=new ZF,this.oit=r,this.translucentTileClassification=new PF(i),this.pickDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}var Cxe=new h,Vxe=new h;function jmt(e,t){let n=Math.max(Math.abs(e.x),Math.abs(t.x)),i=Math.max(Math.abs(e.y),Math.abs(t.y)),o=Math.max(Math.abs(e.z),Math.abs(t.z));return Math.max(Math.max(n,i),o)}function qmt(e,t,n){let i=1/Math.max(1,jmt(e.position,t.position));return h.multiplyByScalar(e.position,i,Cxe),h.multiplyByScalar(t.position,i,Vxe),h.equalsEpsilon(Cxe,Vxe,n)&&h.equalsEpsilon(e.direction,t.direction,n)&&h.equalsEpsilon(e.up,t.up,n)&&h.equalsEpsilon(e.right,t.right,n)&&M.equalsEpsilon(e.transform,t.transform,n)&&e.frustum.equalsEpsilon(t.frustum,n)}n3.prototype.checkForCameraUpdates=function(e){let t=this.camera,n=this._cameraClone;return qmt(t,n,W.EPSILON15)?(this._cameraStartFired&&bi()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=bi(),ao.clone(t,n),!0)};function $mt(e,t,n,i){let o=t.frameState,r=o.camera,s=o.useLogDepth?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,a=t.mode===oe.SCENE2D,c=t.nearToFarDistance2D;i*=1+W.EPSILON2,n=Math.min(Math.max(n,r.frustum.near),r.frustum.far),i=Math.max(Math.min(i,r.frustum.far),n);let d;a?(i=Math.min(i,r.position.z+t.nearToFarDistance2D),n=Math.min(n,i),d=Math.ceil(Math.max(1,i-n)/t.nearToFarDistance2D)):d=Math.ceil(Math.log(i/n)/Math.log(s));let u=e.frustumCommandsList;u.length=d;for(let m=0;m<d;++m){let p,g;a?(p=Math.min(i-c,n+m*c),g=Math.min(i,p+c)):(p=Math.max(n,Math.pow(s,m)*n),g=Math.min(i,s*p));let f=u[m];l(f)?(f.near=p,f.far=g):f=u[m]=new LF(p,g)}}function eht(e,t,n,i,o){t.debugShowFrustums&&(n.debugOverlappingFrustums=0);let r=e.frustumCommandsList,s=r.length;for(let a=0;a<s;++a){let c=r[a],d=c.near,u=c.far;if(i>u)continue;if(o<d)break;let m=n.pass,p=c.indices[m]++;if(c.commands[m][p]=n,t.debugShowFrustums&&(n.debugOverlappingFrustums|=1<<a),n.executeInClosestFrustum)break}if(t.debugShowFrustums){let a=e.debugFrustumStatistics.commandsInFrustums;a[n.debugOverlappingFrustums]=l(a[n.debugOverlappingFrustums])?a[n.debugOverlappingFrustums]+1:1,++e.debugFrustumStatistics.totalCommands}t.updateDerivedCommands(n)}var Lxe=new rs,tht=new _a;n3.prototype.createPotentiallyVisibleSet=function(e){let t=e.frameState,n=t.camera,i=n.directionWC,o=n.positionWC,r=e._computeCommandList,s=e._overlayCommandList,a=t.commandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});let c=this.frustumCommandsList,d=c.length,u=Re.NUMBER_OF_PASSES;for(let R=0;R<d;++R)for(let E=0;E<u;++E)c[R].indices[E]=0;r.length=0,s.length=0;let m=this._commandExtents,p=m.length,g=0,f=+Number.MAX_VALUE,x=-Number.MAX_VALUE,_=t.shadowState.shadowsEnabled,C=+Number.MAX_VALUE,V=-Number.MAX_VALUE,L=Number.MAX_VALUE,Z=t.mode===oe.SCENE3D?t.occluder:void 0,G=t.cullingVolume,X=Lxe.planes;for(let R=0;R<5;++R)X[R]=G.planes[R];G=Lxe;let v=a.length;for(let R=0;R<v;++R){let E=a[R],I=E.pass;if(I===Re.COMPUTE)r.push(E);else if(I===Re.OVERLAY)s.push(E);else{let w,N,B=E.boundingVolume;if(l(B)){if(!e.isVisible(E,G,Z))continue;let O=B.computePlaneDistances(o,i,tht);if(w=O.start,N=O.stop,f=Math.min(f,w),x=Math.max(x,N),_&&E.receiveShadows&&w<ob.MAXIMUM_DISTANCE&&!(I===Re.GLOBE&&w<-100&&N>100)){let k=N-w;I!==Re.GLOBE&&w<100&&(L=Math.min(L,k)),C=Math.min(C,w),V=Math.max(V,N)}}else E instanceof ii?(w=n.frustum.near,N=n.frustum.far):(w=n.frustum.near,N=n.frustum.far,f=Math.min(f,w),x=Math.max(x,N));let U=m[g];l(U)||(U=m[g]=new Qmt),U.command=E,U.near=w,U.far=N,g++}}_&&(C=Math.min(Math.max(C,n.frustum.near),n.frustum.far),V=Math.max(Math.min(V,n.frustum.far),C)),_&&(t.shadowState.nearPlane=C,t.shadowState.farPlane=V,t.shadowState.closestObjectSize=L),$mt(this,e,f,x);let P,F;for(P=0;P<g;P++)F=m[P],eht(this,e,F.command,F.near,F.far);if(g<p)for(P=g;P<p&&(F=m[P],!!l(F.command));P++)F.command=void 0;let A=c.length,b=t.frustumSplits;b.length=A+1;for(let R=0;R<A;++R)b[R]=c[R].near,R===A-1&&(b[R+1]=c[R].far)};n3.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.translucentTileClassification=this.translucentTileClassification&&this.translucentTileClassification.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();let e,t=this.pickDepths,n=t.length;for(e=0;e<n;++e)t[e].destroy()};var kT=n3;var Zxe=.1,nht=new tm({pass:Io.MOST_DETAILED_PRELOAD}),iht=new tm({pass:Io.MOST_DETAILED_PICK}),o3=new tm({pass:Io.PICK});function pa(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;let t=new He(0,0,1,1),n=new ao(e);n.frustum=new sn({width:Zxe,aspectRatio:1,near:.1}),this._pickOffscreenView=new kT(e,n,t)}pa.prototype.update=function(){this._pickPositionCacheDirty=!0};pa.prototype.getPickDepth=function(e,t){let n=e.view.pickDepths,i=n[t];return l(i)||(i=new VF,n[t]=i),i};var oht=new Cr,rht=new h,i3=new h,sht=new D,aht=new M;function cht(e,t,n,i,o){let r=e.camera,s=r.frustum,a=s.offCenterFrustum;l(a)&&(s=a);let c=2*(t.x-o.x)/o.width-1;c*=(s.right-s.left)*.5;let d=2*(o.height-t.y-o.y)/o.height-1;d*=(s.top-s.bottom)*.5;let u=M.clone(r.transform,aht);r._setTransform(M.IDENTITY);let m=h.clone(r.position,rht);h.multiplyByScalar(r.right,c,i3),h.add(i3,m,m),h.multiplyByScalar(r.up,d,i3),h.add(i3,m,m),r._setTransform(u),e.mode===oe.SCENE2D&&h.fromElements(m.z,m.x,m.y,m);let p=s.getPixelDimensions(o.width,o.height,1,1,sht),g=oht;return g.right=p.x*.5,g.left=-g.right,g.top=p.y*.5,g.bottom=-g.top,g.near=s.near,g.far=s.far,g.computeCullingVolume(m,r.directionWC,r.upWC)}var lht=new ol,dht=new D;function uht(e,t,n,i,o){let r=e.camera,s=r.frustum,a=s.near,c=Math.tan(s.fovy*.5),d=s.aspectRatio*c,u=2*(t.x-o.x)/o.width-1,m=2*(o.height-t.y-o.y)/o.height-1,p=u*a*d,g=m*a*c,f=s.getPixelDimensions(o.width,o.height,1,1,dht),x=f.x*n*.5,_=f.y*i*.5,C=lht;return C.top=g+_,C.bottom=g-_,C.right=p+x,C.left=p-x,C.near=a,C.far=s.far,C.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}function d8(e,t,n,i,o){let r=e.camera.frustum;return r instanceof sn||r instanceof Cr?cht(e,t,n,i,o):uht(e,t,n,i,o)}var Zh=3,rb=3,Vc=new He(0,0,Zh,rb),u8=new D,r3=new Y(0,0,0,0);pa.prototype.pick=function(e,t,n,i){Zh=y(n,3),rb=y(i,Zh);let{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:c}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let d=s.passState;d.viewport=He.clone(a,d.viewport);let u=ki.transformWindowToDrawingBuffer(e,t,u8);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=d8(e,u,Zh,rb,a),r.invertClassification=!1,r.passes.pick=!0,r.tilesetPassState=o3,o.uniformState.update(r),e.updateEnvironment(),Vc.x=u.x-(Zh-1)*.5,Vc.y=e.drawingBufferHeight-u.y-(rb-1)*.5,Vc.width=Zh,Vc.height=rb,d=c.begin(Vc,a),e.updateAndExecuteCommands(d,r3),e.resolveFramebuffers(d);let m=c.end(Vc);return o.endFrame(),m};pa.prototype.pickVoxelCoordinate=function(e,t,n,i){Zh=y(n,3),rb=y(i,Zh);let{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:c}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let d=s.passState;d.viewport=He.clone(a,d.viewport);let u=ki.transformWindowToDrawingBuffer(e,t,u8);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=d8(e,u,Zh,rb,a),r.invertClassification=!1,r.passes.pickVoxel=!0,r.tilesetPassState=o3,o.uniformState.update(r),e.updateEnvironment(),Vc.x=u.x-(Zh-1)*.5,Vc.y=e.drawingBufferHeight-u.y-(rb-1)*.5,Vc.width=Zh,Vc.height=rb,d=c.begin(Vc,a),e.updateAndExecuteCommands(d,r3),e.resolveFramebuffers(d);let m=c.readVoxelInfo(Vc);return o.endFrame(),m};function mht(e,t){let{defaultView:n,context:i,frameState:o,environmentState:r}=e,{viewport:s,pickDepthFramebuffer:a}=n;e.view=n,s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;let c=n.passState;c.viewport=He.clone(s,c.viewport),e.clearPasses(o.passes),o.passes.pick=!0,o.passes.depth=!0,o.cullingVolume=d8(e,t,1,1,s),o.tilesetPassState=o3,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,c=a.update(i,t,s),e.updateAndExecuteCommands(c,r3),e.resolveFramebuffers(c),i.endFrame()}var hht=new Ti,fht=new ol,pht=new sn,bht=new Cr;pa.prototype.pickPositionWorldCoordinates=function(e,t,n){if(!e.useDepthPicking)return;let i=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(i))return h.clone(this._pickPositionCache[i],n);let{context:o,frameState:r,camera:s,defaultView:a}=e,{uniformState:c}=o;e.view=a;let d=ki.transformWindowToDrawingBuffer(e,t,u8);e.pickTranslucentDepth?mht(e,d):(e.updateFrameState(),c.update(r),e.updateEnvironment()),d.y=e.drawingBufferHeight-d.y;let u;l(s.frustum.fov)?u=s.frustum.clone(hht):l(s.frustum.infiniteProjectionMatrix)?u=s.frustum.clone(fht):l(s.frustum.width)?u=s.frustum.clone(pht):u=s.frustum.clone(bht);let m=a.frustumCommandsList,p=m.length;for(let g=0;g<p;++g){let x=this.getPickDepth(e,g).getDepth(o,d.x,d.y);if(l(x)&&x>0&&x<1){let _=m[g],C;return e.mode===oe.SCENE2D?(C=s.position.z,s.position.z=C-_.near+1,u.far=Math.max(1,_.far-_.near),u.near=1,c.update(r),c.updateFrustum(u)):(u.near=_.near*(g!==0?e.opaqueFrustumNearOffset:1),u.far=_.far,c.updateFrustum(u)),n=ki.drawingBufferToWgs84Coordinates(e,d,x,n),e.mode===oe.SCENE2D&&(s.position.z=C,c.update(r)),this._pickPositionCache[i]=h.clone(n),n}}this._pickPositionCache[i]=void 0};var ght=new he;pa.prototype.pickPosition=function(e,t,n){if(n=this.pickPositionWorldCoordinates(e,t,n),l(n)&&e.mode!==oe.SCENE3D){h.fromElements(n.y,n.z,n.x,n);let i=e.mapProjection,o=i.ellipsoid,r=i.unproject(n,ght);o.cartographicToCartesian(r,n)}return n};function Gxe(e,t){let n,i,o=[],r=[],s=[],a=[];l(e)||(e=Number.MAX_VALUE);let c=t();for(;l(c);){let d=c.object,u=c.position,m=c.exclude;if(l(u)&&!l(d)){o.push(c);break}if(!l(d)||!l(d.primitive)||!m&&(o.push(c),0>=--e))break;let p=d.primitive,g=!1;typeof p.getGeometryInstanceAttributes=="function"&&l(d.id)&&(i=p.getGeometryInstanceAttributes(d.id),l(i)&&l(i.show)&&(g=!0,i.show=yn.toValue(!1,i.show),s.push(i))),d instanceof Ws&&(g=!0,d.show=!1,a.push(d)),g||(p.show=!1,r.push(p)),c=t()}for(n=0;n<r.length;++n)r[n].show=!0;for(n=0;n<s.length;++n)i=s[n],i.show=yn.toValue(!0,i.show);for(n=0;n<a.length;++n)a[n].show=!0;return o}pa.prototype.drillPick=function(e,t,n,i,o){let r=this;return Gxe(n,function(){let c=r.pick(e,t,i,o);if(l(c))return{object:c,position:void 0,exclude:!1}}).map(function(c){return c.object})};var Rxe=new h,yht=new h;function xht(e,t,n){this.ray=e,this.width=t,this.tilesets=n,this.ready=!1;let i=this;this.promise=new Promise(o=>{i._completePick=()=>{o()}})}function Exe(e,t,n,i){let o=t.direction,r=h.mostOrthogonalAxis(o,Rxe),s=h.cross(o,r,Rxe),a=h.cross(o,s,yht);return i.position=t.origin,i.direction=o,i.up=a,i.right=s,i.frustum.width=y(n,Zxe),i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC)}function _ht(e,t,n){let i=t.frameState,{ray:o,width:r,tilesets:s}=n,a=e._pickOffscreenView.camera,c=Exe(e,o,r,a),d=nht;d.camera=a,d.cullingVolume=c;let u=!0,m=s.length;for(let p=0;p<m;++p){let g=s[p];g.show&&t.primitives.contains(g)&&(g.updateForPass(i,d),u=u&&d.ready)}return u&&n._completePick(),u}pa.prototype.updateMostDetailedRayPicks=function(e){let t=this._mostDetailedRayPicks;for(let n=0;n<t.length;++n)_ht(this,e,t[n])&&t.splice(n--,1)};function Xxe(e,t,n){for(let i=0;i<e.length;++i){let o=e.get(i);o.show&&(l(o.isCesium3DTileset)?(!l(t)||t.indexOf(o)===-1)&&n.push(o):o instanceof Nl&&Xxe(o,t,n))}}function s3(e,t,n,i,o,r){let s=[];if(Xxe(t.primitives,i,s),s.length===0)return Promise.resolve(r());let a=new xht(n,o,s);return e._mostDetailedRayPicks.push(a),a.promise.then(function(){return r()})}function Tht(e,t){return!l(e)||!l(t)||t.length===0?!1:t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1}function Sht(e,t,n,i,o,r,s){let{context:a,frameState:c}=t,d=a.uniformState,u=e._pickOffscreenView;t.view=u,Exe(e,n,o,u.camera),Vc=He.clone(u.viewport,Vc);let m=u.pickFramebuffer.begin(Vc,u.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),c.invertClassification=!1,c.passes.pick=!0,c.passes.offscreen=!0,s?c.tilesetPassState=iht:c.tilesetPassState=o3,d.update(c),t.updateEnvironment(),t.updateAndExecuteCommands(m,r3),t.resolveFramebuffers(m);let p,g=u.pickFramebuffer.end(Vc);if(t.context.depthTexture){let f=u.frustumCommandsList.length;for(let x=0;x<f;++x){let C=e.getPickDepth(t,x).getDepth(a,0,0);if(l(C)&&C>0&&C<1){let V=u.frustumCommandsList[x],L=V.near*(x!==0?t.opaqueFrustumNearOffset:1),Z=V.far,G=L+C*(Z-L);p=pn.getPoint(n,G);break}}}if(t.view=t.defaultView,a.endFrame(),l(g)||l(p))return{object:g,position:p,exclude:!l(p)&&r||Tht(g,i)}}function Ixe(e,t,n,i,o,r,s,a){return Gxe(i,function(){return Sht(e,t,n,o,r,s,a)})}function nL(e,t,n,i,o,r,s){let a=Ixe(e,t,n,1,i,o,r,s);if(a.length>0)return a[0]}function Wxe(e,t,n,i,o,r,s,a){return Ixe(e,t,n,i,o,r,s,a)}function a3(e,t){return new Promise((n,i)=>{t.then(function(o){let r=e.postRender.addEventListener(function(){r(),n(o)});e.requestRender()}).catch(function(o){i(o)})})}pa.prototype.pickFromRay=function(e,t,n,i){return nL(this,e,t,n,i,!1,!1)};pa.prototype.drillPickFromRay=function(e,t,n,i,o){return Wxe(this,e,t,n,i,o,!1,!1)};pa.prototype.pickFromRayMostDetailed=function(e,t,n,i){let o=this;return t=pn.clone(t),n=l(n)?n.slice():n,a3(e,s3(o,e,t,n,i,function(){return nL(o,e,t,n,i,!1,!0)}))};pa.prototype.drillPickFromRayMostDetailed=function(e,t,n,i,o){let r=this;return t=pn.clone(t),i=l(i)?i.slice():i,a3(e,s3(r,e,t,i,o,function(){return Wxe(r,e,t,n,i,o,!1,!0)}))};var Cht=new h,Vht=new h,Lht=new pn,Pxe=new he;function m8(e,t){let n=e.globe,i=l(n)?n.ellipsoid:e.mapProjection.ellipsoid,o=ci._defaultMaxTerrainHeight,r=i.geodeticSurfaceNormalCartographic(t,Vht),s=he.toCartesian(t,i,Cht),a=Lht;a.origin=s,a.direction=r;let c=new pn;return pn.getPoint(a,o,c.origin),h.negate(r,c.direction),c}function vxe(e,t){let n=e.globe,i=l(n)?n.ellipsoid:e.mapProjection.ellipsoid,o=he.fromCartesian(t,i,Pxe);return m8(e,o)}function wxe(e,t){let n=e.globe,i=l(n)?n.ellipsoid:e.mapProjection.ellipsoid;return he.fromCartesian(t,i,Pxe).height}function Rht(e,t,n,i,o){let r=m8(t,n);return s3(e,t,r,i,o,function(){let s=nL(e,t,r,i,o,!0,!0);if(l(s))return wxe(t,s.position)})}function Zht(e,t,n,i,o,r){let s=vxe(t,n);return s3(e,t,s,i,o,function(){let a=nL(e,t,s,i,o,!0,!0);if(l(a))return h.clone(a.position,r)})}pa.prototype.sampleHeight=function(e,t,n,i){let o=m8(e,t),r=nL(this,e,o,n,i,!0,!1);if(l(r))return wxe(e,r.position)};pa.prototype.clampToHeight=function(e,t,n,i,o){let r=vxe(e,t),s=nL(this,e,r,n,i,!0,!1);if(l(s))return h.clone(s.position,o)};pa.prototype.sampleHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=Rht(this,e,t[s],n,i);return a3(e,Promise.all(r).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c].height=s[c];return t}))};pa.prototype.clampToHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=Zht(this,e,t[s],n,i,t[s]);return a3(e,Promise.all(r).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c]=s[c];return t}))};pa.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};var vF=pa;var z5i=T(S(),1);var S5i=T(S(),1);var GMi=T(S(),1),wF=`uniform sampler2D colorTexture; +`;var tut=!1;function gy(e){this._drawClassificationFBO=new ui({createDepthAttachments:!1}),this._accumulationFBO=new ui({createDepthAttachments:!1}),this._packFBO=new ui,this._opaqueDepthStencilTexture=void 0,this._textureToComposite=void 0,this._translucentDepthStencilTexture=void 0,this._packDepthCommand=void 0,this._accumulateCommand=void 0,this._compositeCommand=void 0,this._copyCommand=void 0,this._clearColorCommand=new ii({color:new Y(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new ii({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new ze,this._rsDepth=void 0,this._rsAccumulate=void 0,this._rsComp=void 0,this._useScissorTest=void 0,this._scissorRectangle=void 0,this._hasTranslucentDepth=!1,this._frustumsDrawn=0}Object.defineProperties(gy.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}});function wye(e){e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy()}function Fye(e){e._drawClassificationFBO.destroy(),e._accumulationFBO.destroy(),e._packFBO.destroy()}function nut(e,t,n,i){wye(e),e._translucentDepthStencilTexture=new Et({context:t,width:n,height:i,pixelFormat:at.DEPTH_STENCIL,pixelDatatype:Ke.UNSIGNED_INT_24_8,sampler:rn.NEAREST})}function iut(e,t,n,i){Fye(e),e._drawClassificationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._drawClassificationFBO.update(t,n,i),e._accumulationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._accumulationFBO.update(t,n,i),e._packFBO.update(t,n,i)}function out(e,t,n,i){if(!e.isSupported())return;e._opaqueDepthStencilTexture=i;let o=e._opaqueDepthStencilTexture.width,r=e._opaqueDepthStencilTexture.height;e._drawClassificationFBO.isDirty(o,r)&&(nut(e,t,o,r),iut(e,t,o,r));let s,a;if(l(e._packDepthCommand)||(s=new Ye({sources:[Nv]}),a={u_opaqueDepthTexture:function(){return e._opaqueDepthStencilTexture},u_translucentDepthTexture:function(){return e._translucentDepthStencilTexture}},e._packDepthCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),!l(e._compositeCommand)){s=new Ye({sources:[RS]}),a={colorTexture:function(){return e._textureToComposite}},tut&&(s.defines=["DEBUG_SHOW_DEPTH"],a.u_packedTranslucentDepth=function(){return e._packFBO.getColorTexture()}),e._compositeCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e});let u=e._compositeCommand,m=u.shaderProgram,p=t.shaderCache.createDerivedShaderProgram(m,"pick",{vertexShaderSource:m.vertexShaderSource,fragmentShaderSource:new Ye({sources:s.sources,defines:["PICK"]}),attributeLocations:m._attributeLocations}),g=tt.shallowClone(u);g.shaderProgram=p,u.derivedCommands.pick=g}l(e._copyCommand)||(s=new Ye({sources:[RS]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._copyCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),l(e._accumulateCommand)||(s=new Ye({sources:[RS]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._accumulateCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),e._viewport.width=o,e._viewport.height=r;let c=!ze.equals(e._viewport,n.viewport),d=c!==e._useScissorTest;e._useScissorTest=c,ze.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=ze.clone(n.viewport,e._scissorRectangle),d=!0),(!l(e._rsDepth)||!ze.equals(e._viewport,e._rsDepth.viewport)||d)&&(e._rsDepth=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packDepthCommand)&&(e._packDepthCommand.renderState=e._rsDepth),(!l(e._rsAccumulate)||!ze.equals(e._viewport,e._rsAccumulate.viewport)||d)&&(e._rsAccumulate=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:kn.EQUAL,reference:Nt.CESIUM_3D_TILE_MASK}})),l(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),(!l(e._rsComp)||!ze.equals(e._viewport,e._rsComp.viewport)||d)&&(e._rsComp=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:un.ALPHA_BLEND})),l(e._compositeCommand)&&(e._compositeCommand.renderState=e._rsComp,e._compositeCommand.derivedCommands.pick.renderState=e._rsComp)}gy.prototype.executeTranslucentCommands=function(e,t,n,i,o){let r=i.length,s,a,c=e.frameState.useLogDepth,d=e.context,u=n.framebuffer;for(a=0;a<r;++a)if(s=i[a],s=c?s.derivedCommands.logDepth.command:s,s.depthForTranslucentClassification){this._hasTranslucentDepth=!0;break}if(this._hasTranslucentDepth){for(out(this,d,n,o),n.framebuffer=this._drawClassificationFBO.framebuffer,this._clearDepthStencilCommand.execute(d,n),a=0;a<r;++a){if(s=i[a],s=c?s.derivedCommands.logDepth.command:s,!s.depthForTranslucentClassification)continue;let m=s.derivedCommands.depth.depthOnlyCommand;t(m,e,d,n)}this._frustumsDrawn+=this._hasTranslucentDepth?1:0,this._hasTranslucentDepth&&(n.framebuffer=this._packFBO.framebuffer,this._packDepthCommand.execute(d,n)),n.framebuffer=u}};gy.prototype.executeClassificationCommands=function(e,t,n,i){if(!this._hasTranslucentDepth)return;let o=e.context,r=o.uniformState,s=n.framebuffer;this._frustumsDrawn===2&&(n.framebuffer=this._accumulationFBO.framebuffer,this._copyCommand.execute(o,n)),n.framebuffer=this._drawClassificationFBO.framebuffer,this._frustumsDrawn>1&&this._clearColorCommand.execute(o,n),r.updatePass(Le.CESIUM_3D_TILE_CLASSIFICATION);let a=r.globeDepthTexture;r.globeDepthTexture=this._packFBO.getColorTexture();let c=i.commands[Le.CESIUM_3D_TILE_CLASSIFICATION],d=i.indices[Le.CESIUM_3D_TILE_CLASSIFICATION];for(let u=0;u<d;++u)t(c[u],e,o,n);r.globeDepthTexture=a,n.framebuffer=s,this._frustumsDrawn!==1&&(n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=s)};gy.prototype.execute=function(e,t){if(!this._hasTranslucentDepth)return;this._frustumsDrawn===1?this._textureToComposite=this._drawClassificationFBO.getColorTexture():this._textureToComposite=this._accumulationFBO.getColorTexture(),(e.frameState.passes.pick?this._compositeCommand.derivedCommands.pick:this._compositeCommand).execute(e.context,t),rut(this,e,t)};function rut(e,t,n){if(!e._hasTranslucentDepth)return;let i=n.framebuffer;n.framebuffer=e._drawClassificationFBO.framebuffer,e._clearColorCommand.execute(t._context,n),n.framebuffer=i,e._frustumsDrawn>1&&(n.framebuffer=e._accumulationFBO.framebuffer,e._clearColorCommand.execute(t._context,n)),e._hasTranslucentDepth=!1,e._frustumsDrawn=0}gy.prototype.isSupported=function(){return this._supported};gy.prototype.isDestroyed=function(){return!1};gy.prototype.destroy=function(){return wye(this),Fye(this),l(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),l(this._packDepthCommand)&&(this._packDepthCommand.shaderProgram=this._packDepthCommand.shaderProgram&&this._packDepthCommand.shaderProgram.destroy()),me(this)};var xF=gy;function sut(){this.command=void 0,this.near=void 0,this.far=void 0}function YD(e,t,n){let i=e.context,o;i.depthTexture&&(o=new mF);let r;e._useOIT&&i.depthTexture&&(r=new fF(i));let s=new xc(i);s.viewport=ze.clone(n),this.camera=t,this._cameraClone=io.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=n,this.passState=s,this.pickFramebuffer=new yF(i),this.pickDepthFramebuffer=new bF,this.sceneFramebuffer=new ZS,this.globeDepth=o,this.globeTranslucencyFramebuffer=new hF,this.oit=r,this.translucentTileClassification=new xF(i),this.pickDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}var Aye=new h,Mye=new h;function aut(e,t){let n=Math.max(Math.abs(e.x),Math.abs(t.x)),i=Math.max(Math.abs(e.y),Math.abs(t.y)),o=Math.max(Math.abs(e.z),Math.abs(t.z));return Math.max(Math.max(n,i),o)}function cut(e,t,n){let i=1/Math.max(1,aut(e.position,t.position));return h.multiplyByScalar(e.position,i,Aye),h.multiplyByScalar(t.position,i,Mye),h.equalsEpsilon(Aye,Mye,n)&&h.equalsEpsilon(e.direction,t.direction,n)&&h.equalsEpsilon(e.up,t.up,n)&&h.equalsEpsilon(e.right,t.right,n)&&A.equalsEpsilon(e.transform,t.transform,n)&&e.frustum.equalsEpsilon(t.frustum,n)}YD.prototype.checkForCameraUpdates=function(e){let t=this.camera,n=this._cameraClone;return cut(t,n,X.EPSILON15)?(this._cameraStartFired&&gi()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=gi(),io.clone(t,n),!0)};function lut(e,t,n,i){let o=t.frameState,r=o.camera,s=o.useLogDepth?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,a=t.mode===oe.SCENE2D,c=t.nearToFarDistance2D;i*=1+X.EPSILON2,n=Math.min(Math.max(n,r.frustum.near),r.frustum.far),i=Math.max(Math.min(i,r.frustum.far),n);let d;a?(i=Math.min(i,r.position.z+t.nearToFarDistance2D),n=Math.min(n,i),d=Math.ceil(Math.max(1,i-n)/t.nearToFarDistance2D)):d=Math.ceil(Math.log(i/n)/Math.log(s));let u=e.frustumCommandsList;u.length=d;for(let m=0;m<d;++m){let p,g;a?(p=Math.min(i-c,n+m*c),g=Math.min(i,p+c)):(p=Math.max(n,Math.pow(s,m)*n),g=Math.min(i,s*p));let f=u[m];l(f)?(f.near=p,f.far=g):f=u[m]=new uF(p,g)}}function dut(e,t,n,i,o){t.debugShowFrustums&&(n.debugOverlappingFrustums=0);let r=e.frustumCommandsList,s=r.length;for(let a=0;a<s;++a){let c=r[a],d=c.near,u=c.far;if(i>u)continue;if(o<d)break;let m=n.pass,p=c.indices[m]++;if(c.commands[m][p]=n,t.debugShowFrustums&&(n.debugOverlappingFrustums|=1<<a),n.executeInClosestFrustum)break}if(t.debugShowFrustums){let a=e.debugFrustumStatistics.commandsInFrustums;a[n.debugOverlappingFrustums]=l(a[n.debugOverlappingFrustums])?a[n.debugOverlappingFrustums]+1:1,++e.debugFrustumStatistics.totalCommands}t.updateDerivedCommands(n)}var Nye=new ss,uut=new Sa;YD.prototype.createPotentiallyVisibleSet=function(e){let t=e.frameState,n=t.camera,i=n.directionWC,o=n.positionWC,r=e._computeCommandList,s=e._overlayCommandList,a=t.commandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});let c=this.frustumCommandsList,d=c.length,u=Le.NUMBER_OF_PASSES;for(let L=0;L<d;++L)for(let E=0;E<u;++E)c[L].indices[E]=0;r.length=0,s.length=0;let m=this._commandExtents,p=m.length,g=0,f=+Number.MAX_VALUE,x=-Number.MAX_VALUE,_=t.shadowState.shadowsEnabled,C=+Number.MAX_VALUE,V=-Number.MAX_VALUE,Z=Number.MAX_VALUE,R=t.mode===oe.SCENE3D?t.occluder:void 0,G=t.cullingVolume,W=Nye.planes;for(let L=0;L<5;++L)W[L]=G.planes[L];G=Nye;let v=a.length;for(let L=0;L<v;++L){let E=a[L],I=E.pass;if(I===Le.COMPUTE)r.push(E);else if(I===Le.OVERLAY)s.push(E);else{let w,N,B=E.boundingVolume;if(l(B)){if(!e.isVisible(E,G,R))continue;let O=B.computePlaneDistances(o,i,uut);if(w=O.start,N=O.stop,f=Math.min(f,w),x=Math.max(x,N),_&&E.receiveShadows&&w<e0.MAXIMUM_DISTANCE&&!(I===Le.GLOBE&&w<-100&&N>100)){let U=N-w;I!==Le.GLOBE&&w<100&&(Z=Math.min(Z,U)),C=Math.min(C,w),V=Math.max(V,N)}}else E instanceof ii?(w=n.frustum.near,N=n.frustum.far):(w=n.frustum.near,N=n.frustum.far,f=Math.min(f,w),x=Math.max(x,N));let k=m[g];l(k)||(k=m[g]=new sut),k.command=E,k.near=w,k.far=N,g++}}_&&(C=Math.min(Math.max(C,n.frustum.near),n.frustum.far),V=Math.max(Math.min(V,n.frustum.far),C)),_&&(t.shadowState.nearPlane=C,t.shadowState.farPlane=V,t.shadowState.closestObjectSize=Z),lut(this,e,f,x);let P,F;for(P=0;P<g;P++)F=m[P],dut(this,e,F.command,F.near,F.far);if(g<p)for(P=g;P<p&&(F=m[P],!!l(F.command));P++)F.command=void 0;let M=c.length,b=t.frustumSplits;b.length=M+1;for(let L=0;L<M;++L)b[L]=c[L].near,L===M-1&&(b[L+1]=c[L].far)};YD.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.translucentTileClassification=this.translucentTileClassification&&this.translucentTileClassification.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();let e,t=this.pickDepths,n=t.length;for(e=0;e<n;++e)t[e].destroy()};var GS=YD;var kye=.1,mut=new $u({pass:Io.MOST_DETAILED_PRELOAD}),hut=new $u({pass:Io.MOST_DETAILED_PICK}),zD=new $u({pass:Io.PICK});function pa(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;let t=new ze(0,0,1,1),n=new io(e);n.frustum=new sn({width:kye,aspectRatio:1,near:.1}),this._pickOffscreenView=new GS(e,n,t)}pa.prototype.update=function(){this._pickPositionCacheDirty=!0};pa.prototype.getPickDepth=function(e,t){let n=e.view.pickDepths,i=n[t];return l(i)||(i=new dF,n[t]=i),i};var fut=new Vr,put=new h,OD=new h,but=new D,gut=new A;function yut(e,t,n,i,o){let r=e.camera,s=r.frustum,a=s.offCenterFrustum;l(a)&&(s=a);let c=2*(t.x-o.x)/o.width-1;c*=(s.right-s.left)*.5;let d=2*(o.height-t.y-o.y)/o.height-1;d*=(s.top-s.bottom)*.5;let u=A.clone(r.transform,gut);r._setTransform(A.IDENTITY);let m=h.clone(r.position,put);h.multiplyByScalar(r.right,c,OD),h.add(OD,m,m),h.multiplyByScalar(r.up,d,OD),h.add(OD,m,m),r._setTransform(u),e.mode===oe.SCENE2D&&h.fromElements(m.z,m.x,m.y,m);let p=s.getPixelDimensions(o.width,o.height,1,1,but),g=fut;return g.right=p.x*.5,g.left=-g.right,g.top=p.y*.5,g.bottom=-g.top,g.near=s.near,g.far=s.far,g.computeCullingVolume(m,r.directionWC,r.upWC)}var xut=new rl,_ut=new D;function Sut(e,t,n,i,o){let r=e.camera,s=r.frustum,a=s.near,c=Math.tan(s.fovy*.5),d=s.aspectRatio*c,u=2*(t.x-o.x)/o.width-1,m=2*(o.height-t.y-o.y)/o.height-1,p=u*a*d,g=m*a*c,f=s.getPixelDimensions(o.width,o.height,1,1,_ut),x=f.x*n*.5,_=f.y*i*.5,C=xut;return C.top=g+_,C.bottom=g-_,C.right=p+x,C.left=p-x,C.near=a,C.far=s.far,C.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}function aj(e,t,n,i,o){let r=e.camera.frustum;return r instanceof sn||r instanceof Vr?yut(e,t,n,i,o):Sut(e,t,n,i,o)}var Th=3,t0=3,Tc=new ze(0,0,Th,t0),cj=new D,KD=new Y(0,0,0,0);pa.prototype.pick=function(e,t,n,i){Th=y(n,3),t0=y(i,Th);let{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:c}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let d=s.passState;d.viewport=ze.clone(a,d.viewport);let u=ki.transformWindowToDrawingBuffer(e,t,cj);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=aj(e,u,Th,t0,a),r.invertClassification=!1,r.passes.pick=!0,r.tilesetPassState=zD,o.uniformState.update(r),e.updateEnvironment(),Tc.x=u.x-(Th-1)*.5,Tc.y=e.drawingBufferHeight-u.y-(t0-1)*.5,Tc.width=Th,Tc.height=t0,d=c.begin(Tc,a),e.updateAndExecuteCommands(d,KD),e.resolveFramebuffers(d);let m=c.end(Tc);return o.endFrame(),m};pa.prototype.pickVoxelCoordinate=function(e,t,n,i){Th=y(n,3),t0=y(i,Th);let{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:c}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let d=s.passState;d.viewport=ze.clone(a,d.viewport);let u=ki.transformWindowToDrawingBuffer(e,t,cj);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=aj(e,u,Th,t0,a),r.invertClassification=!1,r.passes.pickVoxel=!0,r.tilesetPassState=zD,o.uniformState.update(r),e.updateEnvironment(),Tc.x=u.x-(Th-1)*.5,Tc.y=e.drawingBufferHeight-u.y-(t0-1)*.5,Tc.width=Th,Tc.height=t0,d=c.begin(Tc,a),e.updateAndExecuteCommands(d,KD),e.resolveFramebuffers(d);let m=c.readVoxelInfo(Tc);return o.endFrame(),m};function Tut(e,t){let{defaultView:n,context:i,frameState:o,environmentState:r}=e,{viewport:s,pickDepthFramebuffer:a}=n;e.view=n,s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;let c=n.passState;c.viewport=ze.clone(s,c.viewport),e.clearPasses(o.passes),o.passes.pick=!0,o.passes.depth=!0,o.cullingVolume=aj(e,t,1,1,s),o.tilesetPassState=zD,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,c=a.update(i,t,s),e.updateAndExecuteCommands(c,KD),e.resolveFramebuffers(c),i.endFrame()}var Cut=new Ti,Vut=new rl,Zut=new sn,Lut=new Vr;pa.prototype.pickPositionWorldCoordinates=function(e,t,n){if(!e.useDepthPicking)return;let i=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(i))return h.clone(this._pickPositionCache[i],n);let{context:o,frameState:r,camera:s,defaultView:a}=e,{uniformState:c}=o;e.view=a;let d=ki.transformWindowToDrawingBuffer(e,t,cj);e.pickTranslucentDepth?Tut(e,d):(e.updateFrameState(),c.update(r),e.updateEnvironment()),d.y=e.drawingBufferHeight-d.y;let u;l(s.frustum.fov)?u=s.frustum.clone(Cut):l(s.frustum.infiniteProjectionMatrix)?u=s.frustum.clone(Vut):l(s.frustum.width)?u=s.frustum.clone(Zut):u=s.frustum.clone(Lut);let m=a.frustumCommandsList,p=m.length;for(let g=0;g<p;++g){let x=this.getPickDepth(e,g).getDepth(o,d.x,d.y);if(l(x)&&x>0&&x<1){let _=m[g],C;return e.mode===oe.SCENE2D?(C=s.position.z,s.position.z=C-_.near+1,u.far=Math.max(1,_.far-_.near),u.near=1,c.update(r),c.updateFrustum(u)):(u.near=_.near*(g!==0?e.opaqueFrustumNearOffset:1),u.far=_.far,c.updateFrustum(u)),n=ki.drawingBufferToWorldCoordinates(e,d,x,n),e.mode===oe.SCENE2D&&(s.position.z=C,c.update(r)),this._pickPositionCache[i]=h.clone(n),n}}this._pickPositionCache[i]=void 0};var Rut=new he;pa.prototype.pickPosition=function(e,t,n){if(n=this.pickPositionWorldCoordinates(e,t,n),l(n)&&e.mode!==oe.SCENE3D){h.fromElements(n.y,n.z,n.x,n);let i=e.mapProjection,o=i.ellipsoid,r=i.unproject(n,Rut);o.cartographicToCartesian(r,n)}return n};function Dye(e,t){let n,i,o=[],r=[],s=[],a=[];l(e)||(e=Number.MAX_VALUE);let c=t();for(;l(c);){let d=c.object,u=c.position,m=c.exclude;if(l(u)&&!l(d)){o.push(c);break}if(!l(d)||!l(d.primitive)||!m&&(o.push(c),0>=--e))break;let p=d.primitive,g=!1;typeof p.getGeometryInstanceAttributes=="function"&&l(d.id)&&(i=p.getGeometryInstanceAttributes(d.id),l(i)&&l(i.show)&&(g=!0,i.show=yn.toValue(!1,i.show),s.push(i))),d instanceof Ps&&(g=!0,d.show=!1,a.push(d)),g||(p.show=!1,r.push(p)),c=t()}for(n=0;n<r.length;++n)r[n].show=!0;for(n=0;n<s.length;++n)i=s[n],i.show=yn.toValue(!0,i.show);for(n=0;n<a.length;++n)a[n].show=!0;return o}pa.prototype.drillPick=function(e,t,n,i,o){let r=this;return Dye(n,function(){let c=r.pick(e,t,i,o);if(l(c))return{object:c,position:void 0,exclude:!1}}).map(function(c){return c.object})};var Uye=new h,Gut=new h;function Eut(e,t,n){this.ray=e,this.width=t,this.tilesets=n,this.ready=!1;let i=this;this.promise=new Promise(o=>{i._completePick=()=>{o()}})}function Bye(e,t,n,i){let o=t.direction,r=h.mostOrthogonalAxis(o,Uye),s=h.cross(o,r,Uye),a=h.cross(o,s,Gut);return i.position=t.origin,i.direction=o,i.up=a,i.right=s,i.frustum.width=y(n,kye),i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC)}function Wut(e,t,n){let i=t.frameState,{ray:o,width:r,tilesets:s}=n,a=e._pickOffscreenView.camera,c=Bye(e,o,r,a),d=mut;d.camera=a,d.cullingVolume=c;let u=!0,m=s.length;for(let p=0;p<m;++p){let g=s[p];g.show&&t.primitives.contains(g)&&(g.updateForPass(i,d),u=u&&d.ready)}return u&&n._completePick(),u}pa.prototype.updateMostDetailedRayPicks=function(e){let t=this._mostDetailedRayPicks;for(let n=0;n<t.length;++n)Wut(this,e,t[n])&&t.splice(n--,1)};function Yye(e,t,n){for(let i=0;i<e.length;++i){let o=e.get(i);o.show&&(l(o.isCesium3DTileset)?(!l(t)||t.indexOf(o)===-1)&&n.push(o):o instanceof Ml&&Yye(o,t,n))}}function HD(e,t,n,i,o,r){let s=[];if(Yye(t.primitives,i,s),s.length===0)return Promise.resolve(r());let a=new Eut(n,o,s);return e._mostDetailedRayPicks.push(a),a.promise.then(function(){return r()})}function Iut(e,t){return!l(e)||!l(t)||t.length===0?!1:t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1}function Xut(e,t,n,i,o,r,s){let{context:a,frameState:c}=t,d=a.uniformState,u=e._pickOffscreenView;t.view=u,Bye(e,n,o,u.camera),Tc=ze.clone(u.viewport,Tc);let m=u.pickFramebuffer.begin(Tc,u.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),c.invertClassification=!1,c.passes.pick=!0,c.passes.offscreen=!0,s?c.tilesetPassState=hut:c.tilesetPassState=zD,d.update(c),t.updateEnvironment(),t.updateAndExecuteCommands(m,KD),t.resolveFramebuffers(m);let p,g=u.pickFramebuffer.end(Tc);if(t.context.depthTexture){let f=u.frustumCommandsList.length;for(let x=0;x<f;++x){let C=e.getPickDepth(t,x).getDepth(a,0,0);if(l(C)&&C>0&&C<1){let V=u.frustumCommandsList[x],Z=V.near*(x!==0?t.opaqueFrustumNearOffset:1),R=V.far,G=Z+C*(R-Z);p=pn.getPoint(n,G);break}}}if(t.view=t.defaultView,a.endFrame(),l(g)||l(p))return{object:g,position:p,exclude:!l(p)&&r||Iut(g,i)}}function Oye(e,t,n,i,o,r,s,a){return Dye(i,function(){return Xut(e,t,n,o,r,s,a)})}function OV(e,t,n,i,o,r,s){let a=Oye(e,t,n,1,i,o,r,s);if(a.length>0)return a[0]}function zye(e,t,n,i,o,r,s,a){return Oye(e,t,n,i,o,r,s,a)}function JD(e,t){return new Promise((n,i)=>{t.then(function(o){let r=e.postRender.addEventListener(function(){r(),n(o)});e.requestRender()}).catch(function(o){i(o)})})}pa.prototype.pickFromRay=function(e,t,n,i){return OV(this,e,t,n,i,!1,!1)};pa.prototype.drillPickFromRay=function(e,t,n,i,o){return zye(this,e,t,n,i,o,!1,!1)};pa.prototype.pickFromRayMostDetailed=function(e,t,n,i){let o=this;return t=pn.clone(t),n=l(n)?n.slice():n,JD(e,HD(o,e,t,n,i,function(){return OV(o,e,t,n,i,!1,!0)}))};pa.prototype.drillPickFromRayMostDetailed=function(e,t,n,i,o){let r=this;return t=pn.clone(t),i=l(i)?i.slice():i,JD(e,HD(r,e,t,i,o,function(){return zye(r,e,t,n,i,o,!1,!0)}))};var Put=new h,vut=new h,wut=new pn,Kye=new he;function lj(e,t){let n=e.ellipsoid,i=ci._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,vut),r=he.toCartesian(t,n,Put),s=wut;s.origin=r,s.direction=o;let a=new pn;return pn.getPoint(s,i,a.origin),h.negate(o,a.direction),a}function Hye(e,t){let n=e.ellipsoid,i=he.fromCartesian(t,n,Kye);return lj(e,i)}function Jye(e,t){let n=e.ellipsoid;return he.fromCartesian(t,n,Kye).height}function Fut(e,t,n,i,o){let r=lj(t,n);return HD(e,t,r,i,o,function(){let s=OV(e,t,r,i,o,!0,!0);if(l(s))return Jye(t,s.position)})}function Aut(e,t,n,i,o,r){let s=Hye(t,n);return HD(e,t,s,i,o,function(){let a=OV(e,t,s,i,o,!0,!0);if(l(a))return h.clone(a.position,r)})}pa.prototype.sampleHeight=function(e,t,n,i){let o=lj(e,t),r=OV(this,e,o,n,i,!0,!1);if(l(r))return Jye(e,r.position)};pa.prototype.clampToHeight=function(e,t,n,i,o){let r=Hye(e,t),s=OV(this,e,r,n,i,!0,!1);if(l(s))return h.clone(s.position,o)};pa.prototype.sampleHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=Fut(this,e,t[s],n,i);return JD(e,Promise.all(r).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c].height=s[c];return t}))};pa.prototype.clampToHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=Aut(this,e,t[s],n,i,t[s]);return JD(e,Promise.all(r).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c]=s[c];return t}))};pa.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};var _F=pa;var Wwi=S(T(),1);var rwi=S(T(),1);var uPi=S(T(),1),SF=`uniform sampler2D colorTexture; in vec2 v_textureCoordinates; @@ -12815,7 +12912,7 @@ void main() out_FragColor = vec4(color, fragmentColor.a); } -`;var XMi=T(S(),1),FF=`uniform sampler2D randomTexture; +`;var hPi=S(T(),1),TF=`uniform sampler2D randomTexture; uniform sampler2D depthTexture; uniform float intensity; uniform float bias; @@ -12930,7 +13027,7 @@ void main(void) ao = pow(ao, intensity); out_FragColor = vec4(vec3(ao), 1.0); } -`;var WMi=T(S(),1),AF=`uniform sampler2D colorTexture; +`;var pPi=S(T(),1),CF=`uniform sampler2D colorTexture; uniform sampler2D ambientOcclusionTexture; uniform bool ambientOcclusionOnly; in vec2 v_textureCoordinates; @@ -12941,7 +13038,7 @@ void main(void) vec4 ao = texture(ambientOcclusionTexture, v_textureCoordinates); out_FragColor = ambientOcclusionOnly ? ao : ao * color; } -`;var vMi=T(S(),1),MF=`uniform sampler2D colorTexture; +`;var gPi=S(T(),1),VF=`uniform sampler2D colorTexture; uniform float gradations; in vec2 v_textureCoordinates; @@ -12960,7 +13057,7 @@ void main(void) darkness = (darkness - fract(darkness)) / gradations; out_FragColor = vec4(vec3(darkness), 1.0); } -`;var FMi=T(S(),1),NF=`uniform sampler2D colorTexture; +`;var xPi=S(T(),1),ZF=`uniform sampler2D colorTexture; uniform sampler2D bloomTexture; uniform bool glowOnly; @@ -12980,7 +13077,7 @@ void main(void) vec4 bloom = texture(bloomTexture, v_textureCoordinates); out_FragColor = glowOnly ? bloom : bloom + color; } -`;var MMi=T(S(),1),kF=`uniform sampler2D colorTexture; +`;var SPi=S(T(),1),LF=`uniform sampler2D colorTexture; uniform float brightness; in vec2 v_textureCoordinates; @@ -12991,7 +13088,7 @@ void main(void) vec3 target = vec3(0.0); out_FragColor = vec4(mix(target, rgb, brightness), 1.0); } -`;var kMi=T(S(),1),UF=`uniform sampler2D colorTexture; +`;var CPi=S(T(),1),RF=`uniform sampler2D colorTexture; uniform float contrast; uniform float brightness; @@ -13008,7 +13105,7 @@ void main(void) sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5); out_FragColor = vec4(sceneColor, 1.0); } -`;var DMi=T(S(),1),DF=`uniform sampler2D colorTexture; +`;var ZPi=S(T(),1),GF=`uniform sampler2D colorTexture; uniform sampler2D blurTexture; uniform sampler2D depthTexture; uniform float focalDistance; @@ -13047,7 +13144,7 @@ void main(void) float d = computeDepthBlur(-posInCamera.z); out_FragColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), d); } -`;var YMi=T(S(),1),BF=`uniform sampler2D depthTexture; +`;var RPi=S(T(),1),EF=`uniform sampler2D depthTexture; in vec2 v_textureCoordinates; @@ -13056,7 +13153,7 @@ void main(void) float depth = czm_readDepth(depthTexture, v_textureCoordinates); out_FragColor = vec4(vec3(depth), 1.0); } -`;var HMi=T(S(),1),YF=`uniform sampler2D depthTexture; +`;var EPi=S(T(),1),WF=`uniform sampler2D depthTexture; uniform float length; uniform vec4 color; @@ -13116,7 +13213,7 @@ void main(void) float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge); out_FragColor = vec4(color.rgb, len > length ? color.a : 0.0); } -`;var KMi=T(S(),1),OF=`uniform sampler2D colorTexture; +`;var IPi=S(T(),1),IF=`uniform sampler2D colorTexture; in vec2 v_textureCoordinates; @@ -13152,7 +13249,7 @@ void main() c = czm_inverseGamma(c / w); out_FragColor = vec4(c, fragmentColor.a); } -`;var QMi=T(S(),1),HF=`in vec2 v_textureCoordinates; +`;var PPi=S(T(),1),XF=`in vec2 v_textureCoordinates; uniform sampler2D colorTexture; @@ -13173,7 +13270,7 @@ void main() float alpha = texture(colorTexture, v_textureCoordinates).a; out_FragColor = vec4(color.rgb, alpha); } -`;var qMi=T(S(),1),Gy=`#define SAMPLES 8 +`;var wPi=S(T(),1),yy=`#define SAMPLES 8 uniform float delta; uniform float sigma; @@ -13220,7 +13317,7 @@ void main() out_FragColor = result; } -`;var eNi=T(S(),1),zF=`uniform sampler2D colorTexture; +`;var APi=S(T(),1),PF=`uniform sampler2D colorTexture; uniform sampler2D dirtTexture; uniform sampler2D starTexture; uniform vec2 dirtTextureDimensions; @@ -13373,7 +13470,7 @@ void main(void) out_FragColor = result; } -`;var nNi=T(S(),1),KF=`uniform sampler2D colorTexture; +`;var NPi=S(T(),1),vF=`uniform sampler2D colorTexture; uniform vec3 white; in vec2 v_textureCoordinates; @@ -13397,7 +13494,7 @@ void main() color = czm_inverseGamma(color); out_FragColor = vec4(color, fragmentColor.a); } -`;var oNi=T(S(),1),JF=`uniform sampler2D colorTexture; +`;var kPi=S(T(),1),wF=`uniform sampler2D colorTexture; in vec2 v_textureCoordinates; @@ -13413,7 +13510,7 @@ void main(void) vec3 green = vec3(0.0, 1.0, 0.0); out_FragColor = vec4((noiseValue + rgb) * green, 1.0); } -`;var sNi=T(S(),1),QF=`uniform sampler2D colorTexture; +`;var BPi=S(T(),1),FF=`uniform sampler2D colorTexture; in vec2 v_textureCoordinates; @@ -13436,7 +13533,7 @@ void main() color = czm_inverseGamma(color); out_FragColor = vec4(color, fragmentColor.a); } -`;var cNi=T(S(),1),jF=`uniform sampler2D colorTexture; +`;var OPi=S(T(),1),AF=`uniform sampler2D colorTexture; uniform sampler2D silhouetteTexture; in vec2 v_textureCoordinates; @@ -13447,7 +13544,7 @@ void main(void) vec4 color = texture(colorTexture, v_textureCoordinates); out_FragColor = mix(color, silhouetteColor, silhouetteColor.a); } -`;var gNi=T(S(),1);function UT(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=new ui,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new D,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}Object.defineProperties(UT.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){let e=this._framebuffers;if(l(e))return e[e.length-1].getColorTexture(0)}}});function Fxe(e){let t=e._framebuffers;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}function Ght(e,t){Fxe(e);let n=e._width,i=e._height,o=t.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT,r=Math.ceil(Math.log(Math.max(n,i))/Math.log(3)),s=new Array(r);for(let c=0;c<r;++c)n=Math.max(Math.ceil(n/3),1),i=Math.max(Math.ceil(i/3),1),s[c]=new ui,s[c].update(t,n,i,1,o);let a=s[r-1].getColorTexture(0);e._previousLuminance.update(t,a.width,a.height,1,o),e._framebuffers=s}function Axe(e){let t=e._commands;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].shaderProgram.destroy();e._commands=void 0}function Eht(e,t){let n;if(t===0)n={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{let i=e._framebuffers[t-1].getColorTexture(0);n={colorTexture:function(){return i},colorTextureDimensions:function(){return i.dimensions}}}return n.minMaxLuminance=function(){return e._minMaxLuminance},n.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},n}function Xht(e,t){let n=`uniform sampler2D colorTexture; +`;var evi=S(T(),1);function ES(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=new ui,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new D,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}Object.defineProperties(ES.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){let e=this._framebuffers;if(l(e))return e[e.length-1].getColorTexture(0)}}});function Qye(e){let t=e._framebuffers;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}function Mut(e,t){Qye(e);let n=e._width,i=e._height,o=t.halfFloatingPointTexture?Ke.HALF_FLOAT:Ke.FLOAT,r=Math.ceil(Math.log(Math.max(n,i))/Math.log(3)),s=new Array(r);for(let c=0;c<r;++c)n=Math.max(Math.ceil(n/3),1),i=Math.max(Math.ceil(i/3),1),s[c]=new ui,s[c].update(t,n,i,1,o);let a=s[r-1].getColorTexture(0);e._previousLuminance.update(t,a.width,a.height,1,o),e._framebuffers=s}function jye(e){let t=e._commands;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].shaderProgram.destroy();e._commands=void 0}function Nut(e,t){let n;if(t===0)n={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{let i=e._framebuffers[t-1].getColorTexture(0);n={colorTexture:function(){return i},colorTextureDimensions:function(){return i.dimensions}}}return n.minMaxLuminance=function(){return e._minMaxLuminance},n.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},n}function Uut(e,t){let n=`uniform sampler2D colorTexture; in vec2 v_textureCoordinates; float sampleTexture(vec2 offset) { `;return e===0?n+=` vec4 color = texture(colorTexture, v_textureCoordinates + offset); @@ -13484,7 +13581,7 @@ void main() { color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); `),n+=` out_FragColor = vec4(color); } -`,n}function Iht(e,t){Axe(e);let n=e._framebuffers,i=n.length,o=new Array(i);for(let r=0;r<i;++r)o[r]=t.createViewportQuadCommand(Xht(r,i),{framebuffer:n[r].framebuffer,uniformMap:Eht(e,r)});e._commands=o}UT.prototype.clear=function(e){let t=this._framebuffers;if(!l(t))return;let n=this._clearCommand;l(n)||(n=this._clearCommand=new ii({color:new Y(0,0,0,0),framebuffer:void 0}));let i=t.length;for(let o=0;o<i;++o)t[o].clear(e,n)};UT.prototype.update=function(e){let t=e.drawingBufferWidth,n=e.drawingBufferHeight;(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,Ght(this,e),Iht(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;let i=this._framebuffers,o=i[i.length-1];i[i.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance.framebuffer,this._previousLuminance=o};UT.prototype.execute=function(e,t){this._colorTexture=t;let n=this._commands;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o)n[o].execute(e)};UT.prototype.isDestroyed=function(){return!1};UT.prototype.destroy=function(){return Fxe(this),Axe(this),me(this)};var qF=UT;var kNi=T(S(),1);var xNi=T(S(),1),Wht={NEAREST:0,LINEAR:1},Kd=Wht;function DT(e){e=y(e,y.EMPTY_OBJECT);let t=e.fragmentShader,n=y(e.textureScale,1),i=y(e.pixelFormat,at.RGBA);this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=n,this._forcePowerOfTwo=y(e.forcePowerOfTwo,!1),this._sampleMode=y(e.sampleMode,Kd.NEAREST),this._pixelFormat=i,this._pixelDatatype=y(e.pixelDatatype,ze.UNSIGNED_BYTE),this._clearColor=y(e.clearColor,Y.BLACK),this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0;let o=new pc;o.scissorTest={enabled:!0,rectangle:l(e.scissorRectangle)?He.clone(e.scissorRectangle):new He},this._passState=o,this._ready=!1;let r=e.name;l(r)||(r=Bn()),this._name=r,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(DT.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(l(this._textureCache)){let e=this._textureCache.getFramebuffer(this._name);if(l(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var Pht=/uniform\s+sampler2D\s+depthTexture/g;DT.prototype._isSupported=function(e){return!Pht.test(this._fragmentShader)||e.depthTexture};function vht(e,t,n){let i=t[n];return(typeof i=="string"||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof HTMLVideoElement||i instanceof ImageData)&&e._dirtyUniforms.push(n),{get:function(){return t[n]},set:function(o){let r=t[n];t[n]=o;let s=e._actualUniforms,a=s[n];l(a)&&a!==r&&a instanceof Et&&!l(e._textureCache.getStageByName(n))&&(e._texturesToRelease.push(a),delete s[n],delete s[`${n}Dimensions`]),r instanceof Et&&e._texturesToRelease.push(r),typeof o=="string"||o instanceof HTMLCanvasElement||o instanceof HTMLImageElement||o instanceof HTMLVideoElement||o instanceof ImageData?e._dirtyUniforms.push(n):s[n]=o}}}function wht(e,t){return function(){let n=e._actualUniforms[t];return typeof n=="function"?n():n}}function Fht(e,t){return function(){let n=e[t]();if(l(n))return n.dimensions}}function Aht(e){if(l(e._uniformMap))return;let t={},n={},i=e._uniforms,o=e._actualUniforms;for(let r in i)if(i.hasOwnProperty(r)){typeof i[r]!="function"?(t[r]=wht(e,r),n[r]=vht(e,i,r)):(t[r]=i[r],n[r]=i[r]),o[r]=i[r];let s=t[r]();(typeof s=="string"||s instanceof Et||s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement)&&(t[`${r}Dimensions`]=Fht(t,r))}e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=xt(t,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width}})}function Mht(e,t){if(l(e._command)&&!e._logDepthChanged&&!e._selectedDirty)return;let n=e._fragmentShader;if(l(e._selectedIdTexture)){let o=e._selectedIdTexture.width;n=n.replace(/in\s+vec2\s+v_textureCoordinates;/g,""),n=`#define CZM_SELECTED_FEATURE +`,n}function kut(e,t){jye(e);let n=e._framebuffers,i=n.length,o=new Array(i);for(let r=0;r<i;++r)o[r]=t.createViewportQuadCommand(Uut(r,i),{framebuffer:n[r].framebuffer,uniformMap:Nut(e,r)});e._commands=o}ES.prototype.clear=function(e){let t=this._framebuffers;if(!l(t))return;let n=this._clearCommand;l(n)||(n=this._clearCommand=new ii({color:new Y(0,0,0,0),framebuffer:void 0}));let i=t.length;for(let o=0;o<i;++o)t[o].clear(e,n)};ES.prototype.update=function(e){let t=e.drawingBufferWidth,n=e.drawingBufferHeight;(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,Mut(this,e),kut(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;let i=this._framebuffers,o=i[i.length-1];i[i.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance.framebuffer,this._previousLuminance=o};ES.prototype.execute=function(e,t){this._colorTexture=t;let n=this._commands;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o)n[o].execute(e)};ES.prototype.isDestroyed=function(){return!1};ES.prototype.destroy=function(){return Qye(this),jye(this),me(this)};var MF=ES;var Cvi=S(T(),1);var nvi=S(T(),1),Dut={NEAREST:0,LINEAR:1},Bd=Dut;function WS(e){e=y(e,y.EMPTY_OBJECT);let t=e.fragmentShader,n=y(e.textureScale,1),i=y(e.pixelFormat,at.RGBA);this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=n,this._forcePowerOfTwo=y(e.forcePowerOfTwo,!1),this._sampleMode=y(e.sampleMode,Bd.NEAREST),this._pixelFormat=i,this._pixelDatatype=y(e.pixelDatatype,Ke.UNSIGNED_BYTE),this._clearColor=y(e.clearColor,Y.BLACK),this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0;let o=new xc;o.scissorTest={enabled:!0,rectangle:l(e.scissorRectangle)?ze.clone(e.scissorRectangle):new ze},this._passState=o,this._ready=!1;let r=e.name;l(r)||(r=Bn()),this._name=r,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(WS.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(l(this._textureCache)){let e=this._textureCache.getFramebuffer(this._name);if(l(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var But=/uniform\s+sampler2D\s+depthTexture/g;WS.prototype._isSupported=function(e){return!But.test(this._fragmentShader)||e.depthTexture};function Yut(e,t,n){let i=t[n];return(typeof i=="string"||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof HTMLVideoElement||i instanceof ImageData)&&e._dirtyUniforms.push(n),{get:function(){return t[n]},set:function(o){let r=t[n];t[n]=o;let s=e._actualUniforms,a=s[n];l(a)&&a!==r&&a instanceof Et&&!l(e._textureCache.getStageByName(n))&&(e._texturesToRelease.push(a),delete s[n],delete s[`${n}Dimensions`]),r instanceof Et&&e._texturesToRelease.push(r),typeof o=="string"||o instanceof HTMLCanvasElement||o instanceof HTMLImageElement||o instanceof HTMLVideoElement||o instanceof ImageData?e._dirtyUniforms.push(n):s[n]=o}}}function Out(e,t){return function(){let n=e._actualUniforms[t];return typeof n=="function"?n():n}}function zut(e,t){return function(){let n=e[t]();if(l(n))return n.dimensions}}function Kut(e){if(l(e._uniformMap))return;let t={},n={},i=e._uniforms,o=e._actualUniforms;for(let r in i)if(i.hasOwnProperty(r)){typeof i[r]!="function"?(t[r]=Out(e,r),n[r]=Yut(e,i,r)):(t[r]=i[r],n[r]=i[r]),o[r]=i[r];let s=t[r]();(typeof s=="string"||s instanceof Et||s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement)&&(t[`${r}Dimensions`]=zut(t,r))}e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=xt(t,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width}})}function Hut(e,t){if(l(e._command)&&!e._logDepthChanged&&!e._selectedDirty)return;let n=e._fragmentShader;if(l(e._selectedIdTexture)){let o=e._selectedIdTexture.width;n=n.replace(/in\s+vec2\s+v_textureCoordinates;/g,""),n=`#define CZM_SELECTED_FEATURE uniform sampler2D czm_idTexture; uniform sampler2D czm_selectedIdTexture; uniform float czm_selectedIdTextureStep; @@ -13509,8 +13606,8 @@ bool czm_selected() return czm_selected(vec2(0.0)); } -${n}`}let i=new Ye({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[n]});e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e})}function Nht(e){let t=e._sampleMode,n,i;t===Kd.LINEAR?(n=on.LINEAR,i=di.LINEAR):(n=on.NEAREST,i=di.NEAREST);let o=e._sampler;(!l(o)||o.minificationFilter!==n||o.magnificationFilter!==i)&&(e._sampler=new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i}))}function kht(e,t){return function(n){e._texturesToCreate.push({name:t,source:n})}}function Uht(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function Dht(e,t){let n,i,o,r=e._texturesToRelease,s=r.length;for(n=0;n<s;++n)i=r[n],i=i&&i.destroy();r.length=0;let a=e._texturesToCreate;for(s=a.length,n=0;n<s;++n){let m=a[n];o=m.name;let p=m.source;e._actualUniforms[o]=new Et({context:t,source:p})}a.length=0;let c=e._dirtyUniforms;if(c.length===0&&!l(e._texturePromise)){e._ready=!0;return}if(c.length===0||l(e._texturePromise))return;s=c.length;let d=e._uniforms,u=[];for(n=0;n<s;++n){o=c[n];let m=d[o],p=e._textureCache.getStageByName(m);if(l(p))e._actualUniforms[o]=Uht(e,m);else if(typeof m=="string"){let g=new Ee({url:m});u.push(g.fetchImage().then(kht(e,o)))}else e._texturesToCreate.push({name:o,source:m})}c.length=0,u.length>0?(e._ready=!1,e._texturePromise=Promise.all(u).then(function(){e._ready=!0,e._texturePromise=void 0})):e._ready=!0}function Mxe(e){l(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();let t=e._textureCache;if(!l(t))return;let n=e._uniforms,i=e._actualUniforms;for(let o in i)i.hasOwnProperty(o)&&i[o]instanceof Et&&(l(t.getStageByName(n[o]))||i[o].destroy(),e._dirtyUniforms.push(o))}function Bht(e){let t=l(e._selected)?e._selected.length:0,n=l(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,l(e._selected)&&l(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):l(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&l(e._combinedSelected)){if(!l(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(let o=0;o<t;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}function Yht(e,t){if(!e._selectedDirty)return;e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;let n=e._combinedSelected;if(!l(n))return;let i,o,r=0,s=n.length;for(i=0;i<s;++i)o=n[i],l(o.pickIds)?r+=o.pickIds.length:l(o.pickId)&&++r;if(s===0||r===0){let u=new Uint8Array(4);u[0]=255,u[1]=255,u[2]=255,u[3]=255,e._selectedIdTexture=new Et({context:t,pixelFormat:at.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,source:{arrayBufferView:u,width:1,height:1},sampler:rn.NEAREST});return}let a,c=0,d=new Uint8Array(r*4);for(i=0;i<s;++i)if(o=n[i],l(o.pickIds)){let u=o.pickIds,m=u.length;for(let p=0;p<m;++p)a=u[p].color,d[c]=Y.floatToByte(a.red),d[c+1]=Y.floatToByte(a.green),d[c+2]=Y.floatToByte(a.blue),d[c+3]=Y.floatToByte(a.alpha),c+=4}else l(o.pickId)&&(a=o.pickId.color,d[c]=Y.floatToByte(a.red),d[c+1]=Y.floatToByte(a.green),d[c+2]=Y.floatToByte(a.blue),d[c+3]=Y.floatToByte(a.alpha),c+=4);e._selectedIdTexture=new Et({context:t,pixelFormat:at.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,source:{arrayBufferView:d,width:r,height:1},sampler:rn.NEAREST})}DT.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&Mxe(this),this._enabled=this.enabled,!this._enabled||(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=Bht(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=l(this._selected)?this._selected.length:0,this._parentSelectedLength=l(this._parentSelected)?this._parentSelected.length:0,Yht(this,e),Aht(this),Dht(this,e),Mht(this,e),Nht(this),this._selectedDirty=!1,!this._ready))return;let n=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=n,!l(n))return;let i=n.getColorTexture(0),o;(i.width!==e.drawingBufferWidth||i.height!==e.drawingBufferHeight)&&(o=this._renderState,(!l(o)||i.width!==o.viewport.width||i.height!==o.viewport.height)&&(this._renderState=De.fromCache({viewport:new He(0,0,i.width,i.height)}))),this._command.renderState=o};DT.prototype.execute=function(e,t,n,i){if(!l(this._command)||!l(this._command.framebuffer)||!this._ready||!this._enabled)return;this._colorTexture=t,this._depthTexture=n,this._idTexture=i,rn.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler);let o=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;l(o)&&(o.context=e),this._command.execute(e,o)};DT.prototype.isDestroyed=function(){return!1};DT.prototype.destroy=function(){return Mxe(this),me(this)};var fo=DT;var HNi=T(S(),1);function BT(e){e=y(e,y.EMPTY_OBJECT),this._stages=e.stages,this._inputPreviousStageTexture=y(e.inputPreviousStageTexture,!0);let t=e.name;l(t)||(t=Bn()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}Object.defineProperties(BT.prototype,{ready:{get:function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)if(!e[n].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)t[i].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});BT.prototype._isSupported=function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)if(!t[i]._isSupported(e))return!1;return!0};BT.prototype.get=function(e){return this._stages[e]};function Oht(e){let t=l(e._selected)?e._selected.length:0,n=l(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,l(e._selected)&&l(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):l(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&l(e._combinedSelected)){if(!l(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(let o=0;o<t;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}BT.prototype.update=function(e,t){this._selectedDirty=Oht(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=l(this._selected)?this._selected.length:0,this._parentSelectedLength=l(this._parentSelected)?this._parentSelected.length:0;let n=this._stages,i=n.length;for(let o=0;o<i;++o){let r=n[o];this._selectedDirty&&(r.parentSelected=this._combinedSelected),r.update(e,t)}};BT.prototype.isDestroyed=function(){return!1};BT.prototype.destroy=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return me(this)};var al=BT;var Mr={};function c3(e){let o=`#define USE_STEP_SIZE -${Gy}`,r=new fo({name:`${e}_x_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:Kd.LINEAR}),s=new fo({name:`${e}_y_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:Kd.LINEAR}),a={};return Object.defineProperties(a,{delta:{get:function(){return r.uniforms.delta},set:function(c){let d=r.uniforms,u=s.uniforms;d.delta=u.delta=c}},sigma:{get:function(){return r.uniforms.sigma},set:function(c){let d=r.uniforms,u=s.uniforms;d.sigma=u.sigma=c}},stepSize:{get:function(){return r.uniforms.stepSize},set:function(c){let d=r.uniforms,u=s.uniforms;d.stepSize=u.stepSize=c}}}),new al({name:e,stages:[r,s],uniforms:a})}Mr.createBlurStage=function(){return c3("czm_blur")};Mr.createDepthOfFieldStage=function(){let e=c3("czm_depth_of_field_blur"),t=new fo({name:"czm_depth_of_field_composite",fragmentShader:DF,uniforms:{focalDistance:5,blurTexture:e.name}}),n={};return Object.defineProperties(n,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(i){t.uniforms.focalDistance=i}},delta:{get:function(){return e.uniforms.delta},set:function(i){e.uniforms.delta=i}},sigma:{get:function(){return e.uniforms.sigma},set:function(i){e.uniforms.sigma=i}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(i){e.uniforms.stepSize=i}}}),new al({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};Mr.isDepthOfFieldSupported=function(e){return e.context.depthTexture};Mr.createEdgeDetectionStage=function(){let e=Bn();return new fo({name:`czm_edge_detection_${e}`,fragmentShader:YF,uniforms:{length:.25,color:Y.clone(Y.BLACK)}})};Mr.isEdgeDetectionSupported=function(e){return e.context.depthTexture};function Hht(e){if(!l(e))return Mr.createEdgeDetectionStage();let t=new al({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),n={},i="",o="";for(let a=0;a<e.length;++a)i+=`uniform sampler2D edgeTexture${a}; +${n}`}let i=new Ye({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[n]});e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e})}function Jut(e){let t=e._sampleMode,n,i;t===Bd.LINEAR?(n=on.LINEAR,i=di.LINEAR):(n=on.NEAREST,i=di.NEAREST);let o=e._sampler;(!l(o)||o.minificationFilter!==n||o.magnificationFilter!==i)&&(e._sampler=new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i}))}function Qut(e,t){return function(n){e._texturesToCreate.push({name:t,source:n})}}function jut(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function qut(e,t){let n,i,o,r=e._texturesToRelease,s=r.length;for(n=0;n<s;++n)i=r[n],i=i&&i.destroy();r.length=0;let a=e._texturesToCreate;for(s=a.length,n=0;n<s;++n){let m=a[n];o=m.name;let p=m.source;e._actualUniforms[o]=new Et({context:t,source:p})}a.length=0;let c=e._dirtyUniforms;if(c.length===0&&!l(e._texturePromise)){e._ready=!0;return}if(c.length===0||l(e._texturePromise))return;s=c.length;let d=e._uniforms,u=[];for(n=0;n<s;++n){o=c[n];let m=d[o],p=e._textureCache.getStageByName(m);if(l(p))e._actualUniforms[o]=jut(e,m);else if(typeof m=="string"){let g=new Ee({url:m});u.push(g.fetchImage().then(Qut(e,o)))}else e._texturesToCreate.push({name:o,source:m})}c.length=0,u.length>0?(e._ready=!1,e._texturePromise=Promise.all(u).then(function(){e._ready=!0,e._texturePromise=void 0})):e._ready=!0}function qye(e){l(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();let t=e._textureCache;if(!l(t))return;let n=e._uniforms,i=e._actualUniforms;for(let o in i)i.hasOwnProperty(o)&&i[o]instanceof Et&&(l(t.getStageByName(n[o]))||i[o].destroy(),e._dirtyUniforms.push(o))}function $ut(e){let t=l(e._selected)?e._selected.length:0,n=l(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,l(e._selected)&&l(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):l(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&l(e._combinedSelected)){if(!l(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(let o=0;o<t;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}function emt(e,t){if(!e._selectedDirty)return;e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;let n=e._combinedSelected;if(!l(n))return;let i,o,r=0,s=n.length;for(i=0;i<s;++i)o=n[i],l(o.pickIds)?r+=o.pickIds.length:l(o.pickId)&&++r;if(s===0||r===0){let u=new Uint8Array(4);u[0]=255,u[1]=255,u[2]=255,u[3]=255,e._selectedIdTexture=new Et({context:t,pixelFormat:at.RGBA,pixelDatatype:Ke.UNSIGNED_BYTE,source:{arrayBufferView:u,width:1,height:1},sampler:rn.NEAREST});return}let a,c=0,d=new Uint8Array(r*4);for(i=0;i<s;++i)if(o=n[i],l(o.pickIds)){let u=o.pickIds,m=u.length;for(let p=0;p<m;++p)a=u[p].color,d[c]=Y.floatToByte(a.red),d[c+1]=Y.floatToByte(a.green),d[c+2]=Y.floatToByte(a.blue),d[c+3]=Y.floatToByte(a.alpha),c+=4}else l(o.pickId)&&(a=o.pickId.color,d[c]=Y.floatToByte(a.red),d[c+1]=Y.floatToByte(a.green),d[c+2]=Y.floatToByte(a.blue),d[c+3]=Y.floatToByte(a.alpha),c+=4);e._selectedIdTexture=new Et({context:t,pixelFormat:at.RGBA,pixelDatatype:Ke.UNSIGNED_BYTE,source:{arrayBufferView:d,width:r,height:1},sampler:rn.NEAREST})}WS.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&qye(this),this._enabled=this.enabled,!this._enabled||(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=$ut(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=l(this._selected)?this._selected.length:0,this._parentSelectedLength=l(this._parentSelected)?this._parentSelected.length:0,emt(this,e),Kut(this),qut(this,e),Hut(this,e),Jut(this),this._selectedDirty=!1,!this._ready))return;let n=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=n,!l(n))return;let i=n.getColorTexture(0),o;(i.width!==e.drawingBufferWidth||i.height!==e.drawingBufferHeight)&&(o=this._renderState,(!l(o)||i.width!==o.viewport.width||i.height!==o.viewport.height)&&(this._renderState=De.fromCache({viewport:new ze(0,0,i.width,i.height)}))),this._command.renderState=o};WS.prototype.execute=function(e,t,n,i){if(!l(this._command)||!l(this._command.framebuffer)||!this._ready||!this._enabled)return;this._colorTexture=t,this._depthTexture=n,this._idTexture=i,rn.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler);let o=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;l(o)&&(o.context=e),this._command.execute(e,o)};WS.prototype.isDestroyed=function(){return!1};WS.prototype.destroy=function(){return qye(this),me(this)};var fo=WS;var Evi=S(T(),1);function IS(e){e=y(e,y.EMPTY_OBJECT),this._stages=e.stages,this._inputPreviousStageTexture=y(e.inputPreviousStageTexture,!0);let t=e.name;l(t)||(t=Bn()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}Object.defineProperties(IS.prototype,{ready:{get:function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)if(!e[n].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)t[i].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});IS.prototype._isSupported=function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)if(!t[i]._isSupported(e))return!1;return!0};IS.prototype.get=function(e){return this._stages[e]};function tmt(e){let t=l(e._selected)?e._selected.length:0,n=l(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,l(e._selected)&&l(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):l(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&l(e._combinedSelected)){if(!l(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(let o=0;o<t;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}IS.prototype.update=function(e,t){this._selectedDirty=tmt(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=l(this._selected)?this._selected.length:0,this._parentSelectedLength=l(this._parentSelected)?this._parentSelected.length:0;let n=this._stages,i=n.length;for(let o=0;o<i;++o){let r=n[o];this._selectedDirty&&(r.parentSelected=this._combinedSelected),r.update(e,t)}};IS.prototype.isDestroyed=function(){return!1};IS.prototype.destroy=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return me(this)};var sl=IS;var Nr={};function QD(e){let o=`#define USE_STEP_SIZE +${yy}`,r=new fo({name:`${e}_x_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:Bd.LINEAR}),s=new fo({name:`${e}_y_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:Bd.LINEAR}),a={};return Object.defineProperties(a,{delta:{get:function(){return r.uniforms.delta},set:function(c){let d=r.uniforms,u=s.uniforms;d.delta=u.delta=c}},sigma:{get:function(){return r.uniforms.sigma},set:function(c){let d=r.uniforms,u=s.uniforms;d.sigma=u.sigma=c}},stepSize:{get:function(){return r.uniforms.stepSize},set:function(c){let d=r.uniforms,u=s.uniforms;d.stepSize=u.stepSize=c}}}),new sl({name:e,stages:[r,s],uniforms:a})}Nr.createBlurStage=function(){return QD("czm_blur")};Nr.createDepthOfFieldStage=function(){let e=QD("czm_depth_of_field_blur"),t=new fo({name:"czm_depth_of_field_composite",fragmentShader:GF,uniforms:{focalDistance:5,blurTexture:e.name}}),n={};return Object.defineProperties(n,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(i){t.uniforms.focalDistance=i}},delta:{get:function(){return e.uniforms.delta},set:function(i){e.uniforms.delta=i}},sigma:{get:function(){return e.uniforms.sigma},set:function(i){e.uniforms.sigma=i}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(i){e.uniforms.stepSize=i}}}),new sl({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};Nr.isDepthOfFieldSupported=function(e){return e.context.depthTexture};Nr.createEdgeDetectionStage=function(){let e=Bn();return new fo({name:`czm_edge_detection_${e}`,fragmentShader:WF,uniforms:{length:.25,color:Y.clone(Y.BLACK)}})};Nr.isEdgeDetectionSupported=function(e){return e.context.depthTexture};function nmt(e){if(!l(e))return Nr.createEdgeDetectionStage();let t=new sl({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),n={},i="",o="";for(let a=0;a<e.length;++a)i+=`uniform sampler2D edgeTexture${a}; `,o+=` vec4 edge${a} = texture(edgeTexture${a}, v_textureCoordinates); if (edge${a}.a > 0.0) { @@ -13525,13 +13622,13 @@ void main() { ${o} } out_FragColor = color; } -`,s=new fo({name:"czm_edge_detection_combine",fragmentShader:r,uniforms:n});return new al({name:"czm_edge_detection_composite",stages:[t,s]})}Mr.createSilhouetteStage=function(e){let t=Hht(e),n=new fo({name:"czm_silhouette_color_edges",fragmentShader:jF,uniforms:{silhouetteTexture:t.name}});return new al({name:"czm_silhouette",stages:[t,n],inputPreviousStageTexture:!1,uniforms:t.uniforms})};Mr.isSilhouetteSupported=function(e){return e.context.depthTexture};Mr.createBloomStage=function(){let e=new fo({name:"czm_bloom_contrast_bias",fragmentShader:UF,uniforms:{contrast:128,brightness:-.3}}),t=c3("czm_bloom_blur"),n=new al({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),i=new fo({name:"czm_bloom_generate_composite",fragmentShader:NF,uniforms:{glowOnly:!1,bloomTexture:n.name}}),o={};return Object.defineProperties(o,{glowOnly:{get:function(){return i.uniforms.glowOnly},set:function(r){i.uniforms.glowOnly=r}},contrast:{get:function(){return e.uniforms.contrast},set:function(r){e.uniforms.contrast=r}},brightness:{get:function(){return e.uniforms.brightness},set:function(r){e.uniforms.brightness=r}},delta:{get:function(){return t.uniforms.delta},set:function(r){t.uniforms.delta=r}},sigma:{get:function(){return t.uniforms.sigma},set:function(r){t.uniforms.sigma=r}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(r){t.uniforms.stepSize=r}}}),new al({name:"czm_bloom",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})};Mr.createAmbientOcclusionStage=function(){let e=new fo({name:"czm_ambient_occlusion_generate",fragmentShader:FF,uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=c3("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;let n=new al({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),i=new fo({name:"czm_ambient_occlusion_composite",fragmentShader:AF,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:n.name}}),o={};return Object.defineProperties(o,{intensity:{get:function(){return e.uniforms.intensity},set:function(r){e.uniforms.intensity=r}},bias:{get:function(){return e.uniforms.bias},set:function(r){e.uniforms.bias=r}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(r){e.uniforms.lengthCap=r}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(r){e.uniforms.stepSize=r}},frustumLength:{get:function(){return e.uniforms.frustumLength},set:function(r){e.uniforms.frustumLength=r}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(r){e.uniforms.randomTexture=r}},delta:{get:function(){return t.uniforms.delta},set:function(r){t.uniforms.delta=r}},sigma:{get:function(){return t.uniforms.sigma},set:function(r){t.uniforms.sigma=r}},blurStepSize:{get:function(){return t.uniforms.stepSize},set:function(r){t.uniforms.stepSize=r}},ambientOcclusionOnly:{get:function(){return i.uniforms.ambientOcclusionOnly},set:function(r){i.uniforms.ambientOcclusionOnly=r}}}),new al({name:"czm_ambient_occlusion",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})};Mr.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var zht=`#define FXAA_QUALITY_PRESET 39 -${yw} -${HF}`;Mr.createFXAAStage=function(){return new fo({name:"czm_FXAA",fragmentShader:zht,sampleMode:Kd.LINEAR})};Mr.createAcesTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE -`:"";return t+=wF,new fo({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0}})};Mr.createFilmicTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE -`:"";return t+=OF,new fo({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0}})};Mr.createReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE -`:"";return t+=QF,new fo({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0}})};Mr.createModifiedReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE -`:"";return t+=KF,new fo({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:Y.WHITE,autoExposure:void 0}})};Mr.createAutoExposureStage=function(){return new qF};Mr.createBlackAndWhiteStage=function(){return new fo({name:"czm_black_and_white",fragmentShader:MF,uniforms:{gradations:5}})};Mr.createBrightnessStage=function(){return new fo({name:"czm_brightness",fragmentShader:kF,uniforms:{brightness:.5}})};Mr.createNightVisionStage=function(){return new fo({name:"czm_night_vision",fragmentShader:JF})};Mr.createDepthViewStage=function(){return new fo({name:"czm_depth_view",fragmentShader:BF})};Mr.createLensFlareStage=function(){return new fo({name:"czm_lens_flare",fragmentShader:zF,uniforms:{dirtTexture:tn("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:tn("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:ie.WGS84.maximumRadius}})};var im=Mr;var X5i=T(S(),1);function sb(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function e9(e){for(;l(e.length);)e=e.get(e.length-1);return e.name}function h8(e,t,n,i,o){if(!i.enabled||!i._isSupported(t))return o;let r=n[i.name]={};if(l(o)){let a=e.getStageByName(o);r[e9(a)]=!0}let s=i.uniforms;if(l(s)){let a=Object.getOwnPropertyNames(s),c=a.length;for(let d=0;d<c;++d){let u=s[a[d]];if(typeof u=="string"){let m=e.getStageByName(u);l(m)&&(r[e9(m)]=!0)}}}return i.name}function $F(e,t,n,i,o){if(l(i.enabled)&&!i.enabled||l(i._isSupported)&&!i._isSupported(t))return o;let r=o,s=!l(i.inputPreviousStageTexture)||i.inputPreviousStageTexture,a=o,c=i.length;for(let m=0;m<c;++m){let p=i.get(m);l(p.length)?a=$F(e,t,n,p,o):a=h8(e,t,n,p,o),s&&(o=a)}let d,u;if(s)for(d=1;d<c;++d)u=e9(i.get(d)),l(n[u])||(n[u]={}),n[u][r]=!0;else for(d=1;d<c;++d){u=e9(i.get(d));let m=n[u];for(let p=0;p<d;++p)m[e9(i.get(p))]=!0}return a}function Kht(e,t){let n={};if(l(e.ambientOcclusion)){let i=e.ambientOcclusion,o=e.bloom,r=e._tonemapping,s=e.fxaa,a=$F(e,t,n,i,void 0);a=$F(e,t,n,o,a),a=h8(e,t,n,r,a),a=$F(e,t,n,e,a),h8(e,t,n,s,a)}else $F(e,t,n,e,void 0);return n}function Jht(e,t,n){let o=e._collection.getStageByName(t),r=o._textureScale,s=o._forcePowerOfTwo,a=o._pixelFormat,c=o._pixelDatatype,d=o._clearColor,u,m,p=e._framebuffers,g=p.length;for(u=0;u<g;++u){if(m=p[u],r!==m.textureScale||s!==m.forcePowerOfTwo||a!==m.pixelFormat||c!==m.pixelDatatype||!Y.equals(d,m.clearColor))continue;let f=m.stages,x=f.length,_=!1;for(let C=0;C<x;++C)if(n[f[C]]){_=!0;break}if(!_)break}return l(m)&&u<g?(m.stages.push(t),m):(m={textureScale:r,forcePowerOfTwo:s,pixelFormat:a,pixelDatatype:c,clearColor:d,stages:[t],buffer:new ui({pixelFormat:a,pixelDatatype:c}),clear:void 0},p.push(m),m)}function Qht(e,t){let n=Kht(e._collection,t);for(let i in n)n.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=Jht(e,i,n[i]))}function f8(e){let t=e._framebuffers,n=t.length;for(let i=0;i<n;++i)t[i].buffer.destroy()}function jht(e,t){let n=e._width,i=e._height,o=e._framebuffers,r=o.length;for(let s=0;s<r;++s){let a=o[s],c=a.textureScale,d=Math.ceil(n*c),u=Math.ceil(i*c),m=Math.min(d,u);a.forcePowerOfTwo&&(W.isPowerOfTwo(m)||(m=W.nextPowerOfTwo(m)),d=m,u=m),a.buffer.update(t,d,u),a.clear=new ii({color:a.clearColor,framebuffer:a.buffer.framebuffer})}}sb.prototype.updateDependencies=function(){this._updateDependencies=!0};sb.prototype.update=function(e){let t=this._collection,n=this._updateDependencies,i=l(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),o=l(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),r=l(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),s=l(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),a=!l(t._activeStages)||t._activeStages.length>0||i||o||r||s;if((n||!a&&this._framebuffers.length>0)&&(f8(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),!n&&!a)return;this._framebuffers.length===0&&Qht(this,e);let c=e.drawingBufferWidth,d=e.drawingBufferHeight,u=this._width!==c||this._height!==d;!n&&!u||(this._width=c,this._height=d,this._updateDependencies=!1,f8(this),jht(this,e))};sb.prototype.clear=function(e){let t=this._framebuffers;for(let n=0;n<t.length;++n)t[n].clear.execute(e)};sb.prototype.getStageByName=function(e){return this._collection.getStageByName(e)};sb.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)};sb.prototype.getFramebuffer=function(e){let t=this._stageNameToFramebuffer[e];if(l(t))return t.buffer.framebuffer};sb.prototype.isDestroyed=function(){return!1};sb.prototype.destroy=function(){return f8(this),me(this)};var YT=sb;var W5i=T(S(),1),t9={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===t9.REINHARD||e===t9.MODIFIED_REINHARD||e===t9.FILMIC||e===t9.ACES}},Ey=Object.freeze(t9);var p8=[];function cl(){let e=im.createFXAAStage(),t=im.createAmbientOcclusionStage(),n=im.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=im.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=Ey.ACES;let i=this._tonemapping;e.enabled=!1,t.enabled=!1,n.enabled=!1,i.enabled=!1;let o=new YT(this),r={},s=p8;for(s.push(e,t,n,i);s.length>0;){let c=s.pop();r[c.name]=c,c._textureCache=o;let d=c.length;if(l(d))for(let u=0;u<d;++u)s.push(c.get(u))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;let a=this;t.uniforms.randomTexture=function(){return a._randomTexture},this._ao=t,this._bloom=n,this._fxaa=e,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._activeStagesChanged=!1,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=r,this._textureCache=o}Object.defineProperties(cl.prototype,{ready:{get:function(){let e=!1,t=this._stages,n=t.length;for(let a=n-1;a>=0;--a){let c=t[a];e=e||c.ready&&c.enabled}let i=this._fxaa,o=this._ao,r=this._bloom,s=this._tonemapping;return e=e||i.ready&&i.enabled,e=e||o.ready&&o.enabled,e=e||r.ready&&r.enabled,e=e||s.ready&&s.enabled,e}},fxaa:{get:function(){return this._fxaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},length:{get:function(){return b8(this),this._stages.length}},outputTexture:{get:function(){let e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);let t=this._stages,n=t.length;for(let s=n-1;s>=0;--s){let a=t[s];if(l(a)&&a.ready&&a.enabled)return this.getOutputTexture(a.name)}let i=this._tonemapping;if(i.enabled&&i.ready)return this.getOutputTexture(i.name);let o=this._bloom;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);let r=this._ao;if(r.enabled&&r.ready)return this.getOutputTexture(r.name)}},hasSelected:{get:function(){let e=this._stages.slice();for(;e.length>0;){let t=e.pop();if(!l(t))continue;if(l(t.selected))return!0;let n=t.length;if(l(n))for(let i=0;i<n;++i)e.push(t.get(i))}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper===e)return;l(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());let t=this._autoExposureEnabled,n;switch(e){case Ey.REINHARD:n=im.createReinhardTonemappingStage(t);break;case Ey.MODIFIED_REINHARD:n=im.createModifiedReinhardTonemappingStage(t);break;case Ey.FILMIC:n=im.createFilmicTonemappingStage(t);break;default:n=im.createAcesTonemappingStage(t);break}if(t){let i=this._autoExposure;n.uniforms.autoExposure=function(){return i.outputTexture}}this._tonemapper=e,this._tonemapping=n,l(this._stageNames)&&(this._stageNames[n.name]=n,n._textureCache=this._textureCache),this._textureCacheDirty=!0}}});function b8(e){if(!e._stagesRemoved)return;e._stagesRemoved=!1;let t=[],n=e._stages,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];s&&(s._index=r++,t.push(s))}e._stages=t}cl.prototype.add=function(e){let t=this._stageNames,n=p8;for(n.push(e);n.length>0;){let o=n.pop();t[o.name]=o,o._textureCache=this._textureCache;let r=o.length;if(l(r))for(let s=0;s<r;++s)n.push(o.get(s))}let i=this._stages;return e._index=i.length,i.push(e),this._textureCacheDirty=!0,e};cl.prototype.remove=function(e){if(!this.contains(e))return!1;let t=this._stageNames,n=p8;for(n.push(e);n.length>0;){let i=n.pop();delete t[i.name];let o=i.length;if(l(o))for(let r=0;r<o;++r)n.push(i.get(r))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0};cl.prototype.contains=function(e){return l(e)&&l(e._index)&&e._textureCache===this._textureCache};cl.prototype.get=function(e){return b8(this),this._stages[e]};cl.prototype.removeAll=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)this.remove(e[n]);e.length=0};cl.prototype.getStageByName=function(e){return this._stageNames[e]};cl.prototype.update=function(e,t,n){b8(this);let i=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=i;let r=this._stages,s=o.length=r.length,a,c,d=0;for(a=0;a<s;++a)c=r[a],c.ready&&c.enabled&&c._isSupported(e)&&(o[d++]=c);o.length=d;let u=d!==i.length;if(!u){for(a=0;a<d;++a)if(o[a]!==i[a]){u=!0;break}}let m=this._ao,p=this._bloom,g=this._autoExposure,f=this._tonemapping,x=this._fxaa;f.enabled=n;let _=m.enabled&&m._isSupported(e),C=p.enabled&&p._isSupported(e),V=f.enabled&&f._isSupported(e),L=x.enabled&&x._isSupported(e);if((u||this._textureCacheDirty||_!==this._aoEnabled||C!==this._bloomEnabled||V!==this._tonemappingEnabled||L!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._aoEnabled=_,this._bloomEnabled=C,this._tonemappingEnabled=V,this._fxaaEnabled=L,this._textureCacheDirty=!1),l(this._randomTexture)&&!_&&(this._randomTexture.destroy(),this._randomTexture=void 0),!l(this._randomTexture)&&_){s=256*256*3;let Z=new Uint8Array(s);for(a=0;a<s;a+=3)Z[a]=Math.floor(Math.random()*255);this._randomTexture=new Et({context:e,pixelFormat:at.RGB,pixelDatatype:ze.UNSIGNED_BYTE,source:{arrayBufferView:Z,width:256,height:256},sampler:new rn({wrapS:Cn.REPEAT,wrapT:Cn.REPEAT,minificationFilter:on.NEAREST,magnificationFilter:di.NEAREST})})}for(this._textureCache.update(e),x.update(e,t),m.update(e,t),p.update(e,t),f.update(e,t),this._autoExposureEnabled&&g.update(e,t),s=r.length,a=0;a<s;++a)r[a].update(e,t);for(d=0,a=0;a<s;++a)c=r[a],c.ready&&c.enabled&&c._isSupported(e)&&d++;u=d!==o.length,u&&this.update(e,t,n)};cl.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)};function OT(e){for(;l(e.length);)e=e.get(e.length-1);return e.outputTexture}cl.prototype.getOutputTexture=function(e){let t=this.getStageByName(e);if(l(t))return OT(t)};function Jf(e,t,n,i,o){if(l(e.execute)){e.execute(t,n,i,o);return}let r=e.length,s;if(e.inputPreviousStageTexture)for(Jf(e.get(0),t,n,i,o),s=1;s<r;++s)Jf(e.get(s),t,OT(e.get(s-1)),i,o);else for(s=0;s<r;++s)Jf(e.get(s),t,n,i,o)}cl.prototype.execute=function(e,t,n,i){let o=this._activeStages,r=o.length,s=this._fxaa,a=this._ao,c=this._bloom,d=this._autoExposure,u=this._tonemapping,m=a.enabled&&a._isSupported(e),p=c.enabled&&c._isSupported(e),g=this._autoExposureEnabled,f=u.enabled&&u._isSupported(e),x=s.enabled&&s._isSupported(e);if(!x&&!m&&!p&&!f&&r===0)return;let _=t;m&&a.ready&&(Jf(a,e,_,n,i),_=OT(a)),p&&c.ready&&(Jf(c,e,_,n,i),_=OT(c)),g&&d.ready&&Jf(d,e,_,n,i),f&&u.ready&&(Jf(u,e,_,n,i),_=OT(u));let C=_;if(r>0){Jf(o[0],e,_,n,i);for(let V=1;V<r;++V)Jf(o[V],e,OT(o[V-1]),n,i);C=OT(o[r-1])}x&&s.ready&&Jf(s,e,C,n,i)};cl.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(jl,{uniformMap:{colorTexture:function(){return n.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};cl.prototype.isDestroyed=function(){return!1};cl.prototype.destroy=function(){return this._fxaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),me(this)};var n9=cl;var uki=T(S(),1);function HT(e){this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}HT.prototype.completeMorph=function(){l(this._completeMorph)&&this._completeMorph()};HT.prototype.morphTo2D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;this._previousMode=n.mode,this._morphToOrthographic=n.camera.frustum instanceof sn,!(this._previousMode===oe.SCENE2D||this._previousMode===oe.MORPHING)&&(this._scene.morphStart.raiseEvent(this,this._previousMode,oe.SCENE2D,!0),n._mode=oe.MORPHING,n.camera._setTransform(M.IDENTITY),this._previousMode===oe.COLUMBUS_VIEW?Xft(this,e):Aft(this,e,t),e===0&&l(this._completeMorph)&&this._completeMorph())};var qht=new h,$ht=new h,eft=new h,tft=new h,nft=new h,ift=new h,oft=new h,rft=new he,sft=new M,aft=new Ti,cft=new sn,lft={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};HT.prototype.morphToColumbusView=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,this._previousMode===oe.COLUMBUS_VIEW||this._previousMode===oe.MORPHING)return;this._scene.morphStart.raiseEvent(this,this._previousMode,oe.COLUMBUS_VIEW,!0),n.camera._setTransform(M.IDENTITY);let i=qht,o=$ht,r=eft;if(e>0)i.x=0,i.y=-1,i.z=1,i=h.multiplyByScalar(h.normalize(i,i),5*t.maximumRadius,i),h.negate(h.normalize(i,o),o),h.cross(h.UNIT_X,o,r);else{let d=n.camera;if(this._previousMode===oe.SCENE2D)h.clone(d.position,i),i.z=d.frustum.right-d.frustum.left,h.negate(h.UNIT_Z,o),h.clone(h.UNIT_Y,r);else{h.clone(d.positionWC,i),h.clone(d.directionWC,o),h.clone(d.upWC,r);let u=t.scaleToGeodeticSurface(i,oft),m=Gt.eastNorthUpToFixedFrame(u,t,sft);M.inverseTransformation(m,m),n.mapProjection.project(t.cartesianToCartographic(i,rft),i),M.multiplyByPointAsVector(m,o,o),M.multiplyByPointAsVector(m,r,r)}}let s;this._morphToOrthographic?(s=cft,s.width=n.camera.frustum.right-n.camera.frustum.left,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight):(s=aft,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,s.fov=W.toRadians(60));let a=lft;a.position=i,a.direction=o,a.up=r,a.frustum=s;let c=Nft(a);i9(this,c),this._previousMode===oe.SCENE2D?Mft(this,e,a,c):(a.position2D=M.multiplyByPoint(ao.TRANSFORM_2D,i,tft),a.direction2D=M.multiplyByPointAsVector(ao.TRANSFORM_2D,o,nft),a.up2D=M.multiplyByPointAsVector(ao.TRANSFORM_2D,r,ift),n._mode=oe.MORPHING,Jxe(this,e,a,c)),e===0&&l(this._completeMorph)&&this._completeMorph()};var x8={position:new h,direction:new h,up:new h,frustum:void 0},kxe=new Ti;HT.prototype.morphTo3D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,!(this._previousMode===oe.SCENE3D||this._previousMode===oe.MORPHING)){if(this._scene.morphStart.raiseEvent(this,this._previousMode,oe.SCENE3D,!0),n._mode=oe.MORPHING,n.camera._setTransform(M.IDENTITY),this._previousMode===oe.SCENE2D)_ft(this,e,t);else{let i;e>0?(i=x8,h.fromDegrees(0,0,5*t.maximumRadius,t,i.position),h.negate(i.position,i.direction),h.normalize(i.direction,i.direction),h.clone(h.UNIT_Z,i.up)):i=Uxe(this,t);let o,r=n.camera;r.frustum instanceof sn?o=r.frustum.clone():(o=kxe,o.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,o.fov=W.toRadians(60)),i.frustum=o;let s=jxe(i);i9(this,s),y8(this,e,i,s)}e===0&&l(this._completeMorph)&&this._completeMorph()}};HT.prototype.isDestroyed=function(){return!1};HT.prototype.destroy=function(){return l3(this),me(this)};function i9(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new Yd(e._scene.canvas);let n=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=n,e._morphHandler.setInputAction(n,Tn.LEFT_DOWN),e._morphHandler.setInputAction(n,Tn.MIDDLE_DOWN),e._morphHandler.setInputAction(n,Tn.RIGHT_DOWN),e._morphHandler.setInputAction(n,Tn.WHEEL)}}function l3(e){let t=e._currentTweens;for(let n=0;n<t.length;++n)t[n].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}var dft=new he,uft=new h,mft=new M;function Uxe(e,t){let n=e._scene,i=n.camera,o=x8,r=o.position,s=o.direction,a=o.up,c=n.mapProjection.unproject(i.position,dft);t.cartographicToCartesian(c,r);let d=t.scaleToGeodeticSurface(r,uft),u=Gt.eastNorthUpToFixedFrame(d,t,mft);return M.multiplyByPointAsVector(u,i.direction,s),M.multiplyByPointAsVector(u,i.up,a),o}var hft=new h,fft=new h,pft=new h,bft=new h,gft=new h,yft=new h;function y8(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=h.clone(r.position,hft),a=h.clone(r.direction,fft),c=h.clone(r.up,pft),d=M.multiplyByPoint(ao.TRANSFORM_2D_INVERSE,n.position,bft),u=M.multiplyByPointAsVector(ao.TRANSFORM_2D_INVERSE,n.direction,gft),m=M.multiplyByPointAsVector(ao.TRANSFORM_2D_INVERSE,n.up,yft);function p(f){om(s,d,f.time,r.position),om(a,u,f.time,r.direction),om(c,m,f.time,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.right,r.right)}let g=o.tweens.add({duration:t,easingFunction:Fr.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){Qxe(e,o,0,1,t,i)}});e._currentTweens.push(g)}var xft=new sn,Dxe=new h,Bxe=new h,Yxe=new h,_8=new h,Oxe=new h,Hxe=new h;function _ft(e,t,n){t/=3;let i=e._scene,o=i.camera,r;t>0?(r=x8,h.fromDegrees(0,0,5*n.maximumRadius,n,r.position),h.negate(r.position,r.direction),h.normalize(r.direction,r.direction),h.clone(h.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=Uxe(e,n));let s;e._morphToOrthographic?(s=xft,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.width=o.frustum.right-o.frustum.left):(s=kxe,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.fov=W.toRadians(60)),r.frustum=s;let a=jxe(r);i9(e,a);let c;e._morphToOrthographic?c=function(){y8(e,t,r,a)}:c=function(){Kxe(e,t,r,function(){y8(e,t,r,a)})},t>0?(i._mode=oe.SCENE2D,o.flyTo({duration:t,destination:h.fromDegrees(0,0,5*n.maximumRadius,n,_8),complete:function(){i._mode=oe.MORPHING,c()}})):c()}function om(e,t,n,i){return h.lerp(e,t,n,i)}function zxe(e,t,n,i,o){let r=e._scene,s=r.camera;if(s.frustum instanceof sn)return;let a=s.frustum.fov,c=W.RADIANS_PER_DEGREE*.5,d=n.position.z*Math.tan(a*.5);s.frustum.far=d/Math.tan(c*.5)+1e7;function u(p){s.frustum.fov=W.lerp(a,c,p.time);let g=d/Math.tan(s.frustum.fov*.5);i(s,g)}let m=r.tweens.add({duration:t,easingFunction:Fr.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:u,complete:function(){s.frustum=n.frustum.clone(),o(e)}});e._currentTweens.push(m)}var Tft=new h,Sft=new h,Cft=new h,g8=new h,Vft=new h,Lft=new h,Rft=new Cr,Zft=new pn,Gft=new h,Eft={position:void 0,direction:void 0,up:void 0,frustum:void 0};function Xft(e,t){t*=.5;let n=e._scene,i=n.camera,o=h.clone(i.position,Tft),r=h.clone(i.direction,Sft),s=h.clone(i.up,Cft),a=h.negate(h.UNIT_Z,Vft),c=h.clone(h.UNIT_Y,Lft),d=g8;if(t>0)h.clone(h.ZERO,g8),d.z=5*n.mapProjection.ellipsoid.maximumRadius;else{h.clone(o,g8);let _=Zft;M.multiplyByPoint(ao.TRANSFORM_2D,o,_.origin),M.multiplyByPointAsVector(ao.TRANSFORM_2D,r,_.direction);let C=n.globe;if(l(C)){let V=C.pickWorldCoordinates(_,n,!0,Gft);l(V)&&(M.multiplyByPoint(ao.TRANSFORM_2D_INVERSE,V,d),d.z+=h.distance(o,d))}}let u=Rft;u.right=d.z*.5,u.left=-u.right,u.top=u.right*(n.drawingBufferHeight/n.drawingBufferWidth),u.bottom=-u.top;let m=Eft;m.position=d,m.direction=a,m.up=c,m.frustum=u;let p=qxe(m);i9(e,p);function g(_){om(o,d,_.time,i.position),om(r,a,_.time,i.direction),om(s,c,_.time,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i._adjustOrthographicFrustum(!0)}function f(_,C){_.position.z=C}let x=n.tweens.add({duration:t,easingFunction:Fr.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:g,complete:function(){zxe(e,t,m,f,p)}});e._currentTweens.push(x)}var Nxe=new he,Ift={position:new h,direction:new h,up:new h,position2D:new h,direction2D:new h,up2D:new h,frustum:new Cr},Wft={position:new h,direction:new h,up:new h,frustum:void 0},Pft=new h,vft=new pn,wft=new M,Fft=new h;function Aft(e,t,n){t*=.5;let i=e._scene,o=i.camera,r=Ift;if(t>0)h.clone(h.ZERO,r.position),r.position.z=5*n.maximumRadius,h.negate(h.UNIT_Z,r.direction),h.clone(h.UNIT_Y,r.up);else{n.cartesianToCartographic(o.positionWC,Nxe),i.mapProjection.project(Nxe,r.position),h.negate(h.UNIT_Z,r.direction),h.clone(h.UNIT_Y,r.up);let m=vft;h.clone(r.position2D,m.origin);let p=h.clone(o.directionWC,m.direction),g=n.scaleToGeodeticSurface(o.positionWC,Fft),f=Gt.eastNorthUpToFixedFrame(g,n,wft);M.inverseTransformation(f,f),M.multiplyByPointAsVector(f,p,p),M.multiplyByPointAsVector(ao.TRANSFORM_2D,p,p);let x=i.globe;if(l(x)){let _=x.pickWorldCoordinates(m,i,!0,Pft);if(l(_)){let C=h.distance(r.position2D,_);_.x+=C,h.clone(_,r.position2D)}}}function s(m,p){m.position.x=p}M.multiplyByPoint(ao.TRANSFORM_2D,r.position,r.position2D),M.multiplyByPointAsVector(ao.TRANSFORM_2D,r.direction,r.direction2D),M.multiplyByPointAsVector(ao.TRANSFORM_2D,r.up,r.up2D);let a=r.frustum;a.right=r.position.z*.5,a.left=-a.right,a.top=a.right*(i.drawingBufferHeight/i.drawingBufferWidth),a.bottom=-a.top;let c=Wft;M.multiplyByPoint(ao.TRANSFORM_2D_INVERSE,r.position2D,c.position),h.clone(r.direction,c.direction),h.clone(r.up,c.up),c.frustum=a;let d=qxe(c);i9(e,d);function u(){zxe(e,t,r,s,d)}Jxe(e,t,r,u)}function Kxe(e,t,n,i){let o=e._scene,r=o.camera,s=r.frustum.right-r.frustum.left;r.frustum=n.frustum.clone();let a=r.frustum.fov,c=W.RADIANS_PER_DEGREE*.5,d=s*Math.tan(a*.5);r.frustum.far=d/Math.tan(c*.5)+1e7,r.frustum.fov=c;function u(p){r.frustum.fov=W.lerp(c,a,p.time),r.position.z=d/Math.tan(r.frustum.fov*.5)}let m=o.tweens.add({duration:t,easingFunction:Fr.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:u,complete:function(){i(e)}});e._currentTweens.push(m)}function Mft(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=h.clone(n.position,_8),a=h.clone(n.direction,Oxe),c=h.clone(n.up,Hxe);o._mode=oe.MORPHING;function d(){r.frustum=n.frustum.clone();let u=h.clone(r.position,Dxe),m=h.clone(r.direction,Bxe),p=h.clone(r.up,Yxe);u.z=s.z;function g(x){om(u,s,x.time,r.position),om(m,a,x.time,r.direction),om(p,c,x.time,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.right,r.right)}let f=o.tweens.add({duration:t,easingFunction:Fr.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:g,complete:function(){i(e)}});e._currentTweens.push(f)}e._morphToOrthographic?d():Kxe(e,0,n,d)}function Jxe(e,t,n,i){let o=e._scene,r=o.camera,s=h.clone(r.position,Dxe),a=h.clone(r.direction,Bxe),c=h.clone(r.up,Yxe),d=h.clone(n.position2D,_8),u=h.clone(n.direction2D,Oxe),m=h.clone(n.up2D,Hxe);function p(f){om(s,d,f.time,r.position),om(a,u,f.time,r.direction),om(c,m,f.time,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.right,r.right),r._adjustOrthographicFrustum(!0)}let g=o.tweens.add({duration:t,easingFunction:Fr.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){Qxe(e,o,1,0,t,i)}});e._currentTweens.push(g)}function Qxe(e,t,n,i,o,r){let s={object:t,property:"morphTime",startValue:n,stopValue:i,duration:o,easingFunction:Fr.QUARTIC_OUT};l(r)&&(s.complete=function(){r(e)});let a=t.tweens.addProperty(s);e._currentTweens.push(a)}function jxe(e){return function(t){let n=t._scene;n._mode=oe.SCENE3D,n.morphTime=oe.getMorphTime(oe.SCENE3D),l3(t);let i=n.camera;(t._previousMode!==oe.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,h.clone(e.position,i.position),h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i.frustum=e.frustum.clone());let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,oe.SCENE3D,r)}}function qxe(e){return function(t){let n=t._scene;n._mode=oe.SCENE2D,n.morphTime=oe.getMorphTime(oe.SCENE2D),l3(t);let i=n.camera;h.clone(e.position,i.position),i.position.z=n.mapProjection.ellipsoid.maximumRadius*2,h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i.frustum=e.frustum.clone();let o=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,oe.SCENE2D,o)}}function Nft(e){return function(t){let n=t._scene;n._mode=oe.COLUMBUS_VIEW,n.morphTime=oe.getMorphTime(oe.COLUMBUS_VIEW),l3(t);let i=n.camera;(t._previousModeMode!==oe.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,h.clone(e.position,i.position),h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right));let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,oe.COLUMBUS_VIEW,r)}}var o9=HT;var sUi=T(S(),1);var Cki=T(S(),1);var hki=T(S(),1),kft={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},Ei=Object.freeze(kft);function Lc(e,t){let n=e;return l(t)&&(n+=`+${t}`),n}function Uft(e,t){D.clone(e.distance.startPosition,t.distance.startPosition),D.clone(e.distance.endPosition,t.distance.endPosition),D.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),D.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function $xe(e,t,n){let i=Lc(Ei.PINCH,t),o=e._update,r=e._isDown,s=e._eventStartPosition,a=e._pressTime,c=e._releaseTime;o[i]=!0,r[i]=!1,s[i]=new D;let d=e._movement[i];l(d)||(d=e._movement[i]={}),d.distance={startPosition:new D,endPosition:new D},d.angleAndHeight={startPosition:new D,endPosition:new D},d.prevAngle=0,e._eventHandler.setInputAction(function(u){e._buttonsDown++,r[i]=!0,a[i]=new Date,D.lerp(u.position1,u.position2,.5,s[i])},Tn.PINCH_START,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[i]=!1,c[i]=new Date},Tn.PINCH_END,t),e._eventHandler.setInputAction(function(u){if(r[i]){o[i]?(Uft(u,d),o[i]=!1,d.prevAngle=d.angleAndHeight.startPosition.x):(D.clone(u.distance.endPosition,d.distance.endPosition),D.clone(u.angleAndHeight.endPosition,d.angleAndHeight.endPosition));let m=d.angleAndHeight.endPosition.x,p=d.prevAngle,g=Math.PI*2;for(;m>=p+Math.PI;)m-=g;for(;m<p-Math.PI;)m+=g;d.angleAndHeight.endPosition.x=-m*n.clientWidth/12,d.angleAndHeight.startPosition.x=-p*n.clientWidth/12}},Tn.PINCH_MOVE,t)}function e_e(e,t){let n=Lc(Ei.WHEEL,t),i=e._pressTime,o=e._releaseTime,r=e._update;r[n]=!0;let s=e._movement[n];l(s)||(s=e._movement[n]={});let a=e._lastMovement[n];l(a)||(a=e._lastMovement[n]={startPosition:new D,endPosition:new D,valid:!1}),s.startPosition=new D,D.clone(D.ZERO,s.startPosition),s.endPosition=new D,e._eventHandler.setInputAction(function(c){let d=7.5*W.toRadians(c);i[n]=o[n]=new Date,s.endPosition.x=0,s.endPosition.y=d,D.clone(s.endPosition,a.endPosition),a.valid=!0,r[n]=!1},Tn.WHEEL,t)}function iL(e,t,n){let i=Lc(n,t),o=e._isDown,r=e._eventStartPosition,s=e._pressTime,a=e._releaseTime;o[i]=!1,r[i]=new D;let c=e._lastMovement[i];l(c)||(c=e._lastMovement[i]={startPosition:new D,endPosition:new D,valid:!1});let d,u;n===Ei.LEFT_DRAG?(d=Tn.LEFT_DOWN,u=Tn.LEFT_UP):n===Ei.RIGHT_DRAG?(d=Tn.RIGHT_DOWN,u=Tn.RIGHT_UP):n===Ei.MIDDLE_DRAG&&(d=Tn.MIDDLE_DOWN,u=Tn.MIDDLE_UP),e._eventHandler.setInputAction(function(m){e._buttonsDown++,c.valid=!1,o[i]=!0,s[i]=new Date,D.clone(m.position,r[i])},d,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),o[i]=!1,a[i]=new Date},u,t)}function t_e(e,t){D.clone(e.startPosition,t.startPosition),D.clone(e.endPosition,t.endPosition)}function n_e(e,t){let n=e._update,i=e._movement,o=e._lastMovement,r=e._isDown;for(let s in Ei)if(Ei.hasOwnProperty(s)){let a=Ei[s];if(l(a)){let c=Lc(a,t);n[c]=!0,l(e._lastMovement[c])||(e._lastMovement[c]={startPosition:new D,endPosition:new D,valid:!1}),l(e._movement[c])||(e._movement[c]={startPosition:new D,endPosition:new D})}}e._eventHandler.setInputAction(function(s){for(let a in Ei)if(Ei.hasOwnProperty(a)){let c=Ei[a];if(l(c)){let d=Lc(c,t);r[d]&&(n[d]?(t_e(i[d],o[d]),o[d].valid=!0,t_e(s,i[d]),n[d]=!1):D.clone(s.endPosition,i[d].endPosition))}}D.clone(s.endPosition,e._currentMousePosition)},Tn.MOUSE_MOVE,t)}function rm(e){this._eventHandler=new Yd(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new D,e_e(this,void 0),$xe(this,void 0,e),iL(this,void 0,Ei.LEFT_DRAG),iL(this,void 0,Ei.RIGHT_DRAG),iL(this,void 0,Ei.MIDDLE_DRAG),n_e(this,void 0);for(let t in ua)if(ua.hasOwnProperty(t)){let n=ua[t];l(n)&&(e_e(this,n),$xe(this,n,e),iL(this,n,Ei.LEFT_DRAG),iL(this,n,Ei.RIGHT_DRAG),iL(this,n,Ei.MIDDLE_DRAG),n_e(this,n))}}Object.defineProperties(rm.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){let e=!this._update[Lc(Ei.WHEEL)]||!this._update[Lc(Ei.WHEEL,ua.SHIFT)]||!this._update[Lc(Ei.WHEEL,ua.CTRL)]||!this._update[Lc(Ei.WHEEL,ua.ALT)];return this._buttonsDown>0||e}}});rm.prototype.isMoving=function(e,t){let n=Lc(e,t);return!this._update[n]};rm.prototype.getMovement=function(e,t){let n=Lc(e,t);return this._movement[n]};rm.prototype.getLastMovement=function(e,t){let n=Lc(e,t),i=this._lastMovement[n];if(i.valid)return i};rm.prototype.isButtonDown=function(e,t){let n=Lc(e,t);return this._isDown[n]};rm.prototype.getStartMousePosition=function(e,t){if(e===Ei.WHEEL)return this._currentMousePosition;let n=Lc(e,t);return this._eventStartPosition[n]};rm.prototype.getButtonPressTime=function(e,t){let n=Lc(e,t);return this._pressTime[n]};rm.prototype.getButtonReleaseTime=function(e,t){let n=Lc(e,t);return this._releaseTime[n]};rm.prototype.reset=function(){for(let e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)};rm.prototype.isDestroyed=function(){return!1};rm.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),me(this)};var r9=rm;var Wki=T(S(),1);function d3(e,t,n,i,o,r,s,a,c,d){this._tweens=e,this._tweenjs=t,this._startObject=Oe(n),this._stopObject=Oe(i),this._duration=o,this._delay=r,this._easingFunction=s,this._update=a,this._complete=c,this.cancel=d,this.needsStart=!0}Object.defineProperties(d3.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}});d3.prototype.cancelTween=function(){this._tweens.remove(this)};function Gh(){this._tweens=[]}Object.defineProperties(Gh.prototype,{length:{get:function(){return this._tweens.length}}});Gh.prototype.add=function(e){if(e=y(e,y.EMPTY_OBJECT),e.duration===0)return l(e.complete)&&e.complete(),new d3(this);let t=e.duration/zn.SECONDS_PER_MILLISECOND,n=y(e.delay,0),i=n/zn.SECONDS_PER_MILLISECOND,o=y(e.easingFunction,Fr.LINEAR_NONE),r=e.startObject,s=new Upe(r);s.to(Oe(e.stopObject),t),s.delay(i),s.easing(o),l(e.update)&&s.onUpdate(function(){e.update(r)}),s.onComplete(y(e.complete,null)),s.repeat(y(e._repeat,0));let a=new d3(this,s,e.startObject,e.stopObject,e.duration,n,o,e.update,e.complete,e.cancel);return this._tweens.push(a),a};Gh.prototype.addProperty=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.object,n=e.property,i=e.startValue,o=e.stopValue;function r(s){t[n]=s.value}return this.add({startObject:{value:i},stopObject:{value:o},duration:y(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:r,complete:e.complete,cancel:e.cancel,_repeat:e._repeat})};Gh.prototype.addAlpha=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.material,n=[];for(let o in t.uniforms)t.uniforms.hasOwnProperty(o)&&l(t.uniforms[o])&&l(t.uniforms[o].alpha)&&n.push(o);function i(o){let r=n.length;for(let s=0;s<r;++s)t.uniforms[n[s]].alpha=o.alpha}return this.add({startObject:{alpha:y(e.startValue,0)},stopObject:{alpha:y(e.stopValue,1)},duration:y(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:i,complete:e.complete,cancel:e.cancel})};Gh.prototype.addOffsetIncrement=function(e){e=y(e,y.EMPTY_OBJECT);let n=e.material.uniforms;return this.addProperty({object:n,property:"offset",startValue:n.offset,stopValue:n.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})};Gh.prototype.remove=function(e){if(!l(e))return!1;let t=this._tweens.indexOf(e);return t!==-1?(e.tweenjs.stop(),l(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0):!1};Gh.prototype.removeAll=function(){let e=this._tweens;for(let t=0;t<e.length;++t){let n=e[t];n.tweenjs.stop(),l(n.cancel)&&n.cancel()}e.length=0};Gh.prototype.contains=function(e){return l(e)&&this._tweens.indexOf(e)!==-1};Gh.prototype.get=function(e){return this._tweens[e]};Gh.prototype.update=function(e){let t=this._tweens,n=0;for(e=l(e)?e/zn.SECONDS_PER_MILLISECOND:bi();n<t.length;){let i=t[n],o=i.tweenjs;i.needsStart?(i.needsStart=!1,o.start(e)):o.update(e)?n++:(o.stop(),t.splice(n,1))}};var zT=Gh;function a9(e){this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.translateEventTypes=Ei.LEFT_DRAG,this.zoomEventTypes=[Ei.RIGHT_DRAG,Ei.WHEEL,Ei.PINCH],this.rotateEventTypes=Ei.LEFT_DRAG,this.tiltEventTypes=[Ei.MIDDLE_DRAG,Ei.PINCH,{eventType:Ei.LEFT_DRAG,modifier:ua.CTRL},{eventType:Ei.RIGHT_DRAG,modifier:ua.CTRL}],this.lookEventTypes={eventType:Ei.LEFT_DRAG,modifier:ua.SHIFT},this.minimumPickingTerrainHeight=15e4,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumPickingTerrainDistanceWithInertia=4e3,this.minimumCollisionTerrainHeight=15e3,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=75e5,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._scene=e,this._globe=void 0,this._ellipsoid=void 0,this._lastGlobeHeight=0,this._aggregator=new r9(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new zT,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new D(-1,-1),this._tiltCenter=new h,this._rotateMousePosition=new D(-1,-1),this._rotateStartPosition=new h,this._strafeStartPosition=new h,this._strafeMousePosition=new D,this._strafeEndMousePosition=new D,this._zoomMouseStart=new D(-1,-1),this._zoomWorldPosition=new h,this._useZoomWorldPosition=!1,this._panLastMousePosition=new D,this._panLastWorldPosition=new h,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._zoomingUnderground=!1,this._rotatingZoom=!1,this._adjustedHeightForTerrain=!1,this._cameraUnderground=!1;let t=e.mapProjection;this._maxCoord=t.project(new he(Math.PI,W.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=1/5e3,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._minimumUndergroundPickDistance=2e3,this._maximumUndergroundPickDistance=1e4}function Dft(e,t){if(e<0)return 0;let n=(1-t)*25;return Math.exp(-n*e)}function Bft(e){return D.equalsEpsilon(e.startPosition,e.endPosition,W.EPSILON14)}var Yft=.4;function Oft(e,t,n,i,o,r,s){let a=r[s];l(a)||(a=r[s]={startPosition:new D,endPosition:new D,motion:new D,inertiaEnabled:!0});let c=e.getButtonPressTime(t,n),d=e.getButtonReleaseTime(t,n),u=c&&d&&(d.getTime()-c.getTime())/1e3,p=d&&(new Date().getTime()-d.getTime())/1e3;if(c&&d&&u<Yft){let g=Dft(p,i),f=e.getLastMovement(t,n);if(!l(f)||Bft(f)||!a.inertiaEnabled||(a.motion.x=(f.endPosition.x-f.startPosition.x)*.5,a.motion.y=(f.endPosition.y-f.startPosition.y)*.5,a.startPosition=D.clone(f.startPosition,a.startPosition),a.endPosition=D.multiplyByScalar(a.motion,g,a.endPosition),a.endPosition=D.add(a.startPosition,a.endPosition,a.endPosition),isNaN(a.endPosition.x)||isNaN(a.endPosition.y)||D.distance(a.startPosition,a.endPosition)<.5))return;if(!e.isButtonDown(t,n)){let x=e.getStartMousePosition(t,n);o(r,x,a)}}}function Hft(e,t){if(l(t)){let n=e[t];l(n)&&(n.inertiaEnabled=!0);let i=e._inertiaDisablers[t];if(l(i)){let o=i.length;for(let r=0;r<o;++r)n=e[i[r]],l(n)&&(n.inertiaEnabled=!1)}}}var i_e=[];function ll(e,t,n,i,o,r){if(!l(n))return;let s=e._aggregator;Array.isArray(n)||(i_e[0]=n,n=i_e);let a=n.length;for(let c=0;c<a;++c){let d=n[c],u=l(d.eventType)?d.eventType:d,m=d.modifier,p=s.isMoving(u,m)&&s.getMovement(u,m),g=s.getStartMousePosition(u,m);e.enableInputs&&t&&(p?(i(e,g,p),Hft(e,r)):o<1&&Oft(s,u,m,o,i,e,r))}}var u3=new pn,zft=new h,Kft=new D,Jft=new h,Qft=new D,jft=new h,qft=new h,$ft=new h,ept=new h,p_e=new h,tpt=new h,npt=new h,ipt=new h,opt=new h,rpt=new h,spt=new h,apt=new h,cpt=new h,lpt=new h,dpt=new h,KT=new h,o_e=new h,r_e=new h,T8={orientation:new Ka};function E8(e,t,n,i,o,r){let s=1;l(r)&&(s=W.clamp(Math.abs(r),.25,1));let a=n.endPosition.y-n.startPosition.y,d=a>0?e.minimumZoomDistance*s:0,u=e.maximumZoomDistance,m=o-d,p=i*m;p=W.clamp(p,e._minimumZoomRate,e._maximumZoomRate);let g=a/e._scene.canvas.clientHeight;g=Math.min(g,e.maximumMovementRatio);let f=p*g;if(e.enableCollisionDetection||e.minimumZoomDistance===0||!l(e._globe)){if(f>0&&Math.abs(o-d)<1||f<0&&Math.abs(o-u)<1)return;o-f<d?f=o-d-1:o-f>u&&(f=o-u)}let x=e._scene,_=x.camera,C=x.mode,V=T8.orientation;if(V.heading=_.heading,V.pitch=_.pitch,V.roll=_.roll,_.frustum instanceof sn){Math.abs(f)>0&&(_.zoomIn(f),_._adjustOrthographicFrustum(!0));return}let L=y(n.inertiaEnabled,D.equals(t,e._zoomMouseStart)),Z=e._zoomingOnVector,G=e._rotatingZoom,X;if(L||(e._zoomMouseStart=D.clone(t,e._zoomMouseStart),l(e._globe)&&C===oe.SCENE2D?(X=_.getPickRay(t,u3).origin,X=h.fromElements(X.y,X.z,X.x)):l(e._globe)&&(X=ab(e,t,zft)),l(X)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=h.clone(X,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,Z=e._zoomingOnVector=!1,G=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),!e._useZoomWorldPosition){_.zoomIn(f);return}let v=C===oe.COLUMBUS_VIEW;if(_.positionCartographic.height<2e6&&(G=!0),!L||G){if(C===oe.SCENE2D){let P=e._zoomWorldPosition,F=_.position;if(!h.equals(P,F)&&_.positionCartographic.height<e._maxCoord.x*2){let A=_.position.x,b=h.subtract(P,F,Jft);h.normalize(b,b);let R=h.distance(P,F)*f/(_.getMagnitude()*.5);_.move(b,R*.5),(_.position.x<0&&A>0||_.position.x>0&&A<0)&&(X=_.getPickRay(t,u3).origin,X=h.fromElements(X.y,X.z,X.x),e._zoomWorldPosition=h.clone(X,e._zoomWorldPosition))}}else if(C===oe.SCENE3D){let P=h.normalize(_.position,p_e);if(e._cameraUnderground||e._zoomingUnderground||_.positionCartographic.height<3e3&&Math.abs(h.dot(_.direction,P))<.6)v=!0;else{let F=x.canvas,A=Qft;A.x=F.clientWidth/2,A.y=F.clientHeight/2;let b=ab(e,A,jft);if(!l(b))v=!0;else if(_.positionCartographic.height<1e6)if(h.dot(_.direction,P)>=-.5)v=!0;else{let R=npt;h.clone(_.position,R);let E=e._zoomWorldPosition,I=tpt;if(I=h.normalize(E,I),h.dot(I,P)<0)return;let w=dpt,N=rpt;h.clone(_.direction,N),h.add(R,h.multiplyByScalar(N,1e3,KT),w);let B=spt,U=apt;h.subtract(E,R,B),h.normalize(B,U);let O=h.dot(P,U);if(O>=0){e._zoomMouseStart.x=-1;return}let k=Math.acos(-O),J=h.magnitude(R),H=h.magnitude(E),ee=J-f,z=h.magnitude(B),j=Math.asin(W.clamp(z/H*Math.sin(k),-1,1)),q=Math.asin(W.clamp(ee/H*Math.sin(k),-1,1)),be=j-q+k,Te=ipt;h.normalize(R,Te);let ae=opt;ae=h.cross(U,Te,ae),ae=h.normalize(ae,ae),h.normalize(h.cross(Te,ae,KT),N),h.multiplyByScalar(h.normalize(w,KT),h.magnitude(w)-f,w),h.normalize(R,R),h.multiplyByScalar(R,ee,R);let ye=cpt;h.multiplyByScalar(h.add(h.multiplyByScalar(Te,Math.cos(be)-1,o_e),h.multiplyByScalar(N,Math.sin(be),r_e),KT),ee,ye),h.add(R,ye,R),h.normalize(w,Te),h.normalize(h.cross(Te,ae,KT),N);let Se=lpt;h.multiplyByScalar(h.add(h.multiplyByScalar(Te,Math.cos(be)-1,o_e),h.multiplyByScalar(N,Math.sin(be),r_e),KT),h.magnitude(w),Se),h.add(w,Se,w),h.clone(R,_.position),h.normalize(h.subtract(w,R,KT),_.direction),h.clone(_.direction,_.direction),h.cross(_.direction,_.up,_.right),h.cross(_.right,_.direction,_.up),_.setView(T8);return}else{let R=h.normalize(b,qft),E=h.normalize(e._zoomWorldPosition,$ft),I=h.dot(E,R);if(I>0&&I<1){let w=W.acosClamped(I),N=h.cross(E,R,ept),B=Math.abs(w)>W.toRadians(20)?_.positionCartographic.height*.75:_.positionCartographic.height-f,U=f/B;_.rotate(N,w*U)}}}}e._rotatingZoom=!v}if(!L&&v||Z){let P,F=ki.wgs84ToWindowCoordinates(x,e._zoomWorldPosition,Kft);C!==oe.COLUMBUS_VIEW&&D.equals(t,e._zoomMouseStart)&&l(F)?P=_.getPickRay(F,u3):P=_.getPickRay(t,u3);let A=P.direction;(C===oe.COLUMBUS_VIEW||C===oe.SCENE2D)&&h.fromElements(A.y,A.z,A.x,A),_.move(A,f),e._zoomingOnVector=!0}else _.zoomIn(f);e._cameraUnderground||_.setView(T8)}var upt=new pn,mpt=new pn,hpt=new h;function fpt(e,t,n){let o=e._scene.camera,r=o.getPickRay(n.startPosition,upt).origin,s=o.getPickRay(n.endPosition,mpt).origin;r=h.fromElements(r.y,r.z,r.x,r),s=h.fromElements(s.y,s.z,s.x,s);let a=h.subtract(r,s,hpt),c=h.magnitude(a);c>0&&(h.normalize(a,a),o.move(a,c))}function s_e(e,t,n){l(n.distance)&&(n=n.distance);let o=e._scene.camera;E8(e,t,n,e._zoomFactor,o.getMagnitude())}var ppt=new D,bpt=new D;function a_e(e,t,n){if(l(n.angleAndHeight)){gpt(e,t,n.angleAndHeight);return}let i=e._scene,o=i.camera,r=i.canvas,s=r.clientWidth,a=r.clientHeight,c=ppt;c.x=2/s*n.startPosition.x-1,c.y=2/a*(a-n.startPosition.y)-1,c=D.normalize(c,c);let d=bpt;d.x=2/s*n.endPosition.x-1,d.y=2/a*(a-n.endPosition.y)-1,d=D.normalize(d,d);let u=W.acosClamped(c.x);c.y<0&&(u=W.TWO_PI-u);let m=W.acosClamped(d.x);d.y<0&&(m=W.TWO_PI-m);let p=m-u;o.twistRight(p)}function gpt(e,t,n){let i=e._rotateFactor*e._rotateRateRangeAdjustment;i>e._maximumRotateRate&&(i=e._maximumRotateRate),i<e._minimumRotateRate&&(i=e._minimumRotateRate);let o=e._scene,r=o.camera,s=o.canvas,a=(n.endPosition.x-n.startPosition.x)/s.clientWidth;a=Math.min(a,e.maximumMovementRatio);let c=i*a*Math.PI*4;r.twistRight(c)}function ypt(e){let t=e._scene.mapMode2D===Ql.ROTATE;M.equals(M.IDENTITY,e._scene.camera.transform)?(ll(e,e.enableTranslate,e.translateEventTypes,fpt,e.inertiaTranslate,"_lastInertiaTranslateMovement"),ll(e,e.enableZoom,e.zoomEventTypes,s_e,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&ll(e,e.enableRotate,e.tiltEventTypes,a_e,e.inertiaSpin,"_lastInertiaTiltMovement")):(ll(e,e.enableZoom,e.zoomEventTypes,s_e,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&ll(e,e.enableRotate,e.translateEventTypes,a_e,e.inertiaSpin,"_lastInertiaSpinMovement"))}var b_e=new pn,xpt=new h,_pt=new h;function ab(e,t,n){let i=e._scene,o=e._globe,r=i.camera,s;if(i.pickPositionSupported&&(s=i.pickPositionWorldCoordinates(t,xpt)),!l(o))return h.clone(s,n);let a=!e._cameraUnderground,c=r.getPickRay(t,b_e),d=o.pickWorldCoordinates(c,i,a,_pt),u=l(s)?h.distance(s,r.positionWC):Number.POSITIVE_INFINITY,m=l(d)?h.distance(d,r.positionWC):Number.POSITIVE_INFINITY;return u<m?h.clone(s,n):h.clone(d,n)}var Tpt=new he;function y3(e){let t=e._ellipsoid,n=e._scene,i=n.camera,o=n.mode,r=0;if(o===oe.SCENE3D){let c=t.cartesianToCartographic(i.position,Tpt);l(c)&&(r=c.height)}else r=i.position.z;let s=y(e._scene.globeHeight,0);return Math.abs(s-r)}var Spt=new h;function g_e(e,t){let n=t.origin,i=t.direction,o=y3(e),r=h.normalize(n,Spt),s=Math.abs(h.dot(r,i));return s=Math.max(s,.5)*2,o*s}function y_e(e,t,n,i){let o=h.distance(t.origin,n),r=y3(e),s=W.clamp(r*5,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance);return o>s&&(o=Math.min(o,r/5),o=Math.max(o,100)),pn.getPoint(t,o,i)}function x_e(e,t,n,i){let o;return l(n)?(o=h.distance(t.origin,n),o>e._maximumUndergroundPickDistance&&(o=y3(e))):o=y3(e),pn.getPoint(t,o,i)}var Cpt=new D;function __e(e,t){let n=t.endPosition,i=D.subtract(t.endPosition,t.startPosition,Cpt),o=e._strafeEndMousePosition;D.add(o,i,o),t.endPosition=o,X8(e,t,e._strafeStartPosition),t.endPosition=n}var c_e=new pn,Vpt=new pn,S8=new h,Lpt=new h,Rpt=new h,Zpt=new h,Gpt=new dn(h.UNIT_X,0),Ept=new D,Xpt=new D;function Ipt(e,t,n){if(h.equals(t,e._translateMousePosition)||(e._looking=!1),h.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking){Qd(e,t,n);return}if(e._strafing){__e(e,n);return}let o=e._scene.camera,r=e._cameraUnderground,s=D.clone(n.startPosition,Ept),a=D.clone(n.endPosition,Xpt),c=o.getPickRay(s,c_e),d=h.clone(h.ZERO,Zpt),u=h.UNIT_X,m;if(o.position.z<e._minimumPickingTerrainHeight&&(m=ab(e,s,S8),l(m)&&(d.x=m.x)),r||d.x>o.position.z&&l(m)){let L=m;r&&(L=x_e(e,c,m,S8)),D.clone(t,e._strafeMousePosition),D.clone(t,e._strafeEndMousePosition),h.clone(L,e._strafeStartPosition),e._strafing=!0,X8(e,n,e._strafeStartPosition);return}let p=dn.fromPointNormal(d,u,Gpt);c=o.getPickRay(s,c_e);let g=jn.rayPlane(c,p,S8),f=o.getPickRay(a,Vpt),x=jn.rayPlane(f,p,Lpt);if(!l(g)||!l(x)){e._looking=!0,Qd(e,t,n),D.clone(t,e._translateMousePosition);return}let _=h.subtract(g,x,Rpt),C=_.x;_.x=_.y,_.y=_.z,_.z=C;let V=h.magnitude(_);V>W.EPSILON6&&(h.normalize(_,_),o.move(_,V))}var T_e=new D,f3=new pn,p3=new h,Wpt=new h,S_e=new M,Ppt=new M,vpt=new h,wpt=new dn(h.UNIT_X,0),C8=new h,R8=new he,C_e=new M,Fpt=new we,Apt=new $,b3=new h;function Mpt(e,t,n){if(l(n.angleAndHeight)&&(n=n.angleAndHeight),D.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking){Qd(e,t,n);return}let o=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(o.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,Npt(e,t,n)):kpt(e,t,n)}function Npt(e,t,n){let i=e._scene,o=i.camera,r=i.canvas,s=T_e;s.x=r.clientWidth/2,s.y=r.clientHeight/2;let a=o.getPickRay(s,f3),c=h.UNIT_X,d=a.origin,u=a.direction,m,p=h.dot(c,u);if(Math.abs(p)>W.EPSILON6&&(m=-h.dot(c,d)/p),!l(m)||m<=0){e._looking=!0,Qd(e,t,n),D.clone(t,e._tiltCenterMousePosition);return}let g=h.multiplyByScalar(u,m,p3);h.add(d,g,g);let f=i.mapProjection,x=f.ellipsoid;h.fromElements(g.y,g.z,g.x,g);let _=f.unproject(g,R8);x.cartographicToCartesian(_,g);let C=Gt.eastNorthUpToFixedFrame(g,x,S_e),V=e._globe,L=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let Z=M.clone(o.transform,C_e);o._setTransform(C),Jd(e,t,n,h.UNIT_Z),o._setTransform(Z),e._globe=V,e._ellipsoid=L;let G=L.maximumRadius;e._rotateFactor=1/G,e._rotateRateRangeAdjustment=G}function kpt(e,t,n){let i=e._scene,o=i.camera,r=e._cameraUnderground,s,a,c=h.UNIT_X;if(D.equals(t,e._tiltCenterMousePosition))s=h.clone(e._tiltCenter,p3);else{if(o.position.z<e._minimumPickingTerrainHeight&&(s=ab(e,t,p3)),!l(s)){a=o.getPickRay(t,f3);let b=a.origin,R=a.direction,E,I=h.dot(c,R);if(Math.abs(I)>W.EPSILON6&&(E=-h.dot(c,b)/I),!l(E)||E<=0){e._looking=!0,Qd(e,t,n),D.clone(t,e._tiltCenterMousePosition);return}s=h.multiplyByScalar(R,E,p3),h.add(b,s,s)}r&&(l(a)||(a=o.getPickRay(t,f3)),y_e(e,a,s,s)),D.clone(t,e._tiltCenterMousePosition),h.clone(s,e._tiltCenter)}let d=i.canvas,u=T_e;u.x=d.clientWidth/2,u.y=e._tiltCenterMousePosition.y,a=o.getPickRay(u,f3);let m=h.clone(h.ZERO,vpt);m.x=s.x;let p=dn.fromPointNormal(m,c,wpt),g=jn.rayPlane(a,p,Wpt),f=o._projection,x=f.ellipsoid;h.fromElements(s.y,s.z,s.x,s);let _=f.unproject(s,R8);x.cartographicToCartesian(_,s);let C=Gt.eastNorthUpToFixedFrame(s,x,S_e),V;l(g)?(h.fromElements(g.y,g.z,g.x,g),_=f.unproject(g,R8),x.cartographicToCartesian(_,g),V=Gt.eastNorthUpToFixedFrame(g,x,Ppt)):V=C;let L=e._globe,Z=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let G=h.UNIT_Z,X=M.clone(o.transform,C_e);o._setTransform(C);let v=h.cross(h.UNIT_Z,h.normalize(o.position,C8),C8),P=h.dot(o.right,v);if(Jd(e,t,n,G,!1,!0),o._setTransform(V),P<0){let b=n.startPosition.y-n.endPosition.y;(r&&b<0||!r&&b>0)&&(G=void 0);let R=o.constrainedAxis;o.constrainedAxis=void 0,Jd(e,t,n,G,!0,!1),o.constrainedAxis=R}else Jd(e,t,n,G,!0,!1);if(l(o.constrainedAxis)){let b=h.cross(o.direction,o.constrainedAxis,b3);h.equalsEpsilon(b,h.ZERO,W.EPSILON6)||(h.dot(b,o.right)<0&&h.negate(b,b),h.cross(b,o.direction,o.up),h.cross(o.direction,o.up,o.right),h.normalize(o.up,o.up),h.normalize(o.right,o.right))}o._setTransform(X),e._globe=L,e._ellipsoid=Z;let F=Z.maximumRadius;e._rotateFactor=1/F,e._rotateRateRangeAdjustment=F;let A=h.clone(o.positionWC,C8);if(e.enableCollisionDetection&&P8(e,!0),!h.equals(o.positionWC,A)){o._setTransform(V),o.worldToCameraCoordinatesPoint(A,A);let b=h.magnitudeSquared(A);h.magnitudeSquared(o.position)>b&&(h.normalize(o.position,o.position),h.multiplyByScalar(o.position,Math.sqrt(b),o.position));let R=h.angleBetween(A,o.position),E=h.cross(A,o.position,A);h.normalize(E,E);let I=we.fromAxisAngle(E,R,Fpt),w=$.fromQuaternion(I,Apt);$.multiplyByVector(w,o.direction,o.direction),$.multiplyByVector(w,o.up,o.up),h.cross(o.direction,o.up,o.right),h.cross(o.right,o.direction,o.up),o._setTransform(X)}}var V_e=new D,L_e=new pn,R_e=new h;function Upt(e,t,n){l(n.distance)&&(n=n.distance);let i=e._scene,o=i.camera,r=i.canvas,s=e._cameraUnderground,a;s?a=t:(a=V_e,a.x=r.clientWidth/2,a.y=r.clientHeight/2);let c=o.getPickRay(a,L_e),d=c.origin,u=c.direction,m=o.position.z,p;m<e._minimumPickingTerrainHeight&&(p=ab(e,a,R_e));let g;if(l(p)&&(g=h.distance(d,p)),s){let f=g_e(e,c,m);l(g)?g=Math.min(g,f):g=f}if(!l(g)){let f=h.UNIT_X;g=-h.dot(f,d)/h.dot(f,u)}E8(e,t,n,e._zoomFactor,g)}function Dpt(e){let n=e._scene.camera;if(!M.equals(M.IDENTITY,n.transform))ll(e,e.enableRotate,e.rotateEventTypes,Jd,e.inertiaSpin,"_lastInertiaSpinMovement"),ll(e,e.enableZoom,e.zoomEventTypes,G_e,e.inertiaZoom,"_lastInertiaZoomMovement");else{let i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),ll(e,e.enableTilt,e.tiltEventTypes,Mpt,e.inertiaSpin,"_lastInertiaTiltMovement"),ll(e,e.enableTranslate,e.translateEventTypes,Ipt,e.inertiaTranslate,"_lastInertiaTranslateMovement"),ll(e,e.enableZoom,e.zoomEventTypes,Upt,e.inertiaZoom,"_lastInertiaZoomMovement"),ll(e,e.enableLook,e.lookEventTypes,Qd),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){let o=n.createCorrectPositionTween(e.bounceAnimationTime);l(o)&&(e._tween=i.add(o))}i.update()}}var Bpt=new pn,Ypt=new dn(h.UNIT_X,0),Opt=new h,Hpt=new h;function X8(e,t,n){let i=e._scene,o=i.camera,r=o.getPickRay(t.endPosition,Bpt),s=h.clone(o.direction,Hpt);i.mode===oe.COLUMBUS_VIEW&&h.fromElements(s.z,s.x,s.y,s);let a=dn.fromPointNormal(n,s,Ypt),c=jn.rayPlane(r,a,Opt);l(c)&&(s=h.subtract(n,c,s),i.mode===oe.COLUMBUS_VIEW&&h.fromElements(s.y,s.z,s.x,s),h.add(o.position,s,o.position))}var l_e=new h,Z_e=new he,Z8=new h,G8=new ie,zpt=new h,Kpt=new h,Jpt=new h;function Qpt(e,t,n){let o=e._scene.camera,r=e._cameraUnderground,s=e._ellipsoid;if(!M.equals(o.transform,M.IDENTITY)){Jd(e,t,n);return}let a,c,d=s.geodeticSurfaceNormal(o.position,zpt);if(D.equals(t,e._rotateMousePosition)){if(e._looking)Qd(e,t,n,d);else if(e._rotating)Jd(e,t,n);else if(e._strafing)__e(e,n);else{if(h.magnitude(o.position)<h.magnitude(e._rotateStartPosition))return;a=h.magnitude(e._rotateStartPosition),c=Z8,c.x=c.y=c.z=a,s=ie.fromCartesian3(c,G8),L8(e,t,n,s)}return}e._looking=!1,e._rotating=!1,e._strafing=!1;let u=s.cartesianToCartographic(o.positionWC,Z_e).height,m=e._globe;if(l(m)&&u<e._minimumPickingTerrainHeight){let p=ab(e,n.startPosition,Jpt);if(l(p)){let g=!1,f=o.getPickRay(n.startPosition,b_e);if(r)g=!0,x_e(e,f,p,p);else{let x=s.geodeticSurfaceNormal(p,Kpt);Math.abs(h.dot(f.direction,x))<.05?g=!0:g=h.magnitude(o.position)<h.magnitude(p)}g?(D.clone(t,e._strafeEndMousePosition),h.clone(p,e._strafeStartPosition),e._strafing=!0,X8(e,n,e._strafeStartPosition)):(a=h.magnitude(p),c=Z8,c.x=c.y=c.z=a,s=ie.fromCartesian3(c,G8),L8(e,t,n,s),h.clone(p,e._rotateStartPosition))}else e._looking=!0,Qd(e,t,n,d)}else l(o.pickEllipsoid(n.startPosition,e._ellipsoid,l_e))?(L8(e,t,n,e._ellipsoid),h.clone(l_e,e._rotateStartPosition)):u>e._minimumTrackBallHeight?(e._rotating=!0,Jd(e,t,n)):(e._looking=!0,Qd(e,t,n,d));D.clone(t,e._rotateMousePosition)}function Jd(e,t,n,i,o,r){o=y(o,!1),r=y(r,!1);let s=e._scene,a=s.camera,c=s.canvas,d=a.constrainedAxis;l(i)&&(a.constrainedAxis=i);let u=h.magnitude(a.position),m=e._rotateFactor*(u-e._rotateRateRangeAdjustment);m>e._maximumRotateRate&&(m=e._maximumRotateRate),m<e._minimumRotateRate&&(m=e._minimumRotateRate);let p=(n.startPosition.x-n.endPosition.x)/c.clientWidth,g=(n.startPosition.y-n.endPosition.y)/c.clientHeight;p=Math.min(p,e.maximumMovementRatio),g=Math.min(g,e.maximumMovementRatio);let f=m*p*Math.PI*2,x=m*g*Math.PI;o||a.rotateRight(f),r||a.rotateUp(x),a.constrainedAxis=d}var V8=se.clone(se.UNIT_W),d_e=se.clone(se.UNIT_W),m3=new h,oL=new h,h3=new h,u_e=new h,jpt=new D,qpt=new D,$pt=new D,e0t=new D,t0t=new pn;function L8(e,t,n,i){let o=e._scene,r=o.camera,s=D.clone(n.startPosition,jpt),a=D.clone(n.endPosition,qpt),c=i.cartesianToCartographic(r.positionWC,Z_e).height,d,u;if(!n.inertiaEnabled&&c<e._minimumPickingTerrainHeight&&(d=h.clone(e._panLastWorldPosition,V8),!l(e._globe)&&!D.equalsEpsilon(s,e._panLastMousePosition)&&(d=ab(e,s,V8)),!l(e._globe)&&l(d))){let m=h.subtract(d,r.positionWC,oL),p=h.multiplyByScalar(r.directionWC,h.dot(r.directionWC,m),oL),g=h.magnitude(p),f=r.frustum.getPixelDimensions(o.drawingBufferWidth,o.drawingBufferHeight,g,o.pixelRatio,e0t),x=D.subtract(a,s,$pt),_=h.multiplyByScalar(r.rightWC,x.x*f.x,oL),C=h.normalize(r.positionWC,p_e),V=r.getPickRay(a,t0t).direction,L=h.subtract(V,h.projectVector(V,r.rightWC,h3),h3),Z=h.angleBetween(L,r.directionWC),G=1;l(r.frustum.fov)&&(G=Math.max(Math.tan(Z),.1));let X=Math.abs(h.dot(r.directionWC,C)),v=-x.y*f.y*2/Math.sqrt(G)*(1-X),P=h.multiplyByScalar(V,v,h3);X=Math.abs(h.dot(r.upWC,C));let F=h.multiplyByScalar(r.upWC,-x.y*(1-X)*f.y,u_e);u=h.add(d,_,d_e),u=h.add(u,P,u),u=h.add(u,F,u),h.clone(u,e._panLastWorldPosition),D.clone(a,e._panLastMousePosition)}if((!l(d)||!l(u))&&(d=r.pickEllipsoid(s,i,V8),u=r.pickEllipsoid(a,i,d_e)),!l(d)||!l(u)){e._rotating=!0,Jd(e,t,n);return}if(d=r.worldToCameraCoordinates(d,d),u=r.worldToCameraCoordinates(u,u),l(r.constrainedAxis)){let m=r.constrainedAxis,p=h.mostOrthogonalAxis(m,m3);h.cross(p,m,p),h.normalize(p,p);let g=h.cross(m,p,oL),f=h.magnitude(d),x=h.dot(m,d),_=Math.acos(x/f),C=h.multiplyByScalar(m,x,h3);h.subtract(d,C,C),h.normalize(C,C);let V=h.magnitude(u),L=h.dot(m,u),Z=Math.acos(L/V),G=h.multiplyByScalar(m,L,u_e);h.subtract(u,G,G),h.normalize(G,G);let X=Math.acos(h.dot(C,p));h.dot(C,g)<0&&(X=W.TWO_PI-X);let v=Math.acos(h.dot(G,p));h.dot(G,g)<0&&(v=W.TWO_PI-v);let P=X-v,F;h.equalsEpsilon(m,r.position,W.EPSILON2)?F=r.right:F=h.cross(m,r.position,m3);let A=h.cross(m,F,m3),b=h.dot(A,h.subtract(d,m,oL)),R=h.dot(A,h.subtract(u,m,oL)),E;b>0&&R>0?E=Z-_:b>0&&R<=0?h.dot(r.position,m)>0?E=-_-Z:E=_+Z:E=_-Z,r.rotateRight(P),r.rotateUp(E)}else{h.normalize(d,d),h.normalize(u,u);let m=h.dot(d,u),p=h.cross(d,u,m3);if(m<1&&!h.equalsEpsilon(p,h.ZERO,W.EPSILON14)){let g=Math.acos(m);r.rotate(p,g)}}}var n0t=new h,i0t=new he,m_e=0;function G_e(e,t,n){l(n.distance)&&(n=n.distance);let i=n.inertiaEnabled,o=e._ellipsoid,r=e._scene,s=r.camera,a=r.canvas,c=e._cameraUnderground,d;c?d=t:(d=V_e,d.x=a.clientWidth/2,d.y=a.clientHeight/2);let u=s.getPickRay(d,L_e),m,p=o.cartesianToCartographic(s.position,i0t).height,g=Math.abs(m_e)<e.minimumPickingTerrainDistanceWithInertia;(i?g:p<e._minimumPickingTerrainHeight)&&(m=ab(e,d,R_e));let x;if(l(m)&&(x=h.distance(u.origin,m),m_e=x),c){let C=g_e(e,u,p);l(x)?x=Math.min(x,C):x=C}l(x)||(x=p);let _=h.normalize(s.position,n0t);E8(e,t,n,e._zoomFactor,x,h.dot(_,s.direction))}var E_e=new D,g3=new pn,s9=new h,o0t=new h,X_e=new M,r0t=new M,I_e=new M,s0t=new we,a0t=new $,I8=new he,W8=new h;function c0t(e,t,n){let o=e._scene.camera;if(!M.equals(o.transform,M.IDENTITY))return;if(l(n.angleAndHeight)&&(n=n.angleAndHeight),D.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking){let a=e._ellipsoid.geodeticSurfaceNormal(o.position,W8);Qd(e,t,n,a);return}let s=e._ellipsoid.cartesianToCartographic(o.position,I8);e._tiltOnEllipsoid||s.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,d0t(e,t,n)):u0t(e,t,n)}var l0t=new he;function d0t(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e.minimumZoomDistance*.25,a=i.cartesianToCartographic(r.positionWC,l0t).height;if(a-s-1<W.EPSILON3&&n.endPosition.y-n.startPosition.y<0)return;let c=o.canvas,d=E_e;d.x=c.clientWidth/2,d.y=c.clientHeight/2;let u=r.getPickRay(d,g3),m,p=jn.rayEllipsoid(u,i);if(l(p))m=pn.getPoint(u,p.start,s9);else if(a>e._minimumTrackBallHeight){let V=jn.grazingAltitudeLocation(u,i);if(!l(V))return;let L=i.cartesianToCartographic(V,I8);L.height=0,m=i.cartographicToCartesian(L,s9)}else{e._looking=!0;let V=e._ellipsoid.geodeticSurfaceNormal(r.position,W8);Qd(e,t,n,V),D.clone(t,e._tiltCenterMousePosition);return}let g=Gt.eastNorthUpToFixedFrame(m,i,X_e),f=e._globe,x=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let _=M.clone(r.transform,I_e);r._setTransform(g),Jd(e,t,n,h.UNIT_Z),r._setTransform(_),e._globe=f,e._ellipsoid=x;let C=x.maximumRadius;e._rotateFactor=1/C,e._rotateRateRangeAdjustment=C}function u0t(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e._cameraUnderground,a,c,d;if(D.equals(t,e._tiltCenterMousePosition))a=h.clone(e._tiltCenter,s9);else{if(a=ab(e,t,s9),!l(a)){if(c=r.getPickRay(t,g3),d=jn.rayEllipsoid(c,i),!l(d)){if(i.cartesianToCartographic(r.position,I8).height<=e._minimumTrackBallHeight){e._looking=!0;let R=e._ellipsoid.geodeticSurfaceNormal(r.position,W8);Qd(e,t,n,R),D.clone(t,e._tiltCenterMousePosition)}return}a=pn.getPoint(c,d.start,s9)}s&&(l(c)||(c=r.getPickRay(t,g3)),y_e(e,c,a,a)),D.clone(t,e._tiltCenterMousePosition),h.clone(a,e._tiltCenter)}let u=o.canvas,m=E_e;m.x=u.clientWidth/2,m.y=e._tiltCenterMousePosition.y,c=r.getPickRay(m,g3);let p=h.magnitude(a),g=h.fromElements(p,p,p,Z8),f=ie.fromCartesian3(g,G8);if(d=jn.rayEllipsoid(c,f),!l(d))return;let x=h.magnitude(c.origin)>p?d.start:d.stop,_=pn.getPoint(c,x,o0t),C=Gt.eastNorthUpToFixedFrame(a,i,X_e),V=Gt.eastNorthUpToFixedFrame(_,f,r0t),L=e._globe,Z=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let G=h.UNIT_Z,X=M.clone(r.transform,I_e);r._setTransform(V);let v=h.cross(_,r.positionWC,b3);if(h.dot(r.rightWC,v)<0){let b=n.startPosition.y-n.endPosition.y;(s&&b<0||!s&&b>0)&&(G=void 0);let R=r.constrainedAxis;r.constrainedAxis=void 0,Jd(e,t,n,G,!0,!1),r.constrainedAxis=R}else Jd(e,t,n,G,!0,!1);if(r._setTransform(C),Jd(e,t,n,G,!1,!0),l(r.constrainedAxis)){let b=h.cross(r.direction,r.constrainedAxis,b3);h.equalsEpsilon(b,h.ZERO,W.EPSILON6)||(h.dot(b,r.right)<0&&h.negate(b,b),h.cross(b,r.direction,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.up,r.up),h.normalize(r.right,r.right))}r._setTransform(X),e._globe=L,e._ellipsoid=Z;let F=Z.maximumRadius;e._rotateFactor=1/F,e._rotateRateRangeAdjustment=F;let A=h.clone(r.positionWC,b3);if(e.enableCollisionDetection&&P8(e,!0),!h.equals(r.positionWC,A)){r._setTransform(V),r.worldToCameraCoordinatesPoint(A,A);let b=h.magnitudeSquared(A);h.magnitudeSquared(r.position)>b&&(h.normalize(r.position,r.position),h.multiplyByScalar(r.position,Math.sqrt(b),r.position));let R=h.angleBetween(A,r.position),E=h.cross(A,r.position,A);h.normalize(E,E);let I=we.fromAxisAngle(E,R,s0t),w=$.fromQuaternion(I,a0t);$.multiplyByVector(w,r.direction,r.direction),$.multiplyByVector(w,r.up,r.up),h.cross(r.direction,r.up,r.right),h.cross(r.right,r.direction,r.up),r._setTransform(X)}}var m0t=new D,h0t=new D,h_e=new pn,f_e=new pn,f0t=new h,p0t=new h;function Qd(e,t,n,i){let r=e._scene.camera,s=m0t;s.x=n.startPosition.x,s.y=0;let a=h0t;a.x=n.endPosition.x,a.y=0;let c=r.getPickRay(s,h_e),d=r.getPickRay(a,f_e),u=0,m,p;r.frustum instanceof sn?(m=c.origin,p=d.origin,h.add(r.direction,m,m),h.add(r.direction,p,p),h.subtract(m,r.position,m),h.subtract(p,r.position,p),h.normalize(m,m),h.normalize(p,p)):(m=c.direction,p=d.direction);let g=h.dot(m,p);g<1&&(u=Math.acos(g)),u=n.startPosition.x>n.endPosition.x?-u:u;let f=e._horizontalRotationAxis;if(l(i)?r.look(i,-u):l(f)?r.look(f,-u):r.lookLeft(u),s.x=0,s.y=n.startPosition.y,a.x=0,a.y=n.endPosition.y,c=r.getPickRay(s,h_e),d=r.getPickRay(a,f_e),u=0,r.frustum instanceof sn?(m=c.origin,p=d.origin,h.add(r.direction,m,m),h.add(r.direction,p,p),h.subtract(m,r.position,m),h.subtract(p,r.position,p),h.normalize(m,m),h.normalize(p,p)):(m=c.direction,p=d.direction),g=h.dot(m,p),g<1&&(u=Math.acos(g)),u=n.startPosition.y>n.endPosition.y?-u:u,i=y(i,f),l(i)){let x=r.direction,_=h.negate(i,f0t),C=h.equalsEpsilon(x,i,W.EPSILON2),V=h.equalsEpsilon(x,_,W.EPSILON2);if(!C&&!V){g=h.dot(x,i);let L=W.acosClamped(g);u>0&&u>L&&(u=L-W.EPSILON4),g=h.dot(x,_),L=W.acosClamped(g),u<0&&-u>L&&(u=-L+W.EPSILON4);let Z=h.cross(i,x,p0t);r.look(Z,u)}else(C&&u<0||V&&u>0)&&r.look(r.right,-u)}else r.lookUp(u)}function b0t(e){ll(e,e.enableRotate,e.rotateEventTypes,Qpt,e.inertiaSpin,"_lastInertiaSpinMovement"),ll(e,e.enableZoom,e.zoomEventTypes,G_e,e.inertiaZoom,"_lastInertiaZoomMovement"),ll(e,e.enableTilt,e.tiltEventTypes,c0t,e.inertiaSpin,"_lastInertiaTiltMovement"),ll(e,e.enableLook,e.lookEventTypes,Qd)}var g0t=new M,y0t=new he;function P8(e,t){e._adjustedHeightForTerrain=!0;let n=e._scene,i=n.mode,o=n.globe;if(i===oe.SCENE2D||i===oe.MORPHING)return;let r=n.camera,s=y(o?.ellipsoid,ie.WGS84),a=n.mapProjection,c,d;M.equals(r.transform,M.IDENTITY)||(c=M.clone(r.transform,g0t),d=h.magnitude(r.position),r._setTransform(M.IDENTITY));let u=y0t;i===oe.SCENE3D?s.cartesianToCartographic(r.position,u):a.unproject(r.position,u);let m=!1;if(u.height<e._minimumCollisionTerrainHeight){let p=e._scene.globeHeight;if(l(p)){let g=p+e.minimumZoomDistance,f=p-e._lastGlobeHeight,x=f/e._lastGlobeHeight;u.height<g&&(t||Math.abs(x)<=.1)&&(u.height=g,i===oe.SCENE3D?s.cartographicToCartesian(u,r.position):a.project(u,r.position),m=!0),t||Math.abs(x)<=.1?e._lastGlobeHeight=p:e._lastGlobeHeight+=f*.1}}l(c)&&(r._setTransform(c),m&&(h.normalize(r.position,r.position),h.negate(r.position,r.direction),h.multiplyByScalar(r.position,Math.max(d,e.minimumZoomDistance),r.position),h.normalize(r.direction,r.direction),h.cross(r.direction,r.up,r.right),h.cross(r.right,r.direction,r.up)))}a9.prototype.onMap=function(){let e=this._scene,t=e.mode,n=e.camera;return t===oe.COLUMBUS_VIEW?Math.abs(n.position.x)-this._maxCoord.x<0&&Math.abs(n.position.y)-this._maxCoord.y<0:!0};var x0t=new h,_0t=new h;a9.prototype.update=function(){let e=this._scene,{camera:t,globe:n,mode:i}=e;M.equals(t.transform,M.IDENTITY)?(this._globe=n,this._ellipsoid=l(this._globe)?this._globe.ellipsoid:e.mapProjection.ellipsoid):(this._globe=void 0,this._ellipsoid=ie.UNIT_SPHERE);let{verticalExaggeration:o,verticalExaggerationRelativeHeight:r}=e;this._minimumCollisionTerrainHeight=hr.getHeight(this.minimumCollisionTerrainHeight,o,r),this._minimumPickingTerrainHeight=hr.getHeight(this.minimumPickingTerrainHeight,o,r),this._minimumTrackBallHeight=hr.getHeight(this.minimumTrackBallHeight,o,r),this._cameraUnderground=e.cameraUnderground&&l(this._globe);let s=this._ellipsoid.maximumRadius;this._rotateFactor=1/s,this._rotateRateRangeAdjustment=s,this._adjustedHeightForTerrain=!1;let a=h.clone(t.positionWC,x0t),c=h.clone(t.directionWC,_0t);if(i===oe.SCENE2D?ypt(this):i===oe.COLUMBUS_VIEW?(this._horizontalRotationAxis=h.UNIT_Z,Dpt(this)):i===oe.SCENE3D&&(this._horizontalRotationAxis=void 0,b0t(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain){let d=!h.equals(a,t.positionWC)||!h.equals(c,t.directionWC);P8(this,d)}this._aggregator.reset()};a9.prototype.isDestroyed=function(){return!1};a9.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),me(this)};var c9=a9;var EUi=T(S(),1);var cUi=T(S(),1),l9=`uniform sampler2D colorTexture; +`,s=new fo({name:"czm_edge_detection_combine",fragmentShader:r,uniforms:n});return new sl({name:"czm_edge_detection_composite",stages:[t,s]})}Nr.createSilhouetteStage=function(e){let t=nmt(e),n=new fo({name:"czm_silhouette_color_edges",fragmentShader:AF,uniforms:{silhouetteTexture:t.name}});return new sl({name:"czm_silhouette",stages:[t,n],inputPreviousStageTexture:!1,uniforms:t.uniforms})};Nr.isSilhouetteSupported=function(e){return e.context.depthTexture};Nr.createBloomStage=function(){let e=new fo({name:"czm_bloom_contrast_bias",fragmentShader:RF,uniforms:{contrast:128,brightness:-.3}}),t=QD("czm_bloom_blur"),n=new sl({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),i=new fo({name:"czm_bloom_generate_composite",fragmentShader:ZF,uniforms:{glowOnly:!1,bloomTexture:n.name}}),o={};return Object.defineProperties(o,{glowOnly:{get:function(){return i.uniforms.glowOnly},set:function(r){i.uniforms.glowOnly=r}},contrast:{get:function(){return e.uniforms.contrast},set:function(r){e.uniforms.contrast=r}},brightness:{get:function(){return e.uniforms.brightness},set:function(r){e.uniforms.brightness=r}},delta:{get:function(){return t.uniforms.delta},set:function(r){t.uniforms.delta=r}},sigma:{get:function(){return t.uniforms.sigma},set:function(r){t.uniforms.sigma=r}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(r){t.uniforms.stepSize=r}}}),new sl({name:"czm_bloom",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})};Nr.createAmbientOcclusionStage=function(){let e=new fo({name:"czm_ambient_occlusion_generate",fragmentShader:TF,uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=QD("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;let n=new sl({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),i=new fo({name:"czm_ambient_occlusion_composite",fragmentShader:CF,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:n.name}}),o={};return Object.defineProperties(o,{intensity:{get:function(){return e.uniforms.intensity},set:function(r){e.uniforms.intensity=r}},bias:{get:function(){return e.uniforms.bias},set:function(r){e.uniforms.bias=r}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(r){e.uniforms.lengthCap=r}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(r){e.uniforms.stepSize=r}},frustumLength:{get:function(){return e.uniforms.frustumLength},set:function(r){e.uniforms.frustumLength=r}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(r){e.uniforms.randomTexture=r}},delta:{get:function(){return t.uniforms.delta},set:function(r){t.uniforms.delta=r}},sigma:{get:function(){return t.uniforms.sigma},set:function(r){t.uniforms.sigma=r}},blurStepSize:{get:function(){return t.uniforms.stepSize},set:function(r){t.uniforms.stepSize=r}},ambientOcclusionOnly:{get:function(){return i.uniforms.ambientOcclusionOnly},set:function(r){i.uniforms.ambientOcclusionOnly=r}}}),new sl({name:"czm_ambient_occlusion",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})};Nr.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var imt=`#define FXAA_QUALITY_PRESET 39 +${Bv} +${XF}`;Nr.createFXAAStage=function(){return new fo({name:"czm_FXAA",fragmentShader:imt,sampleMode:Bd.LINEAR})};Nr.createAcesTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE +`:"";return t+=SF,new fo({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0}})};Nr.createFilmicTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE +`:"";return t+=IF,new fo({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0}})};Nr.createReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE +`:"";return t+=FF,new fo({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0}})};Nr.createModifiedReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE +`:"";return t+=vF,new fo({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:Y.WHITE,autoExposure:void 0}})};Nr.createAutoExposureStage=function(){return new MF};Nr.createBlackAndWhiteStage=function(){return new fo({name:"czm_black_and_white",fragmentShader:VF,uniforms:{gradations:5}})};Nr.createBrightnessStage=function(){return new fo({name:"czm_brightness",fragmentShader:LF,uniforms:{brightness:.5}})};Nr.createNightVisionStage=function(){return new fo({name:"czm_night_vision",fragmentShader:wF})};Nr.createDepthViewStage=function(){return new fo({name:"czm_depth_view",fragmentShader:EF})};Nr.createLensFlareStage=function(){return new fo({name:"czm_lens_flare",fragmentShader:PF,uniforms:{dirtTexture:tn("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:tn("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:te.WGS84.maximumRadius}})};var tm=Nr;var hwi=S(T(),1);function n0(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function UF(e){for(;l(e.length);)e=e.get(e.length-1);return e.name}function dj(e,t,n,i,o){if(!i.enabled||!i._isSupported(t))return o;let r=n[i.name]={};if(l(o)){let a=e.getStageByName(o);r[UF(a)]=!0}let s=i.uniforms;if(l(s)){let a=Object.getOwnPropertyNames(s),c=a.length;for(let d=0;d<c;++d){let u=s[a[d]];if(typeof u=="string"){let m=e.getStageByName(u);l(m)&&(r[UF(m)]=!0)}}}return i.name}function NF(e,t,n,i,o){if(l(i.enabled)&&!i.enabled||l(i._isSupported)&&!i._isSupported(t))return o;let r=o,s=!l(i.inputPreviousStageTexture)||i.inputPreviousStageTexture,a=o,c=i.length;for(let m=0;m<c;++m){let p=i.get(m);l(p.length)?a=NF(e,t,n,p,o):a=dj(e,t,n,p,o),s&&(o=a)}let d,u;if(s)for(d=1;d<c;++d)u=UF(i.get(d)),l(n[u])||(n[u]={}),n[u][r]=!0;else for(d=1;d<c;++d){u=UF(i.get(d));let m=n[u];for(let p=0;p<d;++p)m[UF(i.get(p))]=!0}return a}function omt(e,t){let n={};if(l(e.ambientOcclusion)){let i=e.ambientOcclusion,o=e.bloom,r=e._tonemapping,s=e.fxaa,a=NF(e,t,n,i,void 0);a=NF(e,t,n,o,a),a=dj(e,t,n,r,a),a=NF(e,t,n,e,a),dj(e,t,n,s,a)}else NF(e,t,n,e,void 0);return n}function rmt(e,t,n){let o=e._collection.getStageByName(t),r=o._textureScale,s=o._forcePowerOfTwo,a=o._pixelFormat,c=o._pixelDatatype,d=o._clearColor,u,m,p=e._framebuffers,g=p.length;for(u=0;u<g;++u){if(m=p[u],r!==m.textureScale||s!==m.forcePowerOfTwo||a!==m.pixelFormat||c!==m.pixelDatatype||!Y.equals(d,m.clearColor))continue;let f=m.stages,x=f.length,_=!1;for(let C=0;C<x;++C)if(n[f[C]]){_=!0;break}if(!_)break}return l(m)&&u<g?(m.stages.push(t),m):(m={textureScale:r,forcePowerOfTwo:s,pixelFormat:a,pixelDatatype:c,clearColor:d,stages:[t],buffer:new ui({pixelFormat:a,pixelDatatype:c}),clear:void 0},p.push(m),m)}function smt(e,t){let n=omt(e._collection,t);for(let i in n)n.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=rmt(e,i,n[i]))}function uj(e){let t=e._framebuffers,n=t.length;for(let i=0;i<n;++i)t[i].buffer.destroy()}function amt(e,t){let n=e._width,i=e._height,o=e._framebuffers,r=o.length;for(let s=0;s<r;++s){let a=o[s],c=a.textureScale,d=Math.ceil(n*c),u=Math.ceil(i*c),m=Math.min(d,u);a.forcePowerOfTwo&&(X.isPowerOfTwo(m)||(m=X.nextPowerOfTwo(m)),d=m,u=m),a.buffer.update(t,d,u),a.clear=new ii({color:a.clearColor,framebuffer:a.buffer.framebuffer})}}n0.prototype.updateDependencies=function(){this._updateDependencies=!0};n0.prototype.update=function(e){let t=this._collection,n=this._updateDependencies,i=l(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),o=l(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),r=l(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),s=l(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),a=!l(t._activeStages)||t._activeStages.length>0||i||o||r||s;if((n||!a&&this._framebuffers.length>0)&&(uj(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),!n&&!a)return;this._framebuffers.length===0&&smt(this,e);let c=e.drawingBufferWidth,d=e.drawingBufferHeight,u=this._width!==c||this._height!==d;!n&&!u||(this._width=c,this._height=d,this._updateDependencies=!1,uj(this),amt(this,e))};n0.prototype.clear=function(e){let t=this._framebuffers;for(let n=0;n<t.length;++n)t[n].clear.execute(e)};n0.prototype.getStageByName=function(e){return this._collection.getStageByName(e)};n0.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)};n0.prototype.getFramebuffer=function(e){let t=this._stageNameToFramebuffer[e];if(l(t))return t.buffer.framebuffer};n0.prototype.isDestroyed=function(){return!1};n0.prototype.destroy=function(){return uj(this),me(this)};var XS=n0;var pwi=S(T(),1),kF={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===kF.REINHARD||e===kF.MODIFIED_REINHARD||e===kF.FILMIC||e===kF.ACES}},xy=Object.freeze(kF);var mj=[];function al(){let e=tm.createFXAAStage(),t=tm.createAmbientOcclusionStage(),n=tm.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=tm.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=xy.ACES;let i=this._tonemapping;e.enabled=!1,t.enabled=!1,n.enabled=!1,i.enabled=!1;let o=new XS(this),r={},s=mj;for(s.push(e,t,n,i);s.length>0;){let c=s.pop();r[c.name]=c,c._textureCache=o;let d=c.length;if(l(d))for(let u=0;u<d;++u)s.push(c.get(u))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;let a=this;t.uniforms.randomTexture=function(){return a._randomTexture},this._ao=t,this._bloom=n,this._fxaa=e,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._activeStagesChanged=!1,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=r,this._textureCache=o}Object.defineProperties(al.prototype,{ready:{get:function(){let e=!1,t=this._stages,n=t.length;for(let a=n-1;a>=0;--a){let c=t[a];e=e||c.ready&&c.enabled}let i=this._fxaa,o=this._ao,r=this._bloom,s=this._tonemapping;return e=e||i.ready&&i.enabled,e=e||o.ready&&o.enabled,e=e||r.ready&&r.enabled,e=e||s.ready&&s.enabled,e}},fxaa:{get:function(){return this._fxaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},length:{get:function(){return hj(this),this._stages.length}},outputTexture:{get:function(){let e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);let t=this._stages,n=t.length;for(let s=n-1;s>=0;--s){let a=t[s];if(l(a)&&a.ready&&a.enabled)return this.getOutputTexture(a.name)}let i=this._tonemapping;if(i.enabled&&i.ready)return this.getOutputTexture(i.name);let o=this._bloom;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);let r=this._ao;if(r.enabled&&r.ready)return this.getOutputTexture(r.name)}},hasSelected:{get:function(){let e=this._stages.slice();for(;e.length>0;){let t=e.pop();if(!l(t))continue;if(l(t.selected))return!0;let n=t.length;if(l(n))for(let i=0;i<n;++i)e.push(t.get(i))}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper===e)return;l(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());let t=this._autoExposureEnabled,n;switch(e){case xy.REINHARD:n=tm.createReinhardTonemappingStage(t);break;case xy.MODIFIED_REINHARD:n=tm.createModifiedReinhardTonemappingStage(t);break;case xy.FILMIC:n=tm.createFilmicTonemappingStage(t);break;default:n=tm.createAcesTonemappingStage(t);break}if(t){let i=this._autoExposure;n.uniforms.autoExposure=function(){return i.outputTexture}}this._tonemapper=e,this._tonemapping=n,l(this._stageNames)&&(this._stageNames[n.name]=n,n._textureCache=this._textureCache),this._textureCacheDirty=!0}}});function hj(e){if(!e._stagesRemoved)return;e._stagesRemoved=!1;let t=[],n=e._stages,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];s&&(s._index=r++,t.push(s))}e._stages=t}al.prototype.add=function(e){let t=this._stageNames,n=mj;for(n.push(e);n.length>0;){let o=n.pop();t[o.name]=o,o._textureCache=this._textureCache;let r=o.length;if(l(r))for(let s=0;s<r;++s)n.push(o.get(s))}let i=this._stages;return e._index=i.length,i.push(e),this._textureCacheDirty=!0,e};al.prototype.remove=function(e){if(!this.contains(e))return!1;let t=this._stageNames,n=mj;for(n.push(e);n.length>0;){let i=n.pop();delete t[i.name];let o=i.length;if(l(o))for(let r=0;r<o;++r)n.push(i.get(r))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0};al.prototype.contains=function(e){return l(e)&&l(e._index)&&e._textureCache===this._textureCache};al.prototype.get=function(e){return hj(this),this._stages[e]};al.prototype.removeAll=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)this.remove(e[n]);e.length=0};al.prototype.getStageByName=function(e){return this._stageNames[e]};al.prototype.update=function(e,t,n){hj(this);let i=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=i;let r=this._stages,s=o.length=r.length,a,c,d=0;for(a=0;a<s;++a)c=r[a],c.ready&&c.enabled&&c._isSupported(e)&&(o[d++]=c);o.length=d;let u=d!==i.length;if(!u){for(a=0;a<d;++a)if(o[a]!==i[a]){u=!0;break}}let m=this._ao,p=this._bloom,g=this._autoExposure,f=this._tonemapping,x=this._fxaa;f.enabled=n;let _=m.enabled&&m._isSupported(e),C=p.enabled&&p._isSupported(e),V=f.enabled&&f._isSupported(e),Z=x.enabled&&x._isSupported(e);if((u||this._textureCacheDirty||_!==this._aoEnabled||C!==this._bloomEnabled||V!==this._tonemappingEnabled||Z!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._aoEnabled=_,this._bloomEnabled=C,this._tonemappingEnabled=V,this._fxaaEnabled=Z,this._textureCacheDirty=!1),l(this._randomTexture)&&!_&&(this._randomTexture.destroy(),this._randomTexture=void 0),!l(this._randomTexture)&&_){s=256*256*3;let R=new Uint8Array(s);for(a=0;a<s;a+=3)R[a]=Math.floor(Math.random()*255);this._randomTexture=new Et({context:e,pixelFormat:at.RGB,pixelDatatype:Ke.UNSIGNED_BYTE,source:{arrayBufferView:R,width:256,height:256},sampler:new rn({wrapS:Cn.REPEAT,wrapT:Cn.REPEAT,minificationFilter:on.NEAREST,magnificationFilter:di.NEAREST})})}for(this._textureCache.update(e),x.update(e,t),m.update(e,t),p.update(e,t),f.update(e,t),this._autoExposureEnabled&&g.update(e,t),s=r.length,a=0;a<s;++a)r[a].update(e,t);for(d=0,a=0;a<s;++a)c=r[a],c.ready&&c.enabled&&c._isSupported(e)&&d++;u=d!==o.length,u&&this.update(e,t,n)};al.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)};function PS(e){for(;l(e.length);)e=e.get(e.length-1);return e.outputTexture}al.prototype.getOutputTexture=function(e){let t=this.getStageByName(e);if(l(t))return PS(t)};function Kf(e,t,n,i,o){if(l(e.execute)){e.execute(t,n,i,o);return}let r=e.length,s;if(e.inputPreviousStageTexture)for(Kf(e.get(0),t,n,i,o),s=1;s<r;++s)Kf(e.get(s),t,PS(e.get(s-1)),i,o);else for(s=0;s<r;++s)Kf(e.get(s),t,n,i,o)}al.prototype.execute=function(e,t,n,i){let o=this._activeStages,r=o.length,s=this._fxaa,a=this._ao,c=this._bloom,d=this._autoExposure,u=this._tonemapping,m=a.enabled&&a._isSupported(e),p=c.enabled&&c._isSupported(e),g=this._autoExposureEnabled,f=u.enabled&&u._isSupported(e),x=s.enabled&&s._isSupported(e);if(!x&&!m&&!p&&!f&&r===0)return;let _=t;m&&a.ready&&(Kf(a,e,_,n,i),_=PS(a)),p&&c.ready&&(Kf(c,e,_,n,i),_=PS(c)),g&&d.ready&&Kf(d,e,_,n,i),f&&u.ready&&(Kf(u,e,_,n,i),_=PS(u));let C=_;if(r>0){Kf(o[0],e,_,n,i);for(let V=1;V<r;++V)Kf(o[V],e,PS(o[V-1]),n,i);C=PS(o[r-1])}x&&s.ready&&Kf(s,e,C,n,i)};al.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(Ql,{uniformMap:{colorTexture:function(){return n.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};al.prototype.isDestroyed=function(){return!1};al.prototype.destroy=function(){return this._fxaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),me(this)};var DF=al;var lFi=S(T(),1);var Owi=S(T(),1);var Xwi=S(T(),1),cmt={SHIFT:0,CTRL:1,ALT:2},ba=Object.freeze(cmt);var vwi=S(T(),1),lmt={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},Sn=Object.freeze(lmt);function _y(e,t,n){let i=e._element;if(i===document)return n.x=t.clientX,n.y=t.clientY,n;let o=i.getBoundingClientRect();return n.x=t.clientX-o.left,n.y=t.clientY-o.top,n}function xj(e,t){let n=e;return l(t)&&(n+=`+${t}`),n}function vS(e){if(e.shiftKey)return ba.SHIFT;if(e.ctrlKey)return ba.CTRL;if(e.altKey)return ba.ALT}var Rs={LEFT:0,MIDDLE:1,RIGHT:2};function Yd(e,t,n,i){function o(r){i(e,r)}Yt.isInternetExplorer()?n.addEventListener(t,o,!1):n.addEventListener(t,o,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,o,!1)})}function dmt(e){let t=e._element,n=l(t.disableRootEvents)?t:document;Yt.supportsPointerEvents()?(Yd(e,"pointerdown",t,bmt),Yd(e,"pointerup",t,cxe),Yd(e,"pointermove",t,gmt),Yd(e,"pointercancel",t,cxe)):(Yd(e,"mousedown",t,lxe),Yd(e,"mouseup",n,dxe),Yd(e,"mousemove",n,uxe),Yd(e,"touchstart",t,fmt),Yd(e,"touchend",n,ixe),Yd(e,"touchmove",n,pmt),Yd(e,"touchcancel",n,ixe)),Yd(e,"dblclick",t,mmt);let i;"onwheel"in t?i="wheel":document.onmousewheel!==void 0?i="mousewheel":i="DOMMouseScroll",Yd(e,i,t,hmt)}function umt(e){let t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}var $ye={position:new D};function _j(e){e._lastSeenTouchEvent=gi()}function Sj(e){return gi()-e._lastSeenTouchEvent>Ch.mouseEmulationIgnoreMilliseconds}function yj(e,t,n){let i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)<n}function lxe(e,t){if(!Sj(e))return;let n=t.button;e._buttonDown[n]=!0;let i;if(n===Rs.LEFT)i=Sn.LEFT_DOWN;else if(n===Rs.MIDDLE)i=Sn.MIDDLE_DOWN;else if(n===Rs.RIGHT)i=Sn.RIGHT_DOWN;else return;let o=_y(e,t,e._primaryPosition);D.clone(o,e._primaryStartPosition),D.clone(o,e._primaryPreviousPosition);let r=vS(t),s=e.getInputAction(i,r);l(s)&&(D.clone(o,$ye.position),s($ye),t.preventDefault())}var exe={position:new D},txe={position:new D};function fj(e,t,n,i){let o=vS(i),r=e.getInputAction(t,o),s=e.getInputAction(n,o);if(l(r)||l(s)){let a=_y(e,i,e._primaryPosition);if(l(r)&&(D.clone(a,exe.position),r(exe)),l(s)){let c=e._primaryStartPosition;yj(c,a,e._clickPixelTolerance)&&(D.clone(a,txe.position),s(txe))}}}function dxe(e,t){if(!Sj(e))return;let n=t.button;n!==Rs.LEFT&&n!==Rs.MIDDLE&&n!==Rs.RIGHT||(e._buttonDown[Rs.LEFT]&&(fj(e,Sn.LEFT_UP,Sn.LEFT_CLICK,t),e._buttonDown[Rs.LEFT]=!1),e._buttonDown[Rs.MIDDLE]&&(fj(e,Sn.MIDDLE_UP,Sn.MIDDLE_CLICK,t),e._buttonDown[Rs.MIDDLE]=!1),e._buttonDown[Rs.RIGHT]&&(fj(e,Sn.RIGHT_UP,Sn.RIGHT_CLICK,t),e._buttonDown[Rs.RIGHT]=!1))}var pj={startPosition:new D,endPosition:new D};function uxe(e,t){if(!Sj(e))return;let n=vS(t),i=_y(e,t,e._primaryPosition),o=e._primaryPreviousPosition,r=e.getInputAction(Sn.MOUSE_MOVE,n);l(r)&&(D.clone(o,pj.startPosition),D.clone(i,pj.endPosition),r(pj)),D.clone(i,o),(e._buttonDown[Rs.LEFT]||e._buttonDown[Rs.MIDDLE]||e._buttonDown[Rs.RIGHT])&&t.preventDefault()}var nxe={position:new D};function mmt(e,t){let n=t.button,i;if(n===Rs.LEFT)i=Sn.LEFT_DOUBLE_CLICK;else return;let o=vS(t),r=e.getInputAction(i,o);l(r)&&(_y(e,t,nxe.position),r(nxe))}function hmt(e,t){let n;if(l(t.deltaY)){let r=t.deltaMode;r===t.DOM_DELTA_PIXEL?n=-t.deltaY:r===t.DOM_DELTA_LINE?n=-t.deltaY*40:n=-t.deltaY*120}else t.detail>0?n=t.detail*-120:n=t.wheelDelta;if(!l(n))return;let i=vS(t),o=e.getInputAction(Sn.WHEEL,i);l(o)&&(o(n),t.preventDefault())}function fmt(e,t){_j(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.set(s,_y(e,r,new D));jD(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.set(s,D.clone(a.get(s)))}function ixe(e,t){_j(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.remove(s);jD(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.remove(s)}var oxe={position:new D},bj={position1:new D,position2:new D},rxe={position:new D},sxe={position:new D},axe={position:new D};function jD(e,t){let n=vS(t),i=e._positions,o=i.length,r,s,a=e._isPinching;if(o!==1&&e._buttonDown[Rs.LEFT]){if(e._buttonDown[Rs.LEFT]=!1,l(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),r=e.getInputAction(Sn.LEFT_UP,n),l(r)&&(D.clone(e._primaryPosition,rxe.position),r(rxe)),o===0&&!e._isTouchHolding&&(s=e.getInputAction(Sn.LEFT_CLICK,n),l(s))){let c=e._primaryStartPosition,d=e._previousPositions.values[0];yj(c,d,e._clickPixelTolerance)&&(D.clone(e._primaryPosition,sxe.position),s(sxe))}e._isTouchHolding=!1}if(o===0&&a&&(e._isPinching=!1,r=e.getInputAction(Sn.PINCH_END,n),l(r)&&r()),o===1&&!a){let c=i.values[0];D.clone(c,e._primaryPosition),D.clone(c,e._primaryStartPosition),D.clone(c,e._primaryPreviousPosition),e._buttonDown[Rs.LEFT]=!0,r=e.getInputAction(Sn.LEFT_DOWN,n),l(r)&&(D.clone(c,oxe.position),r(oxe)),e._touchHoldTimer=setTimeout(function(){if(!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,s=e.getInputAction(Sn.RIGHT_CLICK,n),l(s))){let d=e._primaryStartPosition,u=e._previousPositions.values[0];yj(d,u,e._holdPixelTolerance)&&(D.clone(e._primaryPosition,axe.position),s(axe))}},Ch.touchHoldDelayMilliseconds),t.preventDefault()}o===2&&!a&&(e._isPinching=!0,r=e.getInputAction(Sn.PINCH_START,n),l(r)&&(D.clone(i.values[0],bj.position1),D.clone(i.values[1],bj.position2),r(bj),t.preventDefault()))}function pmt(e,t){_j(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i){r=n[i],s=r.identifier;let d=a.get(s);l(d)&&_y(e,r,d)}mxe(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,D.clone(a.get(s),c.get(s))}var gj={startPosition:new D,endPosition:new D},BF={distance:{startPosition:new D,endPosition:new D},angleAndHeight:{startPosition:new D,endPosition:new D}};function mxe(e,t){let n=vS(t),i=e._positions,o=e._previousPositions,r=i.length,s;if(r===1&&e._buttonDown[Rs.LEFT]){let a=i.values[0];D.clone(a,e._primaryPosition);let c=e._primaryPreviousPosition;s=e.getInputAction(Sn.MOUSE_MOVE,n),l(s)&&(D.clone(c,gj.startPosition),D.clone(a,gj.endPosition),s(gj)),D.clone(a,c),t.preventDefault()}else if(r===2&&e._isPinching&&(s=e.getInputAction(Sn.PINCH_MOVE,n),l(s))){let a=i.values[0],c=i.values[1],d=o.values[0],u=o.values[1],m=c.x-a.x,p=c.y-a.y,g=Math.sqrt(m*m+p*p)*.25,f=u.x-d.x,x=u.y-d.y,_=Math.sqrt(f*f+x*x)*.25,C=(c.y+a.y)*.125,V=(u.y+d.y)*.125,Z=Math.atan2(p,m),R=Math.atan2(x,f);D.fromElements(0,_,BF.distance.startPosition),D.fromElements(0,g,BF.distance.endPosition),D.fromElements(R,V,BF.angleAndHeight.startPosition),D.fromElements(Z,C,BF.angleAndHeight.endPosition),s(BF)}}function bmt(e,t){if(t.target.setPointerCapture(t.pointerId),t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.set(i,_y(e,t,new D)),jD(e,t),e._previousPositions.set(i,D.clone(n.get(i)))}else lxe(e,t)}function cxe(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.remove(i),jD(e,t),e._previousPositions.remove(i)}else dxe(e,t)}function gmt(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId,o=n.get(i);if(!l(o))return;_y(e,t,o),mxe(e,t);let r=e._previousPositions;D.clone(n.get(i),r.get(i))}else uxe(e,t)}function Ch(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-Ch.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new D,this._primaryPosition=new D,this._primaryPreviousPosition=new D,this._positions=new Ct,this._previousPositions=new Ct,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=y(e,document),dmt(this)}Ch.prototype.setInputAction=function(e,t,n){let i=xj(t,n);this._inputEvents[i]=e};Ch.prototype.getInputAction=function(e,t){let n=xj(e,t);return this._inputEvents[n]};Ch.prototype.removeInputAction=function(e,t){let n=xj(e,t);delete this._inputEvents[n]};Ch.prototype.isDestroyed=function(){return!1};Ch.prototype.destroy=function(){return umt(this),me(this)};Ch.mouseEmulationIgnoreMilliseconds=800;Ch.touchHoldDelayMilliseconds=1500;var Od=Ch;function wS(e){this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}wS.prototype.completeMorph=function(){l(this._completeMorph)&&this._completeMorph()};wS.prototype.morphTo2D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;this._previousMode=n.mode,this._morphToOrthographic=n.camera.frustum instanceof sn,!(this._previousMode===oe.SCENE2D||this._previousMode===oe.MORPHING)&&(this._scene.morphStart.raiseEvent(this,this._previousMode,oe.SCENE2D,!0),n._mode=oe.MORPHING,n.camera._setTransform(A.IDENTITY),this._previousMode===oe.COLUMBUS_VIEW?Qmt(this,e):iht(this,e,t),e===0&&l(this._completeMorph)&&this._completeMorph())};var ymt=new h,xmt=new h,_mt=new h,Smt=new h,Tmt=new h,Cmt=new h,Vmt=new h,Zmt=new he,Lmt=new A,Rmt=new Ti,Gmt=new sn,Emt={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};wS.prototype.morphToColumbusView=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,this._previousMode===oe.COLUMBUS_VIEW||this._previousMode===oe.MORPHING)return;this._scene.morphStart.raiseEvent(this,this._previousMode,oe.COLUMBUS_VIEW,!0),n.camera._setTransform(A.IDENTITY);let i=ymt,o=xmt,r=_mt;if(e>0)i.x=0,i.y=-1,i.z=1,i=h.multiplyByScalar(h.normalize(i,i),5*t.maximumRadius,i),h.negate(h.normalize(i,o),o),h.cross(h.UNIT_X,o,r);else{let d=n.camera;if(this._previousMode===oe.SCENE2D)h.clone(d.position,i),i.z=d.frustum.right-d.frustum.left,h.negate(h.UNIT_Z,o),h.clone(h.UNIT_Y,r);else{h.clone(d.positionWC,i),h.clone(d.directionWC,o),h.clone(d.upWC,r);let u=t.scaleToGeodeticSurface(i,Vmt),m=Gt.eastNorthUpToFixedFrame(u,t,Lmt);A.inverseTransformation(m,m),n.mapProjection.project(t.cartesianToCartographic(i,Zmt),i),A.multiplyByPointAsVector(m,o,o),A.multiplyByPointAsVector(m,r,r)}}let s;this._morphToOrthographic?(s=Gmt,s.width=n.camera.frustum.right-n.camera.frustum.left,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight):(s=Rmt,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,s.fov=X.toRadians(60));let a=Emt;a.position=i,a.direction=o,a.up=r,a.frustum=s;let c=rht(a);YF(this,c),this._previousMode===oe.SCENE2D?oht(this,e,a,c):(a.position2D=A.multiplyByPoint(io.TRANSFORM_2D,i,Smt),a.direction2D=A.multiplyByPointAsVector(io.TRANSFORM_2D,o,Tmt),a.up2D=A.multiplyByPointAsVector(io.TRANSFORM_2D,r,Cmt),n._mode=oe.MORPHING,Cxe(this,e,a,c)),e===0&&l(this._completeMorph)&&this._completeMorph()};var Vj={position:new h,direction:new h,up:new h,frustum:void 0},fxe=new Ti;wS.prototype.morphTo3D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,!(this._previousMode===oe.SCENE3D||this._previousMode===oe.MORPHING)){if(this._scene.morphStart.raiseEvent(this,this._previousMode,oe.SCENE3D,!0),n._mode=oe.MORPHING,n.camera._setTransform(A.IDENTITY),this._previousMode===oe.SCENE2D)Umt(this,e,t);else{let i;e>0?(i=Vj,h.fromDegrees(0,0,5*t.maximumRadius,t,i.position),h.negate(i.position,i.direction),h.normalize(i.direction,i.direction),h.clone(h.UNIT_Z,i.up)):i=pxe(this,t);let o,r=n.camera;r.frustum instanceof sn?o=r.frustum.clone():(o=fxe,o.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,o.fov=X.toRadians(60)),i.frustum=o;let s=Zxe(i);YF(this,s),Cj(this,e,i,s)}e===0&&l(this._completeMorph)&&this._completeMorph()}};wS.prototype.isDestroyed=function(){return!1};wS.prototype.destroy=function(){return qD(this),me(this)};function YF(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new Od(e._scene.canvas);let n=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=n,e._morphHandler.setInputAction(n,Sn.LEFT_DOWN),e._morphHandler.setInputAction(n,Sn.MIDDLE_DOWN),e._morphHandler.setInputAction(n,Sn.RIGHT_DOWN),e._morphHandler.setInputAction(n,Sn.WHEEL)}}function qD(e){let t=e._currentTweens;for(let n=0;n<t.length;++n)t[n].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}var Wmt=new he,Imt=new h,Xmt=new A;function pxe(e,t){let n=e._scene,i=n.camera,o=Vj,r=o.position,s=o.direction,a=o.up,c=n.mapProjection.unproject(i.position,Wmt);t.cartographicToCartesian(c,r);let d=t.scaleToGeodeticSurface(r,Imt),u=Gt.eastNorthUpToFixedFrame(d,t,Xmt);return A.multiplyByPointAsVector(u,i.direction,s),A.multiplyByPointAsVector(u,i.up,a),o}var Pmt=new h,vmt=new h,wmt=new h,Fmt=new h,Amt=new h,Mmt=new h;function Cj(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=h.clone(r.position,Pmt),a=h.clone(r.direction,vmt),c=h.clone(r.up,wmt),d=A.multiplyByPoint(io.TRANSFORM_2D_INVERSE,n.position,Fmt),u=A.multiplyByPointAsVector(io.TRANSFORM_2D_INVERSE,n.direction,Amt),m=A.multiplyByPointAsVector(io.TRANSFORM_2D_INVERSE,n.up,Mmt);function p(f){nm(s,d,f.time,r.position),nm(a,u,f.time,r.direction),nm(c,m,f.time,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.right,r.right)}let g=o.tweens.add({duration:t,easingFunction:Ar.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){Vxe(e,o,0,1,t,i)}});e._currentTweens.push(g)}var Nmt=new sn,bxe=new h,gxe=new h,yxe=new h,Zj=new h,xxe=new h,_xe=new h;function Umt(e,t,n){t/=3;let i=e._scene,o=i.camera,r;t>0?(r=Vj,h.fromDegrees(0,0,5*n.maximumRadius,n,r.position),h.negate(r.position,r.direction),h.normalize(r.direction,r.direction),h.clone(h.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=pxe(e,n));let s;e._morphToOrthographic?(s=Nmt,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.width=o.frustum.right-o.frustum.left):(s=fxe,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.fov=X.toRadians(60)),r.frustum=s;let a=Zxe(r);YF(e,a);let c;e._morphToOrthographic?c=function(){Cj(e,t,r,a)}:c=function(){Txe(e,t,r,function(){Cj(e,t,r,a)})},t>0?(i._mode=oe.SCENE2D,o.flyTo({duration:t,destination:h.fromDegrees(0,0,5*n.maximumRadius,n,Zj),complete:function(){i._mode=oe.MORPHING,c()}})):c()}function nm(e,t,n,i){return h.lerp(e,t,n,i)}function Sxe(e,t,n,i,o){let r=e._scene,s=r.camera;if(s.frustum instanceof sn)return;let a=s.frustum.fov,c=X.RADIANS_PER_DEGREE*.5,d=n.position.z*Math.tan(a*.5);s.frustum.far=d/Math.tan(c*.5)+1e7;function u(p){s.frustum.fov=X.lerp(a,c,p.time);let g=d/Math.tan(s.frustum.fov*.5);i(s,g)}let m=r.tweens.add({duration:t,easingFunction:Ar.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:u,complete:function(){s.frustum=n.frustum.clone(),o(e)}});e._currentTweens.push(m)}var kmt=new h,Dmt=new h,Bmt=new h,Tj=new h,Ymt=new h,Omt=new h,zmt=new Vr,Kmt=new pn,Hmt=new h,Jmt={position:void 0,direction:void 0,up:void 0,frustum:void 0};function Qmt(e,t){t*=.5;let n=e._scene,i=n.camera,o=h.clone(i.position,kmt),r=h.clone(i.direction,Dmt),s=h.clone(i.up,Bmt),a=h.negate(h.UNIT_Z,Ymt),c=h.clone(h.UNIT_Y,Omt),d=Tj;if(t>0)h.clone(h.ZERO,Tj),d.z=5*n.ellipsoid.maximumRadius;else{h.clone(o,Tj);let _=Kmt;A.multiplyByPoint(io.TRANSFORM_2D,o,_.origin),A.multiplyByPointAsVector(io.TRANSFORM_2D,r,_.direction);let C=n.globe;if(l(C)){let V=C.pickWorldCoordinates(_,n,!0,Hmt);l(V)&&(A.multiplyByPoint(io.TRANSFORM_2D_INVERSE,V,d),d.z+=h.distance(o,d))}}let u=zmt;u.right=d.z*.5,u.left=-u.right,u.top=u.right*(n.drawingBufferHeight/n.drawingBufferWidth),u.bottom=-u.top;let m=Jmt;m.position=d,m.direction=a,m.up=c,m.frustum=u;let p=Lxe(m);YF(e,p);function g(_){nm(o,d,_.time,i.position),nm(r,a,_.time,i.direction),nm(s,c,_.time,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i._adjustOrthographicFrustum(!0)}function f(_,C){_.position.z=C}let x=n.tweens.add({duration:t,easingFunction:Ar.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:g,complete:function(){Sxe(e,t,m,f,p)}});e._currentTweens.push(x)}var hxe=new he,jmt={position:new h,direction:new h,up:new h,position2D:new h,direction2D:new h,up2D:new h,frustum:new Vr},qmt={position:new h,direction:new h,up:new h,frustum:void 0},$mt=new h,eht=new pn,tht=new A,nht=new h;function iht(e,t,n){t*=.5;let i=e._scene,o=i.camera,r=jmt;if(t>0)h.clone(h.ZERO,r.position),r.position.z=5*n.maximumRadius,h.negate(h.UNIT_Z,r.direction),h.clone(h.UNIT_Y,r.up);else{n.cartesianToCartographic(o.positionWC,hxe),i.mapProjection.project(hxe,r.position),h.negate(h.UNIT_Z,r.direction),h.clone(h.UNIT_Y,r.up);let m=eht;h.clone(r.position2D,m.origin);let p=h.clone(o.directionWC,m.direction),g=n.scaleToGeodeticSurface(o.positionWC,nht),f=Gt.eastNorthUpToFixedFrame(g,n,tht);A.inverseTransformation(f,f),A.multiplyByPointAsVector(f,p,p),A.multiplyByPointAsVector(io.TRANSFORM_2D,p,p);let x=i.globe;if(l(x)){let _=x.pickWorldCoordinates(m,i,!0,$mt);if(l(_)){let C=h.distance(r.position2D,_);_.x+=C,h.clone(_,r.position2D)}}}function s(m,p){m.position.x=p}A.multiplyByPoint(io.TRANSFORM_2D,r.position,r.position2D),A.multiplyByPointAsVector(io.TRANSFORM_2D,r.direction,r.direction2D),A.multiplyByPointAsVector(io.TRANSFORM_2D,r.up,r.up2D);let a=r.frustum;a.right=r.position.z*.5,a.left=-a.right,a.top=a.right*(i.drawingBufferHeight/i.drawingBufferWidth),a.bottom=-a.top;let c=qmt;A.multiplyByPoint(io.TRANSFORM_2D_INVERSE,r.position2D,c.position),h.clone(r.direction,c.direction),h.clone(r.up,c.up),c.frustum=a;let d=Lxe(c);YF(e,d);function u(){Sxe(e,t,r,s,d)}Cxe(e,t,r,u)}function Txe(e,t,n,i){let o=e._scene,r=o.camera,s=r.frustum.right-r.frustum.left;r.frustum=n.frustum.clone();let a=r.frustum.fov,c=X.RADIANS_PER_DEGREE*.5,d=s*Math.tan(a*.5);r.frustum.far=d/Math.tan(c*.5)+1e7,r.frustum.fov=c;function u(p){r.frustum.fov=X.lerp(c,a,p.time),r.position.z=d/Math.tan(r.frustum.fov*.5)}let m=o.tweens.add({duration:t,easingFunction:Ar.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:u,complete:function(){i(e)}});e._currentTweens.push(m)}function oht(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=h.clone(n.position,Zj),a=h.clone(n.direction,xxe),c=h.clone(n.up,_xe);o._mode=oe.MORPHING;function d(){r.frustum=n.frustum.clone();let u=h.clone(r.position,bxe),m=h.clone(r.direction,gxe),p=h.clone(r.up,yxe);u.z=s.z;function g(x){nm(u,s,x.time,r.position),nm(m,a,x.time,r.direction),nm(p,c,x.time,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.right,r.right)}let f=o.tweens.add({duration:t,easingFunction:Ar.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:g,complete:function(){i(e)}});e._currentTweens.push(f)}e._morphToOrthographic?d():Txe(e,0,n,d)}function Cxe(e,t,n,i){let o=e._scene,r=o.camera,s=h.clone(r.position,bxe),a=h.clone(r.direction,gxe),c=h.clone(r.up,yxe),d=h.clone(n.position2D,Zj),u=h.clone(n.direction2D,xxe),m=h.clone(n.up2D,_xe);function p(f){nm(s,d,f.time,r.position),nm(a,u,f.time,r.direction),nm(c,m,f.time,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.right,r.right),r._adjustOrthographicFrustum(!0)}let g=o.tweens.add({duration:t,easingFunction:Ar.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){Vxe(e,o,1,0,t,i)}});e._currentTweens.push(g)}function Vxe(e,t,n,i,o,r){let s={object:t,property:"morphTime",startValue:n,stopValue:i,duration:o,easingFunction:Ar.QUARTIC_OUT};l(r)&&(s.complete=function(){r(e)});let a=t.tweens.addProperty(s);e._currentTweens.push(a)}function Zxe(e){return function(t){let n=t._scene;n._mode=oe.SCENE3D,n.morphTime=oe.getMorphTime(oe.SCENE3D),qD(t);let i=n.camera;(t._previousMode!==oe.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,h.clone(e.position,i.position),h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i.frustum=e.frustum.clone());let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,oe.SCENE3D,r)}}function Lxe(e){return function(t){let n=t._scene;n._mode=oe.SCENE2D,n.morphTime=oe.getMorphTime(oe.SCENE2D),qD(t);let i=n.camera;h.clone(e.position,i.position),i.position.z=n.ellipsoid.maximumRadius*2,h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i.frustum=e.frustum.clone();let o=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,oe.SCENE2D,o)}}function rht(e){return function(t){let n=t._scene;n._mode=oe.COLUMBUS_VIEW,n.morphTime=oe.getMorphTime(oe.COLUMBUS_VIEW),qD(t);let i=n.camera;(t._previousModeMode!==oe.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,h.clone(e.position,i.position),h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right));let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,oe.COLUMBUS_VIEW,r)}}var OF=wS;var o9i=S(T(),1);var SFi=S(T(),1);var uFi=S(T(),1),sht={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},Wi=Object.freeze(sht);function Cc(e,t){let n=e;return l(t)&&(n+=`+${t}`),n}function aht(e,t){D.clone(e.distance.startPosition,t.distance.startPosition),D.clone(e.distance.endPosition,t.distance.endPosition),D.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),D.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function Rxe(e,t,n){let i=Cc(Wi.PINCH,t),o=e._update,r=e._isDown,s=e._eventStartPosition,a=e._pressTime,c=e._releaseTime;o[i]=!0,r[i]=!1,s[i]=new D;let d=e._movement[i];l(d)||(d=e._movement[i]={}),d.distance={startPosition:new D,endPosition:new D},d.angleAndHeight={startPosition:new D,endPosition:new D},d.prevAngle=0,e._eventHandler.setInputAction(function(u){e._buttonsDown++,r[i]=!0,a[i]=new Date,D.lerp(u.position1,u.position2,.5,s[i])},Sn.PINCH_START,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[i]=!1,c[i]=new Date},Sn.PINCH_END,t),e._eventHandler.setInputAction(function(u){if(r[i]){o[i]?(aht(u,d),o[i]=!1,d.prevAngle=d.angleAndHeight.startPosition.x):(D.clone(u.distance.endPosition,d.distance.endPosition),D.clone(u.angleAndHeight.endPosition,d.angleAndHeight.endPosition));let m=d.angleAndHeight.endPosition.x,p=d.prevAngle,g=Math.PI*2;for(;m>=p+Math.PI;)m-=g;for(;m<p-Math.PI;)m+=g;d.angleAndHeight.endPosition.x=-m*n.clientWidth/12,d.angleAndHeight.startPosition.x=-p*n.clientWidth/12}},Sn.PINCH_MOVE,t)}function Gxe(e,t){let n=Cc(Wi.WHEEL,t),i=e._pressTime,o=e._releaseTime,r=e._update;r[n]=!0;let s=e._movement[n];l(s)||(s=e._movement[n]={});let a=e._lastMovement[n];l(a)||(a=e._lastMovement[n]={startPosition:new D,endPosition:new D,valid:!1}),s.startPosition=new D,D.clone(D.ZERO,s.startPosition),s.endPosition=new D,e._eventHandler.setInputAction(function(c){let d=7.5*X.toRadians(c);i[n]=o[n]=new Date,s.endPosition.x=0,s.endPosition.y=d,D.clone(s.endPosition,a.endPosition),a.valid=!0,r[n]=!1},Sn.WHEEL,t)}function zV(e,t,n){let i=Cc(n,t),o=e._isDown,r=e._eventStartPosition,s=e._pressTime,a=e._releaseTime;o[i]=!1,r[i]=new D;let c=e._lastMovement[i];l(c)||(c=e._lastMovement[i]={startPosition:new D,endPosition:new D,valid:!1});let d,u;n===Wi.LEFT_DRAG?(d=Sn.LEFT_DOWN,u=Sn.LEFT_UP):n===Wi.RIGHT_DRAG?(d=Sn.RIGHT_DOWN,u=Sn.RIGHT_UP):n===Wi.MIDDLE_DRAG&&(d=Sn.MIDDLE_DOWN,u=Sn.MIDDLE_UP),e._eventHandler.setInputAction(function(m){e._buttonsDown++,c.valid=!1,o[i]=!0,s[i]=new Date,D.clone(m.position,r[i])},d,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),o[i]=!1,a[i]=new Date},u,t)}function Exe(e,t){D.clone(e.startPosition,t.startPosition),D.clone(e.endPosition,t.endPosition)}function Wxe(e,t){let n=e._update,i=e._movement,o=e._lastMovement,r=e._isDown;for(let s in Wi)if(Wi.hasOwnProperty(s)){let a=Wi[s];if(l(a)){let c=Cc(a,t);n[c]=!0,l(e._lastMovement[c])||(e._lastMovement[c]={startPosition:new D,endPosition:new D,valid:!1}),l(e._movement[c])||(e._movement[c]={startPosition:new D,endPosition:new D})}}e._eventHandler.setInputAction(function(s){for(let a in Wi)if(Wi.hasOwnProperty(a)){let c=Wi[a];if(l(c)){let d=Cc(c,t);r[d]&&(n[d]?(Exe(i[d],o[d]),o[d].valid=!0,Exe(s,i[d]),n[d]=!1):D.clone(s.endPosition,i[d].endPosition))}}D.clone(s.endPosition,e._currentMousePosition)},Sn.MOUSE_MOVE,t)}function im(e){this._eventHandler=new Od(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new D,Gxe(this,void 0),Rxe(this,void 0,e),zV(this,void 0,Wi.LEFT_DRAG),zV(this,void 0,Wi.RIGHT_DRAG),zV(this,void 0,Wi.MIDDLE_DRAG),Wxe(this,void 0);for(let t in ba)if(ba.hasOwnProperty(t)){let n=ba[t];l(n)&&(Gxe(this,n),Rxe(this,n,e),zV(this,n,Wi.LEFT_DRAG),zV(this,n,Wi.RIGHT_DRAG),zV(this,n,Wi.MIDDLE_DRAG),Wxe(this,n))}}Object.defineProperties(im.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){let e=!this._update[Cc(Wi.WHEEL)]||!this._update[Cc(Wi.WHEEL,ba.SHIFT)]||!this._update[Cc(Wi.WHEEL,ba.CTRL)]||!this._update[Cc(Wi.WHEEL,ba.ALT)];return this._buttonsDown>0||e}}});im.prototype.isMoving=function(e,t){let n=Cc(e,t);return!this._update[n]};im.prototype.getMovement=function(e,t){let n=Cc(e,t);return this._movement[n]};im.prototype.getLastMovement=function(e,t){let n=Cc(e,t),i=this._lastMovement[n];if(i.valid)return i};im.prototype.isButtonDown=function(e,t){let n=Cc(e,t);return this._isDown[n]};im.prototype.getStartMousePosition=function(e,t){if(e===Wi.WHEEL)return this._currentMousePosition;let n=Cc(e,t);return this._eventStartPosition[n]};im.prototype.getButtonPressTime=function(e,t){let n=Cc(e,t);return this._pressTime[n]};im.prototype.getButtonReleaseTime=function(e,t){let n=Cc(e,t);return this._releaseTime[n]};im.prototype.reset=function(){for(let e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)};im.prototype.isDestroyed=function(){return!1};im.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),me(this)};var zF=im;var WFi=S(T(),1);function $D(e,t,n,i,o,r,s,a,c,d){this._tweens=e,this._tweenjs=t,this._startObject=Oe(n),this._stopObject=Oe(i),this._duration=o,this._delay=r,this._easingFunction=s,this._update=a,this._complete=c,this.cancel=d,this.needsStart=!0}Object.defineProperties($D.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}});$D.prototype.cancelTween=function(){this._tweens.remove(this)};function Vh(){this._tweens=[]}Object.defineProperties(Vh.prototype,{length:{get:function(){return this._tweens.length}}});Vh.prototype.add=function(e){if(e=y(e,y.EMPTY_OBJECT),e.duration===0)return l(e.complete)&&e.complete(),new $D(this);let t=e.duration/Kn.SECONDS_PER_MILLISECOND,n=y(e.delay,0),i=n/Kn.SECONDS_PER_MILLISECOND,o=y(e.easingFunction,Ar.LINEAR_NONE),r=e.startObject,s=new Ype(r);s.to(Oe(e.stopObject),t),s.delay(i),s.easing(o),l(e.update)&&s.onUpdate(function(){e.update(r)}),s.onComplete(y(e.complete,null)),s.repeat(y(e._repeat,0));let a=new $D(this,s,e.startObject,e.stopObject,e.duration,n,o,e.update,e.complete,e.cancel);return this._tweens.push(a),a};Vh.prototype.addProperty=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.object,n=e.property,i=e.startValue,o=e.stopValue;function r(s){t[n]=s.value}return this.add({startObject:{value:i},stopObject:{value:o},duration:y(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:r,complete:e.complete,cancel:e.cancel,_repeat:e._repeat})};Vh.prototype.addAlpha=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.material,n=[];for(let o in t.uniforms)t.uniforms.hasOwnProperty(o)&&l(t.uniforms[o])&&l(t.uniforms[o].alpha)&&n.push(o);function i(o){let r=n.length;for(let s=0;s<r;++s)t.uniforms[n[s]].alpha=o.alpha}return this.add({startObject:{alpha:y(e.startValue,0)},stopObject:{alpha:y(e.stopValue,1)},duration:y(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:i,complete:e.complete,cancel:e.cancel})};Vh.prototype.addOffsetIncrement=function(e){e=y(e,y.EMPTY_OBJECT);let n=e.material.uniforms;return this.addProperty({object:n,property:"offset",startValue:n.offset,stopValue:n.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})};Vh.prototype.remove=function(e){if(!l(e))return!1;let t=this._tweens.indexOf(e);return t!==-1?(e.tweenjs.stop(),l(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0):!1};Vh.prototype.removeAll=function(){let e=this._tweens;for(let t=0;t<e.length;++t){let n=e[t];n.tweenjs.stop(),l(n.cancel)&&n.cancel()}e.length=0};Vh.prototype.contains=function(e){return l(e)&&this._tweens.indexOf(e)!==-1};Vh.prototype.get=function(e){return this._tweens[e]};Vh.prototype.update=function(e){let t=this._tweens,n=0;for(e=l(e)?e/Kn.SECONDS_PER_MILLISECOND:gi();n<t.length;){let i=t[n],o=i.tweenjs;i.needsStart?(i.needsStart=!1,o.start(e)):o.update(e)?n++:(o.stop(),t.splice(n,1))}};var FS=Vh;function HF(e){this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.translateEventTypes=Wi.LEFT_DRAG,this.zoomEventTypes=[Wi.RIGHT_DRAG,Wi.WHEEL,Wi.PINCH],this.rotateEventTypes=Wi.LEFT_DRAG,this.tiltEventTypes=[Wi.MIDDLE_DRAG,Wi.PINCH,{eventType:Wi.LEFT_DRAG,modifier:ba.CTRL},{eventType:Wi.RIGHT_DRAG,modifier:ba.CTRL}],this.lookEventTypes={eventType:Wi.LEFT_DRAG,modifier:ba.SHIFT};let t=y(e.ellipsoid,te.default);this.minimumPickingTerrainHeight=te.WGS84.equals(t)?15e4:t.minimumRadius*.025,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumPickingTerrainDistanceWithInertia=te.WGS84.equals(t)?4e3:t.minimumRadius*63e-5,this.minimumCollisionTerrainHeight=te.WGS84.equals(t)?15e3:t.minimumRadius*.0025,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=te.WGS84.equals(t)?75e5:t.minimumRadius*1.175,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._scene=e,this._globe=void 0,this._ellipsoid=t,this._lastGlobeHeight=0,this._aggregator=new zF(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new FS,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new D(-1,-1),this._tiltCenter=new h,this._rotateMousePosition=new D(-1,-1),this._rotateStartPosition=new h,this._strafeStartPosition=new h,this._strafeMousePosition=new D,this._strafeEndMousePosition=new D,this._zoomMouseStart=new D(-1,-1),this._zoomWorldPosition=new h,this._useZoomWorldPosition=!1,this._panLastMousePosition=new D,this._panLastWorldPosition=new h,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._zoomingUnderground=!1,this._rotatingZoom=!1,this._adjustedHeightForTerrain=!1,this._cameraUnderground=!1;let n=e.mapProjection;this._maxCoord=n.project(new he(Math.PI,X.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=1/5e3,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._minimumUndergroundPickDistance=2e3,this._maximumUndergroundPickDistance=1e4}function cht(e,t){if(e<0)return 0;let n=(1-t)*25;return Math.exp(-n*e)}function lht(e){return D.equalsEpsilon(e.startPosition,e.endPosition,X.EPSILON14)}var dht=.4;function uht(e,t,n,i,o,r,s){let a=r[s];l(a)||(a=r[s]={startPosition:new D,endPosition:new D,motion:new D,inertiaEnabled:!0});let c=e.getButtonPressTime(t,n),d=e.getButtonReleaseTime(t,n),u=c&&d&&(d.getTime()-c.getTime())/1e3,p=d&&(new Date().getTime()-d.getTime())/1e3;if(c&&d&&u<dht){let g=cht(p,i),f=e.getLastMovement(t,n);if(!l(f)||lht(f)||!a.inertiaEnabled||(a.motion.x=(f.endPosition.x-f.startPosition.x)*.5,a.motion.y=(f.endPosition.y-f.startPosition.y)*.5,a.startPosition=D.clone(f.startPosition,a.startPosition),a.endPosition=D.multiplyByScalar(a.motion,g,a.endPosition),a.endPosition=D.add(a.startPosition,a.endPosition,a.endPosition),isNaN(a.endPosition.x)||isNaN(a.endPosition.y)||D.distance(a.startPosition,a.endPosition)<.5))return;if(!e.isButtonDown(t,n)){let x=e.getStartMousePosition(t,n);o(r,x,a)}}}function mht(e,t){if(l(t)){let n=e[t];l(n)&&(n.inertiaEnabled=!0);let i=e._inertiaDisablers[t];if(l(i)){let o=i.length;for(let r=0;r<o;++r)n=e[i[r]],l(n)&&(n.inertiaEnabled=!1)}}}var Ixe=[];function cl(e,t,n,i,o,r){if(!l(n))return;let s=e._aggregator;Array.isArray(n)||(Ixe[0]=n,n=Ixe);let a=n.length;for(let c=0;c<a;++c){let d=n[c],u=l(d.eventType)?d.eventType:d,m=d.modifier,p=s.isMoving(u,m)&&s.getMovement(u,m),g=s.getStartMousePosition(u,m);e.enableInputs&&t&&(p?(i(e,g,p),mht(e,r)):o<1&&uht(s,u,m,o,i,e,r))}}var eB=new pn,hht=new h,fht=new D,pht=new h,bht=new D,ght=new h,yht=new h,xht=new h,_ht=new h,Bxe=new h,Sht=new h,Tht=new h,Cht=new h,Vht=new h,Zht=new h,Lht=new h,Rht=new h,Ght=new h,Eht=new h,Wht=new h,AS=new h,Xxe=new h,Pxe=new h,Lj={orientation:new Ja};function vj(e,t,n,i,o,r){let s=1;l(r)&&(s=X.clamp(Math.abs(r),.25,1));let a=n.endPosition.y-n.startPosition.y,d=a>0?e.minimumZoomDistance*s:0,u=e.maximumZoomDistance,m=o-d,p=i*m;p=X.clamp(p,e._minimumZoomRate,e._maximumZoomRate);let g=a/e._scene.canvas.clientHeight;g=Math.min(g,e.maximumMovementRatio);let f=p*g;if(e.enableCollisionDetection||e.minimumZoomDistance===0||!l(e._globe)){if(f>0&&Math.abs(o-d)<1||f<0&&Math.abs(o-u)<1)return;o-f<d?f=o-d-1:o-f>u&&(f=o-u)}let x=e._scene,_=x.camera,C=x.mode,V=Lj.orientation;if(V.heading=_.heading,V.pitch=_.pitch,V.roll=_.roll,_.frustum instanceof sn){Math.abs(f)>0&&(_.zoomIn(f),_._adjustOrthographicFrustum(!0));return}let Z=y(n.inertiaEnabled,D.equals(t,e._zoomMouseStart)),R=e._zoomingOnVector,G=e._rotatingZoom,W;if(Z||(e._zoomMouseStart=D.clone(t,e._zoomMouseStart),l(e._globe)&&C===oe.SCENE2D?(W=_.getPickRay(t,eB).origin,W=h.fromElements(W.y,W.z,W.x)):l(e._globe)&&(W=i0(e,t,hht)),l(W)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=h.clone(W,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,R=e._zoomingOnVector=!1,G=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),!e._useZoomWorldPosition){_.zoomIn(f);return}let v=C===oe.COLUMBUS_VIEW;if(_.positionCartographic.height<2e6&&(G=!0),!Z||G){if(C===oe.SCENE2D){let P=e._zoomWorldPosition,F=_.position;if(!h.equals(P,F)&&_.positionCartographic.height<e._maxCoord.x*2){let M=_.position.x,b=h.subtract(P,F,pht);h.normalize(b,b);let L=h.distance(P,F)*f/(_.getMagnitude()*.5);_.move(b,L*.5),(_.position.x<0&&M>0||_.position.x>0&&M<0)&&(W=_.getPickRay(t,eB).origin,W=h.fromElements(W.y,W.z,W.x),e._zoomWorldPosition=h.clone(W,e._zoomWorldPosition))}}else if(C===oe.SCENE3D){let P=h.normalize(_.position,Bxe);if(e._cameraUnderground||e._zoomingUnderground||_.positionCartographic.height<3e3&&Math.abs(h.dot(_.direction,P))<.6)v=!0;else{let F=x.canvas,M=bht;M.x=F.clientWidth/2,M.y=F.clientHeight/2;let b=i0(e,M,ght);if(!l(b))v=!0;else if(_.positionCartographic.height<1e6)if(h.dot(_.direction,P)>=-.5)v=!0;else{let L=Tht;h.clone(_.position,L);let E=e._zoomWorldPosition,I=Sht;if(I=h.normalize(E,I),h.dot(I,P)<0)return;let w=Wht,N=Zht;h.clone(_.direction,N),h.add(L,h.multiplyByScalar(N,1e3,AS),w);let B=Lht,k=Rht;h.subtract(E,L,B),h.normalize(B,k);let O=h.dot(P,k);if(O>=0){e._zoomMouseStart.x=-1;return}let U=Math.acos(-O),J=h.magnitude(L),z=h.magnitude(E),ee=J-f,K=h.magnitude(B),j=Math.asin(X.clamp(K/z*Math.sin(U),-1,1)),q=Math.asin(X.clamp(ee/z*Math.sin(U),-1,1)),be=j-q+U,Se=Cht;h.normalize(L,Se);let ae=Vht;ae=h.cross(k,Se,ae),ae=h.normalize(ae,ae),h.normalize(h.cross(Se,ae,AS),N),h.multiplyByScalar(h.normalize(w,AS),h.magnitude(w)-f,w),h.normalize(L,L),h.multiplyByScalar(L,ee,L);let ye=Ght;h.multiplyByScalar(h.add(h.multiplyByScalar(Se,Math.cos(be)-1,Xxe),h.multiplyByScalar(N,Math.sin(be),Pxe),AS),ee,ye),h.add(L,ye,L),h.normalize(w,Se),h.normalize(h.cross(Se,ae,AS),N);let Te=Eht;h.multiplyByScalar(h.add(h.multiplyByScalar(Se,Math.cos(be)-1,Xxe),h.multiplyByScalar(N,Math.sin(be),Pxe),AS),h.magnitude(w),Te),h.add(w,Te,w),h.clone(L,_.position),h.normalize(h.subtract(w,L,AS),_.direction),h.clone(_.direction,_.direction),h.cross(_.direction,_.up,_.right),h.cross(_.right,_.direction,_.up),_.setView(Lj);return}else{let L=h.normalize(b,yht),E=h.normalize(e._zoomWorldPosition,xht),I=h.dot(E,L);if(I>0&&I<1){let w=X.acosClamped(I),N=h.cross(E,L,_ht),B=Math.abs(w)>X.toRadians(20)?_.positionCartographic.height*.75:_.positionCartographic.height-f,k=f/B;_.rotate(N,w*k)}}}}e._rotatingZoom=!v}if(!Z&&v||R){let P,F=ki.worldToWindowCoordinates(x,e._zoomWorldPosition,fht);C!==oe.COLUMBUS_VIEW&&D.equals(t,e._zoomMouseStart)&&l(F)?P=_.getPickRay(F,eB):P=_.getPickRay(t,eB);let M=P.direction;(C===oe.COLUMBUS_VIEW||C===oe.SCENE2D)&&h.fromElements(M.y,M.z,M.x,M),_.move(M,f),e._zoomingOnVector=!0}else _.zoomIn(f);e._cameraUnderground||_.setView(Lj)}var Iht=new pn,Xht=new pn,Pht=new h;function vht(e,t,n){let o=e._scene.camera,r=o.getPickRay(n.startPosition,Iht).origin,s=o.getPickRay(n.endPosition,Xht).origin;r=h.fromElements(r.y,r.z,r.x,r),s=h.fromElements(s.y,s.z,s.x,s);let a=h.subtract(r,s,Pht),c=h.magnitude(a);c>0&&(h.normalize(a,a),o.move(a,c))}function vxe(e,t,n){l(n.distance)&&(n=n.distance);let o=e._scene.camera;vj(e,t,n,e._zoomFactor,o.getMagnitude())}var wht=new D,Fht=new D;function wxe(e,t,n){if(l(n.angleAndHeight)){Aht(e,t,n.angleAndHeight);return}let i=e._scene,o=i.camera,r=i.canvas,s=r.clientWidth,a=r.clientHeight,c=wht;c.x=2/s*n.startPosition.x-1,c.y=2/a*(a-n.startPosition.y)-1,c=D.normalize(c,c);let d=Fht;d.x=2/s*n.endPosition.x-1,d.y=2/a*(a-n.endPosition.y)-1,d=D.normalize(d,d);let u=X.acosClamped(c.x);c.y<0&&(u=X.TWO_PI-u);let m=X.acosClamped(d.x);d.y<0&&(m=X.TWO_PI-m);let p=m-u;o.twistRight(p)}function Aht(e,t,n){let i=e._rotateFactor*e._rotateRateRangeAdjustment;i>e._maximumRotateRate&&(i=e._maximumRotateRate),i<e._minimumRotateRate&&(i=e._minimumRotateRate);let o=e._scene,r=o.camera,s=o.canvas,a=(n.endPosition.x-n.startPosition.x)/s.clientWidth;a=Math.min(a,e.maximumMovementRatio);let c=i*a*Math.PI*4;r.twistRight(c)}function Mht(e){let t=e._scene.mapMode2D===Jl.ROTATE;A.equals(A.IDENTITY,e._scene.camera.transform)?(cl(e,e.enableTranslate,e.translateEventTypes,vht,e.inertiaTranslate,"_lastInertiaTranslateMovement"),cl(e,e.enableZoom,e.zoomEventTypes,vxe,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&cl(e,e.enableRotate,e.tiltEventTypes,wxe,e.inertiaSpin,"_lastInertiaTiltMovement")):(cl(e,e.enableZoom,e.zoomEventTypes,vxe,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&cl(e,e.enableRotate,e.translateEventTypes,wxe,e.inertiaSpin,"_lastInertiaSpinMovement"))}var Yxe=new pn,Nht=new h,Uht=new h;function i0(e,t,n){let i=e._scene,o=e._globe,r=i.camera,s;if(i.pickPositionSupported&&(s=i.pickPositionWorldCoordinates(t,Nht)),!l(o))return h.clone(s,n);let a=!e._cameraUnderground,c=r.getPickRay(t,Yxe),d=o.pickWorldCoordinates(c,i,a,Uht),u=l(s)?h.distance(s,r.positionWC):Number.POSITIVE_INFINITY,m=l(d)?h.distance(d,r.positionWC):Number.POSITIVE_INFINITY;return u<m?h.clone(s,n):h.clone(d,n)}var kht=new he;function aB(e){let t=e._ellipsoid,n=e._scene,i=n.camera,o=n.mode,r=0;if(o===oe.SCENE3D){let c=t.cartesianToCartographic(i.position,kht);l(c)&&(r=c.height)}else r=i.position.z;let s=y(e._scene.globeHeight,0);return Math.abs(s-r)}var Dht=new h;function Oxe(e,t){let n=t.origin,i=t.direction,o=aB(e),r=h.normalize(n,Dht),s=Math.abs(h.dot(r,i));return s=Math.max(s,.5)*2,o*s}function zxe(e,t,n,i){let o=h.distance(t.origin,n),r=aB(e),s=X.clamp(r*5,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance);return o>s&&(o=Math.min(o,r/5),o=Math.max(o,100)),pn.getPoint(t,o,i)}function Kxe(e,t,n,i){let o;return l(n)?(o=h.distance(t.origin,n),o>e._maximumUndergroundPickDistance&&(o=aB(e))):o=aB(e),pn.getPoint(t,o,i)}var Bht=new D;function Hxe(e,t){let n=t.endPosition,i=D.subtract(t.endPosition,t.startPosition,Bht),o=e._strafeEndMousePosition;D.add(o,i,o),t.endPosition=o,wj(e,t,e._strafeStartPosition),t.endPosition=n}var Fxe=new pn,Yht=new pn,Rj=new h,Oht=new h,zht=new h,Kht=new h,Hht=new dn(h.UNIT_X,0),Jht=new D,Qht=new D;function jht(e,t,n){if(h.equals(t,e._translateMousePosition)||(e._looking=!1),h.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking){Kd(e,t,n);return}if(e._strafing){Hxe(e,n);return}let o=e._scene.camera,r=e._cameraUnderground,s=D.clone(n.startPosition,Jht),a=D.clone(n.endPosition,Qht),c=o.getPickRay(s,Fxe),d=h.clone(h.ZERO,Kht),u=h.UNIT_X,m;if(o.position.z<e._minimumPickingTerrainHeight&&(m=i0(e,s,Rj),l(m)&&(d.x=m.x)),r||d.x>o.position.z&&l(m)){let Z=m;r&&(Z=Kxe(e,c,m,Rj)),D.clone(t,e._strafeMousePosition),D.clone(t,e._strafeEndMousePosition),h.clone(Z,e._strafeStartPosition),e._strafing=!0,wj(e,n,e._strafeStartPosition);return}let p=dn.fromPointNormal(d,u,Hht);c=o.getPickRay(s,Fxe);let g=jn.rayPlane(c,p,Rj),f=o.getPickRay(a,Yht),x=jn.rayPlane(f,p,Oht);if(!l(g)||!l(x)){e._looking=!0,Kd(e,t,n),D.clone(t,e._translateMousePosition);return}let _=h.subtract(g,x,zht),C=_.x;_.x=_.y,_.y=_.z,_.z=C;let V=h.magnitude(_);V>X.EPSILON6&&(h.normalize(_,_),o.move(_,V))}var Jxe=new D,iB=new pn,oB=new h,qht=new h,Qxe=new A,$ht=new A,eft=new h,tft=new dn(h.UNIT_X,0),Gj=new h,Ij=new he,jxe=new A,nft=new we,ift=new $,rB=new h;function oft(e,t,n){if(l(n.angleAndHeight)&&(n=n.angleAndHeight),D.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking){Kd(e,t,n);return}let o=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(o.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,rft(e,t,n)):sft(e,t,n)}function rft(e,t,n){let i=e._scene,o=i.camera,r=i.canvas,s=Jxe;s.x=r.clientWidth/2,s.y=r.clientHeight/2;let a=o.getPickRay(s,iB),c=h.UNIT_X,d=a.origin,u=a.direction,m,p=h.dot(c,u);if(Math.abs(p)>X.EPSILON6&&(m=-h.dot(c,d)/p),!l(m)||m<=0){e._looking=!0,Kd(e,t,n),D.clone(t,e._tiltCenterMousePosition);return}let g=h.multiplyByScalar(u,m,oB);h.add(d,g,g);let f=i.mapProjection,x=f.ellipsoid;h.fromElements(g.y,g.z,g.x,g);let _=f.unproject(g,Ij);x.cartographicToCartesian(_,g);let C=Gt.eastNorthUpToFixedFrame(g,x,Qxe),V=e._globe,Z=e._ellipsoid;e._globe=void 0,e._ellipsoid=te.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let R=A.clone(o.transform,jxe);o._setTransform(C),zd(e,t,n,h.UNIT_Z),o._setTransform(R),e._globe=V,e._ellipsoid=Z;let G=Z.maximumRadius;e._rotateFactor=1/G,e._rotateRateRangeAdjustment=G}function sft(e,t,n){let i=e._scene,o=i.camera,r=e._cameraUnderground,s,a,c=h.UNIT_X;if(D.equals(t,e._tiltCenterMousePosition))s=h.clone(e._tiltCenter,oB);else{if(o.position.z<e._minimumPickingTerrainHeight&&(s=i0(e,t,oB)),!l(s)){a=o.getPickRay(t,iB);let b=a.origin,L=a.direction,E,I=h.dot(c,L);if(Math.abs(I)>X.EPSILON6&&(E=-h.dot(c,b)/I),!l(E)||E<=0){e._looking=!0,Kd(e,t,n),D.clone(t,e._tiltCenterMousePosition);return}s=h.multiplyByScalar(L,E,oB),h.add(b,s,s)}r&&(l(a)||(a=o.getPickRay(t,iB)),zxe(e,a,s,s)),D.clone(t,e._tiltCenterMousePosition),h.clone(s,e._tiltCenter)}let d=i.canvas,u=Jxe;u.x=d.clientWidth/2,u.y=e._tiltCenterMousePosition.y,a=o.getPickRay(u,iB);let m=h.clone(h.ZERO,eft);m.x=s.x;let p=dn.fromPointNormal(m,c,tft),g=jn.rayPlane(a,p,qht),f=o._projection,x=f.ellipsoid;h.fromElements(s.y,s.z,s.x,s);let _=f.unproject(s,Ij);x.cartographicToCartesian(_,s);let C=Gt.eastNorthUpToFixedFrame(s,x,Qxe),V;l(g)?(h.fromElements(g.y,g.z,g.x,g),_=f.unproject(g,Ij),x.cartographicToCartesian(_,g),V=Gt.eastNorthUpToFixedFrame(g,x,$ht)):V=C;let Z=e._globe,R=e._ellipsoid;e._globe=void 0,e._ellipsoid=te.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let G=h.UNIT_Z,W=A.clone(o.transform,jxe);o._setTransform(C);let v=h.cross(h.UNIT_Z,h.normalize(o.position,Gj),Gj),P=h.dot(o.right,v);if(zd(e,t,n,G,!1,!0),o._setTransform(V),P<0){let b=n.startPosition.y-n.endPosition.y;(r&&b<0||!r&&b>0)&&(G=void 0);let L=o.constrainedAxis;o.constrainedAxis=void 0,zd(e,t,n,G,!0,!1),o.constrainedAxis=L}else zd(e,t,n,G,!0,!1);if(l(o.constrainedAxis)){let b=h.cross(o.direction,o.constrainedAxis,rB);h.equalsEpsilon(b,h.ZERO,X.EPSILON6)||(h.dot(b,o.right)<0&&h.negate(b,b),h.cross(b,o.direction,o.up),h.cross(o.direction,o.up,o.right),h.normalize(o.up,o.up),h.normalize(o.right,o.right))}o._setTransform(W),e._globe=Z,e._ellipsoid=R;let F=R.maximumRadius;e._rotateFactor=1/F,e._rotateRateRangeAdjustment=F;let M=h.clone(o.positionWC,Gj);if(e.enableCollisionDetection&&Mj(e,!0),!h.equals(o.positionWC,M)){o._setTransform(V),o.worldToCameraCoordinatesPoint(M,M);let b=h.magnitudeSquared(M);h.magnitudeSquared(o.position)>b&&(h.normalize(o.position,o.position),h.multiplyByScalar(o.position,Math.sqrt(b),o.position));let L=h.angleBetween(M,o.position),E=h.cross(M,o.position,M);h.normalize(E,E);let I=we.fromAxisAngle(E,L,nft),w=$.fromQuaternion(I,ift);$.multiplyByVector(w,o.direction,o.direction),$.multiplyByVector(w,o.up,o.up),h.cross(o.direction,o.up,o.right),h.cross(o.right,o.direction,o.up),o._setTransform(W)}}var qxe=new D,$xe=new pn,e_e=new h;function aft(e,t,n){l(n.distance)&&(n=n.distance);let i=e._scene,o=i.camera,r=i.canvas,s=e._cameraUnderground,a;s?a=t:(a=qxe,a.x=r.clientWidth/2,a.y=r.clientHeight/2);let c=o.getPickRay(a,$xe),d=c.origin,u=c.direction,m=o.position.z,p;m<e._minimumPickingTerrainHeight&&(p=i0(e,a,e_e));let g;if(l(p)&&(g=h.distance(d,p)),s){let f=Oxe(e,c,m);l(g)?g=Math.min(g,f):g=f}if(!l(g)){let f=h.UNIT_X;g=-h.dot(f,d)/h.dot(f,u)}vj(e,t,n,e._zoomFactor,g)}function cft(e){let n=e._scene.camera;if(!A.equals(A.IDENTITY,n.transform))cl(e,e.enableRotate,e.rotateEventTypes,zd,e.inertiaSpin,"_lastInertiaSpinMovement"),cl(e,e.enableZoom,e.zoomEventTypes,n_e,e.inertiaZoom,"_lastInertiaZoomMovement");else{let i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),cl(e,e.enableTilt,e.tiltEventTypes,oft,e.inertiaSpin,"_lastInertiaTiltMovement"),cl(e,e.enableTranslate,e.translateEventTypes,jht,e.inertiaTranslate,"_lastInertiaTranslateMovement"),cl(e,e.enableZoom,e.zoomEventTypes,aft,e.inertiaZoom,"_lastInertiaZoomMovement"),cl(e,e.enableLook,e.lookEventTypes,Kd),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){let o=n.createCorrectPositionTween(e.bounceAnimationTime);l(o)&&(e._tween=i.add(o))}i.update()}}var lft=new pn,dft=new dn(h.UNIT_X,0),uft=new h,mft=new h;function wj(e,t,n){let i=e._scene,o=i.camera,r=o.getPickRay(t.endPosition,lft),s=h.clone(o.direction,mft);i.mode===oe.COLUMBUS_VIEW&&h.fromElements(s.z,s.x,s.y,s);let a=dn.fromPointNormal(n,s,dft),c=jn.rayPlane(r,a,uft);l(c)&&(s=h.subtract(n,c,s),i.mode===oe.COLUMBUS_VIEW&&h.fromElements(s.y,s.z,s.x,s),h.add(o.position,s,o.position))}var Axe=new h,t_e=new he,Xj=new h,Pj=new te,hft=new h,fft=new h,pft=new h;function bft(e,t,n){let o=e._scene.camera,r=e._cameraUnderground,s=e._ellipsoid;if(!A.equals(o.transform,A.IDENTITY)){zd(e,t,n);return}let a,c,d=s.geodeticSurfaceNormal(o.position,hft);if(D.equals(t,e._rotateMousePosition)){if(e._looking)Kd(e,t,n,d);else if(e._rotating)zd(e,t,n);else if(e._strafing)Hxe(e,n);else{if(h.magnitude(o.position)<h.magnitude(e._rotateStartPosition))return;a=h.magnitude(e._rotateStartPosition),c=Xj,c.x=c.y=c.z=a,s=te.fromCartesian3(c,Pj),Wj(e,t,n,s)}return}e._looking=!1,e._rotating=!1,e._strafing=!1;let u=s.cartesianToCartographic(o.positionWC,t_e).height,m=e._globe;if(l(m)&&u<e._minimumPickingTerrainHeight){let p=i0(e,n.startPosition,pft);if(l(p)){let g=!1,f=o.getPickRay(n.startPosition,Yxe);if(r)g=!0,Kxe(e,f,p,p);else{let x=s.geodeticSurfaceNormal(p,fft);Math.abs(h.dot(f.direction,x))<.05?g=!0:g=h.magnitude(o.position)<h.magnitude(p)}g?(D.clone(t,e._strafeEndMousePosition),h.clone(p,e._strafeStartPosition),e._strafing=!0,wj(e,n,e._strafeStartPosition)):(a=h.magnitude(p),c=Xj,c.x=c.y=c.z=a,s=te.fromCartesian3(c,Pj),Wj(e,t,n,s),h.clone(p,e._rotateStartPosition))}else e._looking=!0,Kd(e,t,n,d)}else l(o.pickEllipsoid(n.startPosition,e._ellipsoid,Axe))?(Wj(e,t,n,e._ellipsoid),h.clone(Axe,e._rotateStartPosition)):u>e._minimumTrackBallHeight?(e._rotating=!0,zd(e,t,n)):(e._looking=!0,Kd(e,t,n,d));D.clone(t,e._rotateMousePosition)}function zd(e,t,n,i,o,r){o=y(o,!1),r=y(r,!1);let s=e._scene,a=s.camera,c=s.canvas,d=a.constrainedAxis;l(i)&&(a.constrainedAxis=i);let u=h.magnitude(a.position),m=e._rotateFactor*(u-e._rotateRateRangeAdjustment);m>e._maximumRotateRate&&(m=e._maximumRotateRate),m<e._minimumRotateRate&&(m=e._minimumRotateRate);let p=(n.startPosition.x-n.endPosition.x)/c.clientWidth,g=(n.startPosition.y-n.endPosition.y)/c.clientHeight;p=Math.min(p,e.maximumMovementRatio),g=Math.min(g,e.maximumMovementRatio);let f=m*p*Math.PI*2,x=m*g*Math.PI;o||a.rotateRight(f),r||a.rotateUp(x),a.constrainedAxis=d}var Ej=se.clone(se.UNIT_W),Mxe=se.clone(se.UNIT_W),tB=new h,KV=new h,nB=new h,Nxe=new h,gft=new D,yft=new D,xft=new D,_ft=new D,Sft=new pn;function Wj(e,t,n,i){let o=e._scene,r=o.camera,s=D.clone(n.startPosition,gft),a=D.clone(n.endPosition,yft),c=i.cartesianToCartographic(r.positionWC,t_e).height,d,u;if(!n.inertiaEnabled&&c<e._minimumPickingTerrainHeight&&(d=h.clone(e._panLastWorldPosition,Ej),!l(e._globe)&&!D.equalsEpsilon(s,e._panLastMousePosition)&&(d=i0(e,s,Ej)),!l(e._globe)&&l(d))){let m=h.subtract(d,r.positionWC,KV),p=h.multiplyByScalar(r.directionWC,h.dot(r.directionWC,m),KV),g=h.magnitude(p),f=r.frustum.getPixelDimensions(o.drawingBufferWidth,o.drawingBufferHeight,g,o.pixelRatio,_ft),x=D.subtract(a,s,xft),_=h.multiplyByScalar(r.rightWC,x.x*f.x,KV),C=h.normalize(r.positionWC,Bxe),V=r.getPickRay(a,Sft).direction,Z=h.subtract(V,h.projectVector(V,r.rightWC,nB),nB),R=h.angleBetween(Z,r.directionWC),G=1;l(r.frustum.fov)&&(G=Math.max(Math.tan(R),.1));let W=Math.abs(h.dot(r.directionWC,C)),v=-x.y*f.y*2/Math.sqrt(G)*(1-W),P=h.multiplyByScalar(V,v,nB);W=Math.abs(h.dot(r.upWC,C));let F=h.multiplyByScalar(r.upWC,-x.y*(1-W)*f.y,Nxe);u=h.add(d,_,Mxe),u=h.add(u,P,u),u=h.add(u,F,u),h.clone(u,e._panLastWorldPosition),D.clone(a,e._panLastMousePosition)}if((!l(d)||!l(u))&&(d=r.pickEllipsoid(s,i,Ej),u=r.pickEllipsoid(a,i,Mxe)),!l(d)||!l(u)){e._rotating=!0,zd(e,t,n);return}if(d=r.worldToCameraCoordinates(d,d),u=r.worldToCameraCoordinates(u,u),l(r.constrainedAxis)){let m=r.constrainedAxis,p=h.mostOrthogonalAxis(m,tB);h.cross(p,m,p),h.normalize(p,p);let g=h.cross(m,p,KV),f=h.magnitude(d),x=h.dot(m,d),_=Math.acos(x/f),C=h.multiplyByScalar(m,x,nB);h.subtract(d,C,C),h.normalize(C,C);let V=h.magnitude(u),Z=h.dot(m,u),R=Math.acos(Z/V),G=h.multiplyByScalar(m,Z,Nxe);h.subtract(u,G,G),h.normalize(G,G);let W=Math.acos(h.dot(C,p));h.dot(C,g)<0&&(W=X.TWO_PI-W);let v=Math.acos(h.dot(G,p));h.dot(G,g)<0&&(v=X.TWO_PI-v);let P=W-v,F;h.equalsEpsilon(m,r.position,X.EPSILON2)?F=r.right:F=h.cross(m,r.position,tB);let M=h.cross(m,F,tB),b=h.dot(M,h.subtract(d,m,KV)),L=h.dot(M,h.subtract(u,m,KV)),E;b>0&&L>0?E=R-_:b>0&&L<=0?h.dot(r.position,m)>0?E=-_-R:E=_+R:E=_-R,r.rotateRight(P),r.rotateUp(E)}else{h.normalize(d,d),h.normalize(u,u);let m=h.dot(d,u),p=h.cross(d,u,tB);if(m<1&&!h.equalsEpsilon(p,h.ZERO,X.EPSILON14)){let g=Math.acos(m);r.rotate(p,g)}}}var Tft=new h,Cft=new he,Uxe=0;function n_e(e,t,n){l(n.distance)&&(n=n.distance);let i=n.inertiaEnabled,o=e._ellipsoid,r=e._scene,s=r.camera,a=r.canvas,c=e._cameraUnderground,d;c?d=t:(d=qxe,d.x=a.clientWidth/2,d.y=a.clientHeight/2);let u=s.getPickRay(d,$xe),m,p=o.cartesianToCartographic(s.position,Cft).height,g=Math.abs(Uxe)<e.minimumPickingTerrainDistanceWithInertia;(i?g:p<e._minimumPickingTerrainHeight)&&(m=i0(e,d,e_e));let x;if(l(m)&&(x=h.distance(u.origin,m),Uxe=x),c){let C=Oxe(e,u,p);l(x)?x=Math.min(x,C):x=C}l(x)||(x=p);let _=h.normalize(s.position,Tft);vj(e,t,n,e._zoomFactor,x,h.dot(_,s.direction))}var i_e=new D,sB=new pn,KF=new h,Vft=new h,o_e=new A,Zft=new A,r_e=new A,Lft=new we,Rft=new $,Fj=new he,Aj=new h;function Gft(e,t,n){let o=e._scene.camera;if(!A.equals(o.transform,A.IDENTITY))return;if(l(n.angleAndHeight)&&(n=n.angleAndHeight),D.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking){let a=e._ellipsoid.geodeticSurfaceNormal(o.position,Aj);Kd(e,t,n,a);return}let s=e._ellipsoid.cartesianToCartographic(o.position,Fj);e._tiltOnEllipsoid||s.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,Wft(e,t,n)):Ift(e,t,n)}var Eft=new he;function Wft(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e.minimumZoomDistance*.25,a=i.cartesianToCartographic(r.positionWC,Eft).height;if(a-s-1<X.EPSILON3&&n.endPosition.y-n.startPosition.y<0)return;let c=o.canvas,d=i_e;d.x=c.clientWidth/2,d.y=c.clientHeight/2;let u=r.getPickRay(d,sB),m,p=jn.rayEllipsoid(u,i);if(l(p))m=pn.getPoint(u,p.start,KF);else if(a>e._minimumTrackBallHeight){let V=jn.grazingAltitudeLocation(u,i);if(!l(V))return;let Z=i.cartesianToCartographic(V,Fj);Z.height=0,m=i.cartographicToCartesian(Z,KF)}else{e._looking=!0;let V=e._ellipsoid.geodeticSurfaceNormal(r.position,Aj);Kd(e,t,n,V),D.clone(t,e._tiltCenterMousePosition);return}let g=Gt.eastNorthUpToFixedFrame(m,i,o_e),f=e._globe,x=e._ellipsoid;e._globe=void 0,e._ellipsoid=te.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let _=A.clone(r.transform,r_e);r._setTransform(g),zd(e,t,n,h.UNIT_Z),r._setTransform(_),e._globe=f,e._ellipsoid=x;let C=x.maximumRadius;e._rotateFactor=1/C,e._rotateRateRangeAdjustment=C}function Ift(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e._cameraUnderground,a,c,d;if(D.equals(t,e._tiltCenterMousePosition))a=h.clone(e._tiltCenter,KF);else{if(a=i0(e,t,KF),!l(a)){if(c=r.getPickRay(t,sB),d=jn.rayEllipsoid(c,i),!l(d)){if(i.cartesianToCartographic(r.position,Fj).height<=e._minimumTrackBallHeight){e._looking=!0;let L=e._ellipsoid.geodeticSurfaceNormal(r.position,Aj);Kd(e,t,n,L),D.clone(t,e._tiltCenterMousePosition)}return}a=pn.getPoint(c,d.start,KF)}s&&(l(c)||(c=r.getPickRay(t,sB)),zxe(e,c,a,a)),D.clone(t,e._tiltCenterMousePosition),h.clone(a,e._tiltCenter)}let u=o.canvas,m=i_e;m.x=u.clientWidth/2,m.y=e._tiltCenterMousePosition.y,c=r.getPickRay(m,sB);let p=h.magnitude(a),g=h.fromElements(p,p,p,Xj),f=te.fromCartesian3(g,Pj);if(d=jn.rayEllipsoid(c,f),!l(d))return;let x=h.magnitude(c.origin)>p?d.start:d.stop,_=pn.getPoint(c,x,Vft),C=Gt.eastNorthUpToFixedFrame(a,i,o_e),V=Gt.eastNorthUpToFixedFrame(_,f,Zft),Z=e._globe,R=e._ellipsoid;e._globe=void 0,e._ellipsoid=te.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let G=h.UNIT_Z,W=A.clone(r.transform,r_e);r._setTransform(V);let v=h.cross(_,r.positionWC,rB);if(h.dot(r.rightWC,v)<0){let b=n.startPosition.y-n.endPosition.y;(s&&b<0||!s&&b>0)&&(G=void 0);let L=r.constrainedAxis;r.constrainedAxis=void 0,zd(e,t,n,G,!0,!1),r.constrainedAxis=L}else zd(e,t,n,G,!0,!1);if(r._setTransform(C),zd(e,t,n,G,!1,!0),l(r.constrainedAxis)){let b=h.cross(r.direction,r.constrainedAxis,rB);h.equalsEpsilon(b,h.ZERO,X.EPSILON6)||(h.dot(b,r.right)<0&&h.negate(b,b),h.cross(b,r.direction,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.up,r.up),h.normalize(r.right,r.right))}r._setTransform(W),e._globe=Z,e._ellipsoid=R;let F=R.maximumRadius;e._rotateFactor=1/F,e._rotateRateRangeAdjustment=F;let M=h.clone(r.positionWC,rB);if(e.enableCollisionDetection&&Mj(e,!0),!h.equals(r.positionWC,M)){r._setTransform(V),r.worldToCameraCoordinatesPoint(M,M);let b=h.magnitudeSquared(M);h.magnitudeSquared(r.position)>b&&(h.normalize(r.position,r.position),h.multiplyByScalar(r.position,Math.sqrt(b),r.position));let L=h.angleBetween(M,r.position),E=h.cross(M,r.position,M);h.normalize(E,E);let I=we.fromAxisAngle(E,L,Lft),w=$.fromQuaternion(I,Rft);$.multiplyByVector(w,r.direction,r.direction),$.multiplyByVector(w,r.up,r.up),h.cross(r.direction,r.up,r.right),h.cross(r.right,r.direction,r.up),r._setTransform(W)}}var Xft=new D,Pft=new D,kxe=new pn,Dxe=new pn,vft=new h,wft=new h;function Kd(e,t,n,i){let r=e._scene.camera,s=Xft;s.x=n.startPosition.x,s.y=0;let a=Pft;a.x=n.endPosition.x,a.y=0;let c=r.getPickRay(s,kxe),d=r.getPickRay(a,Dxe),u=0,m,p;r.frustum instanceof sn?(m=c.origin,p=d.origin,h.add(r.direction,m,m),h.add(r.direction,p,p),h.subtract(m,r.position,m),h.subtract(p,r.position,p),h.normalize(m,m),h.normalize(p,p)):(m=c.direction,p=d.direction);let g=h.dot(m,p);g<1&&(u=Math.acos(g)),u=n.startPosition.x>n.endPosition.x?-u:u;let f=e._horizontalRotationAxis;if(l(i)?r.look(i,-u):l(f)?r.look(f,-u):r.lookLeft(u),s.x=0,s.y=n.startPosition.y,a.x=0,a.y=n.endPosition.y,c=r.getPickRay(s,kxe),d=r.getPickRay(a,Dxe),u=0,r.frustum instanceof sn?(m=c.origin,p=d.origin,h.add(r.direction,m,m),h.add(r.direction,p,p),h.subtract(m,r.position,m),h.subtract(p,r.position,p),h.normalize(m,m),h.normalize(p,p)):(m=c.direction,p=d.direction),g=h.dot(m,p),g<1&&(u=Math.acos(g)),u=n.startPosition.y>n.endPosition.y?-u:u,i=y(i,f),l(i)){let x=r.direction,_=h.negate(i,vft),C=h.equalsEpsilon(x,i,X.EPSILON2),V=h.equalsEpsilon(x,_,X.EPSILON2);if(!C&&!V){g=h.dot(x,i);let Z=X.acosClamped(g);u>0&&u>Z&&(u=Z-X.EPSILON4),g=h.dot(x,_),Z=X.acosClamped(g),u<0&&-u>Z&&(u=-Z+X.EPSILON4);let R=h.cross(i,x,wft);r.look(R,u)}else(C&&u<0||V&&u>0)&&r.look(r.right,-u)}else r.lookUp(u)}function Fft(e){cl(e,e.enableRotate,e.rotateEventTypes,bft,e.inertiaSpin,"_lastInertiaSpinMovement"),cl(e,e.enableZoom,e.zoomEventTypes,n_e,e.inertiaZoom,"_lastInertiaZoomMovement"),cl(e,e.enableTilt,e.tiltEventTypes,Gft,e.inertiaSpin,"_lastInertiaTiltMovement"),cl(e,e.enableLook,e.lookEventTypes,Kd)}var Aft=new A,Mft=new he;function Mj(e,t){e._adjustedHeightForTerrain=!0;let n=e._scene,i=n.mode;if(i===oe.SCENE2D||i===oe.MORPHING)return;let o=n.camera,r=y(n.ellipsoid,te.WGS84),s=n.mapProjection,a,c;A.equals(o.transform,A.IDENTITY)||(a=A.clone(o.transform,Aft),c=h.magnitude(o.position),o._setTransform(A.IDENTITY));let d=Mft;i===oe.SCENE3D?r.cartesianToCartographic(o.position,d):s.unproject(o.position,d);let u=!1;if(d.height<e._minimumCollisionTerrainHeight){let m=e._scene.globeHeight;if(l(m)){let p=m+e.minimumZoomDistance,g=m-e._lastGlobeHeight,f=g/e._lastGlobeHeight;d.height<p&&(t||Math.abs(f)<=.1)&&(d.height=p,i===oe.SCENE3D?r.cartographicToCartesian(d,o.position):s.project(d,o.position),u=!0),t||Math.abs(f)<=.1?e._lastGlobeHeight=m:e._lastGlobeHeight+=g*.1}}l(a)&&(o._setTransform(a),u&&(h.normalize(o.position,o.position),h.negate(o.position,o.direction),h.multiplyByScalar(o.position,Math.max(c,e.minimumZoomDistance),o.position),h.normalize(o.direction,o.direction),h.cross(o.direction,o.up,o.right),h.cross(o.right,o.direction,o.up)))}HF.prototype.onMap=function(){let e=this._scene,t=e.mode,n=e.camera;return t===oe.COLUMBUS_VIEW?Math.abs(n.position.x)-this._maxCoord.x<0&&Math.abs(n.position.y)-this._maxCoord.y<0:!0};var Nft=new h,Uft=new h;HF.prototype.update=function(){let e=this._scene,{camera:t,globe:n,mode:i}=e;A.equals(t.transform,A.IDENTITY)?(this._globe=n,this._ellipsoid=y(e.ellipsoid,te.default)):(this._globe=void 0,this._ellipsoid=te.UNIT_SPHERE);let{verticalExaggeration:o,verticalExaggerationRelativeHeight:r}=e;this._minimumCollisionTerrainHeight=fr.getHeight(this.minimumCollisionTerrainHeight,o,r),this._minimumPickingTerrainHeight=fr.getHeight(this.minimumPickingTerrainHeight,o,r),this._minimumTrackBallHeight=fr.getHeight(this.minimumTrackBallHeight,o,r),this._cameraUnderground=e.cameraUnderground&&l(this._globe);let s=this._ellipsoid.maximumRadius;this._rotateFactor=1/s,this._rotateRateRangeAdjustment=s,this._adjustedHeightForTerrain=!1;let a=h.clone(t.positionWC,Nft),c=h.clone(t.directionWC,Uft);if(i===oe.SCENE2D?Mht(this):i===oe.COLUMBUS_VIEW?(this._horizontalRotationAxis=h.UNIT_Z,cft(this)):i===oe.SCENE3D&&(this._horizontalRotationAxis=void 0,Fft(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain){let d=!h.equals(a,t.positionWC)||!h.equals(c,t.directionWC);Mj(this,d)}this._aggregator.reset()};HF.prototype.isDestroyed=function(){return!1};HF.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),me(this)};var JF=HF;var R9i=S(T(),1);var s9i=S(T(),1),QF=`uniform sampler2D colorTexture; uniform sampler2D colorTexture2; uniform vec2 center; @@ -13548,7 +13645,7 @@ void main() float t = smoothstep(0.5, 0.8, x); out_FragColor = mix(color0 + color1, color1, t); } -`;var dUi=T(S(),1),d9=`uniform sampler2D colorTexture; +`;var c9i=S(T(),1),jF=`uniform sampler2D colorTexture; uniform float avgLuminance; uniform float threshold; @@ -13578,7 +13675,7 @@ void main() xyz.r = brightness; out_FragColor = vec4(czm_XYZToRGB(xyz), 1.0); } -`;function cb(){this._sceneFramebuffer=new AT;let e=.125,t=new Array(6);t[0]=new fo({fragmentShader:jl,textureScale:e,forcePowerOfTwo:!0,sampleMode:Kd.LINEAR});let n=t[1]=new fo({fragmentShader:d9,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new D,t[2]=new fo({fragmentShader:Gy,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:0},textureScale:e,forcePowerOfTwo:!0}),t[3]=new fo({fragmentShader:Gy,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:1},textureScale:e,forcePowerOfTwo:!0}),t[4]=new fo({fragmentShader:jl,sampleMode:Kd.LINEAR}),this._uCenter=new D,this._uRadius=void 0,t[5]=new fo({fragmentShader:l9,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.framebuffer.getColorTexture(0)}}}),this._stages=new al({stages:t});let o=new YT(this),r=t.length;for(let s=0;s<r;++s)t[s]._textureCache=o;this._textureCache=o,this.length=t.length}cb.prototype.get=function(e){return this._stages.get(e)};cb.prototype.getStageByName=function(e){let t=this._stages.length;for(let n=0;n<t;++n){let i=this._stages.get(n);if(i.name===e)return i}};var T0t=new se,W_e=new D,S0t=new D,P_e=new M;function C0t(e,t,n){let i=t.uniformState,o=i.sunPositionWC,r=i.view,s=i.viewProjection,a=i.projection,c=M.computeViewportTransformation(n,0,1,P_e),d=M.multiplyByPoint(r,o,T0t),u=Gt.pointToGLWindowCoordinates(s,c,o,W_e);d.x+=W.SOLAR_RADIUS;let m=Gt.pointToGLWindowCoordinates(a,c,d,d),p=D.magnitude(D.subtract(m,u,m))*30*2,g=S0t;g.x=p,g.y=p,e._uCenter=D.clone(u,e._uCenter),e._uRadius=Math.max(g.x,g.y)*.15;let f=t.drawingBufferWidth,x=t.drawingBufferHeight,_=e._stages,C=_.get(0),V=C.outputTexture.width,L=C.outputTexture.height,Z=new He;Z.width=V,Z.height=L,c=M.computeViewportTransformation(Z,0,1,P_e),u=Gt.pointToGLWindowCoordinates(s,c,o,W_e),g.x*=V/f,g.y*=L/x;let G=C.scissorRectangle;G.x=Math.max(u.x-g.x*.5,0),G.y=Math.max(u.y-g.y*.5,0),G.width=Math.min(g.x,f),G.height=Math.min(g.y,x);for(let X=1;X<4;++X)He.clone(G,_.get(X).scissorRectangle)}cb.prototype.clear=function(e,t,n){this._sceneFramebuffer.clear(e,t,n),this._textureCache.clear(e)};cb.prototype.update=function(e){let t=e.context,n=e.viewport,i=this._sceneFramebuffer;i.update(t,n);let o=i.framebuffer;return this._textureCache.update(t),this._stages.update(t,!1),C0t(this,t,n),o};cb.prototype.execute=function(e){let t=this._sceneFramebuffer.framebuffer.getColorTexture(0),n=this._stages,i=n.length;n.get(0).execute(e,t);for(let o=1;o<i;++o)n.get(o).execute(e,n.get(o-1).outputTexture)};cb.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(jl,{uniformMap:{colorTexture:function(){return n._stages.get(n._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};cb.prototype.isDestroyed=function(){return!1};cb.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),me(this)};var u9=cb;var FUi=T(S(),1);function v_e(){this._cachedShowFrustumsShaders={}}function V0t(e){let t={},n=e.vertexAttributes;for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i].index);return t}function L0t(e,t){let n=e.context,i=t,o=i.fragmentShaderSource.clone(),r=[];o.sources=o.sources.map(function(u){u=Ye.replaceMain(u,"czm_Debug_main");let m=/out_FragData_(\d+)/g,p;for(;(p=m.exec(u))!==null;)r.indexOf(p[1])===-1&&r.push(p[1]);return u});let s=r.length,a="";a+=`uniform vec3 debugShowCommandsColor; +`;function o0(){this._sceneFramebuffer=new ZS;let e=.125,t=new Array(6);t[0]=new fo({fragmentShader:Ql,textureScale:e,forcePowerOfTwo:!0,sampleMode:Bd.LINEAR});let n=t[1]=new fo({fragmentShader:jF,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new D,t[2]=new fo({fragmentShader:yy,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:0},textureScale:e,forcePowerOfTwo:!0}),t[3]=new fo({fragmentShader:yy,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:1},textureScale:e,forcePowerOfTwo:!0}),t[4]=new fo({fragmentShader:Ql,sampleMode:Bd.LINEAR}),this._uCenter=new D,this._uRadius=void 0,t[5]=new fo({fragmentShader:QF,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.framebuffer.getColorTexture(0)}}}),this._stages=new sl({stages:t});let o=new XS(this),r=t.length;for(let s=0;s<r;++s)t[s]._textureCache=o;this._textureCache=o,this.length=t.length}o0.prototype.get=function(e){return this._stages.get(e)};o0.prototype.getStageByName=function(e){let t=this._stages.length;for(let n=0;n<t;++n){let i=this._stages.get(n);if(i.name===e)return i}};var kft=new se,s_e=new D,Dft=new D,a_e=new A;function Bft(e,t,n){let i=t.uniformState,o=i.sunPositionWC,r=i.view,s=i.viewProjection,a=i.projection,c=A.computeViewportTransformation(n,0,1,a_e),d=A.multiplyByPoint(r,o,kft),u=Gt.pointToGLWindowCoordinates(s,c,o,s_e);d.x+=X.SOLAR_RADIUS;let m=Gt.pointToGLWindowCoordinates(a,c,d,d),p=D.magnitude(D.subtract(m,u,m))*30*2,g=Dft;g.x=p,g.y=p,e._uCenter=D.clone(u,e._uCenter),e._uRadius=Math.max(g.x,g.y)*.15;let f=t.drawingBufferWidth,x=t.drawingBufferHeight,_=e._stages,C=_.get(0),V=C.outputTexture.width,Z=C.outputTexture.height,R=new ze;R.width=V,R.height=Z,c=A.computeViewportTransformation(R,0,1,a_e),u=Gt.pointToGLWindowCoordinates(s,c,o,s_e),g.x*=V/f,g.y*=Z/x;let G=C.scissorRectangle;G.x=Math.max(u.x-g.x*.5,0),G.y=Math.max(u.y-g.y*.5,0),G.width=Math.min(g.x,f),G.height=Math.min(g.y,x);for(let W=1;W<4;++W)ze.clone(G,_.get(W).scissorRectangle)}o0.prototype.clear=function(e,t,n){this._sceneFramebuffer.clear(e,t,n),this._textureCache.clear(e)};o0.prototype.update=function(e){let t=e.context,n=e.viewport,i=this._sceneFramebuffer;i.update(t,n);let o=i.framebuffer;return this._textureCache.update(t),this._stages.update(t,!1),Bft(this,t,n),o};o0.prototype.execute=function(e){let t=this._sceneFramebuffer.framebuffer.getColorTexture(0),n=this._stages,i=n.length;n.get(0).execute(e,t);for(let o=1;o<i;++o)n.get(o).execute(e,n.get(o-1).outputTexture)};o0.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(Ql,{uniformMap:{colorTexture:function(){return n._stages.get(n._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};o0.prototype.isDestroyed=function(){return!1};o0.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),me(this)};var qF=o0;var v9i=S(T(),1);function c_e(){this._cachedShowFrustumsShaders={}}function Yft(e){let t={},n=e.vertexAttributes;for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i].index);return t}function Oft(e,t){let n=e.context,i=t,o=i.fragmentShaderSource.clone(),r=[];o.sources=o.sources.map(function(u){u=Ye.replaceMain(u,"czm_Debug_main");let m=/out_FragData_(\d+)/g,p;for(;(p=m.exec(u))!==null;)r.indexOf(p[1])===-1&&r.push(p[1]);return u});let s=r.length,a="";a+=`uniform vec3 debugShowCommandsColor; `,a+=`uniform vec3 debugShowFrustumsColor; `,a+=`void main() { @@ -13587,7 +13684,7 @@ void main() `,a+=` out_FragData_${r[c]}.rgb *= debugShowFrustumsColor; `;else a+=` out_FragColor.rgb *= debugShowCommandsColor; `,a+=` out_FragColor.rgb *= debugShowFrustumsColor; -`;a+="}",o.sources.push(a);let d=V0t(i);return qt.fromCache({context:n,vertexShaderSource:i.vertexShaderSource,fragmentShaderSource:o,attributeLocations:d})}var m9=new Y;function R0t(e,t){let n;return l(t.uniformMap)?n=t.uniformMap:n={},l(n.debugShowCommandsColor)||l(n.debugShowFrustumsColor)||(n.debugShowCommandsColor=function(){return e.debugShowCommands?(l(t._debugColor)||(t._debugColor=Y.fromRandom()),t._debugColor):Y.WHITE},n.debugShowFrustumsColor=function(){return e.debugShowFrustums?(m9.red=t.debugOverlappingFrustums&1?1:0,m9.green=t.debugOverlappingFrustums&2?1:0,m9.blue=t.debugOverlappingFrustums&4?1:0,m9.alpha=1,m9):Y.WHITE}),n}var Z0t=new et;v_e.prototype.executeDebugShowFrustumsCommand=function(e,t,n){let i=t.shaderProgram.id,o=this._cachedShowFrustumsShaders[i];l(o)||(o=L0t(e,t.shaderProgram),this._cachedShowFrustumsShaders[i]=o);let r=et.shallowClone(t,Z0t);r.shaderProgram=o,r.uniformMap=R0t(e,t),r.execute(e.context,n)};var h9=v_e;var DUi=T(S(),1);function JT(e,t,n){this._primitive=e,this._tileIndex=t,this._sampleIndex=n,this._metadata={},this._orientedBoundingBox=new Gn}JT.fromKeyframeNode=function(e,t,n,i){let o=new JT(e,t,n),{spatialNode:r,metadata:s}=i;return o._metadata=G0t(e,s,n),o._orientedBoundingBox=X0t(e,r,n,o._orientedBoundingBox),o};function G0t(e,t,n){if(!l(t))return;let{names:i,types:o}=e.provider,r={};for(let s=0;s<i.length;s++){let a=i[s],c=zt.getComponentCount(o[s]),d=t[s].slice(n*c,(n+1)*c);r[a]=d}return r}var w_e=new h,E0t=new h;function X0t(e,t,n,i){let o=t.dimensions,r=o.x*o.y,s=Math.floor(n/r),a=n-s*r,c=Math.floor(a/o.x),d=a-c*o.x,u=h.fromElements(d,c,s,w_e),m=h.divideComponents(h.subtract(u,e._paddingBefore,w_e),e.dimensions,E0t);return e._shape.computeOrientedBoundingBoxForSample(t,e.dimensions,m,i)}Object.defineProperties(JT.prototype,{metadata:{get:function(){return this._metadata}},primitive:{get:function(){return this._primitive}},sampleIndex:{get:function(){return this._sampleIndex}},tileIndex:{get:function(){return this._tileIndex}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox.clone()}}});JT.prototype.hasProperty=function(e){return l(this._metadata[e])};JT.prototype.getNames=function(){return Object.keys(this._metadata)};JT.prototype.getProperty=function(e){return this._metadata[e]};var f9=JT;var AYi=T(S(),1);var a3i=T(S(),1);var BDi=T(S(),1);var YUi=T(S(),1),p9=`struct Ray { +`;a+="}",o.sources.push(a);let d=Yft(i);return qt.fromCache({context:n,vertexShaderSource:i.vertexShaderSource,fragmentShaderSource:o,attributeLocations:d})}var $F=new Y;function zft(e,t){let n;return l(t.uniformMap)?n=t.uniformMap:n={},l(n.debugShowCommandsColor)||l(n.debugShowFrustumsColor)||(n.debugShowCommandsColor=function(){return e.debugShowCommands?(l(t._debugColor)||(t._debugColor=Y.fromRandom()),t._debugColor):Y.WHITE},n.debugShowFrustumsColor=function(){return e.debugShowFrustums?($F.red=t.debugOverlappingFrustums&1?1:0,$F.green=t.debugOverlappingFrustums&2?1:0,$F.blue=t.debugOverlappingFrustums&4?1:0,$F.alpha=1,$F):Y.WHITE}),n}var Kft=new tt;c_e.prototype.executeDebugShowFrustumsCommand=function(e,t,n){let i=t.shaderProgram.id,o=this._cachedShowFrustumsShaders[i];l(o)||(o=Oft(e,t.shaderProgram),this._cachedShowFrustumsShaders[i]=o);let r=tt.shallowClone(t,Kft);r.shaderProgram=o,r.uniformMap=zft(e,t),r.execute(e.context,n)};var e9=c_e;var U9i=S(T(),1);function MS(e,t,n){this._primitive=e,this._tileIndex=t,this._sampleIndex=n,this._metadata={},this._orientedBoundingBox=new Gn}MS.fromKeyframeNode=function(e,t,n,i){let o=new MS(e,t,n),{spatialNode:r,metadata:s}=i;return o._metadata=Hft(e,s,n),o._orientedBoundingBox=Qft(e,r,n,o._orientedBoundingBox),o};function Hft(e,t,n){if(!l(t))return;let{names:i,types:o}=e.provider,r={};for(let s=0;s<i.length;s++){let a=i[s],c=Kt.getComponentCount(o[s]),d=t[s].slice(n*c,(n+1)*c);r[a]=d}return r}var l_e=new h,Jft=new h;function Qft(e,t,n,i){let o=t.dimensions,r=o.x*o.y,s=Math.floor(n/r),a=n-s*r,c=Math.floor(a/o.x),d=a-c*o.x,u=h.fromElements(d,c,s,l_e),m=h.divideComponents(h.subtract(u,e._paddingBefore,l_e),e.dimensions,Jft);return e._shape.computeOrientedBoundingBoxForSample(t,e.dimensions,m,i)}Object.defineProperties(MS.prototype,{metadata:{get:function(){return this._metadata}},primitive:{get:function(){return this._primitive}},sampleIndex:{get:function(){return this._sampleIndex}},tileIndex:{get:function(){return this._tileIndex}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox.clone()}}});MS.prototype.hasProperty=function(e){return l(this._metadata[e])};MS.prototype.getNames=function(){return Object.keys(this._metadata)};MS.prototype.getProperty=function(e){return this._metadata[e]};var t9=MS;var k5i=S(T(),1);var rMi=S(T(),1);var kAi=S(T(),1);var D9i=S(T(),1),n9=`struct Ray { vec3 pos; vec3 dir; vec3 rawDir; @@ -13618,7 +13715,7 @@ struct PointJacobianT { vec3 point; mat3 jacobianT; }; -`;var HUi=T(S(),1),b9=`// See Intersection.glsl for the definition of intersectScene +`;var Y9i=S(T(),1),i9=`// See Intersection.glsl for the definition of intersectScene // See IntersectionUtils.glsl for the definition of nextIntersection // See convertUvToBox.glsl, convertUvToCylinder.glsl, or convertUvToEllipsoid.glsl // for the definition of convertUvToShapeUvSpace. The appropriate function is @@ -13876,7 +13973,7 @@ void main() out_FragColor = colorAccum; #endif } -`;var KUi=T(S(),1),g9=`in vec2 position; +`;var z9i=S(T(),1),o9=`in vec2 position; uniform vec4 u_ndcSpaceAxisAlignedBoundingBox; @@ -13887,7 +13984,7 @@ void main() { vec2 scale = 0.5 * (aabbMax - aabbMin); gl_Position = vec4(position * scale + translation, 0.0, 1.0); } -`;var QUi=T(S(),1),y9=`/* Intersection defines +`;var H9i=S(T(),1),r9=`/* Intersection defines #define INTERSECTION_COUNT ### */ @@ -14053,7 +14150,7 @@ RayShapeIntersection nextIntersection(inout Intersections ix) { #endif // NOTE: initializeIntersections, nextIntersection aren't even declared unless INTERSECTION_COUNT > 1 -`;var qUi=T(S(),1),x9=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections, +`;var Q9i=S(T(),1),s9=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections, // setIntersectionPair, INF_HIT, NO_HIT /* intersectDepth defines (set in Scene/VoxelRenderResources.js) @@ -14076,7 +14173,7 @@ void intersectDepth(in vec2 screenCoord, in Ray ray, inout Intersections ix) { setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(NO_HIT)); } } -`;var eDi=T(S(),1),_9=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections, INF_HIT, +`;var q9i=S(T(),1),a9=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections, INF_HIT, // NO_HIT, setShapeIntersection /* Clipping plane defines (set in Scene/VoxelRenderResources.js) @@ -14154,7 +14251,7 @@ void intersectClippingPlanes(in Ray ray, inout Intersections ix) { setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume); #endif } -`;var nDi=T(S(),1),rL=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, +`;var eAi=S(T(),1),HV=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, // RayShapeIntersection vec4 intersectLongitude(in Ray ray, in float angle, in bool positiveNormal) { @@ -14256,7 +14353,7 @@ RayShapeIntersection intersectRegularWedge(in Ray ray, in vec2 minMaxAngle) return RayShapeIntersection(miss, miss); } } -`;var oDi=T(S(),1),T9=`// See IntersectionUtils.glsl for the definitions of Ray, RayShapeIntersection, +`;var nAi=S(T(),1),c9=`// See IntersectionUtils.glsl for the definitions of Ray, RayShapeIntersection, // NO_HIT, Intersections /* Box defines (set in Scene/VoxelBoxShape.js) @@ -14303,7 +14400,7 @@ void intersectShape(in Ray ray, inout Intersections ix) RayShapeIntersection intersection = intersectBox(ray, u_renderMinBounds, u_renderMaxBounds); setShapeIntersection(ix, BOX_INTERSECTION_INDEX, intersection); } -`;var sDi=T(S(),1),S9=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, Intersections, +`;var oAi=S(T(),1),l9=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, Intersections, // RayShapeIntersection, setSurfaceIntersection, setShapeIntersection, // intersectIntersections // See IntersectLongitude.glsl for the definitions of intersectHalfPlane, @@ -14449,7 +14546,7 @@ void intersectShape(Ray ray, inout Intersections ix) setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]); #endif } -`;var cDi=T(S(),1),C9=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, Intersections, +`;var sAi=S(T(),1),d9=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, Intersections, // RayShapeIntersection, setSurfaceIntersection, setShapeIntersection // See IntersectLongitude.glsl for the definitions of intersectHalfPlane, // intersectFlippedWedge, intersectRegularWedge @@ -14787,7 +14884,7 @@ void intersectShape(in Ray ray, inout Intersections ix) { setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]); #endif } -`;var dDi=T(S(),1),QT=`// Main intersection function for Voxel scenes. +`;var cAi=S(T(),1),NS=`// Main intersection function for Voxel scenes. // See IntersectBox.glsl, IntersectCylinder.glsl, or IntersectEllipsoid.glsl // for the definition of intersectShape. The appropriate function is selected // based on the VoxelPrimitive shape type, and added to the shader in @@ -14839,7 +14936,7 @@ RayShapeIntersection intersectScene(in vec2 screenCoord, in Ray ray, out Interse return intersection; } -`;var mDi=T(S(),1),V9=`/* Box defines (set in Scene/VoxelBoxShape.js) +`;var dAi=S(T(),1),u9=`/* Box defines (set in Scene/VoxelBoxShape.js) #define BOX_HAS_SHAPE_BOUNDS */ @@ -14883,7 +14980,7 @@ vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) { #else return shapeUv; #endif -}`;var fDi=T(S(),1),L9=`/* Cylinder defines (set in Scene/VoxelCylinderShape.js) +}`;var mAi=S(T(),1),m9=`/* Cylinder defines (set in Scene/VoxelCylinderShape.js) #define CYLINDER_HAS_SHAPE_BOUNDS_RADIUS #define CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT #define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE @@ -14982,7 +15079,7 @@ vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) { return vec3(radius, height, angle); } -`;var bDi=T(S(),1),R9=`/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js) +`;var fAi=S(T(),1),h9=`/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js) #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY #define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE @@ -15121,7 +15218,7 @@ vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) { return vec3(longitude, latitude, height); } -`;var yDi=T(S(),1),Z9=`// These octree flags must be in sync with GpuOctreeFlag in VoxelTraversal.js +`;var bAi=S(T(),1),f9=`// These octree flags must be in sync with GpuOctreeFlag in VoxelTraversal.js #define OCTREE_FLAG_INTERNAL 0 #define OCTREE_FLAG_LEAF 1 #define OCTREE_FLAG_PACKED_LEAF_FROM_PARENT 2 @@ -15346,7 +15443,7 @@ void traverseOctreeFromExisting(in vec3 shapePosition, inout TraversalData trave sampleDatas[1].tileUv = getClampedTileUv(shapePosition, sampleDatas[1].tileCoords); #endif } -`;var _Di=T(S(),1),G9=`// See Octree.glsl for the definitions of SampleData and intMod +`;var yAi=S(T(),1),p9=`// See Octree.glsl for the definitions of SampleData and intMod /* Megatexture defines (set in Scene/VoxelRenderResources.js) #define SAMPLE_COUNT ### @@ -15481,13 +15578,20 @@ Properties accumulatePropertiesFromMegatexture(in SampleData sampleDatas[SAMPLE_ return properties; #endif } -`;function I0t(e){let t=new d_;this.shaderBuilder=t;let n=e._customShader,i=xt(e._uniformMap,n.uniformMap);e._uniformMap=i;let o=n.uniforms;for(let p in o)if(o.hasOwnProperty(p)){let g=o[p];t.addUniform(g.type,p,xe.FRAGMENT)}t.addUniform("sampler2D","u_megatextureTextures[METADATA_COUNT]",xe.FRAGMENT),this.uniformMap=i;let r=e._clippingPlanes,s=l(r)&&r.enabled?r.length:0;this.clippingPlanes=r,this.clippingPlanesLength=s,t.addVertexLines([g9]),t.addFragmentLines([n.fragmentShaderText,"#line 0",Z9,p9,y9,G9]),s>0&&(t.addDefine("CLIPPING_PLANES",void 0,xe.FRAGMENT),t.addDefine("CLIPPING_PLANES_COUNT",s,xe.FRAGMENT),r.unionClippingRegions&&t.addDefine("CLIPPING_PLANES_UNION",void 0,xe.FRAGMENT),t.addFragmentLines([_9])),e._depthTest&&(t.addDefine("DEPTH_TEST",void 0,xe.FRAGMENT),t.addFragmentLines([x9]));let a=e._provider.shape;a==="BOX"?t.addFragmentLines([V9,T9,QT]):a==="CYLINDER"?t.addFragmentLines([L9,rL,S9,QT]):a==="ELLIPSOID"&&(t.addDefine("SHAPE_ELLIPSOID",void 0,xe.FRAGMENT),t.addFragmentLines([R9,rL,C9,QT])),t.addFragmentLines([b9]);let c=e._shape,d=c.shaderDefines;for(let p in d)if(d.hasOwnProperty(p)){let g=d[p];l(g)&&(g=g===!0?void 0:g,t.addDefine(p,g,xe.FRAGMENT))}let u=c.shaderMaximumIntersectionsLength;s>0&&(t.addDefine("CLIPPING_PLANES_INTERSECTION_INDEX",u,xe.FRAGMENT),s===1?u+=1:r.unionClippingRegions?u+=2:u+=1),e._depthTest&&(t.addDefine("DEPTH_INTERSECTION_INDEX",u,xe.FRAGMENT),u+=1),t.addDefine("INTERSECTION_COUNT",u,xe.FRAGMENT),(!h.equals(e.paddingBefore,h.ZERO)||!h.equals(e.paddingAfter,h.ZERO))&&t.addDefine("PADDING",void 0,xe.FRAGMENT),e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,xe.FRAGMENT),e._jitter&&t.addDefine("JITTER",void 0,xe.FRAGMENT),e._nearestSampling&&t.addDefine("NEAREST_SAMPLING",void 0,xe.FRAGMENT);let m=e._traversal;t.addDefine("SAMPLE_COUNT",`${m._sampleCount}`,xe.FRAGMENT)}var E9=I0t;var KDi=T(S(),1);function W0t(e,t){let{shaderBuilder:n}=e,{names:i,types:o,componentTypes:r,minimumValues:s,maximumValues:a}=t._provider,c=o.length,d=l(s)&&l(a);n.addDefine("METADATA_COUNT",c,xe.FRAGMENT),d&&n.addDefine("STATISTICS",void 0,xe.FRAGMENT);for(let P=0;P<c;P++){let F=i[P],A=o[P],b=`PropertyStatistics_${F}`,R=`PropertyStatistics_${F}`;n.addStruct(b,R,xe.FRAGMENT);let E=x3(A);n.addStructField(b,E,"min"),n.addStructField(b,E,"max")}let u="Statistics",m="Statistics",p="statistics";n.addStruct(u,m,xe.FRAGMENT);for(let P=0;P<c;P++){let F=i[P],A=`PropertyStatistics_${F}`,b=F;n.addStructField(u,A,b)}let g="Metadata",f="Metadata",x="metadata";n.addStruct(g,f,xe.FRAGMENT),n.addStructField(g,m,p);for(let P=0;P<c;P++){let F=i[P],A=o[P],b=x3(A);n.addStructField(g,b,F)}for(let P=0;P<c;P++){let F=i[P],A=o[P],b=v0t(A),R=`VoxelProperty_${F}`,E=`VoxelProperty_${F}`;n.addStruct(R,E,xe.FRAGMENT),n.addStructField(R,b,"partialDerivativeLocal"),n.addStructField(R,b,"partialDerivativeWorld"),n.addStructField(R,b,"partialDerivativeView"),n.addStructField(R,b,"partialDerivativeValid")}let _="Voxel",C="Voxel",V="voxel";n.addStruct(_,C,xe.FRAGMENT);for(let P=0;P<c;P++){let F=i[P],A=`VoxelProperty_${F}`;n.addStructField(_,A,F)}n.addStructField(_,"vec3","positionEC"),n.addStructField(_,"vec3","positionUv"),n.addStructField(_,"vec3","positionShapeUv"),n.addStructField(_,"vec3","positionUvLocal"),n.addStructField(_,"vec3","viewDirUv"),n.addStructField(_,"vec3","viewDirWorld"),n.addStructField(_,"vec3","surfaceNormal"),n.addStructField(_,"float","travelDistance"),n.addStructField(_,"int","stepCount"),n.addStructField(_,"int","tileIndex"),n.addStructField(_,"int","sampleIndex");let L="FragmentInput";n.addStruct(L,"FragmentInput",xe.FRAGMENT),n.addStructField(L,f,x),n.addStructField(L,C,V);let G="Properties",X="Properties",v="properties";n.addStruct(G,X,xe.FRAGMENT);for(let P=0;P<c;P++){let F=i[P],A=o[P],b=x3(A);n.addStructField(G,b,F)}{let P="clearProperties";n.addFunction(P,`${X} clearProperties()`,xe.FRAGMENT),n.addFunctionLines(P,[`${X} ${v};`]);for(let F=0;F<c;F++){let A=i[F],b=o[F],R=r[F],E=x3(b,R);n.addFunctionLines(P,[`${v}.${A} = ${E}(0.0);`])}n.addFunctionLines(P,[`return ${v};`])}{let P="sumProperties";n.addFunction(P,`${X} sumProperties(${X} propertiesA, ${X} propertiesB)`,xe.FRAGMENT),n.addFunctionLines(P,[`${X} ${v};`]);for(let F=0;F<c;F++){let A=i[F];n.addFunctionLines(P,[`${v}.${A} = propertiesA.${A} + propertiesB.${A};`])}n.addFunctionLines(P,[`return ${v};`])}{let P="scaleProperties";n.addFunction(P,`${X} scaleProperties(${X} ${v}, float scale)`,xe.FRAGMENT),n.addFunctionLines(P,[`${X} scaledProperties = ${v};`]);for(let F=0;F<c;F++){let A=i[F];n.addFunctionLines(P,[`scaledProperties.${A} *= scale;`])}n.addFunctionLines(P,["return scaledProperties;"])}{let P="mixProperties";n.addFunction(P,`${X} mixProperties(${X} propertiesA, ${X} propertiesB, float mixFactor)`,xe.FRAGMENT),n.addFunctionLines(P,[`${X} ${v};`]);for(let F=0;F<c;F++){let A=i[F];n.addFunctionLines(P,[`${v}.${A} = mix(propertiesA.${A}, propertiesB.${A}, mixFactor);`])}n.addFunctionLines(P,[`return ${v};`])}{let P="copyPropertiesToMetadata";n.addFunction(P,`void copyPropertiesToMetadata(in ${X} ${v}, inout ${f} ${x})`,xe.FRAGMENT);for(let F=0;F<c;F++){let A=i[F];n.addFunctionLines(P,[`${x}.${A} = ${v}.${A};`])}}if(d){let P="setStatistics";n.addFunction(P,`void setStatistics(inout ${m} ${p})`,xe.FRAGMENT);for(let F=0;F<c;F++){let A=i[F],b=o[F],R=zt.getComponentCount(b);for(let E=0;E<R;E++){let I=w0t(b,E),w=s[F][E],N=a[F][E];n.addFunctionLines(P,[`${p}.${A}.min${I} = ${F_e(w)};`,`${p}.${A}.max${I} = ${F_e(N)};`])}}}{let P="getPropertiesFromMegatextureAtUv";n.addFunction(P,`${X} getPropertiesFromMegatextureAtUv(vec2 texcoord)`,xe.FRAGMENT),n.addFunctionLines(P,[`${X} ${v};`]);for(let F=0;F<c;F++){let A=i[F],b=o[F],R=r[F],E=P0t(b,R);n.addFunctionLines(P,[`properties.${A} = texture(u_megatextureTextures[${F}], texcoord)${E};`])}n.addFunctionLines(P,[`return ${v};`])}}function x3(e){if(e===zt.SCALAR)return"float";if(e===zt.VEC2)return"vec2";if(e===zt.VEC3)return"vec3";if(e===zt.VEC4)return"vec4"}function P0t(e){if(e===zt.SCALAR)return".r";if(e===zt.VEC2)return".ra";if(e===zt.VEC3)return".rgb";if(e===zt.VEC4)return""}function v0t(e){if(e===zt.SCALAR)return"vec3";if(e===zt.VEC2)return"mat2";if(e===zt.VEC3)return"mat3";if(e===zt.VEC4)return"mat4"}function F_e(e){let t=e.toString();return t.indexOf(".")===-1&&(t=`${e}.0`),t}function w0t(e,t){return e===zt.SCALAR?"":`[${t}]`}var X9=W0t;function F0t(e,t){let n=new E9(e);X9(n,e);let{shaderBuilder:i,clippingPlanes:o,clippingPlanesLength:r}=n;if(r>0){let C="getClippingPlane",V=K0(o,t),L=0,Z=V.indexOf(")")+1,G=V.indexOf("{",Z)+1,X=V.indexOf("}",G),v=V.slice(L,Z),P=V.slice(G,X);i.addFunction(C,v,xe.FRAGMENT),i.addFunctionLines(C,[P])}let s=i.clone();s.addDefine("PICKING",void 0,xe.FRAGMENT);let a=i.clone();a.addDefine("PICKING_VOXEL",void 0,xe.FRAGMENT);let c=i.buildShaderProgram(t),d=s.buildShaderProgram(t),u=a.buildShaderProgram(t),m=De.fromCache({cull:{enabled:!0,face:fi.BACK},depthTest:{enabled:!1},depthMask:!1,blending:un.PRE_MULTIPLIED_ALPHA_BLEND}),p=t.getViewportQuadVertexArray(),g=e._depthTest,f=new et({vertexArray:p,primitiveType:Fe.TRIANGLES,renderState:m,shaderProgram:c,uniformMap:n.uniformMap,modelMatrix:e._compoundModelMatrix,pass:Re.VOXELS,executeInClosestFrustum:!0,owner:this,cull:g,occlude:g}),x=et.shallowClone(f,new et);x.shaderProgram=d,x.pickOnly=!0;let _=et.shallowClone(f,new et);if(_.shaderProgram=u,_.pickOnly=!0,l(e._drawCommand)){let C=e._drawCommand;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}if(l(e._drawCommandPick)){let C=e._drawCommandPick;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}if(l(e._drawCommandPickVoxel)){let C=e._drawCommandPickVoxel;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}e._drawCommand=f,e._drawCommandPick=x,e._drawCommandPickVoxel=_}var I9=F0t;var Y3i=T(S(),1);var b3i=T(S(),1);function ql(){this.orientedBoundingBox=new Gn,this.boundingSphere=new le,this.boundTransform=new M,this.shapeTransform=new M,this._minBounds=h.clone(ql.DefaultMinBounds,new h),this._maxBounds=h.clone(ql.DefaultMaxBounds,new h),this.shaderUniforms={renderMinBounds:new h,renderMaxBounds:new h,boxUvToShapeUvScale:new h,boxUvToShapeUvTranslate:new h},this.shaderDefines={BOX_INTERSECTION_INDEX:void 0,BOX_HAS_SHAPE_BOUNDS:void 0},this.shaderMaximumIntersectionsLength=0}var A0t=new h,v8=new h,M0t=new $,N0t=new h,k0t=new h,U0t=new h,D0t=new h,A_e=M.fromRotationTranslation($.fromUniformScale(.5,new $),new h(.5,.5,.5),new M);ql.prototype.update=function(e,t,n,i,o){i=y(i,ql.DefaultMinBounds),o=y(o,ql.DefaultMaxBounds);let r=ql.DefaultMinBounds,s=ql.DefaultMaxBounds;t=this._minBounds=h.clamp(t,r,s,this._minBounds),n=this._maxBounds=h.clamp(n,r,s,this._maxBounds),i=h.clamp(i,r,s,N0t),o=h.clamp(o,r,s,k0t);let a=h.clamp(t,i,o,U0t),c=h.clamp(n,i,o,D0t),d=M.getScale(e,v8);if(a.x>c.x||a.y>c.y||a.z>c.z||(a.x===c.x)+(a.y===c.y)+(a.z===c.z)>=2||i.x>o.x||i.y>o.y||i.z>o.z||d.x===0||d.y===0||d.z===0)return!1;this.shapeTransform=M.clone(e,this.shapeTransform),this.orientedBoundingBox=F8(a,c,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=M.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=le.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let{shaderUniforms:u,shaderDefines:m}=this;for(let f in m)m.hasOwnProperty(f)&&(m[f]=void 0);let p=!h.equals(t,r)||!h.equals(n,s),g=0;if(m.BOX_INTERSECTION_INDEX=g,g+=1,u.renderMinBounds=M.multiplyByPoint(A_e,a,u.renderMinBounds),u.renderMaxBounds=M.multiplyByPoint(A_e,c,u.renderMaxBounds),p){m.BOX_HAS_SHAPE_BOUNDS=!0;let f=t,x=n;u.boxUvToShapeUvScale=h.fromElements(2/(f.x===x.x?1:x.x-f.x),2/(f.y===x.y?1:x.y-f.y),2/(f.z===x.z?1:x.z-f.z),u.boxUvToShapeUvScale),u.boxUvToShapeUvTranslate=h.fromElements(-u.boxUvToShapeUvScale.x*(f.x*.5+.5),-u.boxUvToShapeUvScale.y*(f.y*.5+.5),-u.boxUvToShapeUvScale.z*(f.z*.5+.5),u.boxUvToShapeUvTranslate)}return this.shaderMaximumIntersectionsLength=g,!0};var _3=new h,w8=new h;ql.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=h.fromElements(W.lerp(r.x,s.x,a*t),W.lerp(r.y,s.y,a*n),W.lerp(r.z,s.z,a*i),_3),d=h.fromElements(W.lerp(r.x,s.x,a*(t+1)),W.lerp(r.y,s.y,a*(n+1)),W.lerp(r.z,s.z,a*(i+1)),w8);return F8(c,d,this.shapeTransform,o)};var M_e=new h;ql.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,M_e),s=h.multiplyByScalar(r,o,M_e),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,_3),o,_3),c=h.add(a,s,w8),d=this._minBounds,u=this._maxBounds,m=h.fromElements(W.lerp(d.x,u.x,a.x),W.lerp(d.y,u.y,a.y),W.lerp(d.z,u.z,a.z),_3),p=h.fromElements(W.lerp(d.x,u.x,c.x),W.lerp(d.y,u.y,c.y),W.lerp(d.z,u.z,c.z),w8);return F8(m,p,this.shapeTransform,i)};ql.DefaultMinBounds=Object.freeze(new h(-1,-1,-1));ql.DefaultMaxBounds=Object.freeze(new h(1,1,1));function F8(e,t,n,i){let o=ql.DefaultMinBounds,r=ql.DefaultMaxBounds;if(h.equals(e,o)&&h.equals(t,r))i.center=M.getTranslation(n,i.center),i.halfAxes=M.getMatrix3(n,i.halfAxes);else{let a=M.getScale(n,v8),c=h.midpoint(e,t,A0t);i.center=M.multiplyByPoint(n,c,i.center),a=h.fromElements(a.x*.5*(t.x-e.x),a.y*.5*(t.y-e.y),a.z*.5*(t.z-e.z),v8);let d=M.getRotation(n,M0t);i.halfAxes=$.setScale(d,a,i.halfAxes)}return i}var Qf=ql;var Z3i=T(S(),1);function Qr(){this.orientedBoundingBox=new Gn,this.boundingSphere=new le,this.boundTransform=new M,this.shapeTransform=new M,this._minimumRadius=Qr.DefaultMinBounds.x,this._maximumRadius=Qr.DefaultMaxBounds.x,this._minimumHeight=Qr.DefaultMinBounds.y,this._maximumHeight=Qr.DefaultMaxBounds.y,this._minimumAngle=Qr.DefaultMinBounds.z,this._maximumAngle=Qr.DefaultMaxBounds.z,this.shaderUniforms={cylinderRenderHeightMinMax:new D,cylinderRenderRadiusMinMax:new D,cylinderRenderAngleMinMax:new D,cylinderUvToShapeUvRadius:new D,cylinderUvToShapeUvHeight:new D,cylinderUvToShapeUvAngle:new D,cylinderShapeUvAngleMinMax:new D,cylinderShapeUvAngleRangeZeroMid:0},this.shaderDefines={CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF:void 0,CYLINDER_HAS_SHAPE_BOUNDS_RADIUS:void 0,CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MAX:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MIN:void 0,CYLINDER_INTERSECTION_INDEX_ANGLE:void 0},this.shaderMaximumIntersectionsLength=0}var D_e=new h;Qr.prototype.update=function(e,t,n,i,o){i=y(i,Qr.DefaultMinBounds),o=y(o,Qr.DefaultMaxBounds);let r=Qr.DefaultMinBounds.x,s=Qr.DefaultMaxBounds.x,a=Qr.DefaultMinBounds.y,c=Qr.DefaultMaxBounds.y,d=Qr.DefaultMinBounds.z,u=Qr.DefaultMaxBounds.z,m=u-d,p=.5*m,g=W.EPSILON10,f=W.EPSILON3,x=W.EPSILON10,_=W.clamp(t.x,r,s),C=W.clamp(n.x,r,s),V=W.clamp(i.x,r,s),L=W.clamp(o.x,r,s),Z=Math.max(_,V),G=Math.min(C,L),X=W.clamp(t.y,a,c),v=W.clamp(n.y,a,c),P=W.clamp(i.y,a,c),F=W.clamp(o.y,a,c),A=Math.max(X,P),b=Math.min(v,F),R=W.negativePiToPi(t.z),E=W.negativePiToPi(n.z),I=W.negativePiToPi(i.z),w=W.negativePiToPi(o.z),N=Math.max(R,I),B=Math.min(E,w),U=M.getScale(e,D_e);if(G===0||Z>G||A>b||W.equalsEpsilon(U.x,0,void 0,g)||W.equalsEpsilon(U.y,0,void 0,g)||W.equalsEpsilon(U.z,0,void 0,g))return!1;this._minimumRadius=_,this._maximumRadius=C,this._minimumHeight=X,this._maximumHeight=v,this._minimumAngle=R,this._maximumAngle=E,this.shapeTransform=M.clone(e,this.shapeTransform),this.orientedBoundingBox=M8(Z,G,A,b,N,B,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=M.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=le.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let J=_===r&&C===s,H=X===a&&v===c,ee=E<R,z=E-R+ee*m,j=z>p+x&&z<m-x,q=z<p-x,be=z>=p-x&&z<=p+x,Te=j||q||be,ae=W.equalsEpsilon(R,d,void 0,f),ye=W.equalsEpsilon(E,u,void 0,f),Se=Z===r,Le=B<N,Xe=B-N+Le*m,Pe=Xe>=p-x&&Xe<m-x,ke=Xe>x&&Xe<p-x,Pt=Xe<=x,Ot=Pe||ke||Pt,{shaderUniforms:ht,shaderDefines:Ae}=this;for(let Qe in Ae)Ae.hasOwnProperty(Qe)&&(Ae[Qe]=void 0);let $e=0;if(Ae.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX=$e,$e+=1,Se||(Ae.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN=!0,Ae.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN=$e,$e+=1),ht.cylinderRenderRadiusMinMax=D.fromElements(Z,G,ht.cylinderRenderRadiusMinMax),Z===G&&(Ae.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT=!0),!J){Ae.CYLINDER_HAS_SHAPE_BOUNDS_RADIUS=!0;let Qe=C-_,je=0,kt=1;Qe!==0&&(je=1/Qe,kt=-_/Qe),ht.cylinderUvToShapeUvRadius=D.fromElements(je,kt,ht.cylinderUvToShapeUvRadius)}if(!H){Ae.CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT=!0;let Qe=v-X,je=0,kt=1;Qe!==0&&(je=2/Qe,kt=-(X+1)/Qe),ht.cylinderUvToShapeUvHeight=D.fromElements(je,kt,ht.cylinderUvToShapeUvHeight)}if(ht.cylinderRenderHeightMinMax=D.fromElements(A,b,ht.cylinderRenderHeightMinMax),ee&&(Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED=!0),Ot&&(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE=!0,Ae.CYLINDER_INTERSECTION_INDEX_ANGLE=$e,Pe?(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF=!0,$e+=1):ke?(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF=!0,$e+=2):Pt&&(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO=!0,$e+=2),ht.cylinderRenderAngleMinMax=D.fromElements(N,B,ht.cylinderRenderAngleMinMax)),Te){Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE=!0,ae&&(Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY=!0),ye&&(Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY=!0);let Qe=(R-d)/m,je=(E-d)/m,kt=1-z/m;if(ht.cylinderShapeUvAngleMinMax=D.fromElements(Qe,je,ht.cylinderShapeUvAngleMinMax),ht.cylinderShapeUvAngleRangeZeroMid=(je+.5*kt)%1,z<=x)ht.cylinderUvToShapeUvAngle=D.fromElements(0,1,ht.cylinderUvToShapeUvAngle);else{let pe=m/z,Ve=-(R-d)/z;ht.cylinderUvToShapeUvAngle=D.fromElements(pe,Ve,ht.cylinderUvToShapeUvAngle)}}return this.shaderMaximumIntersectionsLength=$e,!0};Qr.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minimumRadius,s=this._maximumRadius,a=this._minimumHeight,c=this._maximumHeight,d=this._minimumAngle,u=this._maximumAngle,m=1/Math.pow(2,e),p=W.lerp(r,s,t*m),g=W.lerp(r,s,(t+1)*m),f=W.lerp(a,c,n*m),x=W.lerp(a,c,(n+1)*m),_=W.lerp(d,u,i*m),C=W.lerp(d,u,(i+1)*m);return M8(p,g,f,x,_,C,this.shapeTransform,o)};var N_e=new h,k_e=new h,B0t=new h;Qr.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,N_e),s=h.multiplyByScalar(r,o,N_e),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,k_e),o,k_e),c=h.add(a,s,B0t),d=this._minimumRadius,u=this._maximumRadius,m=this._minimumHeight,p=this._maximumHeight,g=this._minimumAngle,f=this._maximumAngle,x=W.lerp(d,u,a.x),_=W.lerp(d,u,c.x),C=W.lerp(m,p,a.y),V=W.lerp(m,p,c.y),L=W.lerp(g,f,a.z),Z=W.lerp(g,f,c.z);return M8(x,_,C,V,L,Z,this.shapeTransform,i)};Qr.DefaultMinBounds=Object.freeze(new h(0,-1,-W.PI));Qr.DefaultMaxBounds=Object.freeze(new h(1,1,+W.PI));var Y0t=5,O0t=new Array(Y0t),H0t=new h,z0t=new $,K0t=new M,J0t=new M,Q0t=new M,A8=new M,j0t=new h,q0t=new h,$0t=new h,B_e=new Array(8);for(let e=0;e<8;e++)B_e[e]=new h;function U_e(e,t,n){return Math.abs(se.dot(e,t))<n}function ebt(e){let t=M.getColumn(e,0,j0t),n=M.getColumn(e,1,q0t),i=M.getColumn(e,2,$0t),o=W.EPSILON4;return U_e(t,n,o)&&U_e(n,i,o)}function tbt(e,t){let n=B_e;h.fromElements(-.5,-.5,-.5,n[0]),h.fromElements(-.5,-.5,.5,n[1]),h.fromElements(-.5,.5,-.5,n[2]),h.fromElements(-.5,.5,.5,n[3]),h.fromElements(.5,-.5,-.5,n[4]),h.fromElements(.5,-.5,.5,n[5]),h.fromElements(.5,.5,-.5,n[6]),h.fromElements(.5,.5,.5,n[7]);for(let i=0;i<8;++i)M.multiplyByPoint(e,n[i],n[i]);return Gn.fromPoints(n,t)}function M8(e,t,n,i,o,r,s,a){let c=Qr.DefaultMinBounds,d=Qr.DefaultMaxBounds,u=c.x,m=d.x,p=c.y,g=d.y,f=c.z,x=d.z;if(e===u&&t===m&&n===p&&i===g&&o===f&&r===x)return a.center=M.getTranslation(s,a.center),a.halfAxes=M.getMatrix3(s,a.halfAxes),a;r<o&&(r+=W.TWO_PI);let C=r-o,V=o+C*.5,L=O0t,Z=0;L[Z++]=o,L[Z++]=r,L[Z++]=V,C>W.PI&&(L[Z++]=V-W.PI_OVER_TWO,L[Z++]=V+W.PI_OVER_TWO);let G=1,X=1,v=-1,P=-1;for(let ee=0;ee<Z;++ee){let z=L[ee]-V,j=Math.cos(z),q=Math.sin(z),be=j*e,Te=q*e,ae=j*t,ye=q*t;G=Math.min(G,be),X=Math.min(X,Te),G=Math.min(G,ae),X=Math.min(X,ye),v=Math.max(v,be),P=Math.max(P,Te),v=Math.max(v,ae),P=Math.max(P,ye)}let F=v-G,A=P-X,b=i-n,R=(G+v)*.5,E=(X+P)*.5,I=(n+i)*.5,w=h.fromElements(R,E,I,H0t),N=$.fromRotationZ(V,z0t),B=h.fromElements(F,A,b,D_e),U=M.fromScale(B,Q0t),O=M.fromRotation(N,J0t),k=M.fromTranslation(w,K0t),J=M.multiplyTransformation(O,M.multiplyTransformation(k,U,A8),A8),H=M.multiplyTransformation(s,J,A8);return ebt(H)?Gn.fromTransformation(H,a):tbt(H,a)}var jf=Qr;var N3i=T(S(),1);function lb(){this.orientedBoundingBox=new Gn,this.boundingSphere=new le,this.boundTransform=new M,this.shapeTransform=new M,this._rectangle=new ce,this._minimumHeight=lb.DefaultMinBounds.z,this._maximumHeight=lb.DefaultMaxBounds.z,this._ellipsoid=new ie,this._translation=new h,this._rotation=new $,this.shaderUniforms={ellipsoidRadiiUv:new h,eccentricitySquared:0,evoluteScale:new D,ellipsoidInverseRadiiSquaredUv:new h,ellipsoidRenderLongitudeMinMax:new D,ellipsoidShapeUvLongitudeMinMaxMid:new h,ellipsoidUvToShapeUvLongitude:new D,ellipsoidUvToShapeUvLatitude:new D,ellipsoidRenderLatitudeSinMinMax:new D,ellipsoidInverseHeightDifferenceUv:0,clipMinMaxHeight:new D},this.shaderDefines={ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LONGITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN:void 0},this.shaderMaximumIntersectionsLength=0}var nbt=new h,ibt=new h,obt=new h,rbt=new h,sbt=new h,abt=new h,cbt=new h,lbt=new h,dbt=new $,Y_e=new h,O_e=new h,ubt=new ce;lb.prototype.update=function(e,t,n,i,o){let{DefaultMinBounds:r,DefaultMaxBounds:s}=lb;i=y(i,r),o=y(o,s);let a=W.EPSILON10,c=W.EPSILON3,d=W.EPSILON10,u=W.EPSILON10,m=W.EPSILON3,p=M.getScale(e,lbt),g=h.clone(r,nbt);g.z=-h.minimumComponent(p);let f=h.clamp(t,g,s,ibt),x=h.clamp(n,g,s,obt),_=h.clamp(i,g,s,rbt),C=h.clamp(o,g,s,sbt),V=h.maximumByComponent(f,_,abt),L=h.minimumByComponent(x,C,cbt),Z=h.add(p,h.fromElements(x.z,x.z,x.z,Y_e),Y_e),G=h.maximumComponent(Z),X=h.add(p,h.fromElements(L.z,L.z,L.z,O_e),O_e);if(V.y>L.y||V.y===s.y||L.y===r.y||V.z>L.z||W.equalsEpsilon(X,h.ZERO,void 0,a))return!1;this._rectangle=ce.fromRadians(f.x,f.y,x.x,x.y),this._translation=M.getTranslation(e,this._translation),this._rotation=M.getRotation(e,this._rotation),this._ellipsoid=ie.fromCartesian3(p,this._ellipsoid),this._minimumHeight=f.z,this._maximumHeight=x.z;let v=ce.fromRadians(V.x,V.y,L.x,L.y,ubt);this.orientedBoundingBox=N8(v,V.z,L.z,this._ellipsoid,this._translation,this._rotation,this.orientedBoundingBox),this.shapeTransform=M.fromRotationTranslation($.setScale(this._rotation,Z,dbt),this._translation,this.shapeTransform),this.boundTransform=M.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=le.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let P=s.x-r.x,F=.5*P,A=L.x<V.x,b=L.x-V.x+A*P,R=b<=d,E=b>=F-d&&b<P-d,I=b>d&&b<F-d,w=R||E||I,N=x.x<f.x,B=x.x-f.x+N*P,U=B>F+d&&B<P-d,O=B>=F-d&&B<=F+d,k=B<F-d,J=U||O||k,H=L.y<-m,ee=L.y>=-m&&L.y<=+m,z=L.y>+m&&L.y<s.y-u,j=H||ee||z,q=V.y>r.y+u&&V.y<-m,be=V.y>=-m&&V.y<=+m,Te=V.y>+m,ae=q||be||Te,ye=j||ae,Se=x.y-f.y,Le=x.y<-m,Xe=x.y>=-m&&x.y<=+m,Pe=x.y>+m&&x.y<s.y-u,ke=Le||Xe||Pe,Pt=f.y>r.y+u&&f.y<-m,Ot=f.y>=-m&&f.y<=+m,ht=f.y>+m,$e=ke||(Pt||Ot||ht),{shaderUniforms:Qe,shaderDefines:je}=this;for(let li in je)je.hasOwnProperty(li)&&(je[li]=void 0);Qe.ellipsoidRadiiUv=h.divideByScalar(Z,G,Qe.ellipsoidRadiiUv);let{x:kt,z:pe}=Qe.ellipsoidRadiiUv,Ve=pe/kt;Qe.eccentricitySquared=1-Ve*Ve,Qe.evoluteScale=D.fromElements((kt*kt-pe*pe)/kt,(pe*pe-kt*kt)/pe,Qe.evoluteScale),Qe.ellipsoidInverseRadiiSquaredUv=h.divideComponents(h.ONE,h.multiplyComponents(Qe.ellipsoidRadiiUv,Qe.ellipsoidRadiiUv,Qe.ellipsoidInverseRadiiSquaredUv),Qe.ellipsoidInverseRadiiSquaredUv);let Dt=0;je.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX=Dt,Dt+=1,je.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN=Dt,Dt+=1,Qe.clipMinMaxHeight=D.fromElements((V.z-x.z)/G,(L.z-x.z)/G,Qe.clipMinMaxHeight);let bt=(x.z-f.z)/G;if(Qe.ellipsoidInverseHeightDifferenceUv=1/bt,f.z===x.z&&(Qe.ellipsoidInverseHeightDifferenceUv=0),w&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE=!0,je.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE=Dt,E?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF=!0,Dt+=1):I?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF=!0,Dt+=2):R&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO=!0,Dt+=2),Qe.ellipsoidRenderLongitudeMinMax=D.fromElements(V.x,L.x,Qe.ellipsoidRenderLongitudeMinMax)),J)if(je.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE=!0,x.x<f.x&&(je.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED=!0),B<=d)Qe.ellipsoidUvToShapeUvLongitude=D.fromElements(0,1,Qe.ellipsoidUvToShapeUvLongitude);else{let Vo=P/B,Rs=-(f.x-r.x)/B;Qe.ellipsoidUvToShapeUvLongitude=D.fromElements(Vo,Rs,Qe.ellipsoidUvToShapeUvLongitude)}if(w){let li=W.equalsEpsilon(V.x,r.x,void 0,c),Vo=W.equalsEpsilon(L.x,s.x,void 0,c);li&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY=!0),Vo&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY=!0);let Rs=(f.x-r.x)/P,zs=(x.x-r.x)/P,Nr=(L.x-r.x)/P,$r=1-b/P,Ue=(Nr+.5*$r)%1;Qe.ellipsoidShapeUvLongitudeMinMaxMid=h.fromElements(Rs,zs,Ue,Qe.ellipsoidShapeUvLongitudeMinMaxMid)}if(ye&&(ae&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN=!0,je.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN=Dt,q?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF=!0,Dt+=1):be?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF=!0,Dt+=1):Te&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF=!0,Dt+=2)),j&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX=!0,je.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX=Dt,H?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF=!0,Dt+=2):ee?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF=!0,Dt+=1):z&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF=!0,Dt+=1)),Qe.ellipsoidRenderLatitudeSinMinMax=D.fromElements(Math.sin(V.y),Math.sin(L.y),Qe.ellipsoidRenderLatitudeSinMinMax)),$e)if(je.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE=!0,Se<u)Qe.ellipsoidUvToShapeUvLatitude=D.fromElements(0,1,Qe.ellipsoidUvToShapeUvLatitude);else{let Vo=(s.y-r.y)/Se,Rs=(r.y-f.y)/Se;Qe.ellipsoidUvToShapeUvLatitude=D.fromElements(Vo,Rs,Qe.ellipsoidUvToShapeUvLatitude)}return this.shaderMaximumIntersectionsLength=Dt,!0};var K_e=new ce;lb.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=1/Math.pow(2,e),s=t*r,a=(t+1)*r,c=n*r,d=(n+1)*r,u=i*r,m=(i+1)*r,p=ce.subsection(this._rectangle,s,c,a,d,K_e),g=W.lerp(this._minimumHeight,this._maximumHeight,u),f=W.lerp(this._minimumHeight,this._maximumHeight,m);return N8(p,g,f,this._ellipsoid,this._translation,this._rotation,o)};var H_e=new h,z_e=new h,mbt=new h;lb.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,H_e),s=h.multiplyByScalar(r,o,H_e),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,z_e),o,z_e),c=h.add(a,s,mbt),d=ce.subsection(this._rectangle,a.x,a.y,c.x,c.y,K_e),u=W.lerp(this._minimumHeight,this._maximumHeight,a.z),m=W.lerp(this._minimumHeight,this._maximumHeight,c.z);return N8(d,u,m,this._ellipsoid,this._translation,this._rotation,i)};function N8(e,t,n,i,o,r,s){return s=Gn.fromRectangle(e,t,n,i,s),s.center=h.add(s.center,o,s.center),s.halfAxes=$.multiply(s.halfAxes,r,s.halfAxes),s}lb.DefaultMinBounds=Object.freeze(new h(-W.PI,-W.PI_OVER_TWO,-ie.WGS84.minimumRadius));lb.DefaultMaxBounds=Object.freeze(new h(W.PI,W.PI_OVER_TWO,10*ie.WGS84.maximumRadius));var jT=lb;var jd={BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER"};jd.getMinBounds=function(e){switch(e){case jd.BOX:return Qf.DefaultMinBounds;case jd.ELLIPSOID:return jT.DefaultMinBounds;case jd.CYLINDER:return jf.DefaultMinBounds}};jd.getMaxBounds=function(e){switch(e){case jd.BOX:return Qf.DefaultMaxBounds;case jd.ELLIPSOID:return jT.DefaultMaxBounds;case jd.CYLINDER:return jf.DefaultMaxBounds}};jd.getShapeConstructor=function(e){switch(e){case jd.BOX:return Qf;case jd.ELLIPSOID:return jT;case jd.CYLINDER:return jf}};var Xi=Object.freeze(jd);var UBi=T(S(),1);var H3i=T(S(),1),J_e=Object.freeze({UNLOADED:0,RECEIVING:1,RECEIVED:2,LOADED:3,FAILED:4,UNAVAILABLE:5});function T3(e,t){this.spatialNode=e,this.keyframe=t,this.state=J_e.UNLOADED,this.metadata=[],this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1}T3.priorityComparator=function(e,t){return e.priority-t.priority};T3.searchComparator=function(e,t){return e.keyframe-t.keyframe};T3.LoadState=J_e;var Ki=T3;var mBi=T(S(),1);function Xy(e,t,n,i,o){i===an.UNSIGNED_SHORT&&(i=an.FLOAT32);let r=e.floatingPointTexture;if(i===an.FLOAT32&&!r)throw new ue("Floating point texture not supported");let s;i===an.FLOAT32||i===an.FLOAT64?s=ze.FLOAT:i===an.UINT8&&(s=ze.UNSIGNED_BYTE);let a;n===1?a=e.webgl2?at.RED:at.LUMINANCE:n===2?a=e.webgl2?at.RG:at.LUMINANCE_ALPHA:n===3?a=at.RGB:n===4&&(a=at.RGBA);let c=512*1024*1024,d=128*1024*1024;o=Math.min(y(o,d),c);let u=Mt.maximumTextureSize,m=an.getSizeInBytes(i),p=Math.floor(o/(n*m)),g=Math.min(u,W.previousPowerOfTwo(Math.floor(Math.sqrt(p)))),f=Math.ceil(Math.sqrt(t.x)),x=Math.ceil(t.z/f),_=f*t.x,C=x*t.y,V=Math.floor(g/_),L=Math.floor(g/C);if(V===0||L===0)throw new ue("Tileset is too large to fit into megatexture");this.channelCount=n,this.componentType=i,this.voxelCountPerTile=h.clone(t,new h),this.maximumTileCount=V*L,this.regionCountPerMegatexture=new D(V,L),this.voxelCountPerRegion=new D(_,C),this.sliceCountPerRegion=new D(f,x),this.voxelSizeUv=new D(1/g,1/g),this.sliceSizeUv=new D(t.x/g,t.y/g),this.regionSizeUv=new D(_/g,C/g),this.texture=new Et({context:e,pixelFormat:a,pixelDatatype:s,flipY:!1,width:g,height:g,sampler:new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.LINEAR,magnificationFilter:di.LINEAR})});let Z=an.toComponentDatatype(i);this.tileVoxelDataTemp=Q.createTypedArray(Z,_*C*n),this.nodes=new Array(this.maximumTileCount);for(let G=0;G<this.maximumTileCount;G++)this.nodes[G]=new hbt(G);for(let G=0;G<this.maximumTileCount;G++){let X=this.nodes[G];X.previousNode=G>0?this.nodes[G-1]:void 0,X.nextNode=G<this.maximumTileCount-1?this.nodes[G+1]:void 0}this.occupiedList=void 0,this.emptyList=this.nodes[0],this.occupiedCount=0}function hbt(e){this.index=e,this.nextNode=void 0,this.previousNode=void 0}Xy.prototype.add=function(e){if(this.isFull())throw new fe("Trying to add when there are no empty spots");let t=this.emptyList;this.emptyList=this.emptyList.nextNode,l(this.emptyList)&&(this.emptyList.previousNode=void 0),t.nextNode=this.occupiedList,l(t.nextNode)&&(t.nextNode.previousNode=t),this.occupiedList=t;let n=t.index;return this.writeDataToTexture(n,e),this.occupiedCount++,n};Xy.prototype.remove=function(e){if(e<0||e>=this.maximumTileCount)throw new fe("Megatexture index out of bounds");let t=this.nodes[e];l(t.previousNode)&&(t.previousNode.nextNode=t.nextNode),l(t.nextNode)&&(t.nextNode.previousNode=t.previousNode),t.nextNode=this.emptyList,l(t.nextNode)&&(t.nextNode.previousNode=t),t.previousNode=void 0,this.emptyList=t,this.occupiedCount--};Xy.prototype.isFull=function(){return this.emptyList===void 0};Xy.getApproximateTextureMemoryByteLength=function(e,t,n,i){i===an.UNSIGNED_SHORT&&(i=an.FLOAT32);let o=an.getSizeInBytes(i),r=e*t.x*t.y*t.z,s=Math.ceil(Math.sqrt(t.x)),a=Math.ceil(t.z/s),c=s*t.x,d=a*t.y,u=W.previousPowerOfTwo(Math.floor(Math.sqrt(r)));for(;;){let p=Math.floor(u/c),g=Math.floor(u/d);if(p*g>=e)break;u*=2}return u*u*n*o};Xy.prototype.writeDataToTexture=function(e,t){let n=t.constructor===Uint16Array?new Float32Array(t):t,i=this.voxelCountPerTile,o=this.sliceCountPerRegion,r=this.voxelCountPerRegion,s=this.channelCount,a=this.tileVoxelDataTemp;for(let x=0;x<i.z;x++){let _=x%o.x*i.x,C=Math.floor(x/o.x)*i.y;for(let V=0;V<i.y;V++)for(let L=0;L<i.x;L++){let Z=x*i.y*i.x+V*i.x+L,G=(C+V)*r.x+(_+L);for(let X=0;X<s;X++)a[G*s+X]=n[Z*s+X]}}let c=this.regionCountPerMegatexture,d=r.x,u=r.y,m=e%c.x*r.x,p=Math.floor(e/c.x)*r.y,f={source:{arrayBufferView:a,width:d,height:u},xOffset:m,yOffset:p};this.texture.copyFrom(f)};Xy.prototype.isDestroyed=function(){return!1};Xy.prototype.destroy=function(){return this.texture=this.texture&&this.texture.destroy(),me(this)};var sL=Xy;var SBi=T(S(),1);function sm(e,t,n,i,o,r,s){this.children=void 0,this.parent=o,this.level=e,this.x=t,this.y=n,this.z=i,this.dimensions=h.clone(s),this.keyframeNodes=[],this.renderableKeyframeNodes=[],this.renderableKeyframeNodeLerp=0,this.renderableKeyframeNodePrevious=void 0,this.renderableKeyframeNodeNext=void 0,this.orientedBoundingBox=new Gn,this.approximateVoxelSize=0,this.screenSpaceError=0,this.visitedFrameNumber=-1,this.computeBoundingVolumes(r)}var fbt=new h;sm.prototype.computeBoundingVolumes=function(e){this.orientedBoundingBox=e.computeOrientedBoundingBoxForTile(this.level,this.x,this.y,this.z,this.orientedBoundingBox);let t=$.getScale(this.orientedBoundingBox.halfAxes,fbt),n=2*h.maximumComponent(t);this.approximateVoxelSize=n/h.minimumComponent(this.dimensions)};sm.prototype.constructChildNodes=function(e){let{level:t,x:n,y:i,z:o}=this,r=n*2,s=i*2,a=o*2,c=s+1,d=r+1,u=a+1,m=t+1,p=[[m,r,s,a],[m,d,s,a],[m,r,c,a],[m,d,c,a],[m,r,s,u],[m,d,s,u],[m,r,c,u],[m,d,c,u]];this.children=p.map(([g,f,x,_])=>new sm(g,f,x,_,this,e,this.dimensions))};sm.prototype.visibility=function(e,t){let n=this.orientedBoundingBox;return e.cullingVolume.computeVisibilityWithPlaneMask(n,t)};sm.prototype.computeScreenSpaceError=function(e,t){let n=this.orientedBoundingBox,i=Math.sqrt(n.distanceSquaredTo(e));i=Math.max(i,W.EPSILON7);let o=this.approximateVoxelSize,r=t*(o/i);this.screenSpaceError=r};var Q_e={keyframe:0};function W9(e,t){return Q_e.keyframe=e,Ro(t,Q_e,Ki.searchComparator)}sm.prototype.computeSurroundingRenderableKeyframeNodes=function(e){let t=this,n=t.level,i=Math.floor(e),o=Math.ceil(e),r,s,a=+Number.MAX_VALUE,c=+Number.MAX_VALUE;for(;l(t);){let{renderableKeyframeNodes:m}=t;if(m.length>=1){let p=pbt(i,m),g=m[p],f=o===i||i<g.keyframe?p:Math.min(p+1,m.length-1),x=m[f],_=i-g.keyframe,C=j_e(n-t.level,_);C<a&&(a=C,r=g);let V=x.keyframe-o,L=j_e(n-t.level,V);if(L<c&&(c=L,s=x),_===0&&V===0)break}t=t.parent}if(this.renderableKeyframeNodePrevious=r,this.renderableKeyframeNodeNext=s,!l(r)||!l(s))return;let d=r.keyframe,u=s.keyframe;this.renderableKeyframeNodeLerp=d===u?0:W.clamp((e-d)/(u-d),0,1)};function pbt(e,t){let n=W9(e,t);return n<0?W.clamp(~n-1,0,t.length-1):n}function j_e(e,t){let n=Math.exp(e*4),i=t>=0?1:-200;return e*n+t*i}sm.prototype.isVisited=function(e){return this.visitedFrameNumber===e};sm.prototype.createKeyframeNode=function(e){let t=W9(e,this.keyframeNodes);if(t<0){t=~t;let n=new Ki(this,e);this.keyframeNodes.splice(t,0,n)}};sm.prototype.destroyKeyframeNode=function(e,t){let n=e.keyframe,i=W9(n,this.keyframeNodes);if(i<0)throw new fe("Keyframe node does not exist.");if(this.keyframeNodes.splice(i,1),e.megatextureIndex!==-1){for(let r=0;r<t.length;r++)t[r].remove(e.megatextureIndex);let o=W9(n,this.renderableKeyframeNodes);if(o<0)throw new fe("Renderable keyframe node does not exist.");this.renderableKeyframeNodes.splice(o,1)}e.spatialNode=void 0,e.state=Ki.LoadState.UNLOADED,e.metadata={},e.megatextureIndex=-1,e.priority=-Number.MAX_VALUE,e.highPriorityFrameNumber=-1};sm.prototype.addKeyframeNodeToMegatextures=function(e,t){if(e.state!==Ki.LoadState.RECEIVED||e.megatextureIndex!==-1||e.metadata.length!==t.length)throw new fe("Keyframe node cannot be added to megatexture");for(let o=0;o<t.length;o++){let r=t[o];e.megatextureIndex=r.add(e.metadata[o])}e.state=Ki.LoadState.LOADED;let n=this.renderableKeyframeNodes,i=W9(e.keyframe,n);if(i>=0)throw new fe("Keyframe already renderable");i=~i,n.splice(i,0,e)};sm.prototype.isRenderable=function(e){let t=this.renderableKeyframeNodePrevious,n=this.renderableKeyframeNodeNext,i=this.level;return l(t)&&l(n)&&(t.spatialNode.level===i||n.spatialNode.level===i)&&this.visitedFrameNumber===e};var P9=sm;function db(e,t,n,i,o,r,s){this._primitive=e,this.megatextures=new Array(i.length);for(let f=0;f<i.length;f++){let x=i[f],_=zt.getComponentCount(x),C=o[f];this.megatextures[f]=new sL(t,n,_,C,s)}let a=this.megatextures[0].maximumTileCount;this._simultaneousRequestCount=0,this._debugPrint=!1,this._frameNumber=0;let c=e._shape;this.rootNode=new P9(0,0,0,0,void 0,c,n),this._priorityQueue=new yT({maximumLength:a,comparator:Ki.priorityComparator}),this._highPriorityKeyframeNodes=new Array(a),this._keyframeNodesInMegatexture=new Array(a),this._keyframeCount=r,this._sampleCount=void 0,this._keyframeLocation=0,this._binaryTreeKeyframeWeighting=new Array(r);let d=this._binaryTreeKeyframeWeighting;d[0]=0,d[r-1]=0,k8(d,1,r-2,0);let u=9,m=2048,p=Math.floor(m/u),g=Math.ceil(a/p);this.internalNodeTexture=new Et({context:t,pixelFormat:at.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,flipY:!1,width:m,height:g,sampler:new rn({minificationFilter:on.NEAREST,magnificationFilter:di.NEAREST})}),this.internalNodeTilesPerRow=p,this.internalNodeTexelSizeUv=new D(1/m,1/g),this.leafNodeTexture=void 0,this.leafNodeTilesPerRow=void 0,this.leafNodeTexelSizeUv=new D}db.prototype.findKeyframeNode=function(e){return this._keyframeNodesInMegatexture.find(function(t){return t.megatextureIndex===e})};function k8(e,t,n,i){if(t>n)return;let o=Math.floor((t+n)/2);e[o]=i,k8(e,t,o-1,i+1),k8(e,o+1,n,i+1)}db.simultaneousRequestCountMaximum=50;db.prototype.update=function(e,t,n,i){let o=this._primitive,r=e.context,s=this.megatextures[0].maximumTileCount,a=this._keyframeCount,c=o._levelBlendFactor,d=c>0,u=a>1,m=(d?2:1)*(u?2:1);this._sampleCount=m;let p=m>=2;if(p&&!l(this.leafNodeTexture)){let V=Math.floor(512),L=Math.ceil(s/V);this.leafNodeTexture=new Et({context:r,pixelFormat:at.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,flipY:!1,width:1024,height:L,sampler:new rn({minificationFilter:on.NEAREST,magnificationFilter:di.NEAREST})}),this.leafNodeTexelSizeUv=D.fromElements(1/1024,1/L,this.leafNodeTexelSizeUv),this.leafNodeTilesPerRow=V}else!p&&l(this.leafNodeTexture)&&(this.leafNodeTexture=this.leafNodeTexture.destroy());if(this._keyframeLocation=W.clamp(t,0,a-1),n&&q_e(this,this.rootNode),i)return;this._frameNumber=e.frameNumber;let g=bi();ybt(this,e);let f=bi();Tbt(this,m,c);let x=bi();if(this._debugPrint){let _=f-g,C=x-f,V=x-g;_bt(this,_,C,V)}};db.prototype.isRenderable=function(e){return e.isRenderable(this._frameNumber)};db.prototype.isDestroyed=function(){return!1};db.prototype.destroy=function(){let e=this.megatextures,t=e.length;for(let n=0;n<t;n++)e[n]=e[n]&&e[n].destroy();return this.internalNodeTexture=this.internalNodeTexture&&this.internalNodeTexture.destroy(),this.leafNodeTexture=this.leafNodeTexture&&this.leafNodeTexture.destroy(),me(this)};function q_e(e,t){if(t.computeBoundingVolumes(e._primitive._shape),l(t.children))for(let n=0;n<8;n++){let i=t.children[n];q_e(e,i)}}function bbt(e,t){if(e._simultaneousRequestCount>=db.simultaneousRequestCountMaximum)return;let n=e._primitive._provider;function i(c){e._simultaneousRequestCount--;let d=n.types.length;if(!l(c))t.state=Ki.LoadState.UNAVAILABLE;else if(c===Ki.LoadState.FAILED)t.state=Ki.LoadState.FAILED;else if(!Array.isArray(c)||c.length!==d)t.state=Ki.LoadState.FAILED;else{let u=e.megatextures;for(let m=0;m<d;m++){let{voxelCountPerTile:p,channelCount:g}=u[m],{x:f,y:x,z:_}=p,C=f*x*_,V=c[m],L=C*g;if(V.length===L)t.metadata[m]=V,t.state=Ki.LoadState.RECEIVED;else{t.state=Ki.LoadState.FAILED;break}}}}function o(){e._simultaneousRequestCount--,t.state=Ki.LoadState.FAILED}let{keyframe:r,spatialNode:s}=t,a=n.requestData({tileLevel:s.level,tileX:s.x,tileY:s.y,tileZ:s.z,keyframe:r});l(a)?(e._simultaneousRequestCount++,t.state=Ki.LoadState.RECEIVING,a.then(i).catch(o)):t.state=Ki.LoadState.FAILED}function gbt(e){return e/(1+e)}function ybt(e,t){let n=e._frameNumber,i=e._primitive,o=i._shape,r=i.screenSpaceError,s=e._priorityQueue,a=e._keyframeCount,c=W.clamp(Math.floor(e._keyframeLocation),0,a-2),d=c+1,{camera:u,context:m,pixelRatio:p}=t,{positionWC:g,frustum:f}=u,_=m.drawingBufferHeight/p/f.sseDenominator;function C(A,b){if(A.computeScreenSpaceError(g,_),b=A.visibility(t,b),b===rs.MASK_OUTSIDE)return;if(A.visitedFrameNumber=n,a===1)A.createKeyframeNode(0);else if(A.keyframeNodes.length!==a)for(let N=0;N<a;N++)A.createKeyframeNode(N);let{screenSpaceError:R,keyframeNodes:E}=A,I=gbt(R),w=!1;for(let N=0;N<E.length;N++){let B=E[N];B.priority=10*I+xbt(c,B.keyframe,d,e),B.state!==Ki.LoadState.UNAVAILABLE&&B.state!==Ki.LoadState.FAILED&&B.priority!==-Number.MAX_VALUE&&s.insert(B),B.state===Ki.LoadState.LOADED&&(w=!0)}if(R<r||!w){A.children=void 0;return}l(A.children)||A.constructChildNodes(o);for(let N=0;N<8;N++){let B=A.children[N];C(B,b)}}s.reset(),C(e.rootNode,rs.MASK_INDETERMINATE);let V=e._highPriorityKeyframeNodes,L=0,Z;for(;s.length>0;)Z=s.removeMaximum(),Z.highPriorityFrameNumber=n,V[L]=Z,L++;let G=e._keyframeNodesInMegatexture,X=e.megatextures[0],v=X.occupiedCount;G.length=v,G.sort(function(A,b){return A.highPriorityFrameNumber===b.highPriorityFrameNumber?b.priority-A.priority:b.highPriorityFrameNumber-A.highPriorityFrameNumber});let P=0,F=0;for(let A=0;A<L;A++)if(Z=V[A],!(Z.state===Ki.LoadState.LOADED||Z.spatialNode===void 0)&&(Z.state===Ki.LoadState.UNLOADED&&bbt(e,Z),Z.state===Ki.LoadState.RECEIVED)){let b=0;if(X.isFull()){b=v-1-P,P++;let R=G[b];R.spatialNode.destroyKeyframeNode(R,e.megatextures)}else b=v+F,F++;Z.spatialNode.addKeyframeNodeToMegatextures(Z,e.megatextures),G[b]=Z}}function xbt(e,t,n,i){let o=Math.min(Math.abs(t-e),Math.abs(t-n)),r=Math.max(e,i._keyframeCount-n-1,1),s=Math.pow(1-o/r,4),a=Math.exp(-i._binaryTreeKeyframeWeighting[t]);return W.lerp(a,s,.15+.85*s)}function _bt(e,t,n,i){let o=e._keyframeCount,r=e.rootNode,s=Object.keys(Ki.LoadState).length,a=new Array(s),c=new Array(s),d=0;for(let C=0;C<s;C++){let V=new Array(o);a[C]=V;for(let L=0;L<o;L++)V[L]=0;c[C]=0}function u(C){let V=C.keyframeNodes;for(let L=0;L<V.length;L++){let Z=V[L],G=Z.keyframe,X=Z.state;a[X][G]+=1,c[X]+=1,d++}if(l(C.children))for(let L=0;L<8;L++){let Z=C.children[L];u(Z)}}u(r);let m=`KEYFRAMES: ${a[Ki.LoadState.LOADED]}`,p=`UNLOADED: ${c[Ki.LoadState.UNLOADED]} | RECEIVING: ${c[Ki.LoadState.RECEIVING]} | RECEIVED: ${c[Ki.LoadState.RECEIVED]} | LOADED: ${c[Ki.LoadState.LOADED]} | FAILED: ${c[Ki.LoadState.FAILED]} | UNAVAILABLE: ${c[Ki.LoadState.UNAVAILABLE]} | TOTAL: ${d}`,g=Math.round(t*100)/100,f=Math.round(n*100)/100,x=Math.round(i*100)/100,_=`LOAD: ${g} | OCT: ${f} | ALL: ${x}`;console.log(`${m} || ${p} || ${_}`)}var S3={INTERNAL:0,LEAF:1,PACKED_LEAF_FROM_PARENT:2};function Tbt(e,t,n){let i=e._primitive._screenSpaceError,o=e._keyframeLocation,r=e._frameNumber,s=t>=2,a=0,c=0,d=[],u=[];function m(g,f,x,_,C){let V=!1;if(l(g.children))for(let L=0;L<8;L++){let Z=g.children[L];Z.computeSurroundingRenderableKeyframeNodes(o),Z.isRenderable(r)&&(V=!0)}if(V){d[C]=S3.INTERNAL<<16|f,d[x]=_,a++,_=f,C=_*9+1;for(let L=0;L<8;L++){let Z=g.children[L];f=a,x=f*9+0,m(Z,f,x,_,C+L)}}else{if(s){let L=c*5,Z=g.renderableKeyframeNodePrevious,G=g.level-Z.spatialNode.level,X=Z.spatialNode.parent,v=l(X)?X.renderableKeyframeNodePrevious:Z,P=Sbt(g,i,n),F=G,A=1,b=Z.megatextureIndex,R=v.megatextureIndex;u[L+0]=P,u[L+1]=F,u[L+2]=A,u[L+3]=b,u[L+4]=R,d[C]=S3.LEAF<<16|c}else{let L=g.renderableKeyframeNodePrevious,G=g.level-L.spatialNode.level===0?S3.LEAF:S3.PACKED_LEAF_FROM_PARENT;d[C]=G<<16|L.megatextureIndex}c++}}let p=e.rootNode;p.computeSurroundingRenderableKeyframeNodes(o),p.isRenderable(r)&&m(p,0,0,0,0),Cbt(d,9,e.internalNodeTilesPerRow,e.internalNodeTexture),s&&Vbt(u,2,e.leafNodeTilesPerRow,e.leafNodeTexture)}function Sbt(e,t,n){if(e.parent===void 0)return 0;let i=e.screenSpaceError,o=e.parent.screenSpaceError,s=((t-i)/(o-i)+n-1)/n;return W.clamp(s,0,1)}function Cbt(e,t,n,i){let o=at.componentsLength(i.pixelFormat),r=Math.ceil(e.length/t),s=Math.max(1,t*Math.min(r,n)),a=Math.max(1,Math.ceil(r/n)),c=new Uint8Array(s*a*o);for(let m=0;m<e.length;m++){let p=e[m],g=m*o;for(let f=0;f<o;f++)c[g+f]=p>>>f*8&255}let u={source:{arrayBufferView:c,width:s,height:a},xOffset:0,yOffset:0};i.copyFrom(u)}function Vbt(e,t,n,i){let o=at.componentsLength(i.pixelFormat),r=5,s=Math.ceil(e.length/r),a=Math.max(1,t*Math.min(s,n)),c=Math.max(1,Math.ceil(s/n)),d=new Uint8Array(a*c*o);for(let p=0;p<s;p++){let g=e[p*r+0],f=e[p*r+1],x=e[p*r+2],_=e[p*r+3],C=e[p*r+4],V=W.clamp(Math.floor(65536*g),0,65535);d[p*8+0]=V>>>0&255,d[p*8+1]=V>>>8&255,d[p*8+2]=f&255,d[p*8+3]=x&255,d[p*8+4]=_>>>0&255,d[p*8+5]=_>>>8&255,d[p*8+6]=C>>>0&255,d[p*8+7]=C>>>8&255}let m={source:{arrayBufferView:d,width:a,height:c},xOffset:0,yOffset:0};i.copyFrom(m)}db.getApproximateTextureMemoryByteLength=function(e,t,n,i){let o=0,r=n.length;for(let s=0;s<r;s++){let a=n[s],c=i[s],d=zt.getComponentCount(a);o+=sL.getApproximateTextureMemoryByteLength(e,t,d,c)}return o};var aL=db;var dYi=T(S(),1);var BBi=T(S(),1),Lbt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},cL=Object.freeze(Lbt);var eYi=T(S(),1);function lL(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}lL.prototype.getTexture=function(e){return this._textures[e]};function Rbt(e,t,n){n.resource.fetchImage().then(function(i){e._loadedImages.push({id:t,image:i,textureUniform:n})}).catch(function(){let i=e._textures[t];l(i)&&i!==e._defaultTexture&&i.destroy(),e._textures[t]=e._defaultTexture})}lL.prototype.loadTexture2D=function(e,t){l(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):Rbt(this,e,t)};function Zbt(e,t,n){let{id:i,textureUniform:o,image:r}=t,s=n.webgl2?C3(o,r,n):Gbt(o,r,n),a=e._textures[i];l(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function C3(e,t,n){let{typedArray:i,sampler:o}=e,r=l(i)?eTe(e,n):new Et({context:n,source:t,sampler:o});return $_e(o)&&r.generateMipmap(),r}function Gbt(e,t,n){let{typedArray:i,sampler:o}=e,r=$_e(o),s=o.wrapS===Cn.REPEAT||o.wrapS===Cn.MIRRORED_REPEAT||o.wrapT===Cn.REPEAT||o.wrapT===Cn.MIRRORED_REPEAT,{width:a,height:c}=l(i)?e:t,d=[a,c].every(W.isPowerOfTwo);if((r||s)&&!d)if(l(i)){if(e.pixelDatatype===ze.UNSIGNED_BYTE){let m=sw(i,a,c),p=qb(m);return C3({sampler:o},p,n)}}else{let m=qb(t);return C3(e,m,n)}else return C3(e,t,n);return r?console.warn("Texture requires resizing for mipmaps but pixelDataType cannot be resized. The texture may be rendered incorrectly."):s&&console.warn("Texture requires resizing for wrapping but pixelDataType cannot be resized. The texture may be rendered incorrectly."),eTe(e,n)}function $_e(e){return[on.NEAREST_MIPMAP_NEAREST,on.NEAREST_MIPMAP_LINEAR,on.LINEAR_MIPMAP_NEAREST,on.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function eTe(e,t){let{pixelFormat:n,pixelDatatype:i,width:o,height:r,typedArray:s,sampler:a}=e;return new Et({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:s,width:o,height:r},sampler:a,flipY:!1})}lL.prototype.update=function(e){if(e.frameNumber===this._lastUpdatedFrame)return;this._lastUpdatedFrame=e.frameNumber;let t=e.context;this._defaultTexture=t.defaultTexture;let n=this._loadedImages;for(let i=0;i<n.length;i++){let o=n[i];Zbt(this,o,t)}n.length=0};lL.prototype.isDestroyed=function(){return!1};lL.prototype.destroy=function(){let e=this._textures;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];n!==this._defaultTexture&&n.destroy()}return me(this)};var v9=lL;function w9(e){e=y(e,y.EMPTY_OBJECT),this.mode=y(e.mode,qp.MODIFY_MATERIAL),this.lightingModel=e.lightingModel,this.uniforms=y(e.uniforms,y.EMPTY_OBJECT),this.varyings=y(e.varyings,y.EMPTY_OBJECT),this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.translucencyMode=y(e.translucencyMode,fg.INHERIT),this._textureManager=new v9,this._defaultTexture=void 0,this.uniformMap=Ebt(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},Wbt(this),Pbt(this)}function Ebt(e){let t=e.uniforms,n={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i];o.type===cL.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=Xbt(e,i)):n[i]=Ibt(e,i)}return n}function Xbt(e,t){return function(){return y(e._textureManager.getTexture(t),e._defaultTexture)}}function Ibt(e,t){return function(){return e.uniforms[t].value}}function qT(e,t,n){let i;for(;(i=t.exec(e))!==null;){let o=i[1];n[o]=!0}}function Wbt(e){let t=/[vf]sInput\.attributes\.(\w+)/g,n=/[vf]sInput\.featureIds\.(\w+)/g,i=/[vf]sInput\.metadata.(\w+)/g,o,r=e.vertexShaderText;l(r)&&(o=e.usedVariablesVertex.attributeSet,qT(r,t,o),o=e.usedVariablesVertex.featureIdSet,qT(r,n,o),o=e.usedVariablesVertex.metadataSet,qT(r,i,o));let s=e.fragmentShaderText;if(l(s)){o=e.usedVariablesFragment.attributeSet,qT(s,t,o),o=e.usedVariablesFragment.featureIdSet,qT(s,n,o),o=e.usedVariablesFragment.metadataSet,qT(s,i,o);let a=/material\.(\w+)/g,c=e.usedVariablesFragment.materialSet;qT(s,a,c)}}function tTe(e){let t=/^.*MC$/,n=/^.*WC$/,i=/^.*EC$/;return t.test(e)?`${e} (model coordinates)`:n.test(e)?`${e} (Cartesian world coordinates)`:i.test(e)?`${e} (eye coordinates)`:e}function Rc(e,t,n,i){if(e.hasOwnProperty(t)){let o=`${tTe(t)} is not available in the ${i} shader. Did you mean ${tTe(n)} instead?`;throw new fe(o)}}function Pbt(e){let t=e.usedVariablesVertex.attributeSet;Rc(t,"position","positionMC","vertex"),Rc(t,"normal","normalMC","vertex"),Rc(t,"tangent","tangentMC","vertex"),Rc(t,"bitangent","bitangentMC","vertex"),Rc(t,"positionWC","positionMC","vertex"),Rc(t,"positionEC","positionMC","vertex"),Rc(t,"normalEC","normalMC","vertex"),Rc(t,"tangentEC","tangentMC","vertex"),Rc(t,"bitangentEC","bitangentMC","vertex");let n=e.usedVariablesFragment.attributeSet;Rc(n,"position","positionEC","fragment"),Rc(n,"normal","normalEC","fragment"),Rc(n,"tangent","tangentEC","fragment"),Rc(n,"bitangent","bitangentEC","fragment"),Rc(n,"normalMC","normalEC","fragment"),Rc(n,"tangentMC","tangentEC","fragment"),Rc(n,"bitangentMC","bitangentEC","fragment")}w9.prototype.setUniform=function(e,t){let n=this.uniforms[e];n.type===cL.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):l(t.clone)?n.value=t.clone(n.value):n.value=t};w9.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)};w9.prototype.isDestroyed=function(){return!1};w9.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),me(this)};var $T=w9;function qf(e){e=y(e,y.EMPTY_OBJECT),this._ready=!1,this._provider=y(e.provider,qf.DefaultProvider),this._traversal=void 0,this._shape=void 0,this._shapeVisible=!1,this._paddingBefore=new h,this._paddingAfter=new h,this._minBounds=new h,this._minBoundsOld=new h,this._maxBounds=new h,this._maxBoundsOld=new h,this._exaggeratedMinBounds=new h,this._exaggeratedMinBoundsOld=new h,this._exaggeratedMaxBounds=new h,this._exaggeratedMaxBoundsOld=new h,this._minClippingBounds=new h,this._minClippingBoundsOld=new h,this._maxClippingBounds=new h,this._maxClippingBoundsOld=new h,this._clippingPlanes=void 0,this._clippingPlanesState=0,this._clippingPlanesEnabled=!1,this._modelMatrix=M.clone(y(e.modelMatrix,M.IDENTITY)),this._exaggeratedModelMatrix=M.clone(this._modelMatrix),this._compoundModelMatrix=new M,this._compoundModelMatrixOld=new M,this._customShader=y(e.customShader,qf.DefaultCustomShader),this._customShaderCompilationEvent=new ge,this._shaderDirty=!0,this._drawCommand=void 0,this._drawCommandPick=void 0,this._pickId=void 0,this._clock=e.clock,this._transformPositionWorldToUv=new M,this._transformPositionUvToWorld=new M,this._transformDirectionWorldToLocal=new $,this._transformNormalLocalToWorld=new $,this._jitter=!1,this._nearestSampling=!1,this._levelBlendFactor=0,this._stepSizeMultiplier=1,this._depthTest=!0,this._useLogDepth=void 0,this._screenSpaceError=4,this._debugPolylines=new Bm,this._debugDraw=!1,this._disableRender=!1,this._disableUpdate=!1,this._uniforms={octreeInternalNodeTexture:void 0,octreeInternalNodeTilesPerRow:0,octreeInternalNodeTexelSizeUv:new D,octreeLeafNodeTexture:void 0,octreeLeafNodeTilesPerRow:0,octreeLeafNodeTexelSizeUv:new D,megatextureTextures:[],megatextureSliceDimensions:new D,megatextureTileDimensions:new D,megatextureVoxelSizeUv:new D,megatextureSliceSizeUv:new D,megatextureTileSizeUv:new D,dimensions:new h,paddingBefore:new h,paddingAfter:new h,transformPositionViewToUv:new M,transformPositionUvToView:new M,transformDirectionViewToLocal:new $,transformNormalLocalToWorld:new $,cameraPositionUv:new h,ndcSpaceAxisAlignedBoundingBox:new se,clippingPlanesTexture:void 0,clippingPlanesMatrix:new M,stepSize:0,pickColor:new Y},this._shapeDefinesOld={},this._uniformMap={};let t=this._uniforms,n=this._uniformMap;for(let o in t)if(t.hasOwnProperty(o)){let r=`u_${o}`;n[r]=function(){return t[o]}}let i=this._provider;vbt(this,i)}function vbt(e,t){let{shape:n,minBounds:i=Xi.getMinBounds(n),maxBounds:o=Xi.getMaxBounds(n)}=t;e.minBounds=i,e.maxBounds=o,e.minClippingBounds=Xi.getMinBounds(n),e.maxClippingBounds=Xi.getMaxBounds(n),e._exaggeratedMinBounds=h.clone(e._minBounds,e._exaggeratedMinBounds),e._exaggeratedMaxBounds=h.clone(e._maxBounds,e._exaggeratedMaxBounds),e._exaggeratedModelMatrix=M.clone(e._modelMatrix,e._exaggeratedModelMatrix),iTe(e,t);let r=Xi.getShapeConstructor(n);e._shape=new r,e._shapeVisible=oTe(e,e._shape,t)}Object.defineProperties(qf.prototype,{ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}},boundingSphere:{get:function(){return this._shape.boundingSphere}},orientedBoundingBox:{get:function(){return this._shape.orientedBoundingBox}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=M.clone(e,this._modelMatrix)}},shape:{get:function(){return this._provider.shape}},dimensions:{get:function(){return this._provider.dimensions}},minimumValues:{get:function(){return this._provider.minimumValues}},maximumValues:{get:function(){return this._provider.maximumValues}},show:{get:function(){return!this._disableRender},set:function(e){this._disableRender=!e}},disableUpdate:{get:function(){return this._disableUpdate},set:function(e){this._disableUpdate=e}},debugDraw:{get:function(){return this._debugDraw},set:function(e){this._debugDraw=e}},depthTest:{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._shaderDirty=!0)}},jitter:{get:function(){return this._jitter},set:function(e){this._jitter!==e&&(this._jitter=e,this._shaderDirty=!0)}},nearestSampling:{get:function(){return this._nearestSampling},set:function(e){this._nearestSampling!==e&&(this._nearestSampling=e,this._shaderDirty=!0)}},levelBlendFactor:{get:function(){return this._levelBlendFactor},set:function(e){this._levelBlendFactor=W.clamp(e,0,1)}},screenSpaceError:{get:function(){return this._screenSpaceError},set:function(e){this._screenSpaceError=e}},stepSize:{get:function(){return this._stepSizeMultiplier},set:function(e){this._stepSizeMultiplier=e}},minBounds:{get:function(){return this._minBounds},set:function(e){this._minBounds=h.clone(e,this._minBounds)}},maxBounds:{get:function(){return this._maxBounds},set:function(e){this._maxBounds=h.clone(e,this._maxBounds)}},minClippingBounds:{get:function(){return this._minClippingBounds},set:function(e){this._minClippingBounds=h.clone(e,this._minClippingBounds)}},maxClippingBounds:{get:function(){return this._maxClippingBounds},set:function(e){this._maxClippingBounds=h.clone(e,this._maxClippingBounds)}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ss.setOwner(e,this,"_clippingPlanes")}},customShader:{get:function(){return this._customShader},set:function(e){if(this._customShader!==e){let t=this._uniformMap,i=this._customShader.uniformMap;for(let o in i)i.hasOwnProperty(o)&&delete t[o];l(e)?this._customShader=e:this._customShader=qf.DefaultCustomShader,this._shaderDirty=!0}}},customShaderCompilationEvent:{get:function(){return this._customShaderCompilationEvent}}});var wbt=new h,Fbt=new se,Abt=new se,Mbt=new h,Nbt=new h,kbt=new $,Ubt=new $,Dbt=new M,Bbt=new M,Ybt=new M,Obt=M.fromRotationTranslation($.fromUniformScale(.5,new $),new h(.5,.5,.5),new M),Hbt=M.fromRotationTranslation($.fromUniformScale(2,new $),new h(-1,-1,-1),new M);qf.prototype.update=function(e){let t=this._provider;this._customShader.update(e);let n=e.context;if(!this._ready){qbt(this,t,n),e.afterRender.push(()=>(this._ready=!0,!0));return}Qbt(this,e);let i=iTe(this,t),o=this._shape;if(i&&(this._shapeVisible=oTe(this,o,t),tgt(this,o)&&(this._shaderDirty=!0)),!this._shapeVisible)return;let r=ngt(t.timeIntervalCollection,this._clock),s=this._traversal,a=s._sampleCount;if(s.update(e,r,i,this._disableUpdate),a!==s._sampleCount&&(this._shaderDirty=!0),!s.isRenderable(s.rootNode)||(this._debugDraw&&dgt(this,e),this._disableRender))return;this._useLogDepth!==e.useLogDepth&&(this._useLogDepth=e.useLogDepth,this._shaderDirty=!0),igt(this,e)&&(this._shaderDirty=!0);let d=s.leafNodeTexture,u=this._uniforms;l(d)&&(u.octreeLeafNodeTexture=s.leafNodeTexture,u.octreeLeafNodeTexelSizeUv=D.clone(s.leafNodeTexelSizeUv,u.octreeLeafNodeTexelSizeUv),u.octreeLeafNodeTilesPerRow=s.leafNodeTilesPerRow),this._shaderDirty&&(I9(this,n),this._shaderDirty=!1);let m=n.uniformState.viewProjection,p=o.orientedBoundingBox,g=sgt(p,m,Abt);if(g.x===1||g.y===1||g.z===-1||g.w===-1)return;u.ndcSpaceAxisAlignedBoundingBox=se.clone(g,u.ndcSpaceAxisAlignedBoundingBox);let x=n.uniformState.inverseView;u.transformPositionViewToUv=M.multiplyTransformation(this._transformPositionWorldToUv,x,u.transformPositionViewToUv);let _=n.uniformState.view;u.transformPositionUvToView=M.multiplyTransformation(_,this._transformPositionUvToWorld,u.transformPositionUvToView);let C=n.uniformState.inverseViewRotation;u.transformDirectionViewToLocal=$.multiply(this._transformDirectionWorldToLocal,C,u.transformDirectionViewToLocal),u.transformNormalLocalToWorld=$.clone(this._transformNormalLocalToWorld,u.transformNormalLocalToWorld);let V=e.camera.positionWC;u.cameraPositionUv=M.multiplyByPoint(this._transformPositionWorldToUv,V,u.cameraPositionUv),u.stepSize=this._stepSizeMultiplier;let L=e.passes.pick?this._drawCommandPick:e.passes.pickVoxel?this._drawCommandPickVoxel:this._drawCommand;L.boundingVolume=o.boundingSphere,e.commandList.push(L)};var zbt=new h,U8=new h,Kbt=new he,Jbt=new h;function Qbt(e,t){if(e._exaggeratedMinBounds=h.clone(e._minBounds,e._exaggeratedMinBounds),e._exaggeratedMaxBounds=h.clone(e._maxBounds,e._exaggeratedMaxBounds),e.shape===Xi.ELLIPSOID){let n=t.verticalExaggerationRelativeHeight,i=t.verticalExaggeration;e._exaggeratedMinBounds.z=(e._minBounds.z-n)*i+n,e._exaggeratedMaxBounds.z=(e._maxBounds.z-n)*i+n}else if(e.shape===Xi.BOX){let n=h.fromElements(1,1,t.verticalExaggeration,zbt);e._exaggeratedModelMatrix=M.multiplyByScale(e._modelMatrix,n,e._exaggeratedModelMatrix),e._exaggeratedModelMatrix=M.multiplyByTranslation(e._exaggeratedModelMatrix,jbt(e,t),e._exaggeratedModelMatrix)}}function jbt(e,t){let{shapeTransform:n=M.IDENTITY,globalTransform:i=M.IDENTITY}=e._provider,o=M.getTranslation(n,U8),r=M.multiplyByPoint(e._modelMatrix,o,U8),s=M.multiplyByPoint(i,r,U8),c=ie.WGS84.cartesianToCartographic(s,Kbt),d=0;l(c)&&(d=c.height);let u=hr.getHeight(d,t.verticalExaggeration,t.verticalExaggerationRelativeHeight);return h.fromElements(0,0,(u-d)/t.verticalExaggeration,Jbt)}function qbt(e,t,n){let i=e._uniforms;e._pickId=n.createPickId({primitive:e}),i.pickColor=Y.clone(e._pickId.color,i.pickColor);let{shaderDefines:o,shaderUniforms:r}=e._shape;e._shapeDefinesOld=Oe(o,!0);let s=e._uniformMap;for(let a in r)if(r.hasOwnProperty(a)){let c=`u_${a}`;s[c]=function(){return r[a]}}i.dimensions=h.clone(t.dimensions,i.dimensions),e._paddingBefore=h.clone(y(t.paddingBefore,h.ZERO),e._paddingBefore),i.paddingBefore=h.clone(e._paddingBefore,i.paddingBefore),e._paddingAfter=h.clone(y(t.paddingAfter,h.ZERO),e._paddingBefore),i.paddingAfter=h.clone(e._paddingAfter,i.paddingAfter),e._traversal=$bt(e,t,n),egt(e._traversal,i)}function iTe(e,t){let n=y(t.shapeTransform,M.IDENTITY),i=y(t.globalTransform,M.IDENTITY);return M.multiplyTransformation(i,e._exaggeratedModelMatrix,e._compoundModelMatrix),M.multiplyTransformation(e._compoundModelMatrix,n,e._compoundModelMatrix),eS(e,"_compoundModelMatrix","_compoundModelMatrixOld")+eS(e,"_minBounds","_minBoundsOld")+eS(e,"_maxBounds","_maxBoundsOld")+eS(e,"_exaggeratedMinBounds","_exaggeratedMinBoundsOld")+eS(e,"_exaggeratedMaxBounds","_exaggeratedMaxBoundsOld")+eS(e,"_minClippingBounds","_minClippingBoundsOld")+eS(e,"_maxClippingBounds","_maxClippingBoundsOld")>0}function eS(e,t,n){let i=e[t],o=e[n],r=!i.equals(o);return r&&i.clone(o),r?1:0}function oTe(e,t,n){if(!t.update(e._compoundModelMatrix,e._exaggeratedMinBounds,e._exaggeratedMaxBounds,e.minClippingBounds,e.maxClippingBounds))return!1;let o=t.shapeTransform,r=M.inverse(o,Dbt),s=M.getRotation(o,kbt),a=M.getScale(o,Mbt),c=h.maximumComponent(a),d=h.divideByScalar(a,c,Nbt),u=$.multiplyByScale(s,d,Ubt);return e._transformPositionWorldToUv=M.multiplyTransformation(Obt,r,e._transformPositionWorldToUv),e._transformPositionUvToWorld=M.multiplyTransformation(o,Hbt,e._transformPositionUvToWorld),e._transformDirectionWorldToLocal=M.getMatrix3(r,e._transformDirectionWorldToLocal),e._transformNormalLocalToWorld=$.inverseTranspose(u,e._transformNormalLocalToWorld),!0}function $bt(e,t,n){let i=h.clone(t.dimensions,wbt);h.add(i,e._paddingBefore,i),h.add(i,e._paddingAfter,i);let o=t.maximumTileCount,r=l(o)?aL.getApproximateTextureMemoryByteLength(o,i,t.types,t.componentTypes):void 0,s=y(t.keyframeCount,1);return new aL(e,n,i,t.types,t.componentTypes,s,r)}function egt(e,t){t.octreeInternalNodeTexture=e.internalNodeTexture,t.octreeInternalNodeTexelSizeUv=D.clone(e.internalNodeTexelSizeUv,t.octreeInternalNodeTexelSizeUv),t.octreeInternalNodeTilesPerRow=e.internalNodeTilesPerRow;let n=e.megatextures,i=n[0],o=n.length;t.megatextureTextures=new Array(o);for(let r=0;r<o;r++)t.megatextureTextures[r]=n[r].texture;t.megatextureSliceDimensions=D.clone(i.sliceCountPerRegion,t.megatextureSliceDimensions),t.megatextureTileDimensions=D.clone(i.regionCountPerMegatexture,t.megatextureTileDimensions),t.megatextureVoxelSizeUv=D.clone(i.voxelSizeUv,t.megatextureVoxelSizeUv),t.megatextureSliceSizeUv=D.clone(i.sliceSizeUv,t.megatextureSliceSizeUv),t.megatextureTileSizeUv=D.clone(i.regionSizeUv,t.megatextureTileSizeUv)}function tgt(e,t){let n=t.shaderDefines,i=Object.keys(n).some(o=>n[o]!==e._shapeDefinesOld[o]);return i&&(e._shapeDefinesOld=Oe(n,!0)),i}function ngt(e,t){if(!l(e)||!l(t))return 0;let n=t.currentTime,i,o=e.indexOf(n);o>=0?i=e.get(o):(o=~o,o===e.length?(o=e.length-1,i=e.get(o),n=i.stop):(i=e.get(o),n=i.start));let r=te.secondsDifference(i.stop,i.start),a=te.secondsDifference(n,i.start)/r;return o+a}function igt(e,t){let n=e.clippingPlanes;if(!l(n))return!1;n.update(t);let{clippingPlanesState:i,enabled:o}=n;if(o){let r=e._uniforms;r.clippingPlanesTexture=n.texture,r.clippingPlanesMatrix=M.transpose(M.multiplyTransformation(M.inverse(n.modelMatrix,r.clippingPlanesMatrix),e._transformPositionUvToWorld,r.clippingPlanesMatrix),r.clippingPlanesMatrix)}return e._clippingPlanesState===i&&e._clippingPlanesEnabled===o?!1:(e._clippingPlanesState=i,e._clippingPlanesEnabled=o,!0)}qf.prototype.isDestroyed=function(){return!1};qf.prototype.destroy=function(){let e=this._drawCommand;l(e)&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());let t=this._drawCommandPick;return l(t)&&(t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),this._pickId=this._pickId&&this._pickId.destroy(),this._traversal=this._traversal&&this._traversal.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),me(this)};var nTe=new Array(new se(-1,-1,-1,1),new se(1,-1,-1,1),new se(-1,1,-1,1),new se(1,1,-1,1),new se(-1,-1,1,1),new se(1,-1,1,1),new se(-1,1,1,1),new se(1,1,1,1)),ogt=new Array(1,2,4,0,3,5,0,3,6,1,2,7,0,5,6,1,4,7,2,4,7,3,5,6),rgt=new Array(new se,new se,new se,new se,new se,new se,new se,new se);function sgt(e,t,n){let i=M.fromRotationTranslation(e.halfAxes,e.center,Bbt),o=M.multiply(t,i,Ybt),r=+Number.MAX_VALUE,s=-Number.MAX_VALUE,a=+Number.MAX_VALUE,c=-Number.MAX_VALUE,d,u=rgt,m=nTe.length;for(d=0;d<m;d++)M.multiplyByVector(o,nTe[d],u[d]);for(d=0;d<m;d++){let p=u[d];if(p.z>=-p.w){let g=p.x/p.w,f=p.y/p.w;r=Math.min(r,g),s=Math.max(s,g),a=Math.min(a,f),c=Math.max(c,f)}else for(let g=0;g<3;g++){let f=ogt[d*3+g],x=u[f];if(x.z>=-x.w){let _=p.z+p.w,C=x.z+x.w,V=_/(_-C),L=se.lerp(p,x,V,Fbt),Z=L.x/L.w,G=L.y/L.w;r=Math.min(r,Z),s=Math.max(s,Z),a=Math.min(a,G),c=Math.max(c,G)}}}return r=W.clamp(r,-1,1),a=W.clamp(a,-1,1),s=W.clamp(s,-1,1),c=W.clamp(c,-1,1),n=se.fromElements(r,a,s,c,n),n}var D8=3e7,agt=new h(D8,0,0),cgt=new h(0,D8,0),lgt=new h(0,0,D8);function dgt(e,t){let n=e._traversal,i=e._debugPolylines;i.removeAll();function o(c,d,u,m){i.add({positions:[c,d],width:m,material:Ai.fromType("Color",{color:u})})}function r(c,d,u){let m=c.computeCorners();o(m[0],m[1],d,u),o(m[2],m[3],d,u),o(m[4],m[5],d,u),o(m[6],m[7],d,u),o(m[0],m[2],d,u),o(m[4],m[6],d,u),o(m[1],m[3],d,u),o(m[5],m[7],d,u),o(m[0],m[4],d,u),o(m[2],m[6],d,u),o(m[1],m[5],d,u),o(m[3],m[7],d,u)}function s(c){if(!n.isRenderable(c))return;let d=c.level,m=Math.max(1,5/Math.pow(2,d)),g=[Y.RED,Y.LIME,Y.BLUE][d%3];if(r(c.orientedBoundingBox,g,m),l(c.children))for(let f=0;f<8;f++)s(c.children[f])}r(e._shape.orientedBoundingBox,Y.WHITE,5),s(n.rootNode);let a=10;o(h.ZERO,agt,Y.RED,a),o(h.ZERO,cgt,Y.LIME,a),o(h.ZERO,lgt,Y.BLUE,a),i.update(t)}qf.DefaultCustomShader=new $T({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) +`;function jft(e){let t=new l_;this.shaderBuilder=t;let n=e._customShader,i=xt(e._uniformMap,n.uniformMap);e._uniformMap=i;let o=n.uniforms;for(let p in o)if(o.hasOwnProperty(p)){let g=o[p];t.addUniform(g.type,p,xe.FRAGMENT)}t.addUniform("sampler2D","u_megatextureTextures[METADATA_COUNT]",xe.FRAGMENT),this.uniformMap=i;let r=e._clippingPlanes,s=l(r)&&r.enabled?r.length:0;this.clippingPlanes=r,this.clippingPlanesLength=s,t.addVertexLines([o9]),t.addFragmentLines([n.fragmentShaderText,"#line 0",f9,n9,r9,p9]),s>0&&(t.addDefine("CLIPPING_PLANES",void 0,xe.FRAGMENT),t.addDefine("CLIPPING_PLANES_COUNT",s,xe.FRAGMENT),r.unionClippingRegions&&t.addDefine("CLIPPING_PLANES_UNION",void 0,xe.FRAGMENT),t.addFragmentLines([a9])),e._depthTest&&(t.addDefine("DEPTH_TEST",void 0,xe.FRAGMENT),t.addFragmentLines([s9]));let a=e._provider.shape;a==="BOX"?t.addFragmentLines([u9,c9,NS]):a==="CYLINDER"?t.addFragmentLines([m9,HV,l9,NS]):a==="ELLIPSOID"&&(t.addDefine("SHAPE_ELLIPSOID",void 0,xe.FRAGMENT),t.addFragmentLines([h9,HV,d9,NS])),t.addFragmentLines([i9]);let c=e._shape,d=c.shaderDefines;for(let p in d)if(d.hasOwnProperty(p)){let g=d[p];l(g)&&(g=g===!0?void 0:g,t.addDefine(p,g,xe.FRAGMENT))}let u=c.shaderMaximumIntersectionsLength;s>0&&(t.addDefine("CLIPPING_PLANES_INTERSECTION_INDEX",u,xe.FRAGMENT),s===1?u+=1:r.unionClippingRegions?u+=2:u+=1),e._depthTest&&(t.addDefine("DEPTH_INTERSECTION_INDEX",u,xe.FRAGMENT),u+=1),t.addDefine("INTERSECTION_COUNT",u,xe.FRAGMENT),(!h.equals(e.paddingBefore,h.ZERO)||!h.equals(e.paddingAfter,h.ZERO))&&t.addDefine("PADDING",void 0,xe.FRAGMENT),e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,xe.FRAGMENT),e._jitter&&t.addDefine("JITTER",void 0,xe.FRAGMENT),e._nearestSampling&&t.addDefine("NEAREST_SAMPLING",void 0,xe.FRAGMENT);let m=e._traversal;t.addDefine("SAMPLE_COUNT",`${m._sampleCount}`,xe.FRAGMENT)}var b9=jft;var zAi=S(T(),1);function qft(e,t){let{shaderBuilder:n}=e,{names:i,types:o,componentTypes:r,minimumValues:s,maximumValues:a}=t._provider,c=o.length,d=l(s)&&l(a);n.addDefine("METADATA_COUNT",c,xe.FRAGMENT),d&&n.addDefine("STATISTICS",void 0,xe.FRAGMENT);for(let P=0;P<c;P++){let F=i[P],M=o[P],b=`PropertyStatistics_${F}`,L=`PropertyStatistics_${F}`;n.addStruct(b,L,xe.FRAGMENT);let E=cB(M);n.addStructField(b,E,"min"),n.addStructField(b,E,"max")}let u="Statistics",m="Statistics",p="statistics";n.addStruct(u,m,xe.FRAGMENT);for(let P=0;P<c;P++){let F=i[P],M=`PropertyStatistics_${F}`,b=F;n.addStructField(u,M,b)}let g="Metadata",f="Metadata",x="metadata";n.addStruct(g,f,xe.FRAGMENT),n.addStructField(g,m,p);for(let P=0;P<c;P++){let F=i[P],M=o[P],b=cB(M);n.addStructField(g,b,F)}for(let P=0;P<c;P++){let F=i[P],M=o[P],b=ept(M),L=`VoxelProperty_${F}`,E=`VoxelProperty_${F}`;n.addStruct(L,E,xe.FRAGMENT),n.addStructField(L,b,"partialDerivativeLocal"),n.addStructField(L,b,"partialDerivativeWorld"),n.addStructField(L,b,"partialDerivativeView"),n.addStructField(L,b,"partialDerivativeValid")}let _="Voxel",C="Voxel",V="voxel";n.addStruct(_,C,xe.FRAGMENT);for(let P=0;P<c;P++){let F=i[P],M=`VoxelProperty_${F}`;n.addStructField(_,M,F)}n.addStructField(_,"vec3","positionEC"),n.addStructField(_,"vec3","positionUv"),n.addStructField(_,"vec3","positionShapeUv"),n.addStructField(_,"vec3","positionUvLocal"),n.addStructField(_,"vec3","viewDirUv"),n.addStructField(_,"vec3","viewDirWorld"),n.addStructField(_,"vec3","surfaceNormal"),n.addStructField(_,"float","travelDistance"),n.addStructField(_,"int","stepCount"),n.addStructField(_,"int","tileIndex"),n.addStructField(_,"int","sampleIndex");let Z="FragmentInput";n.addStruct(Z,"FragmentInput",xe.FRAGMENT),n.addStructField(Z,f,x),n.addStructField(Z,C,V);let G="Properties",W="Properties",v="properties";n.addStruct(G,W,xe.FRAGMENT);for(let P=0;P<c;P++){let F=i[P],M=o[P],b=cB(M);n.addStructField(G,b,F)}{let P="clearProperties";n.addFunction(P,`${W} clearProperties()`,xe.FRAGMENT),n.addFunctionLines(P,[`${W} ${v};`]);for(let F=0;F<c;F++){let M=i[F],b=o[F],L=r[F],E=cB(b,L);n.addFunctionLines(P,[`${v}.${M} = ${E}(0.0);`])}n.addFunctionLines(P,[`return ${v};`])}{let P="sumProperties";n.addFunction(P,`${W} sumProperties(${W} propertiesA, ${W} propertiesB)`,xe.FRAGMENT),n.addFunctionLines(P,[`${W} ${v};`]);for(let F=0;F<c;F++){let M=i[F];n.addFunctionLines(P,[`${v}.${M} = propertiesA.${M} + propertiesB.${M};`])}n.addFunctionLines(P,[`return ${v};`])}{let P="scaleProperties";n.addFunction(P,`${W} scaleProperties(${W} ${v}, float scale)`,xe.FRAGMENT),n.addFunctionLines(P,[`${W} scaledProperties = ${v};`]);for(let F=0;F<c;F++){let M=i[F];n.addFunctionLines(P,[`scaledProperties.${M} *= scale;`])}n.addFunctionLines(P,["return scaledProperties;"])}{let P="mixProperties";n.addFunction(P,`${W} mixProperties(${W} propertiesA, ${W} propertiesB, float mixFactor)`,xe.FRAGMENT),n.addFunctionLines(P,[`${W} ${v};`]);for(let F=0;F<c;F++){let M=i[F];n.addFunctionLines(P,[`${v}.${M} = mix(propertiesA.${M}, propertiesB.${M}, mixFactor);`])}n.addFunctionLines(P,[`return ${v};`])}{let P="copyPropertiesToMetadata";n.addFunction(P,`void copyPropertiesToMetadata(in ${W} ${v}, inout ${f} ${x})`,xe.FRAGMENT);for(let F=0;F<c;F++){let M=i[F];n.addFunctionLines(P,[`${x}.${M} = ${v}.${M};`])}}if(d){let P="setStatistics";n.addFunction(P,`void setStatistics(inout ${m} ${p})`,xe.FRAGMENT);for(let F=0;F<c;F++){let M=i[F],b=o[F],L=Kt.getComponentCount(b);for(let E=0;E<L;E++){let I=tpt(b,E),w=s[F][E],N=a[F][E];n.addFunctionLines(P,[`${p}.${M}.min${I} = ${d_e(w)};`,`${p}.${M}.max${I} = ${d_e(N)};`])}}}{let P="getPropertiesFromMegatextureAtUv";n.addFunction(P,`${W} getPropertiesFromMegatextureAtUv(vec2 texcoord)`,xe.FRAGMENT),n.addFunctionLines(P,[`${W} ${v};`]);for(let F=0;F<c;F++){let M=i[F],b=o[F],L=r[F],E=$ft(b,L);n.addFunctionLines(P,[`properties.${M} = texture(u_megatextureTextures[${F}], texcoord)${E};`])}n.addFunctionLines(P,[`return ${v};`])}}function cB(e){if(e===Kt.SCALAR)return"float";if(e===Kt.VEC2)return"vec2";if(e===Kt.VEC3)return"vec3";if(e===Kt.VEC4)return"vec4"}function $ft(e){if(e===Kt.SCALAR)return".r";if(e===Kt.VEC2)return".ra";if(e===Kt.VEC3)return".rgb";if(e===Kt.VEC4)return""}function ept(e){if(e===Kt.SCALAR)return"vec3";if(e===Kt.VEC2)return"mat2";if(e===Kt.VEC3)return"mat3";if(e===Kt.VEC4)return"mat4"}function d_e(e){let t=e.toString();return t.indexOf(".")===-1&&(t=`${e}.0`),t}function tpt(e,t){return e===Kt.SCALAR?"":`[${t}]`}var g9=qft;function npt(e,t){let n=new b9(e);g9(n,e);let{shaderBuilder:i,clippingPlanes:o,clippingPlanesLength:r}=n;if(r>0){let C="getClippingPlane",V=Db(o,t),Z=0,R=V.indexOf(")")+1,G=V.indexOf("{",R)+1,W=V.indexOf("}",G),v=V.slice(Z,R),P=V.slice(G,W);i.addFunction(C,v,xe.FRAGMENT),i.addFunctionLines(C,[P])}let s=i.clone();s.addDefine("PICKING",void 0,xe.FRAGMENT);let a=i.clone();a.addDefine("PICKING_VOXEL",void 0,xe.FRAGMENT);let c=i.buildShaderProgram(t),d=s.buildShaderProgram(t),u=a.buildShaderProgram(t),m=De.fromCache({cull:{enabled:!0,face:pi.BACK},depthTest:{enabled:!1},depthMask:!1,blending:un.PRE_MULTIPLIED_ALPHA_BLEND}),p=t.getViewportQuadVertexArray(),g=e._depthTest,f=new tt({vertexArray:p,primitiveType:Fe.TRIANGLES,renderState:m,shaderProgram:c,uniformMap:n.uniformMap,modelMatrix:e._compoundModelMatrix,pass:Le.VOXELS,executeInClosestFrustum:!0,owner:this,cull:g,occlude:g}),x=tt.shallowClone(f,new tt);x.shaderProgram=d,x.pickOnly=!0;let _=tt.shallowClone(f,new tt);if(_.shaderProgram=u,_.pickOnly=!0,l(e._drawCommand)){let C=e._drawCommand;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}if(l(e._drawCommandPick)){let C=e._drawCommandPick;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}if(l(e._drawCommandPickVoxel)){let C=e._drawCommandPickVoxel;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}e._drawCommand=f,e._drawCommandPick=x,e._drawCommandPickVoxel=_}var y9=npt;var DMi=S(T(),1);var fMi=S(T(),1);function jl(){this.orientedBoundingBox=new Gn,this.boundingSphere=new le,this.boundTransform=new A,this.shapeTransform=new A,this._minBounds=h.clone(jl.DefaultMinBounds,new h),this._maxBounds=h.clone(jl.DefaultMaxBounds,new h),this.shaderUniforms={renderMinBounds:new h,renderMaxBounds:new h,boxUvToShapeUvScale:new h,boxUvToShapeUvTranslate:new h},this.shaderDefines={BOX_INTERSECTION_INDEX:void 0,BOX_HAS_SHAPE_BOUNDS:void 0},this.shaderMaximumIntersectionsLength=0}var ipt=new h,Nj=new h,opt=new $,rpt=new h,spt=new h,apt=new h,cpt=new h,u_e=A.fromRotationTranslation($.fromUniformScale(.5,new $),new h(.5,.5,.5),new A);jl.prototype.update=function(e,t,n,i,o){i=y(i,jl.DefaultMinBounds),o=y(o,jl.DefaultMaxBounds);let r=jl.DefaultMinBounds,s=jl.DefaultMaxBounds;t=this._minBounds=h.clamp(t,r,s,this._minBounds),n=this._maxBounds=h.clamp(n,r,s,this._maxBounds),i=h.clamp(i,r,s,rpt),o=h.clamp(o,r,s,spt);let a=h.clamp(t,i,o,apt),c=h.clamp(n,i,o,cpt),d=A.getScale(e,Nj);if(a.x>c.x||a.y>c.y||a.z>c.z||(a.x===c.x)+(a.y===c.y)+(a.z===c.z)>=2||i.x>o.x||i.y>o.y||i.z>o.z||d.x===0||d.y===0||d.z===0)return!1;this.shapeTransform=A.clone(e,this.shapeTransform),this.orientedBoundingBox=kj(a,c,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=A.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=le.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let{shaderUniforms:u,shaderDefines:m}=this;for(let f in m)m.hasOwnProperty(f)&&(m[f]=void 0);let p=!h.equals(t,r)||!h.equals(n,s),g=0;if(m.BOX_INTERSECTION_INDEX=g,g+=1,u.renderMinBounds=A.multiplyByPoint(u_e,a,u.renderMinBounds),u.renderMaxBounds=A.multiplyByPoint(u_e,c,u.renderMaxBounds),p){m.BOX_HAS_SHAPE_BOUNDS=!0;let f=t,x=n;u.boxUvToShapeUvScale=h.fromElements(2/(f.x===x.x?1:x.x-f.x),2/(f.y===x.y?1:x.y-f.y),2/(f.z===x.z?1:x.z-f.z),u.boxUvToShapeUvScale),u.boxUvToShapeUvTranslate=h.fromElements(-u.boxUvToShapeUvScale.x*(f.x*.5+.5),-u.boxUvToShapeUvScale.y*(f.y*.5+.5),-u.boxUvToShapeUvScale.z*(f.z*.5+.5),u.boxUvToShapeUvTranslate)}return this.shaderMaximumIntersectionsLength=g,!0};var lB=new h,Uj=new h;jl.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=h.fromElements(X.lerp(r.x,s.x,a*t),X.lerp(r.y,s.y,a*n),X.lerp(r.z,s.z,a*i),lB),d=h.fromElements(X.lerp(r.x,s.x,a*(t+1)),X.lerp(r.y,s.y,a*(n+1)),X.lerp(r.z,s.z,a*(i+1)),Uj);return kj(c,d,this.shapeTransform,o)};var m_e=new h;jl.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,m_e),s=h.multiplyByScalar(r,o,m_e),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,lB),o,lB),c=h.add(a,s,Uj),d=this._minBounds,u=this._maxBounds,m=h.fromElements(X.lerp(d.x,u.x,a.x),X.lerp(d.y,u.y,a.y),X.lerp(d.z,u.z,a.z),lB),p=h.fromElements(X.lerp(d.x,u.x,c.x),X.lerp(d.y,u.y,c.y),X.lerp(d.z,u.z,c.z),Uj);return kj(m,p,this.shapeTransform,i)};jl.DefaultMinBounds=Object.freeze(new h(-1,-1,-1));jl.DefaultMaxBounds=Object.freeze(new h(1,1,1));function kj(e,t,n,i){let o=jl.DefaultMinBounds,r=jl.DefaultMaxBounds;if(h.equals(e,o)&&h.equals(t,r))i.center=A.getTranslation(n,i.center),i.halfAxes=A.getMatrix3(n,i.halfAxes);else{let a=A.getScale(n,Nj),c=h.midpoint(e,t,ipt);i.center=A.multiplyByPoint(n,c,i.center),a=h.fromElements(a.x*.5*(t.x-e.x),a.y*.5*(t.y-e.y),a.z*.5*(t.z-e.z),Nj);let d=A.getRotation(n,opt);i.halfAxes=$.setScale(d,a,i.halfAxes)}return i}var Hf=jl;var ZMi=S(T(),1);function qr(){this.orientedBoundingBox=new Gn,this.boundingSphere=new le,this.boundTransform=new A,this.shapeTransform=new A,this._minimumRadius=qr.DefaultMinBounds.x,this._maximumRadius=qr.DefaultMaxBounds.x,this._minimumHeight=qr.DefaultMinBounds.y,this._maximumHeight=qr.DefaultMaxBounds.y,this._minimumAngle=qr.DefaultMinBounds.z,this._maximumAngle=qr.DefaultMaxBounds.z,this.shaderUniforms={cylinderRenderHeightMinMax:new D,cylinderRenderRadiusMinMax:new D,cylinderRenderAngleMinMax:new D,cylinderUvToShapeUvRadius:new D,cylinderUvToShapeUvHeight:new D,cylinderUvToShapeUvAngle:new D,cylinderShapeUvAngleMinMax:new D,cylinderShapeUvAngleRangeZeroMid:0},this.shaderDefines={CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF:void 0,CYLINDER_HAS_SHAPE_BOUNDS_RADIUS:void 0,CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MAX:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MIN:void 0,CYLINDER_INTERSECTION_INDEX_ANGLE:void 0},this.shaderMaximumIntersectionsLength=0}var b_e=new h;qr.prototype.update=function(e,t,n,i,o){i=y(i,qr.DefaultMinBounds),o=y(o,qr.DefaultMaxBounds);let r=qr.DefaultMinBounds.x,s=qr.DefaultMaxBounds.x,a=qr.DefaultMinBounds.y,c=qr.DefaultMaxBounds.y,d=qr.DefaultMinBounds.z,u=qr.DefaultMaxBounds.z,m=u-d,p=.5*m,g=X.EPSILON10,f=X.EPSILON3,x=X.EPSILON10,_=X.clamp(t.x,r,s),C=X.clamp(n.x,r,s),V=X.clamp(i.x,r,s),Z=X.clamp(o.x,r,s),R=Math.max(_,V),G=Math.min(C,Z),W=X.clamp(t.y,a,c),v=X.clamp(n.y,a,c),P=X.clamp(i.y,a,c),F=X.clamp(o.y,a,c),M=Math.max(W,P),b=Math.min(v,F),L=X.negativePiToPi(t.z),E=X.negativePiToPi(n.z),I=X.negativePiToPi(i.z),w=X.negativePiToPi(o.z),N=Math.max(L,I),B=Math.min(E,w),k=A.getScale(e,b_e);if(G===0||R>G||M>b||X.equalsEpsilon(k.x,0,void 0,g)||X.equalsEpsilon(k.y,0,void 0,g)||X.equalsEpsilon(k.z,0,void 0,g))return!1;this._minimumRadius=_,this._maximumRadius=C,this._minimumHeight=W,this._maximumHeight=v,this._minimumAngle=L,this._maximumAngle=E,this.shapeTransform=A.clone(e,this.shapeTransform),this.orientedBoundingBox=Bj(R,G,M,b,N,B,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=A.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=le.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let J=_===r&&C===s,z=W===a&&v===c,ee=E<L,K=E-L+ee*m,j=K>p+x&&K<m-x,q=K<p-x,be=K>=p-x&&K<=p+x,Se=j||q||be,ae=X.equalsEpsilon(L,d,void 0,f),ye=X.equalsEpsilon(E,u,void 0,f),Te=R===r,Ze=B<N,We=B-N+Ze*m,Pe=We>=p-x&&We<m-x,Ue=We>x&&We<p-x,Pt=We<=x,Ot=Pe||Ue||Pt,{shaderUniforms:ht,shaderDefines:Ae}=this;for(let Qe in Ae)Ae.hasOwnProperty(Qe)&&(Ae[Qe]=void 0);let $e=0;if(Ae.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX=$e,$e+=1,Te||(Ae.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN=!0,Ae.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN=$e,$e+=1),ht.cylinderRenderRadiusMinMax=D.fromElements(R,G,ht.cylinderRenderRadiusMinMax),R===G&&(Ae.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT=!0),!J){Ae.CYLINDER_HAS_SHAPE_BOUNDS_RADIUS=!0;let Qe=C-_,je=0,Ut=1;Qe!==0&&(je=1/Qe,Ut=-_/Qe),ht.cylinderUvToShapeUvRadius=D.fromElements(je,Ut,ht.cylinderUvToShapeUvRadius)}if(!z){Ae.CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT=!0;let Qe=v-W,je=0,Ut=1;Qe!==0&&(je=2/Qe,Ut=-(W+1)/Qe),ht.cylinderUvToShapeUvHeight=D.fromElements(je,Ut,ht.cylinderUvToShapeUvHeight)}if(ht.cylinderRenderHeightMinMax=D.fromElements(M,b,ht.cylinderRenderHeightMinMax),ee&&(Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED=!0),Ot&&(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE=!0,Ae.CYLINDER_INTERSECTION_INDEX_ANGLE=$e,Pe?(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF=!0,$e+=1):Ue?(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF=!0,$e+=2):Pt&&(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO=!0,$e+=2),ht.cylinderRenderAngleMinMax=D.fromElements(N,B,ht.cylinderRenderAngleMinMax)),Se){Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE=!0,ae&&(Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY=!0),ye&&(Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY=!0);let Qe=(L-d)/m,je=(E-d)/m,Ut=1-K/m;if(ht.cylinderShapeUvAngleMinMax=D.fromElements(Qe,je,ht.cylinderShapeUvAngleMinMax),ht.cylinderShapeUvAngleRangeZeroMid=(je+.5*Ut)%1,K<=x)ht.cylinderUvToShapeUvAngle=D.fromElements(0,1,ht.cylinderUvToShapeUvAngle);else{let pe=m/K,Ve=-(L-d)/K;ht.cylinderUvToShapeUvAngle=D.fromElements(pe,Ve,ht.cylinderUvToShapeUvAngle)}}return this.shaderMaximumIntersectionsLength=$e,!0};qr.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minimumRadius,s=this._maximumRadius,a=this._minimumHeight,c=this._maximumHeight,d=this._minimumAngle,u=this._maximumAngle,m=1/Math.pow(2,e),p=X.lerp(r,s,t*m),g=X.lerp(r,s,(t+1)*m),f=X.lerp(a,c,n*m),x=X.lerp(a,c,(n+1)*m),_=X.lerp(d,u,i*m),C=X.lerp(d,u,(i+1)*m);return Bj(p,g,f,x,_,C,this.shapeTransform,o)};var h_e=new h,f_e=new h,lpt=new h;qr.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,h_e),s=h.multiplyByScalar(r,o,h_e),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,f_e),o,f_e),c=h.add(a,s,lpt),d=this._minimumRadius,u=this._maximumRadius,m=this._minimumHeight,p=this._maximumHeight,g=this._minimumAngle,f=this._maximumAngle,x=X.lerp(d,u,a.x),_=X.lerp(d,u,c.x),C=X.lerp(m,p,a.y),V=X.lerp(m,p,c.y),Z=X.lerp(g,f,a.z),R=X.lerp(g,f,c.z);return Bj(x,_,C,V,Z,R,this.shapeTransform,i)};qr.DefaultMinBounds=Object.freeze(new h(0,-1,-X.PI));qr.DefaultMaxBounds=Object.freeze(new h(1,1,+X.PI));var dpt=5,upt=new Array(dpt),mpt=new h,hpt=new $,fpt=new A,ppt=new A,bpt=new A,Dj=new A,gpt=new h,ypt=new h,xpt=new h,g_e=new Array(8);for(let e=0;e<8;e++)g_e[e]=new h;function p_e(e,t,n){return Math.abs(se.dot(e,t))<n}function _pt(e){let t=A.getColumn(e,0,gpt),n=A.getColumn(e,1,ypt),i=A.getColumn(e,2,xpt),o=X.EPSILON4;return p_e(t,n,o)&&p_e(n,i,o)}function Spt(e,t){let n=g_e;h.fromElements(-.5,-.5,-.5,n[0]),h.fromElements(-.5,-.5,.5,n[1]),h.fromElements(-.5,.5,-.5,n[2]),h.fromElements(-.5,.5,.5,n[3]),h.fromElements(.5,-.5,-.5,n[4]),h.fromElements(.5,-.5,.5,n[5]),h.fromElements(.5,.5,-.5,n[6]),h.fromElements(.5,.5,.5,n[7]);for(let i=0;i<8;++i)A.multiplyByPoint(e,n[i],n[i]);return Gn.fromPoints(n,t)}function Bj(e,t,n,i,o,r,s,a){let c=qr.DefaultMinBounds,d=qr.DefaultMaxBounds,u=c.x,m=d.x,p=c.y,g=d.y,f=c.z,x=d.z;if(e===u&&t===m&&n===p&&i===g&&o===f&&r===x)return a.center=A.getTranslation(s,a.center),a.halfAxes=A.getMatrix3(s,a.halfAxes),a;r<o&&(r+=X.TWO_PI);let C=r-o,V=o+C*.5,Z=upt,R=0;Z[R++]=o,Z[R++]=r,Z[R++]=V,C>X.PI&&(Z[R++]=V-X.PI_OVER_TWO,Z[R++]=V+X.PI_OVER_TWO);let G=1,W=1,v=-1,P=-1;for(let ee=0;ee<R;++ee){let K=Z[ee]-V,j=Math.cos(K),q=Math.sin(K),be=j*e,Se=q*e,ae=j*t,ye=q*t;G=Math.min(G,be),W=Math.min(W,Se),G=Math.min(G,ae),W=Math.min(W,ye),v=Math.max(v,be),P=Math.max(P,Se),v=Math.max(v,ae),P=Math.max(P,ye)}let F=v-G,M=P-W,b=i-n,L=(G+v)*.5,E=(W+P)*.5,I=(n+i)*.5,w=h.fromElements(L,E,I,mpt),N=$.fromRotationZ(V,hpt),B=h.fromElements(F,M,b,b_e),k=A.fromScale(B,bpt),O=A.fromRotation(N,ppt),U=A.fromTranslation(w,fpt),J=A.multiplyTransformation(O,A.multiplyTransformation(U,k,Dj),Dj),z=A.multiplyTransformation(s,J,Dj);return _pt(z)?Gn.fromTransformation(z,a):Spt(z,a)}var Jf=qr;var AMi=S(T(),1);function r0(){this.orientedBoundingBox=new Gn,this.boundingSphere=new le,this.boundTransform=new A,this.shapeTransform=new A,this._rectangle=new ce,this._minimumHeight=r0.DefaultMinBounds.z,this._maximumHeight=r0.DefaultMaxBounds.z,this._ellipsoid=new te,this._translation=new h,this._rotation=new $,this.shaderUniforms={ellipsoidRadiiUv:new h,eccentricitySquared:0,evoluteScale:new D,ellipsoidInverseRadiiSquaredUv:new h,ellipsoidRenderLongitudeMinMax:new D,ellipsoidShapeUvLongitudeMinMaxMid:new h,ellipsoidUvToShapeUvLongitude:new D,ellipsoidUvToShapeUvLatitude:new D,ellipsoidRenderLatitudeSinMinMax:new D,ellipsoidInverseHeightDifferenceUv:0,clipMinMaxHeight:new D},this.shaderDefines={ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LONGITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN:void 0},this.shaderMaximumIntersectionsLength=0}var Tpt=new h,Cpt=new h,Vpt=new h,Zpt=new h,Lpt=new h,Rpt=new h,Gpt=new h,Ept=new h,Wpt=new $,y_e=new h,x_e=new h,Ipt=new ce;r0.prototype.update=function(e,t,n,i,o){let{DefaultMinBounds:r,DefaultMaxBounds:s}=r0;i=y(i,r),o=y(o,s);let a=X.EPSILON10,c=X.EPSILON3,d=X.EPSILON10,u=X.EPSILON10,m=X.EPSILON3,p=A.getScale(e,Ept),g=h.clone(r,Tpt);g.z=-h.minimumComponent(p);let f=h.clamp(t,g,s,Cpt),x=h.clamp(n,g,s,Vpt),_=h.clamp(i,g,s,Zpt),C=h.clamp(o,g,s,Lpt),V=h.maximumByComponent(f,_,Rpt),Z=h.minimumByComponent(x,C,Gpt),R=h.add(p,h.fromElements(x.z,x.z,x.z,y_e),y_e),G=h.maximumComponent(R),W=h.add(p,h.fromElements(Z.z,Z.z,Z.z,x_e),x_e);if(V.y>Z.y||V.y===s.y||Z.y===r.y||V.z>Z.z||X.equalsEpsilon(W,h.ZERO,void 0,a))return!1;this._rectangle=ce.fromRadians(f.x,f.y,x.x,x.y),this._translation=A.getTranslation(e,this._translation),this._rotation=A.getRotation(e,this._rotation),this._ellipsoid=te.fromCartesian3(p,this._ellipsoid),this._minimumHeight=f.z,this._maximumHeight=x.z;let v=ce.fromRadians(V.x,V.y,Z.x,Z.y,Ipt);this.orientedBoundingBox=Yj(v,V.z,Z.z,this._ellipsoid,this._translation,this._rotation,this.orientedBoundingBox),this.shapeTransform=A.fromRotationTranslation($.setScale(this._rotation,R,Wpt),this._translation,this.shapeTransform),this.boundTransform=A.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=le.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let P=s.x-r.x,F=.5*P,M=Z.x<V.x,b=Z.x-V.x+M*P,L=b<=d,E=b>=F-d&&b<P-d,I=b>d&&b<F-d,w=L||E||I,N=x.x<f.x,B=x.x-f.x+N*P,k=B>F+d&&B<P-d,O=B>=F-d&&B<=F+d,U=B<F-d,J=k||O||U,z=Z.y<-m,ee=Z.y>=-m&&Z.y<=+m,K=Z.y>+m&&Z.y<s.y-u,j=z||ee||K,q=V.y>r.y+u&&V.y<-m,be=V.y>=-m&&V.y<=+m,Se=V.y>+m,ae=q||be||Se,ye=j||ae,Te=x.y-f.y,Ze=x.y<-m,We=x.y>=-m&&x.y<=+m,Pe=x.y>+m&&x.y<s.y-u,Ue=Ze||We||Pe,Pt=f.y>r.y+u&&f.y<-m,Ot=f.y>=-m&&f.y<=+m,ht=f.y>+m,$e=Ue||(Pt||Ot||ht),{shaderUniforms:Qe,shaderDefines:je}=this;for(let li in je)je.hasOwnProperty(li)&&(je[li]=void 0);Qe.ellipsoidRadiiUv=h.divideByScalar(R,G,Qe.ellipsoidRadiiUv);let{x:Ut,z:pe}=Qe.ellipsoidRadiiUv,Ve=pe/Ut;Qe.eccentricitySquared=1-Ve*Ve,Qe.evoluteScale=D.fromElements((Ut*Ut-pe*pe)/Ut,(pe*pe-Ut*Ut)/pe,Qe.evoluteScale),Qe.ellipsoidInverseRadiiSquaredUv=h.divideComponents(h.ONE,h.multiplyComponents(Qe.ellipsoidRadiiUv,Qe.ellipsoidRadiiUv,Qe.ellipsoidInverseRadiiSquaredUv),Qe.ellipsoidInverseRadiiSquaredUv);let Dt=0;je.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX=Dt,Dt+=1,je.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN=Dt,Dt+=1,Qe.clipMinMaxHeight=D.fromElements((V.z-x.z)/G,(Z.z-x.z)/G,Qe.clipMinMaxHeight);let bt=(x.z-f.z)/G;if(Qe.ellipsoidInverseHeightDifferenceUv=1/bt,f.z===x.z&&(Qe.ellipsoidInverseHeightDifferenceUv=0),w&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE=!0,je.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE=Dt,E?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF=!0,Dt+=1):I?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF=!0,Dt+=2):L&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO=!0,Dt+=2),Qe.ellipsoidRenderLongitudeMinMax=D.fromElements(V.x,Z.x,Qe.ellipsoidRenderLongitudeMinMax)),J)if(je.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE=!0,x.x<f.x&&(je.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED=!0),B<=d)Qe.ellipsoidUvToShapeUvLongitude=D.fromElements(0,1,Qe.ellipsoidUvToShapeUvLongitude);else{let Vo=P/B,Gs=-(f.x-r.x)/B;Qe.ellipsoidUvToShapeUvLongitude=D.fromElements(Vo,Gs,Qe.ellipsoidUvToShapeUvLongitude)}if(w){let li=X.equalsEpsilon(V.x,r.x,void 0,c),Vo=X.equalsEpsilon(Z.x,s.x,void 0,c);li&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY=!0),Vo&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY=!0);let Gs=(f.x-r.x)/P,Hs=(x.x-r.x)/P,Ur=(Z.x-r.x)/P,ts=1-b/P,ke=(Ur+.5*ts)%1;Qe.ellipsoidShapeUvLongitudeMinMaxMid=h.fromElements(Gs,Hs,ke,Qe.ellipsoidShapeUvLongitudeMinMaxMid)}if(ye&&(ae&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN=!0,je.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN=Dt,q?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF=!0,Dt+=1):be?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF=!0,Dt+=1):Se&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF=!0,Dt+=2)),j&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX=!0,je.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX=Dt,z?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF=!0,Dt+=2):ee?(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF=!0,Dt+=1):K&&(je.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF=!0,Dt+=1)),Qe.ellipsoidRenderLatitudeSinMinMax=D.fromElements(Math.sin(V.y),Math.sin(Z.y),Qe.ellipsoidRenderLatitudeSinMinMax)),$e)if(je.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE=!0,Te<u)Qe.ellipsoidUvToShapeUvLatitude=D.fromElements(0,1,Qe.ellipsoidUvToShapeUvLatitude);else{let Vo=(s.y-r.y)/Te,Gs=(r.y-f.y)/Te;Qe.ellipsoidUvToShapeUvLatitude=D.fromElements(Vo,Gs,Qe.ellipsoidUvToShapeUvLatitude)}return this.shaderMaximumIntersectionsLength=Dt,!0};var T_e=new ce;r0.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=1/Math.pow(2,e),s=t*r,a=(t+1)*r,c=n*r,d=(n+1)*r,u=i*r,m=(i+1)*r,p=ce.subsection(this._rectangle,s,c,a,d,T_e),g=X.lerp(this._minimumHeight,this._maximumHeight,u),f=X.lerp(this._minimumHeight,this._maximumHeight,m);return Yj(p,g,f,this._ellipsoid,this._translation,this._rotation,o)};var __e=new h,S_e=new h,Xpt=new h;r0.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,__e),s=h.multiplyByScalar(r,o,__e),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,S_e),o,S_e),c=h.add(a,s,Xpt),d=ce.subsection(this._rectangle,a.x,a.y,c.x,c.y,T_e),u=X.lerp(this._minimumHeight,this._maximumHeight,a.z),m=X.lerp(this._minimumHeight,this._maximumHeight,c.z);return Yj(d,u,m,this._ellipsoid,this._translation,this._rotation,i)};function Yj(e,t,n,i,o,r,s){return s=Gn.fromRectangle(e,t,n,i,s),s.center=h.add(s.center,o,s.center),s.halfAxes=$.multiply(s.halfAxes,r,s.halfAxes),s}r0.DefaultMinBounds=Object.freeze(new h(-X.PI,-X.PI_OVER_TWO,-te.WGS84.minimumRadius));r0.DefaultMaxBounds=Object.freeze(new h(X.PI,X.PI_OVER_TWO,10*te.WGS84.maximumRadius));var US=r0;var Hd={BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER"};Hd.getMinBounds=function(e){switch(e){case Hd.BOX:return Hf.DefaultMinBounds;case Hd.ELLIPSOID:return US.DefaultMinBounds;case Hd.CYLINDER:return Jf.DefaultMinBounds}};Hd.getMaxBounds=function(e){switch(e){case Hd.BOX:return Hf.DefaultMaxBounds;case Hd.ELLIPSOID:return US.DefaultMaxBounds;case Hd.CYLINDER:return Jf.DefaultMaxBounds}};Hd.getShapeConstructor=function(e){switch(e){case Hd.BOX:return Hf;case Hd.ELLIPSOID:return US;case Hd.CYLINDER:return Jf}};var Ii=Object.freeze(Hd);var BNi=S(T(),1);var zMi=S(T(),1);function Zh(e){this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=l(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(Zh.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(e){if(l(e)){for(;this._length>e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});Zh.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new Zh({comparator:t,maximumLength:e});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o};Zh.prototype.reset=function(){this._length=0;let e=this._maximumLength;if(l(e))for(let t=0;t<e;t++)this._array[t]=void 0;else this._array.length=0};Zh.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)C_e(this,t)};Zh.prototype.insert=function(e){let t,n=this._maximumLength;if(l(n)){if(n===0)return;if(this._length===n){let o=this._array[0];if(this._comparator(e,o)<=0)return e;t=this.removeMinimum()}}let i=this._length;return this._array[i]=e,this._length++,C_e(this,i),t};Zh.prototype.removeMinimum=function(){let e=this._length;if(e===0)return;this._length--;let t=this._array[0];return e>=2&&(this._array[0]=this._array[e-1],V_e(this,0)),this._array[e-1]=void 0,t};Zh.prototype.removeMaximum=function(){let e=this._length;if(e===0)return;this._length--;let t;if(e<=2)t=this._array[e-1];else{let n=Oj(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&V_e(this,n)}return this._array[e-1]=void 0,t};Zh.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};Zh.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[Oj(this,1,2)?1:2]};function dB(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function x9(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function Oj(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function C_e(e,t){if(t===0)return;let n=Math.floor(X.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=x9(e,t,i);for(o!==n&&(dB(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if(x9(e,t,r)!==o)break;dB(e,t,r),t=r}}function V_e(e,t){let n=e._length,i=Math.floor(X.log2(t+1))%2===0,o;for(;(o=2*t+1)<n;){let r=o,s=o+1;if(s<n){x9(e,s,r)===i&&(r=s);let a=2*o+1,c=Math.max(Math.min(n-a,4),0);for(let d=0;d<c;d++){let u=a+d;x9(e,u,r)===i&&(r=u)}}if(x9(e,r,t)===i&&(dB(e,r,t),r!==o&&r!==s)){let a=Math.floor((r-1)/2);Oj(e,r,a)===i&&dB(e,r,a)}t=r}}var kS=Zh;var HMi=S(T(),1),Z_e=Object.freeze({UNLOADED:0,RECEIVING:1,RECEIVED:2,LOADED:3,FAILED:4,UNAVAILABLE:5});function uB(e,t){this.spatialNode=e,this.keyframe=t,this.state=Z_e.UNLOADED,this.metadata=[],this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1}uB.priorityComparator=function(e,t){return e.priority-t.priority};uB.searchComparator=function(e,t){return e.keyframe-t.keyframe};uB.LoadState=Z_e;var Hi=uB;var fNi=S(T(),1);function Sy(e,t,n,i,o){i===an.UNSIGNED_SHORT&&(i=an.FLOAT32);let r=e.floatingPointTexture;if(i===an.FLOAT32&&!r)throw new ue("Floating point texture not supported");let s;i===an.FLOAT32||i===an.FLOAT64?s=Ke.FLOAT:i===an.UINT8&&(s=Ke.UNSIGNED_BYTE);let a;n===1?a=e.webgl2?at.RED:at.LUMINANCE:n===2?a=e.webgl2?at.RG:at.LUMINANCE_ALPHA:n===3?a=at.RGB:n===4&&(a=at.RGBA);let c=512*1024*1024,d=128*1024*1024;o=Math.min(y(o,d),c);let u=Mt.maximumTextureSize,m=an.getSizeInBytes(i),p=Math.floor(o/(n*m)),g=Math.min(u,X.previousPowerOfTwo(Math.floor(Math.sqrt(p)))),f=Math.ceil(Math.sqrt(t.x)),x=Math.ceil(t.z/f),_=f*t.x,C=x*t.y,V=Math.floor(g/_),Z=Math.floor(g/C);if(V===0||Z===0)throw new ue("Tileset is too large to fit into megatexture");this.channelCount=n,this.componentType=i,this.voxelCountPerTile=h.clone(t,new h),this.maximumTileCount=V*Z,this.regionCountPerMegatexture=new D(V,Z),this.voxelCountPerRegion=new D(_,C),this.sliceCountPerRegion=new D(f,x),this.voxelSizeUv=new D(1/g,1/g),this.sliceSizeUv=new D(t.x/g,t.y/g),this.regionSizeUv=new D(_/g,C/g),this.texture=new Et({context:e,pixelFormat:a,pixelDatatype:s,flipY:!1,width:g,height:g,sampler:new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.LINEAR,magnificationFilter:di.LINEAR})});let R=an.toComponentDatatype(i);this.tileVoxelDataTemp=Q.createTypedArray(R,_*C*n),this.nodes=new Array(this.maximumTileCount);for(let G=0;G<this.maximumTileCount;G++)this.nodes[G]=new Ppt(G);for(let G=0;G<this.maximumTileCount;G++){let W=this.nodes[G];W.previousNode=G>0?this.nodes[G-1]:void 0,W.nextNode=G<this.maximumTileCount-1?this.nodes[G+1]:void 0}this.occupiedList=void 0,this.emptyList=this.nodes[0],this.occupiedCount=0}function Ppt(e){this.index=e,this.nextNode=void 0,this.previousNode=void 0}Sy.prototype.add=function(e){if(this.isFull())throw new fe("Trying to add when there are no empty spots");let t=this.emptyList;this.emptyList=this.emptyList.nextNode,l(this.emptyList)&&(this.emptyList.previousNode=void 0),t.nextNode=this.occupiedList,l(t.nextNode)&&(t.nextNode.previousNode=t),this.occupiedList=t;let n=t.index;return this.writeDataToTexture(n,e),this.occupiedCount++,n};Sy.prototype.remove=function(e){if(e<0||e>=this.maximumTileCount)throw new fe("Megatexture index out of bounds");let t=this.nodes[e];l(t.previousNode)&&(t.previousNode.nextNode=t.nextNode),l(t.nextNode)&&(t.nextNode.previousNode=t.previousNode),t.nextNode=this.emptyList,l(t.nextNode)&&(t.nextNode.previousNode=t),t.previousNode=void 0,this.emptyList=t,this.occupiedCount--};Sy.prototype.isFull=function(){return this.emptyList===void 0};Sy.getApproximateTextureMemoryByteLength=function(e,t,n,i){i===an.UNSIGNED_SHORT&&(i=an.FLOAT32);let o=an.getSizeInBytes(i),r=e*t.x*t.y*t.z,s=Math.ceil(Math.sqrt(t.x)),a=Math.ceil(t.z/s),c=s*t.x,d=a*t.y,u=X.previousPowerOfTwo(Math.floor(Math.sqrt(r)));for(;;){let p=Math.floor(u/c),g=Math.floor(u/d);if(p*g>=e)break;u*=2}return u*u*n*o};Sy.prototype.writeDataToTexture=function(e,t){let n=t.constructor===Uint16Array?new Float32Array(t):t,i=this.voxelCountPerTile,o=this.sliceCountPerRegion,r=this.voxelCountPerRegion,s=this.channelCount,a=this.tileVoxelDataTemp;for(let x=0;x<i.z;x++){let _=x%o.x*i.x,C=Math.floor(x/o.x)*i.y;for(let V=0;V<i.y;V++)for(let Z=0;Z<i.x;Z++){let R=x*i.y*i.x+V*i.x+Z,G=(C+V)*r.x+(_+Z);for(let W=0;W<s;W++)a[G*s+W]=n[R*s+W]}}let c=this.regionCountPerMegatexture,d=r.x,u=r.y,m=e%c.x*r.x,p=Math.floor(e/c.x)*r.y,f={source:{arrayBufferView:a,width:d,height:u},xOffset:m,yOffset:p};this.texture.copyFrom(f)};Sy.prototype.isDestroyed=function(){return!1};Sy.prototype.destroy=function(){return this.texture=this.texture&&this.texture.destroy(),me(this)};var JV=Sy;var VNi=S(T(),1);function om(e,t,n,i,o,r,s){this.children=void 0,this.parent=o,this.level=e,this.x=t,this.y=n,this.z=i,this.dimensions=h.clone(s),this.keyframeNodes=[],this.renderableKeyframeNodes=[],this.renderableKeyframeNodeLerp=0,this.renderableKeyframeNodePrevious=void 0,this.renderableKeyframeNodeNext=void 0,this.orientedBoundingBox=new Gn,this.approximateVoxelSize=0,this.screenSpaceError=0,this.visitedFrameNumber=-1,this.computeBoundingVolumes(r)}var vpt=new h;om.prototype.computeBoundingVolumes=function(e){this.orientedBoundingBox=e.computeOrientedBoundingBoxForTile(this.level,this.x,this.y,this.z,this.orientedBoundingBox);let t=$.getScale(this.orientedBoundingBox.halfAxes,vpt),n=2*h.maximumComponent(t);this.approximateVoxelSize=n/h.minimumComponent(this.dimensions)};om.prototype.constructChildNodes=function(e){let{level:t,x:n,y:i,z:o}=this,r=n*2,s=i*2,a=o*2,c=s+1,d=r+1,u=a+1,m=t+1,p=[[m,r,s,a],[m,d,s,a],[m,r,c,a],[m,d,c,a],[m,r,s,u],[m,d,s,u],[m,r,c,u],[m,d,c,u]];this.children=p.map(([g,f,x,_])=>new om(g,f,x,_,this,e,this.dimensions))};om.prototype.visibility=function(e,t){let n=this.orientedBoundingBox;return e.cullingVolume.computeVisibilityWithPlaneMask(n,t)};om.prototype.computeScreenSpaceError=function(e,t){let n=this.orientedBoundingBox,i=Math.sqrt(n.distanceSquaredTo(e));i=Math.max(i,X.EPSILON7);let o=this.approximateVoxelSize,r=t*(o/i);this.screenSpaceError=r};var L_e={keyframe:0};function _9(e,t){return L_e.keyframe=e,Lo(t,L_e,Hi.searchComparator)}om.prototype.computeSurroundingRenderableKeyframeNodes=function(e){let t=this,n=t.level,i=Math.floor(e),o=Math.ceil(e),r,s,a=+Number.MAX_VALUE,c=+Number.MAX_VALUE;for(;l(t);){let{renderableKeyframeNodes:m}=t;if(m.length>=1){let p=wpt(i,m),g=m[p],f=o===i||i<g.keyframe?p:Math.min(p+1,m.length-1),x=m[f],_=i-g.keyframe,C=R_e(n-t.level,_);C<a&&(a=C,r=g);let V=x.keyframe-o,Z=R_e(n-t.level,V);if(Z<c&&(c=Z,s=x),_===0&&V===0)break}t=t.parent}if(this.renderableKeyframeNodePrevious=r,this.renderableKeyframeNodeNext=s,!l(r)||!l(s))return;let d=r.keyframe,u=s.keyframe;this.renderableKeyframeNodeLerp=d===u?0:X.clamp((e-d)/(u-d),0,1)};function wpt(e,t){let n=_9(e,t);return n<0?X.clamp(~n-1,0,t.length-1):n}function R_e(e,t){let n=Math.exp(e*4),i=t>=0?1:-200;return e*n+t*i}om.prototype.isVisited=function(e){return this.visitedFrameNumber===e};om.prototype.createKeyframeNode=function(e){let t=_9(e,this.keyframeNodes);if(t<0){t=~t;let n=new Hi(this,e);this.keyframeNodes.splice(t,0,n)}};om.prototype.destroyKeyframeNode=function(e,t){let n=e.keyframe,i=_9(n,this.keyframeNodes);if(i<0)throw new fe("Keyframe node does not exist.");if(this.keyframeNodes.splice(i,1),e.megatextureIndex!==-1){for(let r=0;r<t.length;r++)t[r].remove(e.megatextureIndex);let o=_9(n,this.renderableKeyframeNodes);if(o<0)throw new fe("Renderable keyframe node does not exist.");this.renderableKeyframeNodes.splice(o,1)}e.spatialNode=void 0,e.state=Hi.LoadState.UNLOADED,e.metadata={},e.megatextureIndex=-1,e.priority=-Number.MAX_VALUE,e.highPriorityFrameNumber=-1};om.prototype.addKeyframeNodeToMegatextures=function(e,t){if(e.state!==Hi.LoadState.RECEIVED||e.megatextureIndex!==-1||e.metadata.length!==t.length)throw new fe("Keyframe node cannot be added to megatexture");for(let o=0;o<t.length;o++){let r=t[o];e.megatextureIndex=r.add(e.metadata[o])}e.state=Hi.LoadState.LOADED;let n=this.renderableKeyframeNodes,i=_9(e.keyframe,n);if(i>=0)throw new fe("Keyframe already renderable");i=~i,n.splice(i,0,e)};om.prototype.isRenderable=function(e){let t=this.renderableKeyframeNodePrevious,n=this.renderableKeyframeNodeNext,i=this.level;return l(t)&&l(n)&&(t.spatialNode.level===i||n.spatialNode.level===i)&&this.visitedFrameNumber===e};var S9=om;function s0(e,t,n,i,o,r,s){this._primitive=e,this.megatextures=new Array(i.length);for(let f=0;f<i.length;f++){let x=i[f],_=Kt.getComponentCount(x),C=o[f];this.megatextures[f]=new JV(t,n,_,C,s)}let a=this.megatextures[0].maximumTileCount;this._simultaneousRequestCount=0,this._debugPrint=!1,this._frameNumber=0;let c=e._shape;this.rootNode=new S9(0,0,0,0,void 0,c,n),this._priorityQueue=new kS({maximumLength:a,comparator:Hi.priorityComparator}),this._highPriorityKeyframeNodes=new Array(a),this._keyframeNodesInMegatexture=new Array(a),this._keyframeCount=r,this._sampleCount=void 0,this._keyframeLocation=0,this._binaryTreeKeyframeWeighting=new Array(r);let d=this._binaryTreeKeyframeWeighting;d[0]=0,d[r-1]=0,zj(d,1,r-2,0);let u=9,m=2048,p=Math.floor(m/u),g=Math.ceil(a/p);this.internalNodeTexture=new Et({context:t,pixelFormat:at.RGBA,pixelDatatype:Ke.UNSIGNED_BYTE,flipY:!1,width:m,height:g,sampler:new rn({minificationFilter:on.NEAREST,magnificationFilter:di.NEAREST})}),this.internalNodeTilesPerRow=p,this.internalNodeTexelSizeUv=new D(1/m,1/g),this.leafNodeTexture=void 0,this.leafNodeTilesPerRow=void 0,this.leafNodeTexelSizeUv=new D}s0.prototype.findKeyframeNode=function(e){return this._keyframeNodesInMegatexture.find(function(t){return t.megatextureIndex===e})};function zj(e,t,n,i){if(t>n)return;let o=Math.floor((t+n)/2);e[o]=i,zj(e,t,o-1,i+1),zj(e,o+1,n,i+1)}s0.simultaneousRequestCountMaximum=50;s0.prototype.update=function(e,t,n,i){let o=this._primitive,r=e.context,s=this.megatextures[0].maximumTileCount,a=this._keyframeCount,c=o._levelBlendFactor,d=c>0,u=a>1,m=(d?2:1)*(u?2:1);this._sampleCount=m;let p=m>=2;if(p&&!l(this.leafNodeTexture)){let V=Math.floor(512),Z=Math.ceil(s/V);this.leafNodeTexture=new Et({context:r,pixelFormat:at.RGBA,pixelDatatype:Ke.UNSIGNED_BYTE,flipY:!1,width:1024,height:Z,sampler:new rn({minificationFilter:on.NEAREST,magnificationFilter:di.NEAREST})}),this.leafNodeTexelSizeUv=D.fromElements(1/1024,1/Z,this.leafNodeTexelSizeUv),this.leafNodeTilesPerRow=V}else!p&&l(this.leafNodeTexture)&&(this.leafNodeTexture=this.leafNodeTexture.destroy());if(this._keyframeLocation=X.clamp(t,0,a-1),n&&G_e(this,this.rootNode),i)return;this._frameNumber=e.frameNumber;let g=gi();Mpt(this,e);let f=gi();kpt(this,m,c);let x=gi();if(this._debugPrint){let _=f-g,C=x-f,V=x-g;Upt(this,_,C,V)}};s0.prototype.isRenderable=function(e){return e.isRenderable(this._frameNumber)};s0.prototype.isDestroyed=function(){return!1};s0.prototype.destroy=function(){let e=this.megatextures,t=e.length;for(let n=0;n<t;n++)e[n]=e[n]&&e[n].destroy();return this.internalNodeTexture=this.internalNodeTexture&&this.internalNodeTexture.destroy(),this.leafNodeTexture=this.leafNodeTexture&&this.leafNodeTexture.destroy(),me(this)};function G_e(e,t){if(t.computeBoundingVolumes(e._primitive._shape),l(t.children))for(let n=0;n<8;n++){let i=t.children[n];G_e(e,i)}}function Fpt(e,t){if(e._simultaneousRequestCount>=s0.simultaneousRequestCountMaximum)return;let n=e._primitive._provider;function i(c){e._simultaneousRequestCount--;let d=n.types.length;if(!l(c))t.state=Hi.LoadState.UNAVAILABLE;else if(c===Hi.LoadState.FAILED)t.state=Hi.LoadState.FAILED;else if(!Array.isArray(c)||c.length!==d)t.state=Hi.LoadState.FAILED;else{let u=e.megatextures;for(let m=0;m<d;m++){let{voxelCountPerTile:p,channelCount:g}=u[m],{x:f,y:x,z:_}=p,C=f*x*_,V=c[m],Z=C*g;if(V.length===Z)t.metadata[m]=V,t.state=Hi.LoadState.RECEIVED;else{t.state=Hi.LoadState.FAILED;break}}}}function o(){e._simultaneousRequestCount--,t.state=Hi.LoadState.FAILED}let{keyframe:r,spatialNode:s}=t,a=n.requestData({tileLevel:s.level,tileX:s.x,tileY:s.y,tileZ:s.z,keyframe:r});l(a)?(e._simultaneousRequestCount++,t.state=Hi.LoadState.RECEIVING,a.then(i).catch(o)):t.state=Hi.LoadState.FAILED}function Apt(e){return e/(1+e)}function Mpt(e,t){let n=e._frameNumber,i=e._primitive,o=i._shape,r=i.screenSpaceError,s=e._priorityQueue,a=e._keyframeCount,c=X.clamp(Math.floor(e._keyframeLocation),0,a-2),d=c+1,{camera:u,context:m,pixelRatio:p}=t,{positionWC:g,frustum:f}=u,_=m.drawingBufferHeight/p/f.sseDenominator;function C(M,b){if(M.computeScreenSpaceError(g,_),b=M.visibility(t,b),b===ss.MASK_OUTSIDE)return;if(M.visitedFrameNumber=n,a===1)M.createKeyframeNode(0);else if(M.keyframeNodes.length!==a)for(let N=0;N<a;N++)M.createKeyframeNode(N);let{screenSpaceError:L,keyframeNodes:E}=M,I=Apt(L),w=!1;for(let N=0;N<E.length;N++){let B=E[N];B.priority=10*I+Npt(c,B.keyframe,d,e),B.state!==Hi.LoadState.UNAVAILABLE&&B.state!==Hi.LoadState.FAILED&&B.priority!==-Number.MAX_VALUE&&s.insert(B),B.state===Hi.LoadState.LOADED&&(w=!0)}if(L<r||!w){M.children=void 0;return}l(M.children)||M.constructChildNodes(o);for(let N=0;N<8;N++){let B=M.children[N];C(B,b)}}s.reset(),C(e.rootNode,ss.MASK_INDETERMINATE);let V=e._highPriorityKeyframeNodes,Z=0,R;for(;s.length>0;)R=s.removeMaximum(),R.highPriorityFrameNumber=n,V[Z]=R,Z++;let G=e._keyframeNodesInMegatexture,W=e.megatextures[0],v=W.occupiedCount;G.length=v,G.sort(function(M,b){return M.highPriorityFrameNumber===b.highPriorityFrameNumber?b.priority-M.priority:b.highPriorityFrameNumber-M.highPriorityFrameNumber});let P=0,F=0;for(let M=0;M<Z;M++)if(R=V[M],!(R.state===Hi.LoadState.LOADED||R.spatialNode===void 0)&&(R.state===Hi.LoadState.UNLOADED&&Fpt(e,R),R.state===Hi.LoadState.RECEIVED)){let b=0;if(W.isFull()){b=v-1-P,P++;let L=G[b];L.spatialNode.destroyKeyframeNode(L,e.megatextures)}else b=v+F,F++;R.spatialNode.addKeyframeNodeToMegatextures(R,e.megatextures),G[b]=R}}function Npt(e,t,n,i){let o=Math.min(Math.abs(t-e),Math.abs(t-n)),r=Math.max(e,i._keyframeCount-n-1,1),s=Math.pow(1-o/r,4),a=Math.exp(-i._binaryTreeKeyframeWeighting[t]);return X.lerp(a,s,.15+.85*s)}function Upt(e,t,n,i){let o=e._keyframeCount,r=e.rootNode,s=Object.keys(Hi.LoadState).length,a=new Array(s),c=new Array(s),d=0;for(let C=0;C<s;C++){let V=new Array(o);a[C]=V;for(let Z=0;Z<o;Z++)V[Z]=0;c[C]=0}function u(C){let V=C.keyframeNodes;for(let Z=0;Z<V.length;Z++){let R=V[Z],G=R.keyframe,W=R.state;a[W][G]+=1,c[W]+=1,d++}if(l(C.children))for(let Z=0;Z<8;Z++){let R=C.children[Z];u(R)}}u(r);let m=`KEYFRAMES: ${a[Hi.LoadState.LOADED]}`,p=`UNLOADED: ${c[Hi.LoadState.UNLOADED]} | RECEIVING: ${c[Hi.LoadState.RECEIVING]} | RECEIVED: ${c[Hi.LoadState.RECEIVED]} | LOADED: ${c[Hi.LoadState.LOADED]} | FAILED: ${c[Hi.LoadState.FAILED]} | UNAVAILABLE: ${c[Hi.LoadState.UNAVAILABLE]} | TOTAL: ${d}`,g=Math.round(t*100)/100,f=Math.round(n*100)/100,x=Math.round(i*100)/100,_=`LOAD: ${g} | OCT: ${f} | ALL: ${x}`;console.log(`${m} || ${p} || ${_}`)}var mB={INTERNAL:0,LEAF:1,PACKED_LEAF_FROM_PARENT:2};function kpt(e,t,n){let i=e._primitive._screenSpaceError,o=e._keyframeLocation,r=e._frameNumber,s=t>=2,a=0,c=0,d=[],u=[];function m(g,f,x,_,C){let V=!1;if(l(g.children))for(let Z=0;Z<8;Z++){let R=g.children[Z];R.computeSurroundingRenderableKeyframeNodes(o),R.isRenderable(r)&&(V=!0)}if(V){d[C]=mB.INTERNAL<<16|f,d[x]=_,a++,_=f,C=_*9+1;for(let Z=0;Z<8;Z++){let R=g.children[Z];f=a,x=f*9+0,m(R,f,x,_,C+Z)}}else{if(s){let Z=c*5,R=g.renderableKeyframeNodePrevious,G=g.level-R.spatialNode.level,W=R.spatialNode.parent,v=l(W)?W.renderableKeyframeNodePrevious:R,P=Dpt(g,i,n),F=G,M=1,b=R.megatextureIndex,L=v.megatextureIndex;u[Z+0]=P,u[Z+1]=F,u[Z+2]=M,u[Z+3]=b,u[Z+4]=L,d[C]=mB.LEAF<<16|c}else{let Z=g.renderableKeyframeNodePrevious,G=g.level-Z.spatialNode.level===0?mB.LEAF:mB.PACKED_LEAF_FROM_PARENT;d[C]=G<<16|Z.megatextureIndex}c++}}let p=e.rootNode;p.computeSurroundingRenderableKeyframeNodes(o),p.isRenderable(r)&&m(p,0,0,0,0),Bpt(d,9,e.internalNodeTilesPerRow,e.internalNodeTexture),s&&Ypt(u,2,e.leafNodeTilesPerRow,e.leafNodeTexture)}function Dpt(e,t,n){if(e.parent===void 0)return 0;let i=e.screenSpaceError,o=e.parent.screenSpaceError,s=((t-i)/(o-i)+n-1)/n;return X.clamp(s,0,1)}function Bpt(e,t,n,i){let o=at.componentsLength(i.pixelFormat),r=Math.ceil(e.length/t),s=Math.max(1,t*Math.min(r,n)),a=Math.max(1,Math.ceil(r/n)),c=new Uint8Array(s*a*o);for(let m=0;m<e.length;m++){let p=e[m],g=m*o;for(let f=0;f<o;f++)c[g+f]=p>>>f*8&255}let u={source:{arrayBufferView:c,width:s,height:a},xOffset:0,yOffset:0};i.copyFrom(u)}function Ypt(e,t,n,i){let o=at.componentsLength(i.pixelFormat),r=5,s=Math.ceil(e.length/r),a=Math.max(1,t*Math.min(s,n)),c=Math.max(1,Math.ceil(s/n)),d=new Uint8Array(a*c*o);for(let p=0;p<s;p++){let g=e[p*r+0],f=e[p*r+1],x=e[p*r+2],_=e[p*r+3],C=e[p*r+4],V=X.clamp(Math.floor(65536*g),0,65535);d[p*8+0]=V>>>0&255,d[p*8+1]=V>>>8&255,d[p*8+2]=f&255,d[p*8+3]=x&255,d[p*8+4]=_>>>0&255,d[p*8+5]=_>>>8&255,d[p*8+6]=C>>>0&255,d[p*8+7]=C>>>8&255}let m={source:{arrayBufferView:d,width:a,height:c},xOffset:0,yOffset:0};i.copyFrom(m)}s0.getApproximateTextureMemoryByteLength=function(e,t,n,i){let o=0,r=n.length;for(let s=0;s<r;s++){let a=n[s],c=i[s],d=Kt.getComponentCount(a);o+=JV.getApproximateTextureMemoryByteLength(e,t,d,c)}return o};var QV=s0;var f5i=S(T(),1);var ONi=S(T(),1),Opt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},jV=Object.freeze(Opt);var o5i=S(T(),1);var KNi=S(T(),1);function zpt(e,t,n){let i=new Uint8ClampedArray(e.buffer),o=new ImageData(i,t,n),r=document.createElement("canvas");return r.width=t,r.height=n,r.getContext("2d").putImageData(o,0,0),r}var T9=zpt;function qV(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}qV.prototype.getTexture=function(e){return this._textures[e]};function Kpt(e,t,n){n.resource.fetchImage().then(function(i){e._loadedImages.push({id:t,image:i,textureUniform:n})}).catch(function(){let i=e._textures[t];l(i)&&i!==e._defaultTexture&&i.destroy(),e._textures[t]=e._defaultTexture})}qV.prototype.loadTexture2D=function(e,t){l(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):Kpt(this,e,t)};function Hpt(e,t,n){let{id:i,textureUniform:o,image:r}=t,s=n.webgl2?hB(o,r,n):Jpt(o,r,n),a=e._textures[i];l(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function hB(e,t,n){let{typedArray:i,sampler:o}=e,r=l(i)?W_e(e,n):new Et({context:n,source:t,sampler:o});return E_e(o)&&r.generateMipmap(),r}function Jpt(e,t,n){let{typedArray:i,sampler:o}=e,r=E_e(o),s=o.wrapS===Cn.REPEAT||o.wrapS===Cn.MIRRORED_REPEAT||o.wrapT===Cn.REPEAT||o.wrapT===Cn.MIRRORED_REPEAT,{width:a,height:c}=l(i)?e:t,d=[a,c].every(X.isPowerOfTwo);if((r||s)&&!d)if(l(i)){if(e.pixelDatatype===Ke.UNSIGNED_BYTE){let m=T9(i,a,c),p=j0(m);return hB({sampler:o},p,n)}}else{let m=j0(t);return hB(e,m,n)}else return hB(e,t,n);return r?console.warn("Texture requires resizing for mipmaps but pixelDataType cannot be resized. The texture may be rendered incorrectly."):s&&console.warn("Texture requires resizing for wrapping but pixelDataType cannot be resized. The texture may be rendered incorrectly."),W_e(e,n)}function E_e(e){return[on.NEAREST_MIPMAP_NEAREST,on.NEAREST_MIPMAP_LINEAR,on.LINEAR_MIPMAP_NEAREST,on.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function W_e(e,t){let{pixelFormat:n,pixelDatatype:i,width:o,height:r,typedArray:s,sampler:a}=e;return new Et({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:s,width:o,height:r},sampler:a,flipY:!1})}qV.prototype.update=function(e){if(e.frameNumber===this._lastUpdatedFrame)return;this._lastUpdatedFrame=e.frameNumber;let t=e.context;this._defaultTexture=t.defaultTexture;let n=this._loadedImages;for(let i=0;i<n.length;i++){let o=n[i];Hpt(this,o,t)}n.length=0};qV.prototype.isDestroyed=function(){return!1};qV.prototype.destroy=function(){let e=this._textures;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];n!==this._defaultTexture&&n.destroy()}return me(this)};var C9=qV;function V9(e){e=y(e,y.EMPTY_OBJECT),this.mode=y(e.mode,jp.MODIFY_MATERIAL),this.lightingModel=e.lightingModel,this.uniforms=y(e.uniforms,y.EMPTY_OBJECT),this.varyings=y(e.varyings,y.EMPTY_OBJECT),this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.translucencyMode=y(e.translucencyMode,hg.INHERIT),this._textureManager=new C9,this._defaultTexture=void 0,this.uniformMap=Qpt(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},$pt(this),ebt(this)}function Qpt(e){let t=e.uniforms,n={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i];o.type===jV.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=jpt(e,i)):n[i]=qpt(e,i)}return n}function jpt(e,t){return function(){return y(e._textureManager.getTexture(t),e._defaultTexture)}}function qpt(e,t){return function(){return e.uniforms[t].value}}function DS(e,t,n){let i;for(;(i=t.exec(e))!==null;){let o=i[1];n[o]=!0}}function $pt(e){let t=/[vf]sInput\.attributes\.(\w+)/g,n=/[vf]sInput\.featureIds\.(\w+)/g,i=/[vf]sInput\.metadata.(\w+)/g,o,r=e.vertexShaderText;l(r)&&(o=e.usedVariablesVertex.attributeSet,DS(r,t,o),o=e.usedVariablesVertex.featureIdSet,DS(r,n,o),o=e.usedVariablesVertex.metadataSet,DS(r,i,o));let s=e.fragmentShaderText;if(l(s)){o=e.usedVariablesFragment.attributeSet,DS(s,t,o),o=e.usedVariablesFragment.featureIdSet,DS(s,n,o),o=e.usedVariablesFragment.metadataSet,DS(s,i,o);let a=/material\.(\w+)/g,c=e.usedVariablesFragment.materialSet;DS(s,a,c)}}function I_e(e){let t=/^.*MC$/,n=/^.*WC$/,i=/^.*EC$/;return t.test(e)?`${e} (model coordinates)`:n.test(e)?`${e} (Cartesian world coordinates)`:i.test(e)?`${e} (eye coordinates)`:e}function Vc(e,t,n,i){if(e.hasOwnProperty(t)){let o=`${I_e(t)} is not available in the ${i} shader. Did you mean ${I_e(n)} instead?`;throw new fe(o)}}function ebt(e){let t=e.usedVariablesVertex.attributeSet;Vc(t,"position","positionMC","vertex"),Vc(t,"normal","normalMC","vertex"),Vc(t,"tangent","tangentMC","vertex"),Vc(t,"bitangent","bitangentMC","vertex"),Vc(t,"positionWC","positionMC","vertex"),Vc(t,"positionEC","positionMC","vertex"),Vc(t,"normalEC","normalMC","vertex"),Vc(t,"tangentEC","tangentMC","vertex"),Vc(t,"bitangentEC","bitangentMC","vertex");let n=e.usedVariablesFragment.attributeSet;Vc(n,"position","positionEC","fragment"),Vc(n,"normal","normalEC","fragment"),Vc(n,"tangent","tangentEC","fragment"),Vc(n,"bitangent","bitangentEC","fragment"),Vc(n,"normalMC","normalEC","fragment"),Vc(n,"tangentMC","tangentEC","fragment"),Vc(n,"bitangentMC","bitangentEC","fragment")}V9.prototype.setUniform=function(e,t){let n=this.uniforms[e];n.type===jV.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):l(t.clone)?n.value=t.clone(n.value):n.value=t};V9.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)};V9.prototype.isDestroyed=function(){return!1};V9.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),me(this)};var BS=V9;function Qf(e){e=y(e,y.EMPTY_OBJECT),this._ready=!1,this._provider=y(e.provider,Qf.DefaultProvider),this._traversal=void 0,this._shape=void 0,this._shapeVisible=!1,this._paddingBefore=new h,this._paddingAfter=new h,this._minBounds=new h,this._minBoundsOld=new h,this._maxBounds=new h,this._maxBoundsOld=new h,this._exaggeratedMinBounds=new h,this._exaggeratedMinBoundsOld=new h,this._exaggeratedMaxBounds=new h,this._exaggeratedMaxBoundsOld=new h,this._minClippingBounds=new h,this._minClippingBoundsOld=new h,this._maxClippingBounds=new h,this._maxClippingBoundsOld=new h,this._clippingPlanes=void 0,this._clippingPlanesState=0,this._clippingPlanesEnabled=!1,this._modelMatrix=A.clone(y(e.modelMatrix,A.IDENTITY)),this._exaggeratedModelMatrix=A.clone(this._modelMatrix),this._compoundModelMatrix=new A,this._compoundModelMatrixOld=new A,this._customShader=y(e.customShader,Qf.DefaultCustomShader),this._customShaderCompilationEvent=new ge,this._shaderDirty=!0,this._drawCommand=void 0,this._drawCommandPick=void 0,this._pickId=void 0,this._clock=e.clock,this._transformPositionWorldToUv=new A,this._transformPositionUvToWorld=new A,this._transformDirectionWorldToLocal=new $,this._transformNormalLocalToWorld=new $,this._jitter=!1,this._nearestSampling=!1,this._levelBlendFactor=0,this._stepSizeMultiplier=1,this._depthTest=!0,this._useLogDepth=void 0,this._screenSpaceError=4,this._debugPolylines=new Dm,this._debugDraw=!1,this._disableRender=!1,this._disableUpdate=!1,this._uniforms={octreeInternalNodeTexture:void 0,octreeInternalNodeTilesPerRow:0,octreeInternalNodeTexelSizeUv:new D,octreeLeafNodeTexture:void 0,octreeLeafNodeTilesPerRow:0,octreeLeafNodeTexelSizeUv:new D,megatextureTextures:[],megatextureSliceDimensions:new D,megatextureTileDimensions:new D,megatextureVoxelSizeUv:new D,megatextureSliceSizeUv:new D,megatextureTileSizeUv:new D,dimensions:new h,paddingBefore:new h,paddingAfter:new h,transformPositionViewToUv:new A,transformPositionUvToView:new A,transformDirectionViewToLocal:new $,transformNormalLocalToWorld:new $,cameraPositionUv:new h,ndcSpaceAxisAlignedBoundingBox:new se,clippingPlanesTexture:void 0,clippingPlanesMatrix:new A,stepSize:0,pickColor:new Y},this._shapeDefinesOld={},this._uniformMap={};let t=this._uniforms,n=this._uniformMap;for(let o in t)if(t.hasOwnProperty(o)){let r=`u_${o}`;n[r]=function(){return t[o]}}let i=this._provider;tbt(this,i)}function tbt(e,t){let{shape:n,minBounds:i=Ii.getMinBounds(n),maxBounds:o=Ii.getMaxBounds(n)}=t;e.minBounds=i,e.maxBounds=o,e.minClippingBounds=Ii.getMinBounds(n),e.maxClippingBounds=Ii.getMaxBounds(n),e._exaggeratedMinBounds=h.clone(e._minBounds,e._exaggeratedMinBounds),e._exaggeratedMaxBounds=h.clone(e._maxBounds,e._exaggeratedMaxBounds),e._exaggeratedModelMatrix=A.clone(e._modelMatrix,e._exaggeratedModelMatrix),P_e(e,t);let r=Ii.getShapeConstructor(n);e._shape=new r,e._shapeVisible=v_e(e,e._shape,t)}Object.defineProperties(Qf.prototype,{ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}},boundingSphere:{get:function(){return this._shape.boundingSphere}},orientedBoundingBox:{get:function(){return this._shape.orientedBoundingBox}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=A.clone(e,this._modelMatrix)}},shape:{get:function(){return this._provider.shape}},dimensions:{get:function(){return this._provider.dimensions}},minimumValues:{get:function(){return this._provider.minimumValues}},maximumValues:{get:function(){return this._provider.maximumValues}},show:{get:function(){return!this._disableRender},set:function(e){this._disableRender=!e}},disableUpdate:{get:function(){return this._disableUpdate},set:function(e){this._disableUpdate=e}},debugDraw:{get:function(){return this._debugDraw},set:function(e){this._debugDraw=e}},depthTest:{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._shaderDirty=!0)}},jitter:{get:function(){return this._jitter},set:function(e){this._jitter!==e&&(this._jitter=e,this._shaderDirty=!0)}},nearestSampling:{get:function(){return this._nearestSampling},set:function(e){this._nearestSampling!==e&&(this._nearestSampling=e,this._shaderDirty=!0)}},levelBlendFactor:{get:function(){return this._levelBlendFactor},set:function(e){this._levelBlendFactor=X.clamp(e,0,1)}},screenSpaceError:{get:function(){return this._screenSpaceError},set:function(e){this._screenSpaceError=e}},stepSize:{get:function(){return this._stepSizeMultiplier},set:function(e){this._stepSizeMultiplier=e}},minBounds:{get:function(){return this._minBounds},set:function(e){this._minBounds=h.clone(e,this._minBounds)}},maxBounds:{get:function(){return this._maxBounds},set:function(e){this._maxBounds=h.clone(e,this._maxBounds)}},minClippingBounds:{get:function(){return this._minClippingBounds},set:function(e){this._minClippingBounds=h.clone(e,this._minClippingBounds)}},maxClippingBounds:{get:function(){return this._maxClippingBounds},set:function(e){this._maxClippingBounds=h.clone(e,this._maxClippingBounds)}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){as.setOwner(e,this,"_clippingPlanes")}},customShader:{get:function(){return this._customShader},set:function(e){if(this._customShader!==e){let t=this._uniformMap,i=this._customShader.uniformMap;for(let o in i)i.hasOwnProperty(o)&&delete t[o];l(e)?this._customShader=e:this._customShader=Qf.DefaultCustomShader,this._shaderDirty=!0}}},customShaderCompilationEvent:{get:function(){return this._customShaderCompilationEvent}}});var nbt=new h,ibt=new se,obt=new se,rbt=new h,sbt=new h,abt=new $,cbt=new $,lbt=new A,dbt=new A,ubt=new A,mbt=A.fromRotationTranslation($.fromUniformScale(.5,new $),new h(.5,.5,.5),new A),hbt=A.fromRotationTranslation($.fromUniformScale(2,new $),new h(-1,-1,-1),new A);Qf.prototype.update=function(e){let t=this._provider;this._customShader.update(e);let n=e.context;if(!this._ready){xbt(this,t,n),e.afterRender.push(()=>(this._ready=!0,!0));return}gbt(this,e);let i=P_e(this,t),o=this._shape;if(i&&(this._shapeVisible=v_e(this,o,t),Tbt(this,o)&&(this._shaderDirty=!0)),!this._shapeVisible)return;let r=Cbt(t.timeIntervalCollection,this._clock),s=this._traversal,a=s._sampleCount;if(s.update(e,r,i,this._disableUpdate),a!==s._sampleCount&&(this._shaderDirty=!0),!s.isRenderable(s.rootNode)||(this._debugDraw&&Ibt(this,e),this._disableRender))return;this._useLogDepth!==e.useLogDepth&&(this._useLogDepth=e.useLogDepth,this._shaderDirty=!0),Vbt(this,e)&&(this._shaderDirty=!0);let d=s.leafNodeTexture,u=this._uniforms;l(d)&&(u.octreeLeafNodeTexture=s.leafNodeTexture,u.octreeLeafNodeTexelSizeUv=D.clone(s.leafNodeTexelSizeUv,u.octreeLeafNodeTexelSizeUv),u.octreeLeafNodeTilesPerRow=s.leafNodeTilesPerRow),this._shaderDirty&&(y9(this,n),this._shaderDirty=!1);let m=n.uniformState.viewProjection,p=o.orientedBoundingBox,g=Rbt(p,m,obt);if(g.x===1||g.y===1||g.z===-1||g.w===-1)return;u.ndcSpaceAxisAlignedBoundingBox=se.clone(g,u.ndcSpaceAxisAlignedBoundingBox);let x=n.uniformState.inverseView;u.transformPositionViewToUv=A.multiplyTransformation(this._transformPositionWorldToUv,x,u.transformPositionViewToUv);let _=n.uniformState.view;u.transformPositionUvToView=A.multiplyTransformation(_,this._transformPositionUvToWorld,u.transformPositionUvToView);let C=n.uniformState.inverseViewRotation;u.transformDirectionViewToLocal=$.multiply(this._transformDirectionWorldToLocal,C,u.transformDirectionViewToLocal),u.transformNormalLocalToWorld=$.clone(this._transformNormalLocalToWorld,u.transformNormalLocalToWorld);let V=e.camera.positionWC;u.cameraPositionUv=A.multiplyByPoint(this._transformPositionWorldToUv,V,u.cameraPositionUv),u.stepSize=this._stepSizeMultiplier;let Z=e.passes.pick?this._drawCommandPick:e.passes.pickVoxel?this._drawCommandPickVoxel:this._drawCommand;Z.boundingVolume=o.boundingSphere,e.commandList.push(Z)};var fbt=new h,Kj=new h,pbt=new he,bbt=new h;function gbt(e,t){if(e._exaggeratedMinBounds=h.clone(e._minBounds,e._exaggeratedMinBounds),e._exaggeratedMaxBounds=h.clone(e._maxBounds,e._exaggeratedMaxBounds),e.shape===Ii.ELLIPSOID){let n=t.verticalExaggerationRelativeHeight,i=t.verticalExaggeration;e._exaggeratedMinBounds.z=(e._minBounds.z-n)*i+n,e._exaggeratedMaxBounds.z=(e._maxBounds.z-n)*i+n}else if(e.shape===Ii.BOX){let n=h.fromElements(1,1,t.verticalExaggeration,fbt);e._exaggeratedModelMatrix=A.multiplyByScale(e._modelMatrix,n,e._exaggeratedModelMatrix),e._exaggeratedModelMatrix=A.multiplyByTranslation(e._exaggeratedModelMatrix,ybt(e,t),e._exaggeratedModelMatrix)}}function ybt(e,t){let{shapeTransform:n=A.IDENTITY,globalTransform:i=A.IDENTITY}=e._provider,o=A.getTranslation(n,Kj),r=A.multiplyByPoint(e._modelMatrix,o,Kj),s=A.multiplyByPoint(i,r,Kj),c=te.WGS84.cartesianToCartographic(s,pbt),d=0;l(c)&&(d=c.height);let u=fr.getHeight(d,t.verticalExaggeration,t.verticalExaggerationRelativeHeight);return h.fromElements(0,0,(u-d)/t.verticalExaggeration,bbt)}function xbt(e,t,n){let i=e._uniforms;e._pickId=n.createPickId({primitive:e}),i.pickColor=Y.clone(e._pickId.color,i.pickColor);let{shaderDefines:o,shaderUniforms:r}=e._shape;e._shapeDefinesOld=Oe(o,!0);let s=e._uniformMap;for(let a in r)if(r.hasOwnProperty(a)){let c=`u_${a}`;s[c]=function(){return r[a]}}i.dimensions=h.clone(t.dimensions,i.dimensions),e._paddingBefore=h.clone(y(t.paddingBefore,h.ZERO),e._paddingBefore),i.paddingBefore=h.clone(e._paddingBefore,i.paddingBefore),e._paddingAfter=h.clone(y(t.paddingAfter,h.ZERO),e._paddingBefore),i.paddingAfter=h.clone(e._paddingAfter,i.paddingAfter),e._traversal=_bt(e,t,n),Sbt(e._traversal,i)}function P_e(e,t){let n=y(t.shapeTransform,A.IDENTITY),i=y(t.globalTransform,A.IDENTITY);return A.multiplyTransformation(i,e._exaggeratedModelMatrix,e._compoundModelMatrix),A.multiplyTransformation(e._compoundModelMatrix,n,e._compoundModelMatrix),YS(e,"_compoundModelMatrix","_compoundModelMatrixOld")+YS(e,"_minBounds","_minBoundsOld")+YS(e,"_maxBounds","_maxBoundsOld")+YS(e,"_exaggeratedMinBounds","_exaggeratedMinBoundsOld")+YS(e,"_exaggeratedMaxBounds","_exaggeratedMaxBoundsOld")+YS(e,"_minClippingBounds","_minClippingBoundsOld")+YS(e,"_maxClippingBounds","_maxClippingBoundsOld")>0}function YS(e,t,n){let i=e[t],o=e[n],r=!i.equals(o);return r&&i.clone(o),r?1:0}function v_e(e,t,n){if(!t.update(e._compoundModelMatrix,e._exaggeratedMinBounds,e._exaggeratedMaxBounds,e.minClippingBounds,e.maxClippingBounds))return!1;let o=t.shapeTransform,r=A.inverse(o,lbt),s=A.getRotation(o,abt),a=A.getScale(o,rbt),c=h.maximumComponent(a),d=h.divideByScalar(a,c,sbt),u=$.multiplyByScale(s,d,cbt);return e._transformPositionWorldToUv=A.multiplyTransformation(mbt,r,e._transformPositionWorldToUv),e._transformPositionUvToWorld=A.multiplyTransformation(o,hbt,e._transformPositionUvToWorld),e._transformDirectionWorldToLocal=A.getMatrix3(r,e._transformDirectionWorldToLocal),e._transformNormalLocalToWorld=$.inverseTranspose(u,e._transformNormalLocalToWorld),!0}function _bt(e,t,n){let i=h.clone(t.dimensions,nbt);h.add(i,e._paddingBefore,i),h.add(i,e._paddingAfter,i);let o=t.maximumTileCount,r=l(o)?QV.getApproximateTextureMemoryByteLength(o,i,t.types,t.componentTypes):void 0,s=y(t.keyframeCount,1);return new QV(e,n,i,t.types,t.componentTypes,s,r)}function Sbt(e,t){t.octreeInternalNodeTexture=e.internalNodeTexture,t.octreeInternalNodeTexelSizeUv=D.clone(e.internalNodeTexelSizeUv,t.octreeInternalNodeTexelSizeUv),t.octreeInternalNodeTilesPerRow=e.internalNodeTilesPerRow;let n=e.megatextures,i=n[0],o=n.length;t.megatextureTextures=new Array(o);for(let r=0;r<o;r++)t.megatextureTextures[r]=n[r].texture;t.megatextureSliceDimensions=D.clone(i.sliceCountPerRegion,t.megatextureSliceDimensions),t.megatextureTileDimensions=D.clone(i.regionCountPerMegatexture,t.megatextureTileDimensions),t.megatextureVoxelSizeUv=D.clone(i.voxelSizeUv,t.megatextureVoxelSizeUv),t.megatextureSliceSizeUv=D.clone(i.sliceSizeUv,t.megatextureSliceSizeUv),t.megatextureTileSizeUv=D.clone(i.regionSizeUv,t.megatextureTileSizeUv)}function Tbt(e,t){let n=t.shaderDefines,i=Object.keys(n).some(o=>n[o]!==e._shapeDefinesOld[o]);return i&&(e._shapeDefinesOld=Oe(n,!0)),i}function Cbt(e,t){if(!l(e)||!l(t))return 0;let n=t.currentTime,i,o=e.indexOf(n);o>=0?i=e.get(o):(o=~o,o===e.length?(o=e.length-1,i=e.get(o),n=i.stop):(i=e.get(o),n=i.start));let r=ne.secondsDifference(i.stop,i.start),a=ne.secondsDifference(n,i.start)/r;return o+a}function Vbt(e,t){let n=e.clippingPlanes;if(!l(n))return!1;n.update(t);let{clippingPlanesState:i,enabled:o}=n;if(o){let r=e._uniforms;r.clippingPlanesTexture=n.texture,r.clippingPlanesMatrix=A.transpose(A.multiplyTransformation(A.inverse(n.modelMatrix,r.clippingPlanesMatrix),e._transformPositionUvToWorld,r.clippingPlanesMatrix),r.clippingPlanesMatrix)}return e._clippingPlanesState===i&&e._clippingPlanesEnabled===o?!1:(e._clippingPlanesState=i,e._clippingPlanesEnabled=o,!0)}Qf.prototype.isDestroyed=function(){return!1};Qf.prototype.destroy=function(){let e=this._drawCommand;l(e)&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());let t=this._drawCommandPick;return l(t)&&(t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),this._pickId=this._pickId&&this._pickId.destroy(),this._traversal=this._traversal&&this._traversal.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),me(this)};var X_e=new Array(new se(-1,-1,-1,1),new se(1,-1,-1,1),new se(-1,1,-1,1),new se(1,1,-1,1),new se(-1,-1,1,1),new se(1,-1,1,1),new se(-1,1,1,1),new se(1,1,1,1)),Zbt=new Array(1,2,4,0,3,5,0,3,6,1,2,7,0,5,6,1,4,7,2,4,7,3,5,6),Lbt=new Array(new se,new se,new se,new se,new se,new se,new se,new se);function Rbt(e,t,n){let i=A.fromRotationTranslation(e.halfAxes,e.center,dbt),o=A.multiply(t,i,ubt),r=+Number.MAX_VALUE,s=-Number.MAX_VALUE,a=+Number.MAX_VALUE,c=-Number.MAX_VALUE,d,u=Lbt,m=X_e.length;for(d=0;d<m;d++)A.multiplyByVector(o,X_e[d],u[d]);for(d=0;d<m;d++){let p=u[d];if(p.z>=-p.w){let g=p.x/p.w,f=p.y/p.w;r=Math.min(r,g),s=Math.max(s,g),a=Math.min(a,f),c=Math.max(c,f)}else for(let g=0;g<3;g++){let f=Zbt[d*3+g],x=u[f];if(x.z>=-x.w){let _=p.z+p.w,C=x.z+x.w,V=_/(_-C),Z=se.lerp(p,x,V,ibt),R=Z.x/Z.w,G=Z.y/Z.w;r=Math.min(r,R),s=Math.max(s,R),a=Math.min(a,G),c=Math.max(c,G)}}}return r=X.clamp(r,-1,1),a=X.clamp(a,-1,1),s=X.clamp(s,-1,1),c=X.clamp(c,-1,1),n=se.fromElements(r,a,s,c,n),n}var Hj=3e7,Gbt=new h(Hj,0,0),Ebt=new h(0,Hj,0),Wbt=new h(0,0,Hj);function Ibt(e,t){let n=e._traversal,i=e._debugPolylines;i.removeAll();function o(c,d,u,m){i.add({positions:[c,d],width:m,material:Mi.fromType("Color",{color:u})})}function r(c,d,u){let m=c.computeCorners();o(m[0],m[1],d,u),o(m[2],m[3],d,u),o(m[4],m[5],d,u),o(m[6],m[7],d,u),o(m[0],m[2],d,u),o(m[4],m[6],d,u),o(m[1],m[3],d,u),o(m[5],m[7],d,u),o(m[0],m[4],d,u),o(m[2],m[6],d,u),o(m[1],m[5],d,u),o(m[3],m[7],d,u)}function s(c){if(!n.isRenderable(c))return;let d=c.level,m=Math.max(1,5/Math.pow(2,d)),g=[Y.RED,Y.LIME,Y.BLUE][d%3];if(r(c.orientedBoundingBox,g,m),l(c.children))for(let f=0;f<8;f++)s(c.children[f])}r(e._shape.orientedBoundingBox,Y.WHITE,5),s(n.rootNode);let a=10;o(h.ZERO,Gbt,Y.RED,a),o(h.ZERO,Ebt,Y.LIME,a),o(h.ZERO,Wbt,Y.BLUE,a),i.update(t)}Qf.DefaultCustomShader=new BS({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) { material.diffuse = vec3(1.0); material.alpha = 1.0; -}`});function rTe(){this.ready=!0,this.shape=Xi.BOX,this.dimensions=new h(1,1,1),this.names=["data"],this.types=[zt.SCALAR],this.componentTypes=[an.FLOAT32],this.maximumTileCount=1}rTe.prototype.requestData=function(e){if(!((l(e)?y(e.tileLevel,0):0)>=1))return Promise.resolve([new Float32Array(1)])};qf.DefaultProvider=new rTe;var Iy=qf;var L3=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function mi(e){e=y(e,y.EMPTY_OBJECT);let t=e.canvas,n=e.creditContainer,i=e.creditViewport,o=Oe(e.contextOptions),r=l(n),s=new kv(t,o);r||(n=document.createElement("div"),n.style.position="absolute",n.style.bottom="0",n.style["text-shadow"]="0 0 2px #000000",n.style.color="#ffffff",n.style["font-size"]="10px",n.style["padding-right"]="5px",t.parentNode.appendChild(n)),l(i)||(i=t.parentNode),this._id=Bn(),this._jobScheduler=new CF,this._frameState=new TF(s,new fF(n," \u2022 ",i),this._jobScheduler),this._frameState.scene3DOnly=y(e.scene3DOnly,!1),this._removeCreditContainer=!r,this._creditContainer=n,this._canvas=t,this._context=s,this._computeEngine=new vv(s),this._globe=void 0,this._globeTranslucencyState=new SF,this._primitives=new Nl,this._groundPrimitives=new Nl,this._globeHeight=void 0,this._globeHeightDirty=!0,this._cameraUnderground=!1,this._removeUpdateHeightCallback=void 0,this._logDepthBuffer=mi.defaultLogDepthBuffer&&s.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new zT,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=y(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new gF(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new ii({color:new Y,stencil:0,owner:this}),this._depthClearCommand=new ii({depth:1,owner:this}),this._stencilClearCommand=new ii({stencil:0}),this._classificationStencilClearCommand=new ii({stencil:0,renderState:De.fromCache({stencilMask:Nt.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new o9(this),this._preUpdate=new ge,this._postUpdate=new ge,this._renderError=new ge,this._preRender=new ge,this._postRender=new ge,this._minimumDisableDepthTestDistance=0,this._debugInspector=new h9,this._msaaSamples=y(e.msaaSamples,1),this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new ge,this.morphComplete=new ge,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=Y.clone(Y.BLACK),this._mode=oe.SCENE3D,this._mapProjection=l(e.mapProjection)?e.mapProjection:new Si,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.atmosphere=new sF,this.fog=new _F,this._shadowMapCamera=new ao(this),this.shadowMap=new ob({context:s,lightCamera:this._shadowMapCamera,enabled:y(e.shadows,!1)}),this.invertClassification=!1,this.invertClassificationColor=Y.clone(Y.WHITE),this._actualInvertClassificationColor=Y.clone(this._invertClassificationColor),this._invertClassification=new eL,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new n9,this._brdfLutGenerator=new cF,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new c9(this),this._cameraUnderground=!1,this._mapMode2D=y(e.mapMode2D,Ql.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=y(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=y(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=Ha.requestCompletedEvent.addEventListener(L3(this)),this._removeTaskProcessorListenerCallback=pi.taskCompletedEvent.addEventListener(L3(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;let a=new He(0,0,s.drawingBufferWidth,s.drawingBufferHeight),c=new ao(this);this._logDepthBuffer&&(c.frustum.near=.1,c.frustum.far=1e10),this.preloadFlightCamera=new ao(this),this.preloadFlightCullingVolume=void 0,this._picking=new vF(this),this._defaultView=new kT(this,c,a),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this.light=new U0,lTe(this,0,te.now()),this.updateFrameState(),this.initializeFrame()}mi.defaultLogDepthBuffer=!0;function ugt(e,t){for(let i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;let n=[];l(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(L3(e))),n.push(t.terrainProviderChanged.addEventListener(L3(e)))),e._removeGlobeCallbacks=n}Object.defineProperties(mi.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return Mt.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return Mt.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return Lm.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,ugt(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(l(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(l(this.globe))return this.globe.terrainProvider},set:function(e){this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),l(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(l(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){e===oe.SCENE2D?this.morphTo2D(0):e===oe.SCENE3D?this.morphTo3D(0):e===oe.COLUMBUS_VIEW&&this.morphToColumbusView(0),this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},useWebVR:{get:function(){return this._useWebVR},set:function(e){this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new ao(this),l(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new xF(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},splitPosition:{get:function(){return this._frameState.splitPosition},set:function(e){this._frameState.splitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){let t=this._context,n=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=n!==this._hdr,this._hdr=n}},highDynamicRangeSupported:{get:function(){let e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},msaaSamples:{get:function(){return this._msaaSamples},set:function(e){e=Math.min(e,Mt.maximumSamples),this._msaaSamples=e}},msaaSupported:{get:function(){return this._context.msaa}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},opaqueFrustumNearOffset:{get:function(){return .9999}},globeHeight:{get:function(){return this._globeHeight}}});mi.prototype.getCompressedTextureFormatSupported=function(e){let t=this.context;return(e==="WEBGL_compressed_texture_s3tc"||e==="s3tc")&&t.s3tc||(e==="WEBGL_compressed_texture_pvrtc"||e==="pvrtc")&&t.pvrtc||(e==="WEBGL_compressed_texture_etc"||e==="etc")&&t.etc||(e==="WEBGL_compressed_texture_etc1"||e==="etc1")&&t.etc1||(e==="WEBGL_compressed_texture_astc"||e==="astc")&&t.astc||(e==="EXT_texture_compression_bptc"||e==="bc7")&&t.bc7};function sTe(e,t,n){let i=e._frameState,o=e._context,r=e._view.oit,s=i.shadowState.lightShadowMaps,a=i.shadowState.lightShadowsEnabled,c=t.derivedCommands;l(t.pickId)&&(c.picking=eb.createPickDerivedCommand(e,t,o,c.picking)),t.pickOnly||(c.depth=eb.createDepthOnlyDerivedCommand(e,t,o,c.depth)),c.originalCommand=t,e._hdr&&(c.hdr=eb.createHdrCommand(t,o,c.hdr),t=c.hdr.command,c=t.derivedCommands),a&&t.receiveShadows&&(c.shadows=ob.createReceiveDerivedCommand(s,t,n,o,c.shadows)),t.pass===Re.TRANSLUCENT&&l(r)&&r.isSupported()&&(a&&t.receiveShadows?(c.oit=l(c.oit)?c.oit:{},c.oit.shadows=r.createDerivedCommands(c.shadows.receiveCommand,o,c.oit.shadows)):c.oit=r.createDerivedCommands(t,o,c.oit))}mi.prototype.updateDerivedCommands=function(e){if(!l(e.derivedCommands))return;let t=this._frameState,n=this._context,i=!1,o=t.shadowState.lastDirtyTime;e.lastDirtyTime!==o&&(e.lastDirtyTime=o,e.dirty=!0,i=!0);let r=t.useLogDepth,s=this._hdr,a=e.derivedCommands,c=l(a.logDepth),d=l(a.hdr),u=l(a.originalCommand),m=r&&!c,p=s&&!d,g=(!r||!s)&&!u;if(e.dirty=e.dirty||m||p||g,e.dirty){e.dirty=!1;let f=t.shadowState.shadowMaps;t.shadowState.shadowsEnabled&&e.castShadows&&(a.shadows=ob.createCastDerivedCommand(f,e,i,n,a.shadows)),(c||m)&&(a.logDepth=eb.createLogDepthCommand(e,n,a.logDepth),sTe(this,a.logDepth.command,i)),(u||g)&&sTe(this,e,i)}};var mgt=new tm({pass:Io.RENDER}),B8=new tm({pass:Io.PRELOAD}),Y8=new tm({pass:Io.PRELOAD_FLIGHT}),hgt=new tm({pass:Io.REQUEST_RENDER_MODE_DEFER_CHECK}),aTe=new le,O8;function fgt(e){let t=e.globe;if(e._mode===oe.SCENE3D&&l(t)&&t.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent){let n=t.ellipsoid,i=e.frameState.minimumTerrainHeight;return aTe.radius=n.minimumRadius+i,O8=tw.fromBoundingSphere(aTe,e.camera.positionWC,O8),O8}}mi.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.pickVoxel=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1};function lTe(e,t,n){let i=e._frameState;i.frameNumber=t,i.time=te.clone(n,i.time)}mi.prototype.updateFrameState=function(){let e=this.camera,t=this._frameState;t.commandList.length=0,t.shadowMaps.length=0,t.brdfLutGenerator=this._brdfLutGenerator,t.environmentMap=this.skyBox&&this.skyBox._cubeMap,t.mode=this._mode,t.morphTime=this.morphTime,t.mapProjection=this.mapProjection,t.camera=e,t.cullingVolume=e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC),t.occluder=fgt(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof sn||this.camera.frustum instanceof Cr),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState;let{globe:n}=this;l(n)&&n._terrainExaggerationChanged&&(this.verticalExaggeration=n._terrainExaggeration,this.verticalExaggerationRelativeHeight=n._terrainExaggerationRelativeHeight,n._terrainExaggerationChanged=!1),t.verticalExaggeration=this.verticalExaggeration,t.verticalExaggerationRelativeHeight=this.verticalExaggerationRelativeHeight,l(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready?(t.specularEnvironmentMaps=this._specularEnvironmentMapAtlas.texture,t.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentMapAtlas.maximumMipmapLevel):(t.specularEnvironmentMaps=void 0,t.specularEnvironmentMapsMaximumLOD=void 0),t.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=Y.clone(this.invertClassificationColor,this._actualInvertClassificationColor),eL.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,l(this.globe)?t.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:t.maximumScreenSpaceError=2,this.clearPasses(t.passes),t.tilesetPassState=void 0};mi.prototype.isVisible=function(e,t,n){return l(e)&&(!l(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==Kt.OUTSIDE&&(!l(n)||!e.occlude||!e.boundingVolume.isOccluded(n)))};var V3=new M(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);V3=M.inverseTransformation(V3,V3);function pgt(e,t,n,i){let o=t._frameState,r=o.context,s=e.boundingVolume;l(t._debugVolume)&&t._debugVolume.destroy();let a,c=h.clone(s.center);if(o.mode!==oe.SCENE3D){c=M.multiplyByPoint(V3,c,c);let p=o.mapProjection,g=p.unproject(c);c=p.ellipsoid.cartographicToCartesian(g)}if(l(s.radius)){let p=s.radius;a=An.toWireframe(Us.createGeometry(new Us({radii:new h(p,p,p),vertexFormat:ln.FLAT_VERTEX_FORMAT}))),t._debugVolume=new En({geometryInstances:new St({geometry:a,modelMatrix:M.fromTranslation(c),attributes:{color:new Ht(1,0,0,1)}}),appearance:new ln({flat:!0,translucent:!1}),asynchronous:!1})}else{let p=s.halfAxes;a=An.toWireframe(gl.createGeometry(gl.fromDimensions({dimensions:new h(2,2,2),vertexFormat:ln.FLAT_VERTEX_FORMAT}))),t._debugVolume=new En({geometryInstances:new St({geometry:a,modelMatrix:M.fromRotationTranslation(p,c,new M),attributes:{color:new Ht(1,0,0,1)}}),appearance:new ln({flat:!0,translucent:!1}),asynchronous:!1})}let d=o.commandList,u=o.commandList=[];t._debugVolume.update(o),e=u[0],o.useLogDepth&&(e=eb.createLogDepthCommand(e,r).command);let m;l(i)&&(m=n.framebuffer,n.framebuffer=i),e.execute(r,n),l(m)&&(n.framebuffer=m),o.commandList=d}function Aa(e,t,n,i,o){let r=t._frameState;if(l(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof ii){e.execute(n,i);return}e.debugShowBoundingVolume&&l(e.boundingVolume)&&pgt(e,t,i,o),r.useLogDepth&&l(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command);let s=r.passes;if(!s.pick&&!s.pickVoxel&&!s.depth&&t._hdr&&l(e.derivedCommands)&&l(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),s.pick||s.depth){if(s.pick&&!s.depth&&l(e.derivedCommands.picking)){e=e.derivedCommands.picking.pickCommand,e.execute(n,i);return}else if(l(e.derivedCommands.depth)){e=e.derivedCommands.depth.depthOnlyCommand,e.execute(n,i);return}}if(t.debugShowCommands||t.debugShowFrustums){t._debugInspector.executeDebugShowFrustumsCommand(t,e,i);return}r.shadowState.lightShadowsEnabled&&e.receiveShadows&&l(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(n,i):e.execute(n,i)}function F9(e,t,n,i){let o=t._frameState,r=e.derivedCommands;l(r)&&(o.useLogDepth&&l(r.logDepth)&&(e=r.logDepth.command),r=e.derivedCommands,l(r.picking)?(e=r.picking.pickCommand,e.execute(n,i)):l(r.depth)&&(e=r.depth.depthOnlyCommand,e.execute(n,i)))}function dTe(e,t,n){return t.boundingVolume.distanceSquaredTo(n)-e.boundingVolume.distanceSquaredTo(n)}function bgt(e,t,n){return e.boundingVolume.distanceSquaredTo(n)-t.boundingVolume.distanceSquaredTo(n)+W.EPSILON12}function ggt(e,t,n,i,o){let r=e.context;H0(i,dTe,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,r,n);let s=i.length;for(let a=0;a<s;++a)t(i[a],e,r,n)}function ygt(e,t,n,i,o){let r=e.context;H0(i,bgt,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,r,n);let s=i.length;for(let a=0;a<s;++a)t(i[a],e,r,n)}function xgt(e,t,n,i){let o=e.context;H0(i,dTe,e.camera.positionWC);let r=i.length;for(let s=0;s<r;++s)t(i[s],e,o,n)}var _gt=new Ti,Tgt=new ol,Sgt=new sn,Cgt=new Cr;function z8(e,t){let{camera:n,context:i,frameState:o}=e,{uniformState:r}=i;r.updateCamera(n);let s;l(n.frustum.fov)?s=n.frustum.clone(_gt):l(n.frustum.infiniteProjectionMatrix)?s=n.frustum.clone(Tgt):l(n.frustum.width)?s=n.frustum.clone(Sgt):s=n.frustum.clone(Cgt),s.near=n.frustum.near,s.far=n.frustum.far,r.updateFrustum(s),r.updatePass(Re.ENVIRONMENT);let a=o.passes,c=a.pick||a.pickVoxel,d=e._environmentState,u=e._view,m=d.renderTranslucentDepthForPick,p=d.useWebVR;if(!c){let R=d.skyBoxCommand;if(l(R)&&Aa(R,e,i,t),d.isSkyAtmosphereVisible&&Aa(d.skyAtmosphereCommand,e,i,t),d.isSunVisible&&(d.sunDrawCommand.execute(i,t),e.sunBloom&&!p)){let E;d.useGlobeDepthFramebuffer?E=u.globeDepth.framebuffer:d.usePostProcess?E=u.sceneFramebuffer.framebuffer:E=d.originalFramebuffer,e._sunPostProcess.execute(i),e._sunPostProcess.copy(i,E),t.framebuffer=E}d.isMoonVisible&&d.moonCommand.execute(i,t)}let g;d.useOIT?(l(e._executeOITFunction)||(e._executeOITFunction=function(R,E,I,w,N){u.globeDepth.prepareColorTextures(i),u.oit.executeCommands(R,E,I,w,N)}),g=e._executeOITFunction):a.render?g=ggt:g=ygt;let f=u.frustumCommandsList,x=f.length,_=d.clearGlobeDepth,C=d.useDepthPlane,V=e._globeTranslucencyState,L=V.translucent,Z=e._view.globeTranslucencyFramebuffer,G=e._depthClearCommand,X=e._stencilClearCommand,v=e._classificationStencilClearCommand,P=e._depthPlane,F=d.usePostProcessSelected,A=n.position.z,b;for(let R=0;R<x;++R){let E=x-R-1,I=f[E];e.mode===oe.SCENE2D?(n.position.z=A-I.near+1,s.far=Math.max(1,I.far-I.near),s.near=1,r.update(o),r.updateFrustum(s)):(s.near=E!==0?I.near*e.opaqueFrustumNearOffset:I.near,s.far=I.far,r.updateFrustum(s)),G.execute(i,t),i.stencilBuffer&&X.execute(i,t),r.updatePass(Re.GLOBE);let w=I.commands[Re.GLOBE],N=I.indices[Re.GLOBE];if(L)V.executeGlobeCommands(I,Aa,Z,e,t);else for(b=0;b<N;++b)Aa(w[b],e,i,t);let B=u.globeDepth;if(l(B)&&d.useGlobeDepthFramebuffer&&B.executeCopyDepth(i,t),!d.renderTranslucentDepthForPick)if(r.updatePass(Re.TERRAIN_CLASSIFICATION),w=I.commands[Re.TERRAIN_CLASSIFICATION],N=I.indices[Re.TERRAIN_CLASSIFICATION],L)V.executeGlobeClassificationCommands(I,Aa,Z,e,t);else for(b=0;b<N;++b)Aa(w[b],e,i,t);if(_&&(G.execute(i,t),C&&P.execute(i,t)),!d.useInvertClassification||c||d.renderTranslucentDepthForPick){for(r.updatePass(Re.CESIUM_3D_TILE),w=I.commands[Re.CESIUM_3D_TILE],N=I.indices[Re.CESIUM_3D_TILE],b=0;b<N;++b)Aa(w[b],e,i,t);if(N>0&&(l(B)&&d.useGlobeDepthFramebuffer&&(B.prepareColorTextures(i,_),B.executeUpdateDepth(i,t,_,B.depthStencilTexture)),!d.renderTranslucentDepthForPick))for(r.updatePass(Re.CESIUM_3D_TILE_CLASSIFICATION),w=I.commands[Re.CESIUM_3D_TILE_CLASSIFICATION],N=I.indices[Re.CESIUM_3D_TILE_CLASSIFICATION],b=0;b<N;++b)Aa(w[b],e,i,t)}else{e._invertClassification.clear(i,t);let J=t.framebuffer;for(t.framebuffer=e._invertClassification._fbo.framebuffer,r.updatePass(Re.CESIUM_3D_TILE),w=I.commands[Re.CESIUM_3D_TILE],N=I.indices[Re.CESIUM_3D_TILE],b=0;b<N;++b)Aa(w[b],e,i,t);for(l(B)&&d.useGlobeDepthFramebuffer&&(e._invertClassification.prepareTextures(i),B.executeUpdateDepth(i,t,_,e._invertClassification._fbo.getDepthStencilTexture())),r.updatePass(Re.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),w=I.commands[Re.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],N=I.indices[Re.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],b=0;b<N;++b)Aa(w[b],e,i,t);for(t.framebuffer=J,e._invertClassification.executeClassified(i,t),o.invertClassificationColor.alpha===1&&e._invertClassification.executeUnclassified(i,t),N>0&&i.stencilBuffer&&v.execute(i,t),r.updatePass(Re.CESIUM_3D_TILE_CLASSIFICATION),w=I.commands[Re.CESIUM_3D_TILE_CLASSIFICATION],N=I.indices[Re.CESIUM_3D_TILE_CLASSIFICATION],b=0;b<N;++b)Aa(w[b],e,i,t)}for(N>0&&i.stencilBuffer&&X.execute(i,t),r.updatePass(Re.VOXELS),w=I.commands[Re.VOXELS],N=I.indices[Re.VOXELS],w.length=N,xgt(e,Aa,t,w),r.updatePass(Re.OPAQUE),w=I.commands[Re.OPAQUE],N=I.indices[Re.OPAQUE],b=0;b<N;++b)Aa(w[b],e,i,t);E!==0&&e.mode!==oe.SCENE2D&&(s.near=I.near,r.updateFrustum(s));let U;if(!c&&d.useInvertClassification&&o.invertClassificationColor.alpha<1&&(U=e._invertClassification),r.updatePass(Re.TRANSLUCENT),w=I.commands[Re.TRANSLUCENT],w.length=I.indices[Re.TRANSLUCENT],g(e,Aa,t,w,U),I.indices[Re.CESIUM_3D_TILE_CLASSIFICATION]>0&&u.translucentTileClassification.isSupported()&&(u.translucentTileClassification.executeTranslucentCommands(e,Aa,t,w,B.depthStencilTexture),u.translucentTileClassification.executeClassificationCommands(e,Aa,t,I)),i.depthTexture&&e.useDepthPicking&&(d.useGlobeDepthFramebuffer||m)){let J=B.depthStencilTexture,H=e._picking.getPickDepth(e,E);H.update(i,J),H.executeCopyDepth(i,t)}if(c||!F)continue;let k=t.framebuffer;if(t.framebuffer=u.sceneFramebuffer.getIdFramebuffer(),s.near=E!==0?I.near*e.opaqueFrustumNearOffset:I.near,s.far=I.far,r.updateFrustum(s),r.updatePass(Re.GLOBE),w=I.commands[Re.GLOBE],N=I.indices[Re.GLOBE],L)V.executeGlobeCommands(I,F9,Z,e,t);else for(b=0;b<N;++b)F9(w[b],e,i,t);for(_&&(G.framebuffer=t.framebuffer,G.execute(i,t),G.framebuffer=void 0),_&&C&&P.execute(i,t),r.updatePass(Re.CESIUM_3D_TILE),w=I.commands[Re.CESIUM_3D_TILE],N=I.indices[Re.CESIUM_3D_TILE],b=0;b<N;++b)F9(w[b],e,i,t);for(r.updatePass(Re.OPAQUE),w=I.commands[Re.OPAQUE],N=I.indices[Re.OPAQUE],b=0;b<N;++b)F9(w[b],e,i,t);for(r.updatePass(Re.TRANSLUCENT),w=I.commands[Re.TRANSLUCENT],N=I.indices[Re.TRANSLUCENT],b=0;b<N;++b)F9(w[b],e,i,t);t.framebuffer=k}}function uTe(e){e.context.uniformState.updatePass(Re.COMPUTE);let n=e._environmentState.sunComputeCommand;l(n)&&n.execute(e._computeEngine);let i=e._computeCommandList,o=i.length;for(let r=0;r<o;++r)i[r].execute(e._computeEngine)}function Vgt(e,t){e.context.uniformState.updatePass(Re.OVERLAY);let i=e.context,o=e._overlayCommandList,r=o.length;for(let s=0;s<r;++s)o[s].execute(i,t)}function Lgt(e,t,n){let i=n.shadowMapCullingVolume,o=n.isPointLight,r=n.passes,s=r.length,a=t.length;for(let c=0;c<a;++c){let d=t[c];if(e.updateDerivedCommands(d),d.castShadows&&(d.pass===Re.GLOBE||d.pass===Re.CESIUM_3D_TILE||d.pass===Re.OPAQUE||d.pass===Re.TRANSLUCENT)&&e.isVisible(d,i))if(o)for(let u=0;u<s;++u)r[u].commandList.push(d);else if(s===1)r[0].commandList.push(d);else{let u=!1;for(let m=s-1;m>=0;--m){let p=r[m].cullingVolume;if(e.isVisible(d,p))r[m].commandList.push(d),u=!0;else if(u)break}}}}function mTe(e){let t=e.frameState,n=t.shadowState.shadowMaps,i=n.length;if(!t.shadowState.shadowsEnabled)return;let o=e.context,r=o.uniformState;for(let s=0;s<i;++s){let a=n[s];if(a.outOfView)continue;let c=a.passes,d=c.length;for(let m=0;m<d;++m)c[m].commandList.length=0;let u=e.frameState.commandList;Lgt(e,u,a);for(let m=0;m<d;++m){let p=a.passes[m];r.updateCamera(p.camera),a.updatePass(o,m);let g=p.commandList.length;for(let f=0;f<g;++f){let x=p.commandList[f];r.updatePass(x.pass),Aa(x.derivedCommands.shadows.castCommands[s],e,o,p.passState)}}}}var Rgt=new h;mi.prototype.updateAndExecuteCommands=function(e,t){let i=this._frameState.mode;this._environmentState.useWebVR?Zgt(this,e,t):i!==oe.SCENE2D||this._mapMode2D===Ql.ROTATE?Wy(!0,this,e,t):(K8(this,e,t),Fgt(this,e))};function Zgt(e,t,n){let i=e._view,o=i.camera,s=e._environmentState.renderTranslucentDepthForPick;K8(e,t,n),hTe(e),i.createPotentiallyVisibleSet(e),uTe(e),s||mTe(e);let a=t.viewport;a.x=0,a.y=0,a.width=a.width*.5;let c=ao.clone(o,e._cameraVR);c.frustum=o.frustum;let d=o.frustum.near,u=d*y(e.focalLength,5),m=y(e.eyeSeparation,u/30),p=h.multiplyByScalar(c.right,m*.5,Rgt);o.frustum.aspectRatio=a.width/a.height;let g=.5*m*d/u;h.add(c.position,p,o.position),o.frustum.xOffset=g,z8(e,t),a.x=a.width,h.subtract(c.position,p,o.position),o.frustum.xOffset=-g,z8(e,t),ao.clone(c,o)}var Ggt=new he(Math.PI,W.PI_OVER_TWO),Egt=new h,Xgt=new h,Igt=new M,Wgt=new M,Pgt=new h,vgt=new h,wgt=new He;function Fgt(e,t){let n=e.context,i=e.frameState,o=e.camera,r=t.viewport,s=He.clone(r,wgt);t.viewport=s;let a=Ggt,c=Egt;e.mapProjection.project(a,c);let u=h.clone(o.position,Xgt),m=M.clone(o.transform,Wgt),p=o.frustum.clone();o._setTransform(M.IDENTITY);let g=M.computeViewportTransformation(s,0,1,Igt),f=o.frustum.projectionMatrix,x=o.positionWC.y,_=h.fromElements(W.sign(x)*c.x-x,0,-o.positionWC.x,Pgt),C=Gt.pointToGLWindowCoordinates(f,g,_,vgt);C.x=Math.floor(C.x);let V=s.x,L=s.width;if(x===0||C.x<=V||C.x>=V+L)Wy(!0,e,t);else if(Math.abs(V+L*.5-C.x)<1)s.width=C.x-s.x,o.position.x*=W.sign(o.position.x),o.frustum.right=0,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Wy(!0,e,t),s.x=C.x,o.position.x=-o.position.x,o.frustum.right=-o.frustum.left,o.frustum.left=0,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Wy(!1,e,t);else if(C.x>V+L*.5){s.width=C.x-V;let Z=o.frustum.right;o.frustum.right=c.x-x,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Wy(!0,e,t),s.x=C.x,s.width=V+L-C.x,o.position.x=-o.position.x,o.frustum.left=-o.frustum.right,o.frustum.right=Z-o.frustum.right*2,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Wy(!1,e,t)}else{s.x=C.x,s.width=V+L-C.x;let Z=o.frustum.left;o.frustum.left=-c.x-x,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Wy(!0,e,t),s.x=V,s.width=C.x-V,o.position.x=-o.position.x,o.frustum.right=-o.frustum.left,o.frustum.left=Z-o.frustum.left*2,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Wy(!1,e,t)}o._setTransform(m),h.clone(u,o.position),o.frustum=p.clone(),t.viewport=r}function Wy(e,t,n,i){let o=t._environmentState,r=t._view,s=o.renderTranslucentDepthForPick;e||(t.frameState.commandList.length=0),hTe(t),r.createPotentiallyVisibleSet(t),e&&(l(i)&&K8(t,n,i),uTe(t),s||mTe(t)),z8(t,n)}var cTe=new rs;mi.prototype.updateEnvironment=function(){let e=this._frameState,t=this._view,n=this._environmentState,i=e.passes.render,o=e.passes.offscreen,r=this.atmosphere,s=this.skyAtmosphere,a=this.globe,c=this._globeTranslucencyState;if(!i||this._mode!==oe.SCENE2D&&t.camera.frustum instanceof sn||!c.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{if(l(s)){if(l(a))s.setDynamicLighting(WT.fromGlobeFlags(a)),n.isReadyForAtmosphere=n.isReadyForAtmosphere||!a.show||a._surface._tilesToRender.length>0;else{let C=r.dynamicLighting;s.setDynamicLighting(C),n.isReadyForAtmosphere=!0}n.skyAtmosphereCommand=s.update(e,a),l(n.skyAtmosphereCommand)&&this.updateDerivedCommands(n.skyAtmosphereCommand)}else n.skyAtmosphereCommand=void 0;n.skyBoxCommand=l(this.skyBox)?this.skyBox.update(e,this._hdr):void 0;let _=l(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;n.sunDrawCommand=l(_)?_.drawCommand:void 0,n.sunComputeCommand=l(_)?_.computeCommand:void 0,n.moonCommand=l(this.moon)?this.moon.update(e):void 0}let d=n.clearGlobeDepth=l(a)&&a.show&&(!a.depthTestAgainstTerrain||this.mode===oe.SCENE2D);(n.useDepthPlane=d&&this.mode===oe.SCENE3D&&c.useDepthPlane)&&this._depthPlane.update(e),n.renderTranslucentDepthForPick=!1,n.useWebVR=this._useWebVR&&this.mode!==oe.SCENE2D&&!o;let m=e.mode===oe.SCENE3D&&!c.sunVisibleThroughGlobe?e.occluder:void 0,p=e.cullingVolume,g=cTe.planes;for(let _=0;_<5;++_)g[_]=p.planes[_];p=cTe,n.isSkyAtmosphereVisible=l(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=this.isVisible(n.sunDrawCommand,p,m),n.isMoonVisible=this.isVisible(n.moonCommand,p,m);let f=this.specularEnvironmentMaps,x=this._specularEnvironmentMapAtlas;l(f)&&(!l(x)||x.url!==f)?(x=x&&x.destroy(),this._specularEnvironmentMapAtlas=new Lm(f)):!l(f)&&l(x)&&(x.destroy(),this._specularEnvironmentMapAtlas=void 0),l(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e)};function Agt(e){let t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new Df({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),l(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function Mgt(e){let t=e._frameState,n=t.shadowMaps,i=n.length,o=i>0&&!t.passes.pick&&!t.passes.pickVoxel&&e.mode===oe.SCENE3D;if(o!==t.shadowState.shadowsEnabled&&(++t.shadowState.lastDirtyTime,t.shadowState.shadowsEnabled=o),t.shadowState.lightShadowsEnabled=!1,!!o){for(let r=0;r<i;++r)if(n[r]!==t.shadowState.shadowMaps[r]){++t.shadowState.lastDirtyTime;break}t.shadowState.shadowMaps.length=0,t.shadowState.lightShadowMaps.length=0;for(let r=0;r<i;++r){let s=n[r];s.update(t),t.shadowState.shadowMaps.push(s),s.fromLightSource&&(t.shadowState.lightShadowMaps.push(s),t.shadowState.lightShadowsEnabled=!0),s.dirty&&(++t.shadowState.lastDirtyTime,s.dirty=!1)}}}function hTe(e){let t=e._frameState;e._groundPrimitives.update(t),e._primitives.update(t),Agt(e),Mgt(e),e._globe&&e._globe.render(t)}function K8(e,t,n){let i=e._context,o=e._frameState,r=e._environmentState,s=e._view,a=e._frameState.passes,c=a.pick||a.pickVoxel;l(s.globeDepth)&&(s.globeDepth.picking=c);let d=r.useWebVR;r.originalFramebuffer=t.framebuffer,l(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!d?e._sunPostProcess=new u9:l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!l(e.sun)&&l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);let u=e._clearColorCommand;Y.clone(n,u.color),u.execute(i,t);let m=r.useGlobeDepthFramebuffer=l(s.globeDepth);m&&(s.globeDepth.update(i,t,s.viewport,e.msaaSamples,e._hdr,r.clearGlobeDepth),s.globeDepth.clear(i,t,n));let p=s.oit,g=r.useOIT=!c&&l(p)&&p.isSupported();g&&(p.update(i,t,s.globeDepth.colorFramebufferManager,e._hdr,e.msaaSamples),p.clear(i,t,n),r.useOIT=p.isSupported());let f=e.postProcessStages,x=r.usePostProcess=!c&&(e._hdr||f.length>0||f.ambientOcclusion.enabled||f.fxaa.enabled||f.bloom.enabled);if(r.usePostProcessSelected=!1,x&&(s.sceneFramebuffer.update(i,s.viewport,e._hdr,e.msaaSamples),s.sceneFramebuffer.clear(i,t,n),f.update(i,o.useLogDepth,e._hdr),f.clear(i),x=r.usePostProcess=f.ready,r.usePostProcessSelected=x&&f.hasSelected),r.isSunVisible&&e.sunBloom&&!d?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(i,t,n)):m?t.framebuffer=s.globeDepth.framebuffer:x&&(t.framebuffer=s.sceneFramebuffer.framebuffer),l(t.framebuffer)&&u.execute(i,t),r.useInvertClassification=!c&&l(t.framebuffer)&&e.invertClassification){let C;if(e.frameState.invertClassificationColor.alpha===1&&r.useGlobeDepthFramebuffer&&(C=s.globeDepth.framebuffer),l(C)||i.depthTexture){if(e._invertClassification.previousFramebuffer=C,e._invertClassification.update(i,e.msaaSamples,s.globeDepth.colorFramebufferManager),e._invertClassification.clear(i,t),e.frameState.invertClassificationColor.alpha<1&&g){let V=e._invertClassification.unclassifiedCommand,L=V.derivedCommands;L.oit=p.createDerivedCommands(V,i,L.oit)}}else r.useInvertClassification=!1}e._globeTranslucencyState.translucent&&s.globeTranslucencyFramebuffer.updateAndClear(e._hdr,s.viewport,i,t)}mi.prototype.resolveFramebuffers=function(e){let t=this._context,n=this._environmentState,i=this._view,o=i.globeDepth;l(o)&&o.prepareColorTextures(t);let r=n.useOIT,s=n.useGlobeDepthFramebuffer,a=n.usePostProcess,c=n.originalFramebuffer,d=s?o.colorFramebufferManager:void 0,u=i.sceneFramebuffer._colorFramebuffer,m=i.sceneFramebuffer.idFramebuffer;r&&(e.framebuffer=a?u.framebuffer:c,i.oit.execute(t,e));let p=i.translucentTileClassification;if(p.hasTranslucentDepth&&p.isSupported()&&p.execute(this,e),a){i.sceneFramebuffer.prepareColorTextures(t);let g=u;s&&!r&&(g=d);let f=this.postProcessStages,x=g.getColorTexture(0),_=m.getColorTexture(0),C=y(d,u).getDepthStencilTexture();f.execute(t,x,C,_),f.copy(t,c)}!r&&!a&&s&&(e.framebuffer=c,o.executeCopyColor(t,e))};function Ngt(e){let t=e._frameState.afterRender;for(let n=0,i=t.length;n<i;++n)t[n]()&&e.requestRender();t.length=0}function kgt(e){if(e.mode===oe.MORPHING)return;let n=e.camera.positionCartographic;return e.getHeight(n)}mi.prototype.getHeight=function(e,t){if(!l(e))return;let n=t===Je.CLAMP_TO_TERRAIN||t===Je.RELATIVE_TO_TERRAIN,i=t===Je.CLAMP_TO_3D_TILE||t===Je.RELATIVE_TO_3D_TILE;if(!l(e))return;let o=Number.NEGATIVE_INFINITY;if(!n){let s=this.primitives.length;for(let a=0;a<s;++a){let c=this.primitives.get(a);if(!c.isCesium3DTileset||!c.show||!c.enableCollision)continue;let d=c.getHeight(e,this);l(d)&&d>o&&(o=d)}}let r=this._globe;if(!i&&l(r)&&r.show){let s=r.getHeight(e);s>o&&(o=s)}if(o>Number.NEGATIVE_INFINITY)return o};var H8=new he;mi.prototype.updateHeight=function(e,t,n){let i=()=>{he.clone(e,H8);let g=this.getHeight(e,n);l(g)&&(H8.height=g,t(H8))},o=n===Je.CLAMP_TO_TERRAIN||n===Je.RELATIVE_TO_TERRAIN,r=n===Je.CLAMP_TO_3D_TILE||n===Je.RELATIVE_TO_3D_TILE,s;!r&&l(this.globe)&&(s=this.globe._surface.updateHeight(e,i));let a={},c=this.globe?.ellipsoid,d=g=>{if(o||g.isDestroyed()||!g.isCesium3DTileset)return;let f=g.updateHeight(e,i,c);a[g.id]=f};if(!o){let g=this.primitives.length;for(let f=0;f<g;++f){let x=this.primitives.get(f);d(x)}}let u=this.primitives.primitiveAdded.addEventListener(d),m=this.primitives.primitiveRemoved.addEventListener(g=>{g.isDestroyed()||!g.isCesium3DTileset||(l(a[g.id])&&a[g.id](),delete a[g.id])});return()=>{s=s&&s(),Object.values(a).forEach(g=>g()),a={},u(),m()}};function Ugt(e){let t=e.camera,n=e._mode,i=e._screenSpaceCameraController,o=t.positionCartographic;if(!l(o))return!1;if(!i.onMap()&&o.height<0)return!0;if(n===oe.SCENE2D||n===oe.MORPHING)return!1;let r=e._globeHeight;return l(r)&&o.height<r}mi.prototype.initializeFrame=function(){if(this._shaderFrameCount++===120&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeightDirty){l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),this._globeHeight=kgt(this),this._globeHeightDirty=!1;let e=this.camera.positionCartographic;this._removeUpdateHeightCallback=this.updateHeight(e,t=>{this.isDestroyed()||(this._globeHeight=t.height)})}this._cameraUnderground=Ugt(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),l(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};function Dgt(e,t){if(e.debugShowFramesPerSecond){if(!l(e._performanceDisplay)){let n=document.createElement("div");n.className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(n);let o=new tb({container:n});e._performanceDisplay=o,e._performanceContainer=n}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)}else l(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function Bgt(e){e._jobScheduler.resetBudgets();let t=e._frameState;e.primitives.prePassesUpdate(t),l(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function Ygt(e){let t=e._frameState;e.primitives.postPassesUpdate(t),Ha.update()}var Ogt=new Y;function Hgt(e){let t=e._frameState,n=e.context,i=n.uniformState,o=e._defaultView;e._view=o,e.updateFrameState(),t.passes.render=!0,t.passes.postProcess=e.postProcessStages.hasSelected,t.tilesetPassState=mgt;let r=y(e.backgroundColor,Y.BLACK);e._hdr&&(r=Y.clone(r,Ogt),r.red=Math.pow(r.red,e.gamma),r.green=Math.pow(r.green,e.gamma),r.blue=Math.pow(r.blue,e.gamma)),t.backgroundColor=r,t.atmosphere=e.atmosphere,e.fog.update(t),i.update(t);let s=e.shadowMap;l(s)&&s.enabled&&(!l(e.light)||e.light instanceof U0?h.negate(i.sunDirectionWC,e._shadowMapCamera.direction):h.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(s)),e._computeCommandList.length=0,e._overlayCommandList.length=0;let a=o.viewport;a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight;let c=o.passState;c.framebuffer=void 0,c.blendingEnabled=void 0,c.scissorTest=void 0,c.viewport=He.clone(a,c.viewport),l(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(c,r),e.resolveFramebuffers(c),c.framebuffer=void 0,Vgt(e,c),l(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),n.endFrame()}function tS(e,t){try{t(e)}catch(n){if(e._renderError.raiseEvent(e,n),e.rethrowRenderErrors)throw n}}function zgt(e){return e._picking.updateMostDetailedRayPicks(e)}mi.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);let t=this._frameState;t.newFrame=!1,l(e)||(e=te.now());let n=this._view.checkForCameraUpdates(this);n&&(this._globeHeightDirty=!0);let i=!this.requestRenderMode||this._renderRequested||n||this._logDepthBufferDirty||this._hdrDirty||this.mode===oe.MORPHING;if(!i&&l(this.maximumRenderTimeChange)&&l(this._lastRenderTime)){let o=Math.abs(te.secondsDifference(this._lastRenderTime,e));i=i||o>this.maximumRenderTimeChange}if(i){this._lastRenderTime=te.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1;let o=W.incrementWrap(t.frameNumber,15e6,1);lTe(this,o,e),t.newFrame=!0}tS(this,Bgt),this.primitives.show&&(tS(this,zgt),tS(this,Kgt),tS(this,Jgt),i||tS(this,Qgt)),this._postUpdate.raiseEvent(this,e),i&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),tS(this,Hgt)),Dgt(this,i),tS(this,Ygt),Ngt(this),i&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())};mi.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)};mi.prototype.requestRender=function(){this._renderRequested=!0};mi.prototype.clampLineWidth=function(e){return Math.max(Mt.minimumAliasedLineWidth,Math.min(e,Mt.maximumAliasedLineWidth))};mi.prototype.pick=function(e,t,n){return this._picking.pick(this,e,t,n)};mi.prototype.pickVoxel=function(e,t,n){let i=this.pick(e,t,n);if(!l(i))return;let o=i.primitive;if(!(o instanceof Iy))return;let r=this._picking.pickVoxelCoordinate(this,e,t,n),s=255*r[0]+r[1],a=o._traversal.findKeyframeNode(s);if(!l(a))return;let c=255*r[2]+r[3];return f9.fromKeyframeNode(o,s,c,a)};mi.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)};mi.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)};mi.prototype.drillPick=function(e,t,n,i){return this._picking.drillPick(this,e,t,n,i)};function Kgt(e){let t=e._frameState;B8.camera=t.camera,B8.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,B8)}function Jgt(e){let t=e._frameState;if(!t.camera.canPreloadFlight())return;Y8.camera=e.preloadFlightCamera,Y8.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,Y8)}function Qgt(e){e.primitives.updateForPass(e._frameState,hgt)}mi.prototype.pickFromRay=function(e,t,n){return this._picking.pickFromRay(this,e,t,n)};mi.prototype.drillPickFromRay=function(e,t,n,i){return this._picking.drillPickFromRay(this,e,t,n,i)};mi.prototype.pickFromRayMostDetailed=function(e,t,n){return this._picking.pickFromRayMostDetailed(this,e,t,n)};mi.prototype.drillPickFromRayMostDetailed=function(e,t,n,i){return this._picking.drillPickFromRayMostDetailed(this,e,t,n,i)};mi.prototype.sampleHeight=function(e,t,n){return this._picking.sampleHeight(this,e,t,n)};mi.prototype.clampToHeight=function(e,t,n,i){return this._picking.clampToHeight(this,e,t,n,i)};mi.prototype.sampleHeightMostDetailed=function(e,t,n){return this._picking.sampleHeightMostDetailed(this,e,t,n)};mi.prototype.clampToHeightMostDetailed=function(e,t,n){return this._picking.clampToHeightMostDetailed(this,e,t,n)};mi.prototype.cartesianToCanvasCoordinates=function(e,t){return ki.wgs84ToWindowCoordinates(this,e,t)};mi.prototype.completeMorph=function(){this._transitioner.completeMorph()};mi.prototype.morphTo2D=function(e){let t,n=this.globe;l(n)?t=n.ellipsoid:t=this.mapProjection.ellipsoid,e=y(e,2),this._transitioner.morphTo2D(e,t)};mi.prototype.morphToColumbusView=function(e){let t,n=this.globe;l(n)?t=n.ellipsoid:t=this.mapProjection.ellipsoid,e=y(e,2),this._transitioner.morphToColumbusView(e,t)};mi.prototype.morphTo3D=function(e){let t,n=this.globe;l(n)?t=n.ellipsoid:t=this.mapProjection.ellipsoid,e=y(e,2),this._transitioner.morphTo3D(e,t)};function jgt(e,t){if(e._removeTerrainProviderReadyListener=e._removeTerrainProviderReadyListener&&e._removeTerrainProviderReadyListener(),t.ready){l(e.globe)&&(e.globe.terrainProvider=t.provider);return}e.globe.terrainProvider=void 0,e._removeTerrainProviderReadyListener=t.readyEvent.addEventListener(n=>{l(e)&&l(e.globe)&&(e.globe.terrainProvider=n),e._removeTerrainProviderReadyListener()})}mi.prototype.setTerrain=function(e){return jgt(this,e),e};mi.prototype.isDestroyed=function(){return!1};mi.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),l(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(let e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),me(this)};var A9=mi;var WHi=T(S(),1);function dL(e){e=y(e,ie.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;let t=1.025,n=h.multiplyByScalar(e.radii,t,new h);this._scaleMatrix=M.fromScale(n),this._modelMatrix=new M,this._command=new et({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new h(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new h(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new h;let i=new h;i.x=e.maximumRadius*t,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;let o=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return o._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return o._hueSaturationBrightness.x=o.hueShift,o._hueSaturationBrightness.y=o.saturationShift,o._hueSaturationBrightness.z=o.brightnessShift,o._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return o.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return o.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return o.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return o.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return o.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return o.atmosphereMieAnisotropy}}}Object.defineProperties(dL.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});dL.prototype.setDynamicLighting=function(e){this._radiiAndDynamicAtmosphereColor.z=e};var J8=new M;dL.prototype.update=function(e,t){if(!this.show)return;let n=e.mode;if(n!==oe.SCENE3D&&n!==oe.MORPHING||!e.passes.render)return;let i=M.fromRotationTranslation(e.context.uniformState.inverseViewRotation,h.ZERO,J8),o=M.multiplyTransformation(i,Go.Y_UP_TO_Z_UP,J8),r=M.multiply(this._scaleMatrix,o,J8);M.clone(r,this._modelMatrix);let s=e.context,a=qgt(this),c=e.globeTranslucencyState.translucent,d=this.perFragmentAtmosphere||c||!l(t)||!t.show,u=this._command;if(!l(u.vertexArray)){let p=Us.createGeometry(new Us({radii:new h(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:We.POSITION_ONLY}));u.vertexArray=ei.fromGeometry({context:s,geometry:p,attributeLocations:An.createAttributeLocations(p),bufferUsage:Ne.STATIC_DRAW}),u.renderState=De.fromCache({cull:{enabled:!0,face:fi.FRONT},blending:un.ALPHA_BLEND,depthMask:!1})}let m=a|d<<2|c<<3;if(m!==this._flags){this._flags=m;let p=[];a&&p.push("COLOR_CORRECT"),d&&p.push("PER_FRAGMENT_ATMOSPHERE"),c&&p.push("GLOBE_TRANSLUCENT");let g=new Ye({defines:p,sources:[z0,FV,Vw]}),f=new Ye({defines:p,sources:[z0,FV,Cw]});this._spSkyAtmosphere=qt.fromCache({context:s,vertexShaderSource:g,fragmentShaderSource:f}),u.shaderProgram=this._spSkyAtmosphere}return u};function qgt(e){return!(W.equalsEpsilon(e.hueShift,0,W.EPSILON7)&&W.equalsEpsilon(e.saturationShift,0,W.EPSILON7)&&W.equalsEpsilon(e.brightnessShift,0,W.EPSILON7))}dL.prototype.isDestroyed=function(){return!1};dL.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),me(this)};var M9=dL;var ezi=T(S(),1);function R3(e){this.sources=e.sources,this._sources=void 0,this.show=y(e.show,!0),this._command=new et({modelMatrix:M.clone(M.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}R3.prototype.update=function(e,t){let n=this;if(!this.show||e.mode!==oe.SCENE3D&&e.mode!==oe.MORPHING||!e.passes.render)return;let i=e.context;if(this._sources!==this.sources){this._sources=this.sources;let r=this.sources;typeof r.positiveX=="string"?Uv(i,this._sources).then(function(s){n._cubeMap=n._cubeMap&&n._cubeMap.destroy(),n._cubeMap=s}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new Qa({context:i,source:r}))}let o=this._command;if(!l(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return n._cubeMap}};let r=gl.createGeometry(gl.fromDimensions({dimensions:new h(2,2,2),vertexFormat:We.POSITION_ONLY})),s=this._attributeLocations=An.createAttributeLocations(r);o.vertexArray=ei.fromGeometry({context:i,geometry:r,attributeLocations:s,bufferUsage:Ne.STATIC_DRAW}),o.renderState=De.fromCache({blending:un.ALPHA_BLEND})}if(!l(o.shaderProgram)||this._useHdr!==t){let r=new Ye({defines:[t?"HDR":""],sources:[Lw]});o.shaderProgram=qt.fromCache({context:i,vertexShaderSource:Rw,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),this._useHdr=t}if(l(this._cubeMap))return o};R3.prototype.isDestroyed=function(){return!1};R3.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),me(this)};var N9=R3;var Ezi=T(S(),1);function U9(){this.show=!0,this._drawCommand=new et({primitiveType:Fe.TRIANGLES,boundingVolume:new le,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new le,this._boundingVolume2D=new le,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;let e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(U9.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var $gt=new D,eyt=new D,tyt=new se,k9=new se;U9.prototype.update=function(e,t,n){if(!this.show)return;let i=e.mode;if(i===oe.SCENE2D||i===oe.MORPHING||!e.passes.render)return;let o=e.context,r=t.viewport.width,s=t.viewport.height;if(!l(this._texture)||r!==this._drawingBufferWidth||s!==this._drawingBufferHeight||this._glowFactorDirty||n!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=r,this._drawingBufferHeight=s,this._glowFactorDirty=!1,this._useHdr=n;let Z=Math.max(r,s);Z=Math.pow(2,Math.ceil(Math.log(Z)/Math.log(2))-2),Z=Math.max(1,Z);let G=n?o.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT:ze.UNSIGNED_BYTE;this._texture=new Et({context:o,width:Z,height:Z,pixelFormat:at.RGBA,pixelDatatype:G}),this._glowLengthTS=this._glowFactor*5,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;let X=this,v={u_radiusTS:function(){return X._radiusTS}};this._commands.computeCommand=new Cl({fragmentShaderSource:Gw,outputTexture:this._texture,uniformMap:v,persists:!1,owner:this,postExecute:function(){X._commands.computeCommand=void 0}})}let a=this._drawCommand;if(!l(a.vertexArray)){let Z={direction:0},G=new Uint8Array(4*2);G[0]=0,G[1]=0,G[2]=255,G[3]=0,G[4]=255,G[5]=255,G[6]=0,G[7]=255;let X=ft.createVertexBuffer({context:o,typedArray:G,usage:Ne.STATIC_DRAW}),v=[{index:Z.direction,vertexBuffer:X,componentsPerAttribute:2,normalize:!0,componentDatatype:Q.UNSIGNED_BYTE}],P=ft.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT});a.vertexArray=new ei({context:o,attributes:v,indexBuffer:P}),a.shaderProgram=qt.fromCache({context:o,vertexShaderSource:Ew,fragmentShaderSource:Zw,attributeLocations:Z}),a.renderState=De.fromCache({blending:un.ALPHA_BLEND}),a.uniformMap=this._uniformMap}let c=o.uniformState.sunPositionWC,d=o.uniformState.sunPositionColumbusView,u=this._boundingVolume,m=this._boundingVolume2D;h.clone(c,u.center),m.center.x=d.z,m.center.y=d.x,m.center.z=d.y,u.radius=W.SOLAR_RADIUS+W.SOLAR_RADIUS*this._glowLengthTS,m.radius=u.radius,i===oe.SCENE3D?le.clone(u,a.boundingVolume):i===oe.COLUMBUS_VIEW&&le.clone(m,a.boundingVolume);let p=ki.computeActualWgs84Position(e,c,k9),g=h.magnitude(h.subtract(p,e.camera.position,k9)),f=o.uniformState.projection,x=tyt;x.x=0,x.y=0,x.z=-g,x.w=1;let _=M.multiplyByVector(f,x,k9),C=ki.clipToGLWindowCoordinates(t.viewport,_,$gt);x.x=W.SOLAR_RADIUS;let V=M.multiplyByVector(f,x,k9),L=ki.clipToGLWindowCoordinates(t.viewport,V,eyt);return this._size=D.magnitude(D.subtract(L,C,k9)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};U9.prototype.isDestroyed=function(){return!1};U9.prototype.destroy=function(){let e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),me(this)};var D9=U9;function uL(e){return tn(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}function nyt(e){e._renderLoopRunning=!0;let t=0;function n(i){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{let o=e._targetFrameRate;if(!l(o))e.resize(),e.render(),requestAnimationFrame(n);else{let r=1e3/o,s=i-t;s>r&&(e.resize(),e.render(),t=i-s%r),requestAnimationFrame(n)}}catch(o){e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors&&e.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,o)}else e._renderLoopRunning=!1}requestAnimationFrame(n)}function fTe(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,l(e._scene)&&(e._scene.pixelRatio=t),t}function pTe(e){let t=e._canvas,n=t.clientWidth,i=t.clientHeight,o=fTe(e);e._canvasClientWidth=n,e._canvasClientHeight=i,n*=o,i*=o,t.width=n,t.height=i,e._canRender=n!==0&&i!==0,e._lastDevicePixelRatio=window.devicePixelRatio}function bTe(e){let t=e._canvas,n=t.width,i=t.height;if(n!==0&&i!==0){let o=e._scene.camera.frustum;l(o.aspectRatio)?o.aspectRatio=n/i:(o.top=o.right*(i/n),o.bottom=-o.top)}}function nS(e,t){e=In(e),t=y(t,y.EMPTY_OBJECT);let n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);let i=document.createElement("canvas"),o=Yt.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=Yt.imageRenderingValue()),i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1};function r(){i!==i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()}y(t.blurActiveElementOnCanvasFocus,!0)&&(i.addEventListener("mousedown",r),i.addEventListener("pointerdown",r)),n.appendChild(i);let a=document.createElement("div");a.className="cesium-widget-credits";let c=l(t.creditContainer)?In(t.creditContainer):n;c.appendChild(a);let d=l(t.creditViewport)?In(t.creditViewport):n,u=y(t.showRenderLoopErrors,!0),m=y(t.useBrowserRecommendedResolution,!0);this._element=n,this._container=e,this._canvas=i,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=d,this._creditContainer=c,this._innerCreditContainer=a,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=u,this._resolutionScale=1,this._useBrowserRecommendedResolution=m,this._forceResize=!1,this._clock=l(t.clock)?t.clock:new qm,pTe(this);try{let p=new A9({canvas:i,contextOptions:t.contextOptions,creditContainer:a,creditViewport:d,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:y(t.scene3DOnly,!1),shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples});this._scene=p,p.camera.constrainedAxis=h.UNIT_Z,fTe(this),bTe(this);let g=y(p.mapProjection.ellipsoid,ie.WGS84),f=t.globe;l(f)||(f=new tF(g)),f!==!1&&(p.globe=f,p.globe.shadows=y(t.terrainShadows,xn.RECEIVE_ONLY));let x=t.skyBox;l(x)||(x=new N9({sources:{positiveX:uL("px"),negativeX:uL("mx"),positiveY:uL("py"),negativeY:uL("my"),positiveZ:uL("pz"),negativeZ:uL("mz")}})),x!==!1&&(p.skyBox=x,p.sun=new D9,p.moon=new oF);let _=t.skyAtmosphere;l(_)||(_=new M9(g),_.show=t.globe!==!1&&f.show),_!==!1&&(p.skyAtmosphere=_);let C=t.baseLayer;t.globe!==!1&&C!==!1&&(l(C)||(C=ma.fromWorldImagery()),p.imageryLayers.add(C)),l(t.terrainProvider)&&t.globe!==!1&&(p.terrainProvider=t.terrainProvider),l(t.terrain)&&t.globe!==!1&&p.setTerrain(t.terrain),this._screenSpaceEventHandler=new Yd(i),l(t.sceneMode)&&(t.sceneMode===oe.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===oe.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=y(t.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;let V=this;this._onRenderError=function(L,Z){V._useDefaultRenderLoop=!1,V._renderLoopRunning=!1,V._showRenderLoopErrors&&V.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,Z)},p.renderError.addEventListener(this._onRenderError)}catch(p){throw u&&this.showErrorPanel("Error constructing CesiumWidget.",'Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:',p),p}}Object.defineProperties(nS.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},creditDisplay:{get:function(){return this._scene.frameState.creditDisplay}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&nyt(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){this._resolutionScale!==e&&(this._resolutionScale=e,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}}});nS.prototype.showErrorPanel=function(e,t,n){let i=this._element,o=document.createElement("div");o.className="cesium-widget-errorPanel";let r=document.createElement("div");r.className="cesium-widget-errorPanel-content",o.appendChild(r);let s=document.createElement("div");s.className="cesium-widget-errorPanel-header",s.appendChild(document.createTextNode(e)),r.appendChild(s);let a=document.createElement("div");a.className="cesium-widget-errorPanel-scroll",r.appendChild(a);function c(){a.style.maxHeight=`${Math.max(Math.round(i.clientHeight*.9-100),30)}px`}c(),l(window.addEventListener)&&window.addEventListener("resize",c,!1);let d=l(t),u=l(n);if(d||u){let g=document.createElement("div");if(g.className="cesium-widget-errorPanel-message",a.appendChild(g),u){let f=Ff(n);d||(typeof n=="string"&&(n=new Error(n)),t=Ff({name:n.name,message:n.message}),f=n.stack),typeof console<"u"&&console.error(`${e} +}`});function w_e(){this.ready=!0,this.shape=Ii.BOX,this.dimensions=new h(1,1,1),this.names=["data"],this.types=[Kt.SCALAR],this.componentTypes=[an.FLOAT32],this.maximumTileCount=1}w_e.prototype.requestData=function(e){if(!((l(e)?y(e.tileLevel,0):0)>=1))return Promise.resolve([new Float32Array(1)])};Qf.DefaultProvider=new w_e;var Ty=Qf;var pB=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function mi(e){e=y(e,y.EMPTY_OBJECT);let t=e.canvas,n=e.creditContainer,i=e.creditViewport,o=Oe(e.contextOptions),r=l(n),s=new kw(t,o);r||(n=document.createElement("div"),n.style.position="absolute",n.style.bottom="0",n.style["text-shadow"]="0 0 2px #000000",n.style.color="#ffffff",n.style["font-size"]="10px",n.style["padding-right"]="5px",t.parentNode.appendChild(n)),l(i)||(i=t.parentNode),this._id=Bn(),this._jobScheduler=new lF,this._frameState=new aF(s,new jw(n,"\u2022",i),this._jobScheduler),this._frameState.scene3DOnly=y(e.scene3DOnly,!1),this._removeCreditContainer=!r,this._creditContainer=n,this._canvas=t,this._context=s,this._computeEngine=new Fw(s),this._ellipsoid=y(e.ellipsoid,te.default),this._globe=void 0,this._globeTranslucencyState=new cF,this._primitives=new Ml,this._groundPrimitives=new Ml,this._globeHeight=void 0,this._globeHeightDirty=!0,this._cameraUnderground=!1,this._removeUpdateHeightCallback=void 0,this._logDepthBuffer=mi.defaultLogDepthBuffer&&s.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new FS,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=y(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new iF(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new ii({color:new Y,stencil:0,owner:this}),this._depthClearCommand=new ii({depth:1,owner:this}),this._stencilClearCommand=new ii({stencil:0}),this._classificationStencilClearCommand=new ii({stencil:0,renderState:De.fromCache({stencilMask:Nt.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new OF(this),this._preUpdate=new ge,this._postUpdate=new ge,this._renderError=new ge,this._preRender=new ge,this._postRender=new ge,this._minimumDisableDepthTestDistance=0,this._debugInspector=new e9,this._msaaSamples=y(e.msaaSamples,1),this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new ge,this.morphComplete=new ge,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=Y.clone(Y.BLACK),this._mode=oe.SCENE3D,this._mapProjection=l(e.mapProjection)?e.mapProjection:new Ci(this._ellipsoid),this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.atmosphere=new Bw,this.fog=new sF,this.fog.enabled=te.WGS84.equals(this._ellipsoid),te.WGS84.equals(this._ellipsoid)||(io.DEFAULT_VIEW_RECTANGLE=ce.fromDegrees(-45,-45,45,45)),this._shadowMapCamera=new io(this),this.shadowMap=new e0({context:s,lightCamera:this._shadowMapCamera,enabled:y(e.shadows,!1)}),this.invertClassification=!1,this.invertClassificationColor=Y.clone(Y.WHITE),this._actualInvertClassificationColor=Y.clone(this._invertClassificationColor),this._invertClassification=new BV,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new DF,this._brdfLutGenerator=new Ow,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new JF(this),this._cameraUnderground=!1,this._mapMode2D=y(e.mapMode2D,Jl.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=y(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=y(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=Ka.requestCompletedEvent.addEventListener(pB(this)),this._removeTaskProcessorListenerCallback=bi.taskCompletedEvent.addEventListener(pB(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;let a=new ze(0,0,s.drawingBufferWidth,s.drawingBufferHeight),c=new io(this);this._logDepthBuffer&&(c.frustum.near=.1,c.frustum.far=1e10),this.preloadFlightCamera=new io(this),this.preloadFlightCullingVolume=void 0,this._picking=new _F(this),this._defaultView=new GS(this,c,a),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this.light=new Jb,N_e(this,0,ne.now()),this.updateFrameState(),this.initializeFrame()}mi.defaultLogDepthBuffer=!0;function Xbt(e,t){for(let i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;let n=[];l(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(pB(e))),n.push(t.terrainProviderChanged.addEventListener(pB(e)))),e._removeGlobeCallbacks=n}Object.defineProperties(mi.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return Mt.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return Mt.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return Vm.isSupported(this._context)}},ellipsoid:{get:function(){return this._ellipsoid}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,Xbt(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(l(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(l(this.globe))return this.globe.terrainProvider},set:function(e){this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),l(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(l(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){e===oe.SCENE2D?this.morphTo2D(0):e===oe.SCENE3D?this.morphTo3D(0):e===oe.COLUMBUS_VIEW&&this.morphToColumbusView(0),this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},useWebVR:{get:function(){return this._useWebVR},set:function(e){this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new io(this),l(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new rF(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},splitPosition:{get:function(){return this._frameState.splitPosition},set:function(e){this._frameState.splitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){let t=this._context,n=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=n!==this._hdr,this._hdr=n}},highDynamicRangeSupported:{get:function(){let e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},msaaSamples:{get:function(){return this._msaaSamples},set:function(e){e=Math.min(e,Mt.maximumSamples),this._msaaSamples=e}},msaaSupported:{get:function(){return this._context.msaa}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},opaqueFrustumNearOffset:{get:function(){return .9999}},globeHeight:{get:function(){return this._globeHeight}}});mi.prototype.getCompressedTextureFormatSupported=function(e){let t=this.context;return(e==="WEBGL_compressed_texture_s3tc"||e==="s3tc")&&t.s3tc||(e==="WEBGL_compressed_texture_pvrtc"||e==="pvrtc")&&t.pvrtc||(e==="WEBGL_compressed_texture_etc"||e==="etc")&&t.etc||(e==="WEBGL_compressed_texture_etc1"||e==="etc1")&&t.etc1||(e==="WEBGL_compressed_texture_astc"||e==="astc")&&t.astc||(e==="EXT_texture_compression_bptc"||e==="bc7")&&t.bc7};function F_e(e,t,n){let i=e._frameState,o=e._context,r=e._view.oit,s=i.shadowState.lightShadowMaps,a=i.shadowState.lightShadowsEnabled,c=t.derivedCommands;l(t.pickId)&&(c.picking=Qb.createPickDerivedCommand(e,t,o,c.picking)),t.pickOnly||(c.depth=Qb.createDepthOnlyDerivedCommand(e,t,o,c.depth)),c.originalCommand=t,e._hdr&&(c.hdr=Qb.createHdrCommand(t,o,c.hdr),t=c.hdr.command,c=t.derivedCommands),a&&t.receiveShadows&&(c.shadows=e0.createReceiveDerivedCommand(s,t,n,o,c.shadows)),t.pass===Le.TRANSLUCENT&&l(r)&&r.isSupported()&&(a&&t.receiveShadows?(c.oit=l(c.oit)?c.oit:{},c.oit.shadows=r.createDerivedCommands(c.shadows.receiveCommand,o,c.oit.shadows)):c.oit=r.createDerivedCommands(t,o,c.oit))}mi.prototype.updateDerivedCommands=function(e){if(!l(e.derivedCommands))return;let t=this._frameState,n=this._context,i=!1,o=t.shadowState.lastDirtyTime;e.lastDirtyTime!==o&&(e.lastDirtyTime=o,e.dirty=!0,i=!0);let r=t.useLogDepth,s=this._hdr,a=e.derivedCommands,c=l(a.logDepth),d=l(a.hdr),u=l(a.originalCommand),m=r&&!c,p=s&&!d,g=(!r||!s)&&!u;if(e.dirty=e.dirty||m||p||g,e.dirty){e.dirty=!1;let f=t.shadowState.shadowMaps;t.shadowState.shadowsEnabled&&e.castShadows&&(a.shadows=e0.createCastDerivedCommand(f,e,i,n,a.shadows)),(c||m)&&(a.logDepth=Qb.createLogDepthCommand(e,n,a.logDepth),F_e(this,a.logDepth.command,i)),(u||g)&&F_e(this,e,i)}};var Pbt=new $u({pass:Io.RENDER}),Jj=new $u({pass:Io.PRELOAD}),Qj=new $u({pass:Io.PRELOAD_FLIGHT}),vbt=new $u({pass:Io.REQUEST_RENDER_MODE_DEFER_CHECK}),A_e=new le,jj;function wbt(e){let t=e.globe;if(e._mode===oe.SCENE3D&&l(t)&&t.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent){let n=e.ellipsoid,i=e.frameState.minimumTerrainHeight;return A_e.radius=n.minimumRadius+i,jj=vw.fromBoundingSphere(A_e,e.camera.positionWC,jj),jj}}mi.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.pickVoxel=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1};function N_e(e,t,n){let i=e._frameState;i.frameNumber=t,i.time=ne.clone(n,i.time)}mi.prototype.updateFrameState=function(){let e=this.camera,t=this._frameState;t.commandList.length=0,t.shadowMaps.length=0,t.brdfLutGenerator=this._brdfLutGenerator,t.environmentMap=this.skyBox&&this.skyBox._cubeMap,t.mode=this._mode,t.morphTime=this.morphTime,t.mapProjection=this.mapProjection,t.camera=e,t.cullingVolume=e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC),t.occluder=wbt(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof sn||this.camera.frustum instanceof Vr),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState;let{globe:n}=this;l(n)&&n._terrainExaggerationChanged&&(this.verticalExaggeration=n._terrainExaggeration,this.verticalExaggerationRelativeHeight=n._terrainExaggerationRelativeHeight,n._terrainExaggerationChanged=!1),t.verticalExaggeration=this.verticalExaggeration,t.verticalExaggerationRelativeHeight=this.verticalExaggerationRelativeHeight,l(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready?(t.specularEnvironmentMaps=this._specularEnvironmentMapAtlas.texture,t.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentMapAtlas.maximumMipmapLevel):(t.specularEnvironmentMaps=void 0,t.specularEnvironmentMapsMaximumLOD=void 0),t.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=Y.clone(this.invertClassificationColor,this._actualInvertClassificationColor),BV.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,l(this.globe)?t.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:t.maximumScreenSpaceError=2,this.clearPasses(t.passes),t.tilesetPassState=void 0};mi.prototype.isVisible=function(e,t,n){return l(e)&&(!l(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==Ht.OUTSIDE&&(!l(n)||!e.occlude||!e.boundingVolume.isOccluded(n)))};var fB=new A(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);fB=A.inverseTransformation(fB,fB);function Fbt(e,t,n,i){let o=t._frameState,r=o.context,s=e.boundingVolume;l(t._debugVolume)&&t._debugVolume.destroy();let a,c=h.clone(s.center);if(o.mode!==oe.SCENE3D){c=A.multiplyByPoint(fB,c,c);let p=o.mapProjection,g=p.unproject(c);c=p.ellipsoid.cartographicToCartesian(g)}if(l(s.radius)){let p=s.radius;a=An.toWireframe(Ds.createGeometry(new Ds({radii:new h(p,p,p),vertexFormat:ln.FLAT_VERTEX_FORMAT}))),t._debugVolume=new En({geometryInstances:new Tt({geometry:a,modelMatrix:A.fromTranslation(c),attributes:{color:new zt(1,0,0,1)}}),appearance:new ln({flat:!0,translucent:!1}),asynchronous:!1})}else{let p=s.halfAxes;a=An.toWireframe(bl.createGeometry(bl.fromDimensions({dimensions:new h(2,2,2),vertexFormat:ln.FLAT_VERTEX_FORMAT}))),t._debugVolume=new En({geometryInstances:new Tt({geometry:a,modelMatrix:A.fromRotationTranslation(p,c,new A),attributes:{color:new zt(1,0,0,1)}}),appearance:new ln({flat:!0,translucent:!1}),asynchronous:!1})}let d=o.commandList,u=o.commandList=[];t._debugVolume.update(o),e=u[0],o.useLogDepth&&(e=Qb.createLogDepthCommand(e,r).command);let m;l(i)&&(m=n.framebuffer,n.framebuffer=i),e.execute(r,n),l(m)&&(n.framebuffer=m),o.commandList=d}function Aa(e,t,n,i,o){let r=t._frameState;if(l(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof ii){e.execute(n,i);return}e.debugShowBoundingVolume&&l(e.boundingVolume)&&Fbt(e,t,i,o),r.useLogDepth&&l(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command);let s=r.passes;if(!s.pick&&!s.pickVoxel&&!s.depth&&t._hdr&&l(e.derivedCommands)&&l(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),s.pick||s.depth){if(s.pick&&!s.depth&&l(e.derivedCommands.picking)){e=e.derivedCommands.picking.pickCommand,e.execute(n,i);return}else if(l(e.derivedCommands.depth)){e=e.derivedCommands.depth.depthOnlyCommand,e.execute(n,i);return}}if(t.debugShowCommands||t.debugShowFrustums){t._debugInspector.executeDebugShowFrustumsCommand(t,e,i);return}r.shadowState.lightShadowsEnabled&&e.receiveShadows&&l(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(n,i):e.execute(n,i)}function Z9(e,t,n,i){let o=t._frameState,r=e.derivedCommands;l(r)&&(o.useLogDepth&&l(r.logDepth)&&(e=r.logDepth.command),r=e.derivedCommands,l(r.picking)?(e=r.picking.pickCommand,e.execute(n,i)):l(r.depth)&&(e=r.depth.depthOnlyCommand,e.execute(n,i)))}function U_e(e,t,n){return t.boundingVolume.distanceSquaredTo(n)-e.boundingVolume.distanceSquaredTo(n)}function Abt(e,t,n){return e.boundingVolume.distanceSquaredTo(n)-t.boundingVolume.distanceSquaredTo(n)+X.EPSILON12}function Mbt(e,t,n,i,o){let r=e.context;Hb(i,U_e,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,r,n);let s=i.length;for(let a=0;a<s;++a)t(i[a],e,r,n)}function Nbt(e,t,n,i,o){let r=e.context;Hb(i,Abt,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,r,n);let s=i.length;for(let a=0;a<s;++a)t(i[a],e,r,n)}function Ubt(e,t,n,i){let o=e.context;Hb(i,U_e,e.camera.positionWC);let r=i.length;for(let s=0;s<r;++s)t(i[s],e,o,n)}var kbt=new Ti,Dbt=new rl,Bbt=new sn,Ybt=new Vr;function $j(e,t){let{camera:n,context:i,frameState:o}=e,{uniformState:r}=i;r.updateCamera(n);let s;l(n.frustum.fov)?s=n.frustum.clone(kbt):l(n.frustum.infiniteProjectionMatrix)?s=n.frustum.clone(Dbt):l(n.frustum.width)?s=n.frustum.clone(Bbt):s=n.frustum.clone(Ybt),s.near=n.frustum.near,s.far=n.frustum.far,r.updateFrustum(s),r.updatePass(Le.ENVIRONMENT);let a=o.passes,c=a.pick||a.pickVoxel,d=e._environmentState,u=e._view,m=d.renderTranslucentDepthForPick,p=d.useWebVR;if(!c){let L=d.skyBoxCommand;if(l(L)&&Aa(L,e,i,t),d.isSkyAtmosphereVisible&&Aa(d.skyAtmosphereCommand,e,i,t),d.isSunVisible&&(d.sunDrawCommand.execute(i,t),e.sunBloom&&!p)){let E;d.useGlobeDepthFramebuffer?E=u.globeDepth.framebuffer:d.usePostProcess?E=u.sceneFramebuffer.framebuffer:E=d.originalFramebuffer,e._sunPostProcess.execute(i),e._sunPostProcess.copy(i,E),t.framebuffer=E}d.isMoonVisible&&d.moonCommand.execute(i,t)}let g;d.useOIT?(l(e._executeOITFunction)||(e._executeOITFunction=function(L,E,I,w,N){u.globeDepth.prepareColorTextures(i),u.oit.executeCommands(L,E,I,w,N)}),g=e._executeOITFunction):a.render?g=Mbt:g=Nbt;let f=u.frustumCommandsList,x=f.length,_=d.clearGlobeDepth,C=d.useDepthPlane,V=e._globeTranslucencyState,Z=V.translucent,R=e._view.globeTranslucencyFramebuffer,G=e._depthClearCommand,W=e._stencilClearCommand,v=e._classificationStencilClearCommand,P=e._depthPlane,F=d.usePostProcessSelected,M=n.position.z,b;for(let L=0;L<x;++L){let E=x-L-1,I=f[E];e.mode===oe.SCENE2D?(n.position.z=M-I.near+1,s.far=Math.max(1,I.far-I.near),s.near=1,r.update(o),r.updateFrustum(s)):(s.near=E!==0?I.near*e.opaqueFrustumNearOffset:I.near,s.far=I.far,r.updateFrustum(s)),G.execute(i,t),i.stencilBuffer&&W.execute(i,t),r.updatePass(Le.GLOBE);let w=I.commands[Le.GLOBE],N=I.indices[Le.GLOBE];if(Z)V.executeGlobeCommands(I,Aa,R,e,t);else for(b=0;b<N;++b)Aa(w[b],e,i,t);let B=u.globeDepth;if(l(B)&&d.useGlobeDepthFramebuffer&&B.executeCopyDepth(i,t),!d.renderTranslucentDepthForPick)if(r.updatePass(Le.TERRAIN_CLASSIFICATION),w=I.commands[Le.TERRAIN_CLASSIFICATION],N=I.indices[Le.TERRAIN_CLASSIFICATION],Z)V.executeGlobeClassificationCommands(I,Aa,R,e,t);else for(b=0;b<N;++b)Aa(w[b],e,i,t);if(_&&(G.execute(i,t),C&&P.execute(i,t)),!d.useInvertClassification||c||d.renderTranslucentDepthForPick){for(r.updatePass(Le.CESIUM_3D_TILE),w=I.commands[Le.CESIUM_3D_TILE],N=I.indices[Le.CESIUM_3D_TILE],b=0;b<N;++b)Aa(w[b],e,i,t);if(N>0&&(l(B)&&d.useGlobeDepthFramebuffer&&(B.prepareColorTextures(i,_),B.executeUpdateDepth(i,t,_,B.depthStencilTexture)),!d.renderTranslucentDepthForPick))for(r.updatePass(Le.CESIUM_3D_TILE_CLASSIFICATION),w=I.commands[Le.CESIUM_3D_TILE_CLASSIFICATION],N=I.indices[Le.CESIUM_3D_TILE_CLASSIFICATION],b=0;b<N;++b)Aa(w[b],e,i,t)}else{e._invertClassification.clear(i,t);let J=t.framebuffer;for(t.framebuffer=e._invertClassification._fbo.framebuffer,r.updatePass(Le.CESIUM_3D_TILE),w=I.commands[Le.CESIUM_3D_TILE],N=I.indices[Le.CESIUM_3D_TILE],b=0;b<N;++b)Aa(w[b],e,i,t);for(l(B)&&d.useGlobeDepthFramebuffer&&(e._invertClassification.prepareTextures(i),B.executeUpdateDepth(i,t,_,e._invertClassification._fbo.getDepthStencilTexture())),r.updatePass(Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),w=I.commands[Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],N=I.indices[Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],b=0;b<N;++b)Aa(w[b],e,i,t);for(t.framebuffer=J,e._invertClassification.executeClassified(i,t),o.invertClassificationColor.alpha===1&&e._invertClassification.executeUnclassified(i,t),N>0&&i.stencilBuffer&&v.execute(i,t),r.updatePass(Le.CESIUM_3D_TILE_CLASSIFICATION),w=I.commands[Le.CESIUM_3D_TILE_CLASSIFICATION],N=I.indices[Le.CESIUM_3D_TILE_CLASSIFICATION],b=0;b<N;++b)Aa(w[b],e,i,t)}for(N>0&&i.stencilBuffer&&W.execute(i,t),r.updatePass(Le.VOXELS),w=I.commands[Le.VOXELS],N=I.indices[Le.VOXELS],w.length=N,Ubt(e,Aa,t,w),r.updatePass(Le.OPAQUE),w=I.commands[Le.OPAQUE],N=I.indices[Le.OPAQUE],b=0;b<N;++b)Aa(w[b],e,i,t);E!==0&&e.mode!==oe.SCENE2D&&(s.near=I.near,r.updateFrustum(s));let k;if(!c&&d.useInvertClassification&&o.invertClassificationColor.alpha<1&&(k=e._invertClassification),r.updatePass(Le.TRANSLUCENT),w=I.commands[Le.TRANSLUCENT],w.length=I.indices[Le.TRANSLUCENT],g(e,Aa,t,w,k),I.indices[Le.CESIUM_3D_TILE_CLASSIFICATION]>0&&u.translucentTileClassification.isSupported()&&(u.translucentTileClassification.executeTranslucentCommands(e,Aa,t,w,B.depthStencilTexture),u.translucentTileClassification.executeClassificationCommands(e,Aa,t,I)),i.depthTexture&&e.useDepthPicking&&(d.useGlobeDepthFramebuffer||m)){let J=B.depthStencilTexture,z=e._picking.getPickDepth(e,E);z.update(i,J),z.executeCopyDepth(i,t)}if(c||!F)continue;let U=t.framebuffer;if(t.framebuffer=u.sceneFramebuffer.getIdFramebuffer(),s.near=E!==0?I.near*e.opaqueFrustumNearOffset:I.near,s.far=I.far,r.updateFrustum(s),r.updatePass(Le.GLOBE),w=I.commands[Le.GLOBE],N=I.indices[Le.GLOBE],Z)V.executeGlobeCommands(I,Z9,R,e,t);else for(b=0;b<N;++b)Z9(w[b],e,i,t);for(_&&(G.framebuffer=t.framebuffer,G.execute(i,t),G.framebuffer=void 0),_&&C&&P.execute(i,t),r.updatePass(Le.CESIUM_3D_TILE),w=I.commands[Le.CESIUM_3D_TILE],N=I.indices[Le.CESIUM_3D_TILE],b=0;b<N;++b)Z9(w[b],e,i,t);for(r.updatePass(Le.OPAQUE),w=I.commands[Le.OPAQUE],N=I.indices[Le.OPAQUE],b=0;b<N;++b)Z9(w[b],e,i,t);for(r.updatePass(Le.TRANSLUCENT),w=I.commands[Le.TRANSLUCENT],N=I.indices[Le.TRANSLUCENT],b=0;b<N;++b)Z9(w[b],e,i,t);t.framebuffer=U}}function k_e(e){e.context.uniformState.updatePass(Le.COMPUTE);let n=e._environmentState.sunComputeCommand;l(n)&&n.execute(e._computeEngine);let i=e._computeCommandList,o=i.length;for(let r=0;r<o;++r)i[r].execute(e._computeEngine)}function Obt(e,t){e.context.uniformState.updatePass(Le.OVERLAY);let i=e.context,o=e._overlayCommandList,r=o.length;for(let s=0;s<r;++s)o[s].execute(i,t)}function zbt(e,t,n){let i=n.shadowMapCullingVolume,o=n.isPointLight,r=n.passes,s=r.length,a=t.length;for(let c=0;c<a;++c){let d=t[c];if(e.updateDerivedCommands(d),d.castShadows&&(d.pass===Le.GLOBE||d.pass===Le.CESIUM_3D_TILE||d.pass===Le.OPAQUE||d.pass===Le.TRANSLUCENT)&&e.isVisible(d,i))if(o)for(let u=0;u<s;++u)r[u].commandList.push(d);else if(s===1)r[0].commandList.push(d);else{let u=!1;for(let m=s-1;m>=0;--m){let p=r[m].cullingVolume;if(e.isVisible(d,p))r[m].commandList.push(d),u=!0;else if(u)break}}}}function D_e(e){let t=e.frameState,n=t.shadowState.shadowMaps,i=n.length;if(!t.shadowState.shadowsEnabled)return;let o=e.context,r=o.uniformState;for(let s=0;s<i;++s){let a=n[s];if(a.outOfView)continue;let c=a.passes,d=c.length;for(let m=0;m<d;++m)c[m].commandList.length=0;let u=e.frameState.commandList;zbt(e,u,a);for(let m=0;m<d;++m){let p=a.passes[m];r.updateCamera(p.camera),a.updatePass(o,m);let g=p.commandList.length;for(let f=0;f<g;++f){let x=p.commandList[f];r.updatePass(x.pass),Aa(x.derivedCommands.shadows.castCommands[s],e,o,p.passState)}}}}var Kbt=new h;mi.prototype.updateAndExecuteCommands=function(e,t){let i=this._frameState.mode;this._environmentState.useWebVR?Hbt(this,e,t):i!==oe.SCENE2D||this._mapMode2D===Jl.ROTATE?Cy(!0,this,e,t):(e8(this,e,t),i0t(this,e))};function Hbt(e,t,n){let i=e._view,o=i.camera,s=e._environmentState.renderTranslucentDepthForPick;e8(e,t,n),B_e(e),i.createPotentiallyVisibleSet(e),k_e(e),s||D_e(e);let a=t.viewport;a.x=0,a.y=0,a.width=a.width*.5;let c=io.clone(o,e._cameraVR);c.frustum=o.frustum;let d=o.frustum.near,u=d*y(e.focalLength,5),m=y(e.eyeSeparation,u/30),p=h.multiplyByScalar(c.right,m*.5,Kbt);o.frustum.aspectRatio=a.width/a.height;let g=.5*m*d/u;h.add(c.position,p,o.position),o.frustum.xOffset=g,$j(e,t),a.x=a.width,h.subtract(c.position,p,o.position),o.frustum.xOffset=-g,$j(e,t),io.clone(c,o)}var Jbt=new he(Math.PI,X.PI_OVER_TWO),Qbt=new h,jbt=new h,qbt=new A,$bt=new A,e0t=new h,t0t=new h,n0t=new ze;function i0t(e,t){let n=e.context,i=e.frameState,o=e.camera,r=t.viewport,s=ze.clone(r,n0t);t.viewport=s;let a=Jbt,c=Qbt;e.mapProjection.project(a,c);let u=h.clone(o.position,jbt),m=A.clone(o.transform,$bt),p=o.frustum.clone();o._setTransform(A.IDENTITY);let g=A.computeViewportTransformation(s,0,1,qbt),f=o.frustum.projectionMatrix,x=o.positionWC.y,_=h.fromElements(X.sign(x)*c.x-x,0,-o.positionWC.x,e0t),C=Gt.pointToGLWindowCoordinates(f,g,_,t0t);C.x=Math.floor(C.x);let V=s.x,Z=s.width;if(x===0||C.x<=V||C.x>=V+Z)Cy(!0,e,t);else if(Math.abs(V+Z*.5-C.x)<1)s.width=C.x-s.x,o.position.x*=X.sign(o.position.x),o.frustum.right=0,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Cy(!0,e,t),s.x=C.x,o.position.x=-o.position.x,o.frustum.right=-o.frustum.left,o.frustum.left=0,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Cy(!1,e,t);else if(C.x>V+Z*.5){s.width=C.x-V;let R=o.frustum.right;o.frustum.right=c.x-x,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Cy(!0,e,t),s.x=C.x,s.width=V+Z-C.x,o.position.x=-o.position.x,o.frustum.left=-o.frustum.right,o.frustum.right=R-o.frustum.right*2,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Cy(!1,e,t)}else{s.x=C.x,s.width=V+Z-C.x;let R=o.frustum.left;o.frustum.left=-c.x-x,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Cy(!0,e,t),s.x=V,s.width=C.x-V,o.position.x=-o.position.x,o.frustum.right=-o.frustum.left,o.frustum.left=R-o.frustum.left*2,i.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.uniformState.update(i),Cy(!1,e,t)}o._setTransform(m),h.clone(u,o.position),o.frustum=p.clone(),t.viewport=r}function Cy(e,t,n,i){let o=t._environmentState,r=t._view,s=o.renderTranslucentDepthForPick;e||(t.frameState.commandList.length=0),B_e(t),r.createPotentiallyVisibleSet(t),e&&(l(i)&&e8(t,n,i),k_e(t),s||D_e(t)),$j(t,n)}var M_e=new ss;mi.prototype.updateEnvironment=function(){let e=this._frameState,t=this._view,n=this._environmentState,i=e.passes.render,o=e.passes.offscreen,r=this.atmosphere,s=this.skyAtmosphere,a=this.globe,c=this._globeTranslucencyState;if(!i||this._mode!==oe.SCENE2D&&t.camera.frustum instanceof sn||!c.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{if(l(s)){if(l(a))s.setDynamicLighting(yS.fromGlobeFlags(a)),n.isReadyForAtmosphere=n.isReadyForAtmosphere||!a.show||a._surface._tilesToRender.length>0;else{let C=r.dynamicLighting;s.setDynamicLighting(C),n.isReadyForAtmosphere=!0}n.skyAtmosphereCommand=s.update(e,a),l(n.skyAtmosphereCommand)&&this.updateDerivedCommands(n.skyAtmosphereCommand)}else n.skyAtmosphereCommand=void 0;n.skyBoxCommand=l(this.skyBox)?this.skyBox.update(e,this._hdr):void 0;let _=l(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;n.sunDrawCommand=l(_)?_.drawCommand:void 0,n.sunComputeCommand=l(_)?_.computeCommand:void 0,n.moonCommand=l(this.moon)?this.moon.update(e):void 0}let d=n.clearGlobeDepth=l(a)&&a.show&&(!a.depthTestAgainstTerrain||this.mode===oe.SCENE2D);(n.useDepthPlane=d&&this.mode===oe.SCENE3D&&c.useDepthPlane)&&this._depthPlane.update(e),n.renderTranslucentDepthForPick=!1,n.useWebVR=this._useWebVR&&this.mode!==oe.SCENE2D&&!o;let m=e.mode===oe.SCENE3D&&!c.sunVisibleThroughGlobe?e.occluder:void 0,p=e.cullingVolume,g=M_e.planes;for(let _=0;_<5;++_)g[_]=p.planes[_];p=M_e,n.isSkyAtmosphereVisible=l(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=this.isVisible(n.sunDrawCommand,p,m),n.isMoonVisible=this.isVisible(n.moonCommand,p,m);let f=this.specularEnvironmentMaps,x=this._specularEnvironmentMapAtlas;l(f)&&(!l(x)||x.url!==f)?(x=x&&x.destroy(),this._specularEnvironmentMapAtlas=new Vm(f)):!l(f)&&l(x)&&(x.destroy(),this._specularEnvironmentMapAtlas=void 0),l(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e)};function o0t(e){let t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new Uf({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),l(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function r0t(e){let t=e._frameState,n=t.shadowMaps,i=n.length,o=i>0&&!t.passes.pick&&!t.passes.pickVoxel&&e.mode===oe.SCENE3D;if(o!==t.shadowState.shadowsEnabled&&(++t.shadowState.lastDirtyTime,t.shadowState.shadowsEnabled=o),t.shadowState.lightShadowsEnabled=!1,!!o){for(let r=0;r<i;++r)if(n[r]!==t.shadowState.shadowMaps[r]){++t.shadowState.lastDirtyTime;break}t.shadowState.shadowMaps.length=0,t.shadowState.lightShadowMaps.length=0;for(let r=0;r<i;++r){let s=n[r];s.update(t),t.shadowState.shadowMaps.push(s),s.fromLightSource&&(t.shadowState.lightShadowMaps.push(s),t.shadowState.lightShadowsEnabled=!0),s.dirty&&(++t.shadowState.lastDirtyTime,s.dirty=!1)}}}function B_e(e){let t=e._frameState;e._groundPrimitives.update(t),e._primitives.update(t),o0t(e),r0t(e),e._globe&&e._globe.render(t)}function e8(e,t,n){let i=e._context,o=e._frameState,r=e._environmentState,s=e._view,a=e._frameState.passes,c=a.pick||a.pickVoxel;l(s.globeDepth)&&(s.globeDepth.picking=c);let d=r.useWebVR;r.originalFramebuffer=t.framebuffer,l(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!d?e._sunPostProcess=new qF:l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!l(e.sun)&&l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);let u=e._clearColorCommand;Y.clone(n,u.color),u.execute(i,t);let m=r.useGlobeDepthFramebuffer=l(s.globeDepth);m&&(s.globeDepth.update(i,t,s.viewport,e.msaaSamples,e._hdr,r.clearGlobeDepth),s.globeDepth.clear(i,t,n));let p=s.oit,g=r.useOIT=!c&&l(p)&&p.isSupported();g&&(p.update(i,t,s.globeDepth.colorFramebufferManager,e._hdr,e.msaaSamples),p.clear(i,t,n),r.useOIT=p.isSupported());let f=e.postProcessStages,x=r.usePostProcess=!c&&(e._hdr||f.length>0||f.ambientOcclusion.enabled||f.fxaa.enabled||f.bloom.enabled);if(r.usePostProcessSelected=!1,x&&(s.sceneFramebuffer.update(i,s.viewport,e._hdr,e.msaaSamples),s.sceneFramebuffer.clear(i,t,n),f.update(i,o.useLogDepth,e._hdr),f.clear(i),x=r.usePostProcess=f.ready,r.usePostProcessSelected=x&&f.hasSelected),r.isSunVisible&&e.sunBloom&&!d?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(i,t,n)):m?t.framebuffer=s.globeDepth.framebuffer:x&&(t.framebuffer=s.sceneFramebuffer.framebuffer),l(t.framebuffer)&&u.execute(i,t),r.useInvertClassification=!c&&l(t.framebuffer)&&e.invertClassification){let C;if(e.frameState.invertClassificationColor.alpha===1&&r.useGlobeDepthFramebuffer&&(C=s.globeDepth.framebuffer),l(C)||i.depthTexture){if(e._invertClassification.previousFramebuffer=C,e._invertClassification.update(i,e.msaaSamples,s.globeDepth.colorFramebufferManager),e._invertClassification.clear(i,t),e.frameState.invertClassificationColor.alpha<1&&g){let V=e._invertClassification.unclassifiedCommand,Z=V.derivedCommands;Z.oit=p.createDerivedCommands(V,i,Z.oit)}}else r.useInvertClassification=!1}e._globeTranslucencyState.translucent&&s.globeTranslucencyFramebuffer.updateAndClear(e._hdr,s.viewport,i,t)}mi.prototype.resolveFramebuffers=function(e){let t=this._context,n=this._environmentState,i=this._view,o=i.globeDepth;l(o)&&o.prepareColorTextures(t);let r=n.useOIT,s=n.useGlobeDepthFramebuffer,a=n.usePostProcess,c=n.originalFramebuffer,d=s?o.colorFramebufferManager:void 0,u=i.sceneFramebuffer._colorFramebuffer,m=i.sceneFramebuffer.idFramebuffer;r&&(e.framebuffer=a?u.framebuffer:c,i.oit.execute(t,e));let p=i.translucentTileClassification;if(p.hasTranslucentDepth&&p.isSupported()&&p.execute(this,e),a){i.sceneFramebuffer.prepareColorTextures(t);let g=u;s&&!r&&(g=d);let f=this.postProcessStages,x=g.getColorTexture(0),_=m.getColorTexture(0),C=y(d,u).getDepthStencilTexture();f.execute(t,x,C,_),f.copy(t,c)}!r&&!a&&s&&(e.framebuffer=c,o.executeCopyColor(t,e))};function s0t(e){let t=e._frameState.afterRender;for(let n=0,i=t.length;n<i;++n)t[n]()&&e.requestRender();t.length=0}function a0t(e){if(e.mode===oe.MORPHING)return;let n=e.camera.positionCartographic;return e.getHeight(n)}mi.prototype.getHeight=function(e,t){if(!l(e))return;let n=t===Je.CLAMP_TO_TERRAIN||t===Je.RELATIVE_TO_TERRAIN,i=t===Je.CLAMP_TO_3D_TILE||t===Je.RELATIVE_TO_3D_TILE;if(!l(e))return;let o=Number.NEGATIVE_INFINITY;if(!n){let s=this.primitives.length;for(let a=0;a<s;++a){let c=this.primitives.get(a);if(!c.isCesium3DTileset||!c.show||!c.enableCollision)continue;let d=c.getHeight(e,this);l(d)&&d>o&&(o=d)}}let r=this._globe;if(!i&&l(r)&&r.show){let s=r.getHeight(e);s>o&&(o=s)}if(o>Number.NEGATIVE_INFINITY)return o};var qj=new he;mi.prototype.updateHeight=function(e,t,n){let i=()=>{he.clone(e,qj);let g=this.getHeight(e,n);l(g)&&(qj.height=g,t(qj))},o=n===Je.CLAMP_TO_TERRAIN||n===Je.RELATIVE_TO_TERRAIN,r=n===Je.CLAMP_TO_3D_TILE||n===Je.RELATIVE_TO_3D_TILE,s;!r&&l(this.globe)&&(s=this.globe._surface.updateHeight(e,i));let a={},c=this._ellipsoid,d=g=>{if(o||g.isDestroyed()||!g.isCesium3DTileset)return;let f=g.updateHeight(e,i,c);a[g.id]=f};if(!o){let g=this.primitives.length;for(let f=0;f<g;++f){let x=this.primitives.get(f);d(x)}}let u=this.primitives.primitiveAdded.addEventListener(d),m=this.primitives.primitiveRemoved.addEventListener(g=>{g.isDestroyed()||!g.isCesium3DTileset||(l(a[g.id])&&a[g.id](),delete a[g.id])});return()=>{s=s&&s(),Object.values(a).forEach(g=>g()),a={},u(),m()}};function c0t(e){let t=e.camera,n=e._mode,i=e._screenSpaceCameraController,o=t.positionCartographic;if(!l(o))return!1;if(!i.onMap()&&o.height<0)return!0;if(n===oe.SCENE2D||n===oe.MORPHING)return!1;let r=e._globeHeight;return l(r)&&o.height<r}mi.prototype.initializeFrame=function(){if(this._shaderFrameCount++===120&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeightDirty){l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),this._globeHeight=a0t(this),this._globeHeightDirty=!1;let e=this.camera.positionCartographic;this._removeUpdateHeightCallback=this.updateHeight(e,t=>{this.isDestroyed()||(this._globeHeight=t.height)})}this._cameraUnderground=c0t(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),l(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};function l0t(e,t){if(e.debugShowFramesPerSecond){if(!l(e._performanceDisplay)){let n=document.createElement("div");n.className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(n);let o=new jb({container:n});e._performanceDisplay=o,e._performanceContainer=n}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)}else l(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function d0t(e){e._jobScheduler.resetBudgets();let t=e._frameState;e.primitives.prePassesUpdate(t),l(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function u0t(e){let t=e._frameState;e.primitives.postPassesUpdate(t),Ka.update()}var m0t=new Y;function h0t(e){let t=e._frameState,n=e.context,i=n.uniformState,o=e._defaultView;e._view=o,e.updateFrameState(),t.passes.render=!0,t.passes.postProcess=e.postProcessStages.hasSelected,t.tilesetPassState=Pbt;let r=y(e.backgroundColor,Y.BLACK);e._hdr&&(r=Y.clone(r,m0t),r.red=Math.pow(r.red,e.gamma),r.green=Math.pow(r.green,e.gamma),r.blue=Math.pow(r.blue,e.gamma)),t.backgroundColor=r,t.atmosphere=e.atmosphere,e.fog.update(t),i.update(t);let s=e.shadowMap;l(s)&&s.enabled&&(!l(e.light)||e.light instanceof Jb?h.negate(i.sunDirectionWC,e._shadowMapCamera.direction):h.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(s)),e._computeCommandList.length=0,e._overlayCommandList.length=0;let a=o.viewport;a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight;let c=o.passState;c.framebuffer=void 0,c.blendingEnabled=void 0,c.scissorTest=void 0,c.viewport=ze.clone(a,c.viewport),l(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(c,r),e.resolveFramebuffers(c),c.framebuffer=void 0,Obt(e,c),l(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),n.endFrame()}function OS(e,t){try{t(e)}catch(n){if(e._renderError.raiseEvent(e,n),e.rethrowRenderErrors)throw n}}function f0t(e){return e._picking.updateMostDetailedRayPicks(e)}mi.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);let t=this._frameState;t.newFrame=!1,l(e)||(e=ne.now());let n=this._view.checkForCameraUpdates(this);n&&(this._globeHeightDirty=!0);let i=!this.requestRenderMode||this._renderRequested||n||this._logDepthBufferDirty||this._hdrDirty||this.mode===oe.MORPHING;if(!i&&l(this.maximumRenderTimeChange)&&l(this._lastRenderTime)){let o=Math.abs(ne.secondsDifference(this._lastRenderTime,e));i=i||o>this.maximumRenderTimeChange}if(i){this._lastRenderTime=ne.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1;let o=X.incrementWrap(t.frameNumber,15e6,1);N_e(this,o,e),t.newFrame=!0}OS(this,d0t),this.primitives.show&&(OS(this,f0t),OS(this,p0t),OS(this,b0t),i||OS(this,g0t)),this._postUpdate.raiseEvent(this,e),i&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),OS(this,h0t)),l0t(this,i),OS(this,u0t),s0t(this),i&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())};mi.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)};mi.prototype.requestRender=function(){this._renderRequested=!0};mi.prototype.clampLineWidth=function(e){return Math.max(Mt.minimumAliasedLineWidth,Math.min(e,Mt.maximumAliasedLineWidth))};mi.prototype.pick=function(e,t,n){return this._picking.pick(this,e,t,n)};mi.prototype.pickVoxel=function(e,t,n){let i=this.pick(e,t,n);if(!l(i))return;let o=i.primitive;if(!(o instanceof Ty))return;let r=this._picking.pickVoxelCoordinate(this,e,t,n),s=255*r[0]+r[1],a=o._traversal.findKeyframeNode(s);if(!l(a))return;let c=255*r[2]+r[3];return t9.fromKeyframeNode(o,s,c,a)};mi.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)};mi.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)};mi.prototype.drillPick=function(e,t,n,i){return this._picking.drillPick(this,e,t,n,i)};function p0t(e){let t=e._frameState;Jj.camera=t.camera,Jj.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,Jj)}function b0t(e){let t=e._frameState;if(!t.camera.canPreloadFlight())return;Qj.camera=e.preloadFlightCamera,Qj.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,Qj)}function g0t(e){e.primitives.updateForPass(e._frameState,vbt)}mi.prototype.pickFromRay=function(e,t,n){return this._picking.pickFromRay(this,e,t,n)};mi.prototype.drillPickFromRay=function(e,t,n,i){return this._picking.drillPickFromRay(this,e,t,n,i)};mi.prototype.pickFromRayMostDetailed=function(e,t,n){return this._picking.pickFromRayMostDetailed(this,e,t,n)};mi.prototype.drillPickFromRayMostDetailed=function(e,t,n,i){return this._picking.drillPickFromRayMostDetailed(this,e,t,n,i)};mi.prototype.sampleHeight=function(e,t,n){return this._picking.sampleHeight(this,e,t,n)};mi.prototype.clampToHeight=function(e,t,n,i){return this._picking.clampToHeight(this,e,t,n,i)};mi.prototype.sampleHeightMostDetailed=function(e,t,n){return this._picking.sampleHeightMostDetailed(this,e,t,n)};mi.prototype.clampToHeightMostDetailed=function(e,t,n){return this._picking.clampToHeightMostDetailed(this,e,t,n)};mi.prototype.cartesianToCanvasCoordinates=function(e,t){return ki.worldToWindowCoordinates(this,e,t)};mi.prototype.completeMorph=function(){this._transitioner.completeMorph()};mi.prototype.morphTo2D=function(e){e=y(e,2),this._transitioner.morphTo2D(e,this._ellipsoid)};mi.prototype.morphToColumbusView=function(e){e=y(e,2),this._transitioner.morphToColumbusView(e,this._ellipsoid)};mi.prototype.morphTo3D=function(e){e=y(e,2),this._transitioner.morphTo3D(e,this._ellipsoid)};function y0t(e,t){if(e._removeTerrainProviderReadyListener=e._removeTerrainProviderReadyListener&&e._removeTerrainProviderReadyListener(),t.ready){l(e.globe)&&(e.globe.terrainProvider=t.provider);return}e.globe.terrainProvider=void 0,e._removeTerrainProviderReadyListener=t.readyEvent.addEventListener(n=>{l(e)&&l(e.globe)&&(e.globe.terrainProvider=n),e._removeTerrainProviderReadyListener()})}mi.prototype.setTerrain=function(e){return y0t(this,e),e};mi.prototype.isDestroyed=function(){return!1};mi.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),l(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(let e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),me(this)};var L9=mi;var Mki=S(T(),1);function $V(e){e=y(e,te.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;let t=1.025,n=h.multiplyByScalar(e.radii,t,new h);this._scaleMatrix=A.fromScale(n),this._modelMatrix=new A,this._command=new tt({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new h(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new h(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new h;let i=new h;i.x=e.maximumRadius*t,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;let o=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return o._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return o._hueSaturationBrightness.x=o.hueShift,o._hueSaturationBrightness.y=o.saturationShift,o._hueSaturationBrightness.z=o.brightnessShift,o._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return o.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return o.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return o.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return o.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return o.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return o.atmosphereMieAnisotropy}}}Object.defineProperties($V.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});$V.prototype.setDynamicLighting=function(e){this._radiiAndDynamicAtmosphereColor.z=e};var t8=new A;$V.prototype.update=function(e,t){if(!this.show)return;let n=e.mode;if(n!==oe.SCENE3D&&n!==oe.MORPHING||!e.passes.render)return;let i=A.fromRotationTranslation(e.context.uniformState.inverseViewRotation,h.ZERO,t8),o=A.multiplyTransformation(i,Go.Y_UP_TO_Z_UP,t8),r=A.multiply(this._scaleMatrix,o,t8);A.clone(r,this._modelMatrix);let s=e.context,a=x0t(this),c=e.globeTranslucencyState.translucent,d=this.perFragmentAtmosphere||c||!l(t)||!t.show,u=this._command;if(!l(u.vertexArray)){let p=Ds.createGeometry(new Ds({radii:new h(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:Xe.POSITION_ONLY}));u.vertexArray=ei.fromGeometry({context:s,geometry:p,attributeLocations:An.createAttributeLocations(p),bufferUsage:Ne.STATIC_DRAW}),u.renderState=De.fromCache({cull:{enabled:!0,face:pi.FRONT},blending:un.ALPHA_BLEND,depthMask:!1})}let m=a|d<<2|c<<3;if(m!==this._flags){this._flags=m;let p=[];a&&p.push("COLOR_CORRECT"),d&&p.push("PER_FRAGMENT_ATMOSPHERE"),c&&p.push("GLOBE_TRANSLUCENT");let g=new Ye({defines:p,sources:[Ub,_V,Jv]}),f=new Ye({defines:p,sources:[Ub,_V,Hv]});this._spSkyAtmosphere=qt.fromCache({context:s,vertexShaderSource:g,fragmentShaderSource:f}),u.shaderProgram=this._spSkyAtmosphere}return u};function x0t(e){return!(X.equalsEpsilon(e.hueShift,0,X.EPSILON7)&&X.equalsEpsilon(e.saturationShift,0,X.EPSILON7)&&X.equalsEpsilon(e.brightnessShift,0,X.EPSILON7))}$V.prototype.isDestroyed=function(){return!1};$V.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),me(this)};var R9=$V;var uDi=S(T(),1);var Dki=S(T(),1);function _0t(e,t,n){let i={flipY:!0,skipColorSpaceConversion:n,preferImageBitmap:!0},o=[Ee.createIfNeeded(t.positiveX).fetchImage(i),Ee.createIfNeeded(t.negativeX).fetchImage(i),Ee.createIfNeeded(t.positiveY).fetchImage(i),Ee.createIfNeeded(t.negativeY).fetchImage(i),Ee.createIfNeeded(t.positiveZ).fetchImage(i),Ee.createIfNeeded(t.negativeZ).fetchImage(i)];return Promise.all(o).then(function(r){return new ja({context:e,source:{positiveX:r[0],negativeX:r[1],positiveY:r[2],negativeY:r[3],positiveZ:r[4],negativeZ:r[5]}})})}var G9=_0t;function tZ(e){this.sources=e.sources,this._sources=void 0,this.show=y(e.show,!0),this._command=new tt({modelMatrix:A.clone(A.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}tZ.prototype.update=function(e,t){let n=this;if(!this.show||e.mode!==oe.SCENE3D&&e.mode!==oe.MORPHING||!e.passes.render)return;let i=e.context;if(this._sources!==this.sources){this._sources=this.sources;let r=this.sources;typeof r.positiveX=="string"?G9(i,this._sources).then(function(s){n._cubeMap=n._cubeMap&&n._cubeMap.destroy(),n._cubeMap=s}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new ja({context:i,source:r}))}let o=this._command;if(!l(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return n._cubeMap}};let r=bl.createGeometry(bl.fromDimensions({dimensions:new h(2,2,2),vertexFormat:Xe.POSITION_ONLY})),s=this._attributeLocations=An.createAttributeLocations(r);o.vertexArray=ei.fromGeometry({context:i,geometry:r,attributeLocations:s,bufferUsage:Ne.STATIC_DRAW}),o.renderState=De.fromCache({blending:un.ALPHA_BLEND})}if(!l(o.shaderProgram)||this._useHdr!==t){let r=new Ye({defines:[t?"HDR":""],sources:[Qv]});o.shaderProgram=qt.fromCache({context:i,vertexShaderSource:jv,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),this._useHdr=t}if(l(this._cubeMap))return o};tZ.prototype.isDestroyed=function(){return!1};tZ.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),me(this)};function eZ(e){return tn(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}tZ.createEarthSkyBox=function(){return new tZ({sources:{positiveX:eZ("px"),negativeX:eZ("mx"),positiveY:eZ("py"),negativeY:eZ("my"),positiveZ:eZ("pz"),negativeZ:eZ("mz")}})};var E9=tZ;var UDi=S(T(),1);function I9(){this.show=!0,this._drawCommand=new tt({primitiveType:Fe.TRIANGLES,boundingVolume:new le,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new le,this._boundingVolume2D=new le,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;let e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(I9.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var S0t=new D,T0t=new D,C0t=new se,W9=new se;I9.prototype.update=function(e,t,n){if(!this.show)return;let i=e.mode;if(i===oe.SCENE2D||i===oe.MORPHING||!e.passes.render)return;let o=e.context,r=t.viewport.width,s=t.viewport.height;if(!l(this._texture)||r!==this._drawingBufferWidth||s!==this._drawingBufferHeight||this._glowFactorDirty||n!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=r,this._drawingBufferHeight=s,this._glowFactorDirty=!1,this._useHdr=n;let R=Math.max(r,s);R=Math.pow(2,Math.ceil(Math.log(R)/Math.log(2))-2),R=Math.max(1,R);let G=n?o.halfFloatingPointTexture?Ke.HALF_FLOAT:Ke.FLOAT:Ke.UNSIGNED_BYTE;this._texture=new Et({context:o,width:R,height:R,pixelFormat:at.RGBA,pixelDatatype:G}),this._glowLengthTS=this._glowFactor*5,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;let W=this,v={u_radiusTS:function(){return W._radiusTS}};this._commands.computeCommand=new Tl({fragmentShaderSource:$v,outputTexture:this._texture,uniformMap:v,persists:!1,owner:this,postExecute:function(){W._commands.computeCommand=void 0}})}let a=this._drawCommand;if(!l(a.vertexArray)){let R={direction:0},G=new Uint8Array(4*2);G[0]=0,G[1]=0,G[2]=255,G[3]=0,G[4]=255,G[5]=255,G[6]=0,G[7]=255;let W=ft.createVertexBuffer({context:o,typedArray:G,usage:Ne.STATIC_DRAW}),v=[{index:R.direction,vertexBuffer:W,componentsPerAttribute:2,normalize:!0,componentDatatype:Q.UNSIGNED_BYTE}],P=ft.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT});a.vertexArray=new ei({context:o,attributes:v,indexBuffer:P}),a.shaderProgram=qt.fromCache({context:o,vertexShaderSource:ew,fragmentShaderSource:qv,attributeLocations:R}),a.renderState=De.fromCache({blending:un.ALPHA_BLEND}),a.uniformMap=this._uniformMap}let c=o.uniformState.sunPositionWC,d=o.uniformState.sunPositionColumbusView,u=this._boundingVolume,m=this._boundingVolume2D;h.clone(c,u.center),m.center.x=d.z,m.center.y=d.x,m.center.z=d.y,u.radius=X.SOLAR_RADIUS+X.SOLAR_RADIUS*this._glowLengthTS,m.radius=u.radius,i===oe.SCENE3D?le.clone(u,a.boundingVolume):i===oe.COLUMBUS_VIEW&&le.clone(m,a.boundingVolume);let p=ki.computeActualEllipsoidPosition(e,c,W9),g=h.magnitude(h.subtract(p,e.camera.position,W9)),f=o.uniformState.projection,x=C0t;x.x=0,x.y=0,x.z=-g,x.w=1;let _=A.multiplyByVector(f,x,W9),C=ki.clipToGLWindowCoordinates(t.viewport,_,S0t);x.x=X.SOLAR_RADIUS;let V=A.multiplyByVector(f,x,W9),Z=ki.clipToGLWindowCoordinates(t.viewport,V,T0t);return this._size=D.magnitude(D.subtract(Z,C,W9)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};I9.prototype.isDestroyed=function(){return!1};I9.prototype.destroy=function(){let e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),me(this)};var X9=I9;function V0t(e){e._renderLoopRunning=!0;let t=0;function n(i){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{let o=e._targetFrameRate;if(!l(o))e.resize(),e.render(),requestAnimationFrame(n);else{let r=1e3/o,s=i-t;s>r&&(e.resize(),e.render(),t=i-s%r),requestAnimationFrame(n)}}catch(o){e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors&&e.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,o)}else e._renderLoopRunning=!1}requestAnimationFrame(n)}function Y_e(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,l(e._scene)&&(e._scene.pixelRatio=t),t}function O_e(e){let t=e._canvas,n=t.clientWidth,i=t.clientHeight,o=Y_e(e);e._canvasClientWidth=n,e._canvasClientHeight=i,n*=o,i*=o,t.width=n,t.height=i,e._canRender=n!==0&&i!==0,e._lastDevicePixelRatio=window.devicePixelRatio}function z_e(e){let t=e._canvas,n=t.width,i=t.height;if(n!==0&&i!==0){let o=e._scene.camera.frustum;l(o.aspectRatio)?o.aspectRatio=n/i:(o.top=o.right*(i/n),o.bottom=-o.top)}}function zS(e,t){e=In(e),t=y(t,y.EMPTY_OBJECT);let n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);let i=document.createElement("canvas"),o=Yt.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=Yt.imageRenderingValue()),i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1};function r(){i!==i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()}y(t.blurActiveElementOnCanvasFocus,!0)&&(i.addEventListener("mousedown",r),i.addEventListener("pointerdown",r)),n.appendChild(i);let a=document.createElement("div");a.className="cesium-widget-credits";let c=l(t.creditContainer)?In(t.creditContainer):n;c.appendChild(a);let d=l(t.creditViewport)?In(t.creditViewport):n,u=y(t.showRenderLoopErrors,!0),m=y(t.useBrowserRecommendedResolution,!0);this._element=n,this._container=e,this._canvas=i,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=d,this._creditContainer=c,this._innerCreditContainer=a,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=u,this._resolutionScale=1,this._useBrowserRecommendedResolution=m,this._forceResize=!1,this._clock=l(t.clock)?t.clock:new jm,O_e(this);try{let p=y(t.ellipsoid,te.default),g=new L9({canvas:i,contextOptions:t.contextOptions,creditContainer:a,creditViewport:d,ellipsoid:p,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:y(t.scene3DOnly,!1),shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples});this._scene=g,g.camera.constrainedAxis=h.UNIT_Z,Y_e(this),z_e(this);let f=t.globe;l(f)||(f=new Lw(p)),f!==!1&&(g.globe=f,g.globe.shadows=y(t.terrainShadows,xn.RECEIVE_ONLY));let x=t.skyBox;!l(x)&&te.WGS84.equals(p)&&(x=E9.createEarthSkyBox()),x!==!1&&(g.skyBox=x,g.sun=new X9,te.WGS84.equals(p)&&(g.moon=new Pw));let _=t.skyAtmosphere;!l(_)&&te.WGS84.equals(p)&&(_=new R9(p),_.show=t.globe!==!1&&f.show),_!==!1&&(g.skyAtmosphere=_);let C=t.baseLayer;t.globe!==!1&&C!==!1&&(l(C)||(C=ma.fromWorldImagery()),g.imageryLayers.add(C)),l(t.terrainProvider)&&t.globe!==!1&&(g.terrainProvider=t.terrainProvider),l(t.terrain)&&t.globe!==!1&&g.setTerrain(t.terrain),this._screenSpaceEventHandler=new Od(i),l(t.sceneMode)&&(t.sceneMode===oe.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===oe.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=y(t.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;let V=this;this._onRenderError=function(Z,R){V._useDefaultRenderLoop=!1,V._renderLoopRunning=!1,V._showRenderLoopErrors&&V.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,R)},g.renderError.addEventListener(this._onRenderError)}catch(p){throw u&&this.showErrorPanel("Error constructing CesiumWidget.",'Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:',p),p}}Object.defineProperties(zS.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},creditDisplay:{get:function(){return this._scene.frameState.creditDisplay}},camera:{get:function(){return this._scene.camera}},ellipsoid:{get:function(){return this._scene.ellipsoid}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&V0t(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){this._resolutionScale!==e&&(this._resolutionScale=e,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}}});zS.prototype.showErrorPanel=function(e,t,n){let i=this._element,o=document.createElement("div");o.className="cesium-widget-errorPanel";let r=document.createElement("div");r.className="cesium-widget-errorPanel-content",o.appendChild(r);let s=document.createElement("div");s.className="cesium-widget-errorPanel-header",s.appendChild(document.createTextNode(e)),r.appendChild(s);let a=document.createElement("div");a.className="cesium-widget-errorPanel-scroll",r.appendChild(a);function c(){a.style.maxHeight=`${Math.max(Math.round(i.clientHeight*.9-100),30)}px`}c(),l(window.addEventListener)&&window.addEventListener("resize",c,!1);let d=l(t),u=l(n);if(d||u){let g=document.createElement("div");if(g.className="cesium-widget-errorPanel-message",a.appendChild(g),u){let f=vf(n);d||(typeof n=="string"&&(n=new Error(n)),t=vf({name:n.name,message:n.message}),f=n.stack),typeof console<"u"&&console.error(`${e} ${t} -${f}`);let x=document.createElement("div");x.className="cesium-widget-errorPanel-message-details collapsed";let _=document.createElement("span");_.className="cesium-widget-errorPanel-more-details",_.appendChild(document.createTextNode("See more...")),x.appendChild(_),x.onclick=function(C){x.removeChild(_),x.appendChild(document.createTextNode(f)),x.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",x.onclick=void 0},a.appendChild(x)}g.innerHTML=`<p>${t}</p>`}let m=document.createElement("div");m.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(m);let p=document.createElement("button");p.setAttribute("type","button"),p.className="cesium-button",p.appendChild(document.createTextNode("OK")),p.onclick=function(){l(c)&&l(window.removeEventListener)&&window.removeEventListener("resize",c,!1),i.removeChild(o)},m.appendChild(p),i.appendChild(o)};nS.prototype.isDestroyed=function(){return!1};nS.prototype.destroy=function(){l(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),me(this)};nS.prototype.resize=function(){let e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,pTe(this),bTe(this),this._scene.requestRender())};nS.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();let e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};var B9=nS;var nKi=T(S(),1);var iyt=new h(1,1,1);function Q8(e){e=y(e,iyt),this._dimensions=h.clone(e)}Object.defineProperties(Q8.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){h.clone(e,this._dimensions)}}});var oyt=new h;Q8.prototype.emit=function(e){let t=this._dimensions,n=h.multiplyByScalar(t,.5,oyt),i=W.randomBetween(-n.x,n.x),o=W.randomBetween(-n.y,n.y),r=W.randomBetween(-n.z,n.z);e.position=h.fromElements(i,o,r,e.position),e.velocity=h.normalize(e.position,e.velocity)};var j8=Q8;var rKi=T(S(),1);function $f(){this.featurePropertiesDirty=!1}Object.defineProperties($f.prototype,{featuresLength:{get:function(){fe.throwInstantiationError()}},pointsLength:{get:function(){fe.throwInstantiationError()}},trianglesLength:{get:function(){fe.throwInstantiationError()}},geometryByteLength:{get:function(){fe.throwInstantiationError()}},texturesByteLength:{get:function(){fe.throwInstantiationError()}},batchTableByteLength:{get:function(){fe.throwInstantiationError()}},innerContents:{get:function(){fe.throwInstantiationError()}},ready:{get:function(){fe.throwInstantiationError()}},tileset:{get:function(){fe.throwInstantiationError()}},tile:{get:function(){fe.throwInstantiationError()}},url:{get:function(){fe.throwInstantiationError()}},batchTable:{get:function(){fe.throwInstantiationError()}},metadata:{get:function(){fe.throwInstantiationError()},set:function(e){fe.throwInstantiationError()}},group:{get:function(){fe.throwInstantiationError()},set:function(e){fe.throwInstantiationError()}}});$f.prototype.hasProperty=function(e,t){fe.throwInstantiationError()};$f.prototype.getFeature=function(e){fe.throwInstantiationError()};$f.prototype.applyDebugSettings=function(e,t){fe.throwInstantiationError()};$f.prototype.applyStyle=function(e){fe.throwInstantiationError()};$f.prototype.update=function(e,t){fe.throwInstantiationError()};$f.prototype.pick=function(e,t,n){fe.throwInstantiationError()};$f.prototype.isDestroyed=function(){fe.throwInstantiationError()};$f.prototype.destroy=function(){fe.throwInstantiationError()};var q8=$f;var yKi=T(S(),1);var dKi=T(S(),1);function mL(e,t){this._conditionsExpression=Oe(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,syt(this,t)}Object.defineProperties(mL.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}});function ryt(e,t){this.condition=e,this.expression=t}function syt(e,t){let n=[],i=e._conditions;if(!l(i))return;let o=i.length;for(let r=0;r<o;++r){let s=i[r],a=String(s[0]),c=String(s[1]);n.push(new ryt(new fu(a,t),new fu(c,t)))}e._runtimeConditions=n}mL.prototype.evaluate=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluate(e,t)}};mL.prototype.evaluateColor=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluateColor(e,t)}};mL.prototype.getShaderFunction=function(e,t,n,i){let o=this._runtimeConditions;if(!l(o)||o.length===0)return;let r="",s=o.length;for(let a=0;a<s;++a){let c=o[a],d=c.condition.getShaderExpression(t,n),u=c.expression.getShaderExpression(t,n);r+=` ${a===0?"if":"else if"} (${d}) +${f}`);let x=document.createElement("div");x.className="cesium-widget-errorPanel-message-details collapsed";let _=document.createElement("span");_.className="cesium-widget-errorPanel-more-details",_.appendChild(document.createTextNode("See more...")),x.appendChild(_),x.onclick=function(C){x.removeChild(_),x.appendChild(document.createTextNode(f)),x.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",x.onclick=void 0},a.appendChild(x)}g.innerHTML=`<p>${t}</p>`}let m=document.createElement("div");m.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(m);let p=document.createElement("button");p.setAttribute("type","button"),p.className="cesium-button",p.appendChild(document.createTextNode("OK")),p.onclick=function(){l(c)&&l(window.removeEventListener)&&window.removeEventListener("resize",c,!1),i.removeChild(o)},m.appendChild(p),i.appendChild(o)};zS.prototype.isDestroyed=function(){return!1};zS.prototype.destroy=function(){l(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),me(this)};zS.prototype.resize=function(){let e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,O_e(this),z_e(this),this._scene.requestRender())};zS.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();let e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};var P9=zS;var vBi=S(T(),1);var hBi=S(T(),1);function oZ(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}var KS=new ce;function Z0t(e,t,n,i){let o=i.length;for(let r=0;r<o;++r){let s=i[r];if(s.x===t&&s.y===n&&s.level===e)return!0}return!1}oZ.prototype.addAvailableTileRange=function(e,t,n,i,o){let r=this._tilingScheme,s=this._rootNodes;if(e===0)for(let p=n;p<=o;++p)for(let g=t;g<=i;++g)Z0t(e,g,p,s)||s.push(new nZ(r,void 0,0,g,p));r.tileXYToRectangle(t,n,e,KS);let a=KS.west,c=KS.north;r.tileXYToRectangle(i,o,e,KS);let d=KS.east,u=KS.south,m=new W0t(e,a,u,d,c);for(let p=0;p<s.length;++p){let g=s[p];n8(g.extent,m)&&I0t(this._maximumLevel,g,m)}};oZ.prototype.computeMaximumLevelAtPosition=function(e){let t;for(let n=0;n<this._rootNodes.length;++n){let i=this._rootNodes[n];if(iZ(i.extent,e)){t=i;break}}return l(t)?v9(void 0,t,e):-1};var L0t=[],R0t=[],G0t=new ce,E0t=new ce;oZ.prototype.computeBestAvailableLevelOverRectangle=function(e){let t=L0t;t.length=0,e.east<e.west?(t.push(ce.fromRadians(-Math.PI,e.south,e.east,e.north,G0t)),t.push(ce.fromRadians(e.west,e.south,Math.PI,e.north,E0t))):t.push(e);let n=R0t;n.length=0;let i;for(i=0;i<this._rootNodes.length;++i)w9(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(l(n[i])&&n[i].length===0)return i;return 0};var K_e=new he;oZ.prototype.isTileAvailable=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(t,n,e,KS);return ce.center(i,K_e),this.computeMaximumLevelAtPosition(K_e)>=e};oZ.prototype.computeChildMaskForTile=function(e,t,n){let i=e+1;if(i>=this._maximumLevel)return 0;let o=0;return o|=this.isTileAvailable(i,2*t,2*n+1)?1:0,o|=this.isTileAvailable(i,2*t+1,2*n+1)?2:0,o|=this.isTileAvailable(i,2*t,2*n)?4:0,o|=this.isTileAvailable(i,2*t+1,2*n)?8:0,o};function nZ(e,t,n,i,o){this.tilingScheme=e,this.parent=t,this.level=n,this.x=i,this.y=o,this.extent=e.tileXYToRectangle(i,o,n),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}Object.defineProperties(nZ.prototype,{nw:{get:function(){return this._nw||(this._nw=new nZ(this.tilingScheme,this,this.level+1,this.x*2,this.y*2)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new nZ(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new nZ(this.tilingScheme,this,this.level+1,this.x*2,this.y*2+1)),this._sw}},se:{get:function(){return this._se||(this._se=new nZ(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2+1)),this._se}}});function W0t(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function n8(e,t){let n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),o=Math.min(e.east,t.east),r=Math.min(e.north,t.north);return i<r&&n<o}function I0t(e,t,n){for(;t.level<e;)if(bB(t.nw.extent,n))t=t.nw;else if(bB(t.ne.extent,n))t=t.ne;else if(bB(t.sw.extent,n))t=t.sw;else if(bB(t.se.extent,n))t=t.se;else break;if(t.rectangles.length===0||t.rectangles[t.rectangles.length-1].level<=n.level)t.rectangles.push(n);else{let i=Lo(t.rectangles,n.level,X0t);i<0&&(i=~i),t.rectangles.splice(i,0,n)}}function X0t(e,t){return e.level-t}function bB(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function iZ(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function v9(e,t,n){let i=0,o=!1;for(;!o;){let r=t._nw&&iZ(t._nw.extent,n),s=t._ne&&iZ(t._ne.extent,n),a=t._sw&&iZ(t._sw.extent,n),c=t._se&&iZ(t._se.extent,n);if(r+s+a+c>1){r&&(i=Math.max(i,v9(t,t._nw,n))),s&&(i=Math.max(i,v9(t,t._ne,n))),a&&(i=Math.max(i,v9(t,t._sw,n))),c&&(i=Math.max(i,v9(t,t._se,n)));break}else r?t=t._nw:s?t=t._ne:a?t=t._sw:c?t=t._se:o=!0}for(;t!==e;){let r=t.rectangles;for(let s=r.length-1;s>=0&&r[s].level>i;--s){let a=r[s];iZ(a,n)&&(i=a.level)}t=t.parent}return i}function w9(e,t,n){if(!t)return;let i,o=!1;for(i=0;i<n.length;++i)o=o||n8(t.extent,n[i]);if(!o)return;let r=t.rectangles;for(i=0;i<r.length;++i){let s=r[i];e[s.level]||(e[s.level]=n),e[s.level]=P0t(e[s.level],s)}w9(e,t._nw,n),w9(e,t._ne,n),w9(e,t._sw,n),w9(e,t._se,n)}function P0t(e,t){let n=[];for(let i=0;i<e.length;++i){let o=e[i];n8(o,t)?(o.west<t.west&&n.push(new ce(o.west,o.south,t.west,o.north)),o.east>t.east&&n.push(new ce(t.east,o.south,o.east,o.north)),o.south<t.south&&n.push(new ce(Math.max(t.west,o.west),o.south,Math.min(t.east,o.east),t.south)),o.north>t.north&&n.push(new ce(Math.max(t.west,o.west),t.north,Math.min(t.east,o.east),o.north))):n.push(o)}return n}var Lh=oZ;var v0t=15;function H_e(e){this.ellipsoid=y(e.ellipsoid,te.default),this.credit=void 0,this.tilingScheme=void 0,this.height=void 0,this.width=void 0,this.encoding=void 0,this.lodCount=void 0,this.hasAvailability=!1,this.tilesAvailable=void 0,this.tilesAvailabilityLoaded=void 0,this.levelZeroMaximumGeometricError=void 0,this.terrainDataStructure=void 0}H_e.prototype.build=function(e){e._credit=this.credit,e._tilingScheme=this.tilingScheme,e._height=this.height,e._width=this.width,e._encoding=this.encoding,e._lodCount=this.lodCount,e._hasAvailability=this.hasAvailability,e._tilesAvailable=this.tilesAvailable,e._tilesAvailabilityLoaded=this.tilesAvailabilityLoaded,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._terrainDataStructure=this.terrainDataStructure};function w0t(e,t){let n=t.copyrightText;l(n)&&(e.credit=new Vt(n));let i=t.spatialReference,o=y(i.latestWkid,i.wkid),r=t.extent,s={ellipsoid:e.ellipsoid};if(o===4326)s.rectangle=ce.fromDegrees(r.xmin,r.ymin,r.xmax,r.ymax),e.tilingScheme=new Ni(s);else if(o===3857){let d=Math.PI*e.ellipsoid.maximumRadius;t.extent.xmax>d&&(t.extent.xmax=d),t.extent.ymax>d&&(t.extent.ymax=d),t.extent.xmin<-d&&(t.extent.xmin=-d),t.extent.ymin<-d&&(t.extent.ymin=-d),s.rectangleSouthwestInMeters=new D(r.xmin,r.ymin),s.rectangleNortheastInMeters=new D(r.xmax,r.ymax),e.tilingScheme=new jr(s)}else throw new ue("Invalid spatial reference");let a=t.tileInfo;if(!l(a))throw new ue("tileInfo is required");e.width=a.rows+1,e.height=a.cols+1,e.encoding=a.format==="LERC"?zu.LERC:zu.NONE,e.lodCount=a.lods.length-1,(e.hasAvailability=t.capabilities.indexOf("Tilemap")!==-1)&&(e.tilesAvailable=new Lh(e.tilingScheme,e.lodCount),e.tilesAvailable.addAvailableTileRange(0,0,0,e.tilingScheme.getNumberOfXTilesAtLevel(0),e.tilingScheme.getNumberOfYTilesAtLevel(0)),e.tilesAvailabilityLoaded=new Lh(e.tilingScheme,e.lodCount)),e.levelZeroMaximumGeometricError=Qr.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.width,e.tilingScheme.getNumberOfXTilesAtLevel(0)),t.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),l(t.minValues)&&l(t.maxValues)?e.terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:t.minValues[0],highestEncodedHeight:t.maxValues[0]}:e.terrainDataStructure={elementMultiplier:1}}async function F0t(e,t,n){try{let i=await t.fetchJson();w0t(e,i)}catch(i){let o=`An error occurred while accessing ${t}.`;throw Co.reportError(void 0,n,l(n)?n._errorEvent:void 0,o),i}}function Vy(e){e=y(e,y.EMPTY_OBJECT),this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._width=void 0,this._height=void 0,this._encoding=void 0,this._lodCount=void 0,this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailabilityLoaded=void 0,this._availableCache={},this._errorEvent=new ge}Object.defineProperties(Vy.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});Vy.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT),e=await Promise.resolve(e);let n=Ee.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&(n=n.getDerivedResource({queryParameters:{token:t.token}}));let i=n.getDerivedResource({queryParameters:{f:"pjson"}}),o=new H_e(t);await F0t(o,i);let r=new Vy(t);return o.build(r),r._resource=n,r};Vy.prototype.requestTileGeometry=function(e,t,n,i){let o=this._resource.getDerivedResource({url:`tile/${n}/${t}/${e}`,request:i}),r=this._hasAvailability,s=Promise.resolve(!0),a;if(r&&!l(i8(this,n+1,e*2,t*2))){let m=J_e(this,n+1,e*2,t*2);s=m.promise,a=m.request}let c=o.fetchArrayBuffer();if(!l(c)||!l(s))return;let d=this,u=this._tilesAvailable;return Promise.all([c,s]).then(function(m){return new Pa({buffer:m[0],width:d._width,height:d._height,childTileMask:r?u.computeChildMaskForTile(n,e,t):v0t,structure:d._terrainDataStructure,encoding:d._encoding})}).catch(async function(m){if(l(a)&&a.state===Qn.CANCELLED){i.cancel();try{await i.deferred?.promise}catch{}return i.state=Qn.CANCELLED,Promise.reject(m)}return Promise.reject(m)})};function i8(e,t,n,i){if(!e._hasAvailability)return;let o=e._tilesAvailabilityLoaded,r=e._tilesAvailable;if(t>e._lodCount)return!1;if(r.isTileAvailable(t,n,i))return!0;if(o.isTileAvailable(t,n,i))return!1}Vy.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Vy.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=i8(this,n,e,t);if(l(i))return i;J_e(this,n,e,t)};Vy.prototype.loadTileDataAvailability=function(e,t,n){};function A0t(e,t,n,i){let o=t-1,r=n-1,s=i[e.y*t+e.x],a=[],c={startX:e.x,startY:e.y,endX:0,endY:0},d=new D(e.x+1,e.y+1),u=!1,m=!1;for(;!(u&&m);){let p=d.x,g=m?d.y+1:d.y;if(!u){for(let f=e.y;f<g;++f)if(i[f*t+d.x]!==s){u=!0;break}u?(a.push(new D(d.x,e.y)),--d.x,--p,c.endX=d.x):d.x===o?(c.endX=d.x,u=!0):++d.x}if(!m){let f=d.y*t;for(let x=e.x;x<=p;++x)if(i[f+x]!==s){m=!0;break}m?(a.push(new D(e.x,d.y)),--d.y,c.endY=d.y):d.y===r?(c.endY=d.y,m=!0):++d.y}}return{endingIndices:a,range:c,value:s}}function M0t(e,t,n,i,o){let r=[];if(o.every(function(c){return c===o[0]}))return o[0]===1&&r.push({startX:e,startY:t,endX:e+n-1,endY:t+i-1}),r;let a=[new D(0,0)];for(;a.length>0;){let c=a.pop(),d=A0t(c,n,i,o);if(d.value===1){let m=d.range;m.startX+=e,m.endX+=e,m.startY+=t,m.endY+=t,r.push(m)}let u=d.endingIndices;u.length>0&&(a=a.concat(u))}return r}function J_e(e,t,n,i){if(!e._hasAvailability)return{};let o=Math.floor(n/128)*128,r=Math.floor(i/128)*128,s=Math.min(1<<t,128),a=`tilemap/${t}/${r}/${o}/${s}/${s}`,c=e._availableCache;if(l(c[a]))return c[a];let d=new Oo({throttle:!1,throttleByServer:!0,type:is.TERRAIN}),m=e._resource.getDerivedResource({url:a,request:d}).fetchJson();return l(m)?(m=m.then(function(p){let g=M0t(o,r,s,s,p.data);e._tilesAvailabilityLoaded.addAvailableTileRange(t,o,r,o+s,r+s);let f=e._tilesAvailable;for(let x=0;x<g.length;++x){let _=g[x];f.addAvailableTileRange(t,_.startX,_.startY,_.endX,_.endY)}return i8(e,t,n,i)}),c[a]={promise:m,request:d},m=m.finally(function(p){return delete c[a],p}),{promise:m,request:d}):{}}var o8=Vy;var kBi=S(T(),1);var Q_e="https://dev.virtualearth.net/REST/v1/Locations";function r8(e){e=y(e,y.EMPTY_OBJECT);let t=e.key;this._key=t;let n={key:t};l(e.culture)&&(n.culture=e.culture),this._resource=new Ee({url:Q_e,queryParameters:n}),this._credit=new Vt('<img src="http://dev.virtualearth.net/Branding/logo_powered_by.png"/>',!1)}Object.defineProperties(r8.prototype,{url:{get:function(){return Q_e}},key:{get:function(){return this._key}},credit:{get:function(){return this._credit}}});r8.prototype.geocode=async function(e){return this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then(function(n){return n.resourceSets.length===0?[]:n.resourceSets[0].resources.map(function(o){let r=o.bbox,s=r[0],a=r[1],c=r[2],d=r[3];return{displayName:o.name,destination:ce.fromDegrees(a,s,d,c)}})})};var s8=r8;var YBi=S(T(),1);function a8(){}Object.defineProperties(a8.prototype,{credit:{get:function(){}}});a8.prototype.geocode=function(e){let t=e.match(/[^\s,\n]+/g);if(t.length===2||t.length===3){let n=+t[0],i=+t[1],o=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let r=/^(\d+.?\d*)([nsew])/i;for(let s=0;s<t.length;++s){let a=t[s].match(r);r.test(t[s])&&a.length===3&&(/^[ns]/i.test(a[2])?i=/^[n]/i.test(a[2])?+a[1]:-a[1]:/^[ew]/i.test(a[2])&&(n=/^[e]/i.test(a[2])?+a[1]:-a[1]))}}if(!isNaN(n)&&!isNaN(i)&&!isNaN(o)){let r={displayName:e,destination:h.fromDegrees(n,i,o)};return Promise.resolve([r])}}return Promise.resolve([])};var c8=a8;var $Bi=S(T(),1);var N0t=new se,j_e=new h,rZ=new h;function U0t(e){let t=e.points,n=e.times;if(t.length<3){let i=n[0],o=1/(n[1]-i),r=t[0],s=t[1];return function(a,c){l(c)||(c=new h);let d=(a-i)*o;return h.lerp(r,s,d,c)}}return function(i,o){l(o)||(o=new h);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=N0t;a.z=s,a.y=s*s,a.x=a.y*s,a.w=1;let c,d,u,m,p;return r===0?(c=t[0],d=t[1],u=e.firstTangent,m=h.subtract(t[2],c,j_e),h.multiplyByScalar(m,.5,m),p=A.multiplyByVector(lg.hermiteCoefficientMatrix,a,a)):r===t.length-2?(c=t[r],d=t[r+1],m=e.lastTangent,u=h.subtract(d,t[r-1],j_e),h.multiplyByScalar(u,.5,u),p=A.multiplyByVector(lg.hermiteCoefficientMatrix,a,a)):(c=t[r-1],d=t[r],u=t[r+1],m=t[r+2],p=A.multiplyByVector(Zy.catmullRomCoefficientMatrix,a,a)),o=h.multiplyByScalar(c,p.x,o),h.multiplyByScalar(d,p.y,rZ),h.add(o,rZ,o),h.multiplyByScalar(u,p.z,rZ),h.add(o,rZ,o),h.multiplyByScalar(m,p.w,rZ),h.add(o,rZ,o)}}var k0t=new h,D0t=new h;function Zy(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times,i=e.firstTangent,o=e.lastTangent;if(t.length>2&&(l(i)||(i=k0t,h.multiplyByScalar(t[1],2,i),h.subtract(i,t[2],i),h.subtract(i,t[0],i),h.multiplyByScalar(i,.5,i)),!l(o))){let r=t.length-1;o=D0t,h.multiplyByScalar(t[r-1],2,o),h.subtract(t[r],o,o),h.add(o,t[r-2],o),h.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=h.clone(i),this._lastTangent=h.clone(o),this._evaluateFunction=U0t(this),this._lastTimeIndex=0}Object.defineProperties(Zy.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});Zy.catmullRomCoefficientMatrix=new A(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);Zy.prototype.findTimeInterval=to.prototype.findTimeInterval;Zy.prototype.wrapTime=to.prototype.wrapTime;Zy.prototype.clampTime=to.prototype.clampTime;Zy.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var l8=Zy;var YYi=S(T(),1);var xYi=S(T(),1);var oYi=S(T(),1);var gB={};gB.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,o,r){l(r)?r.length=0:r=[];let s,a,c;t?(s=n<e,a=i<e,c=o<e):(s=n>e,a=i>e,c=o>e);let d=s+a+c,u,m,p,g,f,x;return d===1?s?(u=(e-n)/(i-n),m=(e-n)/(o-n),r.push(1),r.push(2),m!==1&&(r.push(-1),r.push(0),r.push(2),r.push(m)),u!==1&&(r.push(-1),r.push(0),r.push(1),r.push(u))):a?(p=(e-i)/(o-i),g=(e-i)/(n-i),r.push(2),r.push(0),g!==1&&(r.push(-1),r.push(1),r.push(0),r.push(g)),p!==1&&(r.push(-1),r.push(1),r.push(2),r.push(p))):c&&(f=(e-o)/(n-o),x=(e-o)/(i-o),r.push(0),r.push(1),x!==1&&(r.push(-1),r.push(2),r.push(1),r.push(x)),f!==1&&(r.push(-1),r.push(2),r.push(0),r.push(f))):d===2?!s&&n!==e?(g=(e-i)/(n-i),f=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(g),r.push(-1),r.push(2),r.push(0),r.push(f)):!a&&i!==e?(x=(e-o)/(i-o),u=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(x),r.push(-1),r.push(0),r.push(1),r.push(u)):!c&&o!==e&&(m=(e-n)/(o-n),p=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(m),r.push(-1),r.push(1),r.push(2),r.push(p)):d!==3&&(r.push(0),r.push(1),r.push(2)),r};gB.computeBarycentricCoordinates=function(e,t,n,i,o,r,s,a,c){let d=n-s,u=s-o,m=r-a,p=i-a,g=1/(m*d+u*p),f=t-a,x=e-s,_=(m*x+u*f)*g,C=(-p*x+d*f)*g,V=1-_-C;return l(c)?(c.x=_,c.y=C,c.z=V,c):new h(_,C,V)};gB.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,o,r,s,a,c){let d=(s-o)*(t-r)-(a-r)*(e-o),u=(n-e)*(t-r)-(i-t)*(e-o),m=(a-r)*(n-e)-(s-o)*(i-t);if(m===0)return;let p=d/m,g=u/m;if(p>=0&&p<=1&&g>=0&&g<=1)return l(c)||(c=new D),c.x=e+p*(n-e),c.y=t+p*(i-t),c};var a0=gB;function Ly(e){this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;let t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);this._heightValues=this._quantizedVertices.subarray(2*t,3*t);function o(s,a){return i[s]-i[a]}function r(s,a){return n[s]-n[a]}this._westIndices=xB(e.westIndices,o,t),this._southIndices=xB(e.southIndices,r,t),this._eastIndices=xB(e.eastIndices,o,t),this._northIndices=xB(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=y(e.childTileMask,15),this._createdByUpsampling=y(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties(Ly.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return l(this._mesh)}}});var yB=[];function xB(e,t,n){yB.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)yB[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(yB.sort(t),Me.createTypedArray(n,yB)):e}var q_e="createVerticesFromQuantizedTerrainMesh",B0t=new bi(q_e),Y0t=new bi(q_e,fh.maximumAsynchronousTasks);Ly.prototype.createMesh=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=y(e.throttle,!0),c=t.ellipsoid,d=t.tileXYToRectangle(n,i,o),m=(a?Y0t:B0t).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:d,relativeToCenter:this._boundingSphere.center,ellipsoid:c,exaggeration:r,exaggerationRelativeHeight:s});if(!l(m))return;let p=this;return Promise.resolve(m).then(function(g){let f=p._quantizedVertices.length/3,x=f+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,_=Me.createTypedArray(x,g.indices),C=new Float32Array(g.vertices),V=g.center,Z=g.minimumHeight,R=g.maximumHeight,G=p._boundingSphere,W=p._orientedBoundingBox,v=y(h.clone(g.occludeePointInScaledSpace),p._horizonOcclusionPoint),P=g.vertexStride,F=gc.clone(g.encoding);return p._mesh=new Hu(V,C,_,g.indexCountWithoutSkirts,f,Z,R,G,v,P,W,F,g.westIndicesSouthToNorth,g.southIndicesEastToWest,g.eastIndicesNorthToSouth,g.northIndicesWestToEast),p._quantizedVertices=void 0,p._encodedNormals=void 0,p._indices=void 0,p._uValues=void 0,p._vValues=void 0,p._heightValues=void 0,p._westIndices=void 0,p._southIndices=void 0,p._eastIndices=void 0,p._northIndices=void 0,p._mesh})};var O0t=new bi("upsampleQuantizedTerrainMesh",fh.maximumAsynchronousTasks);Ly.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,d=n*2===r,u=e.ellipsoid,m=e.tileXYToRectangle(o,r,s),p=O0t.scheduleTask({vertices:a.vertices,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:d,childRectangle:m,ellipsoid:u});if(!l(p))return;let g=Math.min(this._westSkirtHeight,this._eastSkirtHeight);g=Math.min(g,this._southSkirtHeight),g=Math.min(g,this._northSkirtHeight);let f=c?g*.5:this._westSkirtHeight,x=d?g*.5:this._southSkirtHeight,_=c?this._eastSkirtHeight:g*.5,C=d?this._northSkirtHeight:g*.5,V=this._credits;return Promise.resolve(p).then(function(Z){let R=new Uint16Array(Z.vertices),G=Me.createTypedArray(R.length/3,Z.indices),W;return l(Z.encodedNormals)&&(W=new Uint8Array(Z.encodedNormals)),new Ly({quantizedVertices:R,indices:G,encodedNormals:W,minimumHeight:Z.minimumHeight,maximumHeight:Z.maximumHeight,boundingSphere:le.clone(Z.boundingSphere),orientedBoundingBox:Gn.clone(Z.orientedBoundingBox),horizonOcclusionPoint:h.clone(Z.horizonOcclusionPoint),westIndices:Z.westIndices,southIndices:Z.southIndices,eastIndices:Z.eastIndices,northIndices:Z.northIndices,westSkirtHeight:f,southSkirtHeight:x,eastSkirtHeight:_,northSkirtHeight:C,childTileMask:0,credits:V,createdByUpsampling:!0})})};var d8=32767,$_e=new h;Ly.prototype.interpolateHeight=function(e,t,n){let i=X.clamp((t-e.west)/e.width,0,1);i*=d8;let o=X.clamp((n-e.south)/e.height,0,1);return o*=d8,l(this._mesh)?J0t(this,i,o):Q0t(this,i,o)};function eSe(e,t,n,i,o,r,s,a){let c=Math.min(n,o,s),d=Math.max(n,o,s),u=Math.min(i,r,a),m=Math.max(i,r,a);return e>=c&&e<=d&&t>=u&&t<=m}var z0t=new D,K0t=new D,H0t=new D;function J0t(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let d=s[a],u=s[a+1],m=s[a+2],p=r.decodeTextureCoordinates(o,d,z0t),g=r.decodeTextureCoordinates(o,u,K0t),f=r.decodeTextureCoordinates(o,m,H0t);if(eSe(t,n,p.x,p.y,g.x,g.y,f.x,f.y)){let x=a0.computeBarycentricCoordinates(t,n,p.x,p.y,g.x,g.y,f.x,f.y,$_e);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){let _=r.decodeHeight(o,d),C=r.decodeHeight(o,u),V=r.decodeHeight(o,m);return x.x*_+x.y*C+x.z*V}}}}function Q0t(e,t,n){let i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,c=s.length;a<c;a+=3){let d=s[a],u=s[a+1],m=s[a+2],p=i[d],g=i[u],f=i[m],x=o[d],_=o[u],C=o[m];if(eSe(t,n,p,x,g,_,f,C)){let V=a0.computeBarycentricCoordinates(t,n,p,x,g,_,f,C,$_e);if(V.x>=-1e-15&&V.y>=-1e-15&&V.z>=-1e-15){let Z=V.x*r[d]+V.y*r[u]+V.z*r[m];return X.lerp(e._minimumHeight,e._maximumHeight,Z/d8)}}}}Ly.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};Ly.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var HS=Ly;function j0t(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityPromiseCache={}}function nSe(e){this.requestVertexNormals=y(e.requestVertexNormals,!1),this.requestWaterMask=y(e.requestWaterMask,!1),this.requestMetadata=y(e.requestMetadata,!0),this.ellipsoid=y(e.ellipsoid,te.default),this.heightmapWidth=65,this.heightmapStructure=void 0,this.hasWaterMask=!1,this.hasMetadata=!1,this.hasVertexNormals=!1,this.scheme=void 0,this.lastResource=void 0,this.layerJsonResource=void 0,this.previousError=void 0,this.availability=void 0,this.tilingScheme=void 0,this.levelZeroMaximumGeometricError=void 0,this.heightmapStructure=void 0,this.layers=[],this.attribution="",this.overallAvailability=[],this.overallMaxZoom=0,this.tileCredits=[]}nSe.prototype.build=function(e){e._heightmapWidth=this.heightmapWidth,e._scheme=this.scheme;let t=l(this.lastResource.credits)?this.lastResource.credits:[];e._tileCredits=t.concat(this.tileCredits),e._availability=this.availability,e._tilingScheme=this.tilingScheme,e._requestWaterMask=this.requestWaterMask,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._heightmapStructure=this.heightmapStructure,e._layers=this.layers,e._hasWaterMask=this.hasWaterMask,e._hasVertexNormals=this.hasVertexNormals,e._hasMetadata=this.hasMetadata};async function iSe(e,t,n){if(!t.format){let x="The tile format is not specified in the layer.json file.";throw e.previousError=Co.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,x),new ue(x)}if(!t.tiles||t.tiles.length===0){let x="The layer.json file does not specify any tile URL templates.";throw e.previousError=Co.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,x),new ue(x)}let i=!1,o=!1,r=!1,s=!0,a=!1;if(t.format==="heightmap-1.0")a=!0,l(e.heightmapStructure)||(e.heightmapStructure={heightScale:1/5,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:256*256-1}),o=!0,e.requestWaterMask=!0;else if(t.format.indexOf("quantized-mesh-1.")!==0){let x=`The tile format "${t.format}" is invalid or not supported.`;throw e.previousError=Co.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,x),new ue(x)}let c=t.tiles,d=t.maxzoom;if(e.overallMaxZoom=Math.max(e.overallMaxZoom,d),!t.projection||t.projection==="EPSG:4326")e.tilingScheme=new Ni({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else if(t.projection==="EPSG:3857")e.tilingScheme=new jr({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else{let x=`The projection "${t.projection}" is invalid or not supported.`;throw e.previousError=Co.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,x),new ue(x)}if(e.levelZeroMaximumGeometricError=Qr.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.heightmapWidth,e.tilingScheme.getNumberOfXTilesAtLevel(0)),!t.scheme||t.scheme==="tms"||t.scheme==="slippyMap")e.scheme=t.scheme;else{let x=`The scheme "${t.scheme}" is invalid or not supported.`;throw e.previousError=Co.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,x),new ue(x)}let u;l(t.extensions)&&t.extensions.indexOf("octvertexnormals")!==-1?i=!0:l(t.extensions)&&t.extensions.indexOf("vertexnormals")!==-1&&(i=!0,s=!1),l(t.extensions)&&t.extensions.indexOf("watermask")!==-1&&(o=!0),l(t.extensions)&&t.extensions.indexOf("metadata")!==-1&&(r=!0);let m=t.metadataAvailability,p=t.available,g;if(l(p)&&!l(m)){g=new Lh(e.tilingScheme,p.length);for(let x=0;x<p.length;++x){let _=p[x],C=e.tilingScheme.getNumberOfYTilesAtLevel(x);l(e.overallAvailability[x])||(e.overallAvailability[x]=[]);for(let V=0;V<_.length;++V){let Z=_[V],R=C-Z.endY-1,G=C-Z.startY-1;e.overallAvailability[x].push([Z.startX,R,Z.endX,G]),g.addAvailableTileRange(x,Z.startX,R,Z.endX,G)}}}else l(m)&&(u=new Lh(e.tilingScheme,d),g=new Lh(e.tilingScheme,d),e.overallAvailability[0]=[[0,0,1,0]],g.addAvailableTileRange(0,0,0,1,0));e.hasWaterMask=e.hasWaterMask||o,e.hasVertexNormals=e.hasVertexNormals||i,e.hasMetadata=e.hasMetadata||r,l(t.attribution)&&(e.attribution.length>0&&(e.attribution+=" "),e.attribution+=t.attribution),e.layers.push(new j0t({resource:e.lastResource,version:t.version,isHeightmap:a,tileUrlTemplates:c,availability:g,hasVertexNormals:i,hasWaterMask:o,hasMetadata:r,availabilityLevels:m,availabilityTilesLoaded:u,littleEndianExtensionSize:s}));let f=t.parentUrl;return l(f)?l(g)?(e.lastResource=e.lastResource.getDerivedResource({url:f}),e.lastResource.appendForwardSlash(),e.layerJsonResource=e.lastResource.getDerivedResource({url:"layer.json"}),await h8(e),!0):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),!0):!0}function q0t(e,t,n){let i=`An error occurred while accessing ${e.layerJsonResource.url}.`;if(l(t)&&(i+=` +${t.message}`),e.previousError=Co.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,i),e.previousError.retry)return h8(e,n);throw new ue(i)}async function $0t(e,t,n){await iSe(e,t,n);let i=e.overallAvailability.length;if(i>0){let o=e.availability=new Lh(e.tilingScheme,e.overallMaxZoom);for(let r=0;r<i;++r){let s=e.overallAvailability[r];for(let a=0;a<s.length;++a){let c=s[a];o.addAvailableTileRange(r,c[0],c[1],c[2],c[3])}}}if(e.attribution.length>0){let o=new Vt(e.attribution);e.tileCredits.push(o)}return!0}async function h8(e,t){try{let n=await e.layerJsonResource.fetchJson();return $0t(e,n,t)}catch(n){return l(n)&&n.statusCode===404?(await iSe(e,{tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]},t),!0):q0t(e,n,t)}}function Rh(e){e=y(e,y.EMPTY_OBJECT),this._heightmapWidth=void 0,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._hasMetadata=!1,this._scheme=void 0,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=y(e.requestVertexNormals,!1),this._requestWaterMask=y(e.requestWaterMask,!1),this._requestMetadata=y(e.requestMetadata,!0),this._errorEvent=new ge;let t=e.credit;typeof t=="string"&&(t=new Vt(t)),this._credit=t,this._availability=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._layers=void 0,this._tileCredits=void 0}var u8={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function tSe(e){return!l(e)||e.length===0?{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}}function egt(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new Pa({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function tgt(e,t,n,i,o,r){let s=r.littleEndianExtensionSize,a=0,c=3,d=c+1,u=Float64Array.BYTES_PER_ELEMENT*c,m=Float64Array.BYTES_PER_ELEMENT*d,g=Uint16Array.BYTES_PER_ELEMENT*3,f=3,x=Uint16Array.BYTES_PER_ELEMENT,_=x*f,C=new DataView(t),V=new h(C.getFloat64(a,!0),C.getFloat64(a+8,!0),C.getFloat64(a+16,!0));a+=u;let Z=C.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let R=C.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let G=new le(new h(C.getFloat64(a,!0),C.getFloat64(a+8,!0),C.getFloat64(a+16,!0)),C.getFloat64(a+u,!0));a+=m;let W=new h(C.getFloat64(a,!0),C.getFloat64(a+8,!0),C.getFloat64(a+16,!0));a+=u;let v=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let P=new Uint16Array(t,a,v*3);a+=v*g,v>64*1024&&(x=Uint32Array.BYTES_PER_ELEMENT,_=x*f);let F=P.subarray(0,v),M=P.subarray(v,2*v),b=P.subarray(v*2,3*v);wn.zigZagDeltaDecode(F,M,b),a%x!==0&&(a+=x-a%x);let L=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let E=Me.createTypedArrayFromArrayBuffer(v,t,a,L*f);a+=L*_;let I=0,w=E.length;for(let ae=0;ae<w;++ae){let ye=E[ae];E[ae]=I-ye,ye===0&&++I}let N=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let B=Me.createTypedArrayFromArrayBuffer(v,t,a,N);a+=N*x;let k=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let O=Me.createTypedArrayFromArrayBuffer(v,t,a,k);a+=k*x;let U=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let J=Me.createTypedArrayFromArrayBuffer(v,t,a,U);a+=U*x;let z=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let ee=Me.createTypedArrayFromArrayBuffer(v,t,a,z);a+=z*x;let K,j;for(;a<C.byteLength;){let ae=C.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;let ye=C.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,ae===u8.OCT_VERTEX_NORMALS&&e._requestVertexNormals)K=new Uint8Array(t,a,v*2);else if(ae===u8.WATER_MASK&&e._requestWaterMask)j=new Uint8Array(t,a,ye);else if(ae===u8.METADATA&&e._requestMetadata){let Te=C.getUint32(a,!0);if(Te>0){let We=Eo(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,Te).available;if(l(We))for(let Pe=0;Pe<We.length;++Pe){let Ue=n+Pe+1,Pt=We[Pe],Ot=e._tilingScheme.getNumberOfYTilesAtLevel(Ue);for(let ht=0;ht<Pt.length;++ht){let Ae=Pt[ht],$e=Ot-Ae.endY-1,Qe=Ot-Ae.startY-1;e.availability.addAvailableTileRange(Ue,Ae.startX,$e,Ae.endX,Qe),r.availability.addAvailableTileRange(Ue,Ae.startX,$e,Ae.endX,Qe)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}a+=ye}let q=e.getLevelMaximumGeometricError(n)*5,be=e._tilingScheme.tileXYToRectangle(i,o,n),Se=Gn.fromRectangle(be,Z,R,e._tilingScheme.ellipsoid);return new HS({center:V,minimumHeight:Z,maximumHeight:R,boundingSphere:G,orientedBoundingBox:Se,horizonOcclusionPoint:W,quantizedVertices:P,encodedNormals:K,indices:E,westIndices:B,southIndices:O,eastIndices:J,northIndices:ee,westSkirtHeight:q,southSkirtHeight:q,eastSkirtHeight:q,northSkirtHeight:q,childTileMask:e.availability.computeChildMaskForTile(n,i,o),waterMask:j,credits:e._tileCredits})}Rh.prototype.requestTileGeometry=function(e,t,n,i){let o=this._layers,r,s=o.length,a=!1,c=Promise.resolve();if(s===1)r=o[0];else for(let d=0;d<s;++d){let u=o[d];if(!l(u.availability)||u.availability.isTileAvailable(n,e,t)){r=u;break}let m=f8(this,e,t,n,u,d===0);m.result&&(a=!0,c=c.then(()=>m.promise))}return!l(r)&&a?c.then(()=>new Promise(d=>{setTimeout(()=>{let u=this.requestTileGeometry(e,t,n,i);d(u)},0)})):oSe(this,e,t,n,r,i)};function oSe(e,t,n,i,o,r){if(!l(o))return Promise.reject(new ue("Terrain tile doesn't exist"));let s=o.tileUrlTemplates;if(s.length===0)return;let a;!e._scheme||e._scheme==="tms"?a=e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1:a=n;let c=[];e._requestVertexNormals&&o.hasVertexNormals&&c.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&c.push("watermask"),e._requestMetadata&&o.hasMetadata&&c.push("metadata");let d,u,m=s[(t+a+i)%s.length],p=o.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(u={extensions:c.join("-")}),d=tSe(void 0)):d=tSe(c);let g=p.getDerivedResource({url:m,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:u,headers:d,request:r}).fetchArrayBuffer();if(l(g))return g.then(function(f){return l(f)?l(e._heightmapStructure)?egt(e,f,i,t,n):tgt(e,f,i,t,n,o):Promise.reject(new ue("Mesh buffer doesn't exist."))})}Object.defineProperties(Rh.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}});Rh.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Rh.fromIonAssetId=async function(e,t){let n=await dd.fromAssetId(e);return Rh.fromUrl(n,t)};Rh.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT),e=await Promise.resolve(e);let n=Ee.createIfNeeded(e);n.appendForwardSlash();let i=new nSe(t);i.lastResource=n,i.layerJsonResource=i.lastResource.getDerivedResource({url:"layer.json"}),await h8(i);let o=new Rh(t);return i.build(o),o};Rh.prototype.getTileDataAvailable=function(e,t,n){if(!l(this._availability))return;if(n>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(n,e,t))return!0;if(!this._hasMetadata)return!1;let i=this._layers,o=i.length;for(let r=0;r<o;++r)if(f8(this,e,t,n,i[r],r===0).result)return;return!1};Rh.prototype.loadTileDataAvailability=function(e,t,n){if(!l(this._availability)||n>this._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;let i=this._layers,o=i.length;for(let r=0;r<o;++r){let s=f8(this,e,t,n,i[r],r===0);if(l(s.promise))return s.promise}};function m8(e,t,n,i){if(i===0)return;let o=e.availabilityLevels,r=i%o===0?i-o:(i/o|0)*o,s=1<<i-r,a=t/s|0,c=n/s|0;return{level:r,x:a,y:c}}function f8(e,t,n,i,o,r){if(!l(o.availabilityLevels))return{result:!1};let s,a=function(){delete o.availabilityPromiseCache[s]},c=o.availabilityTilesLoaded,d=o.availability,u=m8(o,t,n,i);for(;l(u);){if(d.isTileAvailable(u.level,u.x,u.y)&&!c.isTileAvailable(u.level,u.x,u.y)){let m;if(!r&&(s=`${u.level}-${u.x}-${u.y}`,m=o.availabilityPromiseCache[s],!l(m))){let p=new Oo({throttle:!1,throttleByServer:!0,type:is.TERRAIN});m=oSe(e,u.x,u.y,u.level,o,p),l(m)&&(o.availabilityPromiseCache[s]=m,m.then(a))}return{result:!0,promise:m}}u=m8(o,u.x,u.y,u.level)}return{result:!1}}Rh._getAvailabilityTile=m8;var JS=Rh;var qYi=S(T(),1);function c0(e){e=y(e,y.EMPTY_OBJECT);let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new $c(n),this._workerName="createCircleGeometry"}c0.packedLength=$c.packedLength;c0.pack=function(e,t,n){return $c.pack(e._ellipseGeometry,t,n)};var rSe=new $c({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Ma={center:new h,radius:void 0,ellipsoid:te.clone(te.default),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Xe,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};c0.unpack=function(e,t,n){let i=$c.unpack(e,t,rSe);return Ma.center=h.clone(i._center,Ma.center),Ma.ellipsoid=te.clone(i._ellipsoid,Ma.ellipsoid),Ma.ellipsoid=te.clone(i._ellipsoid,rSe._ellipsoid),Ma.height=i._height,Ma.extrudedHeight=i._extrudedHeight,Ma.granularity=i._granularity,Ma.vertexFormat=Xe.clone(i._vertexFormat,Ma.vertexFormat),Ma.stRotation=i._stRotation,Ma.shadowVolume=i._shadowVolume,l(n)?(Ma.semiMajorAxis=i._semiMajorAxis,Ma.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new $c(Ma),n):(Ma.radius=i._semiMajorAxis,new c0(Ma))};c0.createGeometry=function(e){return $c.createGeometry(e._ellipseGeometry)};c0.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,r=t(i,o),s=n(i,o);return new c0({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(c0.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var p8=c0;var r3i=S(T(),1);function sZ(e){e=y(e,y.EMPTY_OBJECT);let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new Rd(n),this._workerName="createCircleOutlineGeometry"}sZ.packedLength=Rd.packedLength;sZ.pack=function(e,t,n){return Rd.pack(e._ellipseGeometry,t,n)};var ngt=new Rd({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Jd={center:new h,radius:void 0,ellipsoid:te.clone(te.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};sZ.unpack=function(e,t,n){let i=Rd.unpack(e,t,ngt);return Jd.center=h.clone(i._center,Jd.center),Jd.ellipsoid=te.clone(i._ellipsoid,Jd.ellipsoid),Jd.height=i._height,Jd.extrudedHeight=i._extrudedHeight,Jd.granularity=i._granularity,Jd.numberOfVerticalLines=i._numberOfVerticalLines,l(n)?(Jd.semiMajorAxis=i._semiMajorAxis,Jd.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new Rd(Jd),n):(Jd.radius=i._semiMajorAxis,new sZ(Jd))};sZ.createGeometry=function(e){return Rd.createGeometry(e._ellipseGeometry)};var b8=sZ;var p3i=S(T(),1);function aZ(e){e=y(e,y.EMPTY_OBJECT),this._callback=e.callback,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Ni({ellipsoid:y(e.ellipsoid,te.default)})),this._width=e.width,this._height=e.height;let t=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=Qr.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,t,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new ge;let n=e.credit;typeof n=="string"&&(n=new Vt(n)),this._credit=n}Object.defineProperties(aZ.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});aZ.prototype.requestTileGeometry=function(e,t,n,i){let o=this._callback(e,t,n);if(!l(o))return;let r=this._width,s=this._height;return Promise.resolve(o).then(function(a){let c=a;return Array.isArray(c)&&(c=new Float64Array(c)),new Pa({buffer:c,width:r,height:s})})};aZ.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};aZ.prototype.getTileDataAvailable=function(e,t,n){};aZ.prototype.loadTileDataAvailability=function(e,t,n){};var g8=aZ;var g3i=S(T(),1);function sSe(e){this.proxy=e}sSe.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var y8=sSe;var x3i=S(T(),1),igt={SEARCH:0,AUTOCOMPLETE:1},Ry=Object.freeze(igt);var V3i=S(T(),1);function _B(){fe.throwInstantiationError()}Object.defineProperties(_B.prototype,{credit:{get:fe.throwInstantiationError}});_B.getCreditsFromResult=function(e){if(l(e.attributions))return e.attributions.map(Vt.getIonCredit)};_B.prototype.geocode=fe.throwInstantiationError;var cZ=_B;var R3i=S(T(),1);function aSe(){fe.throwInstantiationError()}aSe.createGeometry=function(e){fe.throwInstantiationError()};var x8=aSe;var H3i=S(T(),1),lgt=S(_8(),1);var v3i=S(T(),1);var W3i=S(T(),1);function ogt(e,t){return(e&t)!==0}var Zc=ogt;var rgt=[1,2,4,8],cSe=15,sgt=16,agt=64,cgt=128;function jf(e,t,n,i,o,r){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=o,this.terrainProvider=r,this.ancestorHasTerrain=!1,this.terrainState=void 0}jf.clone=function(e,t){return l(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new jf(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};jf.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};jf.prototype.hasSubtree=function(){return Zc(this._bits,sgt)};jf.prototype.hasImagery=function(){return Zc(this._bits,agt)};jf.prototype.hasTerrain=function(){return Zc(this._bits,cgt)};jf.prototype.hasChildren=function(){return Zc(this._bits,cSe)};jf.prototype.hasChild=function(e){return Zc(this._bits,rgt[e])};jf.prototype.getChildBitmask=function(){return this._bits&cSe};var F9=jf;function dgt(e){let t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n);for(let o=0;o<t;++o)i[o]=e.charCodeAt(o);return n}var ugt=dgt(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y +wmi\xD6\xF0\x9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7\x9F\xD13\x82=\xD3\xAB\xEEc\x99\xC8+S\xA0D\\q\xC6\xCCD2O<\xCA\xC0)=R\xD3aX\xA9}e\xB4\xDC\xCF\r\xF4=\xF1\b\xA9B\xDA# \xD8\xBF^PI\xF8M\xC0\xCBGLO\xF7{+\xD8\xC51\x92;\xB5o\xDCl\r\x92\x88\xD1\x9E\xDB?\xE2\xE9\xDA_\xD4\x84\xE2FaZ\xDEU\xCF\xA4\0\xBE\xFD\xCEg\xF1Ji\x97\xE6 H\xD8]\x7F~\xAEq N\xAE\xC0V\xA9\x91<\x82r\xE7v\xEC)I\xD6]-\x83\xE3\xDB6\xA9;f\x97\x87j\xD5\xB6=P^R\xB9K\xC7sWx\xC9\xF4.Y\x07\x95\x93o\xD0KW>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2 +\xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1 +ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS +>\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88 +\x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function Qd(e){this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=X.EPSILON12,this.providers={},this.key=void 0,this._resource=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={}}Object.defineProperties(Qd.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}}});Qd.fromUrl=async function(e){let t=e;typeof t!="string"&&!(t instanceof Ee)&&(t=e.url);let n=Ee.createIfNeeded(t);n.appendForwardSlash();let i=new Qd;i._resource=n;try{await mgt(i),await i.getQuadTreePacket("",i._quadPacketVersion)}catch(o){let r=`An error occurred while accessing ${dSe(i,"",1).url}: ${o}`;throw new ue(r)}return i};Qd.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;Zc(t,r)?Zc(e,r)&&(s|=1):(s|=2,Zc(e,r)||(s|=1)),i+=s}return i};Qd.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,s=+e[i-o];Zc(s,2)?Zc(s,1)||(t|=r):(n|=r,Zc(s,1)&&(t|=r))}return{x:t,y:n,level:i}};Qd.prototype.isValid=function(e){let t=this.getTileInformationFromQuadKey(e);if(l(t))return t!==null;let n=!0,i=e,o;for(;i.length>1;)if(o=i.substring(i.length-1),i=i.substring(0,i.length-1),t=this.getTileInformationFromQuadKey(i),l(t)){!t.hasSubtree()&&!t.hasChild(parseInt(o))&&(n=!1);break}else if(t===null){n=!1;break}return n};var lSe=new bi("decodeGoogleEarthEnterprisePacket");Qd.prototype.getQuadTreePacket=function(e,t,n){t=y(t,1),e=y(e,"");let o=dSe(this,e,t,n).fetchArrayBuffer();if(!l(o))return;let r=this._tileInfo,s=this.key;return o.then(function(a){return lSe.scheduleTask({buffer:a,quadKey:e,type:"Metadata",key:s},[a]).then(function(d){let u,m=-1;if(e!==""){m=e.length+1;let f=d[e];u=r[e],u._bits|=f._bits,delete d[e]}let p=Object.keys(d);p.sort(function(f,x){return f.length-x.length});let g=p.length;for(let f=0;f<g;++f){let x=p[f];if(d[x]!==null){let C=F9.clone(d[x]),V=x.length;if(V===m)C.setParent(u);else if(V>1){let Z=r[x.substring(0,x.length-1)];C.setParent(Z)}r[x]=C}else r[x]=null}})})};Qd.prototype.populateSubtree=function(e,t,n,i){let o=Qd.tileXYToQuadKey(e,t,n);return C8(this,o,i)};function C8(e,t,n){let i=e._tileInfo,o=t,r=i[o];if(l(r)&&(!r.hasSubtree()||r.hasChildren()))return r;for(;r===void 0&&o.length>1;)o=o.substring(0,o.length-1),r=i[o];let s,a=e._subtreePromises,c=a[o];if(l(c))return c.then(function(){return s=new Oo({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),C8(e,t,s)});if(!l(r)||!r.hasSubtree())return Promise.reject(new ue(`Couldn't load metadata for tile ${t}`));if(c=e.getQuadTreePacket(o,r.cnodeVersion,n),!!l(c))return a[o]=c,c.then(function(){return s=new Oo({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),C8(e,t,s)}).finally(function(){delete a[o]})}Qd.prototype.getTileInformation=function(e,t,n){let i=Qd.tileXYToQuadKey(e,t,n);return this._tileInfo[i]};Qd.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};function dSe(e,t,n,i){return e._resource.getDerivedResource({url:`flatfile?q2-0${t}-q.${n.toString()}`,request:i})}var S8,T8;function mgt(e){let t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!l(T8)){let n=tn("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser;T8=Oy(n).then(function(){S8=window.cesiumGoogleEarthDbRootParser(lgt),l(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser})}return T8.then(function(){return t.fetchArrayBuffer()}).then(function(n){let i=S8.EncryptedDbRootProto.decode(new Uint8Array(n)),o=i.encryptionData,r=o.byteOffset,s=r+o.byteLength,a=e.key=o.buffer.slice(r,s);o=i.dbrootData,r=o.byteOffset,s=r+o.byteLength;let c=o.buffer.slice(r,s);return lSe.scheduleTask({buffer:c,type:"DbRoot",key:a},[c])}).then(function(n){let i=S8.DbRootProto.decode(new Uint8Array(n.buffer));if(e.imageryPresent=y(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=y(i.terrainPresent,e.terrainPresent),l(i.endSnippet)&&l(i.endSnippet.model)){let a=i.endSnippet.model;e.negativeAltitudeExponentBias=y(a.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=y(a.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)}l(i.databaseVersion)&&(e._quadPacketVersion=y(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));let o=e.providers,r=y(i.providerInfo,[]),s=r.length;for(let a=0;a<s;++a){let c=r[a],d=c.copyrightString;l(d)&&(o[c.providerId]=new Vt(d.value))}}).catch(function(){console.log(`Failed to retrieve ${t.url}. Using defaults.`),e.key=ugt})}var l0=Qd;var uOi=S(T(),1);function QS(e){e=y(e,y.EMPTY_OBJECT),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;let t=y(e.childTileMask,15),n=t&3;n|=t&4?8:0,n|=t&8?4:0,this._childTileMask=n,this._createdByUpsampling=y(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(QS.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var hSe="createVerticesFromGoogleEarthEnterpriseBuffer",hgt=new bi(hSe),fgt=new bi(hSe,fh.maximumAsynchronousTasks),uSe=new ce,V8=new ce;QS.prototype.createMesh=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=y(e.throttle,!0),c=t.ellipsoid;t.tileXYToNativeRectangle(n,i,o,uSe),t.tileXYToRectangle(n,i,o,V8);let d=c.cartographicToCartesian(ce.center(V8)),m=40075.16/(1<<o);this._skirtHeight=Math.min(m*8,1e3);let g=(a?fgt:hgt).scheduleTask({buffer:this._buffer,nativeRectangle:uSe,rectangle:V8,relativeToCenter:d,ellipsoid:c,skirtHeight:this._skirtHeight,exaggeration:r,exaggerationRelativeHeight:s,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!l(g))return;let f=this;return g.then(function(x){return f._mesh=new Hu(d,new Float32Array(x.vertices),new Uint16Array(x.indices),x.indexCountWithoutSkirts,x.vertexCountWithoutSkirts,x.minimumHeight,x.maximumHeight,le.clone(x.boundingSphere3D),h.clone(x.occludeePointInScaledSpace),x.numberOfAttributes,Gn.clone(x.orientedBoundingBox),gc.clone(x.encoding),x.westIndicesSouthToNorth,x.southIndicesEastToWest,x.eastIndicesNorthToSouth,x.northIndicesWestToEast),f._minimumHeight=x.minimumHeight,f._maximumHeight=x.maximumHeight,f._buffer=void 0,f._mesh})};QS.prototype.interpolateHeight=function(e,t,n){let i=X.clamp((t-e.west)/e.width,0,1),o=X.clamp((n-e.south)/e.height,0,1);return l(this._mesh)?xgt(this,i,o):Tgt(this,i,o,e)};var pgt=new bi("upsampleQuantizedTerrainMesh",fh.maximumAsynchronousTasks);QS.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,d=n*2===r,u=e.ellipsoid,m=e.tileXYToRectangle(o,r,s),p=pgt.scheduleTask({vertices:a.vertices,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:d,childRectangle:m,ellipsoid:u});if(!l(p))return;let g=this;return p.then(function(f){let x=new Uint16Array(f.vertices),_=Me.createTypedArray(x.length/3,f.indices),C=g._skirtHeight;return new HS({quantizedVertices:x,indices:_,minimumHeight:f.minimumHeight,maximumHeight:f.maximumHeight,boundingSphere:le.clone(f.boundingSphere),orientedBoundingBox:Gn.clone(f.orientedBoundingBox),horizonOcclusionPoint:h.clone(f.horizonOcclusionPoint),westIndices:f.westIndices,southIndices:f.southIndices,eastIndices:f.eastIndices,northIndices:f.northIndices,westSkirtHeight:C,southSkirtHeight:C,eastSkirtHeight:C,northSkirtHeight:C,childTileMask:0,createdByUpsampling:!0,credits:g._credits})})};QS.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};QS.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var bgt=new D,ggt=new D,ygt=new D,fSe=new h;function xgt(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let d=s[a],u=s[a+1],m=s[a+2],p=r.decodeTextureCoordinates(o,d,bgt),g=r.decodeTextureCoordinates(o,u,ggt),f=r.decodeTextureCoordinates(o,m,ygt),x=a0.computeBarycentricCoordinates(t,n,p.x,p.y,g.x,g.y,f.x,f.y,fSe);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){let _=r.decodeHeight(o,d),C=r.decodeHeight(o,u),V=r.decodeHeight(o,m);return x.x*_+x.y*C+x.z*V}}}var _gt=Uint16Array.BYTES_PER_ELEMENT,mSe=Uint32Array.BYTES_PER_ELEMENT,Z8=Int32Array.BYTES_PER_ELEMENT,Sgt=Float32Array.BYTES_PER_ELEMENT,L8=Float64Array.BYTES_PER_ELEMENT;function Tgt(e,t,n,i){let o=e._buffer,r=0,s=0,a=0;n>.5?(t>.5?(r=2,s=.5):r=3,a=.5):t>.5&&(r=1,s=.5);let c=new DataView(o),d=0;for(let G=0;G<r;++G)d+=c.getUint32(d,!0),d+=mSe;d+=mSe,d+=2*L8;let u=X.toRadians(c.getFloat64(d,!0)*180);d+=L8;let m=X.toRadians(c.getFloat64(d,!0)*180);d+=L8;let p=i.width/u/2,g=i.height/m/2,f=c.getInt32(d,!0);d+=Z8;let x=c.getInt32(d,!0)*3;d+=Z8,d+=Z8;let _=new Array(f),C=new Array(f),V=new Array(f),Z;for(Z=0;Z<f;++Z)_[Z]=s+c.getUint8(d++)*p,C[Z]=a+c.getUint8(d++)*g,V[Z]=c.getFloat32(d,!0)*6371010,d+=Sgt;let R=new Array(x);for(Z=0;Z<x;++Z)R[Z]=c.getUint16(d,!0),d+=_gt;for(Z=0;Z<x;Z+=3){let G=R[Z],W=R[Z+1],v=R[Z+2],P=_[G],F=_[W],M=_[v],b=C[G],L=C[W],E=C[v],I=a0.computeBarycentricCoordinates(t,n,P,b,F,L,M,E,fSe);if(I.x>=-1e-15&&I.y>=-1e-15&&I.z>=-1e-15)return I.x*V[G]+I.y*V[W]+I.z*V[v]}}var lZ=QS;var EOi=S(T(),1);var rm={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},SB=new ne;function TB(){this._terrainCache={},this._lastTidy=ne.now()}TB.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:ne.now()}};TB.prototype.get=function(e){let n=this._terrainCache[e];if(l(n))return delete this._terrainCache[e],n.buffer};TB.prototype.tidy=function(){if(ne.now(SB),ne.secondsDifference(SB,this._lastTidy)>10){let e=this._terrainCache,t=Object.keys(e),n=t.length;for(let i=0;i<n;++i){let o=t[i],r=e[o];ne.secondsDifference(SB,r.timestamp)>10&&delete e[o]}ne.clone(SB,this._lastTidy)}};function Gy(e){e=y(e,y.EMPTY_OBJECT),this._tilingScheme=new Ni({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ce(-X.PI,-X.PI,X.PI,X.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new Vt(t)),this._credit=t,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new TB,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new ge}Object.defineProperties(Gy.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});Gy.fromMetadata=function(e,t){if(!e.terrainPresent)throw new ue(`The server ${e.url} doesn't have terrain`);let n=new Gy(t);return n._metadata=e,n};var Cgt=new bi("decodeGoogleEarthEnterprisePacket");function pSe(e,t,n){let i=t.getChildBitmask();if(t.terrainState===rm.PARENT){i=0;for(let o=0;o<4;++o){let r=n.getTileInformationFromQuadKey(e+o.toString());l(r)&&r.hasTerrain()&&(i|=1<<o)}}return i}Gy.prototype.requestTileGeometry=function(e,t,n,i){let o=l0.tileXYToQuadKey(e,t,n),r=this._terrainCache,s=this._metadata,a=s.getTileInformationFromQuadKey(o);if(!l(a))return Promise.reject(new ue("Terrain tile doesn't exist"));let c=a.terrainState;l(c)||(c=a.terrainState=rm.UNKNOWN);let d=r.get(o);if(l(d)){let C=s.providers[a.terrainProvider];return Promise.resolve(new lZ({buffer:d,childTileMask:pSe(o,a,s),credits:l(C)?[C]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold}))}if(r.tidy(),a.ancestorHasTerrain){if(c===rm.NONE)return Promise.reject(new ue("Terrain tile doesn't exist"))}else return Promise.resolve(new Pa({buffer:new Uint8Array(16*16),width:16,height:16}));let u,m=o,p=-1;switch(c){case rm.SELF:p=a.terrainVersion;break;case rm.PARENT:m=m.substring(0,m.length-1),u=s.getTileInformationFromQuadKey(m),p=u.terrainVersion;break;case rm.UNKNOWN:a.hasTerrain()?p=a.terrainVersion:(m=m.substring(0,m.length-1),u=s.getTileInformationFromQuadKey(m),l(u)&&u.hasTerrain()&&(p=u.terrainVersion));break}if(p<0)return Promise.reject(new ue("Terrain tile doesn't exist"));let g=this._terrainPromises,f=this._terrainRequests,x,_;if(l(g[m]))x=g[m],_=f[m];else{_=i;let C=Vgt(this,m,p,_).fetchArrayBuffer();if(!l(C))return;x=C.then(function(V){return l(V)?Cgt.scheduleTask({buffer:V,type:"Terrain",key:s.key},[V]).then(function(Z){let R=s.getTileInformationFromQuadKey(m);R.terrainState=rm.SELF,r.add(m,Z[0]);let G=R.terrainProvider,W=Z.length-1;for(let v=0;v<W;++v){let P=m+v.toString(),F=s.getTileInformationFromQuadKey(P);l(F)&&(r.add(P,Z[v+1]),F.terrainState=rm.PARENT,F.terrainProvider===0&&(F.terrainProvider=G))}}):Promise.reject(new ue("Failed to load terrain."))}),g[m]=x,f[m]=_,x=x.finally(function(){delete g[m],delete f[m]})}return x.then(function(){let C=r.get(o);if(l(C)){let V=s.providers[a.terrainProvider];return new lZ({buffer:C,childTileMask:pSe(o,a,s),credits:l(V)?[V]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold})}return Promise.reject(new ue("Failed to load terrain."))}).catch(function(C){return _.state===Qn.CANCELLED?(i.state=_.state,Promise.reject(C)):(a.terrainState=rm.NONE,Promise.reject(C))})};Gy.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Gy.prototype.getTileDataAvailable=function(e,t,n){let i=this._metadata,o=l0.tileXYToQuadKey(e,t,n),r=i.getTileInformation(e,t,n);if(r===null)return!1;if(l(r)){if(!r.ancestorHasTerrain)return!0;let s=r.terrainState;if(s===rm.NONE)return!1;if((!l(s)||s===rm.UNKNOWN)&&(r.terrainState=rm.UNKNOWN,!r.hasTerrain())){o=o.substring(0,o.length-1);let a=i.getTileInformationFromQuadKey(o);if(!l(a)||!a.hasTerrain())return!1}return!0}if(i.isValid(o)){let s=new Oo({throttle:!1,throttleByServer:!0,type:is.TERRAIN});i.populateSubtree(e,t,n,s)}return!1};Gy.prototype.loadTileDataAvailability=function(e,t,n){};function Vgt(e,t,n,i){return n=l(n)&&n>0?n:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${t}-t.${n.toString()}`,request:i})}var R8=Gy;var POi=S(T(),1);var CB={};CB.defaultApiKey=void 0;CB.mapTilesApiEndpoint=new Ee({url:"https://tile.googleapis.com/v1/"});CB.getDefaultCredit=function(){return new Vt('<img src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align: -5px" alt="Google">',!0)};var jS=CB;var FOi=S(T(),1);var A9={};A9.type=void 0;A9.getRequiredDataPoints=fe.throwInstantiationError;A9.interpolateOrderZero=fe.throwInstantiationError;A9.interpolate=fe.throwInstantiationError;var G8=A9;var jOi=S(T(),1);var BOi=S(T(),1);function E8(e){this._url=Ee.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(E8.prototype,{url:{get:function(){return this._url}},credit:{get:function(){}}});E8.prototype.geocode=async function(e,t){return this._url.getDerivedResource({url:t===Ry.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then(function(i){return i.features.map(function(o){let r,s=o.bbox;if(l(s))r=ce.fromDegrees(s[0],s[1],s[2],s[3]);else{let a=o.geometry.coordinates[0],c=o.geometry.coordinates[1];r=h.fromDegrees(a,c)}return{displayName:o.properties.label,destination:r,attributions:i.attributions}})})};var M9=E8;function W8(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.accessToken,Zm.defaultAccessToken),n=Ee.createIfNeeded(y(e.server,Zm.defaultServer));n.appendForwardSlash();let i=Zm.getDefaultTokenCredit(t);l(i)&&e.scene.frameState.creditDisplay.addStaticCredit(Vt.clone(i));let o=n.getDerivedResource({url:"v1/geocode"});l(t)&&o.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=n,this._pelias=new M9(o)}Object.defineProperties(W8.prototype,{credit:{get:function(){}}});W8.prototype.geocode=async function(e,t){return this._pelias.geocode(e,t)};var N9=W8;var ezi=S(T(),1);function VB(){fe.throwInstantiationError()}Object.defineProperties(VB.prototype,{ellipsoid:{get:fe.throwInstantiationError}});VB.prototype.project=fe.throwInstantiationError;VB.prototype.unproject=fe.throwInstantiationError;var I8=VB;var rzi=S(T(),1);function dZ(e){e=y(e,y.EMPTY_OBJECT);let t=e.weights,n=e.times;this._times=n,this._weights=t,this._count=t.length/n.length,this._lastTimeIndex=0}Object.defineProperties(dZ.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});dZ.prototype.findTimeInterval=to.prototype.findTimeInterval;dZ.prototype.wrapTime=to.prototype.wrapTime;dZ.prototype.clampTime=to.prototype.clampTime;dZ.prototype.evaluate=function(e,t){let n=this.weights,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);l(t)||(t=new Array(this._count));for(let s=0;s<this._count;s++){let a=o*this._count+s;t[s]=n[a]*(1-r)+n[a+this._count]*r}return t};var X8=dZ;var fzi=S(T(),1);function P8(e,t,n){e=Ee.createIfNeeded(e),e.appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=y(n,{}),this._credit=new Vt('Geodata copyright <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',!1)}Object.defineProperties(P8.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}},credit:{get:function(){return this._credit}}});P8.prototype.geocode=async function(e){return this._url.getDerivedResource({url:"json",queryParameters:xt(this._params,{q:e})}).fetchJson().then(function(n){return n.results.map(function(i){let o,r=i.bounds;if(l(r))o=ce.fromDegrees(r.southwest.lng,r.southwest.lat,r.northeast.lng,r.northeast.lat);else{let s=i.geometry.lat,a=i.geometry.lng;o=h.fromDegrees(s,a)}return{displayName:i.formatted,destination:o}})})};var v8=P8;var gzi=S(T(),1);var Zgt={packedLength:void 0,pack:fe.throwInstantiationError,unpack:fe.throwInstantiationError},w8=Zgt;var _zi=S(T(),1);var Lgt={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:fe.throwInstantiationError,unpackInterpolationResult:fe.throwInstantiationError},F8=Lgt;var Czi=S(T(),1);function bSe(){fe.throwInstantiationError()}bSe.prototype.getURL=fe.throwInstantiationError;var A8=bSe;var Uzi=S(T(),1);function Rgt(e,t,n,i,o,r,s){let a=Li.numberOfPoints(e,t,o),c,d=n.red,u=n.green,m=n.blue,p=n.alpha,g=i.red,f=i.green,x=i.blue,_=i.alpha;if(Y.equals(n,i)){for(c=0;c<a;c++)r[s++]=Y.floatToByte(d),r[s++]=Y.floatToByte(u),r[s++]=Y.floatToByte(m),r[s++]=Y.floatToByte(p);return s}let C=(g-d)/a,V=(f-u)/a,Z=(x-m)/a,R=(_-p)/a,G=s;for(c=0;c<a;c++)r[G++]=Y.floatToByte(d+c*C),r[G++]=Y.floatToByte(u+c*V),r[G++]=Y.floatToByte(m+c*Z),r[G++]=Y.floatToByte(p+c*R);return G}function U9(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.colors,i=y(e.colorsPerVertex,!1);this._positions=t,this._colors=n,this._colorsPerVertex=i,this._arcType=y(e.arcType,$t.GEODESIC),this._granularity=y(e.granularity,X.RADIANS_PER_DEGREE),this._ellipsoid=y(e.ellipsoid,te.default),this._workerName="createSimplePolylineGeometry";let o=1+t.length*h.packedLength;o+=l(n)?1+n.length*Y.packedLength:1,this.packedLength=o+te.packedLength+3}U9.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._colors;for(r=l(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=Y.packedLength)Y.pack(s[i],t,n);return te.pack(e._ellipsoid,t,n),n+=te.packedLength,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};U9.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=Y.packedLength)s[i]=Y.unpack(e,t);let a=te.unpack(e,t);t+=te.packedLength;let c=e[t++]===1,d=e[t++],u=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=a,n._colorsPerVertex=c,n._arcType=d,n._granularity=u,n):new U9({positions:r,colors:s,ellipsoid:a,colorsPerVertex:c,arcType:d,granularity:u})};var ZB=new Array(2),LB=new Array(2),Ggt={positions:ZB,height:LB,ellipsoid:void 0,minDistance:void 0,granularity:void 0};U9.createGeometry=function(e){let t=e._positions,n=e._colors,i=e._colorsPerVertex,o=e._arcType,r=e._granularity,s=e._ellipsoid,a=X.chordLength(r,s.maximumRadius),c=l(n)&&!i,d,u=t.length,m,p,g,f,x=0;if(o===$t.GEODESIC||o===$t.RHUMB){let R,G,W;o===$t.GEODESIC?(R=X.chordLength(r,s.maximumRadius),G=Li.numberOfPoints,W=Li.generateArc):(R=r,G=Li.numberOfPointsRhumbLine,W=Li.generateRhumbArc);let v=Li.extractHeights(t,s),P=Ggt;if(o===$t.GEODESIC?P.minDistance=a:P.granularity=r,P.ellipsoid=s,c){let F=0;for(d=0;d<u-1;d++)F+=G(t[d],t[d+1],R)+1;m=new Float64Array(F*3),g=new Uint8Array(F*4),P.positions=ZB,P.height=LB;let M=0;for(d=0;d<u-1;++d){ZB[0]=t[d],ZB[1]=t[d+1],LB[0]=v[d],LB[1]=v[d+1];let b=W(P);if(l(n)){let L=b.length/3;f=n[d];for(let E=0;E<L;++E)g[M++]=Y.floatToByte(f.red),g[M++]=Y.floatToByte(f.green),g[M++]=Y.floatToByte(f.blue),g[M++]=Y.floatToByte(f.alpha)}m.set(b,x),x+=b.length}}else if(P.positions=t,P.height=v,m=new Float64Array(W(P)),l(n)){for(g=new Uint8Array(m.length/3*4),d=0;d<u-1;++d){let M=t[d],b=t[d+1],L=n[d],E=n[d+1];x=Rgt(M,b,L,E,a,g,x)}let F=n[u-1];g[x++]=Y.floatToByte(F.red),g[x++]=Y.floatToByte(F.green),g[x++]=Y.floatToByte(F.blue),g[x++]=Y.floatToByte(F.alpha)}}else{p=c?u*2-2:u,m=new Float64Array(p*3),g=l(n)?new Uint8Array(p*4):void 0;let R=0,G=0;for(d=0;d<u;++d){let W=t[d];if(c&&d>0&&(h.pack(W,m,R),R+=3,f=n[d-1],g[G++]=Y.floatToByte(f.red),g[G++]=Y.floatToByte(f.green),g[G++]=Y.floatToByte(f.blue),g[G++]=Y.floatToByte(f.alpha)),c&&d===u-1)break;h.pack(W,m,R),R+=3,l(n)&&(f=n[d],g[G++]=Y.floatToByte(f.red),g[G++]=Y.floatToByte(f.green),g[G++]=Y.floatToByte(f.blue),g[G++]=Y.floatToByte(f.alpha))}}let _=new mn;_.position=new Ge({componentDatatype:Q.DOUBLE,componentsPerAttribute:3,values:m}),l(n)&&(_.color=new Ge({componentDatatype:Q.UNSIGNED_BYTE,componentsPerAttribute:4,values:g,normalize:!0})),p=m.length/3;let C=(p-1)*2,V=Me.createTypedArray(p,C),Z=0;for(d=0;d<p-1;++d)V[Z++]=d,V[Z++]=d+1;return new ut({attributes:_,indices:V,primitiveType:Fe.LINES,boundingSphere:le.fromPoints(t)})};var M8=U9;var Kzi=S(T(),1);function uZ(e){let t=y(e.radius,1),i={radii:new h(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new Ds(i),this._workerName="createSphereGeometry"}uZ.packedLength=Ds.packedLength;uZ.pack=function(e,t,n){return Ds.pack(e._ellipsoidGeometry,t,n)};var Egt=new Ds,Ey={radius:void 0,radii:new h,vertexFormat:new Xe,stackPartitions:void 0,slicePartitions:void 0};uZ.unpack=function(e,t,n){let i=Ds.unpack(e,t,Egt);return Ey.vertexFormat=Xe.clone(i._vertexFormat,Ey.vertexFormat),Ey.stackPartitions=i._stackPartitions,Ey.slicePartitions=i._slicePartitions,l(n)?(h.clone(i._radii,Ey.radii),n._ellipsoidGeometry=new Ds(Ey),n):(Ey.radius=i._radii.x,new uZ(Ey))};uZ.createGeometry=function(e){return Ds.createGeometry(e._ellipsoidGeometry)};var N8=uZ;var Qzi=S(T(),1);function Wy(e){}Object.defineProperties(Wy.prototype,{ellipsoid:{get:fe.throwInstantiationError},rectangle:{get:fe.throwInstantiationError},projection:{get:fe.throwInstantiationError}});Wy.prototype.getNumberOfXTilesAtLevel=fe.throwInstantiationError;Wy.prototype.getNumberOfYTilesAtLevel=fe.throwInstantiationError;Wy.prototype.rectangleToNativeRectangle=fe.throwInstantiationError;Wy.prototype.tileXYToNativeRectangle=fe.throwInstantiationError;Wy.prototype.tileXYToRectangle=fe.throwInstantiationError;Wy.prototype.positionToTileXY=fe.throwInstantiationError;var U8=Wy;var mKi=S(T(),1);function Wgt(e,t){this.rectangle=e,this.maxLevel=t}function gSe(e){this.ellipsoid=y(e.ellipsoid,te.default),this.tilingScheme=void 0,this.heightmapWidth=void 0,this.heightmapHeight=void 0,this.levelZeroMaximumGeometricError=void 0,this.rectangles=[]}gSe.prototype.build=function(e){e._tilingScheme=this.tilingScheme,e._heightmapWidth=this.heightmapWidth,e._heightmapHeight=this.heightmapHeight,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._rectangles=this.rectangles};function Igt(e,t){let n=t.getElementsByTagName("SRS")[0].textContent;if(n==="EPSG:4326")e.tilingScheme=new Ni({ellipsoid:e.ellipsoid});else throw new ue(`SRS ${n} is not supported`);let i=t.getElementsByTagName("TileFormat")[0];e.heightmapWidth=parseInt(i.getAttribute("width"),10),e.heightmapHeight=parseInt(i.getAttribute("height"),10),e.levelZeroMaximumGeometricError=Qr.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.ellipsoid,Math.min(e.heightmapWidth,e.heightmapHeight),e.tilingScheme.getNumberOfXTilesAtLevel(0));let o=t.getElementsByTagName("DataExtent");for(let r=0;r<o.length;++r){let s=o[r],a=X.toRadians(parseFloat(s.getAttribute("minx"))),c=X.toRadians(parseFloat(s.getAttribute("miny"))),d=X.toRadians(parseFloat(s.getAttribute("maxx"))),u=X.toRadians(parseFloat(s.getAttribute("maxy"))),m=parseInt(s.getAttribute("maxlevel"),10);e.rectangles.push(new Wgt(new ce(a,c,d,u),m))}}function Xgt(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i=`${i}: ${t.message}`),Co.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new ue(i)}async function Pgt(e,t,n){try{let i=await t.fetchXML();Igt(e,i)}catch(i){Xgt(t,i,n)}}function Iy(e){e=y(e,y.EMPTY_OBJECT),this._errorEvent=new ge,this._terrainDataStructure={heightScale:1/1e3,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:256*256*256-1};let t=e.credit;typeof t=="string"&&(t=new Vt(t)),this._credit=t,this._tilingScheme=void 0,this._rectangles=[]}Object.defineProperties(Iy.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});Iy.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n=new gSe(t),i=Ee.createIfNeeded(e);await Pgt(n,i);let o=new Iy(t);return n.build(o),o._resource=i,o};Iy.prototype.requestTileGeometry=function(e,t,n,i){let o=this._tilingScheme.getNumberOfYTilesAtLevel(n),s=this._resource.getDerivedResource({url:`${n}/${e}/${o-t-1}.tif`,queryParameters:{cesium:!0},request:i}).fetchImage({preferImageBitmap:!0});if(!l(s))return;let a=this;return Promise.resolve(s).then(function(c){return new Pa({buffer:um(c),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:vgt(a,e,t,n),structure:a._terrainDataStructure})})};Iy.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var ySe=new ce;function vgt(e,t,n,i){let o=e._tilingScheme,r=e._rectangles,s=o.tileXYToRectangle(t,n,i),a=0;for(let c=0;c<r.length&&a!==15;++c){let d=r[c];if(d.maxLevel<=i)continue;let u=d.rectangle,m=ce.intersection(u,s,ySe);l(m)&&(RB(o,u,t*2,n*2,i+1)&&(a|=4),RB(o,u,t*2+1,n*2,i+1)&&(a|=8),RB(o,u,t*2,n*2+1,i+1)&&(a|=1),RB(o,u,t*2+1,n*2+1,i+1)&&(a|=2))}return a}function RB(e,t,n,i,o){let r=e.tileXYToRectangle(n,i,o);return l(ce.intersection(r,t,ySe))}Iy.prototype.getTileDataAvailable=function(e,t,n){};Iy.prototype.loadTileDataAvailability=function(e,t,n){};var k8=Iy;var xKi=S(T(),1);function qS(e){e=y(e,y.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=y(e.epoch,Be.MINIMUM_VALUE),this.tolerance=y(e.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(qS.prototype,{clock:{get:function(){return this._clock},set:function(e){let t=this._clock;t!==e&&(l(t)&&(this._clockSubscription(),this._clockSubscription=void 0),l(e)&&(this._clockSubscription=e.onTick.addEventListener(qS.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){let t=this._element;t!==e&&(l(t)&&t.removeEventListener("seeked",this._seekFunction,!1),l(e)&&(this._seeking=!1,this._seekFunction=wgt(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}});qS.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,me(this)};qS.prototype.isDestroyed=function(){return!1};qS.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate===e.multiplier)return;let t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier};qS.prototype._onTick=function(e){let t=this._element;if(!l(t)||t.readyState<2)return;let n=t.paused,i=e.shouldAnimate;if(i===n&&(i?t.play():t.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(e);let o=e.currentTime,r=y(this.epoch,Be.MINIMUM_VALUE),s=ne.secondsDifference(o,r),a=t.duration,c,d=t.currentTime;t.loop?(s=s%a,s<0&&(s=a-s),c=s):s>a?c=a:s<0?c=0:c=s;let u=i?y(this.tolerance,1):.001;Math.abs(c-d)>u&&(this._seeking=!0,t.currentTime=c)};function wgt(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}var D8=qS;var SKi=S(T(),1),Fgt={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},B8=Object.freeze(Fgt);var ZKi=S(T(),1);function Agt(e){return e=y(e,y.EMPTY_OBJECT),JS.fromIonAssetId(2426648,{requestVertexNormals:y(e.requestVertexNormals,!1)})}var k9=Agt;var WKi=S(T(),1);function Mgt(e){return e=y(e,y.EMPTY_OBJECT),JS.fromIonAssetId(1,{requestVertexNormals:y(e.requestVertexNormals,!1),requestWaterMask:y(e.requestWaterMask,!1),ellipsoid:te.WGS84})}var $S=Mgt;var PKi=S(T(),1);var Ngt=1953029805,Ugt=2917034100;function Y8(e,t){if(Y8.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new ue("The length of key must be greater than 0 and a multiple of 4.");let i=new DataView(t),o=i.getUint32(0,!0);if(o===Ngt||o===Ugt)return t;let r=new DataView(e),s=0,a=t.byteLength,c=a-a%8,d=n,u,m=8;for(;s<c;)for(m=(m+8)%24,u=m;s<c&&u<d;)i.setUint32(s,i.getUint32(s,!0)^r.getUint32(u,!0),!0),i.setUint32(s+4,i.getUint32(s+4,!0)^r.getUint32(u+4,!0),!0),s+=8,u+=24;if(s<a)for(u>=d&&(m=(m+8)%24,u=m);s<a;)i.setUint8(s,i.getUint8(s)^r.getUint8(u)),s++,u++}Y8.passThroughDataForTesting=!1;var D9=Y8;var MKi=S(T(),1);var kgt=new h;function Dgt(e,t,n,i){let o=ax(e,t,n,i,kgt);return l(o)?o.x>0&&o.y>0&&o.z>0:!1}var O8=Dgt;var kKi=S(T(),1);async function Bgt(e,t,n,i){return l(i)||(i=!1),zgt(e,t,n,i)}function Ygt(e,t,n){let i=e[0],o=i.terrainProvider.requestTileGeometry(i.x,i.y,i.level);if(!o)return!1;let r;return n?r=o.then(_Se(i)):r=o.then(_Se(i)).catch(Kgt(i)),e.shift(),t.push(r),!0}function Ogt(e){return new Promise(function(t){setTimeout(t,e)})}function z8(e,t,n){return e.length?Ygt(e,t,n)?z8(e,t,n):Ogt(100).then(()=>z8(e,t,n)):Promise.resolve()}function zgt(e,t,n,i){let o=e.tilingScheme,r,s=[],a={};for(r=0;r<n.length;++r){let d=o.positionToTileXY(n[r],t);if(!l(d))continue;let u=d.toString();if(!a.hasOwnProperty(u)){let m={x:d.x,y:d.y,level:t,tilingScheme:o,terrainProvider:e,positions:[]};a[u]=m,s.push(m)}a[u].positions.push(n[r])}let c=[];return z8(s,c,i).then(function(){return Promise.all(c).then(function(){return n})})}function xSe(e,t,n){let i=t.interpolateHeight(n,e.longitude,e.latitude);return i===void 0?!1:(e.height=i,!0)}function _Se(e){let t=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(i){let o=!1;for(let r=0;r<t.length;++r){let s=t[r];if(!xSe(s,i,n)){o=!0;break}}return o?i.createMesh({tilingScheme:e.tilingScheme,x:e.x,y:e.y,level:e.level,throttle:!1}).then(function(){for(let r=0;r<t.length;++r){let s=t[r];xSe(s,i,n)}}):Promise.resolve()}}function Kgt(e){let t=e.positions;return function(){for(let n=0;n<t.length;++n){let i=t[n];i.height=void 0}}}var B9=Bgt;var zKi=S(T(),1);var K8=new D;async function SSe(e,t,n){l(n)||(n=!1);let i=[],o=[],r=e.availability,s=[];for(let c=0;c<t.length;++c){let d=t[c],u=r.computeMaximumLevelAtPosition(d);if(o[c]=u,u===0){e.tilingScheme.positionToTileXY(d,1,K8);let p=e.loadTileDataAvailability(K8.x,K8.y,1);l(p)&&s.push(p)}let m=i[u];l(m)||(i[u]=m=[]),m.push(d)}await Promise.all(s),await Promise.all(i.map(function(c,d){if(l(c))return B9(e,d,c,n)}));let a=[];for(let c=0;c<t.length;++c){let d=t[c];r.computeMaximumLevelAtPosition(d)!==o[c]&&a.push(d)}return a.length>0&&await SSe(e,a,n),t}var eT=SSe;var HKi=S(T(),1);function Hgt(e){return e<=.04045?e*.07739938080495357:Math.pow((e+.055)*.9478672985781991,2.4)}var tT=Hgt;var jKi=S(T(),1);function Jgt(e){switch(e){case ie.FLOAT:return"float";case ie.FLOAT_VEC2:return"vec2";case ie.FLOAT_VEC3:return"vec3";case ie.FLOAT_VEC4:return"vec4";case ie.FLOAT_MAT2:return"mat2";case ie.FLOAT_MAT3:return"mat3";case ie.FLOAT_MAT4:return"mat4";case ie.SAMPLER_2D:return"sampler2D";case ie.BOOL:return"bool"}}var H8=Jgt;var $Ki=S(T(),1);function Qgt(e,t,n){return function(){n.apply(e,arguments),t.apply(e,arguments)}}var Y9=Qgt;var oHi=S(T(),1);var jgt=new h(1,1,1);function J8(e){e=y(e,jgt),this._dimensions=h.clone(e)}Object.defineProperties(J8.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){h.clone(e,this._dimensions)}}});var qgt=new h;J8.prototype.emit=function(e){let t=this._dimensions,n=h.multiplyByScalar(t,.5,qgt),i=X.randomBetween(-n.x,n.x),o=X.randomBetween(-n.y,n.y),r=X.randomBetween(-n.z,n.z);e.position=h.fromElements(i,o,r,e.position),e.velocity=h.normalize(e.position,e.velocity)};var Q8=J8;var aHi=S(T(),1);function qf(){this.featurePropertiesDirty=!1}Object.defineProperties(qf.prototype,{featuresLength:{get:function(){fe.throwInstantiationError()}},pointsLength:{get:function(){fe.throwInstantiationError()}},trianglesLength:{get:function(){fe.throwInstantiationError()}},geometryByteLength:{get:function(){fe.throwInstantiationError()}},texturesByteLength:{get:function(){fe.throwInstantiationError()}},batchTableByteLength:{get:function(){fe.throwInstantiationError()}},innerContents:{get:function(){fe.throwInstantiationError()}},ready:{get:function(){fe.throwInstantiationError()}},tileset:{get:function(){fe.throwInstantiationError()}},tile:{get:function(){fe.throwInstantiationError()}},url:{get:function(){fe.throwInstantiationError()}},batchTable:{get:function(){fe.throwInstantiationError()}},metadata:{get:function(){fe.throwInstantiationError()},set:function(e){fe.throwInstantiationError()}},group:{get:function(){fe.throwInstantiationError()},set:function(e){fe.throwInstantiationError()}}});qf.prototype.hasProperty=function(e,t){fe.throwInstantiationError()};qf.prototype.getFeature=function(e){fe.throwInstantiationError()};qf.prototype.applyDebugSettings=function(e,t){fe.throwInstantiationError()};qf.prototype.applyStyle=function(e){fe.throwInstantiationError()};qf.prototype.update=function(e,t){fe.throwInstantiationError()};qf.prototype.pick=function(e,t,n){fe.throwInstantiationError()};qf.prototype.isDestroyed=function(){fe.throwInstantiationError()};qf.prototype.destroy=function(){fe.throwInstantiationError()};var j8=qf;var _Hi=S(T(),1);var mHi=S(T(),1);function mZ(e,t){this._conditionsExpression=Oe(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,eyt(this,t)}Object.defineProperties(mZ.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}});function $gt(e,t){this.condition=e,this.expression=t}function eyt(e,t){let n=[],i=e._conditions;if(!l(i))return;let o=i.length;for(let r=0;r<o;++r){let s=i[r],a=String(s[0]),c=String(s[1]);n.push(new $gt(new hu(a,t),new hu(c,t)))}e._runtimeConditions=n}mZ.prototype.evaluate=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluate(e,t)}};mZ.prototype.evaluateColor=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluateColor(e,t)}};mZ.prototype.getShaderFunction=function(e,t,n,i){let o=this._runtimeConditions;if(!l(o)||o.length===0)return;let r="",s=o.length;for(let a=0;a<s;++a){let c=o[a],d=c.condition.getShaderExpression(t,n),u=c.expression.getShaderExpression(t,n);r+=` ${a===0?"if":"else if"} (${d}) { return ${u}; } @@ -15495,7 +15599,7 @@ ${f}`);let x=document.createElement("div");x.className="cesium-widget-errorPanel { ${r} return ${i}(1.0); } -`,r};mL.prototype.getVariables=function(){let e=[],t=this._runtimeConditions;if(!l(t)||t.length===0)return e;let n=t.length;for(let i=0;i<n;++i){let o=t[i];e.push.apply(e,o.condition.getVariables()),e.push.apply(e,o.expression.getVariables())}return e=e.filter(function(i,o,r){return r.indexOf(i)===o}),e};var Y9=mL;function Py(e){this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._meta=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,ayt(this,e)}function ayt(e,t){t=y(Oe(t,!0),e._style),e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin;let n={};if(l(t.meta)){let i=t.defines,o=y(t.meta,y.EMPTY_OBJECT);for(let r in o)o.hasOwnProperty(r)&&(n[r]=new fu(o[r],i))}e._meta=n,e._ready=!0}function er(e,t){let n=y(e._style,y.EMPTY_OBJECT).defines;if(l(t)){if(typeof t=="boolean"||typeof t=="number")return new fu(String(t));if(typeof t=="string")return new fu(t,n);if(l(t.conditions))return new Y9(t,n)}else return;return t}function tr(e){if(l(e)){if(l(e.expression))return e.expression;if(l(e.conditionsExpression))return Oe(e.conditionsExpression,!0)}else return;return e}Object.defineProperties(Py.prototype,{style:{get:function(){return this._style}},show:{get:function(){return this._show},set:function(e){this._show=er(this,e),this._style.show=tr(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=er(this,e),this._style.color=tr(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=er(this,e),this._style.pointSize=tr(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=er(this,e),this._style.pointOutlineColor=tr(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=er(this,e),this._style.pointOutlineWidth=tr(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=er(this,e),this._style.labelColor=tr(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=er(this,e),this._style.labelOutlineColor=tr(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=er(this,e),this._style.labelOutlineWidth=tr(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=er(this,e),this._style.font=tr(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=er(this,e),this._style.labelStyle=tr(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=er(this,e),this._style.labelText=tr(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=er(this,e),this._style.backgroundColor=tr(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=er(this,e),this._style.backgroundPadding=tr(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=er(this,e),this._style.backgroundEnabled=tr(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=er(this,e),this._style.scaleByDistance=tr(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=er(this,e),this._style.translucencyByDistance=tr(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=er(this,e),this._style.distanceDisplayCondition=tr(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=er(this,e),this._style.heightOffset=tr(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=er(this,e),this._style.anchorLineEnabled=tr(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=er(this,e),this._style.anchorLineColor=tr(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=er(this,e),this._style.image=tr(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=er(this,e),this._style.disableDepthTestDistance=tr(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=er(this,e),this._style.horizontalOrigin=tr(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=er(this,e),this._style.verticalOrigin=tr(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=er(this,e),this._style.labelHorizontalOrigin=tr(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=er(this,e),this._style.labelVerticalOrigin=tr(this._labelVerticalOrigin)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}});Py.fromUrl=function(e){return Ee.createIfNeeded(e).fetchJson(e).then(function(n){return new Py(n)})};Py.prototype.getColorShaderFunction=function(e,t,n){return this._colorShaderFunctionReady?(n.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,l(this.color)&&l(this.color.getShaderFunction)?this._colorShaderFunction=this.color.getShaderFunction(e,t,n,"vec4"):this._colorShaderFunction=void 0,this._colorShaderTranslucent=n.translucent,this._colorShaderFunction)};Py.prototype.getShowShaderFunction=function(e,t,n){return this._showShaderFunctionReady?this._showShaderFunction:(this._showShaderFunctionReady=!0,l(this.show)&&l(this.show.getShaderFunction)?this._showShaderFunction=this.show.getShaderFunction(e,t,n,"bool"):this._showShaderFunction=void 0,this._showShaderFunction)};Py.prototype.getPointSizeShaderFunction=function(e,t,n){return this._pointSizeShaderFunctionReady?this._pointSizeShaderFunction:(this._pointSizeShaderFunctionReady=!0,l(this.pointSize)&&l(this.pointSize.getShaderFunction)?this._pointSizeShaderFunction=this.pointSize.getShaderFunction(e,t,n,"float"):this._pointSizeShaderFunction=void 0,this._pointSizeShaderFunction)};Py.prototype.getVariables=function(){let e=[];return l(this.color)&&l(this.color.getVariables)&&e.push.apply(e,this.color.getVariables()),l(this.show)&&l(this.show.getVariables)&&e.push.apply(e,this.show.getVariables()),l(this.pointSize)&&l(this.pointSize.getVariables)&&e.push.apply(e,this.pointSize.getVariables()),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var iS=Py;var jKi=T(S(),1);var SKi=T(S(),1);function O9(e){e=y(e,y.EMPTY_OBJECT),this._maximumSubtreeCount=y(e.maximumSubtreeCount,0),this._subtreeRequestCounter=0,this._queue=new yT({comparator:O9.comparator})}O9.prototype.addSubtree=function(e){let t=new cyt(e,this._subtreeRequestCounter);this._subtreeRequestCounter++,this._queue.insert(t);let n=e.implicitCoordinates;if(n.level>0){let i=n.getParentSubtreeCoordinates(),o=this.find(i)}if(this._maximumSubtreeCount>0)for(;this._queue.length>this._maximumSubtreeCount&&this._queue.getMinimum()!==t;)this._queue.removeMinimum()};O9.prototype.find=function(e){let t=this._queue,n=t.internalArray,i=t.length;for(let o=0;o<i;o++){let r=n[o],a=r.subtree.implicitCoordinates;if(e.isEqual(a))return r.subtree}};O9.comparator=function(e,t){let n=e.subtree.implicitCoordinates,i=t.subtree.implicitCoordinates;return n.isAncestor(i)?1:i.isAncestor(n)?-1:e.stamp-t.stamp};function cyt(e,t){this.subtree=e,this.stamp=t}var H9=O9;var ZKi=T(S(),1);function Z3(e){this._resource=e,this._metadataTable=void 0}Object.defineProperties(Z3.prototype,{metadataTable:{get:function(){return this._metadataTable}}});Z3.fromJson=async function(e,t,n,i){let o;l(t)?o={json:t,binary:void 0}:o=dyt(n);let r=await lyt(e,o.json,o.binary),s={},a=o.json.bufferViews.length;for(let m=0;m<a;++m){let p=o.json.bufferViews[m],g=p.byteOffset,f=g+p.byteLength,_=r[p.buffer].subarray(g,f);s[m]=_}let c=o.json.voxelTable,d=o.json.propertyTables[c],u=new Z3(e);return u._metadataTable=new Gl({count:d.count,properties:d.properties,class:i.classes[d.class],bufferViews:s}),u};function lyt(e,t,n){let i=t.buffers.length,o=new Array(i);for(let r=0;r<i;r++){let s=t.buffers[r];if(l(s.uri)){let c=e.getDerivedResource({url:s.uri});o[r]=c.fetchArrayBuffer().then(function(d){return new Uint8Array(d)})}else o[r]=Promise.resolve(n)}return Promise.all(o)}function dyt(e){let n=new DataView(e.buffer,e.byteOffset),i=8,o=n.getUint32(i,!0);i+=8;let r=n.getUint32(i,!0);i+=8;let s=Eo(e,i,o);i+=o;let a=e.subarray(i,i+r);return{json:s,binary:a}}var z9=Z3;function G3(e){e=y(e,y.EMPTY_OBJECT),this.shapeTransform=void 0,this.globalTransform=void 0,this.shape=void 0,this.minBounds=void 0,this.maxBounds=void 0,this.dimensions=void 0,this.paddingBefore=void 0,this.paddingAfter=void 0,this.names=void 0,this.types=void 0,this.componentTypes=void 0,this.minimumValues=void 0,this.maximumValues=void 0,this.maximumTileCount=void 0,this._implicitTileset=void 0,this._subtreeCache=new H9}G3.fromUrl=async function(e){let t=Ee.createIfNeeded(e),n=await t.fetchJson();myt(n);let i=gyt(n,t);await i.load();let o=n.root,r=o.content.extensions["3DTILES_content_voxels"],s=r.class,a=oi(n,"3DTILES_metadata")?n.extensions["3DTILES_metadata"]:n,c=i.schema,d=new G_({metadataJson:a,schema:c}),u=new G3;yyt(u,d,s);let m=new X_(t,o,c),{shape:p,minBounds:g,maxBounds:f,shapeTransform:x,globalTransform:_}=hyt(o);u.shape=p,u.minBounds=g,u.maxBounds=f,u.dimensions=h.unpack(r.dimensions),u.shapeTransform=x,u.globalTransform=_,u.maximumTileCount=uyt(d);let C,V;return l(r.padding)&&(C=h.unpack(r.padding.before),V=h.unpack(r.padding.after)),u.paddingBefore=C,u.paddingAfter=V,u._implicitTileset=m,Ni.unload(i),u};function uyt(e){if(l(e.tileset))return e.tileset.getPropertyBySemantic(Qx.TILESET_TILE_COUNT)}function myt(e){let t=e.root;if(!l(t.content))throw new ue("Root must have content");if(!oi(t.content,"3DTILES_content_voxels"))throw new ue("Root tile content must have 3DTILES_content_voxels extension");if(!oi(t,"3DTILES_implicit_tiling")&&!l(t.implicitTiling))throw new ue("Root tile must have implicit tiling");if(!l(e.schema)&&!l(e.schemaUri)&&!oi(e,"3DTILES_metadata"))throw new ue("Tileset must have a metadata schema")}function hyt(e){let t=e.boundingVolume,n;if(l(e.transform)?n=M.unpack(e.transform):n=M.clone(M.IDENTITY),l(t.box))return pyt(t.box,n);if(l(t.region))return fyt(t.region);if(oi(t,"3DTILES_bounding_volume_cylinder"))return byt(t.extensions["3DTILES_bounding_volume_cylinder"].cylinder,n);throw new ue("Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider")}function fyt(e){let t=e[0],n=e[1],i=e[2],o=e[3],r=e[4],s=e[5],a=M.fromScale(ie.WGS84.radii),c=new h(t,n,r),d=new h(i,o,s);return{shape:Xi.ELLIPSOID,minBounds:c,maxBounds:d,shapeTransform:a,globalTransform:M.clone(M.IDENTITY)}}function pyt(e,t){let n=Gn.unpack(e),i=M.fromRotationTranslation(n.halfAxes,n.center);return{shape:Xi.BOX,minBounds:h.clone(Qf.DefaultMinBounds),maxBounds:h.clone(Qf.DefaultMaxBounds),shapeTransform:i,globalTransform:t}}function byt(e,t){let n=Gn.unpack(e),i=M.fromRotationTranslation(n.halfAxes,n.center);return{shape:Xi.CYLINDER,minBounds:h.clone(jf.DefaultMinBounds),maxBounds:h.clone(jf.DefaultMaxBounds),shapeTransform:i,globalTransform:t}}function gyt(e,t){let{schemaUri:n,schema:i}=e;return l(n)?Ni.getSchemaLoader({resource:t.getDerivedResource({url:n})}):Ni.getSchemaLoader({schema:i})}function yyt(e,t,n){let{schema:i,statistics:o}=t,r=o?.classes[n],s=i.classes[n].properties,a=Object.entries(s).map(([m,p])=>{let{type:g,componentType:f}=p,x=r?.properties[m].min,_=r?.properties[m].max,C=zt.getComponentCount(g),V=gTe(x,C),L=gTe(_,C);return{id:m,type:g,componentType:f,minValue:V,maxValue:L}});e.names=a.map(m=>m.id),e.types=a.map(m=>m.type),e.componentTypes=a.map(m=>m.componentType);let c=a.map(m=>m.minValue),d=a.map(m=>m.maxValue),u=c.some(l);e.minimumValues=u?c:void 0,e.maximumValues=u?d:void 0}function gTe(e,t){if(!l(e))return;let n=Array.isArray(e)?e:[e];return Array.from({length:t},(i,o)=>n[o])}async function xyt(e,t){let n=e.contentUriTemplates[0].getDerivedResource({templateValues:t.getTemplateValues()}),i=e.baseResource.getDerivedResource({url:n.url}),o=await i.fetchArrayBuffer(),r=ff(o);return await z9.fromJson(i,r.jsonPayload,r.binaryPayload,e.metadataSchema)}async function _yt(e,t){let n=e._implicitTileset,i=e._subtreeCache,o=i.find(t);if(l(o))return o;let r=n.subtreeUriTemplate.getDerivedResource({templateValues:t.getTemplateValues()}),s=n.baseResource.getDerivedResource({url:r.url}),a=await s.fetchArrayBuffer();if(o=i.find(t),l(o))return o;let c=ff(a);return o=await Jx.fromSubtreeJson(s,c.jsonPayload,c.binaryPayload,n,t),i.addSubtree(o),o}G3.prototype.requestData=function(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.tileLevel,0),n=y(e.tileX,0),i=y(e.tileY,0),o=y(e.tileZ,0);if(y(e.keyframe,0)!==0)return;let s=this._implicitTileset,a=this.names,c=new I_({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:t,x:n,y:i,z:o}),d=c.isSubtreeRoot()&&c.level>0,u=d?c.getParentSubtreeCoordinates():c.getSubtreeCoordinates();return _yt(this,u).then(function(p){return(d?p.childSubtreeIsAvailableAtCoordinates(c):p.tileIsAvailableAtCoordinates(c))?xyt(s,c):Promise.reject("Tile is not available")}).then(function(p){return a.map(function(g){return p.metadataTable.getPropertyTypedArray(g)})})};var $8=G3;var nJi=T(S(),1);function e7(e){e=y(e,1),this._radius=y(e,1)}Object.defineProperties(e7.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});e7.prototype.emit=function(e){let t=W.randomBetween(0,W.TWO_PI),n=W.randomBetween(0,this._radius),i=n*Math.cos(t),o=n*Math.sin(t),r=0;e.position=h.fromElements(i,o,r,e.position),e.velocity=h.clone(h.UNIT_Z,e.velocity)};var K9=e7;var HJi=T(S(),1);var oJi=T(S(),1),t7={CUMULUS:0};t7.validate=function(e){return e===t7.CUMULUS};var hL=Object.freeze(t7);var uJi=T(S(),1);function Eh(e,t){if(e=y(e,y.EMPTY_OBJECT),this._show=y(e.show,!0),this._position=h.clone(y(e.position,h.ZERO)),!l(e.scale)&&l(e.maximumSize))this._maximumSize=h.clone(e.maximumSize),this._scale=new D(this._maximumSize.x,this._maximumSize.y);else{this._scale=D.clone(y(e.scale,new D(20,12)));let n=new h(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=h.clone(y(e.maximumSize,n))}this._slice=y(e.slice,-1),this._color=Y.clone(y(e.color,Y.WHITE)),this._brightness=y(e.brightness,1),this._cloudCollection=t,this._index=-1}var Tyt=Eh.SHOW_INDEX=0,Syt=Eh.POSITION_INDEX=1,Cyt=Eh.SCALE_INDEX=2,Vyt=Eh.MAXIMUM_SIZE_INDEX=3,Lyt=Eh.SLICE_INDEX=4,Ryt=Eh.BRIGHTNESS_INDEX=5,Zyt=Eh.COLOR_INDEX=6;Eh.NUMBER_OF_PROPERTIES=7;function oS(e,t){let n=e._cloudCollection;l(n)&&(n._updateCloud(e,t),e._dirty=!0)}Object.defineProperties(Eh.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,oS(this,Tyt))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),oS(this,Syt))}},scale:{get:function(){return this._scale},set:function(e){let t=this._scale;D.equals(t,e)||(D.clone(e,t),oS(this,Cyt))}},maximumSize:{get:function(){return this._maximumSize},set:function(e){let t=this._maximumSize;h.equals(t,e)||(h.clone(e,t),oS(this,Vyt))}},color:{get:function(){return this._color},set:function(e){let t=this._color;Y.equals(t,e)||(Y.clone(e,t),oS(this,Zyt))}},slice:{get:function(){return this._slice},set:function(e){this._slice!==e&&(this._slice=e,oS(this,Lyt))}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness!==e&&(this._brightness=e,oS(this,Ryt))}}});Eh.prototype._destroy=function(){this._cloudCollection=void 0};var qd=Eh;var $d,E3=new h,Gyt={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},Eyt={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},Xyt=qd.SHOW_INDEX,Iyt=qd.POSITION_INDEX,Wyt=qd.SCALE_INDEX,Pyt=qd.MAXIMUM_SIZE_INDEX,vyt=qd.SLICE_INDEX,wyt=qd.BRIGHTNESS_INDEX,Fyt=qd.NUMBER_OF_PROPERTIES,Ayt=qd.COLOR_INDEX;function Xh(e){e=y(e,y.EMPTY_OBJECT),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(Fyt),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=y(e.noiseDetail,16),this.noiseOffset=h.clone(y(e.noiseOffset,h.ZERO)),this._loading=!1,this._ready=!1;let t=this;this._uniforms={u_noiseTexture:function(){return t._noiseTexture},u_noiseTextureDimensions:yTe(t),u_noiseDetail:function(){return t.noiseDetail}},this._vaNoise=void 0,this._spNoise=void 0,this._spCreated=!1,this._sp=void 0,this._rs=void 0,this.show=y(e.show,!0),this._colorCommands=[],this.debugBillboards=y(e.debugBillboards,!1),this._compiledDebugBillboards=!1,this.debugEllipsoids=y(e.debugEllipsoids,!1),this._compiledDebugEllipsoids=!1}function yTe(e){return function(){return E3.x=e._textureSliceWidth,E3.y=e._noiseTextureRows,E3.z=1/e._noiseTextureRows,E3}}Object.defineProperties(Xh.prototype,{length:{get:function(){return i7(this),this._clouds.length}}});function xTe(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Xh.prototype.add=function(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.cloudType,hL.CUMULUS),n;return t===hL.CUMULUS&&(n=new qd(e,this),n._index=this._clouds.length,this._clouds.push(n),this._createVertexArray=!0),n};Xh.prototype.remove=function(e){return this.contains(e)?(this._clouds[e._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Xh.prototype.removeAll=function(){xTe(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function i7(e){if(e._cloudsRemoved){e._cloudsRemoved=!1;let t=[],n=e._clouds,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];l(s)&&(n._index=r++,t.push(s))}e._clouds=t}}Xh.prototype._updateCloud=function(e,t){e._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=e),++this._propertiesChanged[t]};Xh.prototype.contains=function(e){return l(e)&&e._cloudCollection===this};Xh.prototype.get=function(e){return i7(this),this._clouds[e]};var Myt=new Float32Array([-1,-1,1,-1,1,1,-1,1]),Nyt=new Uint16Array([0,1,2,0,2,3]);function kyt(e){let t=ft.createVertexBuffer({context:e,typedArray:Myt,usage:Ne.STATIC_DRAW}),n=ft.createIndexBuffer({context:e,typedArray:Nyt,usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT}),i=[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:Q.FLOAT}];return new ei({context:e,attributes:i,indexBuffer:n})}var o7;function Uyt(e){let n=e.cache.cloudCollection_indexBufferBatched;if(l(n))return n;let i=16384*6-6,o=new Uint16Array(i);for(let r=0,s=0;r<i;r+=6,s+=4)o[r]=s,o[r+1]=s+1,o[r+2]=s+2,o[r+3]=s,o[r+4]=s+2,o[r+5]=s+3;return n=ft.createIndexBuffer({context:e,typedArray:o,usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferBatched=n,n}function Dyt(e){let t=e.cache.cloudCollection_indexBufferInstanced;return l(t)||(t=ft.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferInstanced=t),t}function Byt(e){let t=e.cache.cloudCollection_vertexBufferInstanced;return l(t)||(t=ft.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Ne.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_vertexBufferInstanced=t),t}function Yyt(e,t,n){let i=[{index:$d.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:Q.FLOAT,usage:Ne.STATIC_DRAW},{index:$d.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:Q.FLOAT,usage:Ne.STATIC_DRAW},{index:$d.packedAttribute0,componentsPerAttribute:4,componentDatatype:Q.FLOAT,usage:Ne.STATIC_DRAW},{index:$d.packedAttribute1,componentsPerAttribute:4,componentDatatype:Q.FLOAT,usage:Ne.STATIC_DRAW},{index:$d.color,componentsPerAttribute:4,componentDatatype:Q.UNSIGNED_BYTE,normalize:!0,usage:Ne.STATIC_DRAW}];n&&i.push({index:$d.direction,componentsPerAttribute:2,componentDatatype:Q.FLOAT,vertexBuffer:Byt(e)});let o=n?t:4*t;return new $p(e,i,o,n)}var n7=new Yn;function _Te(e,t,n,i){let o,r=n[$d.positionHighAndScaleX],s=n[$d.positionLowAndScaleY],a=i.position;Yn.fromCartesian(a,n7);let c=i.scale,d=n7.high,u=n7.low;e._instanced?(o=i._index,r(o,d.x,d.y,d.z,c.x),s(o,u.x,u.y,u.z,c.y)):(o=i._index*4,r(o+0,d.x,d.y,d.z,c.x),r(o+1,d.x,d.y,d.z,c.x),r(o+2,d.x,d.y,d.z,c.x),r(o+3,d.x,d.y,d.z,c.x),s(o+0,u.x,u.y,u.z,c.y),s(o+1,u.x,u.y,u.z,c.y),s(o+2,u.x,u.y,u.z,c.y),s(o+3,u.x,u.y,u.z,c.y))}function TTe(e,t,n,i){let o,r=n[$d.packedAttribute0],s=i.show,a=i.brightness;e._instanced?(o=i._index,r(o,s,a,0,0)):(o=i._index*4,r(o+0,s,a,0,0),r(o+1,s,a,1,0),r(o+2,s,a,1,1),r(o+3,s,a,0,1))}function STe(e,t,n,i){let o,r=n[$d.packedAttribute1],s=i.maximumSize,a=i.slice;e._instanced?(o=i._index,r(o,s.x,s.y,s.z,a)):(o=i._index*4,r(o+0,s.x,s.y,s.z,a),r(o+1,s.x,s.y,s.z,a),r(o+2,s.x,s.y,s.z,a),r(o+3,s.x,s.y,s.z,a))}function CTe(e,t,n,i){let o,r=n[$d.color],s=i.color,a=Y.floatToByte(s.red),c=Y.floatToByte(s.green),d=Y.floatToByte(s.blue),u=Y.floatToByte(s.alpha);e._instanced?(o=i._index,r(o,a,c,d,u)):(o=i._index*4,r(o+0,a,c,d,u),r(o+1,a,c,d,u),r(o+2,a,c,d,u),r(o+3,a,c,d,u))}function Oyt(e,t,n,i){_Te(e,t,n,i),TTe(e,t,n,i),STe(e,t,n,i),CTe(e,t,n,i)}function Hyt(e,t,n,i){let o=e,r=o._textureSliceWidth,s=o._noiseTextureRows,a=t.context;o._vaNoise=kyt(a),o._spNoise=qt.fromCache({context:a,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:{position:0}});let c=o.noiseDetail,d=o.noiseOffset;o._noiseTexture=new Et({context:a,width:r*r/s,height:r*s,pixelDatatype:ze.UNSIGNED_BYTE,pixelFormat:at.RGBA,sampler:new rn({wrapS:Cn.REPEAT,wrapT:Cn.REPEAT,minificationFilter:on.NEAREST,magnificationFilter:di.NEAREST})});let u=new Cl({vertexArray:o._vaNoise,shaderProgram:o._spNoise,outputTexture:o._noiseTexture,uniformMap:{u_noiseTextureDimensions:yTe(o),u_noiseDetail:function(){return c},u_noiseOffset:function(){return d}},persists:!1,owner:e,postExecute:function(m){o._ready=!0,o._loading=!1}});t.commandList.push(u),o._loading=!0}function zyt(e,t){let n=e,i=t.context;n._createVertexArray=!1,n._vaf=n._vaf&&n._vaf.destroy();let o=e._clouds,r=o.length;if(r>0){n._vaf=Yyt(i,r,n._instanced);let s=n._vaf.writers,a;for(a=0;a<r;++a){let c=o[a];Oyt(e,t,s,c)}n._vaf.commit(o7(i))}}var Kyt=[];function Jyt(e,t){let n=t.context,i=e,r=i._clouds.length,s=i._cloudsToUpdate,a=i._cloudsToUpdateIndex,c=i._propertiesChanged,d=Kyt;d.length=0,(c[Iyt]||c[Wyt])&&d.push(_Te),(c[Xyt]||c[wyt])&&d.push(TTe),(c[Pyt]||c[vyt])&&d.push(STe),c[Ayt]&&d.push(CTe);let u=d.length,m=i._vaf.writers,p,g,f;if(a/r>.1){for(p=0;p<a;++p)for(g=s[p],g._dirty=!1,f=0;f<u;++f)d[f](e,t,m,g);i._vaf.commit(o7(n))}else{for(p=0;p<a;++p){for(g=s[p],g._dirty=!1,f=0;f<u;++f)d[f](e,t,m,g);i._instanced?i._vaf.subCommit(g._index,1):i._vaf.subCommit(g._index*4,4)}i._vaf.endSubCommits()}i._cloudsToUpdateIndex=0}function Qyt(e,t,n,i){let o=t.context,r=e,s=new Ye({defines:[],sources:[n]});r._instanced&&s.defines.push("INSTANCED");let a=new Ye({defines:[],sources:[i]});r.debugBillboards&&a.defines.push("DEBUG_BILLBOARDS"),r.debugEllipsoids&&a.defines.push("DEBUG_ELLIPSOIDS"),r._sp=qt.replaceCache({context:o,shaderProgram:r._sp,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:$d}),r._rs=De.fromCache({depthTest:{enabled:!0,func:ne.LESS},depthMask:!1,blending:un.ALPHA_BLEND}),r._spCreated=!0,r._compiledDebugBillboards=r.debugBillboards,r._compiledDebugEllipsoids=r.debugEllipsoids}function jyt(e,t){let n=e,i=t.passes,o=n._uniforms,r=t.commandList;if(i.render){let s=n._colorCommands,a=n._vaf.va,c=a.length;s.length=c;for(let d=0;d<c;d++){let u=s[d];l(u)||(u=s[d]=new et),u.pass=Re.TRANSLUCENT,u.owner=e,u.uniformMap=o,u.count=a[d].indicesCount,u.vertexArray=a[d].va,u.shaderProgram=n._sp,u.renderState=n._rs,n._instanced&&(u.count=6,u.instanceCount=n._clouds.length),r.push(u)}}}Xh.prototype.update=function(e){if(i7(this),!this.show)return;let t=this.debugBillboards||this.debugEllipsoids;this._ready=t?!0:l(this._noiseTexture),!this._ready&&!this._loading&&!t&&Hyt(this,e,hw,mw),this._instanced=e.context.instancedArrays,$d=this._instanced?Eyt:Gyt,o7=this._instanced?Dyt:Uyt;let i=this._clouds.length,o=this._cloudsToUpdate,r=this._cloudsToUpdateIndex;this._createVertexArray?zyt(this,e):r>0&&Jyt(this,e),r>i*1.5&&(o.length=i),!(!l(this._vaf)||!l(this._vaf.va)||!this._ready&!t)&&((!this._spCreated||this.debugBillboards!==this._compiledDebugBillboards||this.debugEllipsoids!==this._compiledDebugEllipsoids)&&Qyt(this,e,uw,dw),jyt(this,e))};Xh.prototype.isDestroyed=function(){return!1};Xh.prototype.destroy=function(){return this._noiseTexture=this._noiseTexture&&this._noiseTexture.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),xTe(this._clouds),me(this)};var r7=Xh;var jJi=T(S(),1);var qyt=W.toRadians(30);function s7(e){this._angle=y(e,qyt)}Object.defineProperties(s7.prototype,{angle:{get:function(){return this._angle},set:function(e){this._angle=e}}});s7.prototype.emit=function(e){let t=Math.tan(this._angle),n=W.randomBetween(0,W.TWO_PI),i=W.randomBetween(0,t),o=i*Math.cos(n),r=i*Math.sin(n),s=1;e.velocity=h.fromElements(o,r,s,e.velocity),h.normalize(e.velocity,e.velocity),e.position=h.clone(h.ZERO,e.position)};var a7=s7;var nQi=T(S(),1);function J9(e){e=y(e,y.EMPTY_OBJECT);let t=e.attributeName,n=e.perInstanceAttribute;l(n)||(n=!1);let i=y(e.glslDatatype,"vec3"),o=`v_${t}`,r;if(t==="normal"||t==="tangent"||t==="bitangent")r=`vec4 getColor() { return vec4((${o} + vec3(1.0)) * 0.5, 1.0); } +`,r};mZ.prototype.getVariables=function(){let e=[],t=this._runtimeConditions;if(!l(t)||t.length===0)return e;let n=t.length;for(let i=0;i<n;++i){let o=t[i];e.push.apply(e,o.condition.getVariables()),e.push.apply(e,o.expression.getVariables())}return e=e.filter(function(i,o,r){return r.indexOf(i)===o}),e};var O9=mZ;function Xy(e){this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._meta=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,tyt(this,e)}function tyt(e,t){t=y(Oe(t,!0),e._style),e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin;let n={};if(l(t.meta)){let i=t.defines,o=y(t.meta,y.EMPTY_OBJECT);for(let r in o)o.hasOwnProperty(r)&&(n[r]=new hu(o[r],i))}e._meta=n,e._ready=!0}function tr(e,t){let n=y(e._style,y.EMPTY_OBJECT).defines;if(l(t)){if(typeof t=="boolean"||typeof t=="number")return new hu(String(t));if(typeof t=="string")return new hu(t,n);if(l(t.conditions))return new O9(t,n)}else return;return t}function nr(e){if(l(e)){if(l(e.expression))return e.expression;if(l(e.conditionsExpression))return Oe(e.conditionsExpression,!0)}else return;return e}Object.defineProperties(Xy.prototype,{style:{get:function(){return this._style}},show:{get:function(){return this._show},set:function(e){this._show=tr(this,e),this._style.show=nr(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=tr(this,e),this._style.color=nr(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=tr(this,e),this._style.pointSize=nr(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=tr(this,e),this._style.pointOutlineColor=nr(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=tr(this,e),this._style.pointOutlineWidth=nr(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=tr(this,e),this._style.labelColor=nr(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=tr(this,e),this._style.labelOutlineColor=nr(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=tr(this,e),this._style.labelOutlineWidth=nr(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=tr(this,e),this._style.font=nr(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=tr(this,e),this._style.labelStyle=nr(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=tr(this,e),this._style.labelText=nr(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=tr(this,e),this._style.backgroundColor=nr(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=tr(this,e),this._style.backgroundPadding=nr(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=tr(this,e),this._style.backgroundEnabled=nr(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=tr(this,e),this._style.scaleByDistance=nr(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=tr(this,e),this._style.translucencyByDistance=nr(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=tr(this,e),this._style.distanceDisplayCondition=nr(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=tr(this,e),this._style.heightOffset=nr(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=tr(this,e),this._style.anchorLineEnabled=nr(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=tr(this,e),this._style.anchorLineColor=nr(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=tr(this,e),this._style.image=nr(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=tr(this,e),this._style.disableDepthTestDistance=nr(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=tr(this,e),this._style.horizontalOrigin=nr(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=tr(this,e),this._style.verticalOrigin=nr(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=tr(this,e),this._style.labelHorizontalOrigin=nr(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=tr(this,e),this._style.labelVerticalOrigin=nr(this._labelVerticalOrigin)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}});Xy.fromUrl=function(e){return Ee.createIfNeeded(e).fetchJson(e).then(function(n){return new Xy(n)})};Xy.prototype.getColorShaderFunction=function(e,t,n){return this._colorShaderFunctionReady?(n.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,l(this.color)&&l(this.color.getShaderFunction)?this._colorShaderFunction=this.color.getShaderFunction(e,t,n,"vec4"):this._colorShaderFunction=void 0,this._colorShaderTranslucent=n.translucent,this._colorShaderFunction)};Xy.prototype.getShowShaderFunction=function(e,t,n){return this._showShaderFunctionReady?this._showShaderFunction:(this._showShaderFunctionReady=!0,l(this.show)&&l(this.show.getShaderFunction)?this._showShaderFunction=this.show.getShaderFunction(e,t,n,"bool"):this._showShaderFunction=void 0,this._showShaderFunction)};Xy.prototype.getPointSizeShaderFunction=function(e,t,n){return this._pointSizeShaderFunctionReady?this._pointSizeShaderFunction:(this._pointSizeShaderFunctionReady=!0,l(this.pointSize)&&l(this.pointSize.getShaderFunction)?this._pointSizeShaderFunction=this.pointSize.getShaderFunction(e,t,n,"float"):this._pointSizeShaderFunction=void 0,this._pointSizeShaderFunction)};Xy.prototype.getVariables=function(){let e=[];return l(this.color)&&l(this.color.getVariables)&&e.push.apply(e,this.color.getVariables()),l(this.show)&&l(this.show.getVariables)&&e.push.apply(e,this.show.getVariables()),l(this.pointSize)&&l(this.pointSize.getVariables)&&e.push.apply(e,this.pointSize.getVariables()),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var nT=Xy;var $Hi=S(T(),1);var VHi=S(T(),1);function z9(e){e=y(e,y.EMPTY_OBJECT),this._maximumSubtreeCount=y(e.maximumSubtreeCount,0),this._subtreeRequestCounter=0,this._queue=new kS({comparator:z9.comparator})}z9.prototype.addSubtree=function(e){let t=new nyt(e,this._subtreeRequestCounter);this._subtreeRequestCounter++,this._queue.insert(t);let n=e.implicitCoordinates;if(n.level>0){let i=n.getParentSubtreeCoordinates(),o=this.find(i)}if(this._maximumSubtreeCount>0)for(;this._queue.length>this._maximumSubtreeCount&&this._queue.getMinimum()!==t;)this._queue.removeMinimum()};z9.prototype.find=function(e){let t=this._queue,n=t.internalArray,i=t.length;for(let o=0;o<i;o++){let r=n[o],a=r.subtree.implicitCoordinates;if(e.isEqual(a))return r.subtree}};z9.comparator=function(e,t){let n=e.subtree.implicitCoordinates,i=t.subtree.implicitCoordinates;return n.isAncestor(i)?1:i.isAncestor(n)?-1:e.stamp-t.stamp};function nyt(e,t){this.subtree=e,this.stamp=t}var K9=z9;var EHi=S(T(),1);function GB(e){this._resource=e,this._metadataTable=void 0}Object.defineProperties(GB.prototype,{metadataTable:{get:function(){return this._metadataTable}}});GB.fromJson=async function(e,t,n,i){let o;l(t)?o={json:t,binary:void 0}:o=oyt(n);let r=await iyt(e,o.json,o.binary),s={},a=o.json.bufferViews.length;for(let m=0;m<a;++m){let p=o.json.bufferViews[m],g=p.byteOffset,f=g+p.byteLength,_=r[p.buffer].subarray(g,f);s[m]=_}let c=o.json.voxelTable,d=o.json.propertyTables[c],u=new GB(e);return u._metadataTable=new Rl({count:d.count,properties:d.properties,class:i.classes[d.class],bufferViews:s}),u};function iyt(e,t,n){let i=t.buffers.length,o=new Array(i);for(let r=0;r<i;r++){let s=t.buffers[r];if(l(s.uri)){let c=e.getDerivedResource({url:s.uri});o[r]=c.fetchArrayBuffer().then(function(d){return new Uint8Array(d)})}else o[r]=Promise.resolve(n)}return Promise.all(o)}function oyt(e){let n=new DataView(e.buffer,e.byteOffset),i=8,o=n.getUint32(i,!0);i+=8;let r=n.getUint32(i,!0);i+=8;let s=Eo(e,i,o);i+=o;let a=e.subarray(i,i+r);return{json:s,binary:a}}var H9=GB;function EB(e){e=y(e,y.EMPTY_OBJECT),this.shapeTransform=void 0,this.globalTransform=void 0,this.shape=void 0,this.minBounds=void 0,this.maxBounds=void 0,this.dimensions=void 0,this.paddingBefore=void 0,this.paddingAfter=void 0,this.names=void 0,this.types=void 0,this.componentTypes=void 0,this.minimumValues=void 0,this.maximumValues=void 0,this.maximumTileCount=void 0,this._implicitTileset=void 0,this._subtreeCache=new K9}EB.fromUrl=async function(e){let t=Ee.createIfNeeded(e),n=await t.fetchJson();syt(n);let i=uyt(n,t);await i.load();let o=n.root,r=o.content.extensions["3DTILES_content_voxels"],s=r.class,a=oi(n,"3DTILES_metadata")?n.extensions["3DTILES_metadata"]:n,c=i.schema,d=new R_({metadataJson:a,schema:c}),u=new EB;myt(u,d,s);let m=new E_(t,o,c),{shape:p,minBounds:g,maxBounds:f,shapeTransform:x,globalTransform:_}=ayt(o);u.shape=p,u.minBounds=g,u.maxBounds=f,u.dimensions=h.unpack(r.dimensions),u.shapeTransform=x,u.globalTransform=_,u.maximumTileCount=ryt(d);let C,V;return l(r.padding)&&(C=h.unpack(r.padding.before),V=h.unpack(r.padding.after)),u.paddingBefore=C,u.paddingAfter=V,u._implicitTileset=m,Ui.unload(i),u};function ryt(e){if(l(e.tileset))return e.tileset.getPropertyBySemantic(Jx.TILESET_TILE_COUNT)}function syt(e){let t=e.root;if(!l(t.content))throw new ue("Root must have content");if(!oi(t.content,"3DTILES_content_voxels"))throw new ue("Root tile content must have 3DTILES_content_voxels extension");if(!oi(t,"3DTILES_implicit_tiling")&&!l(t.implicitTiling))throw new ue("Root tile must have implicit tiling");if(!l(e.schema)&&!l(e.schemaUri)&&!oi(e,"3DTILES_metadata"))throw new ue("Tileset must have a metadata schema")}function ayt(e){let t=e.boundingVolume,n;if(l(e.transform)?n=A.unpack(e.transform):n=A.clone(A.IDENTITY),l(t.box))return lyt(t.box,n);if(l(t.region))return cyt(t.region);if(oi(t,"3DTILES_bounding_volume_cylinder"))return dyt(t.extensions["3DTILES_bounding_volume_cylinder"].cylinder,n);throw new ue("Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider")}function cyt(e){let t=e[0],n=e[1],i=e[2],o=e[3],r=e[4],s=e[5],a=A.fromScale(te.WGS84.radii),c=new h(t,n,r),d=new h(i,o,s);return{shape:Ii.ELLIPSOID,minBounds:c,maxBounds:d,shapeTransform:a,globalTransform:A.clone(A.IDENTITY)}}function lyt(e,t){let n=Gn.unpack(e),i=A.fromRotationTranslation(n.halfAxes,n.center);return{shape:Ii.BOX,minBounds:h.clone(Hf.DefaultMinBounds),maxBounds:h.clone(Hf.DefaultMaxBounds),shapeTransform:i,globalTransform:t}}function dyt(e,t){let n=Gn.unpack(e),i=A.fromRotationTranslation(n.halfAxes,n.center);return{shape:Ii.CYLINDER,minBounds:h.clone(Jf.DefaultMinBounds),maxBounds:h.clone(Jf.DefaultMaxBounds),shapeTransform:i,globalTransform:t}}function uyt(e,t){let{schemaUri:n,schema:i}=e;return l(n)?Ui.getSchemaLoader({resource:t.getDerivedResource({url:n})}):Ui.getSchemaLoader({schema:i})}function myt(e,t,n){let{schema:i,statistics:o}=t,r=o?.classes[n],s=i.classes[n].properties,a=Object.entries(s).map(([m,p])=>{let{type:g,componentType:f}=p,x=r?.properties[m].min,_=r?.properties[m].max,C=Kt.getComponentCount(g),V=TSe(x,C),Z=TSe(_,C);return{id:m,type:g,componentType:f,minValue:V,maxValue:Z}});e.names=a.map(m=>m.id),e.types=a.map(m=>m.type),e.componentTypes=a.map(m=>m.componentType);let c=a.map(m=>m.minValue),d=a.map(m=>m.maxValue),u=c.some(l);e.minimumValues=u?c:void 0,e.maximumValues=u?d:void 0}function TSe(e,t){if(!l(e))return;let n=Array.isArray(e)?e:[e];return Array.from({length:t},(i,o)=>n[o])}async function hyt(e,t){let n=e.contentUriTemplates[0].getDerivedResource({templateValues:t.getTemplateValues()}),i=e.baseResource.getDerivedResource({url:n.url}),o=await i.fetchArrayBuffer(),r=hf(o);return await H9.fromJson(i,r.jsonPayload,r.binaryPayload,e.metadataSchema)}async function fyt(e,t){let n=e._implicitTileset,i=e._subtreeCache,o=i.find(t);if(l(o))return o;let r=n.subtreeUriTemplate.getDerivedResource({templateValues:t.getTemplateValues()}),s=n.baseResource.getDerivedResource({url:r.url}),a=await s.fetchArrayBuffer();if(o=i.find(t),l(o))return o;let c=hf(a);return o=await Hx.fromSubtreeJson(s,c.jsonPayload,c.binaryPayload,n,t),i.addSubtree(o),o}EB.prototype.requestData=function(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.tileLevel,0),n=y(e.tileX,0),i=y(e.tileY,0),o=y(e.tileZ,0);if(y(e.keyframe,0)!==0)return;let s=this._implicitTileset,a=this.names,c=new W_({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:t,x:n,y:i,z:o}),d=c.isSubtreeRoot()&&c.level>0,u=d?c.getParentSubtreeCoordinates():c.getSubtreeCoordinates();return fyt(this,u).then(function(p){return(d?p.childSubtreeIsAvailableAtCoordinates(c):p.tileIsAvailableAtCoordinates(c))?hyt(s,c):Promise.reject("Tile is not available")}).then(function(p){return a.map(function(g){return p.metadataTable.getPropertyTypedArray(g)})})};var q8=EB;var oJi=S(T(),1);function $8(e){e=y(e,1),this._radius=y(e,1)}Object.defineProperties($8.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});$8.prototype.emit=function(e){let t=X.randomBetween(0,X.TWO_PI),n=X.randomBetween(0,this._radius),i=n*Math.cos(t),o=n*Math.sin(t),r=0;e.position=h.fromElements(i,o,r,e.position),e.velocity=h.clone(h.UNIT_Z,e.velocity)};var J9=$8;var HJi=S(T(),1);var sJi=S(T(),1),e7={CUMULUS:0};e7.validate=function(e){return e===e7.CUMULUS};var hZ=Object.freeze(e7);var hJi=S(T(),1);function Gh(e,t){if(e=y(e,y.EMPTY_OBJECT),this._show=y(e.show,!0),this._position=h.clone(y(e.position,h.ZERO)),!l(e.scale)&&l(e.maximumSize))this._maximumSize=h.clone(e.maximumSize),this._scale=new D(this._maximumSize.x,this._maximumSize.y);else{this._scale=D.clone(y(e.scale,new D(20,12)));let n=new h(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=h.clone(y(e.maximumSize,n))}this._slice=y(e.slice,-1),this._color=Y.clone(y(e.color,Y.WHITE)),this._brightness=y(e.brightness,1),this._cloudCollection=t,this._index=-1}var pyt=Gh.SHOW_INDEX=0,byt=Gh.POSITION_INDEX=1,gyt=Gh.SCALE_INDEX=2,yyt=Gh.MAXIMUM_SIZE_INDEX=3,xyt=Gh.SLICE_INDEX=4,_yt=Gh.BRIGHTNESS_INDEX=5,Syt=Gh.COLOR_INDEX=6;Gh.NUMBER_OF_PROPERTIES=7;function iT(e,t){let n=e._cloudCollection;l(n)&&(n._updateCloud(e,t),e._dirty=!0)}Object.defineProperties(Gh.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,iT(this,pyt))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),iT(this,byt))}},scale:{get:function(){return this._scale},set:function(e){let t=this._scale;D.equals(t,e)||(D.clone(e,t),iT(this,gyt))}},maximumSize:{get:function(){return this._maximumSize},set:function(e){let t=this._maximumSize;h.equals(t,e)||(h.clone(e,t),iT(this,yyt))}},color:{get:function(){return this._color},set:function(e){let t=this._color;Y.equals(t,e)||(Y.clone(e,t),iT(this,Syt))}},slice:{get:function(){return this._slice},set:function(e){this._slice!==e&&(this._slice=e,iT(this,xyt))}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness!==e&&(this._brightness=e,iT(this,_yt))}}});Gh.prototype._destroy=function(){this._cloudCollection=void 0};var jd=Gh;var qd,WB=new h,Tyt={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},Cyt={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},Vyt=jd.SHOW_INDEX,Zyt=jd.POSITION_INDEX,Lyt=jd.SCALE_INDEX,Ryt=jd.MAXIMUM_SIZE_INDEX,Gyt=jd.SLICE_INDEX,Eyt=jd.BRIGHTNESS_INDEX,Wyt=jd.NUMBER_OF_PROPERTIES,Iyt=jd.COLOR_INDEX;function Eh(e){e=y(e,y.EMPTY_OBJECT),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(Wyt),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=y(e.noiseDetail,16),this.noiseOffset=h.clone(y(e.noiseOffset,h.ZERO)),this._loading=!1,this._ready=!1;let t=this;this._uniforms={u_noiseTexture:function(){return t._noiseTexture},u_noiseTextureDimensions:CSe(t),u_noiseDetail:function(){return t.noiseDetail}},this._vaNoise=void 0,this._spNoise=void 0,this._spCreated=!1,this._sp=void 0,this._rs=void 0,this.show=y(e.show,!0),this._colorCommands=[],this.debugBillboards=y(e.debugBillboards,!1),this._compiledDebugBillboards=!1,this.debugEllipsoids=y(e.debugEllipsoids,!1),this._compiledDebugEllipsoids=!1}function CSe(e){return function(){return WB.x=e._textureSliceWidth,WB.y=e._noiseTextureRows,WB.z=1/e._noiseTextureRows,WB}}Object.defineProperties(Eh.prototype,{length:{get:function(){return n7(this),this._clouds.length}}});function VSe(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Eh.prototype.add=function(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.cloudType,hZ.CUMULUS),n;return t===hZ.CUMULUS&&(n=new jd(e,this),n._index=this._clouds.length,this._clouds.push(n),this._createVertexArray=!0),n};Eh.prototype.remove=function(e){return this.contains(e)?(this._clouds[e._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Eh.prototype.removeAll=function(){VSe(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function n7(e){if(e._cloudsRemoved){e._cloudsRemoved=!1;let t=[],n=e._clouds,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];l(s)&&(n._index=r++,t.push(s))}e._clouds=t}}Eh.prototype._updateCloud=function(e,t){e._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=e),++this._propertiesChanged[t]};Eh.prototype.contains=function(e){return l(e)&&e._cloudCollection===this};Eh.prototype.get=function(e){return n7(this),this._clouds[e]};var Xyt=new Float32Array([-1,-1,1,-1,1,1,-1,1]),Pyt=new Uint16Array([0,1,2,0,2,3]);function vyt(e){let t=ft.createVertexBuffer({context:e,typedArray:Xyt,usage:Ne.STATIC_DRAW}),n=ft.createIndexBuffer({context:e,typedArray:Pyt,usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT}),i=[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:Q.FLOAT}];return new ei({context:e,attributes:i,indexBuffer:n})}var i7;function wyt(e){let n=e.cache.cloudCollection_indexBufferBatched;if(l(n))return n;let i=16384*6-6,o=new Uint16Array(i);for(let r=0,s=0;r<i;r+=6,s+=4)o[r]=s,o[r+1]=s+1,o[r+2]=s+2,o[r+3]=s,o[r+4]=s+2,o[r+5]=s+3;return n=ft.createIndexBuffer({context:e,typedArray:o,usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferBatched=n,n}function Fyt(e){let t=e.cache.cloudCollection_indexBufferInstanced;return l(t)||(t=ft.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Ne.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferInstanced=t),t}function Ayt(e){let t=e.cache.cloudCollection_vertexBufferInstanced;return l(t)||(t=ft.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Ne.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_vertexBufferInstanced=t),t}function Myt(e,t,n){let i=[{index:qd.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:Q.FLOAT,usage:Ne.STATIC_DRAW},{index:qd.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:Q.FLOAT,usage:Ne.STATIC_DRAW},{index:qd.packedAttribute0,componentsPerAttribute:4,componentDatatype:Q.FLOAT,usage:Ne.STATIC_DRAW},{index:qd.packedAttribute1,componentsPerAttribute:4,componentDatatype:Q.FLOAT,usage:Ne.STATIC_DRAW},{index:qd.color,componentsPerAttribute:4,componentDatatype:Q.UNSIGNED_BYTE,normalize:!0,usage:Ne.STATIC_DRAW}];n&&i.push({index:qd.direction,componentsPerAttribute:2,componentDatatype:Q.FLOAT,vertexBuffer:Ayt(e)});let o=n?t:4*t;return new qp(e,i,o,n)}var t7=new Yn;function ZSe(e,t,n,i){let o,r=n[qd.positionHighAndScaleX],s=n[qd.positionLowAndScaleY],a=i.position;Yn.fromCartesian(a,t7);let c=i.scale,d=t7.high,u=t7.low;e._instanced?(o=i._index,r(o,d.x,d.y,d.z,c.x),s(o,u.x,u.y,u.z,c.y)):(o=i._index*4,r(o+0,d.x,d.y,d.z,c.x),r(o+1,d.x,d.y,d.z,c.x),r(o+2,d.x,d.y,d.z,c.x),r(o+3,d.x,d.y,d.z,c.x),s(o+0,u.x,u.y,u.z,c.y),s(o+1,u.x,u.y,u.z,c.y),s(o+2,u.x,u.y,u.z,c.y),s(o+3,u.x,u.y,u.z,c.y))}function LSe(e,t,n,i){let o,r=n[qd.packedAttribute0],s=i.show,a=i.brightness;e._instanced?(o=i._index,r(o,s,a,0,0)):(o=i._index*4,r(o+0,s,a,0,0),r(o+1,s,a,1,0),r(o+2,s,a,1,1),r(o+3,s,a,0,1))}function RSe(e,t,n,i){let o,r=n[qd.packedAttribute1],s=i.maximumSize,a=i.slice;e._instanced?(o=i._index,r(o,s.x,s.y,s.z,a)):(o=i._index*4,r(o+0,s.x,s.y,s.z,a),r(o+1,s.x,s.y,s.z,a),r(o+2,s.x,s.y,s.z,a),r(o+3,s.x,s.y,s.z,a))}function GSe(e,t,n,i){let o,r=n[qd.color],s=i.color,a=Y.floatToByte(s.red),c=Y.floatToByte(s.green),d=Y.floatToByte(s.blue),u=Y.floatToByte(s.alpha);e._instanced?(o=i._index,r(o,a,c,d,u)):(o=i._index*4,r(o+0,a,c,d,u),r(o+1,a,c,d,u),r(o+2,a,c,d,u),r(o+3,a,c,d,u))}function Nyt(e,t,n,i){ZSe(e,t,n,i),LSe(e,t,n,i),RSe(e,t,n,i),GSe(e,t,n,i)}function Uyt(e,t,n,i){let o=e,r=o._textureSliceWidth,s=o._noiseTextureRows,a=t.context;o._vaNoise=vyt(a),o._spNoise=qt.fromCache({context:a,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:{position:0}});let c=o.noiseDetail,d=o.noiseOffset;o._noiseTexture=new Et({context:a,width:r*r/s,height:r*s,pixelDatatype:Ke.UNSIGNED_BYTE,pixelFormat:at.RGBA,sampler:new rn({wrapS:Cn.REPEAT,wrapT:Cn.REPEAT,minificationFilter:on.NEAREST,magnificationFilter:di.NEAREST})});let u=new Tl({vertexArray:o._vaNoise,shaderProgram:o._spNoise,outputTexture:o._noiseTexture,uniformMap:{u_noiseTextureDimensions:CSe(o),u_noiseDetail:function(){return c},u_noiseOffset:function(){return d}},persists:!1,owner:e,postExecute:function(m){o._ready=!0,o._loading=!1}});t.commandList.push(u),o._loading=!0}function kyt(e,t){let n=e,i=t.context;n._createVertexArray=!1,n._vaf=n._vaf&&n._vaf.destroy();let o=e._clouds,r=o.length;if(r>0){n._vaf=Myt(i,r,n._instanced);let s=n._vaf.writers,a;for(a=0;a<r;++a){let c=o[a];Nyt(e,t,s,c)}n._vaf.commit(i7(i))}}var Dyt=[];function Byt(e,t){let n=t.context,i=e,r=i._clouds.length,s=i._cloudsToUpdate,a=i._cloudsToUpdateIndex,c=i._propertiesChanged,d=Dyt;d.length=0,(c[Zyt]||c[Lyt])&&d.push(ZSe),(c[Vyt]||c[Eyt])&&d.push(LSe),(c[Ryt]||c[Gyt])&&d.push(RSe),c[Iyt]&&d.push(GSe);let u=d.length,m=i._vaf.writers,p,g,f;if(a/r>.1){for(p=0;p<a;++p)for(g=s[p],g._dirty=!1,f=0;f<u;++f)d[f](e,t,m,g);i._vaf.commit(i7(n))}else{for(p=0;p<a;++p){for(g=s[p],g._dirty=!1,f=0;f<u;++f)d[f](e,t,m,g);i._instanced?i._vaf.subCommit(g._index,1):i._vaf.subCommit(g._index*4,4)}i._vaf.endSubCommits()}i._cloudsToUpdateIndex=0}function Yyt(e,t,n,i){let o=t.context,r=e,s=new Ye({defines:[],sources:[n]});r._instanced&&s.defines.push("INSTANCED");let a=new Ye({defines:[],sources:[i]});r.debugBillboards&&a.defines.push("DEBUG_BILLBOARDS"),r.debugEllipsoids&&a.defines.push("DEBUG_ELLIPSOIDS"),r._sp=qt.replaceCache({context:o,shaderProgram:r._sp,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:qd}),r._rs=De.fromCache({depthTest:{enabled:!0,func:ie.LESS},depthMask:!1,blending:un.ALPHA_BLEND}),r._spCreated=!0,r._compiledDebugBillboards=r.debugBillboards,r._compiledDebugEllipsoids=r.debugEllipsoids}function Oyt(e,t){let n=e,i=t.passes,o=n._uniforms,r=t.commandList;if(i.render){let s=n._colorCommands,a=n._vaf.va,c=a.length;s.length=c;for(let d=0;d<c;d++){let u=s[d];l(u)||(u=s[d]=new tt),u.pass=Le.TRANSLUCENT,u.owner=e,u.uniformMap=o,u.count=a[d].indicesCount,u.vertexArray=a[d].va,u.shaderProgram=n._sp,u.renderState=n._rs,n._instanced&&(u.count=6,u.instanceCount=n._clouds.length),r.push(u)}}}Eh.prototype.update=function(e){if(n7(this),!this.show)return;let t=this.debugBillboards||this.debugEllipsoids;this._ready=t?!0:l(this._noiseTexture),!this._ready&&!this._loading&&!t&&Uyt(this,e,Mv,Av),this._instanced=e.context.instancedArrays,qd=this._instanced?Cyt:Tyt,i7=this._instanced?Fyt:wyt;let i=this._clouds.length,o=this._cloudsToUpdate,r=this._cloudsToUpdateIndex;this._createVertexArray?kyt(this,e):r>0&&Byt(this,e),r>i*1.5&&(o.length=i),!(!l(this._vaf)||!l(this._vaf.va)||!this._ready&!t)&&((!this._spCreated||this.debugBillboards!==this._compiledDebugBillboards||this.debugEllipsoids!==this._compiledDebugEllipsoids)&&Yyt(this,e,Fv,wv),Oyt(this,e))};Eh.prototype.isDestroyed=function(){return!1};Eh.prototype.destroy=function(){return this._noiseTexture=this._noiseTexture&&this._noiseTexture.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),VSe(this._clouds),me(this)};var o7=Eh;var $Ji=S(T(),1);var zyt=X.toRadians(30);function r7(e){this._angle=y(e,zyt)}Object.defineProperties(r7.prototype,{angle:{get:function(){return this._angle},set:function(e){this._angle=e}}});r7.prototype.emit=function(e){let t=Math.tan(this._angle),n=X.randomBetween(0,X.TWO_PI),i=X.randomBetween(0,t),o=i*Math.cos(n),r=i*Math.sin(n),s=1;e.velocity=h.fromElements(o,r,s,e.velocity),h.normalize(e.velocity,e.velocity),e.position=h.clone(h.ZERO,e.position)};var s7=r7;var oQi=S(T(),1);function Q9(e){e=y(e,y.EMPTY_OBJECT);let t=e.attributeName,n=e.perInstanceAttribute;l(n)||(n=!1);let i=y(e.glslDatatype,"vec3"),o=`v_${t}`,r;if(t==="normal"||t==="tangent"||t==="bitangent")r=`vec4 getColor() { return vec4((${o} + vec3(1.0)) * 0.5, 1.0); } `;else switch(t==="st"&&(i="vec2"),i){case"float":r=`vec4 getColor() { return vec4(vec3(${o}), 1.0); } `;break;case"vec2":r=`vec4 getColor() { return vec4(${o}, 0.0, 1.0); } `;break;case"vec3":r=`vec4 getColor() { return vec4(${o}, 1.0); } @@ -15516,7 +15620,7 @@ ${r} void main() { out_FragColor = getColor(); -}`;this.material=void 0,this.translucent=y(e.translucent,!1),this._vertexShaderSource=y(e.vertexShaderSource,s),this._fragmentShaderSource=y(e.fragmentShaderSource,a),this._renderState=ji.getDefaultRenderState(!1,!1,e.renderState),this._closed=y(e.closed,!1),this._attributeName=t,this._glslDatatype=i}Object.defineProperties(J9.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}});J9.prototype.getFragmentShaderSource=ji.prototype.getFragmentShaderSource;J9.prototype.isTranslucent=ji.prototype.isTranslucent;J9.prototype.getRenderState=ji.prototype.getRenderState;var c7=J9;var pQi=T(S(),1);function X3(e){e=y(e,y.EMPTY_OBJECT),this.length=y(e.length,1e7),this._length=void 0,this.width=y(e.width,2),this._width=void 0,this.show=y(e.show,!0),this.modelMatrix=M.clone(y(e.modelMatrix,M.IDENTITY)),this._modelMatrix=new M,this.id=e.id,this._id=void 0,this._primitive=void 0}X3.prototype.update=function(e){if(this.show){if(!l(this._primitive)||!M.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=M.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,l(this._primitive)&&this._primitive.destroy(),this.modelMatrix[12]===0&&this.modelMatrix[13]===0&&this.modelMatrix[14]===0&&(this.modelMatrix[14]=.01);let t=new St({geometry:new v0({positions:[h.ZERO,h.UNIT_X],width:this.width,vertexFormat:Dr.VERTEX_FORMAT,colors:[Y.RED,Y.RED],arcType:$t.NONE}),modelMatrix:M.multiplyByUniformScale(this.modelMatrix,this.length,new M),id:this.id,pickPrimitive:this}),n=new St({geometry:new v0({positions:[h.ZERO,h.UNIT_Y],width:this.width,vertexFormat:Dr.VERTEX_FORMAT,colors:[Y.GREEN,Y.GREEN],arcType:$t.NONE}),modelMatrix:M.multiplyByUniformScale(this.modelMatrix,this.length,new M),id:this.id,pickPrimitive:this}),i=new St({geometry:new v0({positions:[h.ZERO,h.UNIT_Z],width:this.width,vertexFormat:Dr.VERTEX_FORMAT,colors:[Y.BLUE,Y.BLUE],arcType:$t.NONE}),modelMatrix:M.multiplyByUniformScale(this.modelMatrix,this.length,new M),id:this.id,pickPrimitive:this});this._primitive=new En({geometryInstances:[t,n,i],appearance:new Dr,asynchronous:!1})}this._primitive.update(e)}};X3.prototype.isDestroyed=function(){return!1};X3.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};var Q9=X3;var _Qi=T(S(),1);function $yt(e){this.direction=h.clone(e.direction),this.color=Y.clone(y(e.color,Y.WHITE)),this.intensity=y(e.intensity,1)}var l7=$yt;var PQi=T(S(),1);var SQi=T(S(),1),j9=`in vec3 v_positionMC; +}`;this.material=void 0,this.translucent=y(e.translucent,!1),this._vertexShaderSource=y(e.vertexShaderSource,s),this._fragmentShaderSource=y(e.fragmentShaderSource,a),this._renderState=ji.getDefaultRenderState(!1,!1,e.renderState),this._closed=y(e.closed,!1),this._attributeName=t,this._glslDatatype=i}Object.defineProperties(Q9.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}});Q9.prototype.getFragmentShaderSource=ji.prototype.getFragmentShaderSource;Q9.prototype.isTranslucent=ji.prototype.isTranslucent;Q9.prototype.getRenderState=ji.prototype.getRenderState;var a7=Q9;var gQi=S(T(),1);function IB(e){e=y(e,y.EMPTY_OBJECT),this.length=y(e.length,1e7),this._length=void 0,this.width=y(e.width,2),this._width=void 0,this.show=y(e.show,!0),this.modelMatrix=A.clone(y(e.modelMatrix,A.IDENTITY)),this._modelMatrix=new A,this.id=e.id,this._id=void 0,this._primitive=void 0}IB.prototype.update=function(e){if(this.show){if(!l(this._primitive)||!A.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=A.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,l(this._primitive)&&this._primitive.destroy(),this.modelMatrix[12]===0&&this.modelMatrix[13]===0&&this.modelMatrix[14]===0&&(this.modelMatrix[14]=.01);let t=new Tt({geometry:new Pb({positions:[h.ZERO,h.UNIT_X],width:this.width,vertexFormat:Br.VERTEX_FORMAT,colors:[Y.RED,Y.RED],arcType:$t.NONE}),modelMatrix:A.multiplyByUniformScale(this.modelMatrix,this.length,new A),id:this.id,pickPrimitive:this}),n=new Tt({geometry:new Pb({positions:[h.ZERO,h.UNIT_Y],width:this.width,vertexFormat:Br.VERTEX_FORMAT,colors:[Y.GREEN,Y.GREEN],arcType:$t.NONE}),modelMatrix:A.multiplyByUniformScale(this.modelMatrix,this.length,new A),id:this.id,pickPrimitive:this}),i=new Tt({geometry:new Pb({positions:[h.ZERO,h.UNIT_Z],width:this.width,vertexFormat:Br.VERTEX_FORMAT,colors:[Y.BLUE,Y.BLUE],arcType:$t.NONE}),modelMatrix:A.multiplyByUniformScale(this.modelMatrix,this.length,new A),id:this.id,pickPrimitive:this});this._primitive=new En({geometryInstances:[t,n,i],appearance:new Br,asynchronous:!1})}this._primitive.update(e)}};IB.prototype.isDestroyed=function(){return!1};IB.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};var j9=IB;var TQi=S(T(),1);function Kyt(e){this.direction=h.clone(e.direction),this.color=Y.clone(y(e.color,Y.WHITE)),this.intensity=y(e.intensity,1)}var c7=Kyt;var wQi=S(T(),1);var VQi=S(T(),1),q9=`in vec3 v_positionMC; in vec3 v_positionEC; in vec2 v_st; @@ -15549,7 +15653,7 @@ void main() out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC); #endif } -`;var VQi=T(S(),1),q9=`in vec3 position3DHigh; +`;var LQi=S(T(),1),$9=`in vec3 position3DHigh; in vec3 position3DLow; in vec2 st; in float batchId; @@ -15568,7 +15672,7 @@ void main() gl_Position = czm_modelViewProjectionRelativeToEye * p; } -`;function rS(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.translucent,!0),n=y(e.aboveGround,!1);this.material=l(e.material)?e.material:Ai.fromType(Ai.ColorType),this.translucent=y(e.translucent,!0),this._vertexShaderSource=y(e.vertexShaderSource,q9),this._fragmentShaderSource=y(e.fragmentShaderSource,j9),this._renderState=ji.getDefaultRenderState(t,!n,e.renderState),this._closed=!1,this._flat=y(e.flat,!1),this._faceForward=y(e.faceForward,n),this._aboveGround=n}Object.defineProperties(rS.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return rS.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}});rS.VERTEX_FORMAT=We.POSITION_AND_ST;rS.prototype.getFragmentShaderSource=ji.prototype.getFragmentShaderSource;rS.prototype.isTranslucent=ji.prototype.isTranslucent;rS.prototype.getRenderState=ji.prototype.getRenderState;var d7=rS;var UQi=T(S(),1);function $l(e){this._scene=e.scene,this.samplingWindow=y(e.samplingWindow,$l.defaultSettings.samplingWindow),this.quietPeriod=y(e.quietPeriod,$l.defaultSettings.quietPeriod),this.warmupPeriod=y(e.warmupPeriod,$l.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=y(e.minimumFrameRateDuringWarmup,$l.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=y(e.minimumFrameRateAfterWarmup,$l.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new ge,this._nominalFrameRate=new ge,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;let t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener(function(o,r){ext(t,r)}),this._hiddenPropertyName=document.hidden!==void 0?"hidden":document.mozHidden!==void 0?"mozHidden":document.msHidden!==void 0?"msHidden":document.webkitHidden!==void 0?"webkitHidden":void 0;let n=document.hidden!==void 0?"visibilitychange":document.mozHidden!==void 0?"mozvisibilitychange":document.msHidden!==void 0?"msvisibilitychange":document.webkitHidden!==void 0?"webkitvisibilitychange":void 0;function i(){txt(t)}this._visibilityChangeRemoveListener=void 0,l(n)&&(document.addEventListener(n,i,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(n,i,!1)})}$l.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};$l.fromScene=function(e){return(!l(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new $l({scene:e})),e._frameRateMonitor};Object.defineProperties($l.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}});$l.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};$l.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};$l.prototype.isDestroyed=function(){return!1};$l.prototype.destroy=function(){return this._preUpdateRemoveListener(),l(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),me(this)};function ext(e,t){if(e._pauseCount>0)return;let n=bi();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=n+e.quietPeriod/zn.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/zn.SECONDS_PER_MILLISECOND;else if(n>=e._quietPeriodEndTime){e._frameTimes.push(n);let i=n-e.samplingWindow/zn.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=i){for(;e._frameTimes.length>=2&&e._frameTimes[1]<i;)e._frameTimes.shift();let o=(n-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/o;let r=1e3/(n>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup);o>r?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}function txt(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}var $9=$l;var t4i=T(S(),1);var VTe=T(E4(),1);function u7(){this._image=new Image}u7.prototype.isReady=function(){return!0};u7.prototype.shouldDiscardImage=function(e){return e===this._image};function sS(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new Mi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ce(-W.PI,-W.PI,W.PI,W.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new Vt(t)),this._credit=t,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new u7),this._errorEvent=new ge}Object.defineProperties(sS.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});sS.fromMetadata=function(e,t){if(!e.imageryPresent)throw new ue(`The server ${e.url} doesn't have imagery`);let n=new sS(t);return n._metadata=e,n};sS.prototype.getTileCredits=function(e,t,n){let i=this._metadata,o=i.getTileInformation(e,t,n);if(l(o)){let r=i.providers[o.imageryProvider];if(l(r))return[r]}};sS.prototype.requestImage=function(e,t,n,i){let o=this._tileDiscardPolicy._image,r=this._metadata,s=O0.tileXYToQuadKey(e,t,n),a=r.getTileInformation(e,t,n);if(!l(a)){if(r.isValid(s)){let d=new Yo({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction});r.populateSubtree(e,t,n,d);return}return Promise.resolve(o)}if(!a.hasImagery())return Promise.resolve(o);let c=nxt(this,a,e,t,n,i).fetchArrayBuffer();if(l(c))return c.then(function(d){rw(r.key,d);let u=new Uint8Array(d),m,p=r.protoImagery;if((!l(p)||!p)&&(m=ixt(u)),!l(m)&&(!l(p)||p)){let g=oxt(u);m=g.imageType,u=g.imageData}return!l(m)||!l(u)?o:Dx({uint8Array:u,format:m,flipY:!0})})};sS.prototype.pickFeatures=function(e,t,n,i,o){};function nxt(e,t,n,i,o,r){let s=O0.tileXYToQuadKey(n,i,o),a=t.imageryVersion;return a=l(a)&&a>0?a:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1-0${s}-i.${a.toString()}`,request:r})}function ixt(e){let t="JFIF";if(e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3))return"image/jpeg";let n="PNG";if(e[1]===n.charCodeAt(0)&&e[2]===n.charCodeAt(1)&&e[3]===n.charCodeAt(2))return"image/png"}function oxt(e){let t=VTe.Reader.create(e),n=t.len,i={};for(;t.pos<n;){let s=t.uint32(),a;switch(s>>>3){case 1:i.imageType=t.uint32();break;case 2:i.imageData=t.bytes();break;case 3:i.alphaType=t.uint32();break;case 4:i.imageAlpha=t.bytes();break;case 5:if(a=i.copyrightIds,l(a)||(a=i.copyrightIds=[]),(s&7)===2){let c=t.uint32()+t.pos;for(;t.pos<c;)a.push(t.uint32())}else a.push(t.uint32());break;default:t.skipType(s&7);break}}let o=i.imageType;if(l(o))switch(o){case 0:i.imageType="image/jpeg";break;case 4:i.imageType="image/png";break;default:throw new ue("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}let r=i.alphaType;return l(r)&&r!==0&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete i.alphaType,delete i.imageAlpha),i}var m7=sS;var c4i=T(S(),1);var rxt=new Y(1,1,1,.4),sxt=new Y(0,1,0,.05),axt=new Y(0,.5,0,.2);function aS(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new Mi({ellipsoid:e.ellipsoid}),this._cells=y(e.cells,8),this._color=y(e.color,rxt),this._glowColor=y(e.glowColor,sxt),this._glowWidth=y(e.glowWidth,6),this._backgroundColor=y(e.backgroundColor,axt),this._errorEvent=new ge,this._tileWidth=y(e.tileWidth,256),this._tileHeight=y(e.tileHeight,256),this._canvasSize=y(e.canvasSize,256),this._canvas=this._createGridCanvas()}Object.defineProperties(aS.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});aS.prototype._drawGrid=function(e){let n=this._canvasSize;for(let i=0;i<=this._cells;++i){let r=1+i/this._cells*(n-1);e.moveTo(r,0),e.lineTo(r,n),e.moveTo(0,r),e.lineTo(n,r)}e.stroke()};aS.prototype._createGridCanvas=function(){let e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;let t=0,n=this._canvasSize,i=e.getContext("2d"),o=this._backgroundColor.toCssColorString();i.fillStyle=o,i.fillRect(t,t,n,n);let r=this._glowColor.toCssColorString();i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(t,t,n,n),this._drawGrid(i),i.lineWidth=this._glowWidth*.5,i.strokeRect(t,t,n,n),this._drawGrid(i);let s=this._color.toCssColorString();return i.strokeStyle=s,i.lineWidth=2,i.strokeRect(t,t,n,n),i.lineWidth=1,this._drawGrid(i),e};aS.prototype.getTileCredits=function(e,t,n){};aS.prototype.requestImage=function(e,t,n,i){return Promise.resolve(this._canvas)};aS.prototype.pickFeatures=function(e,t,n,i,o){};var h7=aS;var Yji=T(S(),1);var pji=T(S(),1);var j4i=T(S(),1);var y4i=T(S(),1);function Ih(){}Ih._maxDecodingConcurrency=Math.max(Yt.hardwareConcurrency-1,1);Ih._decodeTaskProcessor=new pi("decodeI3S",Ih._maxDecodingConcurrency);Ih._promise=void 0;async function cxt(){if(await Ih._decodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}))return Ih._decodeTaskProcessor;throw new ue("I3S decoder could not be initialized.")}Ih.decode=async function(e,t,n,i,o){return l(Ih._promise)||(Ih._promise=cxt()),Ih._promise.then(function(r){let s=n._parent._data,a=n._parent._inverseRotationMatrix,c=0,d=0,u=0;l(s.obb)?(c=s.obb.center[0],d=s.obb.center[1],u=s.obb.center[2]):l(s.mbs)&&(c=s.mbs[0],d=s.mbs[1],u=s.mbs[2]);let m=$.fromRotationX(-W.PI_OVER_TWO),p=new $;$.multiply(m,a,p);let g=he.fromDegrees(c,d,u),f=ie.WGS84.cartographicToCartesian(g),x={binaryData:n._data,featureData:l(i)&&l(i[0])?i[0].data:void 0,schema:t,bufferInfo:n._geometryBufferInfo,ellipsoidRadiiSquare:ie.WGS84.radiiSquared,url:e,geoidDataList:n._dataProvider._geoidDataList,cartographicCenter:g,cartesianCenter:f,parentRotation:p,enableFeatures:n._dataProvider.showFeatures,splitGeometryByColorTransparency:n._dataProvider.adjustMaterialAlphaMode,symbologyData:o,calculateNormals:n._dataProvider.calculateNormals};return r.scheduleTask(x)})};var eA=Ih;var S4i=T(S(),1);function f7(e,t){this._parent=e,this._dataProvider=e._dataProvider,this._layer=e._layer,l(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${t}`}):this._resource=this._parent.resource.getDerivedResource({url:t})}Object.defineProperties(f7.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});f7.prototype.load=async function(){return this._data=await Wh.loadJson(this._resource),this._data};var tA=f7;var R4i=T(S(),1);function ub(e,t){this._storageInfo=t,this._parent=e,this._dataProvider=e._dataProvider,this._loadPromise=void 0;let n=`attributes/${t.key}/0`;l(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${n}`}):this._resource=this._parent.resource.getDerivedResource({url:n})}Object.defineProperties(ub.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){if(l(this._values)){if(l(this._values.attributeValues))return this._values.attributeValues;if(l(this._values.objectIds))return this._values.objectIds}return[]}},name:{get:function(){return this._storageInfo.name}}});function I3(e){return e==="UInt8"||e==="Int8"?1:e==="UInt16"||e==="Int16"?2:e==="UInt32"||e==="Int32"||e==="Oid32"||e==="Float32"?4:e==="UInt64"||e==="Int64"||e==="Float64"?8:0}function lxt(e){return e==="String"?1:I3(e)}async function dxt(e){let t=await e._dataProvider._loadBinary(e._resource),n=new DataView(t);e._data=t,e._validateHeader(n);let i=e._parseHeader(n),o=e._getBodyOffset(i);e._validateBody(n,o),e._parseBody(n,o)}ub.prototype.load=function(){return l(this._loadPromise)?this._loadPromise:(this._loadPromise=dxt(this).catch(function(e){console.error(e)}),this._loadPromise)};ub.prototype._parseValue=function(e,t,n){let i;if(t==="UInt8")i=e.getUint8(n),n+=1;else if(t==="Int8")i=e.getInt8(n),n+=1;else if(t==="UInt16")i=e.getUint16(n,!0),n+=2;else if(t==="Int16")i=e.getInt16(n,!0),n+=2;else if(t==="UInt32")i=e.getUint32(n,!0),n+=4;else if(t==="Oid32")i=e.getUint32(n,!0),n+=4;else if(t==="Int32")i=e.getInt32(n,!0),n+=4;else if(t==="UInt64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);i=o+Math.pow(2,32)*r,n+=8}else if(t==="Int64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);r<Math.pow(2,31)?i=o+Math.pow(2,32)*r:i=o+Math.pow(2,32)*(r-Math.pow(2,32)),n+=8}else t==="Float32"?(i=e.getFloat32(n,!0),n+=4):t==="Float64"?(i=e.getFloat64(n,!0),n+=8):t==="String"&&(i=String.fromCharCode(e.getUint8(n)),n+=1);return{value:i,offset:n}};ub.prototype._parseHeader=function(e){let t=0;this._header={};for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n],o=this._parseValue(e,i.valueType,t);this._header[i.property]=o.value,t=o.offset}return t};ub.prototype._parseBody=function(e,t){this._values={};for(let n=0;n<this._storageInfo.ordering.length;n++){let i=this._storageInfo.ordering[n],o=i==="ObjectIds"?"objectIds":i,r=this._storageInfo[o];if(l(r)){this._values[o]=[];for(let s=0;s<this._header.count;++s)if(r.valueType!=="String"){let a=this._parseValue(e,r.valueType,t);this._values[o].push(a.value),t=a.offset}else{let a=this._values.attributeByteCounts[s],c="";for(let d=0;d<a;++d){let u=this._parseValue(e,r.valueType,t);u.value.charCodeAt(0)!==0&&(c+=u.value),t=u.offset}this._values[o].push(c)}}}};ub.prototype._getBodyOffset=function(e){let t=0;return l(this._storageInfo.attributeValues)?t=I3(this._storageInfo.attributeValues.valueType):l(this._storageInfo.objectIds)&&(t=I3(this._storageInfo.objectIds.valueType)),t>0?Math.ceil(e/t)*t:e};ub.prototype._validateHeader=function(e){let t=0;for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n];t+=lxt(i.valueType)}if(e.byteLength<t)throw new ue(`Invalid attribute buffer size (field: ${this.name}, header: ${t}, actual: ${e.byteLength})`)};ub.prototype._validateBody=function(e,t){if(!l(this._header.count))throw new ue(`Invalid attribute buffer (field: ${this.name}, count is missing)`);let n;for(let i=0;i<this._storageInfo.ordering.length&&t<e.byteLength;i++){let o=this._storageInfo.ordering[i],r=o==="ObjectIds"?"objectIds":o,s=this._storageInfo[r];if(l(s))if(s.valueType!=="String"){r==="attributeByteCounts"&&(n=t);let a=I3(s.valueType);t+=a*this._header.count}else{if(!l(n))throw new ue(`Invalid attribute buffer (field: ${this.name}, attributeByteCounts is missing)`);for(let a=0;a<this._header.count&&t<e.byteLength;++a){let c=this._parseValue(e,this._storageInfo.attributeByteCounts.valueType,n);t+=c.value,n=c.offset}}else throw new ue(`Invalid attribute buffer (field: ${this.name}, ${r} is missing)`)}if(e.byteLength<t)throw new ue(`Invalid attribute buffer size (field: ${this.name}, expected: ${t}, actual: ${e.byteLength})`)};var nA=ub;var P4i=T(S(),1);function iA(e,t){let n=e._dataProvider,i=e._layer,o;l(e._nodeIndex)?o=i.resource.getDerivedResource({url:`nodes/${e._data.mesh.geometry.resource}/${t}`}):o=e.resource.getDerivedResource({url:t}),this._parent=e,this._dataProvider=n,this._layer=i,this._resource=o,this._customAttributes=void 0}Object.defineProperties(iA.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});iA.prototype.load=function(){let e=this;return this._dataProvider._loadBinary(this._resource).then(function(t){return e._data=t,t})};var uxt=new h,mxt=new h,hxt=new h,fxt=new h,pxt=new h;function p7(e,t,n,i){let o=h.subtract(i,n,uxt),r=h.cross(o,h.subtract(e,n,mxt),fxt),s=h.cross(o,h.subtract(t,n,hxt),pxt);return h.dot(r,s)>=0}var bxt=new h,gxt=new h,yxt=new h,xxt=new h,_xt=new h,Txt=new h,Sxt=new h,Cxt=new h,Vxt=new h,Lxt=new h;iA.prototype.getClosestPointIndexOnTriangle=function(e,t,n){if(l(this._customAttributes)&&l(this._customAttributes.positions)){let i=new h(e,t,n);i.x-=this._customAttributes.cartesianCenter.x,i.y-=this._customAttributes.cartesianCenter.y,i.z-=this._customAttributes.cartesianCenter.z,$.multiplyByVector(this._customAttributes.parentRotation,i,i);let o=Number.MAX_VALUE,r,s,a,c,d=this._customAttributes.positions,u=this._customAttributes.indices,m;l(u)?m=u.length:m=d.length/3;for(let p=0;p<m;p++){let g,f,x;l(u)?(g=u[p],f=u[p+1],x=u[p+2]):(g=p*3,f=p*3+1,x=p*3+2);let _=h.fromElements(d[g*3],d[g*3+1],d[g*3+2],bxt),C=h.fromElements(d[f*3],d[f*3+1],d[f*3+2],gxt),V=new h(d[x*3],d[x*3+1],d[x*3+2],yxt);if(!p7(i,_,C,V)||!p7(i,C,_,V)||!p7(i,V,_,C))continue;let L=h.subtract(C,_,xxt),Z=h.subtract(V,_,_xt),G=h.cross(L,Z,Txt);if(h.magnitude(G)===0)continue;let X=h.normalize(G,Sxt),v=h.subtract(i,_,Cxt),P=Math.abs(h.dot(v,X));if(P<o){o=P,r=p;let F=h.magnitudeSquared(h.subtract(i,_,v)),A=h.magnitudeSquared(h.subtract(i,C,Vxt)),b=h.magnitudeSquared(h.subtract(i,V,Lxt));F<A&&F<b?(a=g,c=_,s=F):A<b?(a=f,c=C,s=A):(a=x,c=V,s=b)}}if(l(r))return{index:a,distanceSquared:s,distance:Math.sqrt(s),queriedPosition:i,closestPosition:h.clone(c)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};function LTe(e){let t=[],n=e.length;for(let i=0;i<n;i++)i<3?t.push(ZT(e[i])):t.push(e[i]);return t}iA.prototype._generateGltf=function(e,t,n,i,o,r,s,a){let c={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},d=!1,u,m="";if(l(this._parent._data.mesh)&&l(this._layer._data.materialDefinitions)){let L=this._parent._data.mesh.material.definition;if(L>=0&&L<this._layer._data.materialDefinitions.length){if(u=this._layer._data.materialDefinitions[L],c=u,l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorTexture)){d=!0,c.pbrMetallicRoughness.baseColorTexture.index=0;let Z="0";if(l(this._layer._data.textureSetDefinitions))for(let G=0;G<this._layer._data.textureSetDefinitions.length;G++){let X=this._layer._data.textureSetDefinitions[G];for(let v=0;v<X.formats.length;v++){let P=X.formats[v];if(P.format==="jpg"){Z=P.name;break}}}l(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(m=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${Z}`}).url)}l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorFactor)&&(c.pbrMetallicRoughness.baseColorFactor=LTe(c.pbrMetallicRoughness.baseColorFactor)),l(c.emissiveFactor)&&(c.emissiveFactor=LTe(c.emissiveFactor))}}else l(this._parent._data.textureData)&&(d=!0,m=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,c.pbrMetallicRoughness.baseColorTexture={index:0});l(c.alphaMode)&&(c.alphaMode=c.alphaMode.toUpperCase());let p=[],g=[],f=[];d&&(p=[{sampler:0,source:0}],g=[{uri:m}],f=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]);let x=[],_=n.length;for(let V=0;V<_;V++){let L=n[V].primitives,Z=L.length;for(let G=0;G<Z;G++){let X=L[G];if(l(X.material)){for(;X.material>=x.length;){let P=Oe(c,!0);x.push(P)}let v=x[X.material];l(X.extra)&&X.extra.isTransparent?l(v.alphaMode)||(v.alphaMode="BLEND"):v.alphaMode==="BLEND"&&(v.alphaMode="OPAQUE")}}}return{scene:0,scenes:[{nodes:e}],nodes:t,meshes:n,buffers:i,bufferViews:o,accessors:r,materials:x,textures:p,images:g,samplers:f,asset:{version:"2.0"},extensions:s,extensionsUsed:a}};var fL=iA;function Zc(e,t,n){let i,o,r,s;n?(i=0,o=e):(i=e._level+1,o=e._layer),typeof t=="number"?r=t:s=e.resource.getDerivedResource({url:`${t}/`}),this._parent=e,this._dataProvider=e._dataProvider,this._isRoot=n,this._level=i,this._layer=o,this._nodeIndex=r,this._resource=s,this._isLoading=!1,this._tile=void 0,this._data=void 0,this._geometryData=[],this._featureData=[],this._fields={},this._children=[],this._childrenReadyPromise=void 0,this._globalTransform=void 0,this._inverseGlobalTransform=void 0,this._inverseRotationMatrix=void 0,this._symbologyData=void 0}Object.defineProperties(Zc.prototype,{resource:{get:function(){return this._resource}},layer:{get:function(){return this._layer}},parent:{get:function(){return this._parent}},children:{get:function(){return this._children}},geometryData:{get:function(){return this._geometryData}},featureData:{get:function(){return this._featureData}},fields:{get:function(){return this._fields}},tile:{get:function(){return this._tile}},data:{get:function(){return this._data}}});Zc.prototype.load=async function(){let e=this;function t(){if(!e._isRoot){let o=e._create3DTileDefinition();e._tile=new Pu(e._layer._tileset,e._dataProvider.resource,o,e._parent._tile),e._tile._i3sNode=e}}if(!l(this._nodeIndex)){let o=await Wh.loadJson(this._resource);e._data=o,t();return}let n=await this._layer._getNodeInNodePages(this._nodeIndex);e._data=n;let i;e._isRoot?i="nodes/root/":l(n.mesh)&&(i=`../${n.mesh.geometry.resource}/`),l(i)&&(e._resource=e._parent.resource.getDerivedResource({url:i})),t()};function RTe(e,t){let n=new nA(e,t);return e._fields[t.name]=n,n.load()}Zc.prototype.loadFields=function(){let e=this._layer._data.attributeStorageInfo,t=[];if(l(e))for(let n=0;n<e.length;n++){let i=e[n],o=this._fields[i.name];l(o)?t.push(o.load()):t.push(RTe(this,i))}return Promise.all(t)};Zc.prototype.loadField=function(e){let t=this._fields[e];if(l(t))return t.load();let n=this._layer._data.attributeStorageInfo;if(l(n))for(let i=0;i<n.length;i++){let o=n[i];if(o.name===e)return RTe(this,o)}return Promise.resolve()};Zc.prototype.getFieldsForPickedPosition=function(e){let t=this.geometryData[0];if(!l(t.customAttributes.featureIndex))return{};let n=t.getClosestPointIndexOnTriangle(e.x,e.y,e.z);if(n.index===-1||n.index>t.customAttributes.featureIndex.length)return{};let i=t.customAttributes.featureIndex[n.index];return this.getFieldsForFeature(i)};Zc.prototype.getFieldsForFeature=function(e){let t={};for(let n in this.fields)if(this.fields.hasOwnProperty(n)){let i=this.fields[n];e>=0&&e<i.values.length&&(t[i.name]=i.values[e])}return t};Zc.prototype._loadChildren=function(){let e=this;if(l(this._childrenReadyPromise))return this._childrenReadyPromise;let t=[];if(l(e._data.children))for(let n=0;n<e._data.children.length;n++){let i=e._data.children[n],o=new Zc(e,y(i.href,i),!1);e._children.push(o),t.push(o.load())}return this._childrenReadyPromise=Promise.all(t).then(function(){for(let n=0;n<e._children.length;n++)e._tile.children.push(e._children[n]._tile)}),this._childrenReadyPromise};Zc.prototype._loadGeometryData=function(){let e=[];if(l(this._data.geometryData))for(let t=0;t<this._data.geometryData.length;t++){let n=new fL(this,this._data.geometryData[t].href);this._geometryData.push(n),e.push(n.load())}else if(l(this._data.mesh)){let t=this._layer._findBestGeometryBuffers(this._data.mesh.geometry.definition,["position","uv0"]),n=`./geometries/${t.bufferIndex}/`,i=new fL(this,n);i._geometryDefinitions=t.definition,i._geometryBufferInfo=t.geometryBufferInfo,this._geometryData.push(i),e.push(i.load())}return Promise.all(e)};Zc.prototype._loadFeatureData=function(){let e=[];if(l(this._data.featureData))for(let t=0;t<this._data.featureData.length;t++){let n=new tA(this,this._data.featureData[t].href);this._featureData.push(n),e.push(n.load())}return Promise.all(e)};Zc.prototype._clearGeometryData=function(){this._geometryData=[]};Zc.prototype._create3DTileDefinition=function(){let e=this._data.obb,t=this._data.mbs;if(!l(e)&&!l(t)){console.error("Failed to load I3S node. Bounding volume is required.");return}let n;if(l(e)?n=he.fromDegrees(e.center[0],e.center[1],e.center[2]):n=he.fromDegrees(t[0],t[1],t[2]),l(this._dataProvider._geoidDataList)&&l(n))for(let C=0;C<this._dataProvider._geoidDataList.length;C++){let V=this._dataProvider._geoidDataList[C],L=V.projection.project(n);if(L.x>V.nativeExtent.west&&L.x<V.nativeExtent.east&&L.y>V.nativeExtent.south&&L.y<V.nativeExtent.north){n.height+=Ext(L.x,L.y,V);break}}let i={},o,r=0;l(e)?(i={box:[0,0,0,e.halfSize[0],0,0,0,e.halfSize[1],0,0,0,e.halfSize[2]]},r=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),o=ie.WGS84.cartographicToCartesian(n)):(i={sphere:[0,0,0,t[3]]},o=ie.WGS84.cartographicToCartesian(n),r=this._data.mbs[3]),r*=2;let s=1/0;if(l(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let C=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));s=r/C}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let C=this._data.lodThreshold;s=r/C}else console.error("Invalid lodSelectionMetricType in Layer");else if(l(this._data.lodSelection))for(let C=0;C<this._data.lodSelection.length;C++)this._data.lodSelection[C].metricType==="maxScreenThreshold"&&(s=r/this._data.lodSelection[C].maxError);s===1/0&&(s=1e5);let a=s*16,c=new Ka(0,0,0),d=Gt.headingPitchRollQuaternion(o,c);l(this._data.obb)&&(d=new we(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let u=$.fromQuaternion(d),m=$.inverse(u,new $),p=new M(u[0],u[1],u[2],0,u[3],u[4],u[5],0,u[6],u[7],u[8],0,o.x,o.y,o.z,1),g=M.inverse(p,new M),f=M.clone(p);l(this._parent._globalTransform)&&M.multiply(p,this._parent._inverseGlobalTransform,f),this._globalTransform=p,this._inverseGlobalTransform=g,this._inverseRotationMatrix=m;let x=[];for(let C=0;C<this._children.length;C++)x.push(this._children[C]._create3DTileDefinition());return{children:x,refine:"REPLACE",boundingVolume:i,transform:[f[0],f[4],f[8],f[12],f[1],f[5],f[9],f[13],f[2],f[6],f[10],f[14],f[3],f[7],f[11],f[15]],content:{uri:l(this._resource)?this._resource.url:void 0},geometricError:a}};Zc.prototype._loadSymbology=async function(){!l(this._symbologyData)&&l(this._layer._symbology)&&(this._symbologyData=await this._layer._symbology._getSymbology(this))};Zc.prototype._createContentURL=async function(){let e={scene:0,scenes:[{nodes:[0]}],nodes:[{name:"singleNode"}],meshes:[],buffers:[],bufferViews:[],accessors:[],materials:[],textures:[],images:[],samplers:[],asset:{version:"2.0"}},t=[this._loadGeometryData()];if(this._dataProvider.legacyVersion16&&t.push(this._loadFeatureData()),await Promise.all(t),l(this._geometryData)&&this._geometryData.length>0){this._dataProvider._applySymbology&&await this._loadSymbology();let o=this._geometryData[0].resource.url,r=this._layer._data.store.defaultGeometrySchema,s=this._geometryData[0],a=await eA.decode(o,r,s,this._featureData[0],this._symbologyData);if(!l(a))return;e=s._generateGltf(a.meshData.nodesInScene,a.meshData.nodes,a.meshData.meshes,a.meshData.buffers,a.meshData.bufferViews,a.meshData.accessors,a.meshData.rootExtensions,a.meshData.extensionsUsed),this._geometryData[0]._customAttributes=a.meshData._customAttributes}let n=this._dataProvider._binarizeGltf(e),i=new Blob([n],{type:"application/binary"});return URL.createObjectURL(i)};async function Rxt(e){let t=e._layer._filters,n=[];for(let i=0;i<t.length;i++){let o=e.loadField(t[i].name);n.push(o)}return await Promise.all(n),t}function Zxt(e,t,n){if(!l(n.values)||n.values.length===0)return!1;let i=l(t)?t.values:[],o;e<i.length&&(o=i[e]);let r=!1;for(let s=0;s<n.values.length;s++)if(n.values[s]===o){r=!0;break}return r}async function ZTe(e,t){let n=e._tile.content.batchTable;if(l(n)&&n.featuresLength>0){n.setAllShow(!0);let i=await Rxt(e);if(i.length>0)for(let o=0;o<n.featuresLength;o++)for(let r=0;r<i.length;r++){let s=i[r];if(!Zxt(o,e._fields[s.name],s)){n.setShow(o,!1);break}}}t.show=!0}Zc.prototype._filterFeatures=function(){let e=[];for(let n=0;n<this._children.length;n++){let i=this._children[n]._filterFeatures();e.push(i)}let t=this._tile?.content?._model;if(l(this._geometryData)&&this._geometryData.length>0&&l(t)&&t.ready){t.show=!1;let n=ZTe(this,t);e.push(n)}return Promise.all(e)};Pu.prototype._hookedRequestContent=Pu.prototype.requestContent;Pu.prototype.requestContent=function(){if(!this.tileset._isI3STileSet)return this._hookedRequestContent();if(!this._isLoading){this._isLoading=!0;let e=this;return this._i3sNode._createContentURL().then(t=>{if(!l(t)){e._isLoading=!1;return}return e._contentResource=new Ee({url:t}),e._hookedRequestContent()}).then(t=>{let n=t?._model;return l(e._i3sNode._geometryData)&&e._i3sNode._geometryData.length>0&&l(n)&&(n.show=!1,n.readyEvent.addEventListener(()=>{ZTe(e._i3sNode,n)})),e._isLoading=!1,t})}};function Gxt(e,t,n,i,o,r){let s=n*(1-e)+i*e,a=o*(1-e)+r*e;return s*(1-t)+a*t}function W3(e,t,n,i){let o=e+t*n;return i[o]}function Ext(e,t,n){let i=n.nativeExtent,o=(e-i.west)/(i.east-i.west)*(n.width-1),r=(t-i.south)/(i.north-i.south)*(n.height-1),s=Math.floor(o),a=Math.floor(r);o-=s,r-=a;let c=s<n.width?s+1:s,d=a<n.height?a+1:a;a=n.height-1-a,d=n.height-1-d;let u=W3(s,a,n.width,n.buffer),m=W3(c,a,n.width,n.buffer),p=W3(s,d,n.width,n.buffer),g=W3(c,d,n.width,n.buffer),f=Gxt(o,r,u,m,p,g);return f=f*n.scale+n.offset,f}Object.defineProperties(Pu.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var pL=Zc;var iji=T(S(),1);function P3(e){this._layer=e,this._defaultSymbology=void 0,this._valueFields=[],this._uniqueValueHash=void 0,this._classBreaksHash=void 0,this._parseLayerSymbology()}Object.defineProperties(P3.prototype,{defaultSymbology:{get:function(){return this._defaultSymbology}}});function b7(e,t){let n=[];for(let i=0;i<e.length;i++){let o=Y.byteToFloat(e[i]);i<3?n.push(ZT(o)):n.push(o)}return n.length===3&&(l(t)?n.push(1-t/100):n.push(1)),n}function bL(e,t){let n={edges:void 0,material:void 0};if(l(e)&&l(e.symbolLayers))for(let i=0;i<e.symbolLayers.length;i++){let o=e.symbolLayers[i];if(o.type==="Fill"){let r=o.edges,s=o.outline;if(l(r)?(n.edges={},l(r.color)&&(n.edges.color=b7(r.color,r.transparency))):l(s)&&(n.edges={},l(s.color)&&(n.edges.color=b7(s.color,s.transparency))),!t){let a=o.material;l(a)&&(n.material={colorMixMode:a.colorMixMode},l(a.color)&&(n.material.color=b7(a.color,a.transparency)))}break}}return n}function Xxt(e,t){if(l(e.uniqueValueGroups)){let n={};for(let i=0;i<e.uniqueValueGroups.length;i++){let o=e.uniqueValueGroups[i].classes;if(l(o))for(let r=0;r<o.length;r++){let s=bL(o[r].symbol,t),a=o[r].values;for(let c=0;c<a.length;c++){let d=a[c],u=n;for(let m=0;m<d.length;m++){let p=d[m];m===d.length-1?u[p]=s:(l(u[p])||(u[p]={}),u=u[p])}}}}return n}if(l(e.uniqueValueInfos)){let n={};for(let i=0;i<e.uniqueValueInfos.length;i++){let o=e.uniqueValueInfos[i];n[o.value]=bL(o.symbol,t)}return n}}function Ixt(e,t){if(l(e.classBreakInfos)){let n=[...e.classBreakInfos];n.sort(function(o,r){let s=y(o.classMaxValue,o.classMinValue),a=y(r.classMaxValue,r.classMinValue);return s-a});let i={ranges:[],symbols:[]};l(e.minValue)&&(i.ranges.push(e.minValue),i.symbols.push(void 0));for(let o=0;o<n.length;o++){let r=n[o];l(r.classMinValue)&&(i.ranges.length===0||r.classMinValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMinValue),i.symbols.push(void 0)),l(r.classMaxValue)&&(i.ranges.length===0||r.classMaxValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMaxValue),i.symbols.push(bL(r.symbol,t)))}return i.symbols.push(void 0),i}}P3.prototype._parseLayerSymbology=function(){let e=this._layer.data.drawingInfo;if(l(e)&&l(e.renderer)){let t=this._layer.data.cachedDrawingInfo,n=l(t)&&t.color===!0,i=e.renderer;i.type==="simple"?this._defaultSymbology=bL(i.symbol,n):i.type==="uniqueValue"?(this._defaultSymbology=bL(i.defaultSymbol,n),this._valueFields.push(i.field1),l(i.field2)&&this._valueFields.push(i.field2),l(i.field3)&&this._valueFields.push(i.field3),this._uniqueValueHash=Xxt(i,n)):i.type==="classBreaks"&&(this._defaultSymbology=bL(i.defaultSymbol,n),this._valueFields.push(i.field),this._classBreaksHash=Ixt(i,n))}};function GTe(e,t,n,i){let o=t[n];if(i<o.length){let r=o[i],s=e[r];return l(s)&&++n<t.length?GTe(s,t,n,i):s}}function Wxt(e,t){let n=0,i=e.length;if(n<i)do{let o=n+i>>>1;e[o]<t?n=o+1:i=o}while(n<i);return n}function Pxt(e,t,n){let i=t[n],o=Wxt(e.ranges,i);return e.symbols[o]}P3.prototype._getSymbology=async function(e){let t={default:this._defaultSymbology};if(this._valueFields.length>0){let n=[];for(let r=0;r<this._valueFields.length;r++)n.push(e.loadField(this._valueFields[r]));await Promise.all(n);let i=[];for(let r=0;r<this._valueFields.length;r++)i.push(e.fields[this._valueFields[r]].values);let o;if(l(this._uniqueValueHash)?o=r=>GTe(this._uniqueValueHash,i,0,r):l(this._classBreaksHash)&&(o=r=>Pxt(this._classBreaksHash,i[0],r)),l(o)){let r=i[0];for(let s=0;s<r.length;s++){let a=o(s);l(a)&&(t[s]=a)}}}return t};var oA=P3;function ed(e,t,n){this._dataProvider=e,this._parent=n,!l(t.href)&&l(t.id)&&(t.href=`layers/${t.id}`);let i=this._parent.resource.getUrlComponent(),o="";i.match(/layers\/\d/)?o=`${i}`.replace(/\/+$/,""):o=`${i}`.replace(/\/?$/,"/").concat(`${t.href}`),this._version=t.store.version;let r=this._version.split(".");this._majorVersion=parseInt(r[0]),this._minorVersion=r.length>1?parseInt(r[1]):0,this._resource=new Ee({url:o}),this._resource.setQueryParameters(this._dataProvider.resource.queryParameters),this._resource.appendForwardSlash(),this._data=t,this._rootNode=void 0,this._nodePages={},this._nodePageFetches={},this._extent=void 0,this._tileset=void 0,this._geometryDefinitions=void 0,this._filters=[],this._symbology=void 0,this._computeGeometryDefinitions(!0),this._computeExtent()}Object.defineProperties(ed.prototype,{resource:{get:function(){return this._resource}},rootNode:{get:function(){return this._rootNode}},tileset:{get:function(){return this._tileset}},data:{get:function(){return this._data}},version:{get:function(){return this._version}},majorVersion:{get:function(){return this._majorVersion}},minorVersion:{get:function(){return this._minorVersion}},legacyVersion16:{get:function(){if(l(this.version))return this.majorVersion<1||this.majorVersion===1&&this.minorVersion<=6}}});ed.prototype.load=async function(e){if(this._data.spatialReference.wkid!==4326)throw new ue(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`);if(this._dataProvider.applySymbology&&(this._symbology=new oA(this)),await this._dataProvider.loadGeoidData(),await this._loadRootNode(e),await this._create3DTileset(e),this._rootNode._tile=this._tileset._root,this._tileset._root._i3sNode=this._rootNode,this.legacyVersion16)return this._rootNode._loadChildren()};ed.prototype._computeGeometryDefinitions=function(e){if(this._geometryDefinitions=[],l(this._data.geometryDefinitions))for(let t=0;t<this._data.geometryDefinitions.length;t++){let n=[],i=this._data.geometryDefinitions[t].geometryBuffers;for(let o=0;o<i.length;o++){let r=i[o],s=[],a=!1;if(l(r.compressedAttributes)&&e){a=!0;let c=r.compressedAttributes.attributes;for(let d=0;d<c.length;d++)s.push(c[d])}else for(let c in r)c!=="offset"&&s.push(c);n.push({compressed:a,attributes:s,index:i.indexOf(r)})}n.sort(function(o,r){return o.compressed&&!r.compressed?-1:!o.compressed&&r.compressed?1:o.attributes.length-r.attributes.length}),this._geometryDefinitions.push(n)}};ed.prototype._findBestGeometryBuffers=function(e,t){let n=this._geometryDefinitions[e];if(l(n))for(let i=0;i<n.length;++i){let o=n[i],r=!1,s=o.attributes;for(let a=0;a<t.length;a++)if(!s.includes(t[a])){r=!0;break}if(!r)return{bufferIndex:o.index,definition:n,geometryBufferInfo:o}}return 0};ed.prototype._loadRootNode=function(e){if(l(this._data.nodePages)){let t=0;l(this._data.nodePages.rootIndex)&&(t=this._data.nodePages.rootIndex),this._rootNode=new pL(this,t,!0)}else this._rootNode=new pL(this,this._data.store.rootNode,!0);return this._rootNode.load(e)};ed.prototype._getNodeInNodePages=function(e){let t=Math.floor(e/this._data.nodePages.nodesPerPage),n=e%this._data.nodePages.nodesPerPage;return this._loadNodePage(t).then(function(i){return i.nodes[n]})};ed._fetchJson=function(e){return e.fetchJson()};ed.prototype._loadNodePage=function(e){let t=this;if(!l(this._nodePageFetches[e])){let n=this.resource.getDerivedResource({url:`nodepages/${e}/`}),i=ed._fetchJson(n).then(function(o){return l(o.error)&&o.error.code!==200?Promise.reject(o.error):(t._nodePages[e]=o.nodes,o)});this._nodePageFetches[e]=i}return this._nodePageFetches[e]};ed.prototype._computeExtent=function(){l(this._data.fullExtent)?this._extent=ce.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):l(this._data.store.extent)&&(this._extent=ce.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};ed.prototype._create3DTileset=async function(e){let t={asset:{version:"1.0"},geometricError:Number.MAX_VALUE,root:this._rootNode._create3DTileDefinition()},n=new Blob([JSON.stringify(t)],{type:"application/json"}),i=URL.createObjectURL(n),o=this._symbology?.defaultSymbology?.edges?.color;l(o)&&!l(e?.outlineColor)&&(e=l(e)?Oe(e):{},e.outlineColor=Y.fromCartesian4(se.fromArray(o))),this._tileset=await oa.fromUrl(i,e),this._tileset.show=this._parent.show,this._tileset._isI3STileSet=!0,this._tileset.tileUnload.addEventListener(function(r){r._i3sNode._clearGeometryData(),URL.revokeObjectURL(r._contentResource._url),r._contentResource=r._i3sNode.resource}),this._tileset.tileVisible.addEventListener(function(r){l(r._i3sNode)&&r._i3sNode._loadChildren()})};ed.prototype._updateVisibility=function(){l(this._tileset)&&(this._tileset.show=this._parent.show)};ed.prototype.filterByAttributes=function(e){this._filters=l(e)?Oe(e,!0):[];let t=this._rootNode;return l(t)?t._filterFeatures():Promise.resolve()};var cS=ed;var _ji=T(S(),1);function v3(e,t){this._dataProvider=e,this._resource=new Ee({url:t}),this._resource.setQueryParameters(e.resource.queryParameters),this._resource.appendForwardSlash()}Object.defineProperties(v3.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},names:{get:function(){let e=[],t=this._data.summary;if(l(t))for(let n=0;n<t.length;++n)e.push(t[n].fieldName);return e}}});v3.prototype.load=async function(){return this._data=await Wh.loadJson(this._resource),this._data};v3.prototype._getValues=function(e){let t=this._data.summary;if(l(t))for(let n=0;n<t.length;++n){let i=t[n];if(i.fieldName===e)return l(i.mostFrequentValues)?[...i.mostFrequentValues]:[]}};var rA=v3;var Zji=T(S(),1);function sA(e,t,n){this._dataProvider=e,this._parent=t,this._data=n,this._name=n.name,this._modelName=n.modelName,this._visibility=y(n.visibility,!0),this._resource=void 0,this._sublayers=[],this._i3sLayers=[]}Object.defineProperties(sA.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},name:{get:function(){return this._name}},modelName:{get:function(){return this._modelName}},sublayers:{get:function(){return this._sublayers}},visibility:{get:function(){return this._visibility},set:function(e){if(this._visibility!==e){this._visibility=e;for(let t=0;t<this._i3sLayers.length;t++)this._i3sLayers[t]._updateVisibility()}}},show:{get:function(){return this._visibility&&this._parent.show}}});sA._fromData=async function(e,t,n,i){let o=new sA(e,i,n);if(o._data.layerType==="group"){let r=o._data.sublayers;if(l(r)){let s=[];for(let c=0;c<r.length;c++){let d=sA._fromData(e,t,r[c],o);s.push(d)}let a=await Promise.all(s);for(let c=0;c<a.length;c++){let d=a[c];o._sublayers.push(d),o._i3sLayers.push(...d._i3sLayers)}}}else if(o._data.layerType==="3DObject"){let r=t.concat(`/sublayers/${o._data.id}`),s=new Ee({url:r});s.setQueryParameters(e.resource.queryParameters),s.appendForwardSlash(),o._resource=s;let a=await Wh.loadJson(o._resource),c=new cS(e,a,o);o._i3sLayers.push(c)}else console.log(`${o._data.layerType} layer ${o._data.name} is skipped as not supported.`);return o};var aA=sA;var ITe=T(ETe(),1);function ds(e){e=y(e,y.EMPTY_OBJECT),this._name=e.name,this._show=y(e.show,!0),this._geoidTiledTerrainProvider=e.geoidTiledTerrainProvider,this._showFeatures=y(e.showFeatures,!1),this._adjustMaterialAlphaMode=y(e.adjustMaterialAlphaMode,!1),this._applySymbology=y(e.applySymbology,!1),this._calculateNormals=y(e.calculateNormals,!1),this._cesium3dTilesetOptions=y(e.cesium3dTilesetOptions,y.EMPTY_OBJECT),this._layers=[],this._sublayers=[],this._data=void 0,this._extent=void 0,this._geoidDataPromise=void 0,this._geoidDataList=void 0,this._decoderTaskProcessor=void 0,this._taskProcessorReadyPromise=void 0,this._attributeStatistics=[],this._layersExtent=[]}Object.defineProperties(ds.prototype,{name:{get:function(){return this._name}},show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;for(let t=0;t<this._layers.length;t++)this._layers[t]._updateVisibility()}}},geoidTiledTerrainProvider:{get:function(){return this._geoidTiledTerrainProvider}},layers:{get:function(){return this._layers}},sublayers:{get:function(){return this._sublayers}},data:{get:function(){return this._data}},extent:{get:function(){return this._extent}},resource:{get:function(){return this._resource}},showFeatures:{get:function(){return this._showFeatures}},adjustMaterialAlphaMode:{get:function(){return this._adjustMaterialAlphaMode}},applySymbology:{get:function(){return this._applySymbology}},calculateNormals:{get:function(){return this._calculateNormals}}});ds.prototype.destroy=function(){for(let e=0;e<this._layers.length;e++)l(this._layers[e]._tileset)&&this._layers[e]._tileset.destroy();return me(this)};ds.prototype.isDestroyed=function(){return!1};ds.prototype.update=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.update(e)};ds.prototype.prePassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.prePassesUpdate(e)};ds.prototype.postPassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.postPassesUpdate(e)};ds.prototype.updateForPass=function(e,t){for(let n=0;n<this._layers.length;n++)l(this._layers[n]._tileset)&&this._layers[n]._tileset.updateForPass(e,t)};function vxt(e,t){let n=e.resource.getUrlComponent(),i="";return n.match(/layers\/\d/)?i=`${n}`.replace(/\/+$/,""):i=`${n}`.replace(/\/?$/,"/").concat(`layers/${t}`),i}async function XTe(e,t,n){if(t.layerType==="Building"){l(n.showFeatures)||(e._showFeatures=!0),l(n.adjustMaterialAlphaMode)||(e._adjustMaterialAlphaMode=!0),l(n.applySymbology)||(e._applySymbology=!0),l(n.calculateNormals)||(e._calculateNormals=!0);let i=vxt(e,t.id);if(l(t.sublayers)){let o=[];for(let s=0;s<t.sublayers.length;s++){let a=aA._fromData(e,i,t.sublayers[s],e);o.push(a)}let r=await Promise.all(o);for(let s=0;s<r.length;s++){let a=r[s];e._sublayers.push(a),e._layers.push(...a._i3sLayers)}}if(l(t.statisticsHRef)){let o=i.concat(`/${t.statisticsHRef}`),r=new rA(e,o);await r.load(),e._attributeStatistics.push(r)}if(l(t.fullExtent)){let o=ce.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax);e._layersExtent.push(o)}}else if(t.layerType==="3DObject"||t.layerType==="IntegratedMesh"){!l(n.calculateNormals)&&!l(t.textureSetDefinitions)&&(e._calculateNormals=!0);let i=new cS(e,t,e);e._layers.push(i),l(i._extent)&&e._layersExtent.push(i._extent)}else console.log(`${t.layerType} layer ${t.name} is skipped as not supported.`)}ds.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n=Ee.createIfNeeded(e);n.setQueryParameters({f:"pjson"},!0);let i=await ds.loadJson(n),o=new ds(t);if(o._resource=n,o._data=i,l(i.layers)){let s=[];for(let a=0;a<i.layers.length;a++){let c=XTe(o,i.layers[a],t);s.push(c)}await Promise.all(s)}else await XTe(o,i,t);o._computeExtent();let r=[];for(let s=0;s<o._layers.length;s++)r.push(o._layers[s].load(t.cesium3dTilesetOptions));return await Promise.all(r),o};ds._fetchJson=function(e){return e.fetchJson()};ds.loadJson=async function(e){let t=await ds._fetchJson(e);if(l(t.error)){if(console.error("Failed to fetch I3S ",e.url),l(t.error.message)&&console.error(t.error.message),l(t.error.details))for(let n=0;n<t.error.details.length;n++)console.log(t.error.details[n]);throw new ue(t.error)}return t};ds.prototype._loadBinary=async function(e){let t=await e.fetchArrayBuffer();if(t.byteLength>0&&new Uint8Array(t)[0]===123&&new TextDecoder().decode(t).includes("404"))throw new ue(`Failed to load binary: ${e.url}`);return t};ds.prototype._binarizeGltf=function(e){let n=new TextEncoder().encode(JSON.stringify(e)),i=new Uint8Array(n.byteLength+20),o={magic:new Uint8Array(i.buffer,0,4),version:new Uint32Array(i.buffer,4,1),length:new Uint32Array(i.buffer,8,1),chunkLength:new Uint32Array(i.buffer,12,1),chunkType:new Uint32Array(i.buffer,16,1),chunkData:new Uint8Array(i.buffer,20,n.byteLength)};return o.magic[0]=103,o.magic[1]=108,o.magic[2]=84,o.magic[3]=70,o.version[0]=2,o.length[0]=i.byteLength,o.chunkLength[0]=n.byteLength,o.chunkType[0]=1313821514,o.chunkData.set(n),i};var wxt=new D;function Fxt(e,t){let n=e.tilingScheme,i=[],o={},r=e._lodCount,s=he.fromRadians(t.west,t.north),a=he.fromRadians(t.east,t.south),c=n.positionToTileXY(s,r),d=n.positionToTileXY(a,r);for(let m=c.x;m<=d.x;m++)for(let p=c.y;p<=d.y;p++){let g=D.fromElements(m,p,wxt),f=g.toString();if(!o.hasOwnProperty(f)){let x={x:g.x,y:g.y,level:r,tilingScheme:n,terrainProvider:e,positions:[]};o[f]=x,i.push(x)}}let u=[];for(let m=0;m<i.length;++m){let p=i[m],g=p.terrainProvider.requestTileGeometry(p.x,p.y,p.level);u.push(g)}return Promise.all(u).then(function(m){let p=[];for(let g=0;g<m.length;g++){let f={tilingScheme:n,x:i[g].x,y:i[g].y,level:i[g].level},x=m[g],_="Geographic";n._projection instanceof Vi&&(_="WebMercator");let C={projectionType:_,projection:n._projection,nativeExtent:n.tileXYToNativeRectangle(f.x,f.y,f.level),height:x._height,width:x._width,scale:x._structure.heightScale,offset:x._structure.heightOffset};if(x._encoding===Ku.LERC){let V=ITe.default.decode(x._buffer);C.buffer=V.pixels[0]}else C.buffer=x._buffer;p.push(C)}return p})}async function Axt(e){let t=e._geoidTiledTerrainProvider;if(l(t))try{let n=await Fxt(t,e._extent);e._geoidDataList=n}catch{console.log("Error retrieving Geoid Terrain tiles - no geoid conversion will be performed.")}}ds.prototype.loadGeoidData=async function(){return l(this._geoidDataPromise)?this._geoidDataPromise:(this._geoidDataPromise=Axt(this),this._geoidDataPromise)};ds.prototype._computeExtent=function(){let e;for(let t=0;t<this._layersExtent.length;t++){let n=this._layersExtent[t];l(e)?ce.union(e,n,e):e=ce.clone(n)}this._extent=e};ds.prototype.getAttributeNames=function(){let e=[];for(let t=0;t<this._attributeStatistics.length;++t)e.push(...this._attributeStatistics[t].names);return e};ds.prototype.getAttributeValues=function(e){for(let t=0;t<this._attributeStatistics.length;++t){let n=this._attributeStatistics[t]._getValues(e);if(l(n))return n}return[]};ds.prototype.filterByAttributes=function(e){let t=[];for(let n=0;n<this._layers.length;n++){let i=this._layers[n].filterByAttributes(e);t.push(i)}return Promise.all(t)};var Wh=ds;var zji=T(S(),1);function WTe(){}Object.defineProperties(WTe.prototype,{color:{get:fe.throwInstantiationError},intensity:{get:fe.throwInstantiationError}});var g7=WTe;var e8i=T(S(),1);var Mxt=/\/$/,PTe=new Vt('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function gL(e){e=y(e,y.EMPTY_OBJECT);let t=e.styleId,n=e.accessToken;this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=Ee.createIfNeeded(y(e.url,"https://api.mapbox.com/styles/v1/"));this._styleId=t,this._accessToken=n;let o=y(e.tilesize,512);this._tilesize=o;let r=y(e.username,"mapbox");this._username=r;let s=l(e.scaleFactor)?"@2x":"",a=i.getUrlComponent();Mxt.test(a)||(a+="/"),a+=`${this._username}/${t}/tiles/${this._tilesize}/{z}/{x}/{y}${s}`,i.url=a,i.setQueryParameters({access_token:n});let c;l(e.credit)?(c=e.credit,typeof c=="string"&&(c=new Vt(c))):c=PTe,this._resource=i,this._imageryProvider=new wa({url:i,credit:c,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(gL.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});gL.prototype.getTileCredits=function(e,t,n){};gL.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};gL.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};gL._defaultCredit=PTe;var y7=gL;var n8i=T(S(),1);function x7(e){}x7.prototype.isReady=function(){return!0};x7.prototype.shouldDiscardImage=function(e){return!1};var _7=x7;var u8i=T(S(),1);var Nxt=new Vt("MapQuest, Open Street Map and contributors, CC-BY-SA");function F3(e){e=y(e,y.EMPTY_OBJECT);let t=Ee.createIfNeeded(y(e.url,"https://tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+=`{z}/{x}/{y}${e.retinaTiles?"@2x":""}.${y(e.fileExtension,"png")}`;let n=new Jr({ellipsoid:e.ellipsoid}),i=256,o=256,r=y(e.minimumLevel,0),s=e.maximumLevel,a=y(e.rectangle,n.rectangle),c=n.positionToTileXY(ce.southwest(a),r),d=n.positionToTileXY(ce.northeast(a),r),u=(Math.abs(d.x-c.x)+1)*(Math.abs(d.y-c.y)+1),m=y(e.credit,Nxt);typeof m=="string"&&(m=new Vt(m)),wa.call(this,{url:t,credit:m,tilingScheme:n,tileWidth:i,tileHeight:o,minimumLevel:r,maximumLevel:s,rectangle:a})}l(Object.create)&&(F3.prototype=Object.create(wa.prototype),F3.prototype.constructor=F3);var mb=F3;var y8i=T(S(),1);var kxt=new D(1,1);function T7(e){e=y(e,y.EMPTY_OBJECT),this.mass=y(e.mass,1),this.position=h.clone(y(e.position,h.ZERO)),this.velocity=h.clone(y(e.velocity,h.ZERO)),this.life=y(e.life,Number.MAX_VALUE),this.image=e.image,this.startColor=Y.clone(y(e.startColor,Y.WHITE)),this.endColor=Y.clone(y(e.endColor,Y.WHITE)),this.startScale=y(e.startScale,1),this.endScale=y(e.endScale,1),this.imageSize=D.clone(y(e.imageSize,kxt)),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(T7.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var vTe=new h;T7.prototype.update=function(e,t){return h.multiplyByScalar(this.velocity,e,vTe),h.add(this.position,vTe,this.position),l(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life};var yL=T7;var T8i=T(S(),1);function wTe(e){e=y(e,y.EMPTY_OBJECT),this.time=y(e.time,0),this.minimum=y(e.minimum,0),this.maximum=y(e.maximum,50),this._complete=!1}Object.defineProperties(wTe.prototype,{complete:{get:function(){return this._complete}}});var S7=wTe;var V8i=T(S(),1);function FTe(e){}FTe.prototype.emit=function(e){fe.throwInstantiationError()};var C7=FTe;var N8i=T(S(),1);var ATe=new D(1,1);function cA(e){e=y(e,y.EMPTY_OBJECT),this.show=y(e.show,!0),this.updateCallback=e.updateCallback,this.loop=y(e.loop,!0),this.image=y(e.image,void 0);let t=e.emitter;l(t)||(t=new K9(.5)),this._emitter=t,this._bursts=e.bursts,this._modelMatrix=M.clone(y(e.modelMatrix,M.IDENTITY)),this._emitterModelMatrix=M.clone(y(e.emitterModelMatrix,M.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new M,this._startColor=Y.clone(y(e.color,y(e.startColor,Y.WHITE))),this._endColor=Y.clone(y(e.color,y(e.endColor,Y.WHITE))),this._startScale=y(e.scale,y(e.startScale,1)),this._endScale=y(e.scale,y(e.endScale,1)),this._emissionRate=y(e.emissionRate,5),this._minimumSpeed=y(e.speed,y(e.minimumSpeed,1)),this._maximumSpeed=y(e.speed,y(e.maximumSpeed,1)),this._minimumParticleLife=y(e.particleLife,y(e.minimumParticleLife,5)),this._maximumParticleLife=y(e.particleLife,y(e.maximumParticleLife,5)),this._minimumMass=y(e.mass,y(e.minimumMass,1)),this._maximumMass=y(e.mass,y(e.maximumMass,1)),this._minimumImageSize=D.clone(y(e.imageSize,y(e.minimumImageSize,ATe))),this._maximumImageSize=D.clone(y(e.imageSize,y(e.maximumImageSize,ATe))),this._sizeInMeters=y(e.sizeInMeters,!1),this._lifetime=y(e.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new ge,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}Object.defineProperties(cA.prototype,{emitter:{get:function(){return this._emitter},set:function(e){this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!M.equals(this._modelMatrix,e),M.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!M.equals(this._emitterModelMatrix,e),M.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){Y.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){Y.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){this._maximumSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){this._maximumImageSize=e}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters=e}},lifetime:{get:function(){return this._lifetime},set:function(e){this._lifetime=e}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});function Uxt(e){let t=e._emissionRate,n=e._maximumParticleLife,i=0,o=e._bursts;if(l(o)){let m=o.length;for(let p=0;p<m;++p)i+=o[p].maximum}let r=e._billboardCollection,s=e.image,a=Math.ceil(t*n+i),c=e._particles,d=e._particlePool,u=Math.max(a-c.length-d.length,0);for(let m=0;m<u;++m){let p=new yL;p._billboard=r.add({image:s,show:!1}),d.push(p)}e._particleEstimate=a}function Dxt(e){let t=e._particlePool.pop();return l(t)||(t=new yL),t}function Bxt(e,t){e._particlePool.push(t)}function Yxt(e){let t=e._particles,n=e._particlePool,i=e._billboardCollection,o=t.length,r=n.length,s=e._particleEstimate,a=r-Math.max(s-o-r,0);for(let c=a;c<r;++c){let d=n[c];i.remove(d._billboard)}n.length=a}function Oxt(e){l(e._billboard)&&(e._billboard.show=!1)}function MTe(e,t){let n=t._billboard;l(n)||(n=t._billboard=e._billboardCollection.add({image:t.image})),n.width=t.imageSize.x,n.height=t.imageSize.y,n.position=t.position,n.sizeInMeters=e.sizeInMeters,n.show=!0;let i=W.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),o=W.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),r=W.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),s=W.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);n.color=new Y(i,o,r,s),n.scale=W.lerp(t.startScale,t.endScale,t.normalizedAge)}function Hxt(e,t){t.startColor=Y.clone(e._startColor,t.startColor),t.endColor=Y.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=W.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=W.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=W.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=W.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t._normalizedAge=0,t._age=0;let n=W.randomBetween(e._minimumSpeed,e._maximumSpeed);h.multiplyByScalar(t.velocity,n,t.velocity),e._particles.push(t)}function zxt(e,t){if(e._isComplete)return 0;t=W.mod(t,e._lifetime);let n=t*e._emissionRate,i=Math.floor(n);if(e._carryOver+=n-i,e._carryOver>1&&(i++,e._carryOver-=1),l(e.bursts)){let o=e.bursts.length;for(let r=0;r<o;r++){let s=e.bursts[r],a=e._currentTime;l(s)&&!s._complete&&a>s.time&&(i+=W.randomBetween(s.minimum,s.maximum),s._complete=!0)}}return i}var A3=new h;cA.prototype.update=function(e){if(!this.show)return;l(this._billboardCollection)||(this._billboardCollection=new yd),this._updateParticlePool&&(Uxt(this),this._updateParticlePool=!1);let t=0;this._previousTime&&(t=te.secondsDifference(e.time,this._previousTime)),t<0&&(t=0);let n=this._particles,i=this._emitter,o=this.updateCallback,r,s,a=n.length;for(r=0;r<a;++r)s=n[r],s.update(t,o)?MTe(this,s):(Oxt(s),Bxt(this,s),n[r]=n[a-1],--r,--a);n.length=a;let c=zxt(this,t);if(c>0&&l(i)){this._matrixDirty&&(this._combinedMatrix=M.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);let d=this._combinedMatrix;for(r=0;r<c;r++)s=Dxt(this),this._emitter.emit(s),h.add(s.position,s.velocity,A3),M.multiplyByPoint(d,A3,A3),s.position=M.multiplyByPoint(d,s.position,s.position),h.subtract(A3,s.position,s.velocity),h.normalize(s.velocity,s.velocity),Hxt(this,s),MTe(this,s)}if(this._billboardCollection.update(e),this._previousTime=te.clone(e.time,this._previousTime),this._currentTime+=t,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=W.mod(this._currentTime,this._lifetime),this.bursts){let d=this.bursts.length;for(r=0;r<d;r++)this.bursts[r]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%120===0&&Yxt(this)};cA.prototype.isDestroyed=function(){return!1};cA.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),me(this)};var V7=cA;var Z7i=T(S(),1);var UTe=T(_M(),1);var U8i=T(S(),1);function Kxt(e,t,n){return` float clipDistance = clip(gl_FragCoord, ${e}, ${t}); +`;function oT(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.translucent,!0),n=y(e.aboveGround,!1);this.material=l(e.material)?e.material:Mi.fromType(Mi.ColorType),this.translucent=y(e.translucent,!0),this._vertexShaderSource=y(e.vertexShaderSource,$9),this._fragmentShaderSource=y(e.fragmentShaderSource,q9),this._renderState=ji.getDefaultRenderState(t,!n,e.renderState),this._closed=!1,this._flat=y(e.flat,!1),this._faceForward=y(e.faceForward,n),this._aboveGround=n}Object.defineProperties(oT.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return oT.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}});oT.VERTEX_FORMAT=Xe.POSITION_AND_ST;oT.prototype.getFragmentShaderSource=ji.prototype.getFragmentShaderSource;oT.prototype.isTranslucent=ji.prototype.isTranslucent;oT.prototype.getRenderState=ji.prototype.getRenderState;var l7=oT;var BQi=S(T(),1);function ql(e){this._scene=e.scene,this.samplingWindow=y(e.samplingWindow,ql.defaultSettings.samplingWindow),this.quietPeriod=y(e.quietPeriod,ql.defaultSettings.quietPeriod),this.warmupPeriod=y(e.warmupPeriod,ql.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=y(e.minimumFrameRateDuringWarmup,ql.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=y(e.minimumFrameRateAfterWarmup,ql.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new ge,this._nominalFrameRate=new ge,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;let t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener(function(o,r){Hyt(t,r)}),this._hiddenPropertyName=document.hidden!==void 0?"hidden":document.mozHidden!==void 0?"mozHidden":document.msHidden!==void 0?"msHidden":document.webkitHidden!==void 0?"webkitHidden":void 0;let n=document.hidden!==void 0?"visibilitychange":document.mozHidden!==void 0?"mozvisibilitychange":document.msHidden!==void 0?"msvisibilitychange":document.webkitHidden!==void 0?"webkitvisibilitychange":void 0;function i(){Jyt(t)}this._visibilityChangeRemoveListener=void 0,l(n)&&(document.addEventListener(n,i,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(n,i,!1)})}ql.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};ql.fromScene=function(e){return(!l(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new ql({scene:e})),e._frameRateMonitor};Object.defineProperties(ql.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}});ql.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};ql.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};ql.prototype.isDestroyed=function(){return!1};ql.prototype.destroy=function(){return this._preUpdateRemoveListener(),l(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),me(this)};function Hyt(e,t){if(e._pauseCount>0)return;let n=gi();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=n+e.quietPeriod/Kn.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/Kn.SECONDS_PER_MILLISECOND;else if(n>=e._quietPeriodEndTime){e._frameTimes.push(n);let i=n-e.samplingWindow/Kn.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=i){for(;e._frameTimes.length>=2&&e._frameTimes[1]<i;)e._frameTimes.shift();let o=(n-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/o;let r=1e3/(n>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup);o>r?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}function Jyt(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}var eA=ql;var i4i=S(T(),1);var ESe=S(_8(),1);function d7(){this._image=new Image}d7.prototype.isReady=function(){return!0};d7.prototype.shouldDiscardImage=function(e){return e===this._image};function rT(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new Ni({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ce(-X.PI,-X.PI,X.PI,X.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new Vt(t)),this._credit=t,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new d7),this._errorEvent=new ge}Object.defineProperties(rT.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});rT.fromMetadata=function(e,t){if(!e.imageryPresent)throw new ue(`The server ${e.url} doesn't have imagery`);let n=new rT(t);return n._metadata=e,n};rT.prototype.getTileCredits=function(e,t,n){let i=this._metadata,o=i.getTileInformation(e,t,n);if(l(o)){let r=i.providers[o.imageryProvider];if(l(r))return[r]}};rT.prototype.requestImage=function(e,t,n,i){let o=this._tileDiscardPolicy._image,r=this._metadata,s=l0.tileXYToQuadKey(e,t,n),a=r.getTileInformation(e,t,n);if(!l(a)){if(r.isValid(s)){let d=new Oo({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction});r.populateSubtree(e,t,n,d);return}return Promise.resolve(o)}if(!a.hasImagery())return Promise.resolve(o);let c=Qyt(this,a,e,t,n,i).fetchArrayBuffer();if(l(c))return c.then(function(d){D9(r.key,d);let u=new Uint8Array(d),m,p=r.protoImagery;if((!l(p)||!p)&&(m=jyt(u)),!l(m)&&(!l(p)||p)){let g=qyt(u);m=g.imageType,u=g.imageData}return!l(m)||!l(u)?o:kx({uint8Array:u,format:m,flipY:!0})})};rT.prototype.pickFeatures=function(e,t,n,i,o){};function Qyt(e,t,n,i,o,r){let s=l0.tileXYToQuadKey(n,i,o),a=t.imageryVersion;return a=l(a)&&a>0?a:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1-0${s}-i.${a.toString()}`,request:r})}function jyt(e){let t="JFIF";if(e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3))return"image/jpeg";let n="PNG";if(e[1]===n.charCodeAt(0)&&e[2]===n.charCodeAt(1)&&e[3]===n.charCodeAt(2))return"image/png"}function qyt(e){let t=ESe.Reader.create(e),n=t.len,i={};for(;t.pos<n;){let s=t.uint32(),a;switch(s>>>3){case 1:i.imageType=t.uint32();break;case 2:i.imageData=t.bytes();break;case 3:i.alphaType=t.uint32();break;case 4:i.imageAlpha=t.bytes();break;case 5:if(a=i.copyrightIds,l(a)||(a=i.copyrightIds=[]),(s&7)===2){let c=t.uint32()+t.pos;for(;t.pos<c;)a.push(t.uint32())}else a.push(t.uint32());break;default:t.skipType(s&7);break}}let o=i.imageType;if(l(o))switch(o){case 0:i.imageType="image/jpeg";break;case 4:i.imageType="image/png";break;default:throw new ue("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}let r=i.alphaType;return l(r)&&r!==0&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete i.alphaType,delete i.imageAlpha),i}var u7=rT;var d4i=S(T(),1);var $yt=new Y(1,1,1,.4),ext=new Y(0,1,0,.05),txt=new Y(0,.5,0,.2);function sT(e){e=y(e,y.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new Ni({ellipsoid:e.ellipsoid}),this._cells=y(e.cells,8),this._color=y(e.color,$yt),this._glowColor=y(e.glowColor,ext),this._glowWidth=y(e.glowWidth,6),this._backgroundColor=y(e.backgroundColor,txt),this._errorEvent=new ge,this._tileWidth=y(e.tileWidth,256),this._tileHeight=y(e.tileHeight,256),this._canvasSize=y(e.canvasSize,256),this._canvas=this._createGridCanvas()}Object.defineProperties(sT.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});sT.prototype._drawGrid=function(e){let n=this._canvasSize;for(let i=0;i<=this._cells;++i){let r=1+i/this._cells*(n-1);e.moveTo(r,0),e.lineTo(r,n),e.moveTo(0,r),e.lineTo(n,r)}e.stroke()};sT.prototype._createGridCanvas=function(){let e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;let t=0,n=this._canvasSize,i=e.getContext("2d"),o=this._backgroundColor.toCssColorString();i.fillStyle=o,i.fillRect(t,t,n,n);let r=this._glowColor.toCssColorString();i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(t,t,n,n),this._drawGrid(i),i.lineWidth=this._glowWidth*.5,i.strokeRect(t,t,n,n),this._drawGrid(i);let s=this._color.toCssColorString();return i.strokeStyle=s,i.lineWidth=2,i.strokeRect(t,t,n,n),i.lineWidth=1,this._drawGrid(i),e};sT.prototype.getTileCredits=function(e,t,n){};sT.prototype.requestImage=function(e,t,n,i){return Promise.resolve(this._canvas)};sT.prototype.pickFeatures=function(e,t,n,i,o){};var m7=sT;var zji=S(T(),1);var gji=S(T(),1);var $4i=S(T(),1);var _4i=S(T(),1);function Wh(){}Wh._maxDecodingConcurrency=Math.max(Yt.hardwareConcurrency-1,1);Wh._decodeTaskProcessor=new bi("decodeI3S",Wh._maxDecodingConcurrency);Wh._promise=void 0;async function nxt(){if(await Wh._decodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}))return Wh._decodeTaskProcessor;throw new ue("I3S decoder could not be initialized.")}Wh.decode=async function(e,t,n,i,o){return l(Wh._promise)||(Wh._promise=nxt()),Wh._promise.then(function(r){let s=n._parent._data,a=n._parent._inverseRotationMatrix,c=0,d=0,u=0;l(s.obb)?(c=s.obb.center[0],d=s.obb.center[1],u=s.obb.center[2]):l(s.mbs)&&(c=s.mbs[0],d=s.mbs[1],u=s.mbs[2]);let m=$.fromRotationX(-X.PI_OVER_TWO),p=new $;$.multiply(m,a,p);let g=he.fromDegrees(c,d,u),f=te.WGS84.cartographicToCartesian(g),x={binaryData:n._data,featureData:l(i)&&l(i[0])?i[0].data:void 0,schema:t,bufferInfo:n._geometryBufferInfo,ellipsoidRadiiSquare:te.WGS84.radiiSquared,url:e,geoidDataList:n._dataProvider._geoidDataList,cartographicCenter:g,cartesianCenter:f,parentRotation:p,enableFeatures:n._dataProvider.showFeatures,splitGeometryByColorTransparency:n._dataProvider.adjustMaterialAlphaMode,symbologyData:o,calculateNormals:n._dataProvider.calculateNormals};return r.scheduleTask(x)})};var tA=Wh;var V4i=S(T(),1);function h7(e,t){this._parent=e,this._dataProvider=e._dataProvider,this._layer=e._layer,l(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${t}`}):this._resource=this._parent.resource.getDerivedResource({url:t})}Object.defineProperties(h7.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});h7.prototype.load=async function(){return this._data=await Ih.loadJson(this._resource),this._data};var nA=h7;var G4i=S(T(),1);function d0(e,t){this._storageInfo=t,this._parent=e,this._dataProvider=e._dataProvider,this._loadPromise=void 0;let n=`attributes/${t.key}/0`;l(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${n}`}):this._resource=this._parent.resource.getDerivedResource({url:n})}Object.defineProperties(d0.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){if(l(this._values)){if(l(this._values.attributeValues))return this._values.attributeValues;if(l(this._values.objectIds))return this._values.objectIds}return[]}},name:{get:function(){return this._storageInfo.name}}});function XB(e){return e==="UInt8"||e==="Int8"?1:e==="UInt16"||e==="Int16"?2:e==="UInt32"||e==="Int32"||e==="Oid32"||e==="Float32"?4:e==="UInt64"||e==="Int64"||e==="Float64"?8:0}function ixt(e){return e==="String"?1:XB(e)}async function oxt(e){let t=await e._dataProvider._loadBinary(e._resource),n=new DataView(t);e._data=t,e._validateHeader(n);let i=e._parseHeader(n),o=e._getBodyOffset(i);e._validateBody(n,o),e._parseBody(n,o)}d0.prototype.load=function(){return l(this._loadPromise)?this._loadPromise:(this._loadPromise=oxt(this).catch(function(e){console.error(e)}),this._loadPromise)};d0.prototype._parseValue=function(e,t,n){let i;if(t==="UInt8")i=e.getUint8(n),n+=1;else if(t==="Int8")i=e.getInt8(n),n+=1;else if(t==="UInt16")i=e.getUint16(n,!0),n+=2;else if(t==="Int16")i=e.getInt16(n,!0),n+=2;else if(t==="UInt32")i=e.getUint32(n,!0),n+=4;else if(t==="Oid32")i=e.getUint32(n,!0),n+=4;else if(t==="Int32")i=e.getInt32(n,!0),n+=4;else if(t==="UInt64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);i=o+Math.pow(2,32)*r,n+=8}else if(t==="Int64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);r<Math.pow(2,31)?i=o+Math.pow(2,32)*r:i=o+Math.pow(2,32)*(r-Math.pow(2,32)),n+=8}else t==="Float32"?(i=e.getFloat32(n,!0),n+=4):t==="Float64"?(i=e.getFloat64(n,!0),n+=8):t==="String"&&(i=String.fromCharCode(e.getUint8(n)),n+=1);return{value:i,offset:n}};d0.prototype._parseHeader=function(e){let t=0;this._header={};for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n],o=this._parseValue(e,i.valueType,t);this._header[i.property]=o.value,t=o.offset}return t};d0.prototype._parseBody=function(e,t){this._values={};for(let n=0;n<this._storageInfo.ordering.length;n++){let i=this._storageInfo.ordering[n],o=i==="ObjectIds"?"objectIds":i,r=this._storageInfo[o];if(l(r)){this._values[o]=[];for(let s=0;s<this._header.count;++s)if(r.valueType!=="String"){let a=this._parseValue(e,r.valueType,t);this._values[o].push(a.value),t=a.offset}else{let a=this._values.attributeByteCounts[s],c="";for(let d=0;d<a;++d){let u=this._parseValue(e,r.valueType,t);u.value.charCodeAt(0)!==0&&(c+=u.value),t=u.offset}this._values[o].push(c)}}}};d0.prototype._getBodyOffset=function(e){let t=0;return l(this._storageInfo.attributeValues)?t=XB(this._storageInfo.attributeValues.valueType):l(this._storageInfo.objectIds)&&(t=XB(this._storageInfo.objectIds.valueType)),t>0?Math.ceil(e/t)*t:e};d0.prototype._validateHeader=function(e){let t=0;for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n];t+=ixt(i.valueType)}if(e.byteLength<t)throw new ue(`Invalid attribute buffer size (field: ${this.name}, header: ${t}, actual: ${e.byteLength})`)};d0.prototype._validateBody=function(e,t){if(!l(this._header.count))throw new ue(`Invalid attribute buffer (field: ${this.name}, count is missing)`);let n;for(let i=0;i<this._storageInfo.ordering.length&&t<e.byteLength;i++){let o=this._storageInfo.ordering[i],r=o==="ObjectIds"?"objectIds":o,s=this._storageInfo[r];if(l(s))if(s.valueType!=="String"){r==="attributeByteCounts"&&(n=t);let a=XB(s.valueType);t+=a*this._header.count}else{if(!l(n))throw new ue(`Invalid attribute buffer (field: ${this.name}, attributeByteCounts is missing)`);for(let a=0;a<this._header.count&&t<e.byteLength;++a){let c=this._parseValue(e,this._storageInfo.attributeByteCounts.valueType,n);t+=c.value,n=c.offset}}else throw new ue(`Invalid attribute buffer (field: ${this.name}, ${r} is missing)`)}if(e.byteLength<t)throw new ue(`Invalid attribute buffer size (field: ${this.name}, expected: ${t}, actual: ${e.byteLength})`)};var iA=d0;var w4i=S(T(),1);function oA(e,t){let n=e._dataProvider,i=e._layer,o;l(e._nodeIndex)?o=i.resource.getDerivedResource({url:`nodes/${e._data.mesh.geometry.resource}/${t}`}):o=e.resource.getDerivedResource({url:t}),this._parent=e,this._dataProvider=n,this._layer=i,this._resource=o,this._customAttributes=void 0}Object.defineProperties(oA.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});oA.prototype.load=function(){let e=this;return this._dataProvider._loadBinary(this._resource).then(function(t){return e._data=t,t})};var rxt=new h,sxt=new h,axt=new h,cxt=new h,lxt=new h;function f7(e,t,n,i){let o=h.subtract(i,n,rxt),r=h.cross(o,h.subtract(e,n,sxt),cxt),s=h.cross(o,h.subtract(t,n,axt),lxt);return h.dot(r,s)>=0}var dxt=new h,uxt=new h,mxt=new h,hxt=new h,fxt=new h,pxt=new h,bxt=new h,gxt=new h,yxt=new h,xxt=new h;oA.prototype.getClosestPointIndexOnTriangle=function(e,t,n){if(l(this._customAttributes)&&l(this._customAttributes.positions)){let i=new h(e,t,n);i.x-=this._customAttributes.cartesianCenter.x,i.y-=this._customAttributes.cartesianCenter.y,i.z-=this._customAttributes.cartesianCenter.z,$.multiplyByVector(this._customAttributes.parentRotation,i,i);let o=Number.MAX_VALUE,r,s,a,c,d=this._customAttributes.positions,u=this._customAttributes.indices,m;l(u)?m=u.length:m=d.length/3;for(let p=0;p<m;p++){let g,f,x;l(u)?(g=u[p],f=u[p+1],x=u[p+2]):(g=p*3,f=p*3+1,x=p*3+2);let _=h.fromElements(d[g*3],d[g*3+1],d[g*3+2],dxt),C=h.fromElements(d[f*3],d[f*3+1],d[f*3+2],uxt),V=new h(d[x*3],d[x*3+1],d[x*3+2],mxt);if(!f7(i,_,C,V)||!f7(i,C,_,V)||!f7(i,V,_,C))continue;let Z=h.subtract(C,_,hxt),R=h.subtract(V,_,fxt),G=h.cross(Z,R,pxt);if(h.magnitude(G)===0)continue;let W=h.normalize(G,bxt),v=h.subtract(i,_,gxt),P=Math.abs(h.dot(v,W));if(P<o){o=P,r=p;let F=h.magnitudeSquared(h.subtract(i,_,v)),M=h.magnitudeSquared(h.subtract(i,C,yxt)),b=h.magnitudeSquared(h.subtract(i,V,xxt));F<M&&F<b?(a=g,c=_,s=F):M<b?(a=f,c=C,s=M):(a=x,c=V,s=b)}}if(l(r))return{index:a,distanceSquared:s,distance:Math.sqrt(s),queriedPosition:i,closestPosition:h.clone(c)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};function WSe(e){let t=[],n=e.length;for(let i=0;i<n;i++)i<3?t.push(tT(e[i])):t.push(e[i]);return t}oA.prototype._generateGltf=function(e,t,n,i,o,r,s,a){let c={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},d=!1,u,m="";if(l(this._parent._data.mesh)&&l(this._layer._data.materialDefinitions)){let Z=this._parent._data.mesh.material.definition;if(Z>=0&&Z<this._layer._data.materialDefinitions.length){if(u=this._layer._data.materialDefinitions[Z],c=u,l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorTexture)){d=!0,c.pbrMetallicRoughness.baseColorTexture.index=0;let R="0";if(l(this._layer._data.textureSetDefinitions))for(let G=0;G<this._layer._data.textureSetDefinitions.length;G++){let W=this._layer._data.textureSetDefinitions[G];for(let v=0;v<W.formats.length;v++){let P=W.formats[v];if(P.format==="jpg"){R=P.name;break}}}l(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(m=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${R}`}).url)}l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorFactor)&&(c.pbrMetallicRoughness.baseColorFactor=WSe(c.pbrMetallicRoughness.baseColorFactor)),l(c.emissiveFactor)&&(c.emissiveFactor=WSe(c.emissiveFactor))}}else l(this._parent._data.textureData)&&(d=!0,m=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,c.pbrMetallicRoughness.baseColorTexture={index:0});l(c.alphaMode)&&(c.alphaMode=c.alphaMode.toUpperCase());let p=[],g=[],f=[];d&&(p=[{sampler:0,source:0}],g=[{uri:m}],f=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]);let x=[],_=n.length;for(let V=0;V<_;V++){let Z=n[V].primitives,R=Z.length;for(let G=0;G<R;G++){let W=Z[G];if(l(W.material)){for(;W.material>=x.length;){let P=Oe(c,!0);x.push(P)}let v=x[W.material];l(W.extra)&&W.extra.isTransparent?l(v.alphaMode)||(v.alphaMode="BLEND"):v.alphaMode==="BLEND"&&(v.alphaMode="OPAQUE")}}}return{scene:0,scenes:[{nodes:e}],nodes:t,meshes:n,buffers:i,bufferViews:o,accessors:r,materials:x,textures:p,images:g,samplers:f,asset:{version:"2.0"},extensions:s,extensionsUsed:a}};var fZ=oA;function Lc(e,t,n){let i,o,r,s;n?(i=0,o=e):(i=e._level+1,o=e._layer),typeof t=="number"?r=t:s=e.resource.getDerivedResource({url:`${t}/`}),this._parent=e,this._dataProvider=e._dataProvider,this._isRoot=n,this._level=i,this._layer=o,this._nodeIndex=r,this._resource=s,this._isLoading=!1,this._tile=void 0,this._data=void 0,this._geometryData=[],this._featureData=[],this._fields={},this._children=[],this._childrenReadyPromise=void 0,this._globalTransform=void 0,this._inverseGlobalTransform=void 0,this._inverseRotationMatrix=void 0,this._symbologyData=void 0}Object.defineProperties(Lc.prototype,{resource:{get:function(){return this._resource}},layer:{get:function(){return this._layer}},parent:{get:function(){return this._parent}},children:{get:function(){return this._children}},geometryData:{get:function(){return this._geometryData}},featureData:{get:function(){return this._featureData}},fields:{get:function(){return this._fields}},tile:{get:function(){return this._tile}},data:{get:function(){return this._data}}});Lc.prototype.load=async function(){let e=this;function t(){if(!e._isRoot){let o=e._create3DTileDefinition();e._tile=new Xu(e._layer._tileset,e._dataProvider.resource,o,e._parent._tile),e._tile._i3sNode=e}}if(!l(this._nodeIndex)){let o=await Ih.loadJson(this._resource);e._data=o,t();return}let n=await this._layer._getNodeInNodePages(this._nodeIndex);e._data=n;let i;e._isRoot?i="nodes/root/":l(n.mesh)&&(i=`../${n.mesh.geometry.resource}/`),l(i)&&(e._resource=e._parent.resource.getDerivedResource({url:i})),t()};function ISe(e,t){let n=new iA(e,t);return e._fields[t.name]=n,n.load()}Lc.prototype.loadFields=function(){let e=this._layer._data.attributeStorageInfo,t=[];if(l(e))for(let n=0;n<e.length;n++){let i=e[n],o=this._fields[i.name];l(o)?t.push(o.load()):t.push(ISe(this,i))}return Promise.all(t)};Lc.prototype.loadField=function(e){let t=this._fields[e];if(l(t))return t.load();let n=this._layer._data.attributeStorageInfo;if(l(n))for(let i=0;i<n.length;i++){let o=n[i];if(o.name===e)return ISe(this,o)}return Promise.resolve()};Lc.prototype.getFieldsForPickedPosition=function(e){let t=this.geometryData[0];if(!l(t.customAttributes.featureIndex))return{};let n=t.getClosestPointIndexOnTriangle(e.x,e.y,e.z);if(n.index===-1||n.index>t.customAttributes.featureIndex.length)return{};let i=t.customAttributes.featureIndex[n.index];return this.getFieldsForFeature(i)};Lc.prototype.getFieldsForFeature=function(e){let t={};for(let n in this.fields)if(this.fields.hasOwnProperty(n)){let i=this.fields[n];e>=0&&e<i.values.length&&(t[i.name]=i.values[e])}return t};Lc.prototype._loadChildren=function(){let e=this;if(l(this._childrenReadyPromise))return this._childrenReadyPromise;let t=[];if(l(e._data.children))for(let n=0;n<e._data.children.length;n++){let i=e._data.children[n],o=new Lc(e,y(i.href,i),!1);e._children.push(o),t.push(o.load())}return this._childrenReadyPromise=Promise.all(t).then(function(){for(let n=0;n<e._children.length;n++)e._tile.children.push(e._children[n]._tile)}),this._childrenReadyPromise};Lc.prototype._loadGeometryData=function(){let e=[];if(l(this._data.geometryData))for(let t=0;t<this._data.geometryData.length;t++){let n=new fZ(this,this._data.geometryData[t].href);this._geometryData.push(n),e.push(n.load())}else if(l(this._data.mesh)){let t=this._layer._findBestGeometryBuffers(this._data.mesh.geometry.definition,["position","uv0"]),n=`./geometries/${t.bufferIndex}/`,i=new fZ(this,n);i._geometryDefinitions=t.definition,i._geometryBufferInfo=t.geometryBufferInfo,this._geometryData.push(i),e.push(i.load())}return Promise.all(e)};Lc.prototype._loadFeatureData=function(){let e=[];if(l(this._data.featureData))for(let t=0;t<this._data.featureData.length;t++){let n=new nA(this,this._data.featureData[t].href);this._featureData.push(n),e.push(n.load())}return Promise.all(e)};Lc.prototype._clearGeometryData=function(){this._geometryData=[]};Lc.prototype._create3DTileDefinition=function(){let e=this._data.obb,t=this._data.mbs;if(!l(e)&&!l(t)){console.error("Failed to load I3S node. Bounding volume is required.");return}let n;if(l(e)?n=he.fromDegrees(e.center[0],e.center[1],e.center[2]):n=he.fromDegrees(t[0],t[1],t[2]),l(this._dataProvider._geoidDataList)&&l(n))for(let C=0;C<this._dataProvider._geoidDataList.length;C++){let V=this._dataProvider._geoidDataList[C],Z=V.projection.project(n);if(Z.x>V.nativeExtent.west&&Z.x<V.nativeExtent.east&&Z.y>V.nativeExtent.south&&Z.y<V.nativeExtent.north){n.height+=Cxt(Z.x,Z.y,V);break}}let i={},o,r=0;l(e)?(i={box:[0,0,0,e.halfSize[0],0,0,0,e.halfSize[1],0,0,0,e.halfSize[2]]},r=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),o=te.WGS84.cartographicToCartesian(n)):(i={sphere:[0,0,0,t[3]]},o=te.WGS84.cartographicToCartesian(n),r=this._data.mbs[3]),r*=2;let s=1/0;if(l(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let C=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));s=r/C}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let C=this._data.lodThreshold;s=r/C}else console.error("Invalid lodSelectionMetricType in Layer");else if(l(this._data.lodSelection))for(let C=0;C<this._data.lodSelection.length;C++)this._data.lodSelection[C].metricType==="maxScreenThreshold"&&(s=r/this._data.lodSelection[C].maxError);s===1/0&&(s=1e5);let a=s*16,c=new Ja(0,0,0),d=Gt.headingPitchRollQuaternion(o,c);l(this._data.obb)&&(d=new we(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let u=$.fromQuaternion(d),m=$.inverse(u,new $),p=new A(u[0],u[1],u[2],0,u[3],u[4],u[5],0,u[6],u[7],u[8],0,o.x,o.y,o.z,1),g=A.inverse(p,new A),f=A.clone(p);l(this._parent._globalTransform)&&A.multiply(p,this._parent._inverseGlobalTransform,f),this._globalTransform=p,this._inverseGlobalTransform=g,this._inverseRotationMatrix=m;let x=[];for(let C=0;C<this._children.length;C++)x.push(this._children[C]._create3DTileDefinition());return{children:x,refine:"REPLACE",boundingVolume:i,transform:[f[0],f[4],f[8],f[12],f[1],f[5],f[9],f[13],f[2],f[6],f[10],f[14],f[3],f[7],f[11],f[15]],content:{uri:l(this._resource)?this._resource.url:void 0},geometricError:a}};Lc.prototype._loadSymbology=async function(){!l(this._symbologyData)&&l(this._layer._symbology)&&(this._symbologyData=await this._layer._symbology._getSymbology(this))};Lc.prototype._createContentURL=async function(){let e={scene:0,scenes:[{nodes:[0]}],nodes:[{name:"singleNode"}],meshes:[],buffers:[],bufferViews:[],accessors:[],materials:[],textures:[],images:[],samplers:[],asset:{version:"2.0"}},t=[this._loadGeometryData()];if(this._dataProvider.legacyVersion16&&t.push(this._loadFeatureData()),await Promise.all(t),l(this._geometryData)&&this._geometryData.length>0){this._dataProvider._applySymbology&&await this._loadSymbology();let o=this._geometryData[0].resource.url,r=this._layer._data.store.defaultGeometrySchema,s=this._geometryData[0],a=await tA.decode(o,r,s,this._featureData[0],this._symbologyData);if(!l(a))return;e=s._generateGltf(a.meshData.nodesInScene,a.meshData.nodes,a.meshData.meshes,a.meshData.buffers,a.meshData.bufferViews,a.meshData.accessors,a.meshData.rootExtensions,a.meshData.extensionsUsed),this._geometryData[0]._customAttributes=a.meshData._customAttributes}let n=this._dataProvider._binarizeGltf(e),i=new Blob([n],{type:"application/binary"});return URL.createObjectURL(i)};async function _xt(e){let t=e._layer._filters,n=[];for(let i=0;i<t.length;i++){let o=e.loadField(t[i].name);n.push(o)}return await Promise.all(n),t}function Sxt(e,t,n){if(!l(n.values)||n.values.length===0)return!1;let i=l(t)?t.values:[],o;e<i.length&&(o=i[e]);let r=!1;for(let s=0;s<n.values.length;s++)if(n.values[s]===o){r=!0;break}return r}async function XSe(e,t){let n=e._tile.content.batchTable;if(l(n)&&n.featuresLength>0){n.setAllShow(!0);let i=await _xt(e);if(i.length>0)for(let o=0;o<n.featuresLength;o++)for(let r=0;r<i.length;r++){let s=i[r];if(!Sxt(o,e._fields[s.name],s)){n.setShow(o,!1);break}}}t.show=!0}Lc.prototype._filterFeatures=function(){let e=[];for(let n=0;n<this._children.length;n++){let i=this._children[n]._filterFeatures();e.push(i)}let t=this._tile?.content?._model;if(l(this._geometryData)&&this._geometryData.length>0&&l(t)&&t.ready){t.show=!1;let n=XSe(this,t);e.push(n)}return Promise.all(e)};Xu.prototype._hookedRequestContent=Xu.prototype.requestContent;Xu.prototype.requestContent=function(){if(!this.tileset._isI3STileSet)return this._hookedRequestContent();if(!this._isLoading){this._isLoading=!0;let e=this;return this._i3sNode._createContentURL().then(t=>{if(!l(t)){e._isLoading=!1;return}return e._contentResource=new Ee({url:t}),e._hookedRequestContent()}).then(t=>{let n=t?._model;return l(e._i3sNode._geometryData)&&e._i3sNode._geometryData.length>0&&l(n)&&(n.show=!1,n.readyEvent.addEventListener(()=>{XSe(e._i3sNode,n)})),e._isLoading=!1,t})}};function Txt(e,t,n,i,o,r){let s=n*(1-e)+i*e,a=o*(1-e)+r*e;return s*(1-t)+a*t}function PB(e,t,n,i){let o=e+t*n;return i[o]}function Cxt(e,t,n){let i=n.nativeExtent,o=(e-i.west)/(i.east-i.west)*(n.width-1),r=(t-i.south)/(i.north-i.south)*(n.height-1),s=Math.floor(o),a=Math.floor(r);o-=s,r-=a;let c=s<n.width?s+1:s,d=a<n.height?a+1:a;a=n.height-1-a,d=n.height-1-d;let u=PB(s,a,n.width,n.buffer),m=PB(c,a,n.width,n.buffer),p=PB(s,d,n.width,n.buffer),g=PB(c,d,n.width,n.buffer),f=Txt(o,r,u,m,p,g);return f=f*n.scale+n.offset,f}Object.defineProperties(Xu.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var pZ=Lc;var rji=S(T(),1);function vB(e){this._layer=e,this._defaultSymbology=void 0,this._valueFields=[],this._uniqueValueHash=void 0,this._classBreaksHash=void 0,this._parseLayerSymbology()}Object.defineProperties(vB.prototype,{defaultSymbology:{get:function(){return this._defaultSymbology}}});function p7(e,t){let n=[];for(let i=0;i<e.length;i++){let o=Y.byteToFloat(e[i]);i<3?n.push(tT(o)):n.push(o)}return n.length===3&&(l(t)?n.push(1-t/100):n.push(1)),n}function bZ(e,t){let n={edges:void 0,material:void 0};if(l(e)&&l(e.symbolLayers))for(let i=0;i<e.symbolLayers.length;i++){let o=e.symbolLayers[i];if(o.type==="Fill"){let r=o.edges,s=o.outline;if(l(r)?(n.edges={},l(r.color)&&(n.edges.color=p7(r.color,r.transparency))):l(s)&&(n.edges={},l(s.color)&&(n.edges.color=p7(s.color,s.transparency))),!t){let a=o.material;l(a)&&(n.material={colorMixMode:a.colorMixMode},l(a.color)&&(n.material.color=p7(a.color,a.transparency)))}break}}return n}function Vxt(e,t){if(l(e.uniqueValueGroups)){let n={};for(let i=0;i<e.uniqueValueGroups.length;i++){let o=e.uniqueValueGroups[i].classes;if(l(o))for(let r=0;r<o.length;r++){let s=bZ(o[r].symbol,t),a=o[r].values;for(let c=0;c<a.length;c++){let d=a[c],u=n;for(let m=0;m<d.length;m++){let p=d[m];m===d.length-1?u[p]=s:(l(u[p])||(u[p]={}),u=u[p])}}}}return n}if(l(e.uniqueValueInfos)){let n={};for(let i=0;i<e.uniqueValueInfos.length;i++){let o=e.uniqueValueInfos[i];n[o.value]=bZ(o.symbol,t)}return n}}function Zxt(e,t){if(l(e.classBreakInfos)){let n=[...e.classBreakInfos];n.sort(function(o,r){let s=y(o.classMaxValue,o.classMinValue),a=y(r.classMaxValue,r.classMinValue);return s-a});let i={ranges:[],symbols:[]};l(e.minValue)&&(i.ranges.push(e.minValue),i.symbols.push(void 0));for(let o=0;o<n.length;o++){let r=n[o];l(r.classMinValue)&&(i.ranges.length===0||r.classMinValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMinValue),i.symbols.push(void 0)),l(r.classMaxValue)&&(i.ranges.length===0||r.classMaxValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMaxValue),i.symbols.push(bZ(r.symbol,t)))}return i.symbols.push(void 0),i}}vB.prototype._parseLayerSymbology=function(){let e=this._layer.data.drawingInfo;if(l(e)&&l(e.renderer)){let t=this._layer.data.cachedDrawingInfo,n=l(t)&&t.color===!0,i=e.renderer;i.type==="simple"?this._defaultSymbology=bZ(i.symbol,n):i.type==="uniqueValue"?(this._defaultSymbology=bZ(i.defaultSymbol,n),this._valueFields.push(i.field1),l(i.field2)&&this._valueFields.push(i.field2),l(i.field3)&&this._valueFields.push(i.field3),this._uniqueValueHash=Vxt(i,n)):i.type==="classBreaks"&&(this._defaultSymbology=bZ(i.defaultSymbol,n),this._valueFields.push(i.field),this._classBreaksHash=Zxt(i,n))}};function PSe(e,t,n,i){let o=t[n];if(i<o.length){let r=o[i],s=e[r];return l(s)&&++n<t.length?PSe(s,t,n,i):s}}function Lxt(e,t){let n=0,i=e.length;if(n<i)do{let o=n+i>>>1;e[o]<t?n=o+1:i=o}while(n<i);return n}function Rxt(e,t,n){let i=t[n],o=Lxt(e.ranges,i);return e.symbols[o]}vB.prototype._getSymbology=async function(e){let t={default:this._defaultSymbology};if(this._valueFields.length>0){let n=[];for(let r=0;r<this._valueFields.length;r++)n.push(e.loadField(this._valueFields[r]));await Promise.all(n);let i=[];for(let r=0;r<this._valueFields.length;r++)i.push(e.fields[this._valueFields[r]].values);let o;if(l(this._uniqueValueHash)?o=r=>PSe(this._uniqueValueHash,i,0,r):l(this._classBreaksHash)&&(o=r=>Rxt(this._classBreaksHash,i[0],r)),l(o)){let r=i[0];for(let s=0;s<r.length;s++){let a=o(s);l(a)&&(t[s]=a)}}}return t};var rA=vB;function $l(e,t,n){this._dataProvider=e,this._parent=n,!l(t.href)&&l(t.id)&&(t.href=`layers/${t.id}`);let i=this._parent.resource.getUrlComponent(),o="";i.match(/layers\/\d/)?o=`${i}`.replace(/\/+$/,""):o=`${i}`.replace(/\/?$/,"/").concat(`${t.href}`),this._version=t.store.version;let r=this._version.split(".");this._majorVersion=parseInt(r[0]),this._minorVersion=r.length>1?parseInt(r[1]):0,this._resource=new Ee({url:o}),this._resource.setQueryParameters(this._dataProvider.resource.queryParameters),this._resource.appendForwardSlash(),this._data=t,this._rootNode=void 0,this._nodePages={},this._nodePageFetches={},this._extent=void 0,this._tileset=void 0,this._geometryDefinitions=void 0,this._filters=[],this._symbology=void 0,this._computeGeometryDefinitions(!0),this._computeExtent()}Object.defineProperties($l.prototype,{resource:{get:function(){return this._resource}},rootNode:{get:function(){return this._rootNode}},tileset:{get:function(){return this._tileset}},data:{get:function(){return this._data}},version:{get:function(){return this._version}},majorVersion:{get:function(){return this._majorVersion}},minorVersion:{get:function(){return this._minorVersion}},legacyVersion16:{get:function(){if(l(this.version))return this.majorVersion<1||this.majorVersion===1&&this.minorVersion<=6}}});$l.prototype.load=async function(e){if(this._data.spatialReference.wkid!==4326)throw new ue(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`);if(this._dataProvider.applySymbology&&(this._symbology=new rA(this)),await this._dataProvider.loadGeoidData(),await this._loadRootNode(e),await this._create3DTileset(e),this._rootNode._tile=this._tileset._root,this._tileset._root._i3sNode=this._rootNode,this.legacyVersion16)return this._rootNode._loadChildren()};$l.prototype._computeGeometryDefinitions=function(e){if(this._geometryDefinitions=[],l(this._data.geometryDefinitions))for(let t=0;t<this._data.geometryDefinitions.length;t++){let n=[],i=this._data.geometryDefinitions[t].geometryBuffers;for(let o=0;o<i.length;o++){let r=i[o],s=[],a=!1;if(l(r.compressedAttributes)&&e){a=!0;let c=r.compressedAttributes.attributes;for(let d=0;d<c.length;d++)s.push(c[d])}else for(let c in r)c!=="offset"&&s.push(c);n.push({compressed:a,attributes:s,index:i.indexOf(r)})}n.sort(function(o,r){return o.compressed&&!r.compressed?-1:!o.compressed&&r.compressed?1:o.attributes.length-r.attributes.length}),this._geometryDefinitions.push(n)}};$l.prototype._findBestGeometryBuffers=function(e,t){let n=this._geometryDefinitions[e];if(l(n))for(let i=0;i<n.length;++i){let o=n[i],r=!1,s=o.attributes;for(let a=0;a<t.length;a++)if(!s.includes(t[a])){r=!0;break}if(!r)return{bufferIndex:o.index,definition:n,geometryBufferInfo:o}}return 0};$l.prototype._loadRootNode=function(e){if(l(this._data.nodePages)){let t=0;l(this._data.nodePages.rootIndex)&&(t=this._data.nodePages.rootIndex),this._rootNode=new pZ(this,t,!0)}else this._rootNode=new pZ(this,this._data.store.rootNode,!0);return this._rootNode.load(e)};$l.prototype._getNodeInNodePages=function(e){let t=Math.floor(e/this._data.nodePages.nodesPerPage),n=e%this._data.nodePages.nodesPerPage;return this._loadNodePage(t).then(function(i){return i.nodes[n]})};$l._fetchJson=function(e){return e.fetchJson()};$l.prototype._loadNodePage=function(e){let t=this;if(!l(this._nodePageFetches[e])){let n=this.resource.getDerivedResource({url:`nodepages/${e}/`}),i=$l._fetchJson(n).then(function(o){return l(o.error)&&o.error.code!==200?Promise.reject(o.error):(t._nodePages[e]=o.nodes,o)});this._nodePageFetches[e]=i}return this._nodePageFetches[e]};$l.prototype._computeExtent=function(){l(this._data.fullExtent)?this._extent=ce.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):l(this._data.store.extent)&&(this._extent=ce.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};$l.prototype._create3DTileset=async function(e){let t={asset:{version:"1.0"},geometricError:Number.MAX_VALUE,root:this._rootNode._create3DTileDefinition()},n=new Blob([JSON.stringify(t)],{type:"application/json"}),i=URL.createObjectURL(n),o=this._symbology?.defaultSymbology?.edges?.color;l(o)&&!l(e?.outlineColor)&&(e=l(e)?Oe(e):{},e.outlineColor=Y.fromCartesian4(se.fromArray(o))),this._tileset=await ra.fromUrl(i,e),this._tileset.show=this._parent.show,this._tileset._isI3STileSet=!0,this._tileset.tileUnload.addEventListener(function(r){r._i3sNode._clearGeometryData(),URL.revokeObjectURL(r._contentResource._url),r._contentResource=r._i3sNode.resource}),this._tileset.tileVisible.addEventListener(function(r){l(r._i3sNode)&&r._i3sNode._loadChildren()})};$l.prototype._updateVisibility=function(){l(this._tileset)&&(this._tileset.show=this._parent.show)};$l.prototype.filterByAttributes=function(e){this._filters=l(e)?Oe(e,!0):[];let t=this._rootNode;return l(t)?t._filterFeatures():Promise.resolve()};var aT=$l;var Tji=S(T(),1);function wB(e,t){this._dataProvider=e,this._resource=new Ee({url:t}),this._resource.setQueryParameters(e.resource.queryParameters),this._resource.appendForwardSlash()}Object.defineProperties(wB.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},names:{get:function(){let e=[],t=this._data.summary;if(l(t))for(let n=0;n<t.length;++n)e.push(t[n].fieldName);return e}}});wB.prototype.load=async function(){return this._data=await Ih.loadJson(this._resource),this._data};wB.prototype._getValues=function(e){let t=this._data.summary;if(l(t))for(let n=0;n<t.length;++n){let i=t[n];if(i.fieldName===e)return l(i.mostFrequentValues)?[...i.mostFrequentValues]:[]}};var sA=wB;var Eji=S(T(),1);function aA(e,t,n){this._dataProvider=e,this._parent=t,this._data=n,this._name=n.name,this._modelName=n.modelName,this._visibility=y(n.visibility,!0),this._resource=void 0,this._sublayers=[],this._i3sLayers=[]}Object.defineProperties(aA.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},name:{get:function(){return this._name}},modelName:{get:function(){return this._modelName}},sublayers:{get:function(){return this._sublayers}},visibility:{get:function(){return this._visibility},set:function(e){if(this._visibility!==e){this._visibility=e;for(let t=0;t<this._i3sLayers.length;t++)this._i3sLayers[t]._updateVisibility()}}},show:{get:function(){return this._visibility&&this._parent.show}}});aA._fromData=async function(e,t,n,i){let o=new aA(e,i,n);if(o._data.layerType==="group"){let r=o._data.sublayers;if(l(r)){let s=[];for(let c=0;c<r.length;c++){let d=aA._fromData(e,t,r[c],o);s.push(d)}let a=await Promise.all(s);for(let c=0;c<a.length;c++){let d=a[c];o._sublayers.push(d),o._i3sLayers.push(...d._i3sLayers)}}}else if(o._data.layerType==="3DObject"){let r=t.concat(`/sublayers/${o._data.id}`),s=new Ee({url:r});s.setQueryParameters(e.resource.queryParameters),s.appendForwardSlash(),o._resource=s;let a=await Ih.loadJson(o._resource),c=new aT(e,a,o);o._i3sLayers.push(c)}else console.log(`${o._data.layerType} layer ${o._data.name} is skipped as not supported.`);return o};var cA=aA;var FSe=S(vSe(),1);function ms(e){e=y(e,y.EMPTY_OBJECT),this._name=e.name,this._show=y(e.show,!0),this._geoidTiledTerrainProvider=e.geoidTiledTerrainProvider,this._showFeatures=y(e.showFeatures,!1),this._adjustMaterialAlphaMode=y(e.adjustMaterialAlphaMode,!1),this._applySymbology=y(e.applySymbology,!1),this._calculateNormals=y(e.calculateNormals,!1),this._cesium3dTilesetOptions=y(e.cesium3dTilesetOptions,y.EMPTY_OBJECT),this._layers=[],this._sublayers=[],this._data=void 0,this._extent=void 0,this._geoidDataPromise=void 0,this._geoidDataList=void 0,this._decoderTaskProcessor=void 0,this._taskProcessorReadyPromise=void 0,this._attributeStatistics=[],this._layersExtent=[]}Object.defineProperties(ms.prototype,{name:{get:function(){return this._name}},show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;for(let t=0;t<this._layers.length;t++)this._layers[t]._updateVisibility()}}},geoidTiledTerrainProvider:{get:function(){return this._geoidTiledTerrainProvider}},layers:{get:function(){return this._layers}},sublayers:{get:function(){return this._sublayers}},data:{get:function(){return this._data}},extent:{get:function(){return this._extent}},resource:{get:function(){return this._resource}},showFeatures:{get:function(){return this._showFeatures}},adjustMaterialAlphaMode:{get:function(){return this._adjustMaterialAlphaMode}},applySymbology:{get:function(){return this._applySymbology}},calculateNormals:{get:function(){return this._calculateNormals}}});ms.prototype.destroy=function(){for(let e=0;e<this._layers.length;e++)l(this._layers[e]._tileset)&&this._layers[e]._tileset.destroy();return me(this)};ms.prototype.isDestroyed=function(){return!1};ms.prototype.update=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.update(e)};ms.prototype.prePassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.prePassesUpdate(e)};ms.prototype.postPassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.postPassesUpdate(e)};ms.prototype.updateForPass=function(e,t){for(let n=0;n<this._layers.length;n++)l(this._layers[n]._tileset)&&this._layers[n]._tileset.updateForPass(e,t)};function Gxt(e,t){let n=e.resource.getUrlComponent(),i="";return n.match(/layers\/\d/)?i=`${n}`.replace(/\/+$/,""):i=`${n}`.replace(/\/?$/,"/").concat(`layers/${t}`),i}async function wSe(e,t,n){if(t.layerType==="Building"){l(n.showFeatures)||(e._showFeatures=!0),l(n.adjustMaterialAlphaMode)||(e._adjustMaterialAlphaMode=!0),l(n.applySymbology)||(e._applySymbology=!0),l(n.calculateNormals)||(e._calculateNormals=!0);let i=Gxt(e,t.id);if(l(t.sublayers)){let o=[];for(let s=0;s<t.sublayers.length;s++){let a=cA._fromData(e,i,t.sublayers[s],e);o.push(a)}let r=await Promise.all(o);for(let s=0;s<r.length;s++){let a=r[s];e._sublayers.push(a),e._layers.push(...a._i3sLayers)}}if(l(t.statisticsHRef)){let o=i.concat(`/${t.statisticsHRef}`),r=new sA(e,o);await r.load(),e._attributeStatistics.push(r)}if(l(t.fullExtent)){let o=ce.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax);e._layersExtent.push(o)}}else if(t.layerType==="3DObject"||t.layerType==="IntegratedMesh"){!l(n.calculateNormals)&&!l(t.textureSetDefinitions)&&(e._calculateNormals=!0);let i=new aT(e,t,e);e._layers.push(i),l(i._extent)&&e._layersExtent.push(i._extent)}else console.log(`${t.layerType} layer ${t.name} is skipped as not supported.`)}ms.fromUrl=async function(e,t){t=y(t,y.EMPTY_OBJECT);let n=Ee.createIfNeeded(e);n.setQueryParameters({f:"pjson"},!0);let i=await ms.loadJson(n),o=new ms(t);if(o._resource=n,o._data=i,l(i.layers)){let s=[];for(let a=0;a<i.layers.length;a++){let c=wSe(o,i.layers[a],t);s.push(c)}await Promise.all(s)}else await wSe(o,i,t);o._computeExtent();let r=[];for(let s=0;s<o._layers.length;s++)r.push(o._layers[s].load(t.cesium3dTilesetOptions));return await Promise.all(r),o};ms._fetchJson=function(e){return e.fetchJson()};ms.loadJson=async function(e){let t=await ms._fetchJson(e);if(l(t.error)){if(console.error("Failed to fetch I3S ",e.url),l(t.error.message)&&console.error(t.error.message),l(t.error.details))for(let n=0;n<t.error.details.length;n++)console.log(t.error.details[n]);throw new ue(t.error)}return t};ms.prototype._loadBinary=async function(e){let t=await e.fetchArrayBuffer();if(t.byteLength>0&&new Uint8Array(t)[0]===123&&new TextDecoder().decode(t).includes("404"))throw new ue(`Failed to load binary: ${e.url}`);return t};ms.prototype._binarizeGltf=function(e){let n=new TextEncoder().encode(JSON.stringify(e)),i=new Uint8Array(n.byteLength+20),o={magic:new Uint8Array(i.buffer,0,4),version:new Uint32Array(i.buffer,4,1),length:new Uint32Array(i.buffer,8,1),chunkLength:new Uint32Array(i.buffer,12,1),chunkType:new Uint32Array(i.buffer,16,1),chunkData:new Uint8Array(i.buffer,20,n.byteLength)};return o.magic[0]=103,o.magic[1]=108,o.magic[2]=84,o.magic[3]=70,o.version[0]=2,o.length[0]=i.byteLength,o.chunkLength[0]=n.byteLength,o.chunkType[0]=1313821514,o.chunkData.set(n),i};var Ext=new D;function Wxt(e,t){let n=e.tilingScheme,i=[],o={},r=e._lodCount,s=he.fromRadians(t.west,t.north),a=he.fromRadians(t.east,t.south),c=n.positionToTileXY(s,r),d=n.positionToTileXY(a,r);for(let m=c.x;m<=d.x;m++)for(let p=c.y;p<=d.y;p++){let g=D.fromElements(m,p,Ext),f=g.toString();if(!o.hasOwnProperty(f)){let x={x:g.x,y:g.y,level:r,tilingScheme:n,terrainProvider:e,positions:[]};o[f]=x,i.push(x)}}let u=[];for(let m=0;m<i.length;++m){let p=i[m],g=p.terrainProvider.requestTileGeometry(p.x,p.y,p.level);u.push(g)}return Promise.all(u).then(function(m){let p=[];for(let g=0;g<m.length;g++){let f={tilingScheme:n,x:i[g].x,y:i[g].y,level:i[g].level},x=m[g],_="Geographic";n._projection instanceof Zi&&(_="WebMercator");let C={projectionType:_,projection:n._projection,nativeExtent:n.tileXYToNativeRectangle(f.x,f.y,f.level),height:x._height,width:x._width,scale:x._structure.heightScale,offset:x._structure.heightOffset};if(x._encoding===zu.LERC){let V=FSe.default.decode(x._buffer);C.buffer=V.pixels[0]}else C.buffer=x._buffer;p.push(C)}return p})}async function Ixt(e){let t=e._geoidTiledTerrainProvider;if(l(t))try{let n=await Wxt(t,e._extent);e._geoidDataList=n}catch{console.log("Error retrieving Geoid Terrain tiles - no geoid conversion will be performed.")}}ms.prototype.loadGeoidData=async function(){return l(this._geoidDataPromise)?this._geoidDataPromise:(this._geoidDataPromise=Ixt(this),this._geoidDataPromise)};ms.prototype._computeExtent=function(){let e;for(let t=0;t<this._layersExtent.length;t++){let n=this._layersExtent[t];l(e)?ce.union(e,n,e):e=ce.clone(n)}this._extent=e};ms.prototype.getAttributeNames=function(){let e=[];for(let t=0;t<this._attributeStatistics.length;++t)e.push(...this._attributeStatistics[t].names);return e};ms.prototype.getAttributeValues=function(e){for(let t=0;t<this._attributeStatistics.length;++t){let n=this._attributeStatistics[t]._getValues(e);if(l(n))return n}return[]};ms.prototype.filterByAttributes=function(e){let t=[];for(let n=0;n<this._layers.length;n++){let i=this._layers[n].filterByAttributes(e);t.push(i)}return Promise.all(t)};var Ih=ms;var Jji=S(T(),1);function ASe(){}Object.defineProperties(ASe.prototype,{color:{get:fe.throwInstantiationError},intensity:{get:fe.throwInstantiationError}});var b7=ASe;var n8i=S(T(),1);var Xxt=/\/$/,MSe=new Vt('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function gZ(e){e=y(e,y.EMPTY_OBJECT);let t=e.styleId,n=e.accessToken;this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=Ee.createIfNeeded(y(e.url,"https://api.mapbox.com/styles/v1/"));this._styleId=t,this._accessToken=n;let o=y(e.tilesize,512);this._tilesize=o;let r=y(e.username,"mapbox");this._username=r;let s=l(e.scaleFactor)?"@2x":"",a=i.getUrlComponent();Xxt.test(a)||(a+="/"),a+=`${this._username}/${t}/tiles/${this._tilesize}/{z}/{x}/{y}${s}`,i.url=a,i.setQueryParameters({access_token:n});let c;l(e.credit)?(c=e.credit,typeof c=="string"&&(c=new Vt(c))):c=MSe,this._resource=i,this._imageryProvider=new va({url:i,credit:c,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(gZ.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});gZ.prototype.getTileCredits=function(e,t,n){};gZ.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};gZ.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};gZ._defaultCredit=MSe;var g7=gZ;var o8i=S(T(),1);function y7(e){}y7.prototype.isReady=function(){return!0};y7.prototype.shouldDiscardImage=function(e){return!1};var x7=y7;var h8i=S(T(),1);var Pxt=new Vt("MapQuest, Open Street Map and contributors, CC-BY-SA");function AB(e){e=y(e,y.EMPTY_OBJECT);let t=Ee.createIfNeeded(y(e.url,"https://tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+=`{z}/{x}/{y}${e.retinaTiles?"@2x":""}.${y(e.fileExtension,"png")}`;let n=new jr({ellipsoid:e.ellipsoid}),i=256,o=256,r=y(e.minimumLevel,0),s=e.maximumLevel,a=y(e.rectangle,n.rectangle),c=n.positionToTileXY(ce.southwest(a),r),d=n.positionToTileXY(ce.northeast(a),r),u=(Math.abs(d.x-c.x)+1)*(Math.abs(d.y-c.y)+1),m=y(e.credit,Pxt);typeof m=="string"&&(m=new Vt(m)),va.call(this,{url:t,credit:m,tilingScheme:n,tileWidth:i,tileHeight:o,minimumLevel:r,maximumLevel:s,rectangle:a})}l(Object.create)&&(AB.prototype=Object.create(va.prototype),AB.prototype.constructor=AB);var u0=AB;var _8i=S(T(),1);var vxt=new D(1,1);function _7(e){e=y(e,y.EMPTY_OBJECT),this.mass=y(e.mass,1),this.position=h.clone(y(e.position,h.ZERO)),this.velocity=h.clone(y(e.velocity,h.ZERO)),this.life=y(e.life,Number.MAX_VALUE),this.image=e.image,this.startColor=Y.clone(y(e.startColor,Y.WHITE)),this.endColor=Y.clone(y(e.endColor,Y.WHITE)),this.startScale=y(e.startScale,1),this.endScale=y(e.endScale,1),this.imageSize=D.clone(y(e.imageSize,vxt)),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(_7.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var NSe=new h;_7.prototype.update=function(e,t){return h.multiplyByScalar(this.velocity,e,NSe),h.add(this.position,NSe,this.position),l(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life};var yZ=_7;var C8i=S(T(),1);function USe(e){e=y(e,y.EMPTY_OBJECT),this.time=y(e.time,0),this.minimum=y(e.minimum,0),this.maximum=y(e.maximum,50),this._complete=!1}Object.defineProperties(USe.prototype,{complete:{get:function(){return this._complete}}});var S7=USe;var L8i=S(T(),1);function kSe(e){}kSe.prototype.emit=function(e){fe.throwInstantiationError()};var T7=kSe;var k8i=S(T(),1);var DSe=new D(1,1);function lA(e){e=y(e,y.EMPTY_OBJECT),this.show=y(e.show,!0),this.updateCallback=e.updateCallback,this.loop=y(e.loop,!0),this.image=y(e.image,void 0);let t=e.emitter;l(t)||(t=new J9(.5)),this._emitter=t,this._bursts=e.bursts,this._modelMatrix=A.clone(y(e.modelMatrix,A.IDENTITY)),this._emitterModelMatrix=A.clone(y(e.emitterModelMatrix,A.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new A,this._startColor=Y.clone(y(e.color,y(e.startColor,Y.WHITE))),this._endColor=Y.clone(y(e.color,y(e.endColor,Y.WHITE))),this._startScale=y(e.scale,y(e.startScale,1)),this._endScale=y(e.scale,y(e.endScale,1)),this._emissionRate=y(e.emissionRate,5),this._minimumSpeed=y(e.speed,y(e.minimumSpeed,1)),this._maximumSpeed=y(e.speed,y(e.maximumSpeed,1)),this._minimumParticleLife=y(e.particleLife,y(e.minimumParticleLife,5)),this._maximumParticleLife=y(e.particleLife,y(e.maximumParticleLife,5)),this._minimumMass=y(e.mass,y(e.minimumMass,1)),this._maximumMass=y(e.mass,y(e.maximumMass,1)),this._minimumImageSize=D.clone(y(e.imageSize,y(e.minimumImageSize,DSe))),this._maximumImageSize=D.clone(y(e.imageSize,y(e.maximumImageSize,DSe))),this._sizeInMeters=y(e.sizeInMeters,!1),this._lifetime=y(e.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new ge,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}Object.defineProperties(lA.prototype,{emitter:{get:function(){return this._emitter},set:function(e){this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!A.equals(this._modelMatrix,e),A.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!A.equals(this._emitterModelMatrix,e),A.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){Y.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){Y.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){this._maximumSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){this._maximumImageSize=e}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters=e}},lifetime:{get:function(){return this._lifetime},set:function(e){this._lifetime=e}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});function wxt(e){let t=e._emissionRate,n=e._maximumParticleLife,i=0,o=e._bursts;if(l(o)){let m=o.length;for(let p=0;p<m;++p)i+=o[p].maximum}let r=e._billboardCollection,s=e.image,a=Math.ceil(t*n+i),c=e._particles,d=e._particlePool,u=Math.max(a-c.length-d.length,0);for(let m=0;m<u;++m){let p=new yZ;p._billboard=r.add({image:s,show:!1}),d.push(p)}e._particleEstimate=a}function Fxt(e){let t=e._particlePool.pop();return l(t)||(t=new yZ),t}function Axt(e,t){e._particlePool.push(t)}function Mxt(e){let t=e._particles,n=e._particlePool,i=e._billboardCollection,o=t.length,r=n.length,s=e._particleEstimate,a=r-Math.max(s-o-r,0);for(let c=a;c<r;++c){let d=n[c];i.remove(d._billboard)}n.length=a}function Nxt(e){l(e._billboard)&&(e._billboard.show=!1)}function BSe(e,t){let n=t._billboard;l(n)||(n=t._billboard=e._billboardCollection.add({image:t.image})),n.width=t.imageSize.x,n.height=t.imageSize.y,n.position=t.position,n.sizeInMeters=e.sizeInMeters,n.show=!0;let i=X.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),o=X.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),r=X.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),s=X.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);n.color=new Y(i,o,r,s),n.scale=X.lerp(t.startScale,t.endScale,t.normalizedAge)}function Uxt(e,t){t.startColor=Y.clone(e._startColor,t.startColor),t.endColor=Y.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=X.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=X.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=X.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=X.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t._normalizedAge=0,t._age=0;let n=X.randomBetween(e._minimumSpeed,e._maximumSpeed);h.multiplyByScalar(t.velocity,n,t.velocity),e._particles.push(t)}function kxt(e,t){if(e._isComplete)return 0;t=X.mod(t,e._lifetime);let n=t*e._emissionRate,i=Math.floor(n);if(e._carryOver+=n-i,e._carryOver>1&&(i++,e._carryOver-=1),l(e.bursts)){let o=e.bursts.length;for(let r=0;r<o;r++){let s=e.bursts[r],a=e._currentTime;l(s)&&!s._complete&&a>s.time&&(i+=X.randomBetween(s.minimum,s.maximum),s._complete=!0)}}return i}var MB=new h;lA.prototype.update=function(e){if(!this.show)return;l(this._billboardCollection)||(this._billboardCollection=new gd),this._updateParticlePool&&(wxt(this),this._updateParticlePool=!1);let t=0;this._previousTime&&(t=ne.secondsDifference(e.time,this._previousTime)),t<0&&(t=0);let n=this._particles,i=this._emitter,o=this.updateCallback,r,s,a=n.length;for(r=0;r<a;++r)s=n[r],s.update(t,o)?BSe(this,s):(Nxt(s),Axt(this,s),n[r]=n[a-1],--r,--a);n.length=a;let c=kxt(this,t);if(c>0&&l(i)){this._matrixDirty&&(this._combinedMatrix=A.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);let d=this._combinedMatrix;for(r=0;r<c;r++)s=Fxt(this),this._emitter.emit(s),h.add(s.position,s.velocity,MB),A.multiplyByPoint(d,MB,MB),s.position=A.multiplyByPoint(d,s.position,s.position),h.subtract(MB,s.position,s.velocity),h.normalize(s.velocity,s.velocity),Uxt(this,s),BSe(this,s)}if(this._billboardCollection.update(e),this._previousTime=ne.clone(e.time,this._previousTime),this._currentTime+=t,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=X.mod(this._currentTime,this._lifetime),this.bursts){let d=this.bursts.length;for(r=0;r<d;r++)this.bursts[r]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%120===0&&Mxt(this)};lA.prototype.isDestroyed=function(){return!1};lA.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),me(this)};var C7=lA;var E7i=S(T(),1);var zSe=S(SM(),1);var B8i=S(T(),1);function Dxt(e,t,n){return` float clipDistance = clip(gl_FragCoord, ${e}, ${t}); vec4 clippingPlanesEdgeColor = vec4(1.0); clippingPlanesEdgeColor.rgb = ${n}.rgb; float clippingPlanesEdgeWidth = ${n}.a; @@ -15576,7 +15680,7 @@ void main() { out_FragColor = clippingPlanesEdgeColor; } -`}var lA=Kxt;var Y8i=T(S(),1);var Jxt={modifyFragmentShader:function(t){return t=Ye.replaceMain(t,"czm_splitter_main"),t+=`uniform float czm_splitDirection; +`}var dA=Dxt;var z8i=S(T(),1);var Bxt={modifyFragmentShader:function(t){return t=Ye.replaceMain(t,"czm_splitter_main"),t+=`uniform float czm_splitDirection; void main() { #ifndef SHADOW_MAP @@ -15585,9 +15689,9 @@ void main() #endif czm_splitter_main(); } -`,t},addUniforms:function(t,n){n.czm_splitDirection=function(){return t.splitDirection}}},xL=Jxt;var lS={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function dA(e){this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=Y.clone(Y.DARKGRAY),this._highlightColor=Y.clone(Y.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=lS.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=y(e.opaquePass,Re.OPAQUE),this._cull=y(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=M.clone(M.IDENTITY),this._modelMatrix=M.clone(M.IDENTITY),this.time=0,this.shadows=xn.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,this.splitDirection=y(e.splitDirection,zc.NONE),this._splittingEnabled=!1,this._error=void 0,Qxt(this,e)}Object.defineProperties(dA.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},color:{get:function(){return Y.clone(this._highlightColor)},set:function(e){this._highlightColor=Y.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(l(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=le.clone(e,this._boundingSphere)}}});function Qxt(e,t){let n=m_.parse(t.arrayBuffer,t.byteOffset);if(e._parsedContent=n,e._rtcCenter=n.rtcCenter,e._hasNormals=n.hasNormals,e._hasColors=n.hasColors,e._hasBatchIds=n.hasBatchIds,e._isTranslucent=n.isTranslucent,!n.hasBatchIds&&l(n.batchTableBinary)&&(n.styleableProperties=Xp.getBinaryProperties(n.pointsLength,n.batchTableJson,n.batchTableBinary)),l(n.draco)){let a=n.draco;e._decodingState=lS.NEEDS_DECODE,a.dequantizeInShader=e._dequantizeInShader}let i=n.positions;l(i)&&(e._isQuantized=i.isQuantized,e._quantizedVolumeScale=i.quantizedVolumeScale,e._quantizedVolumeOffset=i.quantizedVolumeOffset,e._quantizedRange=i.quantizedRange);let o=n.normals;l(o)&&(e._isOctEncoded16P=o.octEncoded);let r=n.colors;l(r)&&(l(r.constantColor)&&(e._constantColor=Y.clone(r.constantColor,e._constantColor),e._hasColors=!1),e._isRGB565=r.isRGB565);let s=n.batchIds;l(n.batchIds)&&(s.name="BATCH_ID",s.semantic="BATCH_ID",s.setIndex=void 0),n.hasBatchIds&&e._batchTableLoaded(n.batchLength,n.batchTableJson,n.batchTableBinary),e._pointsLength=n.pointsLength}var jxt=new h,qxt=new h,$xt=new h,NTe,M3;function e_t(e){if(!l(M3)){NTe=new UTe.default(0),M3=new Array(e);for(let t=0;t<e;++t)M3[t]=NTe.random()}return M3}function t_t(e){let n=e.length/3,i=Math.min(n,20),o=e_t(20),r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=h.fromElements(r,r,r,jxt),c=h.fromElements(s,s,s,qxt);for(let u=0;u<i;++u){let m=Math.floor(o[u]*n),p=h.unpack(e,m*3,$xt);h.minimumByComponent(a,p,a),h.maximumByComponent(c,p,c)}let d=le.fromCornerPoints(a,c);return d.radius+=W.EPSILON2,d}function kTe(e,t){let n=Q.fromTypedArray(e);return n===Q.INT||n===Q.UNSIGNED_INT||n===Q.DOUBLE?(At("Cast pnts property to floats",`Point cloud property "${t}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`),new Float32Array(e)):e}var n_t=new se,i_t=new se,o_t=new Y,DTe=0,N3=1,E7=2,BTe=3,r_t=4,L7=new M,s_t=new M;function a_t(e,t){let n=t.context,i=e._parsedContent,o=e._pointsLength,r=i.positions,s=i.colors,a=i.normals,c=i.batchIds,d=i.styleableProperties,u=l(d),m=e._isQuantized,p=e._isQuantizedDraco,g=e._isOctEncoded16P,f=e._isOctEncodedDraco,x=e._quantizedRange,_=e._octEncodedRange,C=e._isRGB565,V=e._isTranslucent,L=e._hasColors,Z=e._hasNormals,G=e._hasBatchIds,X,v,P=[],F={};if(e._styleableShaderAttributes=F,u){let U=r_t;for(let O in d)if(d.hasOwnProperty(O)){let k=d[O],J=kTe(k.typedArray,O);X=k.componentCount,v=Q.fromTypedArray(J);let H=ft.createVertexBuffer({context:n,typedArray:J,usage:Ne.STATIC_DRAW});e._geometryByteLength+=H.sizeInBytes;let ee={index:U,vertexBuffer:H,componentsPerAttribute:X,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0};P.push(ee),F[O]={location:U,componentCount:X},++U}}let A=ft.createVertexBuffer({context:n,typedArray:r.typedArray,usage:Ne.STATIC_DRAW});e._geometryByteLength+=A.sizeInBytes;let b;L&&(b=ft.createVertexBuffer({context:n,typedArray:s.typedArray,usage:Ne.STATIC_DRAW}),e._geometryByteLength+=b.sizeInBytes);let R;Z&&(R=ft.createVertexBuffer({context:n,typedArray:a.typedArray,usage:Ne.STATIC_DRAW}),e._geometryByteLength+=R.sizeInBytes);let E;G&&(c.typedArray=kTe(c.typedArray,"batchIds"),E=ft.createVertexBuffer({context:n,typedArray:c.typedArray,usage:Ne.STATIC_DRAW}),e._geometryByteLength+=E.sizeInBytes);let I=[];if(m?v=Q.UNSIGNED_SHORT:p?v=x<=255?Q.UNSIGNED_BYTE:Q.UNSIGNED_SHORT:v=Q.FLOAT,I.push({index:DTe,vertexBuffer:A,componentsPerAttribute:3,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(m||p?e._boundingSphere=le.fromCornerPoints(h.ZERO,e._quantizedVolumeScale):e._boundingSphere=t_t(r.typedArray)),L)if(C)I.push({index:N3,vertexBuffer:b,componentsPerAttribute:1,componentDatatype:Q.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{let U=V?4:3;I.push({index:N3,vertexBuffer:b,componentsPerAttribute:U,componentDatatype:Q.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}Z&&(g?(X=2,v=Q.UNSIGNED_BYTE):f?(X=2,v=_<=255?Q.UNSIGNED_BYTE:Q.UNSIGNED_SHORT):(X=3,v=Q.FLOAT),I.push({index:E7,vertexBuffer:R,componentsPerAttribute:X,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0})),G&&I.push({index:BTe,vertexBuffer:E,componentsPerAttribute:1,componentDatatype:Q.fromTypedArray(c.typedArray),normalize:!1,offsetInBytes:0,strideInBytes:0}),u&&(I=I.concat(P));let w=new ei({context:n,attributes:I}),N={depthTest:{enabled:!0}},B={depthTest:{enabled:!0},depthMask:!1,blending:un.ALPHA_BLEND};e._opaquePass===Re.CESIUM_3D_TILE&&(N.stencilTest=Nt.setCesium3DTileBit(),N.stencilMask=Nt.CESIUM_3D_TILE_MASK,B.stencilTest=Nt.setCesium3DTileBit(),B.stencilMask=Nt.CESIUM_3D_TILE_MASK),e._opaqueRenderState=De.fromCache(N),e._translucentRenderState=De.fromCache(B),e._drawCommand=new et({boundingVolume:new le,cull:e._cull,modelMatrix:new M,primitiveType:Fe.POINTS,vertexArray:w,count:o,shaderProgram:void 0,uniformMap:void 0,renderState:V?e._translucentRenderState:e._opaqueRenderState,pass:V?Re.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function c_t(e,t){let n=t.context,i=e._isQuantized,o=e._isQuantizedDraco,r=e._isOctEncodedDraco,s={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){let a=n_t;if(a.x=e._attenuation?e.maximumAttenuation:e._pointSize,a.x*=t.pixelRatio,a.y=e.time,e._attenuation){let c=t.camera.frustum,d;t.mode===oe.SCENE2D||c instanceof sn?d=Number.POSITIVE_INFINITY:d=n.drawingBufferHeight/t.camera.frustum.sseDenominator,a.z=e.geometricError*e.geometricErrorScale,a.w=d}return a},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){let a=e.clippingPlanes;return e.isClipped?a.texture:n.defaultTexture},u_clippingPlanesEdgeStyle:function(){let a=e.clippingPlanes;if(!l(a))return Y.TRANSPARENT;let c=Y.clone(a.edgeColor,o_t);return c.alpha=a.edgeWidth,c},u_clippingPlanesMatrix:function(){let a=e.clippingPlanes;if(!l(a))return M.IDENTITY;let c=y(e.clippingPlanesOriginMatrix,e._modelMatrix);M.multiply(n.uniformState.view3D,c,L7);let d=M.multiply(L7,a.modelMatrix,L7);return M.inverseTranspose(d,s_t)}};xL.addUniforms(e,s),(i||o||r)&&(s=xt(s,{u_quantizedVolumeScaleAndOctEncodedRange:function(){let a=i_t;if(l(e._quantizedVolumeScale)){let c=h.clone(e._quantizedVolumeScale,a);h.divideByScalar(c,e._quantizedRange,a)}return a.w=e._octEncodedRange,a}})),l(e._uniformMapLoaded)&&(s=e._uniformMapLoaded(s)),e._drawCommand.uniformMap=s}function R7(e,t){let n=/czm_3dtiles_property_(\d+)/g,i=n.exec(e);for(;i!==null;){let o=parseInt(i[1]);t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function Z7(e,t){e=e.slice(e.indexOf(` -`));let n=/czm_3dtiles_builtin_property_(\w+)/g,i=n.exec(e);for(;i!==null;){let o=i[1];t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function G7(e,t){let n=e.numberOfAttributes;for(let i=0;i<n;++i){let o=e.getAttribute(i);if(o.index===t)return o}}var l_t={POSITION:"czm_3dtiles_builtin_property_POSITION",POSITION_ABSOLUTE:"czm_3dtiles_builtin_property_POSITION_ABSOLUTE",COLOR:"czm_3dtiles_builtin_property_COLOR",NORMAL:"czm_3dtiles_builtin_property_NORMAL"};function d_t(e,t,n){let i,o,r,s=t.context,a=l(n),c=e._isQuantized,d=e._isQuantizedDraco,u=e._isOctEncoded16P,m=e._isOctEncodedDraco,p=e._isRGB565,g=e._isTranslucent,f=e._hasColors,x=e._hasNormals,_=e._hasBatchIds,C=e._backFaceCulling,V=e._normalShading,L=e._drawCommand.vertexArray,Z=e.clippingPlanes,G=e._attenuation,X,v,P,F=g,A=Oe(l_t),b={},R=e._styleableShaderAttributes;for(o in R)R.hasOwnProperty(o)&&(r=R[o],A[o]=`czm_3dtiles_property_${r.location}`,b[r.location]=r);if(a){let ae={translucent:!1},ye="(vec3 czm_3dtiles_builtin_property_POSITION, vec3 czm_3dtiles_builtin_property_POSITION_ABSOLUTE, vec4 czm_3dtiles_builtin_property_COLOR, vec3 czm_3dtiles_builtin_property_NORMAL)";X=n.getColorShaderFunction(`getColorFromStyle${ye}`,A,ae),v=n.getShowShaderFunction(`getShowFromStyle${ye}`,A,ae),P=n.getPointSizeShaderFunction(`getPointSizeFromStyle${ye}`,A,ae),l(X)&&ae.translucent&&(F=!0)}e._styleTranslucent=F;let E=l(X),I=l(v),w=l(P),N=e.isClipped,B=[],U=[];E&&(R7(X,B),Z7(X,U)),I&&(R7(v,B),Z7(v,U)),w&&(R7(P,B),Z7(P,U));let O=U.indexOf("COLOR")>=0,k=U.indexOf("NORMAL")>=0;if(k&&!x)throw new ue("Style references the NORMAL semantic but the point cloud does not have normals");for(o in R)if(R.hasOwnProperty(o)){r=R[o];let ae=B.indexOf(r.location)>=0,ye=G7(L,r.location);ye.enabled=ae}let J=f&&(!E||O);if(f){let ae=G7(L,N3);ae.enabled=J}let H=x&&(V||C||k);if(x){let ae=G7(L,E7);ae.enabled=H}let ee={a_position:DTe};J&&(ee.a_color=N3),H&&(ee.a_normal=E7),_&&(ee.a_batchId=BTe);let z="",j=B.length;for(i=0;i<j;++i){let ae=B[i];r=b[ae];let ye=r.componentCount,Se=`czm_3dtiles_property_${ae}`,Le;ye===1?Le="float":Le=`vec${ye}`,z+=`in ${Le} ${Se}; -`,ee[Se]=r.location}c_t(e,t);let q=`in vec3 a_position; +`,t},addUniforms:function(t,n){n.czm_splitDirection=function(){return t.splitDirection}}},xZ=Bxt;var cT={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function uA(e){this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=Y.clone(Y.DARKGRAY),this._highlightColor=Y.clone(Y.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=cT.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=y(e.opaquePass,Le.OPAQUE),this._cull=y(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=A.clone(A.IDENTITY),this._modelMatrix=A.clone(A.IDENTITY),this.time=0,this.shadows=xn.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,this.splitDirection=y(e.splitDirection,zc.NONE),this._splittingEnabled=!1,this._error=void 0,Yxt(this,e)}Object.defineProperties(uA.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},color:{get:function(){return Y.clone(this._highlightColor)},set:function(e){this._highlightColor=Y.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(l(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=le.clone(e,this._boundingSphere)}}});function Yxt(e,t){let n=u_.parse(t.arrayBuffer,t.byteOffset);if(e._parsedContent=n,e._rtcCenter=n.rtcCenter,e._hasNormals=n.hasNormals,e._hasColors=n.hasColors,e._hasBatchIds=n.hasBatchIds,e._isTranslucent=n.isTranslucent,!n.hasBatchIds&&l(n.batchTableBinary)&&(n.styleableProperties=Ep.getBinaryProperties(n.pointsLength,n.batchTableJson,n.batchTableBinary)),l(n.draco)){let a=n.draco;e._decodingState=cT.NEEDS_DECODE,a.dequantizeInShader=e._dequantizeInShader}let i=n.positions;l(i)&&(e._isQuantized=i.isQuantized,e._quantizedVolumeScale=i.quantizedVolumeScale,e._quantizedVolumeOffset=i.quantizedVolumeOffset,e._quantizedRange=i.quantizedRange);let o=n.normals;l(o)&&(e._isOctEncoded16P=o.octEncoded);let r=n.colors;l(r)&&(l(r.constantColor)&&(e._constantColor=Y.clone(r.constantColor,e._constantColor),e._hasColors=!1),e._isRGB565=r.isRGB565);let s=n.batchIds;l(n.batchIds)&&(s.name="BATCH_ID",s.semantic="BATCH_ID",s.setIndex=void 0),n.hasBatchIds&&e._batchTableLoaded(n.batchLength,n.batchTableJson,n.batchTableBinary),e._pointsLength=n.pointsLength}var Oxt=new h,zxt=new h,Kxt=new h,YSe,NB;function Hxt(e){if(!l(NB)){YSe=new zSe.default(0),NB=new Array(e);for(let t=0;t<e;++t)NB[t]=YSe.random()}return NB}function Jxt(e){let n=e.length/3,i=Math.min(n,20),o=Hxt(20),r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=h.fromElements(r,r,r,Oxt),c=h.fromElements(s,s,s,zxt);for(let u=0;u<i;++u){let m=Math.floor(o[u]*n),p=h.unpack(e,m*3,Kxt);h.minimumByComponent(a,p,a),h.maximumByComponent(c,p,c)}let d=le.fromCornerPoints(a,c);return d.radius+=X.EPSILON2,d}function OSe(e,t){let n=Q.fromTypedArray(e);return n===Q.INT||n===Q.UNSIGNED_INT||n===Q.DOUBLE?(At("Cast pnts property to floats",`Point cloud property "${t}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`),new Float32Array(e)):e}var Qxt=new se,jxt=new se,qxt=new Y,KSe=0,UB=1,G7=2,HSe=3,$xt=4,V7=new A,e_t=new A;function t_t(e,t){let n=t.context,i=e._parsedContent,o=e._pointsLength,r=i.positions,s=i.colors,a=i.normals,c=i.batchIds,d=i.styleableProperties,u=l(d),m=e._isQuantized,p=e._isQuantizedDraco,g=e._isOctEncoded16P,f=e._isOctEncodedDraco,x=e._quantizedRange,_=e._octEncodedRange,C=e._isRGB565,V=e._isTranslucent,Z=e._hasColors,R=e._hasNormals,G=e._hasBatchIds,W,v,P=[],F={};if(e._styleableShaderAttributes=F,u){let k=$xt;for(let O in d)if(d.hasOwnProperty(O)){let U=d[O],J=OSe(U.typedArray,O);W=U.componentCount,v=Q.fromTypedArray(J);let z=ft.createVertexBuffer({context:n,typedArray:J,usage:Ne.STATIC_DRAW});e._geometryByteLength+=z.sizeInBytes;let ee={index:k,vertexBuffer:z,componentsPerAttribute:W,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0};P.push(ee),F[O]={location:k,componentCount:W},++k}}let M=ft.createVertexBuffer({context:n,typedArray:r.typedArray,usage:Ne.STATIC_DRAW});e._geometryByteLength+=M.sizeInBytes;let b;Z&&(b=ft.createVertexBuffer({context:n,typedArray:s.typedArray,usage:Ne.STATIC_DRAW}),e._geometryByteLength+=b.sizeInBytes);let L;R&&(L=ft.createVertexBuffer({context:n,typedArray:a.typedArray,usage:Ne.STATIC_DRAW}),e._geometryByteLength+=L.sizeInBytes);let E;G&&(c.typedArray=OSe(c.typedArray,"batchIds"),E=ft.createVertexBuffer({context:n,typedArray:c.typedArray,usage:Ne.STATIC_DRAW}),e._geometryByteLength+=E.sizeInBytes);let I=[];if(m?v=Q.UNSIGNED_SHORT:p?v=x<=255?Q.UNSIGNED_BYTE:Q.UNSIGNED_SHORT:v=Q.FLOAT,I.push({index:KSe,vertexBuffer:M,componentsPerAttribute:3,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(m||p?e._boundingSphere=le.fromCornerPoints(h.ZERO,e._quantizedVolumeScale):e._boundingSphere=Jxt(r.typedArray)),Z)if(C)I.push({index:UB,vertexBuffer:b,componentsPerAttribute:1,componentDatatype:Q.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{let k=V?4:3;I.push({index:UB,vertexBuffer:b,componentsPerAttribute:k,componentDatatype:Q.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}R&&(g?(W=2,v=Q.UNSIGNED_BYTE):f?(W=2,v=_<=255?Q.UNSIGNED_BYTE:Q.UNSIGNED_SHORT):(W=3,v=Q.FLOAT),I.push({index:G7,vertexBuffer:L,componentsPerAttribute:W,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0})),G&&I.push({index:HSe,vertexBuffer:E,componentsPerAttribute:1,componentDatatype:Q.fromTypedArray(c.typedArray),normalize:!1,offsetInBytes:0,strideInBytes:0}),u&&(I=I.concat(P));let w=new ei({context:n,attributes:I}),N={depthTest:{enabled:!0}},B={depthTest:{enabled:!0},depthMask:!1,blending:un.ALPHA_BLEND};e._opaquePass===Le.CESIUM_3D_TILE&&(N.stencilTest=Nt.setCesium3DTileBit(),N.stencilMask=Nt.CESIUM_3D_TILE_MASK,B.stencilTest=Nt.setCesium3DTileBit(),B.stencilMask=Nt.CESIUM_3D_TILE_MASK),e._opaqueRenderState=De.fromCache(N),e._translucentRenderState=De.fromCache(B),e._drawCommand=new tt({boundingVolume:new le,cull:e._cull,modelMatrix:new A,primitiveType:Fe.POINTS,vertexArray:w,count:o,shaderProgram:void 0,uniformMap:void 0,renderState:V?e._translucentRenderState:e._opaqueRenderState,pass:V?Le.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function n_t(e,t){let n=t.context,i=e._isQuantized,o=e._isQuantizedDraco,r=e._isOctEncodedDraco,s={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){let a=Qxt;if(a.x=e._attenuation?e.maximumAttenuation:e._pointSize,a.x*=t.pixelRatio,a.y=e.time,e._attenuation){let c=t.camera.frustum,d;t.mode===oe.SCENE2D||c instanceof sn?d=Number.POSITIVE_INFINITY:d=n.drawingBufferHeight/t.camera.frustum.sseDenominator,a.z=e.geometricError*e.geometricErrorScale,a.w=d}return a},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){let a=e.clippingPlanes;return e.isClipped?a.texture:n.defaultTexture},u_clippingPlanesEdgeStyle:function(){let a=e.clippingPlanes;if(!l(a))return Y.TRANSPARENT;let c=Y.clone(a.edgeColor,qxt);return c.alpha=a.edgeWidth,c},u_clippingPlanesMatrix:function(){let a=e.clippingPlanes;if(!l(a))return A.IDENTITY;let c=y(e.clippingPlanesOriginMatrix,e._modelMatrix);A.multiply(n.uniformState.view3D,c,V7);let d=A.multiply(V7,a.modelMatrix,V7);return A.inverseTranspose(d,e_t)}};xZ.addUniforms(e,s),(i||o||r)&&(s=xt(s,{u_quantizedVolumeScaleAndOctEncodedRange:function(){let a=jxt;if(l(e._quantizedVolumeScale)){let c=h.clone(e._quantizedVolumeScale,a);h.divideByScalar(c,e._quantizedRange,a)}return a.w=e._octEncodedRange,a}})),l(e._uniformMapLoaded)&&(s=e._uniformMapLoaded(s)),e._drawCommand.uniformMap=s}function Z7(e,t){let n=/czm_3dtiles_property_(\d+)/g,i=n.exec(e);for(;i!==null;){let o=parseInt(i[1]);t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function L7(e,t){e=e.slice(e.indexOf(` +`));let n=/czm_3dtiles_builtin_property_(\w+)/g,i=n.exec(e);for(;i!==null;){let o=i[1];t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function R7(e,t){let n=e.numberOfAttributes;for(let i=0;i<n;++i){let o=e.getAttribute(i);if(o.index===t)return o}}var i_t={POSITION:"czm_3dtiles_builtin_property_POSITION",POSITION_ABSOLUTE:"czm_3dtiles_builtin_property_POSITION_ABSOLUTE",COLOR:"czm_3dtiles_builtin_property_COLOR",NORMAL:"czm_3dtiles_builtin_property_NORMAL"};function o_t(e,t,n){let i,o,r,s=t.context,a=l(n),c=e._isQuantized,d=e._isQuantizedDraco,u=e._isOctEncoded16P,m=e._isOctEncodedDraco,p=e._isRGB565,g=e._isTranslucent,f=e._hasColors,x=e._hasNormals,_=e._hasBatchIds,C=e._backFaceCulling,V=e._normalShading,Z=e._drawCommand.vertexArray,R=e.clippingPlanes,G=e._attenuation,W,v,P,F=g,M=Oe(i_t),b={},L=e._styleableShaderAttributes;for(o in L)L.hasOwnProperty(o)&&(r=L[o],M[o]=`czm_3dtiles_property_${r.location}`,b[r.location]=r);if(a){let ae={translucent:!1},ye="(vec3 czm_3dtiles_builtin_property_POSITION, vec3 czm_3dtiles_builtin_property_POSITION_ABSOLUTE, vec4 czm_3dtiles_builtin_property_COLOR, vec3 czm_3dtiles_builtin_property_NORMAL)";W=n.getColorShaderFunction(`getColorFromStyle${ye}`,M,ae),v=n.getShowShaderFunction(`getShowFromStyle${ye}`,M,ae),P=n.getPointSizeShaderFunction(`getPointSizeFromStyle${ye}`,M,ae),l(W)&&ae.translucent&&(F=!0)}e._styleTranslucent=F;let E=l(W),I=l(v),w=l(P),N=e.isClipped,B=[],k=[];E&&(Z7(W,B),L7(W,k)),I&&(Z7(v,B),L7(v,k)),w&&(Z7(P,B),L7(P,k));let O=k.indexOf("COLOR")>=0,U=k.indexOf("NORMAL")>=0;if(U&&!x)throw new ue("Style references the NORMAL semantic but the point cloud does not have normals");for(o in L)if(L.hasOwnProperty(o)){r=L[o];let ae=B.indexOf(r.location)>=0,ye=R7(Z,r.location);ye.enabled=ae}let J=f&&(!E||O);if(f){let ae=R7(Z,UB);ae.enabled=J}let z=x&&(V||C||U);if(x){let ae=R7(Z,G7);ae.enabled=z}let ee={a_position:KSe};J&&(ee.a_color=UB),z&&(ee.a_normal=G7),_&&(ee.a_batchId=HSe);let K="",j=B.length;for(i=0;i<j;++i){let ae=B[i];r=b[ae];let ye=r.componentCount,Te=`czm_3dtiles_property_${ae}`,Ze;ye===1?Ze="float":Ze=`vec${ye}`,K+=`in ${Ze} ${Te}; +`,ee[Te]=r.location}n_t(e,t);let q=`in vec3 a_position; out vec4 v_color; uniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; uniform vec4 u_constantColor; @@ -15596,7 +15700,7 @@ uniform vec4 u_highlightColor; float tiles3d_tileset_time; `,G&&(q+=`float u_geometricError; float u_depthMultiplier; -`),q+=z,J&&(g?q+=`in vec4 a_color; +`),q+=K,J&&(g?q+=`in vec4 a_color; `:p?q+=`in float a_color; const float SHIFT_RIGHT_11 = 1.0 / 2048.0; const float SHIFT_RIGHT_5 = 1.0 / 32.0; @@ -15605,11 +15709,11 @@ const float SHIFT_LEFT_5 = 32.0; const float NORMALIZE_6 = 1.0 / 64.0; const float NORMALIZE_5 = 1.0 / 32.0; `:q+=`in vec3 a_color; -`),H&&(u||m?q+=`in vec2 a_normal; +`),z&&(u||m?q+=`in vec2 a_normal; `:q+=`in vec3 a_normal; `),_&&(q+=`in float a_batchId; `),(c||d||m)&&(q+=`uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; -`),E&&(q+=X),I&&(q+=v),w&&(q+=P),q+=`void main() +`),E&&(q+=W),I&&(q+=v),w&&(q+=P),q+=`void main() { u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; tiles3d_tileset_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; @@ -15629,7 +15733,7 @@ const float NORMALIZE_5 = 1.0 / 32.0; `,c||d?q+=` vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; `:q+=` vec3 position = a_position; `,q+=` vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); -`,H?(u?q+=` vec3 normal = czm_octDecode(a_normal); +`,z?(u?q+=` vec3 normal = czm_octDecode(a_normal); `:m?q+=` vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; `:q+=` vec3 normal = a_normal; `,q+=` vec3 normalEC = czm_normal * normal; @@ -15642,12 +15746,12 @@ const float NORMALIZE_5 = 1.0 / 32.0; gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); `:q+=` gl_PointSize = u_pointSize; `,q+=` color = color * u_highlightColor; -`,H&&V&&(q+=` float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); +`,z&&V&&(q+=` float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); diffuseStrength = max(diffuseStrength, 0.4); color.xyz *= diffuseStrength * czm_lightColor; `),q+=` v_color = color; gl_Position = czm_modelViewProjection * vec4(position, 1.0); -`,H&&C&&(q+=` float visible = step(-normalEC.z, 0.0); +`,z&&C&&(q+=` float visible = step(-normalEC.z, 0.0); gl_Position *= visible; gl_PointSize *= visible; `),I&&(q+=` gl_Position.w *= float(show); @@ -15658,13 +15762,13 @@ const float NORMALIZE_5 = 1.0 / 32.0; uniform mat4 u_clippingPlanesMatrix; uniform vec4 u_clippingPlanesEdgeStyle; `,be+=` -`,be+=K0(Z,s),be+=` +`,be+=Db(R,s),be+=` `),be+=`void main() { out_FragColor = czm_gammaCorrect(v_color); -`,N&&(be+=lA("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),be+=`} -`,e.splitDirection!==zc.NONE&&(be=xL.modifyFragmentShader(be)),l(e._vertexShaderLoaded)&&(q=e._vertexShaderLoaded(q)),l(e._fragmentShaderLoaded)&&(be=e._fragmentShaderLoaded(be));let Te=e._drawCommand;l(Te.shaderProgram)&&Te.shaderProgram.destroy(),Te.shaderProgram=qt.fromCache({context:s,vertexShaderSource:q,fragmentShaderSource:be,attributeLocations:ee});try{Te.shaderProgram._bind()}catch{throw new ue("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function u_t(e,t){if(e._decodingState===lS.READY)return!1;if(e._decodingState===lS.NEEDS_DECODE){let n=e._parsedContent,i=n.draco,o=Ap.decodePointCloud(i,t);l(o)&&(e._decodingState=lS.DECODING,o.then(function(r){e._decodingState=lS.READY;let s=l(r.POSITION)?r.POSITION.array:void 0,a=l(r.RGB)?r.RGB.array:void 0,c=l(r.RGBA)?r.RGBA.array:void 0,d=l(r.NORMAL)?r.NORMAL.array:void 0,u=l(r.BATCH_ID)?r.BATCH_ID.array:void 0,m=l(s)&&l(r.POSITION.data.quantization),p=l(d)&&l(r.NORMAL.data.quantization);if(m){let _=r.POSITION.data.quantization,C=_.range;e._quantizedVolumeScale=h.fromElements(C,C,C),e._quantizedVolumeOffset=h.unpack(_.minValues),e._quantizedRange=(1<<_.quantizationBits)-1,e._isQuantizedDraco=!0}p&&(e._octEncodedRange=(1<<r.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);let g=n.styleableProperties,f=i.batchTableProperties;for(let _ in f)if(f.hasOwnProperty(_)){let C=r[_];l(g)||(g={}),g[_]={typedArray:C.array,componentCount:C.data.componentsPerAttribute}}l(s)&&(n.positions={typedArray:s});let x=y(c,a);l(x)&&(n.colors={typedArray:x}),l(d)&&(n.normals={typedArray:d}),l(u)&&(n.batchIds={typedArray:u}),n.styleableProperties=g}).catch(function(r){e._decodingState=lS.FAILED,e._error=r}))}return!0}var m_t=new se,h_t=new h;dA.prototype.update=function(e){let t=e.context;if(l(this._error)){let d=this._error;throw this._error=void 0,d}if(u_t(this,t))return;let i=!1,o=!M.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,o=!0),l(this._drawCommand)||(a_t(this,e),o=!0,i=!0,this._ready=!0,this._parsedContent=void 0),o){M.clone(this.modelMatrix,this._modelMatrix);let d=this._drawCommand.modelMatrix;if(M.clone(this._modelMatrix,d),l(this._rtcCenter)&&M.multiplyByTranslation(d,this._rtcCenter,d),l(this._quantizedVolumeOffset)&&M.multiplyByTranslation(d,this._quantizedVolumeOffset,d),e.mode!==oe.SCENE3D){let m=e.mapProjection,p=M.getColumn(d,3,m_t);se.equals(p,se.UNIT_W)||Gt.basisTo2D(m,d,d)}let u=this._drawCommand.boundingVolume;if(le.clone(this._boundingSphere,u),this._cull){let m=u.center;M.multiplyByPoint(d,m,m);let p=M.getScale(d,h_t);u.radius*=h.maximumComponent(p)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,i=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,i=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,i=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,i=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,i=!0);let r=this.splitDirection!==zc.NONE;this._splittingEnabled!==r&&(this._splittingEnabled=r,i=!0),i&&d_t(this,e,this._style),this._drawCommand.castShadows=xn.castShadows(this.shadows),this._drawCommand.receiveShadows=xn.receiveShadows(this.shadows);let s=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=s?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=s?Re.TRANSLUCENT:this._opaquePass;let a=e.commandList,c=e.passes;(c.render||c.pick)&&a.push(this._drawCommand)};dA.prototype.isDestroyed=function(){return!1};dA.prototype.destroy=function(){let e=this._drawCommand;return l(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),me(this)};var uA=dA;var X7i=T(S(),1);function eu(){fe.throwInstantiationError()}eu.computeDefaultLevelZeroMaximumGeometricError=function(e){return e.ellipsoid.maximumRadius*2*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))};Object.defineProperties(eu.prototype,{quadtree:{get:fe.throwInstantiationError,set:fe.throwInstantiationError},tilingScheme:{get:fe.throwInstantiationError},errorEvent:{get:fe.throwInstantiationError}});eu.prototype.update=fe.throwInstantiationError;eu.prototype.beginUpdate=fe.throwInstantiationError;eu.prototype.endUpdate=fe.throwInstantiationError;eu.prototype.getLevelMaximumGeometricError=fe.throwInstantiationError;eu.prototype.loadTile=fe.throwInstantiationError;eu.prototype.computeTileVisibility=fe.throwInstantiationError;eu.prototype.showTileThisFrame=fe.throwInstantiationError;eu.prototype.computeDistanceToTile=fe.throwInstantiationError;eu.prototype.isDestroyed=fe.throwInstantiationError;eu.prototype.destroy=fe.throwInstantiationError;var X7=eu;var w7i=T(S(),1);function I7(e){e=y(e,1),this._radius=y(e,1)}Object.defineProperties(I7.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});I7.prototype.emit=function(e){let t=W.randomBetween(0,W.TWO_PI),n=W.randomBetween(0,W.PI),i=W.randomBetween(0,this._radius),o=i*Math.cos(t)*Math.sin(n),r=i*Math.sin(t)*Math.sin(n),s=i*Math.cos(n);e.position=h.fromElements(o,r,s,e.position),e.velocity=h.normalize(e.position,e.velocity)};var W7=I7;var M7i=T(S(),1);function mA(){}mA.prototype.evaluate=function(e,t){fe.throwInstantiationError()};mA.prototype.evaluateColor=function(e,t){fe.throwInstantiationError()};mA.prototype.getShaderFunction=function(e,t,n,i){fe.throwInstantiationError()};mA.prototype.getVariables=function(){fe.throwInstantiationError()};var P7=mA;var B7i=T(S(),1);function _L(e){this._ready=!1,this._provider=void 0,this._errorEvent=new ge,this._readyEvent=new ge,p_t(this,e)}Object.defineProperties(_L.prototype,{errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}}});_L.fromWorldTerrain=function(e){return new _L(LT(e))};_L.fromWorldBathymetry=function(e){return new _L(ow(e))};function f_t(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function p_t(e,t){let n;try{n=await Promise.resolve(t),e._provider=n,e._ready=!0,e._readyEvent.raiseEvent(n)}catch(i){f_t(e._errorEvent,i)}}var hA=_L;var H7i=T(S(),1);function TL(){}TL.prototype.boundingVolume=void 0;TL.prototype.boundingSphere=void 0;TL.prototype.distanceToCamera=function(e){fe.throwInstantiationError()};TL.prototype.intersectPlane=function(e){fe.throwInstantiationError()};TL.prototype.createDebugVolume=function(e){fe.throwInstantiationError()};var v7=TL;var $7i=T(S(),1);function fA(e){e=y(e,y.EMPTY_OBJECT),this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new Mi({ellipsoid:e.ellipsoid}),this._color=y(e.color,Y.YELLOW),this._errorEvent=new ge,this._tileWidth=y(e.tileWidth,256),this._tileHeight=y(e.tileHeight,256),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0}Object.defineProperties(fA.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});fA.prototype.getTileCredits=function(e,t,n){};fA.prototype.requestImage=function(e,t,n,i){let o=document.createElement("canvas");o.width=256,o.height=256;let r=o.getContext("2d"),s=this._color.toCssColorString();return r.strokeStyle=s,r.lineWidth=2,r.strokeRect(1,1,255,255),r.font="bold 25px Arial",r.textAlign="center",r.fillStyle=s,r.fillText(`L: ${n}`,124,86),r.fillText(`X: ${e}`,124,136),r.fillText(`Y: ${t}`,124,186),Promise.resolve(o)};fA.prototype.pickFeatures=function(e,t,n,i,o){};var pA=fA;var n6i=T(S(),1);function w7(e){fe.throwInstantiationError()}w7.prototype.isReady=fe.throwInstantiationError;w7.prototype.shouldDiscardImage=fe.throwInstantiationError;var F7=w7;var o6i=T(S(),1),b_t={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},A7=Object.freeze(b_t);var S6i=T(S(),1);function uS(e){e=y(e,y.EMPTY_OBJECT),this.show=y(e.show,!0),this.modelMatrix=M.clone(y(e.modelMatrix,M.IDENTITY)),this.shadows=y(e.shadows,xn.ENABLED),this.maximumMemoryUsage=y(e.maximumMemoryUsage,256),this.shading=new sf(e.shading),this.style=e.style,this.frameFailed=new ge,this.frameChanged=new ge,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new Yp,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=new Array(5).fill(0),this._runningAverage=0}Object.defineProperties(uS.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ss.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(l(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}}});function g_t(e){return`uniform vec4 czm_pickColor; -${e}`}function y_t(e){return function(t){return xt(t,{czm_pickColor:function(){return e._pickId.color}})}}function x_t(){return"czm_pickColor"}uS.prototype.makeStyleDirty=function(){this._styleDirty=!0};uS.prototype._getAverageLoadTime=function(){return this._runningLength===0?.05:this._runningAverage};var __t=new te;function N7(e){let t=e._clock,n=t.canAnimate&&t.shouldAnimate,i=t.multiplier;return n?i:0}function dS(e,t){return e._intervals.indexOf(t.start)}function T_t(e,t){let n=e._intervals,i=e._clock,o=N7(e);if(o===0)return;let r=e._getAverageLoadTime(),s=te.addSeconds(i.currentTime,r*o,__t),a=n.indexOf(s),c=dS(e,t);return a===c&&(o>=0?++a:--a),n.get(a)}function S_t(e){let t=e._intervals,i=e._clock.currentTime,o=t.indexOf(i);return t.get(o)}function C_t(e,t,n){let i=N7(e),o=dS(e,t),r=dS(e,n);return i>=0?o>=r:o<=r}function OTe(e,t){return function(n){let i=l(n.message)?n.message:n.toString();e.frameFailed.numberOfListeners>0?e.frameFailed.raiseEvent({uri:t,message:i}):(console.log(`A frame failed to load: ${t}`),console.log(`Error: ${i}`))}}function V_t(e,t,n){let i=dS(e,t),o=e._frames,r=o[i];if(!l(r)){let s=t.data.transform,a=l(s)?M.fromArray(s):void 0,c=t.data.uri;r={pointCloud:void 0,transform:a,timestamp:bi(),sequential:!0,ready:!1,touchedFrameNumber:n.frameNumber,uri:c},o[i]=r,Ee.fetchArrayBuffer({url:c}).then(function(d){r.pointCloud=new uA({arrayBuffer:d,cull:!0,fragmentShaderLoaded:g_t,uniformMapLoaded:y_t(e),pickIdLoaded:x_t})}).catch(OTe(e,c))}return r}function L_t(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function R_t(e,t,n,i){t.touchedFrameNumber<i.frameNumber-1&&(t.sequential=!1);let o=t.pointCloud;if(l(o)&&!t.ready){let r=i.commandList,s=r.length;if(HTe(e,t,n,i),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,r.length=s,t.sequential)){let a=(bi()-t.timestamp)/1e3;L_t(e,a)}}t.touchedFrameNumber=i.frameNumber}var Z_t=new M;function G_t(e,t){let n=e.shading;return l(n)&&l(n.baseResolution)?n.baseResolution:l(t.boundingSphere)?W.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function E_t(e){let t=e.shading;return l(t)&&l(t.maximumAttenuation)?t.maximumAttenuation:10}var X_t=new sf;function HTe(e,t,n,i){let o=y(e.shading,X_t),r=t.pointCloud,s=y(t.transform,M.IDENTITY);r.modelMatrix=M.multiplyTransformation(e.modelMatrix,s,Z_t),r.style=e.style,r.time=n.timeSinceLoad,r.shadows=e.shadows,r.clippingPlanes=e._clippingPlanes,r.isClipped=n.isClipped,r.attenuation=o.attenuation,r.backFaceCulling=o.backFaceCulling,r.normalShading=o.normalShading,r.geometricError=G_t(e,r),r.geometricErrorScale=o.geometricErrorScale,r.maximumAttenuation=E_t(e);try{r.update(i)}catch(a){OTe(e,t.uri)(a)}t.touchedFrameNumber=i.frameNumber}function M7(e,t,n,i){let o=V_t(e,t,i);R_t(e,o,n,i)}function I_t(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function zTe(e,t){let n=e._frames,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(l(r)&&(!l(t)||t(r))){let s=r.pointCloud;r.ready&&(e._totalMemoryUsageInBytes-=s.geometryByteLength),l(s)&&s.destroy(),r===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),n[o]=void 0}}}function W_t(e,t){let n=dS(e,t),i=e._frames[n];if(l(i)&&i.ready)return i}function YTe(e,t,n,i,o){return l(n)?n.ready?!0:(M7(e,t,i,o),n.ready):!1}function P_t(e,t,n,i,o){let r,s,a,c=e._intervals,d=e._frames,u=dS(e,n),m=dS(e,t);if(u>=m){for(r=u;r>=m;--r)if(s=c.get(r),a=d[r],YTe(e,s,a,i,o))return s}else for(r=u;r<=m;++r)if(s=c.get(r),a=d[r],YTe(e,s,a,i,o))return s;return t}function v_t(e,t,n){let i=e._frames,o=i.length;for(let r=0;r<o;++r){let s=i[r];l(s)&&l(s.pointCloud)&&(s.pointCloud.clippingPlanesDirty=t,s.pointCloud.styleDirty=n)}}var SL={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};uS.prototype.update=function(e){if(e.mode===oe.MORPHING||!this.show)return;l(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),l(this._loadTimestamp)||(this._loadTimestamp=te.clone(e.time));let t=Math.max(te.secondsDifference(e.time,this._loadTimestamp)*1e3,0),n=this._clippingPlanes,i=0,o=!1,r=l(n)&&n.enabled;r&&(n.update(e),i=n.clippingPlanesState),this._clippingPlanesState!==i&&(this._clippingPlanesState=i,o=!0);let s=this._styleDirty;this._styleDirty=!1,(o||s)&&v_t(this,o,s),SL.timeSinceLoad=t,SL.isClipped=r;let a=this.shading,c=this._pointCloudEyeDomeLighting,d=e.commandList,u=d.length,m=this._previousInterval,p=this._nextInterval,g=S_t(this);if(!l(g))return;let f=!1,x=N7(this),_=x===0;x!==this._clockMultiplier&&(f=!0,this._clockMultiplier=x),(!l(m)||_)&&(m=g),(!l(p)||f||C_t(this,g,p))&&(p=T_t(this,g)),m=P_t(this,m,g,SL,e);let C=W_t(this,m);l(C)||(M7(this,m,SL,e),C=this._lastRenderedFrame),l(C)&&HTe(this,C,SL,e),l(p)&&M7(this,p,SL,e);let V=this;l(C)&&!l(this._lastRenderedFrame)&&e.afterRender.push(function(){return!0}),l(C)&&C!==this._lastRenderedFrame&&V.frameChanged.numberOfListeners>0&&e.afterRender.push(function(){return V.frameChanged.raiseEvent(V),!0}),this._previousInterval=m,this._nextInterval=p,this._lastRenderedFrame=C;let L=this._totalMemoryUsageInBytes,Z=this.maximumMemoryUsage*1024*1024;L>Z&&zTe(this,I_t(e));let X=d.length-u;l(a)&&a.attenuation&&a.eyeDomeLighting&&X>0&&c.update(e,u,a,this.boundingSphere)};uS.prototype.isDestroyed=function(){return!1};uS.prototype.destroy=function(){return zTe(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),me(this)};var CL=uS;var v6i=T(S(),1);function k3(e,t){this.show=!0,l(e)||(e=new He),this.rectangle=He.clone(e),l(t)||(t=Ai.fromType(Ai.ColorType,{color:new Y(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}k3.prototype.update=function(e){if(!this.show)return;let t=this._rs;if((!l(t)||!He.equals(t.viewport,this.rectangle))&&(this._rs=De.fromCache({blending:un.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){let i=e.context;if(this._material!==this.material||!l(this._overlayCommand)){this._material=this.material,l(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();let o=new Ye({sources:[this._material.shaderSource,Xw]});this._overlayCommand=i.createViewportQuadCommand(o,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Re.OVERLAY}this._material.update(i),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}};k3.prototype.isDestroyed=function(){return!1};k3.prototype.destroy=function(){return l(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),me(this)};var k7=k3;var A6i=T(S(),1);function U7(){fe.throwInstantiationError()}Object.defineProperties(U7.prototype,{globalTransform:{get:fe.throwInstantiationError},shapeTransform:{get:fe.throwInstantiationError},shape:{get:fe.throwInstantiationError},minBounds:{get:fe.throwInstantiationError},maxBounds:{get:fe.throwInstantiationError},dimensions:{get:fe.throwInstantiationError},paddingBefore:{get:fe.throwInstantiationError},paddingAfter:{get:fe.throwInstantiationError},names:{get:fe.throwInstantiationError},types:{get:fe.throwInstantiationError},componentTypes:{get:fe.throwInstantiationError},minimumValues:{get:fe.throwInstantiationError},maximumValues:{get:fe.throwInstantiationError},maximumTileCount:{get:fe.throwInstantiationError},keyframeCount:{get:fe.throwInstantiationError},timeIntervalCollection:{get:fe.throwInstantiationError}});U7.prototype.requestData=fe.throwInstantiationError;var D7=U7;var k6i=T(S(),1);function mS(){fe.throwInstantiationError()}Object.defineProperties(mS.prototype,{orientedBoundingBox:{get:fe.throwInstantiationError},boundingSphere:{get:fe.throwInstantiationError},boundTransform:{get:fe.throwInstantiationError},shapeTransform:{get:fe.throwInstantiationError},shaderUniforms:{get:fe.throwInstantiationError},shaderDefines:{get:fe.throwInstantiationError},shaderMaximumIntersectionsLength:{get:fe.throwInstantiationError}});mS.prototype.update=fe.throwInstantiationError;mS.prototype.computeOrientedBoundingBoxForTile=fe.throwInstantiationError;mS.prototype.computeOrientedBoundingBoxForSample=fe.throwInstantiationError;mS.DefaultMinBounds=fe.throwInstantiationError;mS.DefaultMaxBounds=fe.throwInstantiationError;var B7=mS;var H6i=T(S(),1);async function Y7(e,t){let n=t.terrainProvider,i=t.mapProjection,o=i.ellipsoid,r,s=t.camera.getRectangleCameraCoordinates(e);if(t.mode===oe.SCENE3D?r=o.cartesianToCartographic(s):r=i.unproject(s),!l(n))return r;let a=n.availability;if(!l(a)||t.mode===oe.SCENE2D)return r;let c=[ce.center(e),ce.southeast(e),ce.southwest(e),ce.northeast(e),ce.northwest(e)],d=await Y7._sampleTerrainMostDetailed(n,c),u=!1,m=d.reduce(function(g,f){return l(f.height)?(u=!0,Math.max(f.height,g)):g},-Number.MAX_VALUE),p=r;return u&&(p.height+=m),p}Y7._sampleTerrainMostDetailed=RT;var hS=Y7;var cqi=T(S(),1);var w_t=new Y,F_t=new Y,A_t=new Y,M_t=new Y,KTe=new se,bA=new Uint8Array(4);function JTe(e,t,n,i){let o=t.height===n.height?0:(e-t.height)/(n.height-t.height);return Y.lerp(t.color,n.color,o,i)}function U3(e,t){return{height:e,color:Y.clone(t)}}function QTe(e){return e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,s=o?t.height===i[n-1].height:!0,a=r?t.height===i[n+1].height:!0;return!s||!a}),e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,s=o?Y.equals(t.color,i[n-1].color):!1,a=r?Y.equals(t.color,i[n+1].color):!1;return!s||!a}),e=e.filter(function(t,n,i){let o=n>0,r=o?Y.equals(t.color,i[n-1].color):!1,s=o?t.height===i[n-1].height:!0;return!r||!s}),e}function N_t(e){let t,n,i=[],o=e.length;for(t=0;t<o;t++){let r=e[t],s=r.entries,a=s.length,c=[];for(n=0;n<a;n++){let g=s[n],f=W.clamp(g.height,td._minimumHeight,td._maximumHeight),x=Y.clone(g.color,w_t);x.red*=x.alpha,x.green*=x.alpha,x.blue*=x.alpha,c.push(U3(f,x))}let d=!0,u=!0;for(n=0;n<a-1;n++){let g=c[n+0],f=c[n+1];d=d&&g.height<=f.height,u=u&&g.height>=f.height}u?c=c.reverse():d||H0(c,function(g,f){return W.sign(g.height-f.height)});let m=y(r.extendDownwards,!1),p=y(r.extendUpwards,!1);c.length===1&&!m&&!p&&(m=!0,p=!0),m&&c.splice(0,0,U3(td._minimumHeight,c[0].color)),p&&c.splice(c.length,0,U3(td._maximumHeight,c[c.length-1].color)),c=QTe(c),i.push(c)}return i}function k_t(e){let t=N_t(e),n=[],i=[],o;function r(d,u){n.push(U3(d,u))}function s(d,u,m){let p=Y.multiplyByScalar(m,1-u.alpha,M_t);p=Y.add(p,u,p),r(d,p)}let a=t.length;for(o=0;o<a;o++){let d=t[o],u=0,m=0;i=n,n=[];let p=d.length,g=i.length;for(;u<p||m<g;){let f=u<p?d[u]:void 0,x=u>0?d[u-1]:void 0,_=u<p-1?d[u+1]:void 0,C=m<g?i[m]:void 0,V=m>0?i[m-1]:void 0,L=m<g-1?i[m+1]:void 0;if(l(f)&&l(C)&&f.height===C.height){let Z=l(L)&&C.height===L.height,G=!l(V),X=!l(L),v=l(_)&&f.height===_.height,P=!l(x),F=!l(_);Z?v?(s(f.height,f.color,C.color),s(f.height,_.color,L.color)):P?(r(f.height,C.color),s(f.height,f.color,L.color)):F?(s(f.height,f.color,C.color),r(f.height,L.color)):(s(f.height,f.color,C.color),s(f.height,f.color,L.color)):G?v?(r(f.height,f.color),s(f.height,_.color,C.color)):F?(r(f.height,f.color),r(f.height,C.color)):(P||r(f.height,f.color),s(f.height,f.color,C.color)):X?v?(s(f.height,f.color,C.color),r(f.height,_.color)):P?(r(f.height,C.color),r(f.height,f.color)):F?s(f.height,f.color,C.color):(s(f.height,f.color,C.color),r(f.height,f.color)):v?(s(f.height,f.color,C.color),s(f.height,_.color,C.color)):P?(r(f.height,C.color),s(f.height,f.color,C.color)):F?(s(f.height,f.color,C.color),r(f.height,C.color)):s(f.height,f.color,C.color),u+=v?2:1,m+=Z?2:1}else if(l(f)&&l(C)&&l(V)&&f.height<C.height){let Z=JTe(f.height,V,C,A_t);l(x)?l(_)?s(f.height,f.color,Z):(s(f.height,f.color,Z),r(f.height,Z)):(r(f.height,Z),s(f.height,f.color,Z)),u++}else if(l(C)&&l(f)&&l(x)&&C.height<f.height){let Z=JTe(C.height,x,f,F_t);l(V)?l(L)?s(C.height,Z,C.color):(s(C.height,Z,C.color),r(C.height,Z)):(r(C.height,Z),s(C.height,Z,C.color)),m++}else l(f)&&(!l(C)||f.height<C.height)?(l(C)&&!l(V)&&!l(_)?(r(f.height,f.color),r(f.height,td._emptyColor),r(C.height,td._emptyColor)):(!l(C)&&l(V)&&!l(x)&&(r(V.height,td._emptyColor),r(f.height,td._emptyColor)),r(f.height,f.color)),u++):l(C)&&(!l(f)||C.height<f.height)&&(r(C.height,C.color),m++)}}return QTe(n)}function td(e){let{scene:t,layers:n}=y(e,y.EMPTY_OBJECT),{context:i}=t,o=k_t(n),r=o.length,s,a,c;if(!td._useFloatTexture(i)){a=ze.UNSIGNED_BYTE,c=at.RGBA,s=new Uint8Array(r*4);for(let g=0;g<r;g++)se.packFloat(o[g].height,KTe),se.pack(KTe,s,g*4)}else{a=ze.FLOAT,c=i.webgl2?at.RED:at.LUMINANCE,s=new Float32Array(r);for(let g=0;g<r;g++)s[g]=o[g].height}let u=Et.create({context:i,pixelFormat:c,pixelDatatype:a,source:{arrayBufferView:s,width:r,height:1},sampler:new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.NEAREST,magnificationFilter:di.NEAREST})}),m=new Uint8Array(r*4);for(let g=0;g<r;g++)o[g].color.toBytes(bA),m[g*4+0]=bA[0],m[g*4+1]=bA[1],m[g*4+2]=bA[2],m[g*4+3]=bA[3];let p=Et.create({context:i,pixelFormat:at.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,source:{arrayBufferView:m,width:r,height:1},sampler:new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.LINEAR,magnificationFilter:di.LINEAR})});return Ai.fromType("ElevationBand",{heights:u,colors:p})}td._useFloatTexture=function(e){return e.floatingPointTexture};td._maximumHeight=5906376425472;td._minimumHeight=-5906376425472;td._emptyColor=new Y(0,0,0,0);var O7=td;var bqi=T(S(),1);async function U_t(e,t){if(t=y(t,{}),t.cacheBytes=y(t.cacheBytes,1536*1024*1024),t.maximumCacheOverflowBytes=y(t.maximumCacheOverflowBytes,1024*1024*1024),t.enableCollision=y(t.enableCollision,!0),e=y(e,ST.defaultApiKey),!l(e))return D_t(t);let n,i=ST.getDefaultCredit();l(i)&&(n=[i]);let o=new Ee({url:`${ST.mapTilesApiEndpoint}3dtiles/root.json`,queryParameters:{key:e},credits:n});return oa.fromUrl(o,t)}var jTe={};async function D_t(e){let i=jTe[2275207];l(i)||(i=ud.fromAssetId(2275207),jTe[2275207]=i);let o=await i;return oa.fromUrl(o,e)}var H7=U_t;var Cqi=T(S(),1);async function B_t(e){let t=await oa.fromIonAssetId(96188,e);e=y(e,y.EMPTY_OBJECT);let n=e.style;if(!l(n)){let i=y(e.defaultColor,Y.WHITE).toCssColorString();n=new iS({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${i}`})}return t.style=n,t}var z7=B_t;var Pqi=T(S(),1);function Y_t(e){e=y(e,y.EMPTY_OBJECT);let t=[],n=e.geometry;(!l(n.attributes)||!l(n.primitiveType))&&(n=n.constructor.createGeometry(n));let i=n.attributes,o=M.clone(y(e.modelMatrix,M.IDENTITY)),r=y(e.length,1e4);if(l(i.normal)&&t.push(new St({geometry:An.createLineSegmentsForVectors(n,"normal",r),attributes:{color:new Ht(1,0,0,1)},modelMatrix:o})),l(i.tangent)&&t.push(new St({geometry:An.createLineSegmentsForVectors(n,"tangent",r),attributes:{color:new Ht(0,1,0,1)},modelMatrix:o})),l(i.bitangent)&&t.push(new St({geometry:An.createLineSegmentsForVectors(n,"bitangent",r),attributes:{color:new Ht(0,0,1,1)},modelMatrix:o})),t.length>0)return new En({asynchronous:!1,geometryInstances:t,appearance:new ln({flat:!0,translucent:!1})})}var K7=Y_t;var wqi=T(S(),1),J7=`uniform sampler2D u_depthTexture; +`,N&&(be+=dA("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),be+=`} +`,e.splitDirection!==zc.NONE&&(be=xZ.modifyFragmentShader(be)),l(e._vertexShaderLoaded)&&(q=e._vertexShaderLoaded(q)),l(e._fragmentShaderLoaded)&&(be=e._fragmentShaderLoaded(be));let Se=e._drawCommand;l(Se.shaderProgram)&&Se.shaderProgram.destroy(),Se.shaderProgram=qt.fromCache({context:s,vertexShaderSource:q,fragmentShaderSource:be,attributeLocations:ee});try{Se.shaderProgram._bind()}catch{throw new ue("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function r_t(e,t){if(e._decodingState===cT.READY)return!1;if(e._decodingState===cT.NEEDS_DECODE){let n=e._parsedContent,i=n.draco,o=Fp.decodePointCloud(i,t);l(o)&&(e._decodingState=cT.DECODING,o.then(function(r){e._decodingState=cT.READY;let s=l(r.POSITION)?r.POSITION.array:void 0,a=l(r.RGB)?r.RGB.array:void 0,c=l(r.RGBA)?r.RGBA.array:void 0,d=l(r.NORMAL)?r.NORMAL.array:void 0,u=l(r.BATCH_ID)?r.BATCH_ID.array:void 0,m=l(s)&&l(r.POSITION.data.quantization),p=l(d)&&l(r.NORMAL.data.quantization);if(m){let _=r.POSITION.data.quantization,C=_.range;e._quantizedVolumeScale=h.fromElements(C,C,C),e._quantizedVolumeOffset=h.unpack(_.minValues),e._quantizedRange=(1<<_.quantizationBits)-1,e._isQuantizedDraco=!0}p&&(e._octEncodedRange=(1<<r.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);let g=n.styleableProperties,f=i.batchTableProperties;for(let _ in f)if(f.hasOwnProperty(_)){let C=r[_];l(g)||(g={}),g[_]={typedArray:C.array,componentCount:C.data.componentsPerAttribute}}l(s)&&(n.positions={typedArray:s});let x=y(c,a);l(x)&&(n.colors={typedArray:x}),l(d)&&(n.normals={typedArray:d}),l(u)&&(n.batchIds={typedArray:u}),n.styleableProperties=g}).catch(function(r){e._decodingState=cT.FAILED,e._error=r}))}return!0}var s_t=new se,a_t=new h;uA.prototype.update=function(e){let t=e.context;if(l(this._error)){let d=this._error;throw this._error=void 0,d}if(r_t(this,t))return;let i=!1,o=!A.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,o=!0),l(this._drawCommand)||(t_t(this,e),o=!0,i=!0,this._ready=!0,this._parsedContent=void 0),o){A.clone(this.modelMatrix,this._modelMatrix);let d=this._drawCommand.modelMatrix;if(A.clone(this._modelMatrix,d),l(this._rtcCenter)&&A.multiplyByTranslation(d,this._rtcCenter,d),l(this._quantizedVolumeOffset)&&A.multiplyByTranslation(d,this._quantizedVolumeOffset,d),e.mode!==oe.SCENE3D){let m=e.mapProjection,p=A.getColumn(d,3,s_t);se.equals(p,se.UNIT_W)||Gt.basisTo2D(m,d,d)}let u=this._drawCommand.boundingVolume;if(le.clone(this._boundingSphere,u),this._cull){let m=u.center;A.multiplyByPoint(d,m,m);let p=A.getScale(d,a_t);u.radius*=h.maximumComponent(p)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,i=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,i=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,i=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,i=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,i=!0);let r=this.splitDirection!==zc.NONE;this._splittingEnabled!==r&&(this._splittingEnabled=r,i=!0),i&&o_t(this,e,this._style),this._drawCommand.castShadows=xn.castShadows(this.shadows),this._drawCommand.receiveShadows=xn.receiveShadows(this.shadows);let s=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=s?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=s?Le.TRANSLUCENT:this._opaquePass;let a=e.commandList,c=e.passes;(c.render||c.pick)&&a.push(this._drawCommand)};uA.prototype.isDestroyed=function(){return!1};uA.prototype.destroy=function(){let e=this._drawCommand;return l(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),me(this)};var mA=uA;var X7i=S(T(),1);function $d(){fe.throwInstantiationError()}$d.computeDefaultLevelZeroMaximumGeometricError=function(e){return e.ellipsoid.maximumRadius*2*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))};Object.defineProperties($d.prototype,{quadtree:{get:fe.throwInstantiationError,set:fe.throwInstantiationError},tilingScheme:{get:fe.throwInstantiationError},errorEvent:{get:fe.throwInstantiationError}});$d.prototype.update=fe.throwInstantiationError;$d.prototype.beginUpdate=fe.throwInstantiationError;$d.prototype.endUpdate=fe.throwInstantiationError;$d.prototype.getLevelMaximumGeometricError=fe.throwInstantiationError;$d.prototype.loadTile=fe.throwInstantiationError;$d.prototype.computeTileVisibility=fe.throwInstantiationError;$d.prototype.showTileThisFrame=fe.throwInstantiationError;$d.prototype.computeDistanceToTile=fe.throwInstantiationError;$d.prototype.isDestroyed=fe.throwInstantiationError;$d.prototype.destroy=fe.throwInstantiationError;var E7=$d;var A7i=S(T(),1);function W7(e){e=y(e,1),this._radius=y(e,1)}Object.defineProperties(W7.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});W7.prototype.emit=function(e){let t=X.randomBetween(0,X.TWO_PI),n=X.randomBetween(0,X.PI),i=X.randomBetween(0,this._radius),o=i*Math.cos(t)*Math.sin(n),r=i*Math.sin(t)*Math.sin(n),s=i*Math.cos(n);e.position=h.fromElements(o,r,s,e.position),e.velocity=h.normalize(e.position,e.velocity)};var I7=W7;var U7i=S(T(),1);function hA(){}hA.prototype.evaluate=function(e,t){fe.throwInstantiationError()};hA.prototype.evaluateColor=function(e,t){fe.throwInstantiationError()};hA.prototype.getShaderFunction=function(e,t,n,i){fe.throwInstantiationError()};hA.prototype.getVariables=function(){fe.throwInstantiationError()};var X7=hA;var O7i=S(T(),1);function _Z(e){this._ready=!1,this._provider=void 0,this._errorEvent=new ge,this._readyEvent=new ge,l_t(this,e)}Object.defineProperties(_Z.prototype,{errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}}});_Z.fromWorldTerrain=function(e){return new _Z($S(e))};_Z.fromWorldBathymetry=function(e){return new _Z(k9(e))};function c_t(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function l_t(e,t){let n;try{n=await Promise.resolve(t),e._provider=n,e._ready=!0,e._readyEvent.raiseEvent(n)}catch(i){c_t(e._errorEvent,i)}}var fA=_Z;var H7i=S(T(),1);function SZ(){}SZ.prototype.boundingVolume=void 0;SZ.prototype.boundingSphere=void 0;SZ.prototype.distanceToCamera=function(e){fe.throwInstantiationError()};SZ.prototype.intersectPlane=function(e){fe.throwInstantiationError()};SZ.prototype.createDebugVolume=function(e){fe.throwInstantiationError()};var P7=SZ;var t6i=S(T(),1);function pA(e){e=y(e,y.EMPTY_OBJECT),this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new Ni({ellipsoid:e.ellipsoid}),this._color=y(e.color,Y.YELLOW),this._errorEvent=new ge,this._tileWidth=y(e.tileWidth,256),this._tileHeight=y(e.tileHeight,256),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0}Object.defineProperties(pA.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});pA.prototype.getTileCredits=function(e,t,n){};pA.prototype.requestImage=function(e,t,n,i){let o=document.createElement("canvas");o.width=256,o.height=256;let r=o.getContext("2d"),s=this._color.toCssColorString();return r.strokeStyle=s,r.lineWidth=2,r.strokeRect(1,1,255,255),r.font="bold 25px Arial",r.textAlign="center",r.fillStyle=s,r.fillText(`L: ${n}`,124,86),r.fillText(`X: ${e}`,124,136),r.fillText(`Y: ${t}`,124,186),Promise.resolve(o)};pA.prototype.pickFeatures=function(e,t,n,i,o){};var bA=pA;var o6i=S(T(),1);function v7(e){fe.throwInstantiationError()}v7.prototype.isReady=fe.throwInstantiationError;v7.prototype.shouldDiscardImage=fe.throwInstantiationError;var w7=v7;var s6i=S(T(),1),d_t={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},F7=Object.freeze(d_t);var V6i=S(T(),1);function dT(e){e=y(e,y.EMPTY_OBJECT),this.show=y(e.show,!0),this.modelMatrix=A.clone(y(e.modelMatrix,A.IDENTITY)),this.shadows=y(e.shadows,xn.ENABLED),this.maximumMemoryUsage=y(e.maximumMemoryUsage,256),this.shading=new rf(e.shading),this.style=e.style,this.frameFailed=new ge,this.frameChanged=new ge,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new Bp,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=new Array(5).fill(0),this._runningAverage=0}Object.defineProperties(dT.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){as.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(l(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}}});function u_t(e){return`uniform vec4 czm_pickColor; +${e}`}function m_t(e){return function(t){return xt(t,{czm_pickColor:function(){return e._pickId.color}})}}function h_t(){return"czm_pickColor"}dT.prototype.makeStyleDirty=function(){this._styleDirty=!0};dT.prototype._getAverageLoadTime=function(){return this._runningLength===0?.05:this._runningAverage};var f_t=new ne;function M7(e){let t=e._clock,n=t.canAnimate&&t.shouldAnimate,i=t.multiplier;return n?i:0}function lT(e,t){return e._intervals.indexOf(t.start)}function p_t(e,t){let n=e._intervals,i=e._clock,o=M7(e);if(o===0)return;let r=e._getAverageLoadTime(),s=ne.addSeconds(i.currentTime,r*o,f_t),a=n.indexOf(s),c=lT(e,t);return a===c&&(o>=0?++a:--a),n.get(a)}function b_t(e){let t=e._intervals,i=e._clock.currentTime,o=t.indexOf(i);return t.get(o)}function g_t(e,t,n){let i=M7(e),o=lT(e,t),r=lT(e,n);return i>=0?o>=r:o<=r}function QSe(e,t){return function(n){let i=l(n.message)?n.message:n.toString();e.frameFailed.numberOfListeners>0?e.frameFailed.raiseEvent({uri:t,message:i}):(console.log(`A frame failed to load: ${t}`),console.log(`Error: ${i}`))}}function y_t(e,t,n){let i=lT(e,t),o=e._frames,r=o[i];if(!l(r)){let s=t.data.transform,a=l(s)?A.fromArray(s):void 0,c=t.data.uri;r={pointCloud:void 0,transform:a,timestamp:gi(),sequential:!0,ready:!1,touchedFrameNumber:n.frameNumber,uri:c},o[i]=r,Ee.fetchArrayBuffer({url:c}).then(function(d){r.pointCloud=new mA({arrayBuffer:d,cull:!0,fragmentShaderLoaded:u_t,uniformMapLoaded:m_t(e),pickIdLoaded:h_t})}).catch(QSe(e,c))}return r}function x_t(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function __t(e,t,n,i){t.touchedFrameNumber<i.frameNumber-1&&(t.sequential=!1);let o=t.pointCloud;if(l(o)&&!t.ready){let r=i.commandList,s=r.length;if(jSe(e,t,n,i),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,r.length=s,t.sequential)){let a=(gi()-t.timestamp)/1e3;x_t(e,a)}}t.touchedFrameNumber=i.frameNumber}var S_t=new A;function T_t(e,t){let n=e.shading;return l(n)&&l(n.baseResolution)?n.baseResolution:l(t.boundingSphere)?X.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function C_t(e){let t=e.shading;return l(t)&&l(t.maximumAttenuation)?t.maximumAttenuation:10}var V_t=new rf;function jSe(e,t,n,i){let o=y(e.shading,V_t),r=t.pointCloud,s=y(t.transform,A.IDENTITY);r.modelMatrix=A.multiplyTransformation(e.modelMatrix,s,S_t),r.style=e.style,r.time=n.timeSinceLoad,r.shadows=e.shadows,r.clippingPlanes=e._clippingPlanes,r.isClipped=n.isClipped,r.attenuation=o.attenuation,r.backFaceCulling=o.backFaceCulling,r.normalShading=o.normalShading,r.geometricError=T_t(e,r),r.geometricErrorScale=o.geometricErrorScale,r.maximumAttenuation=C_t(e);try{r.update(i)}catch(a){QSe(e,t.uri)(a)}t.touchedFrameNumber=i.frameNumber}function A7(e,t,n,i){let o=y_t(e,t,i);__t(e,o,n,i)}function Z_t(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function qSe(e,t){let n=e._frames,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(l(r)&&(!l(t)||t(r))){let s=r.pointCloud;r.ready&&(e._totalMemoryUsageInBytes-=s.geometryByteLength),l(s)&&s.destroy(),r===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),n[o]=void 0}}}function L_t(e,t){let n=lT(e,t),i=e._frames[n];if(l(i)&&i.ready)return i}function JSe(e,t,n,i,o){return l(n)?n.ready?!0:(A7(e,t,i,o),n.ready):!1}function R_t(e,t,n,i,o){let r,s,a,c=e._intervals,d=e._frames,u=lT(e,n),m=lT(e,t);if(u>=m){for(r=u;r>=m;--r)if(s=c.get(r),a=d[r],JSe(e,s,a,i,o))return s}else for(r=u;r<=m;++r)if(s=c.get(r),a=d[r],JSe(e,s,a,i,o))return s;return t}function G_t(e,t,n){let i=e._frames,o=i.length;for(let r=0;r<o;++r){let s=i[r];l(s)&&l(s.pointCloud)&&(s.pointCloud.clippingPlanesDirty=t,s.pointCloud.styleDirty=n)}}var TZ={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};dT.prototype.update=function(e){if(e.mode===oe.MORPHING||!this.show)return;l(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),l(this._loadTimestamp)||(this._loadTimestamp=ne.clone(e.time));let t=Math.max(ne.secondsDifference(e.time,this._loadTimestamp)*1e3,0),n=this._clippingPlanes,i=0,o=!1,r=l(n)&&n.enabled;r&&(n.update(e),i=n.clippingPlanesState),this._clippingPlanesState!==i&&(this._clippingPlanesState=i,o=!0);let s=this._styleDirty;this._styleDirty=!1,(o||s)&&G_t(this,o,s),TZ.timeSinceLoad=t,TZ.isClipped=r;let a=this.shading,c=this._pointCloudEyeDomeLighting,d=e.commandList,u=d.length,m=this._previousInterval,p=this._nextInterval,g=b_t(this);if(!l(g))return;let f=!1,x=M7(this),_=x===0;x!==this._clockMultiplier&&(f=!0,this._clockMultiplier=x),(!l(m)||_)&&(m=g),(!l(p)||f||g_t(this,g,p))&&(p=p_t(this,g)),m=R_t(this,m,g,TZ,e);let C=L_t(this,m);l(C)||(A7(this,m,TZ,e),C=this._lastRenderedFrame),l(C)&&jSe(this,C,TZ,e),l(p)&&A7(this,p,TZ,e);let V=this;l(C)&&!l(this._lastRenderedFrame)&&e.afterRender.push(function(){return!0}),l(C)&&C!==this._lastRenderedFrame&&V.frameChanged.numberOfListeners>0&&e.afterRender.push(function(){return V.frameChanged.raiseEvent(V),!0}),this._previousInterval=m,this._nextInterval=p,this._lastRenderedFrame=C;let Z=this._totalMemoryUsageInBytes,R=this.maximumMemoryUsage*1024*1024;Z>R&&qSe(this,Z_t(e));let W=d.length-u;l(a)&&a.attenuation&&a.eyeDomeLighting&&W>0&&c.update(e,u,a,this.boundingSphere)};dT.prototype.isDestroyed=function(){return!1};dT.prototype.destroy=function(){return qSe(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),me(this)};var CZ=dT;var F6i=S(T(),1);function kB(e,t){this.show=!0,l(e)||(e=new ze),this.rectangle=ze.clone(e),l(t)||(t=Mi.fromType(Mi.ColorType,{color:new Y(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}kB.prototype.update=function(e){if(!this.show)return;let t=this._rs;if((!l(t)||!ze.equals(t.viewport,this.rectangle))&&(this._rs=De.fromCache({blending:un.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){let i=e.context;if(this._material!==this.material||!l(this._overlayCommand)){this._material=this.material,l(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();let o=new Ye({sources:[this._material.shaderSource,tw]});this._overlayCommand=i.createViewportQuadCommand(o,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Le.OVERLAY}this._material.update(i),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}};kB.prototype.isDestroyed=function(){return!1};kB.prototype.destroy=function(){return l(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),me(this)};var N7=kB;var N6i=S(T(),1);function U7(){fe.throwInstantiationError()}Object.defineProperties(U7.prototype,{globalTransform:{get:fe.throwInstantiationError},shapeTransform:{get:fe.throwInstantiationError},shape:{get:fe.throwInstantiationError},minBounds:{get:fe.throwInstantiationError},maxBounds:{get:fe.throwInstantiationError},dimensions:{get:fe.throwInstantiationError},paddingBefore:{get:fe.throwInstantiationError},paddingAfter:{get:fe.throwInstantiationError},names:{get:fe.throwInstantiationError},types:{get:fe.throwInstantiationError},componentTypes:{get:fe.throwInstantiationError},minimumValues:{get:fe.throwInstantiationError},maximumValues:{get:fe.throwInstantiationError},maximumTileCount:{get:fe.throwInstantiationError},keyframeCount:{get:fe.throwInstantiationError},timeIntervalCollection:{get:fe.throwInstantiationError}});U7.prototype.requestData=fe.throwInstantiationError;var k7=U7;var D6i=S(T(),1);function uT(){fe.throwInstantiationError()}Object.defineProperties(uT.prototype,{orientedBoundingBox:{get:fe.throwInstantiationError},boundingSphere:{get:fe.throwInstantiationError},boundTransform:{get:fe.throwInstantiationError},shapeTransform:{get:fe.throwInstantiationError},shaderUniforms:{get:fe.throwInstantiationError},shaderDefines:{get:fe.throwInstantiationError},shaderMaximumIntersectionsLength:{get:fe.throwInstantiationError}});uT.prototype.update=fe.throwInstantiationError;uT.prototype.computeOrientedBoundingBoxForTile=fe.throwInstantiationError;uT.prototype.computeOrientedBoundingBoxForSample=fe.throwInstantiationError;uT.DefaultMinBounds=fe.throwInstantiationError;uT.DefaultMaxBounds=fe.throwInstantiationError;var D7=uT;var H6i=S(T(),1);async function B7(e,t){let n=t.terrainProvider,i=t.mapProjection,o=i.ellipsoid,r,s=t.camera.getRectangleCameraCoordinates(e);if(t.mode===oe.SCENE3D?r=o.cartesianToCartographic(s):r=i.unproject(s),!l(n))return r;let a=n.availability;if(!l(a)||t.mode===oe.SCENE2D)return r;let c=[ce.center(e),ce.southeast(e),ce.southwest(e),ce.northeast(e),ce.northwest(e)],d=await B7._sampleTerrainMostDetailed(n,c),u=!1,m=d.reduce(function(g,f){return l(f.height)?(u=!0,Math.max(f.height,g)):g},-Number.MAX_VALUE),p=r;return u&&(p.height+=m),p}B7._sampleTerrainMostDetailed=eT;var mT=B7;var dqi=S(T(),1);var E_t=new Y,W_t=new Y,I_t=new Y,X_t=new Y,$Se=new se,gA=new Uint8Array(4);function eTe(e,t,n,i){let o=t.height===n.height?0:(e-t.height)/(n.height-t.height);return Y.lerp(t.color,n.color,o,i)}function DB(e,t){return{height:e,color:Y.clone(t)}}function tTe(e){return e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,s=o?t.height===i[n-1].height:!0,a=r?t.height===i[n+1].height:!0;return!s||!a}),e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,s=o?Y.equals(t.color,i[n-1].color):!1,a=r?Y.equals(t.color,i[n+1].color):!1;return!s||!a}),e=e.filter(function(t,n,i){let o=n>0,r=o?Y.equals(t.color,i[n-1].color):!1,s=o?t.height===i[n-1].height:!0;return!r||!s}),e}function P_t(e){let t,n,i=[],o=e.length;for(t=0;t<o;t++){let r=e[t],s=r.entries,a=s.length,c=[];for(n=0;n<a;n++){let g=s[n],f=X.clamp(g.height,ed._minimumHeight,ed._maximumHeight),x=Y.clone(g.color,E_t);x.red*=x.alpha,x.green*=x.alpha,x.blue*=x.alpha,c.push(DB(f,x))}let d=!0,u=!0;for(n=0;n<a-1;n++){let g=c[n+0],f=c[n+1];d=d&&g.height<=f.height,u=u&&g.height>=f.height}u?c=c.reverse():d||Hb(c,function(g,f){return X.sign(g.height-f.height)});let m=y(r.extendDownwards,!1),p=y(r.extendUpwards,!1);c.length===1&&!m&&!p&&(m=!0,p=!0),m&&c.splice(0,0,DB(ed._minimumHeight,c[0].color)),p&&c.splice(c.length,0,DB(ed._maximumHeight,c[c.length-1].color)),c=tTe(c),i.push(c)}return i}function v_t(e){let t=P_t(e),n=[],i=[],o;function r(d,u){n.push(DB(d,u))}function s(d,u,m){let p=Y.multiplyByScalar(m,1-u.alpha,X_t);p=Y.add(p,u,p),r(d,p)}let a=t.length;for(o=0;o<a;o++){let d=t[o],u=0,m=0;i=n,n=[];let p=d.length,g=i.length;for(;u<p||m<g;){let f=u<p?d[u]:void 0,x=u>0?d[u-1]:void 0,_=u<p-1?d[u+1]:void 0,C=m<g?i[m]:void 0,V=m>0?i[m-1]:void 0,Z=m<g-1?i[m+1]:void 0;if(l(f)&&l(C)&&f.height===C.height){let R=l(Z)&&C.height===Z.height,G=!l(V),W=!l(Z),v=l(_)&&f.height===_.height,P=!l(x),F=!l(_);R?v?(s(f.height,f.color,C.color),s(f.height,_.color,Z.color)):P?(r(f.height,C.color),s(f.height,f.color,Z.color)):F?(s(f.height,f.color,C.color),r(f.height,Z.color)):(s(f.height,f.color,C.color),s(f.height,f.color,Z.color)):G?v?(r(f.height,f.color),s(f.height,_.color,C.color)):F?(r(f.height,f.color),r(f.height,C.color)):(P||r(f.height,f.color),s(f.height,f.color,C.color)):W?v?(s(f.height,f.color,C.color),r(f.height,_.color)):P?(r(f.height,C.color),r(f.height,f.color)):F?s(f.height,f.color,C.color):(s(f.height,f.color,C.color),r(f.height,f.color)):v?(s(f.height,f.color,C.color),s(f.height,_.color,C.color)):P?(r(f.height,C.color),s(f.height,f.color,C.color)):F?(s(f.height,f.color,C.color),r(f.height,C.color)):s(f.height,f.color,C.color),u+=v?2:1,m+=R?2:1}else if(l(f)&&l(C)&&l(V)&&f.height<C.height){let R=eTe(f.height,V,C,I_t);l(x)?l(_)?s(f.height,f.color,R):(s(f.height,f.color,R),r(f.height,R)):(r(f.height,R),s(f.height,f.color,R)),u++}else if(l(C)&&l(f)&&l(x)&&C.height<f.height){let R=eTe(C.height,x,f,W_t);l(V)?l(Z)?s(C.height,R,C.color):(s(C.height,R,C.color),r(C.height,R)):(r(C.height,R),s(C.height,R,C.color)),m++}else l(f)&&(!l(C)||f.height<C.height)?(l(C)&&!l(V)&&!l(_)?(r(f.height,f.color),r(f.height,ed._emptyColor),r(C.height,ed._emptyColor)):(!l(C)&&l(V)&&!l(x)&&(r(V.height,ed._emptyColor),r(f.height,ed._emptyColor)),r(f.height,f.color)),u++):l(C)&&(!l(f)||C.height<f.height)&&(r(C.height,C.color),m++)}}return tTe(n)}function ed(e){let{scene:t,layers:n}=y(e,y.EMPTY_OBJECT),{context:i}=t,o=v_t(n),r=o.length,s,a,c;if(!ed._useFloatTexture(i)){a=Ke.UNSIGNED_BYTE,c=at.RGBA,s=new Uint8Array(r*4);for(let g=0;g<r;g++)se.packFloat(o[g].height,$Se),se.pack($Se,s,g*4)}else{a=Ke.FLOAT,c=i.webgl2?at.RED:at.LUMINANCE,s=new Float32Array(r);for(let g=0;g<r;g++)s[g]=o[g].height}let u=Et.create({context:i,pixelFormat:c,pixelDatatype:a,source:{arrayBufferView:s,width:r,height:1},sampler:new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.NEAREST,magnificationFilter:di.NEAREST})}),m=new Uint8Array(r*4);for(let g=0;g<r;g++)o[g].color.toBytes(gA),m[g*4+0]=gA[0],m[g*4+1]=gA[1],m[g*4+2]=gA[2],m[g*4+3]=gA[3];let p=Et.create({context:i,pixelFormat:at.RGBA,pixelDatatype:Ke.UNSIGNED_BYTE,source:{arrayBufferView:m,width:r,height:1},sampler:new rn({wrapS:Cn.CLAMP_TO_EDGE,wrapT:Cn.CLAMP_TO_EDGE,minificationFilter:on.LINEAR,magnificationFilter:di.LINEAR})});return Mi.fromType("ElevationBand",{heights:u,colors:p})}ed._useFloatTexture=function(e){return e.floatingPointTexture};ed._maximumHeight=5906376425472;ed._minimumHeight=-5906376425472;ed._emptyColor=new Y(0,0,0,0);var Y7=ed;var yqi=S(T(),1);async function w_t(e,t){if(t=y(t,{}),t.cacheBytes=y(t.cacheBytes,1536*1024*1024),t.maximumCacheOverflowBytes=y(t.maximumCacheOverflowBytes,1024*1024*1024),t.enableCollision=y(t.enableCollision,!0),e=y(e,jS.defaultApiKey),!l(e))return F_t(t);let n,i=jS.getDefaultCredit();l(i)&&(n=[i]);let o=new Ee({url:`${jS.mapTilesApiEndpoint}3dtiles/root.json`,queryParameters:{key:e},credits:n});return ra.fromUrl(o,t)}var nTe={};async function F_t(e){let i=nTe[2275207];l(i)||(i=dd.fromAssetId(2275207),nTe[2275207]=i);let o=await i;return ra.fromUrl(o,e)}var O7=w_t;var Zqi=S(T(),1);async function A_t(e){let t=await ra.fromIonAssetId(96188,e);e=y(e,y.EMPTY_OBJECT);let n=e.style;if(!l(n)){let i=y(e.defaultColor,Y.WHITE).toCssColorString();n=new nT({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${i}`})}return t.style=n,t}var z7=A_t;var wqi=S(T(),1);function M_t(e){e=y(e,y.EMPTY_OBJECT);let t=[],n=e.geometry;(!l(n.attributes)||!l(n.primitiveType))&&(n=n.constructor.createGeometry(n));let i=n.attributes,o=A.clone(y(e.modelMatrix,A.IDENTITY)),r=y(e.length,1e4);if(l(i.normal)&&t.push(new Tt({geometry:An.createLineSegmentsForVectors(n,"normal",r),attributes:{color:new zt(1,0,0,1)},modelMatrix:o})),l(i.tangent)&&t.push(new Tt({geometry:An.createLineSegmentsForVectors(n,"tangent",r),attributes:{color:new zt(0,1,0,1)},modelMatrix:o})),l(i.bitangent)&&t.push(new Tt({geometry:An.createLineSegmentsForVectors(n,"bitangent",r),attributes:{color:new zt(0,0,1,1)},modelMatrix:o})),t.length>0)return new En({asynchronous:!1,geometryInstances:t,appearance:new ln({flat:!0,translucent:!1})})}var K7=M_t;var Aqi=S(T(),1),H7=`uniform sampler2D u_depthTexture; in vec2 v_textureCoordinates; @@ -15678,49 +15782,49 @@ void main() float scale = pow(z_ndc * 0.5 + 0.5, 8.0); out_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0); } -`;var Bqi=T(S(),1);function O_t(e){e=y(e,y.EMPTY_OBJECT),this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=y(e.pixelFormat,at.RGBA),this.pixelDatatype=y(e.pixelDatatype,ze.UNSIGNED_BYTE);let t=e.url;typeof t=="string"&&(t=Ee.createIfNeeded(t)),this.resource=t;let i=y(e.repeat,!0)?Cn.REPEAT:Cn.CLAMP_TO_EDGE;this.sampler=new rn({wrapS:i,wrapT:i,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var Q7=O_t;var Oqi=T(S(),1),H_t={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat2",MAT4:"mat4"},j7=Object.freeze(H_t);var Kqi=T(S(),1);function z_t(e){async function t({data:i}){let o=[],r={id:i.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=i.baseUrl;try{let s=await e(i.parameters,o);r.result=s}catch(s){s instanceof Error?r.error={name:s.name,message:s.message,stack:s.stack}:r.error=s}i.canTransferArrayBuffer||(o.length=0);try{postMessage(r,o)}catch(s){r.result=void 0,r.error=`postMessage failed with error: ${Ff(s)} - with responseMessage: ${JSON.stringify(r)}`,postMessage(r)}}function n(i){postMessage({id:i.data?.id,error:`postMessage failed with error: ${JSON.stringify(i)}`})}return self.onmessage=t,self.onmessageerror=n,self}var q7=z_t;globalThis.CESIUM_VERSION="1.118.1";var tVo=T(S(),1);var Ixo=T(S(),1);var Zxo=T(S(),1);var yxo=T(S(),1),gA;typeof ko<"u"&&(gA=ko);(function(){/*! +`;var Oqi=S(T(),1);function N_t(e){e=y(e,y.EMPTY_OBJECT),this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=y(e.pixelFormat,at.RGBA),this.pixelDatatype=y(e.pixelDatatype,Ke.UNSIGNED_BYTE);let t=e.url;typeof t=="string"&&(t=Ee.createIfNeeded(t)),this.resource=t;let i=y(e.repeat,!0)?Cn.REPEAT:Cn.CLAMP_TO_EDGE;this.sampler=new rn({wrapS:i,wrapT:i,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var J7=N_t;var Kqi=S(T(),1),U_t={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat2",MAT4:"mat4"},Q7=Object.freeze(U_t);var Qqi=S(T(),1);function k_t(e){async function t({data:i}){let o=[],r={id:i.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=i.baseUrl;try{let s=await e(i.parameters,o);r.result=s}catch(s){s instanceof Error?r.error={name:s.name,message:s.message,stack:s.stack}:r.error=s}i.canTransferArrayBuffer||(o.length=0);try{postMessage(r,o)}catch(s){r.result=void 0,r.error=`postMessage failed with error: ${vf(s)} + with responseMessage: ${JSON.stringify(r)}`,postMessage(r)}}function n(i){postMessage({id:i.data?.id,error:`postMessage failed with error: ${JSON.stringify(i)}`})}return self.onmessage=t,self.onmessageerror=n,self}var j7=k_t;globalThis.CESIUM_VERSION="1.119";var iVo=S(T(),1);var Pxo=S(T(),1);var Exo=S(T(),1);var _xo=S(T(),1),yA;typeof ko<"u"&&(yA=ko);(function(){/*! * Knockout JavaScript library v3.5.1 * (c) The Knockout.js team - http://knockoutjs.com/ * License: MIT (http://www.opensource.org/licenses/mit-license.php) - */(function(){(function(e){var t=this||(0,eval)("this"),n=t.document,i=t.navigator,o=t.jQuery,r=t.JSON;o||typeof jQuery>"u"||(o=jQuery),function(s){s(t.ko={})}(function(s,a){function c(b,R){return b===null||typeof b in x?b===R:!1}function d(b,R){var E;return function(){E||(E=f.a.setTimeout(function(){E=e,b()},R))}}function u(b,R){var E;return function(){clearTimeout(E),E=f.a.setTimeout(b,R)}}function m(b,R){R&&R!=="change"?R==="beforeChange"?this.pc(b):this.gb(b,R):this.qc(b)}function p(b,R){R!==null&&R.s&&R.s()}function g(b,R){var E=this.qd,I=E[Z];I.ra||(this.Qb&&this.mb[R]?(E.uc(R,b,this.mb[R]),this.mb[R]=null,--this.Qb):I.I[R]||E.uc(R,b,I.J?{da:b}:E.$c(b)),b.Ja&&b.gd())}var f=typeof s<"u"?s:{};f.b=function(b,R){for(var E=b.split("."),I=f,w=0;w<E.length-1;w++)I=I[E[w]];I[E[E.length-1]]=R},f.L=function(b,R,E){b[R]=E},f.version="3.5.1",f.b("version",f.version),f.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},f.a=function(){function b(z,j){for(var q in z)w.call(z,q)&&j(q,z[q])}function R(z,j){if(j)for(var q in j)w.call(j,q)&&(z[q]=j[q]);return z}function E(z,j){return z.__proto__=j,z}function I(z,j,q,be){var Te=z[j].match(H)||[];f.a.D(q.match(H),function(ae){f.a.Na(Te,ae,be)}),z[j]=Te.join(" ")}var w=Object.prototype.hasOwnProperty,N={__proto__:[]}instanceof Array,B=typeof Symbol=="function",U={},O={};U[i&&/Firefox\/2/i.test(i.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],U.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),b(U,function(z,j){if(j.length)for(var q=0,be=j.length;q<be;q++)O[j[q]]=z});var k={propertychange:!0},J=n&&function(){for(var z=3,j=n.createElement("div"),q=j.getElementsByTagName("i");j.innerHTML="<!--[if gt IE "+ ++z+"]><i></i><![endif]-->",q[0];);return 4<z?z:e}(),H=/\S+/g,ee;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(z,j,q){for(var be=0,Te=z.length;be<Te;be++)j.call(q,z[be],be,z)},A:typeof Array.prototype.indexOf=="function"?function(z,j){return Array.prototype.indexOf.call(z,j)}:function(z,j){for(var q=0,be=z.length;q<be;q++)if(z[q]===j)return q;return-1},Lb:function(z,j,q){for(var be=0,Te=z.length;be<Te;be++)if(j.call(q,z[be],be,z))return z[be];return e},Pa:function(z,j){var q=f.a.A(z,j);0<q?z.splice(q,1):q===0&&z.shift()},wc:function(z){var j=[];return z&&f.a.D(z,function(q){0>f.a.A(j,q)&&j.push(q)}),j},Mb:function(z,j,q){var be=[];if(z)for(var Te=0,ae=z.length;Te<ae;Te++)be.push(j.call(q,z[Te],Te));return be},jb:function(z,j,q){var be=[];if(z)for(var Te=0,ae=z.length;Te<ae;Te++)j.call(q,z[Te],Te)&&be.push(z[Te]);return be},Nb:function(z,j){if(j instanceof Array)z.push.apply(z,j);else for(var q=0,be=j.length;q<be;q++)z.push(j[q]);return z},Na:function(z,j,q){var be=f.a.A(f.a.bc(z),j);0>be?q&&z.push(j):q||z.splice(be,1)},Ba:N,extend:R,setPrototypeOf:E,Ab:N?E:R,P:b,Ga:function(z,j,q){if(!z)return z;var be={},Te;for(Te in z)w.call(z,Te)&&(be[Te]=j.call(q,z[Te],Te,z));return be},Tb:function(z){for(;z.firstChild;)f.removeNode(z.firstChild)},Yb:function(z){z=f.a.la(z);for(var j=(z[0]&&z[0].ownerDocument||n).createElement("div"),q=0,be=z.length;q<be;q++)j.appendChild(f.oa(z[q]));return j},Ca:function(z,j){for(var q=0,be=z.length,Te=[];q<be;q++){var ae=z[q].cloneNode(!0);Te.push(j?f.oa(ae):ae)}return Te},va:function(z,j){if(f.a.Tb(z),j)for(var q=0,be=j.length;q<be;q++)z.appendChild(j[q])},Xc:function(z,j){var q=z.nodeType?[z]:z;if(0<q.length){for(var be=q[0],Te=be.parentNode,ae=0,ye=j.length;ae<ye;ae++)Te.insertBefore(j[ae],be);for(ae=0,ye=q.length;ae<ye;ae++)f.removeNode(q[ae])}},Ua:function(z,j){if(z.length){for(j=j.nodeType===8&&j.parentNode||j;z.length&&z[0].parentNode!==j;)z.splice(0,1);for(;1<z.length&&z[z.length-1].parentNode!==j;)z.length--;if(1<z.length){var q=z[0],be=z[z.length-1];for(z.length=0;q!==be;)z.push(q),q=q.nextSibling;z.push(be)}}return z},Zc:function(z,j){7>J?z.setAttribute("selected",j):z.selected=j},Db:function(z){return z===null||z===e?"":z.trim?z.trim():z.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(z,j){return z=z||"",j.length>z.length?!1:z.substring(0,j.length)===j},vd:function(z,j){if(z===j)return!0;if(z.nodeType===11)return!1;if(j.contains)return j.contains(z.nodeType!==1?z.parentNode:z);if(j.compareDocumentPosition)return(j.compareDocumentPosition(z)&16)==16;for(;z&&z!=j;)z=z.parentNode;return!!z},Sb:function(z){return f.a.vd(z,z.ownerDocument.documentElement)},kd:function(z){return!!f.a.Lb(z,f.a.Sb)},R:function(z){return z&&z.tagName&&z.tagName.toLowerCase()},Ac:function(z){return f.onError?function(){try{return z.apply(this,arguments)}catch(j){throw f.onError&&f.onError(j),j}}:z},setTimeout:function(z,j){return setTimeout(f.a.Ac(z),j)},Gc:function(z){setTimeout(function(){throw f.onError&&f.onError(z),z},0)},B:function(z,j,q){var be=f.a.Ac(q);if(q=k[j],f.options.useOnlyNativeEvents||q||!o)if(q||typeof z.addEventListener!="function")if(typeof z.attachEvent<"u"){var Te=function(ye){be.call(z,ye)},ae="on"+j;z.attachEvent(ae,Te),f.a.K.za(z,function(){z.detachEvent(ae,Te)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else z.addEventListener(j,be,!1);else ee||(ee=typeof o(z).on=="function"?"on":"bind"),o(z)[ee](j,be)},Fb:function(z,j){if(!z||!z.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var q;if(f.a.R(z)==="input"&&z.type&&j.toLowerCase()=="click"?(q=z.type,q=q=="checkbox"||q=="radio"):q=!1,f.options.useOnlyNativeEvents||!o||q)if(typeof n.createEvent=="function")if(typeof z.dispatchEvent=="function")q=n.createEvent(O[j]||"HTMLEvents"),q.initEvent(j,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,z),z.dispatchEvent(q);else throw Error("The supplied element doesn't support dispatchEvent");else if(q&&z.click)z.click();else if(typeof z.fireEvent<"u")z.fireEvent("on"+j);else throw Error("Browser doesn't support triggering events");else o(z).trigger(j)},f:function(z){return f.O(z)?z():z},bc:function(z){return f.O(z)?z.v():z},Eb:function(z,j,q){var be;j&&(typeof z.classList=="object"?(be=z.classList[q?"add":"remove"],f.a.D(j.match(H),function(Te){be.call(z.classList,Te)})):typeof z.className.baseVal=="string"?I(z.className,"baseVal",j,q):I(z,"className",j,q))},Bb:function(z,j){var q=f.a.f(j);(q===null||q===e)&&(q="");var be=f.h.firstChild(z);!be||be.nodeType!=3||f.h.nextSibling(be)?f.h.va(z,[z.ownerDocument.createTextNode(q)]):be.data=q,f.a.Ad(z)},Yc:function(z,j){if(z.name=j,7>=J)try{var q=z.name.replace(/[&<>'"]/g,function(be){return"&#"+be.charCodeAt(0)+";"});z.mergeAttributes(n.createElement("<input name='"+q+"'/>"),!1)}catch{}},Ad:function(z){9<=J&&(z=z.nodeType==1?z:z.parentNode,z.style&&(z.style.zoom=z.style.zoom))},wd:function(z){if(J){var j=z.style.width;z.style.width=0,z.style.width=j}},Pd:function(z,j){z=f.a.f(z),j=f.a.f(j);for(var q=[],be=z;be<=j;be++)q.push(be);return q},la:function(z){for(var j=[],q=0,be=z.length;q<be;q++)j.push(z[q]);return j},Da:function(z){return B?Symbol(z):z},Zd:J===6,$d:J===7,W:J,Lc:function(z,j){for(var q=f.a.la(z.getElementsByTagName("input")).concat(f.a.la(z.getElementsByTagName("textarea"))),be=typeof j=="string"?function(ye){return ye.name===j}:function(ye){return j.test(ye.name)},Te=[],ae=q.length-1;0<=ae;ae--)be(q[ae])&&Te.push(q[ae]);return Te},Nd:function(z){return typeof z=="string"&&(z=f.a.Db(z))?r&&r.parse?r.parse(z):new Function("return "+z)():null},hc:function(z,j,q){if(!r||!r.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return r.stringify(f.a.f(z),j,q)},Od:function(z,j,q){q=q||{};var be=q.params||{},Te=q.includeFields||this.Jc,ae=z;if(typeof z=="object"&&f.a.R(z)==="form")for(var ae=z.action,ye=Te.length-1;0<=ye;ye--)for(var Se=f.a.Lc(z,Te[ye]),Le=Se.length-1;0<=Le;Le--)be[Se[Le].name]=Se[Le].value;j=f.a.f(j);var Xe=n.createElement("form");Xe.style.display="none",Xe.action=ae,Xe.method="post";for(var Pe in j)z=n.createElement("input"),z.type="hidden",z.name=Pe,z.value=f.a.hc(f.a.f(j[Pe])),Xe.appendChild(z);b(be,function(ke,Pt){var Ot=n.createElement("input");Ot.type="hidden",Ot.name=ke,Ot.value=Pt,Xe.appendChild(Ot)}),n.body.appendChild(Xe),q.submitter?q.submitter(Xe):Xe.submit(),setTimeout(function(){Xe.parentNode.removeChild(Xe)},0)}}}(),f.b("utils",f.a),f.b("utils.arrayForEach",f.a.D),f.b("utils.arrayFirst",f.a.Lb),f.b("utils.arrayFilter",f.a.jb),f.b("utils.arrayGetDistinctValues",f.a.wc),f.b("utils.arrayIndexOf",f.a.A),f.b("utils.arrayMap",f.a.Mb),f.b("utils.arrayPushAll",f.a.Nb),f.b("utils.arrayRemoveItem",f.a.Pa),f.b("utils.cloneNodes",f.a.Ca),f.b("utils.createSymbolOrString",f.a.Da),f.b("utils.extend",f.a.extend),f.b("utils.fieldsIncludedWithJsonPost",f.a.Jc),f.b("utils.getFormFields",f.a.Lc),f.b("utils.objectMap",f.a.Ga),f.b("utils.peekObservable",f.a.bc),f.b("utils.postJson",f.a.Od),f.b("utils.parseJson",f.a.Nd),f.b("utils.registerEventHandler",f.a.B),f.b("utils.stringifyJson",f.a.hc),f.b("utils.range",f.a.Pd),f.b("utils.toggleDomNodeCssClass",f.a.Eb),f.b("utils.triggerEvent",f.a.Fb),f.b("utils.unwrapObservable",f.a.f),f.b("utils.objectForEach",f.a.P),f.b("utils.addOrRemoveItem",f.a.Na),f.b("utils.setTextContent",f.a.Bb),f.b("unwrap",f.a.f),Function.prototype.bind||(Function.prototype.bind=function(b){var R=this;if(arguments.length===1)return function(){return R.apply(b,arguments)};var E=Array.prototype.slice.call(arguments,1);return function(){var I=E.slice(0);return I.push.apply(I,arguments),R.apply(b,I)}}),f.a.g=new function(){var b=0,R="__ko__"+new Date().getTime(),E={},I,w;return f.a.W?(I=function(N,B){var U=N[R];if(!U||U==="null"||!E[U]){if(!B)return e;U=N[R]="ko"+b++,E[U]={}}return E[U]},w=function(N){var B=N[R];return B?(delete E[B],N[R]=null,!0):!1}):(I=function(N,B){var U=N[R];return!U&&B&&(U=N[R]={}),U},w=function(N){return N[R]?(delete N[R],!0):!1}),{get:function(N,B){var U=I(N,!1);return U&&U[B]},set:function(N,B,U){(N=I(N,U!==e))&&(N[B]=U)},Ub:function(N,B,U){return N=I(N,!0),N[B]||(N[B]=U)},clear:w,Z:function(){return b+++R}}},f.b("utils.domData",f.a.g),f.b("utils.domData.clear",f.a.g.clear),f.a.K=new function(){function b(B,U){var O=f.a.g.get(B,I);return O===e&&U&&(O=[],f.a.g.set(B,I,O)),O}function R(B){var U=b(B,!1);if(U)for(var U=U.slice(0),O=0;O<U.length;O++)U[O](B);f.a.g.clear(B),f.a.K.cleanExternalData(B),N[B.nodeType]&&E(B.childNodes,!0)}function E(B,U){for(var O=[],k,J=0;J<B.length;J++)if((!U||B[J].nodeType===8)&&(R(O[O.length]=k=B[J]),B[J]!==k))for(;J--&&f.a.A(O,B[J])==-1;);}var I=f.a.g.Z(),w={1:!0,8:!0,9:!0},N={1:!0,9:!0};return{za:function(B,U){if(typeof U!="function")throw Error("Callback must be a function");b(B,!0).push(U)},yb:function(B,U){var O=b(B,!1);O&&(f.a.Pa(O,U),O.length==0&&f.a.g.set(B,I,e))},oa:function(B){return f.u.G(function(){w[B.nodeType]&&(R(B),N[B.nodeType]&&E(B.getElementsByTagName("*")))}),B},removeNode:function(B){f.oa(B),B.parentNode&&B.parentNode.removeChild(B)},cleanExternalData:function(B){o&&typeof o.cleanData=="function"&&o.cleanData([B])}}},f.oa=f.a.K.oa,f.removeNode=f.a.K.removeNode,f.b("cleanNode",f.oa),f.b("removeNode",f.removeNode),f.b("utils.domNodeDisposal",f.a.K),f.b("utils.domNodeDisposal.addDisposeCallback",f.a.K.za),f.b("utils.domNodeDisposal.removeDisposeCallback",f.a.K.yb),function(){var b=[0,"",""],R=[1,"<table>","</table>"],E=[3,"<table><tbody><tr>","</tr></tbody></table>"],I=[1,"<select multiple='multiple'>","</select>"],w={thead:R,tbody:R,tfoot:R,tr:[2,"<table><tbody>","</tbody></table>"],td:E,th:E,option:I,optgroup:I},N=8>=f.a.W;f.a.ua=function(B,U){var O;if(o){if(o.parseHTML)O=o.parseHTML(B,U)||[];else if((O=o.clean([B],U))&&O[0]){for(var k=O[0];k.parentNode&&k.parentNode.nodeType!==11;)k=k.parentNode;k.parentNode&&k.parentNode.removeChild(k)}}else{(O=U)||(O=n);var k=O.parentWindow||O.defaultView||t,J=f.a.Db(B).toLowerCase(),H=O.createElement("div"),ee;for(ee=(J=J.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&w[J[1]]||b,J=ee[0],ee="ignored<div>"+ee[1]+B+ee[2]+"</div>",typeof k.innerShiv=="function"?H.appendChild(k.innerShiv(ee)):(N&&O.body.appendChild(H),H.innerHTML=ee,N&&H.parentNode.removeChild(H));J--;)H=H.lastChild;O=f.a.la(H.lastChild.childNodes)}return O},f.a.Md=function(B,U){var O=f.a.ua(B,U);return O.length&&O[0].parentElement||f.a.Yb(O)},f.a.fc=function(B,U){if(f.a.Tb(B),U=f.a.f(U),U!==null&&U!==e)if(typeof U!="string"&&(U=U.toString()),o)o(B).html(U);else for(var O=f.a.ua(U,B.ownerDocument),k=0;k<O.length;k++)B.appendChild(O[k])}}(),f.b("utils.parseHtmlFragment",f.a.ua),f.b("utils.setHtml",f.a.fc),f.aa=function(){function b(E,I){if(E){if(E.nodeType==8){var w=f.aa.Uc(E.nodeValue);w!=null&&I.push({ud:E,Kd:w})}else if(E.nodeType==1)for(var w=0,N=E.childNodes,B=N.length;w<B;w++)b(N[w],I)}}var R={};return{Xb:function(E){if(typeof E!="function")throw Error("You can only pass a function to ko.memoization.memoize()");var I=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return R[I]=E,"<!--[ko_memo:"+I+"]-->"},bd:function(E,I){var w=R[E];if(w===e)throw Error("Couldn't find any memo with ID "+E+". Perhaps it's already been unmemoized.");try{return w.apply(null,I||[]),!0}finally{delete R[E]}},cd:function(E,I){var w=[];b(E,w);for(var N=0,B=w.length;N<B;N++){var U=w[N].ud,O=[U];I&&f.a.Nb(O,I),f.aa.bd(w[N].Kd,O),U.nodeValue="",U.parentNode&&U.parentNode.removeChild(U)}},Uc:function(E){return(E=E.match(/^\[ko_memo\:(.*?)\]$/))?E[1]:null}}}(),f.b("memoization",f.aa),f.b("memoization.memoize",f.aa.Xb),f.b("memoization.unmemoize",f.aa.bd),f.b("memoization.parseMemoText",f.aa.Uc),f.b("memoization.unmemoizeDomNodeAndDescendants",f.aa.cd),f.na=function(){function b(){if(w){for(var U=w,O=0,k;B<w;)if(k=I[B++]){if(B>U){if(5e3<=++O){B=w,f.a.Gc(Error("'Too much recursion' after processing "+O+" task groups."));break}U=w}try{k()}catch(J){f.a.Gc(J)}}}}function R(){b(),B=w=I.length=0}var E,I=[],w=0,N=1,B=0;return t.MutationObserver?E=function(U){var O=n.createElement("div");return new MutationObserver(U).observe(O,{attributes:!0}),function(){O.classList.toggle("foo")}}(R):E=n&&"onreadystatechange"in n.createElement("script")?function(U){var O=n.createElement("script");O.onreadystatechange=function(){O.onreadystatechange=null,n.documentElement.removeChild(O),O=null,U()},n.documentElement.appendChild(O)}:function(U){setTimeout(U,0)},{scheduler:E,zb:function(U){return w||f.na.scheduler(R),I[w++]=U,N++},cancel:function(U){U=U-(N-w),U>=B&&U<w&&(I[U]=null)},resetForTesting:function(){var U=w-B;return B=w=I.length=0,U},Sd:b}}(),f.b("tasks",f.na),f.b("tasks.schedule",f.na.zb),f.b("tasks.runEarly",f.na.Sd),f.Ta={throttle:function(b,R){b.throttleEvaluation=R;var E=null;return f.$({read:b,write:function(I){clearTimeout(E),E=f.a.setTimeout(function(){b(I)},R)}})},rateLimit:function(b,R){var E,I,w;typeof R=="number"?E=R:(E=R.timeout,I=R.method),b.Hb=!1,w=typeof I=="function"?I:I=="notifyWhenChangesStop"?u:d,b.ub(function(N){return w(N,E,R)})},deferred:function(b,R){if(R!==!0)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");b.Hb||(b.Hb=!0,b.ub(function(E){var I,w=!1;return function(){if(!w){f.na.cancel(I),I=f.na.zb(E);try{w=!0,b.notifySubscribers(e,"dirty")}finally{w=!1}}}}))},notify:function(b,R){b.equalityComparer=R=="always"?null:c}};var x={undefined:1,boolean:1,number:1,string:1};f.b("extenders",f.Ta),f.ic=function(b,R,E){this.da=b,this.lc=R,this.mc=E,this.Ib=!1,this.fb=this.Jb=null,f.L(this,"dispose",this.s),f.L(this,"disposeWhenNodeIsRemoved",this.l)},f.ic.prototype.s=function(){this.Ib||(this.fb&&f.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},f.ic.prototype.l=function(b){this.Jb=b,f.a.K.za(b,this.fb=this.s.bind(this))},f.T=function(){f.a.Ab(this,_),_.qb(this)};var _={qb:function(b){b.U={change:[]},b.sc=1},subscribe:function(b,R,E){var I=this;E=E||"change";var w=new f.ic(I,R?b.bind(R):b,function(){f.a.Pa(I.U[E],w),I.hb&&I.hb(E)});return I.Qa&&I.Qa(E),I.U[E]||(I.U[E]=[]),I.U[E].push(w),w},notifySubscribers:function(b,R){if(R=R||"change",R==="change"&&this.Gb(),this.Wa(R)){var E=R==="change"&&this.ed||this.U[R].slice(0);try{f.u.xc();for(var I=0,w;w=E[I];++I)w.Ib||w.lc(b)}finally{f.u.end()}}},ob:function(){return this.sc},Dd:function(b){return this.ob()!==b},Gb:function(){++this.sc},ub:function(b){var R=this,E=f.O(R),I,w,N,B,U;R.gb||(R.gb=R.notifySubscribers,R.notifySubscribers=m);var O=b(function(){R.Ja=!1,E&&B===R&&(B=R.nc?R.nc():R());var k=w||U&&R.sb(N,B);U=w=I=!1,k&&R.gb(N=B)});R.qc=function(k,J){J&&R.Ja||(U=!J),R.ed=R.U.change.slice(0),R.Ja=I=!0,B=k,O()},R.pc=function(k){I||(N=k,R.gb(k,"beforeChange"))},R.rc=function(){U=!0},R.gd=function(){R.sb(N,R.v(!0))&&(w=!0)}},Wa:function(b){return this.U[b]&&this.U[b].length},Bd:function(b){if(b)return this.U[b]&&this.U[b].length||0;var R=0;return f.a.P(this.U,function(E,I){E!=="dirty"&&(R+=I.length)}),R},sb:function(b,R){return!this.equalityComparer||!this.equalityComparer(b,R)},toString:function(){return"[object Object]"},extend:function(b){var R=this;return b&&f.a.P(b,function(E,I){var w=f.Ta[E];typeof w=="function"&&(R=w(R,I)||R)}),R}};f.L(_,"init",_.qb),f.L(_,"subscribe",_.subscribe),f.L(_,"extend",_.extend),f.L(_,"getSubscriptionsCount",_.Bd),f.a.Ba&&f.a.setPrototypeOf(_,Function.prototype),f.T.fn=_,f.Qc=function(b){return b!=null&&typeof b.subscribe=="function"&&typeof b.notifySubscribers=="function"},f.b("subscribable",f.T),f.b("isSubscribable",f.Qc),f.S=f.u=function(){function b(N){E.push(I),I=N}function R(){I=E.pop()}var E=[],I,w=0;return{xc:b,end:R,cc:function(N){if(I){if(!f.Qc(N))throw Error("Only subscribable things can act as dependencies");I.od.call(I.pd,N,N.fd||(N.fd=++w))}},G:function(N,B,U){try{return b(),N.apply(B,U||[])}finally{R()}},qa:function(){if(I)return I.o.qa()},Va:function(){if(I)return I.o.Va()},Ya:function(){if(I)return I.Ya},o:function(){if(I)return I.o}}}(),f.b("computedContext",f.S),f.b("computedContext.getDependenciesCount",f.S.qa),f.b("computedContext.getDependencies",f.S.Va),f.b("computedContext.isInitial",f.S.Ya),f.b("computedContext.registerDependency",f.S.cc),f.b("ignoreDependencies",f.Yd=f.u.G);var C=f.a.Da("_latestValue");f.ta=function(b){function R(){return 0<arguments.length?(R.sb(R[C],arguments[0])&&(R.ya(),R[C]=arguments[0],R.xa()),this):(f.u.cc(R),R[C])}return R[C]=b,f.a.Ba||f.a.extend(R,f.T.fn),f.T.fn.qb(R),f.a.Ab(R,V),f.options.deferUpdates&&f.Ta.deferred(R,!0),R};var V={equalityComparer:c,v:function(){return this[C]},xa:function(){this.notifySubscribers(this[C],"spectate"),this.notifySubscribers(this[C])},ya:function(){this.notifySubscribers(this[C],"beforeChange")}};f.a.Ba&&f.a.setPrototypeOf(V,f.T.fn);var L=f.ta.Ma="__ko_proto__";V[L]=f.ta,f.O=function(b){if((b=typeof b=="function"&&b[L])&&b!==V[L]&&b!==f.o.fn[L])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!b},f.Za=function(b){return typeof b=="function"&&(b[L]===V[L]||b[L]===f.o.fn[L]&&b.Nc)},f.b("observable",f.ta),f.b("isObservable",f.O),f.b("isWriteableObservable",f.Za),f.b("isWritableObservable",f.Za),f.b("observable.fn",V),f.L(V,"peek",V.v),f.L(V,"valueHasMutated",V.xa),f.L(V,"valueWillMutate",V.ya),f.Ha=function(b){if(b=b||[],typeof b!="object"||!("length"in b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return b=f.ta(b),f.a.Ab(b,f.Ha.fn),b.extend({trackArrayChanges:!0})},f.Ha.fn={remove:function(b){for(var R=this.v(),E=[],I=typeof b!="function"||f.O(b)?function(B){return B===b}:b,w=0;w<R.length;w++){var N=R[w];if(I(N)){if(E.length===0&&this.ya(),R[w]!==N)throw Error("Array modified during remove; cannot remove item");E.push(N),R.splice(w,1),w--}}return E.length&&this.xa(),E},removeAll:function(b){if(b===e){var R=this.v(),E=R.slice(0);return this.ya(),R.splice(0,R.length),this.xa(),E}return b?this.remove(function(I){return 0<=f.a.A(b,I)}):[]},destroy:function(b){var R=this.v(),E=typeof b!="function"||f.O(b)?function(N){return N===b}:b;this.ya();for(var I=R.length-1;0<=I;I--){var w=R[I];E(w)&&(w._destroy=!0)}this.xa()},destroyAll:function(b){return b===e?this.destroy(function(){return!0}):b?this.destroy(function(R){return 0<=f.a.A(b,R)}):[]},indexOf:function(b){var R=this();return f.a.A(R,b)},replace:function(b,R){var E=this.indexOf(b);0<=E&&(this.ya(),this.v()[E]=R,this.xa())},sorted:function(b){var R=this().slice(0);return b?R.sort(b):R.sort()},reversed:function(){return this().slice(0).reverse()}},f.a.Ba&&f.a.setPrototypeOf(f.Ha.fn,f.ta.fn),f.a.D("pop push reverse shift sort splice unshift".split(" "),function(b){f.Ha.fn[b]=function(){var R=this.v();this.ya(),this.zc(R,b,arguments);var E=R[b].apply(R,arguments);return this.xa(),E===R?this:E}}),f.a.D(["slice"],function(b){f.Ha.fn[b]=function(){var R=this();return R[b].apply(R,arguments)}}),f.Pc=function(b){return f.O(b)&&typeof b.remove=="function"&&typeof b.push=="function"},f.b("observableArray",f.Ha),f.b("isObservableArray",f.Pc),f.Ta.trackArrayChanges=function(b,R){function E(){function H(){if(U){var ee=[].concat(b.v()||[]),z;b.Wa("arrayChange")&&((!w||1<U)&&(w=f.a.Pb(O,ee,b.Ob)),z=w),O=ee,w=null,U=0,z&&z.length&&b.notifySubscribers(z,"arrayChange")}}I?H():(I=!0,B=b.subscribe(function(){++U},null,"spectate"),O=[].concat(b.v()||[]),w=null,N=b.subscribe(H))}if(b.Ob={},R&&typeof R=="object"&&f.a.extend(b.Ob,R),b.Ob.sparse=!0,!b.zc){var I=!1,w=null,N,B,U=0,O,k=b.Qa,J=b.hb;b.Qa=function(H){k&&k.call(b,H),H==="arrayChange"&&E()},b.hb=function(H){J&&J.call(b,H),H!=="arrayChange"||b.Wa("arrayChange")||(N&&N.s(),B&&B.s(),B=N=null,I=!1,O=e)},b.zc=function(H,ee,z){function j(Xe,Pe,ke){return q[q.length]={status:Xe,value:Pe,index:ke}}if(I&&!U){var q=[],be=H.length,Te=z.length,ae=0;switch(ee){case"push":ae=be;case"unshift":for(ee=0;ee<Te;ee++)j("added",z[ee],ae+ee);break;case"pop":ae=be-1;case"shift":be&&j("deleted",H[ae],ae);break;case"splice":ee=Math.min(Math.max(0,0>z[0]?be+z[0]:z[0]),be);for(var be=Te===1?be:Math.min(ee+(z[1]||0),be),Te=ee+Te-2,ae=Math.max(be,Te),ye=[],Se=[],Le=2;ee<ae;++ee,++Le)ee<be&&Se.push(j("deleted",H[ee],ee)),ee<Te&&ye.push(j("added",z[Le],ee));f.a.Kc(Se,ye);break;default:return}w=q}}}};var Z=f.a.Da("_state");f.o=f.$=function(b,R,E){function I(){if(0<arguments.length){if(typeof w=="function")w.apply(N.nb,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}return N.ra||f.u.cc(I),(N.ka||N.J&&I.Xa())&&I.ha(),N.X}if(typeof b=="object"?E=b:(E=E||{},b&&(E.read=b)),typeof E.read!="function")throw Error("Pass a function that returns the value of the ko.computed");var w=E.write,N={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:E.read,nb:R||E.owner,l:E.disposeWhenNodeIsRemoved||E.l||null,Sa:E.disposeWhen||E.Sa,Rb:null,I:{},V:0,Ic:null};return I[Z]=N,I.Nc=typeof w=="function",f.a.Ba||f.a.extend(I,f.T.fn),f.T.fn.qb(I),f.a.Ab(I,G),E.pure?(N.wb=!0,N.J=!0,f.a.extend(I,X)):E.deferEvaluation&&f.a.extend(I,v),f.options.deferUpdates&&f.Ta.deferred(I,!0),N.l&&(N.jc=!0,N.l.nodeType||(N.l=null)),N.J||E.deferEvaluation||I.ha(),N.l&&I.ja()&&f.a.K.za(N.l,N.Rb=function(){I.s()}),I};var G={equalityComparer:c,qa:function(){return this[Z].V},Va:function(){var b=[];return f.a.P(this[Z].I,function(R,E){b[E.Ka]=E.da}),b},Vb:function(b){if(!this[Z].V)return!1;var R=this.Va();return f.a.A(R,b)!==-1?!0:!!f.a.Lb(R,function(E){return E.Vb&&E.Vb(b)})},uc:function(b,R,E){if(this[Z].wb&&R===this)throw Error("A 'pure' computed must not be called recursively");this[Z].I[b]=E,E.Ka=this[Z].V++,E.La=R.ob()},Xa:function(){var b,R,E=this[Z].I;for(b in E)if(Object.prototype.hasOwnProperty.call(E,b)&&(R=E[b],this.Ia&&R.da.Ja||R.da.Dd(R.La)))return!0},Jd:function(){this.Ia&&!this[Z].rb&&this.Ia(!1)},ja:function(){var b=this[Z];return b.ka||0<b.V},Rd:function(){this.Ja?this[Z].ka&&(this[Z].sa=!0):this.Hc()},$c:function(b){if(b.Hb){var R=b.subscribe(this.Jd,this,"dirty"),E=b.subscribe(this.Rd,this);return{da:b,s:function(){R.s(),E.s()}}}return b.subscribe(this.Hc,this)},Hc:function(){var b=this,R=b.throttleEvaluation;R&&0<=R?(clearTimeout(this[Z].Ic),this[Z].Ic=f.a.setTimeout(function(){b.ha(!0)},R)):b.Ia?b.Ia(!0):b.ha(!0)},ha:function(b){var R=this[Z],E=R.Sa,I=!1;if(!R.rb&&!R.ra){if(R.l&&!f.a.Sb(R.l)||E&&E()){if(!R.jc){this.s();return}}else R.jc=!1;R.rb=!0;try{I=this.zd(b)}finally{R.rb=!1}return I}},zd:function(b){var R=this[Z],I=!1,E=R.wb?e:!R.V,I={qd:this,mb:R.I,Qb:R.V};f.u.xc({pd:I,od:g,o:this,Ya:E}),R.I={},R.V=0;var w=this.yd(R,I);return R.V?I=this.sb(R.X,w):(this.s(),I=!0),I&&(R.J?this.Gb():this.notifySubscribers(R.X,"beforeChange"),R.X=w,this.notifySubscribers(R.X,"spectate"),!R.J&&b&&this.notifySubscribers(R.X),this.rc&&this.rc()),E&&this.notifySubscribers(R.X,"awake"),I},yd:function(b,R){try{var E=b.Wc;return b.nb?E.call(b.nb):E()}finally{f.u.end(),R.Qb&&!b.J&&f.a.P(R.mb,p),b.sa=b.ka=!1}},v:function(b){var R=this[Z];return(R.ka&&(b||!R.V)||R.J&&this.Xa())&&this.ha(),R.X},ub:function(b){f.T.fn.ub.call(this,b),this.nc=function(){return this[Z].J||(this[Z].sa?this.ha():this[Z].ka=!1),this[Z].X},this.Ia=function(R){this.pc(this[Z].X),this[Z].ka=!0,R&&(this[Z].sa=!0),this.qc(this,!R)}},s:function(){var b=this[Z];!b.J&&b.I&&f.a.P(b.I,function(R,E){E.s&&E.s()}),b.l&&b.Rb&&f.a.K.yb(b.l,b.Rb),b.I=e,b.V=0,b.ra=!0,b.sa=!1,b.ka=!1,b.J=!1,b.l=e,b.Sa=e,b.Wc=e,this.Nc||(b.nb=e)}},X={Qa:function(b){var R=this,E=R[Z];if(!E.ra&&E.J&&b=="change"){if(E.J=!1,E.sa||R.Xa())E.I=null,E.V=0,R.ha()&&R.Gb();else{var I=[];f.a.P(E.I,function(w,N){I[N.Ka]=w}),f.a.D(I,function(w,N){var B=E.I[w],U=R.$c(B.da);U.Ka=N,U.La=B.La,E.I[w]=U}),R.Xa()&&R.ha()&&R.Gb()}E.ra||R.notifySubscribers(E.X,"awake")}},hb:function(b){var R=this[Z];R.ra||b!="change"||this.Wa("change")||(f.a.P(R.I,function(E,I){I.s&&(R.I[E]={da:I.da,Ka:I.Ka,La:I.La},I.s())}),R.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var b=this[Z];return b.J&&(b.sa||this.Xa())&&this.ha(),f.T.fn.ob.call(this)}},v={Qa:function(b){b!="change"&&b!="beforeChange"||this.v()}};f.a.Ba&&f.a.setPrototypeOf(G,f.T.fn);var P=f.ta.Ma;G[P]=f.o,f.Oc=function(b){return typeof b=="function"&&b[P]===G[P]},f.Fd=function(b){return f.Oc(b)&&b[Z]&&b[Z].wb},f.b("computed",f.o),f.b("dependentObservable",f.o),f.b("isComputed",f.Oc),f.b("isPureComputed",f.Fd),f.b("computed.fn",G),f.L(G,"peek",G.v),f.L(G,"dispose",G.s),f.L(G,"isActive",G.ja),f.L(G,"getDependenciesCount",G.qa),f.L(G,"getDependencies",G.Va),f.xb=function(b,R){return typeof b=="function"?f.o(b,R,{pure:!0}):(b=f.a.extend({},b),b.pure=!0,f.o(b,R))},f.b("pureComputed",f.xb),function(){function b(I,w,N){if(N=N||new E,I=w(I),typeof I!="object"||I===null||I===e||I instanceof RegExp||I instanceof Date||I instanceof String||I instanceof Number||I instanceof Boolean)return I;var B=I instanceof Array?[]:{};return N.save(I,B),R(I,function(U){var O=w(I[U]);switch(typeof O){case"boolean":case"number":case"string":case"function":B[U]=O;break;case"object":case"undefined":var k=N.get(O);B[U]=k!==e?k:b(O,w,N)}}),B}function R(I,w){if(I instanceof Array){for(var N=0;N<I.length;N++)w(N);typeof I.toJSON=="function"&&w("toJSON")}else for(N in I)w(N)}function E(){this.keys=[],this.values=[]}f.ad=function(I){if(arguments.length==0)throw Error("When calling ko.toJS, pass the object you want to convert.");return b(I,function(w){for(var N=0;f.O(w)&&10>N;N++)w=w();return w})},f.toJSON=function(I,w,N){return I=f.ad(I),f.a.hc(I,w,N)},E.prototype={constructor:E,save:function(I,w){var N=f.a.A(this.keys,I);0<=N?this.values[N]=w:(this.keys.push(I),this.values.push(w))},get:function(I){return I=f.a.A(this.keys,I),0<=I?this.values[I]:e}}}(),f.b("toJS",f.ad),f.b("toJSON",f.toJSON),f.Wd=function(b,R,E){function I(w){var N=f.xb(b,E).extend({ma:"always"}),B=N.subscribe(function(U){U&&(B.s(),w(U))});return N.notifySubscribers(N.v()),B}return typeof Promise!="function"||R?I(R.bind(E)):new Promise(I)},f.b("when",f.Wd),function(){f.w={M:function(b){switch(f.a.R(b)){case"option":return b.__ko__hasDomDataOptionValue__===!0?f.a.g.get(b,f.c.options.$b):7>=f.a.W?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case"select":return 0<=b.selectedIndex?f.w.M(b.options[b.selectedIndex]):e;default:return b.value}},cb:function(b,R,E){switch(f.a.R(b)){case"option":typeof R=="string"?(f.a.g.set(b,f.c.options.$b,e),"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__,b.value=R):(f.a.g.set(b,f.c.options.$b,R),b.__ko__hasDomDataOptionValue__=!0,b.value=typeof R=="number"?R:"");break;case"select":(R===""||R===null)&&(R=e);for(var I=-1,w=0,N=b.options.length,B;w<N;++w)if(B=f.w.M(b.options[w]),B==R||B===""&&R===e){I=w;break}(E||0<=I||R===e&&1<b.size)&&(b.selectedIndex=I,f.a.W===6&&f.a.setTimeout(function(){b.selectedIndex=I},0));break;default:(R===null||R===e)&&(R=""),b.value=R}}}}(),f.b("selectExtensions",f.w),f.b("selectExtensions.readValue",f.w.M),f.b("selectExtensions.writeValue",f.w.cb),f.m=function(){function b(U){U=f.a.Db(U),U.charCodeAt(0)===123&&(U=U.slice(1,-1)),U+=` -,`;var O=[],k=U.match(I),J,H=[],ee=0;if(1<k.length){for(var z=0,j;j=k[z];++z){var q=j.charCodeAt(0);if(q===44){if(0>=ee){O.push(J&&H.length?{key:J,value:H.join("")}:{unknown:J||H.join("")}),J=ee=0,H=[];continue}}else if(q===58){if(!ee&&!J&&H.length===1){J=H.pop();continue}}else{if(q===47&&1<j.length&&(j.charCodeAt(1)===47||j.charCodeAt(1)===42))continue;q===47&&z&&1<j.length?(q=k[z-1].match(w))&&!N[q[0]]&&(U=U.substr(U.indexOf(j)+1),k=U.match(I),z=-1,j="/"):q===40||q===123||q===91?++ee:q===41||q===125||q===93?--ee:J||H.length||q!==34&&q!==39||(j=j.slice(1,-1))}H.push(j)}if(0<ee)throw Error("Unbalanced parentheses, braces, or brackets")}return O}var R=["true","false","null","undefined"],E=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,I=RegExp(`"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|\`(?:\\\\.|[^\`])*\`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.* -|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,"'\`{}()/:[\\]]*[^\\s,"'\`{}()/:[\\]]|[^\\s]`,"g"),w=/[\])"'A-Za-z0-9_$]+$/,N={in:1,return:1,typeof:1},B={};return{Ra:[],wa:B,ac:b,vb:function(U,O){function k(q,be){var Te;if(!z){var ae=f.getBindingHandler(q);if(ae&&ae.preprocess&&!(be=ae.preprocess(be,q,k)))return;(ae=B[q])&&(Te=be,0<=f.a.A(R,Te)?Te=!1:(ae=Te.match(E),Te=ae===null?!1:ae[1]?"Object("+ae[1]+")"+ae[2]:Te),ae=Te),ae&&H.push("'"+(typeof B[q]=="string"?B[q]:q)+"':function(_z){"+Te+"=_z}")}ee&&(be="function(){return "+be+" }"),J.push("'"+q+"':"+be)}O=O||{};var J=[],H=[],ee=O.valueAccessors,z=O.bindingParams,j=typeof U=="string"?b(U):U;return f.a.D(j,function(q){k(q.key||q.unknown,q.value)}),H.length&&k("_ko_property_writers","{"+H.join(",")+" }"),J.join(",")},Id:function(U,O){for(var k=0;k<U.length;k++)if(U[k].key==O)return!0;return!1},eb:function(U,O,k,J,H){U&&f.O(U)?!f.Za(U)||H&&U.v()===J||U(J):(U=O.get("_ko_property_writers"))&&U[k]&&U[k](J)}}}(),f.b("expressionRewriting",f.m),f.b("expressionRewriting.bindingRewriteValidators",f.m.Ra),f.b("expressionRewriting.parseObjectLiteral",f.m.ac),f.b("expressionRewriting.preProcessBindings",f.m.vb),f.b("expressionRewriting._twoWayBindings",f.m.wa),f.b("jsonExpressionRewriting",f.m),f.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",f.m.vb),function(){function b(k){return k.nodeType==8&&N.test(w?k.text:k.nodeValue)}function R(k){return k.nodeType==8&&B.test(w?k.text:k.nodeValue)}function E(k,J){for(var H=k,ee=1,z=[];H=H.nextSibling;){if(R(H)&&(f.a.g.set(H,O,!0),ee--,ee===0))return z;z.push(H),b(H)&&ee++}if(!J)throw Error("Cannot find closing comment tag to match: "+k.nodeValue);return null}function I(k,J){var H=E(k,J);return H?0<H.length?H[H.length-1].nextSibling:k.nextSibling:null}var w=n&&n.createComment("test").text==="<!--test-->",N=w?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,B=w?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,U={ul:!0,ol:!0},O="__ko_matchedEndComment__";f.h={ea:{},childNodes:function(k){return b(k)?E(k):k.childNodes},Ea:function(k){if(b(k)){k=f.h.childNodes(k);for(var J=0,H=k.length;J<H;J++)f.removeNode(k[J])}else f.a.Tb(k)},va:function(k,J){if(b(k)){f.h.Ea(k);for(var H=k.nextSibling,ee=0,z=J.length;ee<z;ee++)H.parentNode.insertBefore(J[ee],H)}else f.a.va(k,J)},Vc:function(k,J){var H;b(k)?(H=k.nextSibling,k=k.parentNode):H=k.firstChild,H?J!==H&&k.insertBefore(J,H):k.appendChild(J)},Wb:function(k,J,H){H?(H=H.nextSibling,b(k)&&(k=k.parentNode),H?J!==H&&k.insertBefore(J,H):k.appendChild(J)):f.h.Vc(k,J)},firstChild:function(k){if(b(k))return!k.nextSibling||R(k.nextSibling)?null:k.nextSibling;if(k.firstChild&&R(k.firstChild))throw Error("Found invalid end comment, as the first child of "+k);return k.firstChild},nextSibling:function(k){if(b(k)&&(k=I(k)),k.nextSibling&&R(k.nextSibling)){var J=k.nextSibling;if(R(J)&&!f.a.g.get(J,O))throw Error("Found end comment without a matching opening comment, as child of "+k);return null}return k.nextSibling},Cd:b,Vd:function(k){return(k=(w?k.text:k.nodeValue).match(N))?k[1]:null},Sc:function(k){if(U[f.a.R(k)]){var J=k.firstChild;if(J)do if(J.nodeType===1){var H;H=J.firstChild;var ee=null;if(H)do if(ee)ee.push(H);else if(b(H)){var z=I(H,!0);z?H=z:ee=[H]}else R(H)&&(ee=[H]);while(H=H.nextSibling);if(H=ee)for(ee=J.nextSibling,z=0;z<H.length;z++)ee?k.insertBefore(H[z],ee):k.appendChild(H[z])}while(J=J.nextSibling)}}}}(),f.b("virtualElements",f.h),f.b("virtualElements.allowedBindings",f.h.ea),f.b("virtualElements.emptyNode",f.h.Ea),f.b("virtualElements.insertAfter",f.h.Wb),f.b("virtualElements.prepend",f.h.Vc),f.b("virtualElements.setDomNodeChildren",f.h.va),function(){f.ga=function(){this.nd={}},f.a.extend(f.ga.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind")!=null||f.j.getComponentNameForNode(b);case 8:return f.h.Cd(b);default:return!1}},getBindings:function(b,R){var E=this.getBindingsString(b,R),E=E?this.parseBindingsString(E,R,b):null;return f.j.tc(E,b,R,!1)},getBindingAccessors:function(b,R){var E=this.getBindingsString(b,R),E=E?this.parseBindingsString(E,R,b,{valueAccessors:!0}):null;return f.j.tc(E,b,R,!0)},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return f.h.Vd(b);default:return null}},parseBindingsString:function(b,R,E,I){try{var w=this.nd,N=b+(I&&I.valueAccessors||""),B;if(!(B=w[N])){var U,O="with($context){with($data||{}){return{"+f.m.vb(b,I)+"}}}";U=new Function("$context","$element",O),B=w[N]=U}return B(R,E)}catch(k){throw k.message=`Unable to parse bindings. + */(function(){(function(e){var t=this||(0,eval)("this"),n=t.document,i=t.navigator,o=t.jQuery,r=t.JSON;o||typeof jQuery>"u"||(o=jQuery),function(s){s(t.ko={})}(function(s,a){function c(b,L){return b===null||typeof b in x?b===L:!1}function d(b,L){var E;return function(){E||(E=f.a.setTimeout(function(){E=e,b()},L))}}function u(b,L){var E;return function(){clearTimeout(E),E=f.a.setTimeout(b,L)}}function m(b,L){L&&L!=="change"?L==="beforeChange"?this.pc(b):this.gb(b,L):this.qc(b)}function p(b,L){L!==null&&L.s&&L.s()}function g(b,L){var E=this.qd,I=E[R];I.ra||(this.Qb&&this.mb[L]?(E.uc(L,b,this.mb[L]),this.mb[L]=null,--this.Qb):I.I[L]||E.uc(L,b,I.J?{da:b}:E.$c(b)),b.Ja&&b.gd())}var f=typeof s<"u"?s:{};f.b=function(b,L){for(var E=b.split("."),I=f,w=0;w<E.length-1;w++)I=I[E[w]];I[E[E.length-1]]=L},f.L=function(b,L,E){b[L]=E},f.version="3.5.1",f.b("version",f.version),f.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},f.a=function(){function b(K,j){for(var q in K)w.call(K,q)&&j(q,K[q])}function L(K,j){if(j)for(var q in j)w.call(j,q)&&(K[q]=j[q]);return K}function E(K,j){return K.__proto__=j,K}function I(K,j,q,be){var Se=K[j].match(z)||[];f.a.D(q.match(z),function(ae){f.a.Na(Se,ae,be)}),K[j]=Se.join(" ")}var w=Object.prototype.hasOwnProperty,N={__proto__:[]}instanceof Array,B=typeof Symbol=="function",k={},O={};k[i&&/Firefox\/2/i.test(i.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],k.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),b(k,function(K,j){if(j.length)for(var q=0,be=j.length;q<be;q++)O[j[q]]=K});var U={propertychange:!0},J=n&&function(){for(var K=3,j=n.createElement("div"),q=j.getElementsByTagName("i");j.innerHTML="<!--[if gt IE "+ ++K+"]><i></i><![endif]-->",q[0];);return 4<K?K:e}(),z=/\S+/g,ee;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(K,j,q){for(var be=0,Se=K.length;be<Se;be++)j.call(q,K[be],be,K)},A:typeof Array.prototype.indexOf=="function"?function(K,j){return Array.prototype.indexOf.call(K,j)}:function(K,j){for(var q=0,be=K.length;q<be;q++)if(K[q]===j)return q;return-1},Lb:function(K,j,q){for(var be=0,Se=K.length;be<Se;be++)if(j.call(q,K[be],be,K))return K[be];return e},Pa:function(K,j){var q=f.a.A(K,j);0<q?K.splice(q,1):q===0&&K.shift()},wc:function(K){var j=[];return K&&f.a.D(K,function(q){0>f.a.A(j,q)&&j.push(q)}),j},Mb:function(K,j,q){var be=[];if(K)for(var Se=0,ae=K.length;Se<ae;Se++)be.push(j.call(q,K[Se],Se));return be},jb:function(K,j,q){var be=[];if(K)for(var Se=0,ae=K.length;Se<ae;Se++)j.call(q,K[Se],Se)&&be.push(K[Se]);return be},Nb:function(K,j){if(j instanceof Array)K.push.apply(K,j);else for(var q=0,be=j.length;q<be;q++)K.push(j[q]);return K},Na:function(K,j,q){var be=f.a.A(f.a.bc(K),j);0>be?q&&K.push(j):q||K.splice(be,1)},Ba:N,extend:L,setPrototypeOf:E,Ab:N?E:L,P:b,Ga:function(K,j,q){if(!K)return K;var be={},Se;for(Se in K)w.call(K,Se)&&(be[Se]=j.call(q,K[Se],Se,K));return be},Tb:function(K){for(;K.firstChild;)f.removeNode(K.firstChild)},Yb:function(K){K=f.a.la(K);for(var j=(K[0]&&K[0].ownerDocument||n).createElement("div"),q=0,be=K.length;q<be;q++)j.appendChild(f.oa(K[q]));return j},Ca:function(K,j){for(var q=0,be=K.length,Se=[];q<be;q++){var ae=K[q].cloneNode(!0);Se.push(j?f.oa(ae):ae)}return Se},va:function(K,j){if(f.a.Tb(K),j)for(var q=0,be=j.length;q<be;q++)K.appendChild(j[q])},Xc:function(K,j){var q=K.nodeType?[K]:K;if(0<q.length){for(var be=q[0],Se=be.parentNode,ae=0,ye=j.length;ae<ye;ae++)Se.insertBefore(j[ae],be);for(ae=0,ye=q.length;ae<ye;ae++)f.removeNode(q[ae])}},Ua:function(K,j){if(K.length){for(j=j.nodeType===8&&j.parentNode||j;K.length&&K[0].parentNode!==j;)K.splice(0,1);for(;1<K.length&&K[K.length-1].parentNode!==j;)K.length--;if(1<K.length){var q=K[0],be=K[K.length-1];for(K.length=0;q!==be;)K.push(q),q=q.nextSibling;K.push(be)}}return K},Zc:function(K,j){7>J?K.setAttribute("selected",j):K.selected=j},Db:function(K){return K===null||K===e?"":K.trim?K.trim():K.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(K,j){return K=K||"",j.length>K.length?!1:K.substring(0,j.length)===j},vd:function(K,j){if(K===j)return!0;if(K.nodeType===11)return!1;if(j.contains)return j.contains(K.nodeType!==1?K.parentNode:K);if(j.compareDocumentPosition)return(j.compareDocumentPosition(K)&16)==16;for(;K&&K!=j;)K=K.parentNode;return!!K},Sb:function(K){return f.a.vd(K,K.ownerDocument.documentElement)},kd:function(K){return!!f.a.Lb(K,f.a.Sb)},R:function(K){return K&&K.tagName&&K.tagName.toLowerCase()},Ac:function(K){return f.onError?function(){try{return K.apply(this,arguments)}catch(j){throw f.onError&&f.onError(j),j}}:K},setTimeout:function(K,j){return setTimeout(f.a.Ac(K),j)},Gc:function(K){setTimeout(function(){throw f.onError&&f.onError(K),K},0)},B:function(K,j,q){var be=f.a.Ac(q);if(q=U[j],f.options.useOnlyNativeEvents||q||!o)if(q||typeof K.addEventListener!="function")if(typeof K.attachEvent<"u"){var Se=function(ye){be.call(K,ye)},ae="on"+j;K.attachEvent(ae,Se),f.a.K.za(K,function(){K.detachEvent(ae,Se)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else K.addEventListener(j,be,!1);else ee||(ee=typeof o(K).on=="function"?"on":"bind"),o(K)[ee](j,be)},Fb:function(K,j){if(!K||!K.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var q;if(f.a.R(K)==="input"&&K.type&&j.toLowerCase()=="click"?(q=K.type,q=q=="checkbox"||q=="radio"):q=!1,f.options.useOnlyNativeEvents||!o||q)if(typeof n.createEvent=="function")if(typeof K.dispatchEvent=="function")q=n.createEvent(O[j]||"HTMLEvents"),q.initEvent(j,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,K),K.dispatchEvent(q);else throw Error("The supplied element doesn't support dispatchEvent");else if(q&&K.click)K.click();else if(typeof K.fireEvent<"u")K.fireEvent("on"+j);else throw Error("Browser doesn't support triggering events");else o(K).trigger(j)},f:function(K){return f.O(K)?K():K},bc:function(K){return f.O(K)?K.v():K},Eb:function(K,j,q){var be;j&&(typeof K.classList=="object"?(be=K.classList[q?"add":"remove"],f.a.D(j.match(z),function(Se){be.call(K.classList,Se)})):typeof K.className.baseVal=="string"?I(K.className,"baseVal",j,q):I(K,"className",j,q))},Bb:function(K,j){var q=f.a.f(j);(q===null||q===e)&&(q="");var be=f.h.firstChild(K);!be||be.nodeType!=3||f.h.nextSibling(be)?f.h.va(K,[K.ownerDocument.createTextNode(q)]):be.data=q,f.a.Ad(K)},Yc:function(K,j){if(K.name=j,7>=J)try{var q=K.name.replace(/[&<>'"]/g,function(be){return"&#"+be.charCodeAt(0)+";"});K.mergeAttributes(n.createElement("<input name='"+q+"'/>"),!1)}catch{}},Ad:function(K){9<=J&&(K=K.nodeType==1?K:K.parentNode,K.style&&(K.style.zoom=K.style.zoom))},wd:function(K){if(J){var j=K.style.width;K.style.width=0,K.style.width=j}},Pd:function(K,j){K=f.a.f(K),j=f.a.f(j);for(var q=[],be=K;be<=j;be++)q.push(be);return q},la:function(K){for(var j=[],q=0,be=K.length;q<be;q++)j.push(K[q]);return j},Da:function(K){return B?Symbol(K):K},Zd:J===6,$d:J===7,W:J,Lc:function(K,j){for(var q=f.a.la(K.getElementsByTagName("input")).concat(f.a.la(K.getElementsByTagName("textarea"))),be=typeof j=="string"?function(ye){return ye.name===j}:function(ye){return j.test(ye.name)},Se=[],ae=q.length-1;0<=ae;ae--)be(q[ae])&&Se.push(q[ae]);return Se},Nd:function(K){return typeof K=="string"&&(K=f.a.Db(K))?r&&r.parse?r.parse(K):new Function("return "+K)():null},hc:function(K,j,q){if(!r||!r.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return r.stringify(f.a.f(K),j,q)},Od:function(K,j,q){q=q||{};var be=q.params||{},Se=q.includeFields||this.Jc,ae=K;if(typeof K=="object"&&f.a.R(K)==="form")for(var ae=K.action,ye=Se.length-1;0<=ye;ye--)for(var Te=f.a.Lc(K,Se[ye]),Ze=Te.length-1;0<=Ze;Ze--)be[Te[Ze].name]=Te[Ze].value;j=f.a.f(j);var We=n.createElement("form");We.style.display="none",We.action=ae,We.method="post";for(var Pe in j)K=n.createElement("input"),K.type="hidden",K.name=Pe,K.value=f.a.hc(f.a.f(j[Pe])),We.appendChild(K);b(be,function(Ue,Pt){var Ot=n.createElement("input");Ot.type="hidden",Ot.name=Ue,Ot.value=Pt,We.appendChild(Ot)}),n.body.appendChild(We),q.submitter?q.submitter(We):We.submit(),setTimeout(function(){We.parentNode.removeChild(We)},0)}}}(),f.b("utils",f.a),f.b("utils.arrayForEach",f.a.D),f.b("utils.arrayFirst",f.a.Lb),f.b("utils.arrayFilter",f.a.jb),f.b("utils.arrayGetDistinctValues",f.a.wc),f.b("utils.arrayIndexOf",f.a.A),f.b("utils.arrayMap",f.a.Mb),f.b("utils.arrayPushAll",f.a.Nb),f.b("utils.arrayRemoveItem",f.a.Pa),f.b("utils.cloneNodes",f.a.Ca),f.b("utils.createSymbolOrString",f.a.Da),f.b("utils.extend",f.a.extend),f.b("utils.fieldsIncludedWithJsonPost",f.a.Jc),f.b("utils.getFormFields",f.a.Lc),f.b("utils.objectMap",f.a.Ga),f.b("utils.peekObservable",f.a.bc),f.b("utils.postJson",f.a.Od),f.b("utils.parseJson",f.a.Nd),f.b("utils.registerEventHandler",f.a.B),f.b("utils.stringifyJson",f.a.hc),f.b("utils.range",f.a.Pd),f.b("utils.toggleDomNodeCssClass",f.a.Eb),f.b("utils.triggerEvent",f.a.Fb),f.b("utils.unwrapObservable",f.a.f),f.b("utils.objectForEach",f.a.P),f.b("utils.addOrRemoveItem",f.a.Na),f.b("utils.setTextContent",f.a.Bb),f.b("unwrap",f.a.f),Function.prototype.bind||(Function.prototype.bind=function(b){var L=this;if(arguments.length===1)return function(){return L.apply(b,arguments)};var E=Array.prototype.slice.call(arguments,1);return function(){var I=E.slice(0);return I.push.apply(I,arguments),L.apply(b,I)}}),f.a.g=new function(){var b=0,L="__ko__"+new Date().getTime(),E={},I,w;return f.a.W?(I=function(N,B){var k=N[L];if(!k||k==="null"||!E[k]){if(!B)return e;k=N[L]="ko"+b++,E[k]={}}return E[k]},w=function(N){var B=N[L];return B?(delete E[B],N[L]=null,!0):!1}):(I=function(N,B){var k=N[L];return!k&&B&&(k=N[L]={}),k},w=function(N){return N[L]?(delete N[L],!0):!1}),{get:function(N,B){var k=I(N,!1);return k&&k[B]},set:function(N,B,k){(N=I(N,k!==e))&&(N[B]=k)},Ub:function(N,B,k){return N=I(N,!0),N[B]||(N[B]=k)},clear:w,Z:function(){return b+++L}}},f.b("utils.domData",f.a.g),f.b("utils.domData.clear",f.a.g.clear),f.a.K=new function(){function b(B,k){var O=f.a.g.get(B,I);return O===e&&k&&(O=[],f.a.g.set(B,I,O)),O}function L(B){var k=b(B,!1);if(k)for(var k=k.slice(0),O=0;O<k.length;O++)k[O](B);f.a.g.clear(B),f.a.K.cleanExternalData(B),N[B.nodeType]&&E(B.childNodes,!0)}function E(B,k){for(var O=[],U,J=0;J<B.length;J++)if((!k||B[J].nodeType===8)&&(L(O[O.length]=U=B[J]),B[J]!==U))for(;J--&&f.a.A(O,B[J])==-1;);}var I=f.a.g.Z(),w={1:!0,8:!0,9:!0},N={1:!0,9:!0};return{za:function(B,k){if(typeof k!="function")throw Error("Callback must be a function");b(B,!0).push(k)},yb:function(B,k){var O=b(B,!1);O&&(f.a.Pa(O,k),O.length==0&&f.a.g.set(B,I,e))},oa:function(B){return f.u.G(function(){w[B.nodeType]&&(L(B),N[B.nodeType]&&E(B.getElementsByTagName("*")))}),B},removeNode:function(B){f.oa(B),B.parentNode&&B.parentNode.removeChild(B)},cleanExternalData:function(B){o&&typeof o.cleanData=="function"&&o.cleanData([B])}}},f.oa=f.a.K.oa,f.removeNode=f.a.K.removeNode,f.b("cleanNode",f.oa),f.b("removeNode",f.removeNode),f.b("utils.domNodeDisposal",f.a.K),f.b("utils.domNodeDisposal.addDisposeCallback",f.a.K.za),f.b("utils.domNodeDisposal.removeDisposeCallback",f.a.K.yb),function(){var b=[0,"",""],L=[1,"<table>","</table>"],E=[3,"<table><tbody><tr>","</tr></tbody></table>"],I=[1,"<select multiple='multiple'>","</select>"],w={thead:L,tbody:L,tfoot:L,tr:[2,"<table><tbody>","</tbody></table>"],td:E,th:E,option:I,optgroup:I},N=8>=f.a.W;f.a.ua=function(B,k){var O;if(o){if(o.parseHTML)O=o.parseHTML(B,k)||[];else if((O=o.clean([B],k))&&O[0]){for(var U=O[0];U.parentNode&&U.parentNode.nodeType!==11;)U=U.parentNode;U.parentNode&&U.parentNode.removeChild(U)}}else{(O=k)||(O=n);var U=O.parentWindow||O.defaultView||t,J=f.a.Db(B).toLowerCase(),z=O.createElement("div"),ee;for(ee=(J=J.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&w[J[1]]||b,J=ee[0],ee="ignored<div>"+ee[1]+B+ee[2]+"</div>",typeof U.innerShiv=="function"?z.appendChild(U.innerShiv(ee)):(N&&O.body.appendChild(z),z.innerHTML=ee,N&&z.parentNode.removeChild(z));J--;)z=z.lastChild;O=f.a.la(z.lastChild.childNodes)}return O},f.a.Md=function(B,k){var O=f.a.ua(B,k);return O.length&&O[0].parentElement||f.a.Yb(O)},f.a.fc=function(B,k){if(f.a.Tb(B),k=f.a.f(k),k!==null&&k!==e)if(typeof k!="string"&&(k=k.toString()),o)o(B).html(k);else for(var O=f.a.ua(k,B.ownerDocument),U=0;U<O.length;U++)B.appendChild(O[U])}}(),f.b("utils.parseHtmlFragment",f.a.ua),f.b("utils.setHtml",f.a.fc),f.aa=function(){function b(E,I){if(E){if(E.nodeType==8){var w=f.aa.Uc(E.nodeValue);w!=null&&I.push({ud:E,Kd:w})}else if(E.nodeType==1)for(var w=0,N=E.childNodes,B=N.length;w<B;w++)b(N[w],I)}}var L={};return{Xb:function(E){if(typeof E!="function")throw Error("You can only pass a function to ko.memoization.memoize()");var I=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return L[I]=E,"<!--[ko_memo:"+I+"]-->"},bd:function(E,I){var w=L[E];if(w===e)throw Error("Couldn't find any memo with ID "+E+". Perhaps it's already been unmemoized.");try{return w.apply(null,I||[]),!0}finally{delete L[E]}},cd:function(E,I){var w=[];b(E,w);for(var N=0,B=w.length;N<B;N++){var k=w[N].ud,O=[k];I&&f.a.Nb(O,I),f.aa.bd(w[N].Kd,O),k.nodeValue="",k.parentNode&&k.parentNode.removeChild(k)}},Uc:function(E){return(E=E.match(/^\[ko_memo\:(.*?)\]$/))?E[1]:null}}}(),f.b("memoization",f.aa),f.b("memoization.memoize",f.aa.Xb),f.b("memoization.unmemoize",f.aa.bd),f.b("memoization.parseMemoText",f.aa.Uc),f.b("memoization.unmemoizeDomNodeAndDescendants",f.aa.cd),f.na=function(){function b(){if(w){for(var k=w,O=0,U;B<w;)if(U=I[B++]){if(B>k){if(5e3<=++O){B=w,f.a.Gc(Error("'Too much recursion' after processing "+O+" task groups."));break}k=w}try{U()}catch(J){f.a.Gc(J)}}}}function L(){b(),B=w=I.length=0}var E,I=[],w=0,N=1,B=0;return t.MutationObserver?E=function(k){var O=n.createElement("div");return new MutationObserver(k).observe(O,{attributes:!0}),function(){O.classList.toggle("foo")}}(L):E=n&&"onreadystatechange"in n.createElement("script")?function(k){var O=n.createElement("script");O.onreadystatechange=function(){O.onreadystatechange=null,n.documentElement.removeChild(O),O=null,k()},n.documentElement.appendChild(O)}:function(k){setTimeout(k,0)},{scheduler:E,zb:function(k){return w||f.na.scheduler(L),I[w++]=k,N++},cancel:function(k){k=k-(N-w),k>=B&&k<w&&(I[k]=null)},resetForTesting:function(){var k=w-B;return B=w=I.length=0,k},Sd:b}}(),f.b("tasks",f.na),f.b("tasks.schedule",f.na.zb),f.b("tasks.runEarly",f.na.Sd),f.Ta={throttle:function(b,L){b.throttleEvaluation=L;var E=null;return f.$({read:b,write:function(I){clearTimeout(E),E=f.a.setTimeout(function(){b(I)},L)}})},rateLimit:function(b,L){var E,I,w;typeof L=="number"?E=L:(E=L.timeout,I=L.method),b.Hb=!1,w=typeof I=="function"?I:I=="notifyWhenChangesStop"?u:d,b.ub(function(N){return w(N,E,L)})},deferred:function(b,L){if(L!==!0)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");b.Hb||(b.Hb=!0,b.ub(function(E){var I,w=!1;return function(){if(!w){f.na.cancel(I),I=f.na.zb(E);try{w=!0,b.notifySubscribers(e,"dirty")}finally{w=!1}}}}))},notify:function(b,L){b.equalityComparer=L=="always"?null:c}};var x={undefined:1,boolean:1,number:1,string:1};f.b("extenders",f.Ta),f.ic=function(b,L,E){this.da=b,this.lc=L,this.mc=E,this.Ib=!1,this.fb=this.Jb=null,f.L(this,"dispose",this.s),f.L(this,"disposeWhenNodeIsRemoved",this.l)},f.ic.prototype.s=function(){this.Ib||(this.fb&&f.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},f.ic.prototype.l=function(b){this.Jb=b,f.a.K.za(b,this.fb=this.s.bind(this))},f.T=function(){f.a.Ab(this,_),_.qb(this)};var _={qb:function(b){b.U={change:[]},b.sc=1},subscribe:function(b,L,E){var I=this;E=E||"change";var w=new f.ic(I,L?b.bind(L):b,function(){f.a.Pa(I.U[E],w),I.hb&&I.hb(E)});return I.Qa&&I.Qa(E),I.U[E]||(I.U[E]=[]),I.U[E].push(w),w},notifySubscribers:function(b,L){if(L=L||"change",L==="change"&&this.Gb(),this.Wa(L)){var E=L==="change"&&this.ed||this.U[L].slice(0);try{f.u.xc();for(var I=0,w;w=E[I];++I)w.Ib||w.lc(b)}finally{f.u.end()}}},ob:function(){return this.sc},Dd:function(b){return this.ob()!==b},Gb:function(){++this.sc},ub:function(b){var L=this,E=f.O(L),I,w,N,B,k;L.gb||(L.gb=L.notifySubscribers,L.notifySubscribers=m);var O=b(function(){L.Ja=!1,E&&B===L&&(B=L.nc?L.nc():L());var U=w||k&&L.sb(N,B);k=w=I=!1,U&&L.gb(N=B)});L.qc=function(U,J){J&&L.Ja||(k=!J),L.ed=L.U.change.slice(0),L.Ja=I=!0,B=U,O()},L.pc=function(U){I||(N=U,L.gb(U,"beforeChange"))},L.rc=function(){k=!0},L.gd=function(){L.sb(N,L.v(!0))&&(w=!0)}},Wa:function(b){return this.U[b]&&this.U[b].length},Bd:function(b){if(b)return this.U[b]&&this.U[b].length||0;var L=0;return f.a.P(this.U,function(E,I){E!=="dirty"&&(L+=I.length)}),L},sb:function(b,L){return!this.equalityComparer||!this.equalityComparer(b,L)},toString:function(){return"[object Object]"},extend:function(b){var L=this;return b&&f.a.P(b,function(E,I){var w=f.Ta[E];typeof w=="function"&&(L=w(L,I)||L)}),L}};f.L(_,"init",_.qb),f.L(_,"subscribe",_.subscribe),f.L(_,"extend",_.extend),f.L(_,"getSubscriptionsCount",_.Bd),f.a.Ba&&f.a.setPrototypeOf(_,Function.prototype),f.T.fn=_,f.Qc=function(b){return b!=null&&typeof b.subscribe=="function"&&typeof b.notifySubscribers=="function"},f.b("subscribable",f.T),f.b("isSubscribable",f.Qc),f.S=f.u=function(){function b(N){E.push(I),I=N}function L(){I=E.pop()}var E=[],I,w=0;return{xc:b,end:L,cc:function(N){if(I){if(!f.Qc(N))throw Error("Only subscribable things can act as dependencies");I.od.call(I.pd,N,N.fd||(N.fd=++w))}},G:function(N,B,k){try{return b(),N.apply(B,k||[])}finally{L()}},qa:function(){if(I)return I.o.qa()},Va:function(){if(I)return I.o.Va()},Ya:function(){if(I)return I.Ya},o:function(){if(I)return I.o}}}(),f.b("computedContext",f.S),f.b("computedContext.getDependenciesCount",f.S.qa),f.b("computedContext.getDependencies",f.S.Va),f.b("computedContext.isInitial",f.S.Ya),f.b("computedContext.registerDependency",f.S.cc),f.b("ignoreDependencies",f.Yd=f.u.G);var C=f.a.Da("_latestValue");f.ta=function(b){function L(){return 0<arguments.length?(L.sb(L[C],arguments[0])&&(L.ya(),L[C]=arguments[0],L.xa()),this):(f.u.cc(L),L[C])}return L[C]=b,f.a.Ba||f.a.extend(L,f.T.fn),f.T.fn.qb(L),f.a.Ab(L,V),f.options.deferUpdates&&f.Ta.deferred(L,!0),L};var V={equalityComparer:c,v:function(){return this[C]},xa:function(){this.notifySubscribers(this[C],"spectate"),this.notifySubscribers(this[C])},ya:function(){this.notifySubscribers(this[C],"beforeChange")}};f.a.Ba&&f.a.setPrototypeOf(V,f.T.fn);var Z=f.ta.Ma="__ko_proto__";V[Z]=f.ta,f.O=function(b){if((b=typeof b=="function"&&b[Z])&&b!==V[Z]&&b!==f.o.fn[Z])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!b},f.Za=function(b){return typeof b=="function"&&(b[Z]===V[Z]||b[Z]===f.o.fn[Z]&&b.Nc)},f.b("observable",f.ta),f.b("isObservable",f.O),f.b("isWriteableObservable",f.Za),f.b("isWritableObservable",f.Za),f.b("observable.fn",V),f.L(V,"peek",V.v),f.L(V,"valueHasMutated",V.xa),f.L(V,"valueWillMutate",V.ya),f.Ha=function(b){if(b=b||[],typeof b!="object"||!("length"in b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return b=f.ta(b),f.a.Ab(b,f.Ha.fn),b.extend({trackArrayChanges:!0})},f.Ha.fn={remove:function(b){for(var L=this.v(),E=[],I=typeof b!="function"||f.O(b)?function(B){return B===b}:b,w=0;w<L.length;w++){var N=L[w];if(I(N)){if(E.length===0&&this.ya(),L[w]!==N)throw Error("Array modified during remove; cannot remove item");E.push(N),L.splice(w,1),w--}}return E.length&&this.xa(),E},removeAll:function(b){if(b===e){var L=this.v(),E=L.slice(0);return this.ya(),L.splice(0,L.length),this.xa(),E}return b?this.remove(function(I){return 0<=f.a.A(b,I)}):[]},destroy:function(b){var L=this.v(),E=typeof b!="function"||f.O(b)?function(N){return N===b}:b;this.ya();for(var I=L.length-1;0<=I;I--){var w=L[I];E(w)&&(w._destroy=!0)}this.xa()},destroyAll:function(b){return b===e?this.destroy(function(){return!0}):b?this.destroy(function(L){return 0<=f.a.A(b,L)}):[]},indexOf:function(b){var L=this();return f.a.A(L,b)},replace:function(b,L){var E=this.indexOf(b);0<=E&&(this.ya(),this.v()[E]=L,this.xa())},sorted:function(b){var L=this().slice(0);return b?L.sort(b):L.sort()},reversed:function(){return this().slice(0).reverse()}},f.a.Ba&&f.a.setPrototypeOf(f.Ha.fn,f.ta.fn),f.a.D("pop push reverse shift sort splice unshift".split(" "),function(b){f.Ha.fn[b]=function(){var L=this.v();this.ya(),this.zc(L,b,arguments);var E=L[b].apply(L,arguments);return this.xa(),E===L?this:E}}),f.a.D(["slice"],function(b){f.Ha.fn[b]=function(){var L=this();return L[b].apply(L,arguments)}}),f.Pc=function(b){return f.O(b)&&typeof b.remove=="function"&&typeof b.push=="function"},f.b("observableArray",f.Ha),f.b("isObservableArray",f.Pc),f.Ta.trackArrayChanges=function(b,L){function E(){function z(){if(k){var ee=[].concat(b.v()||[]),K;b.Wa("arrayChange")&&((!w||1<k)&&(w=f.a.Pb(O,ee,b.Ob)),K=w),O=ee,w=null,k=0,K&&K.length&&b.notifySubscribers(K,"arrayChange")}}I?z():(I=!0,B=b.subscribe(function(){++k},null,"spectate"),O=[].concat(b.v()||[]),w=null,N=b.subscribe(z))}if(b.Ob={},L&&typeof L=="object"&&f.a.extend(b.Ob,L),b.Ob.sparse=!0,!b.zc){var I=!1,w=null,N,B,k=0,O,U=b.Qa,J=b.hb;b.Qa=function(z){U&&U.call(b,z),z==="arrayChange"&&E()},b.hb=function(z){J&&J.call(b,z),z!=="arrayChange"||b.Wa("arrayChange")||(N&&N.s(),B&&B.s(),B=N=null,I=!1,O=e)},b.zc=function(z,ee,K){function j(We,Pe,Ue){return q[q.length]={status:We,value:Pe,index:Ue}}if(I&&!k){var q=[],be=z.length,Se=K.length,ae=0;switch(ee){case"push":ae=be;case"unshift":for(ee=0;ee<Se;ee++)j("added",K[ee],ae+ee);break;case"pop":ae=be-1;case"shift":be&&j("deleted",z[ae],ae);break;case"splice":ee=Math.min(Math.max(0,0>K[0]?be+K[0]:K[0]),be);for(var be=Se===1?be:Math.min(ee+(K[1]||0),be),Se=ee+Se-2,ae=Math.max(be,Se),ye=[],Te=[],Ze=2;ee<ae;++ee,++Ze)ee<be&&Te.push(j("deleted",z[ee],ee)),ee<Se&&ye.push(j("added",K[Ze],ee));f.a.Kc(Te,ye);break;default:return}w=q}}}};var R=f.a.Da("_state");f.o=f.$=function(b,L,E){function I(){if(0<arguments.length){if(typeof w=="function")w.apply(N.nb,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}return N.ra||f.u.cc(I),(N.ka||N.J&&I.Xa())&&I.ha(),N.X}if(typeof b=="object"?E=b:(E=E||{},b&&(E.read=b)),typeof E.read!="function")throw Error("Pass a function that returns the value of the ko.computed");var w=E.write,N={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:E.read,nb:L||E.owner,l:E.disposeWhenNodeIsRemoved||E.l||null,Sa:E.disposeWhen||E.Sa,Rb:null,I:{},V:0,Ic:null};return I[R]=N,I.Nc=typeof w=="function",f.a.Ba||f.a.extend(I,f.T.fn),f.T.fn.qb(I),f.a.Ab(I,G),E.pure?(N.wb=!0,N.J=!0,f.a.extend(I,W)):E.deferEvaluation&&f.a.extend(I,v),f.options.deferUpdates&&f.Ta.deferred(I,!0),N.l&&(N.jc=!0,N.l.nodeType||(N.l=null)),N.J||E.deferEvaluation||I.ha(),N.l&&I.ja()&&f.a.K.za(N.l,N.Rb=function(){I.s()}),I};var G={equalityComparer:c,qa:function(){return this[R].V},Va:function(){var b=[];return f.a.P(this[R].I,function(L,E){b[E.Ka]=E.da}),b},Vb:function(b){if(!this[R].V)return!1;var L=this.Va();return f.a.A(L,b)!==-1?!0:!!f.a.Lb(L,function(E){return E.Vb&&E.Vb(b)})},uc:function(b,L,E){if(this[R].wb&&L===this)throw Error("A 'pure' computed must not be called recursively");this[R].I[b]=E,E.Ka=this[R].V++,E.La=L.ob()},Xa:function(){var b,L,E=this[R].I;for(b in E)if(Object.prototype.hasOwnProperty.call(E,b)&&(L=E[b],this.Ia&&L.da.Ja||L.da.Dd(L.La)))return!0},Jd:function(){this.Ia&&!this[R].rb&&this.Ia(!1)},ja:function(){var b=this[R];return b.ka||0<b.V},Rd:function(){this.Ja?this[R].ka&&(this[R].sa=!0):this.Hc()},$c:function(b){if(b.Hb){var L=b.subscribe(this.Jd,this,"dirty"),E=b.subscribe(this.Rd,this);return{da:b,s:function(){L.s(),E.s()}}}return b.subscribe(this.Hc,this)},Hc:function(){var b=this,L=b.throttleEvaluation;L&&0<=L?(clearTimeout(this[R].Ic),this[R].Ic=f.a.setTimeout(function(){b.ha(!0)},L)):b.Ia?b.Ia(!0):b.ha(!0)},ha:function(b){var L=this[R],E=L.Sa,I=!1;if(!L.rb&&!L.ra){if(L.l&&!f.a.Sb(L.l)||E&&E()){if(!L.jc){this.s();return}}else L.jc=!1;L.rb=!0;try{I=this.zd(b)}finally{L.rb=!1}return I}},zd:function(b){var L=this[R],I=!1,E=L.wb?e:!L.V,I={qd:this,mb:L.I,Qb:L.V};f.u.xc({pd:I,od:g,o:this,Ya:E}),L.I={},L.V=0;var w=this.yd(L,I);return L.V?I=this.sb(L.X,w):(this.s(),I=!0),I&&(L.J?this.Gb():this.notifySubscribers(L.X,"beforeChange"),L.X=w,this.notifySubscribers(L.X,"spectate"),!L.J&&b&&this.notifySubscribers(L.X),this.rc&&this.rc()),E&&this.notifySubscribers(L.X,"awake"),I},yd:function(b,L){try{var E=b.Wc;return b.nb?E.call(b.nb):E()}finally{f.u.end(),L.Qb&&!b.J&&f.a.P(L.mb,p),b.sa=b.ka=!1}},v:function(b){var L=this[R];return(L.ka&&(b||!L.V)||L.J&&this.Xa())&&this.ha(),L.X},ub:function(b){f.T.fn.ub.call(this,b),this.nc=function(){return this[R].J||(this[R].sa?this.ha():this[R].ka=!1),this[R].X},this.Ia=function(L){this.pc(this[R].X),this[R].ka=!0,L&&(this[R].sa=!0),this.qc(this,!L)}},s:function(){var b=this[R];!b.J&&b.I&&f.a.P(b.I,function(L,E){E.s&&E.s()}),b.l&&b.Rb&&f.a.K.yb(b.l,b.Rb),b.I=e,b.V=0,b.ra=!0,b.sa=!1,b.ka=!1,b.J=!1,b.l=e,b.Sa=e,b.Wc=e,this.Nc||(b.nb=e)}},W={Qa:function(b){var L=this,E=L[R];if(!E.ra&&E.J&&b=="change"){if(E.J=!1,E.sa||L.Xa())E.I=null,E.V=0,L.ha()&&L.Gb();else{var I=[];f.a.P(E.I,function(w,N){I[N.Ka]=w}),f.a.D(I,function(w,N){var B=E.I[w],k=L.$c(B.da);k.Ka=N,k.La=B.La,E.I[w]=k}),L.Xa()&&L.ha()&&L.Gb()}E.ra||L.notifySubscribers(E.X,"awake")}},hb:function(b){var L=this[R];L.ra||b!="change"||this.Wa("change")||(f.a.P(L.I,function(E,I){I.s&&(L.I[E]={da:I.da,Ka:I.Ka,La:I.La},I.s())}),L.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var b=this[R];return b.J&&(b.sa||this.Xa())&&this.ha(),f.T.fn.ob.call(this)}},v={Qa:function(b){b!="change"&&b!="beforeChange"||this.v()}};f.a.Ba&&f.a.setPrototypeOf(G,f.T.fn);var P=f.ta.Ma;G[P]=f.o,f.Oc=function(b){return typeof b=="function"&&b[P]===G[P]},f.Fd=function(b){return f.Oc(b)&&b[R]&&b[R].wb},f.b("computed",f.o),f.b("dependentObservable",f.o),f.b("isComputed",f.Oc),f.b("isPureComputed",f.Fd),f.b("computed.fn",G),f.L(G,"peek",G.v),f.L(G,"dispose",G.s),f.L(G,"isActive",G.ja),f.L(G,"getDependenciesCount",G.qa),f.L(G,"getDependencies",G.Va),f.xb=function(b,L){return typeof b=="function"?f.o(b,L,{pure:!0}):(b=f.a.extend({},b),b.pure=!0,f.o(b,L))},f.b("pureComputed",f.xb),function(){function b(I,w,N){if(N=N||new E,I=w(I),typeof I!="object"||I===null||I===e||I instanceof RegExp||I instanceof Date||I instanceof String||I instanceof Number||I instanceof Boolean)return I;var B=I instanceof Array?[]:{};return N.save(I,B),L(I,function(k){var O=w(I[k]);switch(typeof O){case"boolean":case"number":case"string":case"function":B[k]=O;break;case"object":case"undefined":var U=N.get(O);B[k]=U!==e?U:b(O,w,N)}}),B}function L(I,w){if(I instanceof Array){for(var N=0;N<I.length;N++)w(N);typeof I.toJSON=="function"&&w("toJSON")}else for(N in I)w(N)}function E(){this.keys=[],this.values=[]}f.ad=function(I){if(arguments.length==0)throw Error("When calling ko.toJS, pass the object you want to convert.");return b(I,function(w){for(var N=0;f.O(w)&&10>N;N++)w=w();return w})},f.toJSON=function(I,w,N){return I=f.ad(I),f.a.hc(I,w,N)},E.prototype={constructor:E,save:function(I,w){var N=f.a.A(this.keys,I);0<=N?this.values[N]=w:(this.keys.push(I),this.values.push(w))},get:function(I){return I=f.a.A(this.keys,I),0<=I?this.values[I]:e}}}(),f.b("toJS",f.ad),f.b("toJSON",f.toJSON),f.Wd=function(b,L,E){function I(w){var N=f.xb(b,E).extend({ma:"always"}),B=N.subscribe(function(k){k&&(B.s(),w(k))});return N.notifySubscribers(N.v()),B}return typeof Promise!="function"||L?I(L.bind(E)):new Promise(I)},f.b("when",f.Wd),function(){f.w={M:function(b){switch(f.a.R(b)){case"option":return b.__ko__hasDomDataOptionValue__===!0?f.a.g.get(b,f.c.options.$b):7>=f.a.W?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case"select":return 0<=b.selectedIndex?f.w.M(b.options[b.selectedIndex]):e;default:return b.value}},cb:function(b,L,E){switch(f.a.R(b)){case"option":typeof L=="string"?(f.a.g.set(b,f.c.options.$b,e),"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__,b.value=L):(f.a.g.set(b,f.c.options.$b,L),b.__ko__hasDomDataOptionValue__=!0,b.value=typeof L=="number"?L:"");break;case"select":(L===""||L===null)&&(L=e);for(var I=-1,w=0,N=b.options.length,B;w<N;++w)if(B=f.w.M(b.options[w]),B==L||B===""&&L===e){I=w;break}(E||0<=I||L===e&&1<b.size)&&(b.selectedIndex=I,f.a.W===6&&f.a.setTimeout(function(){b.selectedIndex=I},0));break;default:(L===null||L===e)&&(L=""),b.value=L}}}}(),f.b("selectExtensions",f.w),f.b("selectExtensions.readValue",f.w.M),f.b("selectExtensions.writeValue",f.w.cb),f.m=function(){function b(k){k=f.a.Db(k),k.charCodeAt(0)===123&&(k=k.slice(1,-1)),k+=` +,`;var O=[],U=k.match(I),J,z=[],ee=0;if(1<U.length){for(var K=0,j;j=U[K];++K){var q=j.charCodeAt(0);if(q===44){if(0>=ee){O.push(J&&z.length?{key:J,value:z.join("")}:{unknown:J||z.join("")}),J=ee=0,z=[];continue}}else if(q===58){if(!ee&&!J&&z.length===1){J=z.pop();continue}}else{if(q===47&&1<j.length&&(j.charCodeAt(1)===47||j.charCodeAt(1)===42))continue;q===47&&K&&1<j.length?(q=U[K-1].match(w))&&!N[q[0]]&&(k=k.substr(k.indexOf(j)+1),U=k.match(I),K=-1,j="/"):q===40||q===123||q===91?++ee:q===41||q===125||q===93?--ee:J||z.length||q!==34&&q!==39||(j=j.slice(1,-1))}z.push(j)}if(0<ee)throw Error("Unbalanced parentheses, braces, or brackets")}return O}var L=["true","false","null","undefined"],E=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,I=RegExp(`"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|\`(?:\\\\.|[^\`])*\`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.* +|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,"'\`{}()/:[\\]]*[^\\s,"'\`{}()/:[\\]]|[^\\s]`,"g"),w=/[\])"'A-Za-z0-9_$]+$/,N={in:1,return:1,typeof:1},B={};return{Ra:[],wa:B,ac:b,vb:function(k,O){function U(q,be){var Se;if(!K){var ae=f.getBindingHandler(q);if(ae&&ae.preprocess&&!(be=ae.preprocess(be,q,U)))return;(ae=B[q])&&(Se=be,0<=f.a.A(L,Se)?Se=!1:(ae=Se.match(E),Se=ae===null?!1:ae[1]?"Object("+ae[1]+")"+ae[2]:Se),ae=Se),ae&&z.push("'"+(typeof B[q]=="string"?B[q]:q)+"':function(_z){"+Se+"=_z}")}ee&&(be="function(){return "+be+" }"),J.push("'"+q+"':"+be)}O=O||{};var J=[],z=[],ee=O.valueAccessors,K=O.bindingParams,j=typeof k=="string"?b(k):k;return f.a.D(j,function(q){U(q.key||q.unknown,q.value)}),z.length&&U("_ko_property_writers","{"+z.join(",")+" }"),J.join(",")},Id:function(k,O){for(var U=0;U<k.length;U++)if(k[U].key==O)return!0;return!1},eb:function(k,O,U,J,z){k&&f.O(k)?!f.Za(k)||z&&k.v()===J||k(J):(k=O.get("_ko_property_writers"))&&k[U]&&k[U](J)}}}(),f.b("expressionRewriting",f.m),f.b("expressionRewriting.bindingRewriteValidators",f.m.Ra),f.b("expressionRewriting.parseObjectLiteral",f.m.ac),f.b("expressionRewriting.preProcessBindings",f.m.vb),f.b("expressionRewriting._twoWayBindings",f.m.wa),f.b("jsonExpressionRewriting",f.m),f.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",f.m.vb),function(){function b(U){return U.nodeType==8&&N.test(w?U.text:U.nodeValue)}function L(U){return U.nodeType==8&&B.test(w?U.text:U.nodeValue)}function E(U,J){for(var z=U,ee=1,K=[];z=z.nextSibling;){if(L(z)&&(f.a.g.set(z,O,!0),ee--,ee===0))return K;K.push(z),b(z)&&ee++}if(!J)throw Error("Cannot find closing comment tag to match: "+U.nodeValue);return null}function I(U,J){var z=E(U,J);return z?0<z.length?z[z.length-1].nextSibling:U.nextSibling:null}var w=n&&n.createComment("test").text==="<!--test-->",N=w?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,B=w?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,k={ul:!0,ol:!0},O="__ko_matchedEndComment__";f.h={ea:{},childNodes:function(U){return b(U)?E(U):U.childNodes},Ea:function(U){if(b(U)){U=f.h.childNodes(U);for(var J=0,z=U.length;J<z;J++)f.removeNode(U[J])}else f.a.Tb(U)},va:function(U,J){if(b(U)){f.h.Ea(U);for(var z=U.nextSibling,ee=0,K=J.length;ee<K;ee++)z.parentNode.insertBefore(J[ee],z)}else f.a.va(U,J)},Vc:function(U,J){var z;b(U)?(z=U.nextSibling,U=U.parentNode):z=U.firstChild,z?J!==z&&U.insertBefore(J,z):U.appendChild(J)},Wb:function(U,J,z){z?(z=z.nextSibling,b(U)&&(U=U.parentNode),z?J!==z&&U.insertBefore(J,z):U.appendChild(J)):f.h.Vc(U,J)},firstChild:function(U){if(b(U))return!U.nextSibling||L(U.nextSibling)?null:U.nextSibling;if(U.firstChild&&L(U.firstChild))throw Error("Found invalid end comment, as the first child of "+U);return U.firstChild},nextSibling:function(U){if(b(U)&&(U=I(U)),U.nextSibling&&L(U.nextSibling)){var J=U.nextSibling;if(L(J)&&!f.a.g.get(J,O))throw Error("Found end comment without a matching opening comment, as child of "+U);return null}return U.nextSibling},Cd:b,Vd:function(U){return(U=(w?U.text:U.nodeValue).match(N))?U[1]:null},Sc:function(U){if(k[f.a.R(U)]){var J=U.firstChild;if(J)do if(J.nodeType===1){var z;z=J.firstChild;var ee=null;if(z)do if(ee)ee.push(z);else if(b(z)){var K=I(z,!0);K?z=K:ee=[z]}else L(z)&&(ee=[z]);while(z=z.nextSibling);if(z=ee)for(ee=J.nextSibling,K=0;K<z.length;K++)ee?U.insertBefore(z[K],ee):U.appendChild(z[K])}while(J=J.nextSibling)}}}}(),f.b("virtualElements",f.h),f.b("virtualElements.allowedBindings",f.h.ea),f.b("virtualElements.emptyNode",f.h.Ea),f.b("virtualElements.insertAfter",f.h.Wb),f.b("virtualElements.prepend",f.h.Vc),f.b("virtualElements.setDomNodeChildren",f.h.va),function(){f.ga=function(){this.nd={}},f.a.extend(f.ga.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind")!=null||f.j.getComponentNameForNode(b);case 8:return f.h.Cd(b);default:return!1}},getBindings:function(b,L){var E=this.getBindingsString(b,L),E=E?this.parseBindingsString(E,L,b):null;return f.j.tc(E,b,L,!1)},getBindingAccessors:function(b,L){var E=this.getBindingsString(b,L),E=E?this.parseBindingsString(E,L,b,{valueAccessors:!0}):null;return f.j.tc(E,b,L,!0)},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return f.h.Vd(b);default:return null}},parseBindingsString:function(b,L,E,I){try{var w=this.nd,N=b+(I&&I.valueAccessors||""),B;if(!(B=w[N])){var k,O="with($context){with($data||{}){return{"+f.m.vb(b,I)+"}}}";k=new Function("$context","$element",O),B=w[N]=k}return B(L,E)}catch(U){throw U.message=`Unable to parse bindings. Bindings value: `+b+` -Message: `+k.message,k}}}),f.ga.instance=new f.ga}(),f.b("bindingProvider",f.ga),function(){function b(ae){var ye=(ae=f.a.g.get(ae,Te))&&ae.N;ye&&(ae.N=null,ye.Tc())}function R(ae,ye,Se){this.node=ae,this.yc=ye,this.kb=[],this.H=!1,ye.N||f.a.K.za(ae,b),Se&&Se.N&&(Se.N.kb.push(ae),this.Kb=Se)}function E(ae){return function(){return ae}}function I(ae){return ae()}function w(ae){return f.a.Ga(f.u.G(ae),function(ye,Se){return function(){return ae()[Se]}})}function N(ae,ye,Se){return typeof ae=="function"?w(ae.bind(null,ye,Se)):f.a.Ga(ae,E)}function B(ae,ye){return w(this.getBindings.bind(this,ae,ye))}function U(ae,ye){var Se=f.h.firstChild(ye);if(Se){var Le,Xe=f.ga.instance,Pe=Xe.preprocessNode;if(Pe){for(;Le=Se;)Se=f.h.nextSibling(Le),Pe.call(Xe,Le);Se=f.h.firstChild(ye)}for(;Le=Se;)Se=f.h.nextSibling(Le),O(ae,Le)}f.i.ma(ye,f.i.H)}function O(ae,ye){var Se=ae,Le=ye.nodeType===1;Le&&f.h.Sc(ye),(Le||f.ga.instance.nodeHasBindings(ye))&&(Se=J(ye,null,ae).bindingContextForDescendants),Se&&!q[f.a.R(ye)]&&U(Se,ye)}function k(ae){var ye=[],Se={},Le=[];return f.a.P(ae,function Xe(Pe){if(!Se[Pe]){var ke=f.getBindingHandler(Pe);ke&&(ke.after&&(Le.push(Pe),f.a.D(ke.after,function(Pt){if(ae[Pt]){if(f.a.A(Le,Pt)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+Le.join(", "));Xe(Pt)}}),Le.length--),ye.push({key:Pe,Mc:ke})),Se[Pe]=!0}}),ye}function J(ae,ye,Se){var Le=f.a.g.Ub(ae,Te,{}),Xe=Le.hd;if(!ye){if(Xe)throw Error("You cannot apply bindings multiple times to the same element.");Le.hd=!0}Xe||(Le.context=Se),Le.Zb||(Le.Zb={});var Pe;if(ye&&typeof ye!="function")Pe=ye;else{var ke=f.ga.instance,Pt=ke.getBindingAccessors||B,Ot=f.$(function(){return(Pe=ye?ye(Se,ae):Pt.call(ke,ae,Se))&&(Se[ee]&&Se[ee](),Se[j]&&Se[j]()),Pe},null,{l:ae});Pe&&Ot.ja()||(Ot=null)}var ht=Se,Ae;if(Pe){var $e=function(){return f.a.Ga(Ot?Ot():Pe,I)},Qe=Ot?function(je){return function(){return I(Ot()[je])}}:function(je){return Pe[je]};$e.get=function(je){return Pe[je]&&I(Qe(je))},$e.has=function(je){return je in Pe},f.i.H in Pe&&f.i.subscribe(ae,f.i.H,function(){var je=(0,Pe[f.i.H])();if(je){var kt=f.h.childNodes(ae);kt.length&&je(kt,f.Ec(kt[0]))}}),f.i.pa in Pe&&(ht=f.i.Cb(ae,Se),f.i.subscribe(ae,f.i.pa,function(){var je=(0,Pe[f.i.pa])();je&&f.h.firstChild(ae)&&je(ae)})),Le=k(Pe),f.a.D(Le,function(je){var kt=je.Mc.init,pe=je.Mc.update,Ve=je.key;if(ae.nodeType===8&&!f.h.ea[Ve])throw Error("The binding '"+Ve+"' cannot be used with virtual elements");try{typeof kt=="function"&&f.u.G(function(){var Dt=kt(ae,Qe(Ve),$e,ht.$data,ht);if(Dt&&Dt.controlsDescendantBindings){if(Ae!==e)throw Error("Multiple bindings ("+Ae+" and "+Ve+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");Ae=Ve}}),typeof pe=="function"&&f.$(function(){pe(ae,Qe(Ve),$e,ht.$data,ht)},null,{l:ae})}catch(Dt){throw Dt.message='Unable to process binding "'+Ve+": "+Pe[Ve]+`" -Message: `+Dt.message,Dt}})}return Le=Ae===e,{shouldBindDescendants:Le,bindingContextForDescendants:Le&&ht}}function H(ae,ye){return ae&&ae instanceof f.fa?ae:new f.fa(ae,e,e,ye)}var ee=f.a.Da("_subscribable"),z=f.a.Da("_ancestorBindingInfo"),j=f.a.Da("_dataDependency");f.c={};var q={script:!0,textarea:!0,template:!0};f.getBindingHandler=function(ae){return f.c[ae]};var be={};f.fa=function(ae,ye,Se,Le,Xe){function Pe(){var Qe=ht?Ot():Ot,je=f.a.f(Qe);return ye?(f.a.extend(ke,ye),z in ye&&(ke[z]=ye[z])):(ke.$parents=[],ke.$root=je,ke.ko=f),ke[ee]=Ae,Pt?je=ke.$data:(ke.$rawData=Qe,ke.$data=je),Se&&(ke[Se]=je),Le&&Le(ke,ye,je),ye&&ye[ee]&&!f.S.o().Vb(ye[ee])&&ye[ee](),$e&&(ke[j]=$e),ke.$data}var ke=this,Pt=ae===be,Ot=Pt?e:ae,ht=typeof Ot=="function"&&!f.O(Ot),Ae,$e=Xe&&Xe.dataDependency;Xe&&Xe.exportDependencies?Pe():(Ae=f.xb(Pe),Ae.v(),Ae.ja()?Ae.equalityComparer=null:ke[ee]=e)},f.fa.prototype.createChildContext=function(ae,ye,Se,Le){if(!Le&&ye&&typeof ye=="object"&&(Le=ye,ye=Le.as,Se=Le.extend),ye&&Le&&Le.noChildContext){var Xe=typeof ae=="function"&&!f.O(ae);return new f.fa(be,this,null,function(Pe){Se&&Se(Pe),Pe[ye]=Xe?ae():ae},Le)}return new f.fa(ae,this,ye,function(Pe,ke){Pe.$parentContext=ke,Pe.$parent=ke.$data,Pe.$parents=(ke.$parents||[]).slice(0),Pe.$parents.unshift(Pe.$parent),Se&&Se(Pe)},Le)},f.fa.prototype.extend=function(ae,ye){return new f.fa(be,this,null,function(Se){f.a.extend(Se,typeof ae=="function"?ae(Se):ae)},ye)};var Te=f.a.g.Z();R.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},R.prototype.sd=function(ae){f.a.Pa(this.kb,ae),!this.kb.length&&this.H&&this.Cc()},R.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,f.a.K.yb(this.node,b),f.i.ma(this.node,f.i.pa),this.Tc())},f.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(ae,ye,Se,Le,Xe){var Pe=f.a.g.Ub(ae,Te,{});return Pe.Fa||(Pe.Fa=new f.T),Xe&&Xe.notifyImmediately&&Pe.Zb[ye]&&f.u.G(Se,Le,[ae]),Pe.Fa.subscribe(Se,Le,ye)},ma:function(ae,ye){var Se=f.a.g.get(ae,Te);if(Se&&(Se.Zb[ye]=!0,Se.Fa&&Se.Fa.notifySubscribers(ae,ye),ye==f.i.H)){if(Se.N)Se.N.Cc();else if(Se.N===e&&Se.Fa&&Se.Fa.Wa(f.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")}},Cb:function(ae,ye){var Se=f.a.g.Ub(ae,Te,{});return Se.N||(Se.N=new R(ae,Se,ye[z])),ye[z]==Se?ye:ye.extend(function(Le){Le[z]=Se})}},f.Td=function(ae){return(ae=f.a.g.get(ae,Te))&&ae.context},f.ib=function(ae,ye,Se){return ae.nodeType===1&&f.h.Sc(ae),J(ae,ye,H(Se))},f.ld=function(ae,ye,Se){return Se=H(Se),f.ib(ae,N(ye,Se,ae),Se)},f.Oa=function(ae,ye){ye.nodeType!==1&&ye.nodeType!==8||U(H(ae),ye)},f.vc=function(ae,ye,Se){if(!o&&t.jQuery&&(o=t.jQuery),2>arguments.length){if(ye=n.body,!ye)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!ye||ye.nodeType!==1&&ye.nodeType!==8)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");O(H(ae,Se),ye)},f.Dc=function(ae){return!ae||ae.nodeType!==1&&ae.nodeType!==8?e:f.Td(ae)},f.Ec=function(ae){return(ae=f.Dc(ae))?ae.$data:e},f.b("bindingHandlers",f.c),f.b("bindingEvent",f.i),f.b("bindingEvent.subscribe",f.i.subscribe),f.b("bindingEvent.startPossiblyAsyncContentBinding",f.i.Cb),f.b("applyBindings",f.vc),f.b("applyBindingsToDescendants",f.Oa),f.b("applyBindingAccessorsToNode",f.ib),f.b("applyBindingsToNode",f.ld),f.b("contextFor",f.Dc),f.b("dataFor",f.Ec)}(),function(b){function R(B,U){var O=Object.prototype.hasOwnProperty.call(w,B)?w[B]:b,k;O?O.subscribe(U):(O=w[B]=new f.T,O.subscribe(U),E(B,function(J,H){var ee=!(!H||!H.synchronous);N[B]={definition:J,Gd:ee},delete w[B],k||ee?O.notifySubscribers(J):f.na.zb(function(){O.notifySubscribers(J)})}),k=!0)}function E(B,U){I("getConfig",[B],function(O){O?I("loadComponent",[B,O],function(k){U(k,O)}):U(null,null)})}function I(B,U,O,k){k||(k=f.j.loaders.slice(0));var J=k.shift();if(J){var H=J[B];if(H){var ee=!1;if(H.apply(J,U.concat(function(z){ee?O(null):z!==null?O(z):I(B,U,O,k)}))!==b&&(ee=!0,!J.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else I(B,U,O,k)}else O(null)}var w={},N={};f.j={get:function(B,U){var O=Object.prototype.hasOwnProperty.call(N,B)?N[B]:b;O?O.Gd?f.u.G(function(){U(O.definition)}):f.na.zb(function(){U(O.definition)}):R(B,U)},Bc:function(B){delete N[B]},oc:I},f.j.loaders=[],f.b("components",f.j),f.b("components.get",f.j.get),f.b("components.clearCachedDefinition",f.j.Bc)}(),function(){function b(O,k,J,H){function ee(){--j===0&&H(z)}var z={},j=2,q=J.template;J=J.viewModel,q?w(k,q,function(be){f.j.oc("loadTemplate",[O,be],function(Te){z.template=Te,ee()})}):ee(),J?w(k,J,function(be){f.j.oc("loadViewModel",[O,be],function(Te){z[U]=Te,ee()})}):ee()}function R(O,k,J){if(typeof k=="function")J(function(ee){return new k(ee)});else if(typeof k[U]=="function")J(k[U]);else if("instance"in k){var H=k.instance;J(function(){return H})}else"viewModel"in k?R(O,k.viewModel,J):O("Unknown viewModel value: "+k)}function E(O){switch(f.a.R(O)){case"script":return f.a.ua(O.text);case"textarea":return f.a.ua(O.value);case"template":if(I(O.content))return f.a.Ca(O.content.childNodes)}return f.a.Ca(O.childNodes)}function I(O){return t.DocumentFragment?O instanceof DocumentFragment:O&&O.nodeType===11}function w(O,k,J){typeof k.require=="string"?a||t.require?(a||t.require)([k.require],function(H){H&&typeof H=="object"&&H.Xd&&H.default&&(H=H.default),J(H)}):O("Uses require, but no AMD loader is present"):J(k)}function N(O){return function(k){throw Error("Component '"+O+"': "+k)}}var B={};f.j.register=function(O,k){if(!k)throw Error("Invalid configuration for "+O);if(f.j.tb(O))throw Error("Component "+O+" is already registered");B[O]=k},f.j.tb=function(O){return Object.prototype.hasOwnProperty.call(B,O)},f.j.unregister=function(O){delete B[O],f.j.Bc(O)},f.j.Fc={getConfig:function(O,k){k(f.j.tb(O)?B[O]:null)},loadComponent:function(O,k,J){var H=N(O);w(H,k,function(ee){b(O,H,ee,J)})},loadTemplate:function(O,k,J){if(O=N(O),typeof k=="string")J(f.a.ua(k));else if(k instanceof Array)J(k);else if(I(k))J(f.a.la(k.childNodes));else if(k.element)if(k=k.element,t.HTMLElement?k instanceof HTMLElement:k&&k.tagName&&k.nodeType===1)J(E(k));else if(typeof k=="string"){var H=n.getElementById(k);H?J(E(H)):O("Cannot find element with ID "+k)}else O("Unknown element type: "+k);else O("Unknown template value: "+k)},loadViewModel:function(O,k,J){R(N(O),k,J)}};var U="createViewModel";f.b("components.register",f.j.register),f.b("components.isRegistered",f.j.tb),f.b("components.unregister",f.j.unregister),f.b("components.defaultLoader",f.j.Fc),f.j.loaders.push(f.j.Fc),f.j.dd=B}(),function(){function b(E,I){var w=E.getAttribute("params");if(w){var w=R.parseBindingsString(w,I,E,{valueAccessors:!0,bindingParams:!0}),w=f.a.Ga(w,function(U){return f.o(U,null,{l:E})}),N=f.a.Ga(w,function(U){var O=U.v();return U.ja()?f.o({read:function(){return f.a.f(U())},write:f.Za(O)&&function(k){U()(k)},l:E}):O});return Object.prototype.hasOwnProperty.call(N,"$raw")||(N.$raw=w),N}return{$raw:{}}}f.j.getComponentNameForNode=function(E){var I=f.a.R(E);if(f.j.tb(I)&&(I.indexOf("-")!=-1||""+E=="[object HTMLUnknownElement]"||8>=f.a.W&&E.tagName===I))return I},f.j.tc=function(E,I,w,N){if(I.nodeType===1){var B=f.j.getComponentNameForNode(I);if(B){if(E=E||{},E.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var U={name:B,params:b(I,w)};E.component=N?function(){return U}:U}}return E};var R=new f.ga;9>f.a.W&&(f.j.register=function(E){return function(I){return E.apply(this,arguments)}}(f.j.register),n.createDocumentFragment=function(E){return function(){var I=E(),w=f.j.dd,N;for(N in w);return I}}(n.createDocumentFragment))}(),function(){function b(I,w,N){if(w=w.template,!w)throw Error("Component '"+I+"' has no template");I=f.a.Ca(w),f.h.va(N,I)}function R(I,w,N){var B=I.createViewModel;return B?B.call(I,w,N):w}var E=0;f.c.component={init:function(I,w,N,B,U){function O(){var z=k&&k.dispose;typeof z=="function"&&z.call(k),H&&H.s(),J=k=H=null}var k,J,H,ee=f.a.la(f.h.childNodes(I));return f.h.Ea(I),f.a.K.za(I,O),f.o(function(){var z=f.a.f(w()),j,q;if(typeof z=="string"?j=z:(j=f.a.f(z.name),q=f.a.f(z.params)),!j)throw Error("No component name specified");var be=f.i.Cb(I,U),Te=J=++E;f.j.get(j,function(ae){if(J===Te){if(O(),!ae)throw Error("Unknown component '"+j+"'");b(j,ae,I);var ye=R(ae,q,{element:I,templateNodes:ee});ae=be.createChildContext(ye,{extend:function(Se){Se.$component=ye,Se.$componentTemplateNodes=ee}}),ye&&ye.koDescendantsComplete&&(H=f.i.subscribe(I,f.i.pa,ye.koDescendantsComplete,ye)),k=ye,f.Oa(ae,I)}})},null,{l:I}),{controlsDescendantBindings:!0}}},f.h.ea.component=!0}();var F={class:"className",for:"htmlFor"};f.c.attr={update:function(b,R){var E=f.a.f(R())||{};f.a.P(E,function(I,w){w=f.a.f(w);var N=I.indexOf(":"),N="lookupNamespaceURI"in b&&0<N&&b.lookupNamespaceURI(I.substr(0,N)),B=w===!1||w===null||w===e;B?N?b.removeAttributeNS(N,I):b.removeAttribute(I):w=w.toString(),8>=f.a.W&&I in F?(I=F[I],B?b.removeAttribute(I):b[I]=w):B||(N?b.setAttributeNS(N,I,w):b.setAttribute(I,w)),I==="name"&&f.a.Yc(b,B?"":w)})}},function(){f.c.checked={after:["value","attr"],init:function(b,R,E){function I(){var z=b.checked,j=N();if(!f.S.Ya()&&(z||!U&&!f.S.qa())){var q=f.u.G(R);if(k){var be=J?q.v():q,Te=ee;ee=j,Te!==j?z&&(f.a.Na(be,j,!0),f.a.Na(be,Te,!1)):f.a.Na(be,j,z),J&&f.Za(q)&&q(be)}else B&&(j===e?j=z:z||(j=e)),f.m.eb(q,E,"checked",j,!0)}}function w(){var z=f.a.f(R()),j=N();k?(b.checked=0<=f.a.A(z,j),ee=j):b.checked=B&&j===e?!!z:N()===z}var N=f.xb(function(){if(E.has("checkedValue"))return f.a.f(E.get("checkedValue"));if(H)return E.has("value")?f.a.f(E.get("value")):b.value}),B=b.type=="checkbox",U=b.type=="radio";if(B||U){var O=R(),k=B&&f.a.f(O)instanceof Array,J=!(k&&O.push&&O.splice),H=U||k,ee=k?N():e;U&&!b.name&&f.c.uniqueName.init(b,function(){return!0}),f.o(I,null,{l:b}),f.a.B(b,"click",I),f.o(w,null,{l:b}),O=e}}},f.m.wa.checked=!0,f.c.checkedValue={update:function(b,R){b.value=f.a.f(R())}}}(),f.c.class={update:function(b,R){var E=f.a.Db(f.a.f(R()));f.a.Eb(b,b.__ko__cssValue,!1),b.__ko__cssValue=E,f.a.Eb(b,E,!0)}},f.c.css={update:function(b,R){var E=f.a.f(R());E!==null&&typeof E=="object"?f.a.P(E,function(I,w){w=f.a.f(w),f.a.Eb(b,I,w)}):f.c.class.update(b,R)}},f.c.enable={update:function(b,R){var E=f.a.f(R());E&&b.disabled?b.removeAttribute("disabled"):E||b.disabled||(b.disabled=!0)}},f.c.disable={update:function(b,R){f.c.enable.update(b,function(){return!f.a.f(R())})}},f.c.event={init:function(b,R,E,I,w){var N=R()||{};f.a.P(N,function(B){typeof B=="string"&&f.a.B(b,B,function(U){var O,k=R()[B];if(k){try{var J=f.a.la(arguments);I=w.$data,J.unshift(I),O=k.apply(I,J)}finally{O!==!0&&(U.preventDefault?U.preventDefault():U.returnValue=!1)}E.get(B+"Bubble")===!1&&(U.cancelBubble=!0,U.stopPropagation&&U.stopPropagation())}})})}},f.c.foreach={Rc:function(b){return function(){var R=b(),E=f.a.bc(R);return!E||typeof E.length=="number"?{foreach:R,templateEngine:f.ba.Ma}:(f.a.f(R),{foreach:E.data,as:E.as,noChildContext:E.noChildContext,includeDestroyed:E.includeDestroyed,afterAdd:E.afterAdd,beforeRemove:E.beforeRemove,afterRender:E.afterRender,beforeMove:E.beforeMove,afterMove:E.afterMove,templateEngine:f.ba.Ma})}},init:function(b,R){return f.c.template.init(b,f.c.foreach.Rc(R))},update:function(b,R,E,I,w){return f.c.template.update(b,f.c.foreach.Rc(R),E,I,w)}},f.m.Ra.foreach=!1,f.h.ea.foreach=!0,f.c.hasfocus={init:function(b,R,E){function I(B){b.__ko_hasfocusUpdating=!0;var U=b.ownerDocument;if("activeElement"in U){var O;try{O=U.activeElement}catch{O=U.body}B=O===b}U=R(),f.m.eb(U,E,"hasfocus",B,!0),b.__ko_hasfocusLastValue=B,b.__ko_hasfocusUpdating=!1}var w=I.bind(null,!0),N=I.bind(null,!1);f.a.B(b,"focus",w),f.a.B(b,"focusin",w),f.a.B(b,"blur",N),f.a.B(b,"focusout",N),b.__ko_hasfocusLastValue=!1},update:function(b,R){var E=!!f.a.f(R());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===E||(E?b.focus():b.blur(),!E&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),f.u.G(f.a.Fb,null,[b,E?"focusin":"focusout"]))}},f.m.wa.hasfocus=!0,f.c.hasFocus=f.c.hasfocus,f.m.wa.hasFocus="hasfocus",f.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,R){f.a.fc(b,R())}},function(){function b(R,E,I){f.c[R]={init:function(w,N,B,U,O){var k,J,H={},ee,z,j;if(E){U=B.get("as");var q=B.get("noChildContext");j=!(U&&q),H={as:U,noChildContext:q,exportDependencies:j}}return z=(ee=B.get("completeOn")=="render")||B.has(f.i.pa),f.o(function(){var be=f.a.f(N()),Te=!I!=!be,ae=!J,ye;(j||Te!==k)&&(z&&(O=f.i.Cb(w,O)),Te&&((!E||j)&&(H.dataDependency=f.S.o()),ye=E?O.createChildContext(typeof be=="function"?be:N,H):f.S.qa()?O.extend(null,H):O),ae&&f.S.qa()&&(J=f.a.Ca(f.h.childNodes(w),!0)),Te?(ae||f.h.va(w,f.a.Ca(J)),f.Oa(ye,w)):(f.h.Ea(w),ee||f.i.ma(w,f.i.H)),k=Te)},null,{l:w}),{controlsDescendantBindings:!0}}},f.m.Ra[R]=!1,f.h.ea[R]=!0}b("if"),b("ifnot",!1,!0),b("with",!0)}(),f.c.let={init:function(b,R,E,I,w){return R=w.extend(R),f.Oa(R,b),{controlsDescendantBindings:!0}}},f.h.ea.let=!0;var A={};f.c.options={init:function(b){if(f.a.R(b)!=="select")throw Error("options binding applies only to SELECT elements");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:function(b,R,E){function I(){return f.a.jb(b.options,function(q){return q.selected})}function w(q,be,Te){var ae=typeof be;return ae=="function"?be(q):ae=="string"?q[be]:Te}function N(q,be){if(z&&k)f.i.ma(b,f.i.H);else if(ee.length){var Te=0<=f.a.A(ee,f.w.M(be[0]));f.a.Zc(be[0],Te),z&&!Te&&f.u.G(f.a.Fb,null,[b,"change"])}}var B=b.multiple,U=b.length!=0&&B?b.scrollTop:null,O=f.a.f(R()),k=E.get("valueAllowUnset")&&E.has("value"),J=E.get("optionsIncludeDestroyed");R={};var H,ee=[];k||(B?ee=f.a.Mb(I(),f.w.M):0<=b.selectedIndex&&ee.push(f.w.M(b.options[b.selectedIndex]))),O&&(typeof O.length>"u"&&(O=[O]),H=f.a.jb(O,function(q){return J||q===e||q===null||!f.a.f(q._destroy)}),E.has("optionsCaption")&&(O=f.a.f(E.get("optionsCaption")),O!==null&&O!==e&&H.unshift(A)));var z=!1;if(R.beforeRemove=function(q){b.removeChild(q)},O=N,E.has("optionsAfterRender")&&typeof E.get("optionsAfterRender")=="function"&&(O=function(q,be){N(0,be),f.u.G(E.get("optionsAfterRender"),null,[be[0],q!==A?q:e])}),f.a.ec(b,H,function(q,be,Te){return Te.length&&(ee=!k&&Te[0].selected?[f.w.M(Te[0])]:[],z=!0),be=b.ownerDocument.createElement("option"),q===A?(f.a.Bb(be,E.get("optionsCaption")),f.w.cb(be,e)):(Te=w(q,E.get("optionsValue"),q),f.w.cb(be,f.a.f(Te)),q=w(q,E.get("optionsText"),Te),f.a.Bb(be,q)),[be]},R,O),!k){var j;B?j=ee.length&&I().length<ee.length:j=ee.length&&0<=b.selectedIndex?f.w.M(b.options[b.selectedIndex])!==ee[0]:ee.length||0<=b.selectedIndex,j&&f.u.G(f.a.Fb,null,[b,"change"])}(k||f.S.Ya())&&f.i.ma(b,f.i.H),f.a.wd(b),U&&20<Math.abs(U-b.scrollTop)&&(b.scrollTop=U)}},f.c.options.$b=f.a.g.Z(),f.c.selectedOptions={init:function(b,R,E){function I(){var B=R(),U=[];f.a.D(b.getElementsByTagName("option"),function(O){O.selected&&U.push(f.w.M(O))}),f.m.eb(B,E,"selectedOptions",U)}function w(){var B=f.a.f(R()),U=b.scrollTop;B&&typeof B.length=="number"&&f.a.D(b.getElementsByTagName("option"),function(O){var k=0<=f.a.A(B,f.w.M(O));O.selected!=k&&f.a.Zc(O,k)}),b.scrollTop=U}if(f.a.R(b)!="select")throw Error("selectedOptions binding applies only to SELECT elements");var N;f.i.subscribe(b,f.i.H,function(){N?I():(f.a.B(b,"change",I),N=f.o(w,null,{l:b}))},null,{notifyImmediately:!0})},update:function(){}},f.m.wa.selectedOptions=!0,f.c.style={update:function(b,R){var E=f.a.f(R()||{});f.a.P(E,function(I,w){if(w=f.a.f(w),(w===null||w===e||w===!1)&&(w=""),o)o(b).css(I,w);else if(/^--/.test(I))b.style.setProperty(I,w);else{I=I.replace(/-(\w)/g,function(B,U){return U.toUpperCase()});var N=b.style[I];b.style[I]=w,w===N||b.style[I]!=N||isNaN(w)||(b.style[I]=w+"px")}})}},f.c.submit={init:function(b,R,E,I,w){if(typeof R()!="function")throw Error("The value for a submit binding must be a function");f.a.B(b,"submit",function(N){var B,U=R();try{B=U.call(w.$data,b)}finally{B!==!0&&(N.preventDefault?N.preventDefault():N.returnValue=!1)}})}},f.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(b,R){f.a.Bb(b,R())}},f.h.ea.text=!0,function(){if(t&&t.navigator){var b=function(H){if(H)return parseFloat(H[1])},R=t.navigator.userAgent,E,I,w,N,B;(E=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(B=b(R.match(/Edge\/([^ ]+)$/)))||b(R.match(/Chrome\/([^ ]+)/))||(I=b(R.match(/Version\/([^ ]+) Safari/)))||(w=b(R.match(/Firefox\/([^ ]+)/)))||(N=f.a.W||b(R.match(/MSIE ([^ ]+)/)))||(N=b(R.match(/rv:([^ )]+)/)))}if(8<=N&&10>N)var U=f.a.g.Z(),O=f.a.g.Z(),k=function(H){var ee=this.activeElement;(ee=ee&&f.a.g.get(ee,O))&&ee(H)},J=function(H,ee){var z=H.ownerDocument;f.a.g.get(z,U)||(f.a.g.set(z,U,!0),f.a.B(z,"selectionchange",k)),f.a.g.set(H,O,ee)};f.c.textInput={init:function(H,ee,z){function j(Pe,ke){f.a.B(H,Pe,ke)}function q(){var Pe=f.a.f(ee());(Pe===null||Pe===e)&&(Pe=""),Se!==e&&Pe===Se?f.a.setTimeout(q,4):H.value!==Pe&&(Xe=!0,H.value=Pe,Xe=!1,ae=H.value)}function be(){ye||(Se=H.value,ye=f.a.setTimeout(Te,4))}function Te(){clearTimeout(ye),Se=ye=e;var Pe=H.value;ae!==Pe&&(ae=Pe,f.m.eb(ee(),z,"textInput",Pe))}var ae=H.value,ye,Se,Le=f.a.W==9?be:Te,Xe=!1;N&&j("keypress",Te),11>N&&j("propertychange",function(Pe){Xe||Pe.propertyName!=="value"||Le(Pe)}),N==8&&(j("keyup",Te),j("keydown",Te)),J&&(J(H,Le),j("dragend",be)),(!N||9<=N)&&j("input",Le),5>I&&f.a.R(H)==="textarea"?(j("keydown",be),j("paste",be),j("cut",be)):11>E?j("keydown",be):4>w?(j("DOMAutoComplete",Te),j("dragdrop",Te),j("drop",Te)):B&&H.type==="number"&&j("keydown",be),j("change",Te),j("blur",Te),f.o(q,null,{l:H})}},f.m.wa.textInput=!0,f.c.textinput={preprocess:function(H,ee,z){z("textInput",H)}}}(),f.c.uniqueName={init:function(b,R){if(R()){var E="ko_unique_"+ ++f.c.uniqueName.rd;f.a.Yc(b,E)}}},f.c.uniqueName.rd=0,f.c.using={init:function(b,R,E,I,w){var N;return E.has("as")&&(N={as:E.get("as"),noChildContext:E.get("noChildContext")}),R=w.createChildContext(R,N),f.Oa(R,b),{controlsDescendantBindings:!0}}},f.h.ea.using=!0,f.c.value={init:function(b,R,E){var I=f.a.R(b),w=I=="input";if(!w||b.type!="checkbox"&&b.type!="radio"){var N=[],B=E.get("valueUpdate"),U=!1,O=null;B&&(typeof B=="string"?N=[B]:N=f.a.wc(B),f.a.Pa(N,"change"));var k=function(){O=null,U=!1;var ee=R(),z=f.w.M(b);f.m.eb(ee,E,"value",z)};!f.a.W||!w||b.type!="text"||b.autocomplete=="off"||b.form&&b.form.autocomplete=="off"||f.a.A(N,"propertychange")!=-1||(f.a.B(b,"propertychange",function(){U=!0}),f.a.B(b,"focus",function(){U=!1}),f.a.B(b,"blur",function(){U&&k()})),f.a.D(N,function(ee){var z=k;f.a.Ud(ee,"after")&&(z=function(){O=f.w.M(b),f.a.setTimeout(k,0)},ee=ee.substring(5)),f.a.B(b,ee,z)});var J;if(J=w&&b.type=="file"?function(){var ee=f.a.f(R());ee===null||ee===e||ee===""?b.value="":f.u.G(k)}:function(){var ee=f.a.f(R()),z=f.w.M(b);O!==null&&ee===O?f.a.setTimeout(J,0):(ee!==z||z===e)&&(I==="select"?(z=E.get("valueAllowUnset"),f.w.cb(b,ee,z),z||ee===f.w.M(b)||f.u.G(k)):f.w.cb(b,ee))},I==="select"){var H;f.i.subscribe(b,f.i.H,function(){H?E.get("valueAllowUnset")?J():k():(f.a.B(b,"change",k),H=f.o(J,null,{l:b}))},null,{notifyImmediately:!0})}else f.a.B(b,"change",k),f.o(J,null,{l:b})}else f.ib(b,{checkedValue:R})},update:function(){}},f.m.wa.value=!0,f.c.visible={update:function(b,R){var E=f.a.f(R()),I=b.style.display!="none";E&&!I?b.style.display="":!E&&I&&(b.style.display="none")}},f.c.hidden={update:function(b,R){f.c.visible.update(b,function(){return!f.a.f(R())})}},function(b){f.c[b]={init:function(R,E,I,w,N){return f.c.event.init.call(this,R,function(){var B={};return B[b]=E(),B},I,w,N)}}}("click"),f.ca=function(){},f.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},f.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},f.ca.prototype.makeTemplateSource=function(b,R){if(typeof b=="string"){R=R||n;var E=R.getElementById(b);if(!E)throw Error("Cannot find template with ID "+b);return new f.C.F(E)}if(b.nodeType==1||b.nodeType==8)return new f.C.ia(b);throw Error("Unknown template type: "+b)},f.ca.prototype.renderTemplate=function(b,R,E,I){return b=this.makeTemplateSource(b,I),this.renderTemplateSource(b,R,E,I)},f.ca.prototype.isTemplateRewritten=function(b,R){return this.allowTemplateRewriting===!1?!0:this.makeTemplateSource(b,R).data("isRewritten")},f.ca.prototype.rewriteTemplate=function(b,R,E){b=this.makeTemplateSource(b,E),R=R(b.text()),b.text(R),b.data("isRewritten",!0)},f.b("templateEngine",f.ca),f.kc=function(){function b(I,w,N,B){I=f.m.ac(I);for(var U=f.m.Ra,O=0;O<I.length;O++){var k=I[O].key;if(Object.prototype.hasOwnProperty.call(U,k)){var J=U[k];if(typeof J=="function"){if(k=J(I[O].value))throw Error(k)}else if(!J)throw Error("This template engine does not support the '"+k+"' binding within its templates")}}return N="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+f.m.vb(I,{valueAccessors:!0})+" } })()},'"+N.toLowerCase()+"')",B.createJavaScriptEvaluatorBlock(N)+w}var R=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,E=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(I,w,N){w.isTemplateRewritten(I,N)||w.rewriteTemplate(I,function(B){return f.kc.Ld(B,w)},N)},Ld:function(I,w){return I.replace(R,function(N,B,U,O,k){return b(k,B,U,w)}).replace(E,function(N,B){return b(B,"<!-- ko -->","#comment",w)})},md:function(I,w){return f.aa.Xb(function(N,B){var U=N.nextSibling;U&&U.nodeName.toLowerCase()===w&&f.ib(U,I,B)})}}}(),f.b("__tr_ambtns",f.kc.md),function(){f.C={},f.C.F=function(E){if(this.F=E){var I=f.a.R(E);this.ab=I==="script"?1:I==="textarea"?2:I=="template"&&E.content&&E.content.nodeType===11?3:4}},f.C.F.prototype.text=function(){var E=this.ab===1?"text":this.ab===2?"value":"innerHTML";if(arguments.length==0)return this.F[E];var I=arguments[0];E==="innerHTML"?f.a.fc(this.F,I):this.F[E]=I};var b=f.a.g.Z()+"_";f.C.F.prototype.data=function(E){if(arguments.length===1)return f.a.g.get(this.F,b+E);f.a.g.set(this.F,b+E,arguments[1])};var R=f.a.g.Z();f.C.F.prototype.nodes=function(){var E=this.F;if(arguments.length==0){var I=f.a.g.get(E,R)||{},w=I.lb||(this.ab===3?E.content:this.ab===4?E:e);if(!w||I.jd){var N=this.text();N&&N!==I.bb&&(w=f.a.Md(N,E.ownerDocument),f.a.g.set(E,R,{lb:w,bb:N,jd:!0}))}return w}I=arguments[0],this.ab!==e&&this.text(""),f.a.g.set(E,R,{lb:I})},f.C.ia=function(E){this.F=E},f.C.ia.prototype=new f.C.F,f.C.ia.prototype.constructor=f.C.ia,f.C.ia.prototype.text=function(){if(arguments.length==0){var E=f.a.g.get(this.F,R)||{};return E.bb===e&&E.lb&&(E.bb=E.lb.innerHTML),E.bb}f.a.g.set(this.F,R,{bb:arguments[0]})},f.b("templateSources",f.C),f.b("templateSources.domElement",f.C.F),f.b("templateSources.anonymousTemplate",f.C.ia)}(),function(){function b(O,k,J){var H;for(k=f.h.nextSibling(k);O&&(H=O)!==k;)O=f.h.nextSibling(H),J(H,O)}function R(O,k){if(O.length){var J=O[0],H=O[O.length-1],ee=J.parentNode,z=f.ga.instance,j=z.preprocessNode;if(j){if(b(J,H,function(q,be){var Te=q.previousSibling,ae=j.call(z,q);ae&&(q===J&&(J=ae[0]||be),q===H&&(H=ae[ae.length-1]||Te))}),O.length=0,!J)return;J===H?O.push(J):(O.push(J,H),f.a.Ua(O,ee))}b(J,H,function(q){q.nodeType!==1&&q.nodeType!==8||f.vc(k,q)}),b(J,H,function(q){q.nodeType!==1&&q.nodeType!==8||f.aa.cd(q,[k])}),f.a.Ua(O,ee)}}function E(O){return O.nodeType?O:0<O.length?O[0]:null}function I(O,k,J,H,ee){ee=ee||{};var z=(O&&E(O)||J||{}).ownerDocument,j=ee.templateEngine||N;if(f.kc.xd(J,j,z),J=j.renderTemplate(J,H,ee,z),typeof J.length!="number"||0<J.length&&typeof J[0].nodeType!="number")throw Error("Template engine must return an array of DOM nodes");switch(z=!1,k){case"replaceChildren":f.h.va(O,J),z=!0;break;case"replaceNode":f.a.Xc(O,J),z=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+k)}return z&&(R(J,H),ee.afterRender&&f.u.G(ee.afterRender,null,[J,H[ee.as||"$data"]]),k=="replaceChildren"&&f.i.ma(O,f.i.H)),J}function w(O,k,J){return f.O(O)?O():typeof O=="function"?O(k,J):O}var N;f.gc=function(O){if(O!=e&&!(O instanceof f.ca))throw Error("templateEngine must inherit from ko.templateEngine");N=O},f.dc=function(O,k,J,H,ee){if(J=J||{},(J.templateEngine||N)==e)throw Error("Set a template engine before calling renderTemplate");if(ee=ee||"replaceChildren",H){var z=E(H);return f.$(function(){var q=k&&k instanceof f.fa?k:new f.fa(k,null,null,null,{exportDependencies:!0}),j=w(O,q.$data,q),q=I(H,ee,j,q,J);ee=="replaceNode"&&(H=q,z=E(H))},null,{Sa:function(){return!z||!f.a.Sb(z)},l:z&&ee=="replaceNode"?z.parentNode:z})}return f.aa.Xb(function(j){f.dc(O,k,J,j,"replaceNode")})},f.Qd=function(O,k,J,H,ee){function z(Se,Le){f.u.G(f.a.ec,null,[H,Se,q,J,j,Le]),f.i.ma(H,f.i.H)}function j(Se,Le){R(Le,be),J.afterRender&&J.afterRender(Le,Se),be=null}function q(Se,Le){be=ee.createChildContext(Se,{as:Te,noChildContext:J.noChildContext,extend:function(Pe){Pe.$index=Le,Te&&(Pe[Te+"Index"]=Le)}});var Xe=w(O,Se,be);return I(H,"ignoreTargetNode",Xe,be,J)}var be,Te=J.as,ae=J.includeDestroyed===!1||f.options.foreachHidesDestroyed&&!J.includeDestroyed;if(ae||J.beforeRemove||!f.Pc(k))return f.$(function(){var Se=f.a.f(k)||[];typeof Se.length>"u"&&(Se=[Se]),ae&&(Se=f.a.jb(Se,function(Le){return Le===e||Le===null||!f.a.f(Le._destroy)})),z(Se)},null,{l:H});z(k.v());var ye=k.subscribe(function(Se){z(k(),Se)},null,"arrayChange");return ye.l(H),ye};var B=f.a.g.Z(),U=f.a.g.Z();f.c.template={init:function(O,k){var J=f.a.f(k());if(typeof J=="string"||"name"in J)f.h.Ea(O);else if("nodes"in J){if(J=J.nodes||[],f.O(J))throw Error('The "nodes" option must be a plain, non-observable array.');var H=J[0]&&J[0].parentNode;H&&f.a.g.get(H,U)||(H=f.a.Yb(J),f.a.g.set(H,U,!0)),new f.C.ia(O).nodes(H)}else if(J=f.h.childNodes(O),0<J.length)H=f.a.Yb(J),new f.C.ia(O).nodes(H);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:function(O,k,J,H,ee){var z=k();k=f.a.f(z),J=!0,H=null,typeof k=="string"?k={}:(z="name"in k?k.name:O,"if"in k&&(J=f.a.f(k.if)),J&&"ifnot"in k&&(J=!f.a.f(k.ifnot)),J&&!z&&(J=!1)),"foreach"in k?H=f.Qd(z,J&&k.foreach||[],k,O,ee):J?(J=ee,"data"in k&&(J=ee.createChildContext(k.data,{as:k.as,noChildContext:k.noChildContext,exportDependencies:!0})),H=f.dc(z,J,k,O)):f.h.Ea(O),ee=H,(k=f.a.g.get(O,B))&&typeof k.s=="function"&&k.s(),f.a.g.set(O,B,!ee||ee.ja&&!ee.ja()?e:ee)}},f.m.Ra.template=function(O){return O=f.m.ac(O),O.length==1&&O[0].unknown||f.m.Id(O,"name")?null:"This template engine does not support anonymous templates nested within its templates"},f.h.ea.template=!0}(),f.b("setTemplateEngine",f.gc),f.b("renderTemplate",f.dc),f.a.Kc=function(b,R,E){if(b.length&&R.length){var I,w,N,B,U;for(I=w=0;(!E||I<E)&&(B=b[w]);++w){for(N=0;U=R[N];++N)if(B.value===U.value){B.moved=U.index,U.moved=B.index,R.splice(N,1),I=N=0;break}I+=N}}},f.a.Pb=function(){function b(R,E,I,w,N){var B=Math.min,U=Math.max,O=[],k,J=R.length,H,ee=E.length,z=ee-J||1,j=J+ee+1,q,be,Te;for(k=0;k<=J;k++)for(be=q,O.push(q=[]),Te=B(ee,k+z),H=U(0,k-1);H<=Te;H++)q[H]=H?k?R[k-1]===E[H-1]?be[H-1]:B(be[H]||j,q[H-1]||j)+1:H+1:k+1;for(B=[],U=[],z=[],k=J,H=ee;k||H;)ee=O[k][H]-1,H&&ee===O[k][H-1]?U.push(B[B.length]={status:I,value:E[--H],index:H}):k&&ee===O[k-1][H]?z.push(B[B.length]={status:w,value:R[--k],index:k}):(--H,--k,N.sparse||B.push({status:"retained",value:E[H]}));return f.a.Kc(z,U,!N.dontLimitMoves&&10*J),B.reverse()}return function(R,E,I){return I=typeof I=="boolean"?{dontLimitMoves:I}:I||{},R=R||[],E=E||[],R.length<E.length?b(R,E,"added","deleted",I):b(E,R,"deleted","added",I)}}(),f.b("utils.compareArrays",f.a.Pb),function(){function b(I,w,N,B,U){var O=[],k=f.$(function(){var J=w(N,U,f.a.Ua(O,I))||[];0<O.length&&(f.a.Xc(O,J),B&&f.u.G(B,null,[N,J,U])),O.length=0,f.a.Nb(O,J)},null,{l:I,Sa:function(){return!f.a.kd(O)}});return{Y:O,$:k.ja()?k:e}}var R=f.a.g.Z(),E=f.a.g.Z();f.a.ec=function(I,w,N,B,U,O){function k(je){Xe={Aa:je,pb:f.ta(be++)},j.push(Xe),z||Le.push(Xe)}function J(je){Xe=ee[je],be!==Xe.pb.v()&&Se.push(Xe),Xe.pb(be++),f.a.Ua(Xe.Y,I),j.push(Xe)}function H(je,kt){if(je)for(var pe=0,Ve=kt.length;pe<Ve;pe++)f.a.D(kt[pe].Y,function(Dt){je(Dt,pe,kt[pe].Aa)})}w=w||[],typeof w.length>"u"&&(w=[w]),B=B||{};var ee=f.a.g.get(I,R),z=!ee,j=[],q=0,be=0,Te=[],ae=[],ye=[],Se=[],Le=[],Xe,Pe=0;if(z)f.a.D(w,k);else{if(!O||ee&&ee._countWaitingForRemove){var ke=f.a.Mb(ee,function(je){return je.Aa});O=f.a.Pb(ke,w,{dontLimitMoves:B.dontLimitMoves,sparse:!0})}for(var ke=0,Pt,Ot,ht;Pt=O[ke];ke++)switch(Ot=Pt.moved,ht=Pt.index,Pt.status){case"deleted":for(;q<ht;)J(q++);Ot===e&&(Xe=ee[q],Xe.$&&(Xe.$.s(),Xe.$=e),f.a.Ua(Xe.Y,I).length&&(B.beforeRemove&&(j.push(Xe),Pe++,Xe.Aa===E?Xe=null:ye.push(Xe)),Xe&&Te.push.apply(Te,Xe.Y))),q++;break;case"added":for(;be<ht;)J(q++);Ot!==e?(ae.push(j.length),J(Ot)):k(Pt.value)}for(;be<w.length;)J(q++);j._countWaitingForRemove=Pe}f.a.g.set(I,R,j),H(B.beforeMove,Se),f.a.D(Te,B.beforeRemove?f.oa:f.removeNode);var Ae,$e,Qe;try{Qe=I.ownerDocument.activeElement}catch{}if(ae.length)for(;(ke=ae.shift())!=e;){for(Xe=j[ke],Ae=e;ke;)if(($e=j[--ke].Y)&&$e.length){Ae=$e[$e.length-1];break}for(w=0;q=Xe.Y[w];Ae=q,w++)f.h.Wb(I,q,Ae)}for(ke=0;Xe=j[ke];ke++){for(Xe.Y||f.a.extend(Xe,b(I,N,Xe.Aa,U,Xe.pb)),w=0;q=Xe.Y[w];Ae=q,w++)f.h.Wb(I,q,Ae);!Xe.Ed&&U&&(U(Xe.Aa,Xe.Y,Xe.pb),Xe.Ed=!0,Ae=Xe.Y[Xe.Y.length-1])}for(Qe&&I.ownerDocument.activeElement!=Qe&&Qe.focus(),H(B.beforeRemove,ye),ke=0;ke<ye.length;++ke)ye[ke].Aa=E;H(B.afterMove,Se),H(B.afterAdd,Le)}}(),f.b("utils.setDomNodeChildrenFromArrayMapping",f.a.ec),f.ba=function(){this.allowTemplateRewriting=!1},f.ba.prototype=new f.ca,f.ba.prototype.constructor=f.ba,f.ba.prototype.renderTemplateSource=function(b,R,E,I){return(R=!(9>f.a.W)&&b.nodes?b.nodes():null)?f.a.la(R.cloneNode(!0).childNodes):(b=b.text(),f.a.ua(b,I))},f.ba.Ma=new f.ba,f.gc(f.ba.Ma),f.b("nativeTemplateEngine",f.ba),function(){f.$a=function(){var R=this.Hd=function(){if(!o||!o.tmpl)return 0;try{if(0<=o.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1}();this.renderTemplateSource=function(E,I,w,N){if(N=N||n,w=w||{},2>R)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var B=E.data("precompiled");return B||(B=E.text()||"",B=o.template(null,"{{ko_with $item.koBindingContext}}"+B+"{{/ko_with}}"),E.data("precompiled",B)),E=[I.$data],I=o.extend({koBindingContext:I},w.templateOptions),I=o.tmpl(B,E,I),I.appendTo(N.createElement("div")),o.fragments={},I},this.createJavaScriptEvaluatorBlock=function(E){return"{{ko_code ((function() { return "+E+" })()) }}"},this.addTemplate=function(E,I){n.write("<script type='text/html' id='"+E+"'>"+I+"<\/script>")},0<R&&(o.tmpl.tag.ko_code={open:"__.push($1 || '');"},o.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},f.$a.prototype=new f.ca,f.$a.prototype.constructor=f.$a;var b=new f.$a;0<b.Hd&&f.gc(b),f.b("jqueryTmplTemplateEngine",f.$a)}()})})()})()})();var K_t=ko;typeof window<"u"?(ko=window.ko,typeof gA<"u"?window.ko=gA:delete window.ko):(ko=global.ko,typeof gA<"u"?global.ko=gA:delete global.ko);var fS=K_t;var _xo=T(S(),1);/** +Message: `+U.message,U}}}),f.ga.instance=new f.ga}(),f.b("bindingProvider",f.ga),function(){function b(ae){var ye=(ae=f.a.g.get(ae,Se))&&ae.N;ye&&(ae.N=null,ye.Tc())}function L(ae,ye,Te){this.node=ae,this.yc=ye,this.kb=[],this.H=!1,ye.N||f.a.K.za(ae,b),Te&&Te.N&&(Te.N.kb.push(ae),this.Kb=Te)}function E(ae){return function(){return ae}}function I(ae){return ae()}function w(ae){return f.a.Ga(f.u.G(ae),function(ye,Te){return function(){return ae()[Te]}})}function N(ae,ye,Te){return typeof ae=="function"?w(ae.bind(null,ye,Te)):f.a.Ga(ae,E)}function B(ae,ye){return w(this.getBindings.bind(this,ae,ye))}function k(ae,ye){var Te=f.h.firstChild(ye);if(Te){var Ze,We=f.ga.instance,Pe=We.preprocessNode;if(Pe){for(;Ze=Te;)Te=f.h.nextSibling(Ze),Pe.call(We,Ze);Te=f.h.firstChild(ye)}for(;Ze=Te;)Te=f.h.nextSibling(Ze),O(ae,Ze)}f.i.ma(ye,f.i.H)}function O(ae,ye){var Te=ae,Ze=ye.nodeType===1;Ze&&f.h.Sc(ye),(Ze||f.ga.instance.nodeHasBindings(ye))&&(Te=J(ye,null,ae).bindingContextForDescendants),Te&&!q[f.a.R(ye)]&&k(Te,ye)}function U(ae){var ye=[],Te={},Ze=[];return f.a.P(ae,function We(Pe){if(!Te[Pe]){var Ue=f.getBindingHandler(Pe);Ue&&(Ue.after&&(Ze.push(Pe),f.a.D(Ue.after,function(Pt){if(ae[Pt]){if(f.a.A(Ze,Pt)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+Ze.join(", "));We(Pt)}}),Ze.length--),ye.push({key:Pe,Mc:Ue})),Te[Pe]=!0}}),ye}function J(ae,ye,Te){var Ze=f.a.g.Ub(ae,Se,{}),We=Ze.hd;if(!ye){if(We)throw Error("You cannot apply bindings multiple times to the same element.");Ze.hd=!0}We||(Ze.context=Te),Ze.Zb||(Ze.Zb={});var Pe;if(ye&&typeof ye!="function")Pe=ye;else{var Ue=f.ga.instance,Pt=Ue.getBindingAccessors||B,Ot=f.$(function(){return(Pe=ye?ye(Te,ae):Pt.call(Ue,ae,Te))&&(Te[ee]&&Te[ee](),Te[j]&&Te[j]()),Pe},null,{l:ae});Pe&&Ot.ja()||(Ot=null)}var ht=Te,Ae;if(Pe){var $e=function(){return f.a.Ga(Ot?Ot():Pe,I)},Qe=Ot?function(je){return function(){return I(Ot()[je])}}:function(je){return Pe[je]};$e.get=function(je){return Pe[je]&&I(Qe(je))},$e.has=function(je){return je in Pe},f.i.H in Pe&&f.i.subscribe(ae,f.i.H,function(){var je=(0,Pe[f.i.H])();if(je){var Ut=f.h.childNodes(ae);Ut.length&&je(Ut,f.Ec(Ut[0]))}}),f.i.pa in Pe&&(ht=f.i.Cb(ae,Te),f.i.subscribe(ae,f.i.pa,function(){var je=(0,Pe[f.i.pa])();je&&f.h.firstChild(ae)&&je(ae)})),Ze=U(Pe),f.a.D(Ze,function(je){var Ut=je.Mc.init,pe=je.Mc.update,Ve=je.key;if(ae.nodeType===8&&!f.h.ea[Ve])throw Error("The binding '"+Ve+"' cannot be used with virtual elements");try{typeof Ut=="function"&&f.u.G(function(){var Dt=Ut(ae,Qe(Ve),$e,ht.$data,ht);if(Dt&&Dt.controlsDescendantBindings){if(Ae!==e)throw Error("Multiple bindings ("+Ae+" and "+Ve+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");Ae=Ve}}),typeof pe=="function"&&f.$(function(){pe(ae,Qe(Ve),$e,ht.$data,ht)},null,{l:ae})}catch(Dt){throw Dt.message='Unable to process binding "'+Ve+": "+Pe[Ve]+`" +Message: `+Dt.message,Dt}})}return Ze=Ae===e,{shouldBindDescendants:Ze,bindingContextForDescendants:Ze&&ht}}function z(ae,ye){return ae&&ae instanceof f.fa?ae:new f.fa(ae,e,e,ye)}var ee=f.a.Da("_subscribable"),K=f.a.Da("_ancestorBindingInfo"),j=f.a.Da("_dataDependency");f.c={};var q={script:!0,textarea:!0,template:!0};f.getBindingHandler=function(ae){return f.c[ae]};var be={};f.fa=function(ae,ye,Te,Ze,We){function Pe(){var Qe=ht?Ot():Ot,je=f.a.f(Qe);return ye?(f.a.extend(Ue,ye),K in ye&&(Ue[K]=ye[K])):(Ue.$parents=[],Ue.$root=je,Ue.ko=f),Ue[ee]=Ae,Pt?je=Ue.$data:(Ue.$rawData=Qe,Ue.$data=je),Te&&(Ue[Te]=je),Ze&&Ze(Ue,ye,je),ye&&ye[ee]&&!f.S.o().Vb(ye[ee])&&ye[ee](),$e&&(Ue[j]=$e),Ue.$data}var Ue=this,Pt=ae===be,Ot=Pt?e:ae,ht=typeof Ot=="function"&&!f.O(Ot),Ae,$e=We&&We.dataDependency;We&&We.exportDependencies?Pe():(Ae=f.xb(Pe),Ae.v(),Ae.ja()?Ae.equalityComparer=null:Ue[ee]=e)},f.fa.prototype.createChildContext=function(ae,ye,Te,Ze){if(!Ze&&ye&&typeof ye=="object"&&(Ze=ye,ye=Ze.as,Te=Ze.extend),ye&&Ze&&Ze.noChildContext){var We=typeof ae=="function"&&!f.O(ae);return new f.fa(be,this,null,function(Pe){Te&&Te(Pe),Pe[ye]=We?ae():ae},Ze)}return new f.fa(ae,this,ye,function(Pe,Ue){Pe.$parentContext=Ue,Pe.$parent=Ue.$data,Pe.$parents=(Ue.$parents||[]).slice(0),Pe.$parents.unshift(Pe.$parent),Te&&Te(Pe)},Ze)},f.fa.prototype.extend=function(ae,ye){return new f.fa(be,this,null,function(Te){f.a.extend(Te,typeof ae=="function"?ae(Te):ae)},ye)};var Se=f.a.g.Z();L.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},L.prototype.sd=function(ae){f.a.Pa(this.kb,ae),!this.kb.length&&this.H&&this.Cc()},L.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,f.a.K.yb(this.node,b),f.i.ma(this.node,f.i.pa),this.Tc())},f.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(ae,ye,Te,Ze,We){var Pe=f.a.g.Ub(ae,Se,{});return Pe.Fa||(Pe.Fa=new f.T),We&&We.notifyImmediately&&Pe.Zb[ye]&&f.u.G(Te,Ze,[ae]),Pe.Fa.subscribe(Te,Ze,ye)},ma:function(ae,ye){var Te=f.a.g.get(ae,Se);if(Te&&(Te.Zb[ye]=!0,Te.Fa&&Te.Fa.notifySubscribers(ae,ye),ye==f.i.H)){if(Te.N)Te.N.Cc();else if(Te.N===e&&Te.Fa&&Te.Fa.Wa(f.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")}},Cb:function(ae,ye){var Te=f.a.g.Ub(ae,Se,{});return Te.N||(Te.N=new L(ae,Te,ye[K])),ye[K]==Te?ye:ye.extend(function(Ze){Ze[K]=Te})}},f.Td=function(ae){return(ae=f.a.g.get(ae,Se))&&ae.context},f.ib=function(ae,ye,Te){return ae.nodeType===1&&f.h.Sc(ae),J(ae,ye,z(Te))},f.ld=function(ae,ye,Te){return Te=z(Te),f.ib(ae,N(ye,Te,ae),Te)},f.Oa=function(ae,ye){ye.nodeType!==1&&ye.nodeType!==8||k(z(ae),ye)},f.vc=function(ae,ye,Te){if(!o&&t.jQuery&&(o=t.jQuery),2>arguments.length){if(ye=n.body,!ye)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!ye||ye.nodeType!==1&&ye.nodeType!==8)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");O(z(ae,Te),ye)},f.Dc=function(ae){return!ae||ae.nodeType!==1&&ae.nodeType!==8?e:f.Td(ae)},f.Ec=function(ae){return(ae=f.Dc(ae))?ae.$data:e},f.b("bindingHandlers",f.c),f.b("bindingEvent",f.i),f.b("bindingEvent.subscribe",f.i.subscribe),f.b("bindingEvent.startPossiblyAsyncContentBinding",f.i.Cb),f.b("applyBindings",f.vc),f.b("applyBindingsToDescendants",f.Oa),f.b("applyBindingAccessorsToNode",f.ib),f.b("applyBindingsToNode",f.ld),f.b("contextFor",f.Dc),f.b("dataFor",f.Ec)}(),function(b){function L(B,k){var O=Object.prototype.hasOwnProperty.call(w,B)?w[B]:b,U;O?O.subscribe(k):(O=w[B]=new f.T,O.subscribe(k),E(B,function(J,z){var ee=!(!z||!z.synchronous);N[B]={definition:J,Gd:ee},delete w[B],U||ee?O.notifySubscribers(J):f.na.zb(function(){O.notifySubscribers(J)})}),U=!0)}function E(B,k){I("getConfig",[B],function(O){O?I("loadComponent",[B,O],function(U){k(U,O)}):k(null,null)})}function I(B,k,O,U){U||(U=f.j.loaders.slice(0));var J=U.shift();if(J){var z=J[B];if(z){var ee=!1;if(z.apply(J,k.concat(function(K){ee?O(null):K!==null?O(K):I(B,k,O,U)}))!==b&&(ee=!0,!J.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else I(B,k,O,U)}else O(null)}var w={},N={};f.j={get:function(B,k){var O=Object.prototype.hasOwnProperty.call(N,B)?N[B]:b;O?O.Gd?f.u.G(function(){k(O.definition)}):f.na.zb(function(){k(O.definition)}):L(B,k)},Bc:function(B){delete N[B]},oc:I},f.j.loaders=[],f.b("components",f.j),f.b("components.get",f.j.get),f.b("components.clearCachedDefinition",f.j.Bc)}(),function(){function b(O,U,J,z){function ee(){--j===0&&z(K)}var K={},j=2,q=J.template;J=J.viewModel,q?w(U,q,function(be){f.j.oc("loadTemplate",[O,be],function(Se){K.template=Se,ee()})}):ee(),J?w(U,J,function(be){f.j.oc("loadViewModel",[O,be],function(Se){K[k]=Se,ee()})}):ee()}function L(O,U,J){if(typeof U=="function")J(function(ee){return new U(ee)});else if(typeof U[k]=="function")J(U[k]);else if("instance"in U){var z=U.instance;J(function(){return z})}else"viewModel"in U?L(O,U.viewModel,J):O("Unknown viewModel value: "+U)}function E(O){switch(f.a.R(O)){case"script":return f.a.ua(O.text);case"textarea":return f.a.ua(O.value);case"template":if(I(O.content))return f.a.Ca(O.content.childNodes)}return f.a.Ca(O.childNodes)}function I(O){return t.DocumentFragment?O instanceof DocumentFragment:O&&O.nodeType===11}function w(O,U,J){typeof U.require=="string"?a||t.require?(a||t.require)([U.require],function(z){z&&typeof z=="object"&&z.Xd&&z.default&&(z=z.default),J(z)}):O("Uses require, but no AMD loader is present"):J(U)}function N(O){return function(U){throw Error("Component '"+O+"': "+U)}}var B={};f.j.register=function(O,U){if(!U)throw Error("Invalid configuration for "+O);if(f.j.tb(O))throw Error("Component "+O+" is already registered");B[O]=U},f.j.tb=function(O){return Object.prototype.hasOwnProperty.call(B,O)},f.j.unregister=function(O){delete B[O],f.j.Bc(O)},f.j.Fc={getConfig:function(O,U){U(f.j.tb(O)?B[O]:null)},loadComponent:function(O,U,J){var z=N(O);w(z,U,function(ee){b(O,z,ee,J)})},loadTemplate:function(O,U,J){if(O=N(O),typeof U=="string")J(f.a.ua(U));else if(U instanceof Array)J(U);else if(I(U))J(f.a.la(U.childNodes));else if(U.element)if(U=U.element,t.HTMLElement?U instanceof HTMLElement:U&&U.tagName&&U.nodeType===1)J(E(U));else if(typeof U=="string"){var z=n.getElementById(U);z?J(E(z)):O("Cannot find element with ID "+U)}else O("Unknown element type: "+U);else O("Unknown template value: "+U)},loadViewModel:function(O,U,J){L(N(O),U,J)}};var k="createViewModel";f.b("components.register",f.j.register),f.b("components.isRegistered",f.j.tb),f.b("components.unregister",f.j.unregister),f.b("components.defaultLoader",f.j.Fc),f.j.loaders.push(f.j.Fc),f.j.dd=B}(),function(){function b(E,I){var w=E.getAttribute("params");if(w){var w=L.parseBindingsString(w,I,E,{valueAccessors:!0,bindingParams:!0}),w=f.a.Ga(w,function(k){return f.o(k,null,{l:E})}),N=f.a.Ga(w,function(k){var O=k.v();return k.ja()?f.o({read:function(){return f.a.f(k())},write:f.Za(O)&&function(U){k()(U)},l:E}):O});return Object.prototype.hasOwnProperty.call(N,"$raw")||(N.$raw=w),N}return{$raw:{}}}f.j.getComponentNameForNode=function(E){var I=f.a.R(E);if(f.j.tb(I)&&(I.indexOf("-")!=-1||""+E=="[object HTMLUnknownElement]"||8>=f.a.W&&E.tagName===I))return I},f.j.tc=function(E,I,w,N){if(I.nodeType===1){var B=f.j.getComponentNameForNode(I);if(B){if(E=E||{},E.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var k={name:B,params:b(I,w)};E.component=N?function(){return k}:k}}return E};var L=new f.ga;9>f.a.W&&(f.j.register=function(E){return function(I){return E.apply(this,arguments)}}(f.j.register),n.createDocumentFragment=function(E){return function(){var I=E(),w=f.j.dd,N;for(N in w);return I}}(n.createDocumentFragment))}(),function(){function b(I,w,N){if(w=w.template,!w)throw Error("Component '"+I+"' has no template");I=f.a.Ca(w),f.h.va(N,I)}function L(I,w,N){var B=I.createViewModel;return B?B.call(I,w,N):w}var E=0;f.c.component={init:function(I,w,N,B,k){function O(){var K=U&&U.dispose;typeof K=="function"&&K.call(U),z&&z.s(),J=U=z=null}var U,J,z,ee=f.a.la(f.h.childNodes(I));return f.h.Ea(I),f.a.K.za(I,O),f.o(function(){var K=f.a.f(w()),j,q;if(typeof K=="string"?j=K:(j=f.a.f(K.name),q=f.a.f(K.params)),!j)throw Error("No component name specified");var be=f.i.Cb(I,k),Se=J=++E;f.j.get(j,function(ae){if(J===Se){if(O(),!ae)throw Error("Unknown component '"+j+"'");b(j,ae,I);var ye=L(ae,q,{element:I,templateNodes:ee});ae=be.createChildContext(ye,{extend:function(Te){Te.$component=ye,Te.$componentTemplateNodes=ee}}),ye&&ye.koDescendantsComplete&&(z=f.i.subscribe(I,f.i.pa,ye.koDescendantsComplete,ye)),U=ye,f.Oa(ae,I)}})},null,{l:I}),{controlsDescendantBindings:!0}}},f.h.ea.component=!0}();var F={class:"className",for:"htmlFor"};f.c.attr={update:function(b,L){var E=f.a.f(L())||{};f.a.P(E,function(I,w){w=f.a.f(w);var N=I.indexOf(":"),N="lookupNamespaceURI"in b&&0<N&&b.lookupNamespaceURI(I.substr(0,N)),B=w===!1||w===null||w===e;B?N?b.removeAttributeNS(N,I):b.removeAttribute(I):w=w.toString(),8>=f.a.W&&I in F?(I=F[I],B?b.removeAttribute(I):b[I]=w):B||(N?b.setAttributeNS(N,I,w):b.setAttribute(I,w)),I==="name"&&f.a.Yc(b,B?"":w)})}},function(){f.c.checked={after:["value","attr"],init:function(b,L,E){function I(){var K=b.checked,j=N();if(!f.S.Ya()&&(K||!k&&!f.S.qa())){var q=f.u.G(L);if(U){var be=J?q.v():q,Se=ee;ee=j,Se!==j?K&&(f.a.Na(be,j,!0),f.a.Na(be,Se,!1)):f.a.Na(be,j,K),J&&f.Za(q)&&q(be)}else B&&(j===e?j=K:K||(j=e)),f.m.eb(q,E,"checked",j,!0)}}function w(){var K=f.a.f(L()),j=N();U?(b.checked=0<=f.a.A(K,j),ee=j):b.checked=B&&j===e?!!K:N()===K}var N=f.xb(function(){if(E.has("checkedValue"))return f.a.f(E.get("checkedValue"));if(z)return E.has("value")?f.a.f(E.get("value")):b.value}),B=b.type=="checkbox",k=b.type=="radio";if(B||k){var O=L(),U=B&&f.a.f(O)instanceof Array,J=!(U&&O.push&&O.splice),z=k||U,ee=U?N():e;k&&!b.name&&f.c.uniqueName.init(b,function(){return!0}),f.o(I,null,{l:b}),f.a.B(b,"click",I),f.o(w,null,{l:b}),O=e}}},f.m.wa.checked=!0,f.c.checkedValue={update:function(b,L){b.value=f.a.f(L())}}}(),f.c.class={update:function(b,L){var E=f.a.Db(f.a.f(L()));f.a.Eb(b,b.__ko__cssValue,!1),b.__ko__cssValue=E,f.a.Eb(b,E,!0)}},f.c.css={update:function(b,L){var E=f.a.f(L());E!==null&&typeof E=="object"?f.a.P(E,function(I,w){w=f.a.f(w),f.a.Eb(b,I,w)}):f.c.class.update(b,L)}},f.c.enable={update:function(b,L){var E=f.a.f(L());E&&b.disabled?b.removeAttribute("disabled"):E||b.disabled||(b.disabled=!0)}},f.c.disable={update:function(b,L){f.c.enable.update(b,function(){return!f.a.f(L())})}},f.c.event={init:function(b,L,E,I,w){var N=L()||{};f.a.P(N,function(B){typeof B=="string"&&f.a.B(b,B,function(k){var O,U=L()[B];if(U){try{var J=f.a.la(arguments);I=w.$data,J.unshift(I),O=U.apply(I,J)}finally{O!==!0&&(k.preventDefault?k.preventDefault():k.returnValue=!1)}E.get(B+"Bubble")===!1&&(k.cancelBubble=!0,k.stopPropagation&&k.stopPropagation())}})})}},f.c.foreach={Rc:function(b){return function(){var L=b(),E=f.a.bc(L);return!E||typeof E.length=="number"?{foreach:L,templateEngine:f.ba.Ma}:(f.a.f(L),{foreach:E.data,as:E.as,noChildContext:E.noChildContext,includeDestroyed:E.includeDestroyed,afterAdd:E.afterAdd,beforeRemove:E.beforeRemove,afterRender:E.afterRender,beforeMove:E.beforeMove,afterMove:E.afterMove,templateEngine:f.ba.Ma})}},init:function(b,L){return f.c.template.init(b,f.c.foreach.Rc(L))},update:function(b,L,E,I,w){return f.c.template.update(b,f.c.foreach.Rc(L),E,I,w)}},f.m.Ra.foreach=!1,f.h.ea.foreach=!0,f.c.hasfocus={init:function(b,L,E){function I(B){b.__ko_hasfocusUpdating=!0;var k=b.ownerDocument;if("activeElement"in k){var O;try{O=k.activeElement}catch{O=k.body}B=O===b}k=L(),f.m.eb(k,E,"hasfocus",B,!0),b.__ko_hasfocusLastValue=B,b.__ko_hasfocusUpdating=!1}var w=I.bind(null,!0),N=I.bind(null,!1);f.a.B(b,"focus",w),f.a.B(b,"focusin",w),f.a.B(b,"blur",N),f.a.B(b,"focusout",N),b.__ko_hasfocusLastValue=!1},update:function(b,L){var E=!!f.a.f(L());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===E||(E?b.focus():b.blur(),!E&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),f.u.G(f.a.Fb,null,[b,E?"focusin":"focusout"]))}},f.m.wa.hasfocus=!0,f.c.hasFocus=f.c.hasfocus,f.m.wa.hasFocus="hasfocus",f.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,L){f.a.fc(b,L())}},function(){function b(L,E,I){f.c[L]={init:function(w,N,B,k,O){var U,J,z={},ee,K,j;if(E){k=B.get("as");var q=B.get("noChildContext");j=!(k&&q),z={as:k,noChildContext:q,exportDependencies:j}}return K=(ee=B.get("completeOn")=="render")||B.has(f.i.pa),f.o(function(){var be=f.a.f(N()),Se=!I!=!be,ae=!J,ye;(j||Se!==U)&&(K&&(O=f.i.Cb(w,O)),Se&&((!E||j)&&(z.dataDependency=f.S.o()),ye=E?O.createChildContext(typeof be=="function"?be:N,z):f.S.qa()?O.extend(null,z):O),ae&&f.S.qa()&&(J=f.a.Ca(f.h.childNodes(w),!0)),Se?(ae||f.h.va(w,f.a.Ca(J)),f.Oa(ye,w)):(f.h.Ea(w),ee||f.i.ma(w,f.i.H)),U=Se)},null,{l:w}),{controlsDescendantBindings:!0}}},f.m.Ra[L]=!1,f.h.ea[L]=!0}b("if"),b("ifnot",!1,!0),b("with",!0)}(),f.c.let={init:function(b,L,E,I,w){return L=w.extend(L),f.Oa(L,b),{controlsDescendantBindings:!0}}},f.h.ea.let=!0;var M={};f.c.options={init:function(b){if(f.a.R(b)!=="select")throw Error("options binding applies only to SELECT elements");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:function(b,L,E){function I(){return f.a.jb(b.options,function(q){return q.selected})}function w(q,be,Se){var ae=typeof be;return ae=="function"?be(q):ae=="string"?q[be]:Se}function N(q,be){if(K&&U)f.i.ma(b,f.i.H);else if(ee.length){var Se=0<=f.a.A(ee,f.w.M(be[0]));f.a.Zc(be[0],Se),K&&!Se&&f.u.G(f.a.Fb,null,[b,"change"])}}var B=b.multiple,k=b.length!=0&&B?b.scrollTop:null,O=f.a.f(L()),U=E.get("valueAllowUnset")&&E.has("value"),J=E.get("optionsIncludeDestroyed");L={};var z,ee=[];U||(B?ee=f.a.Mb(I(),f.w.M):0<=b.selectedIndex&&ee.push(f.w.M(b.options[b.selectedIndex]))),O&&(typeof O.length>"u"&&(O=[O]),z=f.a.jb(O,function(q){return J||q===e||q===null||!f.a.f(q._destroy)}),E.has("optionsCaption")&&(O=f.a.f(E.get("optionsCaption")),O!==null&&O!==e&&z.unshift(M)));var K=!1;if(L.beforeRemove=function(q){b.removeChild(q)},O=N,E.has("optionsAfterRender")&&typeof E.get("optionsAfterRender")=="function"&&(O=function(q,be){N(0,be),f.u.G(E.get("optionsAfterRender"),null,[be[0],q!==M?q:e])}),f.a.ec(b,z,function(q,be,Se){return Se.length&&(ee=!U&&Se[0].selected?[f.w.M(Se[0])]:[],K=!0),be=b.ownerDocument.createElement("option"),q===M?(f.a.Bb(be,E.get("optionsCaption")),f.w.cb(be,e)):(Se=w(q,E.get("optionsValue"),q),f.w.cb(be,f.a.f(Se)),q=w(q,E.get("optionsText"),Se),f.a.Bb(be,q)),[be]},L,O),!U){var j;B?j=ee.length&&I().length<ee.length:j=ee.length&&0<=b.selectedIndex?f.w.M(b.options[b.selectedIndex])!==ee[0]:ee.length||0<=b.selectedIndex,j&&f.u.G(f.a.Fb,null,[b,"change"])}(U||f.S.Ya())&&f.i.ma(b,f.i.H),f.a.wd(b),k&&20<Math.abs(k-b.scrollTop)&&(b.scrollTop=k)}},f.c.options.$b=f.a.g.Z(),f.c.selectedOptions={init:function(b,L,E){function I(){var B=L(),k=[];f.a.D(b.getElementsByTagName("option"),function(O){O.selected&&k.push(f.w.M(O))}),f.m.eb(B,E,"selectedOptions",k)}function w(){var B=f.a.f(L()),k=b.scrollTop;B&&typeof B.length=="number"&&f.a.D(b.getElementsByTagName("option"),function(O){var U=0<=f.a.A(B,f.w.M(O));O.selected!=U&&f.a.Zc(O,U)}),b.scrollTop=k}if(f.a.R(b)!="select")throw Error("selectedOptions binding applies only to SELECT elements");var N;f.i.subscribe(b,f.i.H,function(){N?I():(f.a.B(b,"change",I),N=f.o(w,null,{l:b}))},null,{notifyImmediately:!0})},update:function(){}},f.m.wa.selectedOptions=!0,f.c.style={update:function(b,L){var E=f.a.f(L()||{});f.a.P(E,function(I,w){if(w=f.a.f(w),(w===null||w===e||w===!1)&&(w=""),o)o(b).css(I,w);else if(/^--/.test(I))b.style.setProperty(I,w);else{I=I.replace(/-(\w)/g,function(B,k){return k.toUpperCase()});var N=b.style[I];b.style[I]=w,w===N||b.style[I]!=N||isNaN(w)||(b.style[I]=w+"px")}})}},f.c.submit={init:function(b,L,E,I,w){if(typeof L()!="function")throw Error("The value for a submit binding must be a function");f.a.B(b,"submit",function(N){var B,k=L();try{B=k.call(w.$data,b)}finally{B!==!0&&(N.preventDefault?N.preventDefault():N.returnValue=!1)}})}},f.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(b,L){f.a.Bb(b,L())}},f.h.ea.text=!0,function(){if(t&&t.navigator){var b=function(z){if(z)return parseFloat(z[1])},L=t.navigator.userAgent,E,I,w,N,B;(E=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(B=b(L.match(/Edge\/([^ ]+)$/)))||b(L.match(/Chrome\/([^ ]+)/))||(I=b(L.match(/Version\/([^ ]+) Safari/)))||(w=b(L.match(/Firefox\/([^ ]+)/)))||(N=f.a.W||b(L.match(/MSIE ([^ ]+)/)))||(N=b(L.match(/rv:([^ )]+)/)))}if(8<=N&&10>N)var k=f.a.g.Z(),O=f.a.g.Z(),U=function(z){var ee=this.activeElement;(ee=ee&&f.a.g.get(ee,O))&&ee(z)},J=function(z,ee){var K=z.ownerDocument;f.a.g.get(K,k)||(f.a.g.set(K,k,!0),f.a.B(K,"selectionchange",U)),f.a.g.set(z,O,ee)};f.c.textInput={init:function(z,ee,K){function j(Pe,Ue){f.a.B(z,Pe,Ue)}function q(){var Pe=f.a.f(ee());(Pe===null||Pe===e)&&(Pe=""),Te!==e&&Pe===Te?f.a.setTimeout(q,4):z.value!==Pe&&(We=!0,z.value=Pe,We=!1,ae=z.value)}function be(){ye||(Te=z.value,ye=f.a.setTimeout(Se,4))}function Se(){clearTimeout(ye),Te=ye=e;var Pe=z.value;ae!==Pe&&(ae=Pe,f.m.eb(ee(),K,"textInput",Pe))}var ae=z.value,ye,Te,Ze=f.a.W==9?be:Se,We=!1;N&&j("keypress",Se),11>N&&j("propertychange",function(Pe){We||Pe.propertyName!=="value"||Ze(Pe)}),N==8&&(j("keyup",Se),j("keydown",Se)),J&&(J(z,Ze),j("dragend",be)),(!N||9<=N)&&j("input",Ze),5>I&&f.a.R(z)==="textarea"?(j("keydown",be),j("paste",be),j("cut",be)):11>E?j("keydown",be):4>w?(j("DOMAutoComplete",Se),j("dragdrop",Se),j("drop",Se)):B&&z.type==="number"&&j("keydown",be),j("change",Se),j("blur",Se),f.o(q,null,{l:z})}},f.m.wa.textInput=!0,f.c.textinput={preprocess:function(z,ee,K){K("textInput",z)}}}(),f.c.uniqueName={init:function(b,L){if(L()){var E="ko_unique_"+ ++f.c.uniqueName.rd;f.a.Yc(b,E)}}},f.c.uniqueName.rd=0,f.c.using={init:function(b,L,E,I,w){var N;return E.has("as")&&(N={as:E.get("as"),noChildContext:E.get("noChildContext")}),L=w.createChildContext(L,N),f.Oa(L,b),{controlsDescendantBindings:!0}}},f.h.ea.using=!0,f.c.value={init:function(b,L,E){var I=f.a.R(b),w=I=="input";if(!w||b.type!="checkbox"&&b.type!="radio"){var N=[],B=E.get("valueUpdate"),k=!1,O=null;B&&(typeof B=="string"?N=[B]:N=f.a.wc(B),f.a.Pa(N,"change"));var U=function(){O=null,k=!1;var ee=L(),K=f.w.M(b);f.m.eb(ee,E,"value",K)};!f.a.W||!w||b.type!="text"||b.autocomplete=="off"||b.form&&b.form.autocomplete=="off"||f.a.A(N,"propertychange")!=-1||(f.a.B(b,"propertychange",function(){k=!0}),f.a.B(b,"focus",function(){k=!1}),f.a.B(b,"blur",function(){k&&U()})),f.a.D(N,function(ee){var K=U;f.a.Ud(ee,"after")&&(K=function(){O=f.w.M(b),f.a.setTimeout(U,0)},ee=ee.substring(5)),f.a.B(b,ee,K)});var J;if(J=w&&b.type=="file"?function(){var ee=f.a.f(L());ee===null||ee===e||ee===""?b.value="":f.u.G(U)}:function(){var ee=f.a.f(L()),K=f.w.M(b);O!==null&&ee===O?f.a.setTimeout(J,0):(ee!==K||K===e)&&(I==="select"?(K=E.get("valueAllowUnset"),f.w.cb(b,ee,K),K||ee===f.w.M(b)||f.u.G(U)):f.w.cb(b,ee))},I==="select"){var z;f.i.subscribe(b,f.i.H,function(){z?E.get("valueAllowUnset")?J():U():(f.a.B(b,"change",U),z=f.o(J,null,{l:b}))},null,{notifyImmediately:!0})}else f.a.B(b,"change",U),f.o(J,null,{l:b})}else f.ib(b,{checkedValue:L})},update:function(){}},f.m.wa.value=!0,f.c.visible={update:function(b,L){var E=f.a.f(L()),I=b.style.display!="none";E&&!I?b.style.display="":!E&&I&&(b.style.display="none")}},f.c.hidden={update:function(b,L){f.c.visible.update(b,function(){return!f.a.f(L())})}},function(b){f.c[b]={init:function(L,E,I,w,N){return f.c.event.init.call(this,L,function(){var B={};return B[b]=E(),B},I,w,N)}}}("click"),f.ca=function(){},f.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},f.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},f.ca.prototype.makeTemplateSource=function(b,L){if(typeof b=="string"){L=L||n;var E=L.getElementById(b);if(!E)throw Error("Cannot find template with ID "+b);return new f.C.F(E)}if(b.nodeType==1||b.nodeType==8)return new f.C.ia(b);throw Error("Unknown template type: "+b)},f.ca.prototype.renderTemplate=function(b,L,E,I){return b=this.makeTemplateSource(b,I),this.renderTemplateSource(b,L,E,I)},f.ca.prototype.isTemplateRewritten=function(b,L){return this.allowTemplateRewriting===!1?!0:this.makeTemplateSource(b,L).data("isRewritten")},f.ca.prototype.rewriteTemplate=function(b,L,E){b=this.makeTemplateSource(b,E),L=L(b.text()),b.text(L),b.data("isRewritten",!0)},f.b("templateEngine",f.ca),f.kc=function(){function b(I,w,N,B){I=f.m.ac(I);for(var k=f.m.Ra,O=0;O<I.length;O++){var U=I[O].key;if(Object.prototype.hasOwnProperty.call(k,U)){var J=k[U];if(typeof J=="function"){if(U=J(I[O].value))throw Error(U)}else if(!J)throw Error("This template engine does not support the '"+U+"' binding within its templates")}}return N="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+f.m.vb(I,{valueAccessors:!0})+" } })()},'"+N.toLowerCase()+"')",B.createJavaScriptEvaluatorBlock(N)+w}var L=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,E=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(I,w,N){w.isTemplateRewritten(I,N)||w.rewriteTemplate(I,function(B){return f.kc.Ld(B,w)},N)},Ld:function(I,w){return I.replace(L,function(N,B,k,O,U){return b(U,B,k,w)}).replace(E,function(N,B){return b(B,"<!-- ko -->","#comment",w)})},md:function(I,w){return f.aa.Xb(function(N,B){var k=N.nextSibling;k&&k.nodeName.toLowerCase()===w&&f.ib(k,I,B)})}}}(),f.b("__tr_ambtns",f.kc.md),function(){f.C={},f.C.F=function(E){if(this.F=E){var I=f.a.R(E);this.ab=I==="script"?1:I==="textarea"?2:I=="template"&&E.content&&E.content.nodeType===11?3:4}},f.C.F.prototype.text=function(){var E=this.ab===1?"text":this.ab===2?"value":"innerHTML";if(arguments.length==0)return this.F[E];var I=arguments[0];E==="innerHTML"?f.a.fc(this.F,I):this.F[E]=I};var b=f.a.g.Z()+"_";f.C.F.prototype.data=function(E){if(arguments.length===1)return f.a.g.get(this.F,b+E);f.a.g.set(this.F,b+E,arguments[1])};var L=f.a.g.Z();f.C.F.prototype.nodes=function(){var E=this.F;if(arguments.length==0){var I=f.a.g.get(E,L)||{},w=I.lb||(this.ab===3?E.content:this.ab===4?E:e);if(!w||I.jd){var N=this.text();N&&N!==I.bb&&(w=f.a.Md(N,E.ownerDocument),f.a.g.set(E,L,{lb:w,bb:N,jd:!0}))}return w}I=arguments[0],this.ab!==e&&this.text(""),f.a.g.set(E,L,{lb:I})},f.C.ia=function(E){this.F=E},f.C.ia.prototype=new f.C.F,f.C.ia.prototype.constructor=f.C.ia,f.C.ia.prototype.text=function(){if(arguments.length==0){var E=f.a.g.get(this.F,L)||{};return E.bb===e&&E.lb&&(E.bb=E.lb.innerHTML),E.bb}f.a.g.set(this.F,L,{bb:arguments[0]})},f.b("templateSources",f.C),f.b("templateSources.domElement",f.C.F),f.b("templateSources.anonymousTemplate",f.C.ia)}(),function(){function b(O,U,J){var z;for(U=f.h.nextSibling(U);O&&(z=O)!==U;)O=f.h.nextSibling(z),J(z,O)}function L(O,U){if(O.length){var J=O[0],z=O[O.length-1],ee=J.parentNode,K=f.ga.instance,j=K.preprocessNode;if(j){if(b(J,z,function(q,be){var Se=q.previousSibling,ae=j.call(K,q);ae&&(q===J&&(J=ae[0]||be),q===z&&(z=ae[ae.length-1]||Se))}),O.length=0,!J)return;J===z?O.push(J):(O.push(J,z),f.a.Ua(O,ee))}b(J,z,function(q){q.nodeType!==1&&q.nodeType!==8||f.vc(U,q)}),b(J,z,function(q){q.nodeType!==1&&q.nodeType!==8||f.aa.cd(q,[U])}),f.a.Ua(O,ee)}}function E(O){return O.nodeType?O:0<O.length?O[0]:null}function I(O,U,J,z,ee){ee=ee||{};var K=(O&&E(O)||J||{}).ownerDocument,j=ee.templateEngine||N;if(f.kc.xd(J,j,K),J=j.renderTemplate(J,z,ee,K),typeof J.length!="number"||0<J.length&&typeof J[0].nodeType!="number")throw Error("Template engine must return an array of DOM nodes");switch(K=!1,U){case"replaceChildren":f.h.va(O,J),K=!0;break;case"replaceNode":f.a.Xc(O,J),K=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+U)}return K&&(L(J,z),ee.afterRender&&f.u.G(ee.afterRender,null,[J,z[ee.as||"$data"]]),U=="replaceChildren"&&f.i.ma(O,f.i.H)),J}function w(O,U,J){return f.O(O)?O():typeof O=="function"?O(U,J):O}var N;f.gc=function(O){if(O!=e&&!(O instanceof f.ca))throw Error("templateEngine must inherit from ko.templateEngine");N=O},f.dc=function(O,U,J,z,ee){if(J=J||{},(J.templateEngine||N)==e)throw Error("Set a template engine before calling renderTemplate");if(ee=ee||"replaceChildren",z){var K=E(z);return f.$(function(){var q=U&&U instanceof f.fa?U:new f.fa(U,null,null,null,{exportDependencies:!0}),j=w(O,q.$data,q),q=I(z,ee,j,q,J);ee=="replaceNode"&&(z=q,K=E(z))},null,{Sa:function(){return!K||!f.a.Sb(K)},l:K&&ee=="replaceNode"?K.parentNode:K})}return f.aa.Xb(function(j){f.dc(O,U,J,j,"replaceNode")})},f.Qd=function(O,U,J,z,ee){function K(Te,Ze){f.u.G(f.a.ec,null,[z,Te,q,J,j,Ze]),f.i.ma(z,f.i.H)}function j(Te,Ze){L(Ze,be),J.afterRender&&J.afterRender(Ze,Te),be=null}function q(Te,Ze){be=ee.createChildContext(Te,{as:Se,noChildContext:J.noChildContext,extend:function(Pe){Pe.$index=Ze,Se&&(Pe[Se+"Index"]=Ze)}});var We=w(O,Te,be);return I(z,"ignoreTargetNode",We,be,J)}var be,Se=J.as,ae=J.includeDestroyed===!1||f.options.foreachHidesDestroyed&&!J.includeDestroyed;if(ae||J.beforeRemove||!f.Pc(U))return f.$(function(){var Te=f.a.f(U)||[];typeof Te.length>"u"&&(Te=[Te]),ae&&(Te=f.a.jb(Te,function(Ze){return Ze===e||Ze===null||!f.a.f(Ze._destroy)})),K(Te)},null,{l:z});K(U.v());var ye=U.subscribe(function(Te){K(U(),Te)},null,"arrayChange");return ye.l(z),ye};var B=f.a.g.Z(),k=f.a.g.Z();f.c.template={init:function(O,U){var J=f.a.f(U());if(typeof J=="string"||"name"in J)f.h.Ea(O);else if("nodes"in J){if(J=J.nodes||[],f.O(J))throw Error('The "nodes" option must be a plain, non-observable array.');var z=J[0]&&J[0].parentNode;z&&f.a.g.get(z,k)||(z=f.a.Yb(J),f.a.g.set(z,k,!0)),new f.C.ia(O).nodes(z)}else if(J=f.h.childNodes(O),0<J.length)z=f.a.Yb(J),new f.C.ia(O).nodes(z);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:function(O,U,J,z,ee){var K=U();U=f.a.f(K),J=!0,z=null,typeof U=="string"?U={}:(K="name"in U?U.name:O,"if"in U&&(J=f.a.f(U.if)),J&&"ifnot"in U&&(J=!f.a.f(U.ifnot)),J&&!K&&(J=!1)),"foreach"in U?z=f.Qd(K,J&&U.foreach||[],U,O,ee):J?(J=ee,"data"in U&&(J=ee.createChildContext(U.data,{as:U.as,noChildContext:U.noChildContext,exportDependencies:!0})),z=f.dc(K,J,U,O)):f.h.Ea(O),ee=z,(U=f.a.g.get(O,B))&&typeof U.s=="function"&&U.s(),f.a.g.set(O,B,!ee||ee.ja&&!ee.ja()?e:ee)}},f.m.Ra.template=function(O){return O=f.m.ac(O),O.length==1&&O[0].unknown||f.m.Id(O,"name")?null:"This template engine does not support anonymous templates nested within its templates"},f.h.ea.template=!0}(),f.b("setTemplateEngine",f.gc),f.b("renderTemplate",f.dc),f.a.Kc=function(b,L,E){if(b.length&&L.length){var I,w,N,B,k;for(I=w=0;(!E||I<E)&&(B=b[w]);++w){for(N=0;k=L[N];++N)if(B.value===k.value){B.moved=k.index,k.moved=B.index,L.splice(N,1),I=N=0;break}I+=N}}},f.a.Pb=function(){function b(L,E,I,w,N){var B=Math.min,k=Math.max,O=[],U,J=L.length,z,ee=E.length,K=ee-J||1,j=J+ee+1,q,be,Se;for(U=0;U<=J;U++)for(be=q,O.push(q=[]),Se=B(ee,U+K),z=k(0,U-1);z<=Se;z++)q[z]=z?U?L[U-1]===E[z-1]?be[z-1]:B(be[z]||j,q[z-1]||j)+1:z+1:U+1;for(B=[],k=[],K=[],U=J,z=ee;U||z;)ee=O[U][z]-1,z&&ee===O[U][z-1]?k.push(B[B.length]={status:I,value:E[--z],index:z}):U&&ee===O[U-1][z]?K.push(B[B.length]={status:w,value:L[--U],index:U}):(--z,--U,N.sparse||B.push({status:"retained",value:E[z]}));return f.a.Kc(K,k,!N.dontLimitMoves&&10*J),B.reverse()}return function(L,E,I){return I=typeof I=="boolean"?{dontLimitMoves:I}:I||{},L=L||[],E=E||[],L.length<E.length?b(L,E,"added","deleted",I):b(E,L,"deleted","added",I)}}(),f.b("utils.compareArrays",f.a.Pb),function(){function b(I,w,N,B,k){var O=[],U=f.$(function(){var J=w(N,k,f.a.Ua(O,I))||[];0<O.length&&(f.a.Xc(O,J),B&&f.u.G(B,null,[N,J,k])),O.length=0,f.a.Nb(O,J)},null,{l:I,Sa:function(){return!f.a.kd(O)}});return{Y:O,$:U.ja()?U:e}}var L=f.a.g.Z(),E=f.a.g.Z();f.a.ec=function(I,w,N,B,k,O){function U(je){We={Aa:je,pb:f.ta(be++)},j.push(We),K||Ze.push(We)}function J(je){We=ee[je],be!==We.pb.v()&&Te.push(We),We.pb(be++),f.a.Ua(We.Y,I),j.push(We)}function z(je,Ut){if(je)for(var pe=0,Ve=Ut.length;pe<Ve;pe++)f.a.D(Ut[pe].Y,function(Dt){je(Dt,pe,Ut[pe].Aa)})}w=w||[],typeof w.length>"u"&&(w=[w]),B=B||{};var ee=f.a.g.get(I,L),K=!ee,j=[],q=0,be=0,Se=[],ae=[],ye=[],Te=[],Ze=[],We,Pe=0;if(K)f.a.D(w,U);else{if(!O||ee&&ee._countWaitingForRemove){var Ue=f.a.Mb(ee,function(je){return je.Aa});O=f.a.Pb(Ue,w,{dontLimitMoves:B.dontLimitMoves,sparse:!0})}for(var Ue=0,Pt,Ot,ht;Pt=O[Ue];Ue++)switch(Ot=Pt.moved,ht=Pt.index,Pt.status){case"deleted":for(;q<ht;)J(q++);Ot===e&&(We=ee[q],We.$&&(We.$.s(),We.$=e),f.a.Ua(We.Y,I).length&&(B.beforeRemove&&(j.push(We),Pe++,We.Aa===E?We=null:ye.push(We)),We&&Se.push.apply(Se,We.Y))),q++;break;case"added":for(;be<ht;)J(q++);Ot!==e?(ae.push(j.length),J(Ot)):U(Pt.value)}for(;be<w.length;)J(q++);j._countWaitingForRemove=Pe}f.a.g.set(I,L,j),z(B.beforeMove,Te),f.a.D(Se,B.beforeRemove?f.oa:f.removeNode);var Ae,$e,Qe;try{Qe=I.ownerDocument.activeElement}catch{}if(ae.length)for(;(Ue=ae.shift())!=e;){for(We=j[Ue],Ae=e;Ue;)if(($e=j[--Ue].Y)&&$e.length){Ae=$e[$e.length-1];break}for(w=0;q=We.Y[w];Ae=q,w++)f.h.Wb(I,q,Ae)}for(Ue=0;We=j[Ue];Ue++){for(We.Y||f.a.extend(We,b(I,N,We.Aa,k,We.pb)),w=0;q=We.Y[w];Ae=q,w++)f.h.Wb(I,q,Ae);!We.Ed&&k&&(k(We.Aa,We.Y,We.pb),We.Ed=!0,Ae=We.Y[We.Y.length-1])}for(Qe&&I.ownerDocument.activeElement!=Qe&&Qe.focus(),z(B.beforeRemove,ye),Ue=0;Ue<ye.length;++Ue)ye[Ue].Aa=E;z(B.afterMove,Te),z(B.afterAdd,Ze)}}(),f.b("utils.setDomNodeChildrenFromArrayMapping",f.a.ec),f.ba=function(){this.allowTemplateRewriting=!1},f.ba.prototype=new f.ca,f.ba.prototype.constructor=f.ba,f.ba.prototype.renderTemplateSource=function(b,L,E,I){return(L=!(9>f.a.W)&&b.nodes?b.nodes():null)?f.a.la(L.cloneNode(!0).childNodes):(b=b.text(),f.a.ua(b,I))},f.ba.Ma=new f.ba,f.gc(f.ba.Ma),f.b("nativeTemplateEngine",f.ba),function(){f.$a=function(){var L=this.Hd=function(){if(!o||!o.tmpl)return 0;try{if(0<=o.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1}();this.renderTemplateSource=function(E,I,w,N){if(N=N||n,w=w||{},2>L)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var B=E.data("precompiled");return B||(B=E.text()||"",B=o.template(null,"{{ko_with $item.koBindingContext}}"+B+"{{/ko_with}}"),E.data("precompiled",B)),E=[I.$data],I=o.extend({koBindingContext:I},w.templateOptions),I=o.tmpl(B,E,I),I.appendTo(N.createElement("div")),o.fragments={},I},this.createJavaScriptEvaluatorBlock=function(E){return"{{ko_code ((function() { return "+E+" })()) }}"},this.addTemplate=function(E,I){n.write("<script type='text/html' id='"+E+"'>"+I+"<\/script>")},0<L&&(o.tmpl.tag.ko_code={open:"__.push($1 || '');"},o.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},f.$a.prototype=new f.ca,f.$a.prototype.constructor=f.$a;var b=new f.$a;0<b.Hd&&f.gc(b),f.b("jqueryTmplTemplateEngine",f.$a)}()})})()})()})();var D_t=ko;typeof window<"u"?(ko=window.ko,typeof yA<"u"?window.ko=yA:delete window.ko):(ko=global.ko,typeof yA<"u"?global.ko=yA:delete global.ko);var hT=D_t;var Txo=S(T(),1);/** * @license * Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5 * Copyright (c) Steve Sanderson * MIT license - */var $7="__knockoutObservables",e6="__knockoutSubscribable";function qTe(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=$Te(e,!0);return t=t||Object.getOwnPropertyNames(e),t.forEach(function(o){if(!(o===$7||o===e6)&&!(o in i)){var r=e[o],s=r instanceof Array,a=n.isObservable(r)?r:s?n.observableArray(r):n.observable(r);Object.defineProperty(e,o,{configurable:!0,enumerable:!0,get:a,set:n.isWriteableObservable(a)?a:void 0}),i[o]=a,s&&Q_t(n,a)}}),e}function $Te(e,t){var n=e[$7];return!n&&t&&(n={},Object.defineProperty(e,$7,{value:n})),n}function J_t(e,t,n){var i=this,o={owner:e,deferEvaluation:!0};if(typeof n=="function")o.read=n;else{if("value"in n)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if(typeof n.get!="function")throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');o.read=n.get,o.write=n.set}return e[t]=i.computed(o),qTe.call(i,e,[t]),e}function Q_t(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=j_t(e,t,i))})}function j_t(e,t,n){var i=q_t(e,n);return i.subscribe(t)}function q_t(e,t){var n=t[e6];if(!n){n=new e.subscribable,Object.defineProperty(t,e6,{value:n});var i={};$_t(t,n,i),eTt(e,t,n,i)}return n}function $_t(e,t,n){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(i){var o=e[i];e[i]=function(){var r=o.apply(this,arguments);return n.pause!==!0&&t.notifySubscribers(this),r}})}function eTt(e,t,n,i){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(o){Object.defineProperty(t,o,{enumerable:!1,value:function(){var r;i.pause=!0;try{r=e.observableArray.fn[o].apply(e.observableArray(t),arguments)}finally{i.pause=!1}return n.notifySubscribers(t),r}})})}function eSe(e,t){if(!e)return null;var n=$Te(e,!1);return n&&n[t]||null}function tTt(e,t){var n=eSe(e,t);n&&n.valueHasMutated()}function nTt(e){e.track=qTe,e.getObservable=eSe,e.valueHasMutated=tTt,e.defineProperty=J_t}var yA={attachToKo:nTt};var Sxo=T(S(),1),tSe="http://www.w3.org/2000/svg",nSe="cesium-svgPath-svg",iTt={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){let i=document.createElementNS(tSe,"svg:svg");i.setAttribute("class",nSe);let o=document.createElementNS(tSe,"path");return i.appendChild(o),e.virtualElements.setDomNodeChildren(t,[i]),e.computed({read:function(){let r=e.unwrap(n());o.setAttribute("d",e.unwrap(r.path));let s=e.unwrap(r.width),a=e.unwrap(r.height);i.setAttribute("width",s),i.setAttribute("height",a),i.setAttribute("viewBox",`0 0 ${s} ${a}`),r.css&&i.setAttribute("class",`${nSe} ${e.unwrap(r.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}},xA=iTt;yA.attachToKo(fS);xA.register(fS);var Ce=fS;function _A(e){l(e)||(e=new qm),this._clock=e,this._eventHelper=new Er,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=Ce.observable(te.now()),this.systemTime.equalityComparer=te.equals,this.startTime=Ce.observable(e.startTime),this.startTime.equalityComparer=te.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=Ce.observable(e.stopTime),this.stopTime.equalityComparer=te.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=Ce.observable(e.currentTime),this.currentTime.equalityComparer=te.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=Ce.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=Ce.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=Ce.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=Ce.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=Ce.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),Ce.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(_A.prototype,{clock:{get:function(){return this._clock}}});_A.prototype.synchronize=function(){let e=this._clock;this.systemTime=te.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate};_A.prototype.isDestroyed=function(){return!1};_A.prototype.destroy=function(){this._eventHelper.removeAll(),me(this)};var TA=_A;var vxo=T(S(),1);function oTt(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,fe.throwInstantiationError()}var t6=oTt;var Mxo=T(S(),1);var SA={};SA.createCheckbox=function(e,t,n){let i=document.createElement("div"),o=document.createElement("label"),r=document.createElement("input");r.type="checkbox";let s=`checked: ${t}`;return l(n)&&(s+=`, enable: ${n}`),r.setAttribute("data-bind",s),o.appendChild(r),o.appendChild(document.createTextNode(e)),i.appendChild(o),i};SA.createSection=function(e,t,n,i){let o=document.createElement("div");o.className="cesium-cesiumInspector-section",o.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${n} }`),e.appendChild(o);let r=document.createElement("h3");r.className="cesium-cesiumInspector-sectionHeader",r.appendChild(document.createTextNode(t)),r.setAttribute("data-bind",`click: ${i}`),o.appendChild(r);let s=document.createElement("div");return s.className="cesium-cesiumInspector-sectionContent",o.appendChild(s),s};SA.createRangeInput=function(e,t,n,i,o,r){r=y(r,t);let s=document.createElement("input");s.setAttribute("data-bind",`value: ${r}`),s.type="number";let a=document.createElement("input");a.type="range",a.min=n,a.max=i,a.step=y(o,"any"),a.setAttribute("data-bind",`valueUpdate: "input", value: ${t}`);let c=document.createElement("div");c.appendChild(a);let d=document.createElement("div");return d.className="cesium-cesiumInspector-slider",d.appendChild(document.createTextNode(e)),d.appendChild(s),d.appendChild(c),d};SA.createButton=function(e,t,n){let i=document.createElement("button");i.type="button",i.textContent=e,i.className="cesium-cesiumInspector-pickButton";let o=`click: ${t}`;return l(n)&&(o+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${n}}`),i.setAttribute("data-bind",o),i};var Ma=SA;var Yxo=T(S(),1);function iSe(e,t){this._command=e,t=y(t,y.EMPTY_OBJECT),this.toggled=y(t.toggled,!1),this.tooltip=y(t.tooltip,""),Ce.track(this,["toggled","tooltip"])}Object.defineProperties(iSe.prototype,{command:{get:function(){return this._command}}});var vy=iSe;var Qxo=T(S(),1);function rTt(e,t){t=y(t,!0);let n=new ge,i=new ge;function o(){let r={args:arguments,cancel:!1},s;return n.raiseEvent(r),r.cancel||(s=e.apply(null,arguments),i.raiseEvent(s)),s}return o.canExecute=t,Ce.track(o,["canExecute"]),Object.defineProperties(o,{beforeExecute:{value:n},afterExecute:{value:i}}),o}var Vn=rTt;var $xo=T(S(),1);function sTt(e,t,n,i,o){return n.call(i,e[t]),Ce.getObservable(e,t).subscribe(n,i,o)}var ba=sTt;var o_o=T(S(),1);var pS="http://www.w3.org/2000/svg",sSe="http://www.w3.org/1999/xlink",D3,CA=Y.fromCssColorString("rgba(247,250,255,0.384)"),B3=Y.fromCssColorString("rgba(143,191,255,0.216)"),n6=Y.fromCssColorString("rgba(153,197,255,0.098)"),Y3=Y.fromCssColorString("rgba(255,255,255,0.086)"),aTt=Y.fromCssColorString("rgba(255,255,255,0.267)"),cTt=Y.fromCssColorString("rgba(255,255,255,0)"),oSe=Y.fromCssColorString("rgba(66,67,68,0.3)"),rSe=Y.fromCssColorString("rgba(0,0,0,0.5)");function wy(e){return Y.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}var VA={animation_pathReset:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},animation_pathPause:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},animation_pathPlay:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathPlayReverse:{tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathLoop:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},animation_pathClock:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},animation_pathWingButton:{tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},animation_pathPointer:{tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},animation_pathSwooshFX:{tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}};function Ph(e){let t=document.createElementNS(pS,e.tagName);for(let n in e)if(e.hasOwnProperty(n)&&n!=="tagName")if(n==="children"){let i=e.children.length;for(let o=0;o<i;++o)t.appendChild(Ph(e.children[o]))}else n.indexOf("xlink:")===0?t.setAttributeNS(sSe,n.substring(6),e[n]):n==="textContent"?t.textContent=e[n]:t.setAttribute(n,e[n]);return t}function i6(e,t,n){let i=document.createElementNS(pS,"text");i.setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("class","cesium-animation-svgText");let o=document.createElementNS(pS,"tspan");return o.textContent=n,i.appendChild(o),i}function lTt(e,t,n){e.setAttribute("transform",`translate(100,100) rotate(${n})`),t.setAttribute("transform",`rotate(${n})`)}var O3=new Y;function jr(e,t){let n=t.alpha,i=1-n;return O3.red=e.red*i+t.red*n,O3.green=e.green*i+t.green*n,O3.blue=e.blue*i+t.blue*n,O3.toCssColorString()}function o6(e,t,n){let i=VA[n],o={tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{tagName:"rect",class:"cesium-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"cesium-animation-buttonMain",width:32,height:32,rx:4,ry:4},{class:"cesium-animation-buttonPath",id:n,tagName:i.tagName,transform:i.transform,d:i.d},{tagName:"title",textContent:""}]};return Ph(o)}function dTt(e,t,n){let i=VA[n],o=VA.animation_pathWingButton,r={tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{class:"cesium-animation-buttonGlow",id:"animation_pathWingButton",tagName:o.tagName,d:o.d},{class:"cesium-animation-buttonMain",id:"animation_pathWingButton",tagName:o.tagName,d:o.d},{class:"cesium-animation-buttonPath",id:n,tagName:i.tagName,transform:i.transform,d:i.d},{tagName:"title",textContent:""}]};return Ph(r)}function uTt(e,t){let n=e._viewModel,i=n.shuttleRingDragging;if(!(i&&D3!==e))if(t.type==="mousedown"||i&&t.type==="mousemove"||t.type==="touchstart"&&t.touches.length===1||i&&t.type==="touchmove"&&t.touches.length===1){let o=e._centerX,r=e._centerY,a=e._svgNode.getBoundingClientRect(),c,d;if(t.type==="touchstart"||t.type==="touchmove"?(c=t.touches[0].clientX,d=t.touches[0].clientY):(c=t.clientX,d=t.clientY),!i&&(c>a.right||c<a.left||d<a.top||d>a.bottom))return;let u=e._shuttleRingPointer.getBoundingClientRect(),m=c-o-a.left,p=d-r-a.top,g=Math.atan2(p,m)*180/Math.PI+90;g>180&&(g-=360);let f=n.shuttleRingAngle;i||c<u.right&&c>u.left&&d>u.top&&d<u.bottom?(D3=e,n.shuttleRingDragging=!0,n.shuttleRingAngle=g):g<f?n.slower():g>f&&n.faster(),t.preventDefault()}else e===D3&&(D3=void 0),n.shuttleRingDragging=!1}function hb(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;let n=this;this._clickFunction=function(){let i=n._viewModel.command;i.canExecute&&i()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[ba(t,"toggled",this.setToggled,this),ba(t,"tooltip",this.setTooltip,this),ba(t.command,"canExecute",this.setEnabled,this)]}hb.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);let e=this._subscriptions;for(let t=0,n=e.length;t<n;t++)e[t].dispose();me(this)};hb.prototype.isDestroyed=function(){return!1};hb.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e){this.svgElement.setAttribute("class","cesium-animation-buttonDisabled");return}if(this._toggled){this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled");return}this.svgElement.setAttribute("class","cesium-animation-rectButton")}};hb.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled"):this.svgElement.setAttribute("class","cesium-animation-rectButton")))};hb.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e};function VL(e,t){e=In(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;let n=e.ownerDocument,i=document.createElement("style");i.textContent=".cesium-animation-rectButton .cesium-animation-buttonGlow { filter: url(#animation_blurred); }.cesium-animation-rectButton .cesium-animation-buttonMain { fill: url(#animation_buttonNormal); }.cesium-animation-buttonToggled .cesium-animation-buttonMain { fill: url(#animation_buttonToggled); }.cesium-animation-rectButton:hover .cesium-animation-buttonMain { fill: url(#animation_buttonHovered); }.cesium-animation-buttonDisabled .cesium-animation-buttonMain { fill: url(#animation_buttonDisabled); }.cesium-animation-shuttleRingG .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.cesium-animation-shuttleRingG:hover .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.cesium-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.cesium-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.cesium-animation-knobOuter { fill: url(#animation_knobOuter); }.cesium-animation-knobInner { fill: url(#animation_knobInner); }",n.head.insertBefore(i,n.head.childNodes[0]);let o=document.createElement("div");o.className="cesium-animation-theme",o.innerHTML='<div class="cesium-animation-themeNormal"></div><div class="cesium-animation-themeHover"></div><div class="cesium-animation-themeSelect"></div><div class="cesium-animation-themeDisabled"></div><div class="cesium-animation-themeKnob"></div><div class="cesium-animation-themePointer"></div><div class="cesium-animation-themeSwoosh"></div><div class="cesium-animation-themeSwooshHover"></div>',this._theme=o,this._themeNormal=o.childNodes[0],this._themeHover=o.childNodes[1],this._themeSelect=o.childNodes[2],this._themeDisabled=o.childNodes[3],this._themeKnob=o.childNodes[4],this._themePointer=o.childNodes[5],this._themeSwoosh=o.childNodes[6],this._themeSwooshHover=o.childNodes[7];let r=document.createElementNS(pS,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",sSe);let s=document.createElementNS(pS,"g");this._topG=s,this._realtimeSVG=new hb(dTt(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new hb(o6(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new hb(o6(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new hb(o6(84,99,"animation_pathPause"),t.pauseViewModel);let a=document.createElementNS(pS,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);let c=Ph({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=c;let d=VA.animation_pathSwooshFX,u=VA.animation_pathPointer,m=Ph({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:d.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:d.d},{tagName:d.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:d.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=m,this._shuttleRingPointer=Ph({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:u.tagName,d:u.d});let p=Ph({tagName:"g",transform:"translate(100,100)"});this._knobOuter=Ph({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});let g=61,f=Ph({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:g});this._knobDate=i6(0,-24,""),this._knobTime=i6(0,-7,""),this._knobStatus=i6(0,-41,"");let x=Ph({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:g}),_=document.createElementNS(pS,"g");_.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(o),s.appendChild(_),s.appendChild(p),s.appendChild(a),_.appendChild(c),_.appendChild(m),_.appendChild(this._shuttleRingPointer),p.appendChild(this._knobOuter),p.appendChild(f),p.appendChild(this._knobDate),p.appendChild(this._knobTime),p.appendChild(this._knobStatus),p.appendChild(x),r.appendChild(s),e.appendChild(r);let C=this;function V(v){uTt(C,v)}this._mouseCallback=V,c.addEventListener("mousedown",V,!0),c.addEventListener("touchstart",V,!0),m.addEventListener("mousedown",V,!0),m.addEventListener("touchstart",V,!0),n.addEventListener("mousemove",V,!0),n.addEventListener("touchmove",V,!0),n.addEventListener("mouseup",V,!0),n.addEventListener("touchend",V,!0),n.addEventListener("touchcancel",V,!0),this._shuttleRingPointer.addEventListener("mousedown",V,!0),this._shuttleRingPointer.addEventListener("touchstart",V,!0),this._knobOuter.addEventListener("mousedown",V,!0),this._knobOuter.addEventListener("touchstart",V,!0);let L=this._knobTime.childNodes[0],Z=this._knobDate.childNodes[0],G=this._knobStatus.childNodes[0],X;this._subscriptions=[ba(t.pauseViewModel,"toggled",function(v){X!==v&&(X=v,X?C._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):C._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))}),ba(t,"shuttleRingAngle",function(v){lTt(C._shuttleRingPointer,C._knobOuter,v)}),ba(t,"dateLabel",function(v){Z.textContent!==v&&(Z.textContent=v)}),ba(t,"timeLabel",function(v){L.textContent!==v&&(L.textContent=v)}),ba(t,"multiplierLabel",function(v){G.textContent!==v&&(G.textContent=v)})],this.applyThemeChanges(),this.resize()}Object.defineProperties(VL.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});VL.prototype.isDestroyed=function(){return!1};VL.prototype.destroy=function(){l(this._observer)&&(this._observer.disconnect(),this._observer=void 0);let e=this._container.ownerDocument,t=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",t,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",t,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",t,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",t,!0),e.removeEventListener("mousemove",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("mouseup",t,!0),e.removeEventListener("touchend",t,!0),e.removeEventListener("touchcancel",t,!0),this._shuttleRingPointer.removeEventListener("mousedown",t,!0),this._shuttleRingPointer.removeEventListener("touchstart",t,!0),this._knobOuter.removeEventListener("mousedown",t,!0),this._knobOuter.removeEventListener("touchstart",t,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();let n=this._subscriptions;for(let i=0,o=n.length;i<o;i++)n[i].dispose();return me(this)};VL.prototype.resize=function(){let e=this._container.clientWidth,t=this._container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;let n=this._svgNode,i=200,o=132,r=e,s=t;e===0&&t===0?(r=i,s=o):e===0?(s=t,r=i*(t/o)):t===0&&(r=e,s=o*(e/i));let a=r/i,c=s/o;n.style.cssText=`width: ${r}px; height: ${s}px; position: absolute; bottom: 0; left: 0; overflow: hidden;`,n.setAttribute("width",r),n.setAttribute("height",s),n.setAttribute("viewBox",`0 0 ${r} ${s}`),this._topG.setAttribute("transform",`scale(${a},${c})`),this._centerX=Math.max(1,100*a),this._centerY=Math.max(1,100*c),this._lastHeight=e,this._lastWidth=t};VL.prototype.applyThemeChanges=function(){let e=this._container.ownerDocument;if(!e.body.contains(this._container)){if(l(this._observer))return;let u=this;u._observer=new MutationObserver(function(){e.body.contains(u._container)&&(u._observer.disconnect(),u._observer=void 0,u.applyThemeChanges())}),u._observer.observe(e,{childList:!0,subtree:!0});return}let t=wy(this._themeNormal),n=wy(this._themeHover),i=wy(this._themeSelect),o=wy(this._themeDisabled),r=wy(this._themeKnob),s=wy(this._themePointer),a=wy(this._themeSwoosh),c=wy(this._themeSwooshHover),d=Ph({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":jr(t,CA)},{tagName:"stop",offset:"12%","stop-color":jr(t,B3)},{tagName:"stop",offset:"46%","stop-color":jr(t,n6)},{tagName:"stop",offset:"81%","stop-color":jr(t,Y3)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":jr(n,CA)},{tagName:"stop",offset:"12%","stop-color":jr(n,B3)},{tagName:"stop",offset:"46%","stop-color":jr(n,n6)},{tagName:"stop",offset:"81%","stop-color":jr(n,Y3)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":jr(i,CA)},{tagName:"stop",offset:"12%","stop-color":jr(i,B3)},{tagName:"stop",offset:"46%","stop-color":jr(i,n6)},{tagName:"stop",offset:"81%","stop-color":jr(i,Y3)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":jr(o,aTt)},{tagName:"stop",offset:"75%","stop-color":jr(o,cTt)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":a.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":a.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":a.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":c.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":jr(s,rSe)},{tagName:"stop",offset:"100%","stop-color":jr(s,rSe)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":jr(r,CA)},{tagName:"stop",offset:"60%","stop-color":jr(r,oSe)},{tagName:"stop",offset:"85%","stop-color":jr(r,B3)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":jr(r,oSe)},{tagName:"stop",offset:"60%","stop-color":jr(r,CA)},{tagName:"stop",offset:"85%","stop-color":jr(r,Y3)}]}]});l(this._defsElement)?this._svgNode.replaceChild(d,this._defsElement):this._svgNode.appendChild(d),this._defsElement=d};var LA=VL;var m_o=T(S(),1);var mTt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Fy=15,LL=105;function aSe(e,t){return e-t}function r6(e,t){let n=Ro(t,e,aSe);return n<0?~n:n}function hTt(e,t){if(Math.abs(e)<=Fy)return e/Fy;let n=Fy,i=LL,o,r=0,s;return e>0?(o=Math.log(t[t.length-1]),s=(o-r)/(i-n),Math.exp(r+s*(e-n))):(o=Math.log(-t[0]),s=(o-r)/(i-n),-Math.exp(r+s*(Math.abs(e)-n)))}function fTt(e,t,n){if(n.clockStep===mo.SYSTEM_CLOCK)return Fy;if(Math.abs(e)<=1)return e*Fy;let i=t[t.length-1];e>i?e=i:e<-i&&(e=-i);let o=Fy,r=LL,s,a=0,c;return e>0?(s=Math.log(i),c=(s-a)/(r-o),(Math.log(e)-a)/c+o):(s=Math.log(-t[0]),c=(s-a)/(r-o),-((Math.log(Math.abs(e))-a)/c+o))}function am(e){let t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=am.defaultDateFormatter,this._timeFormatter=am.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,Ce.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(am.defaultTicks),this.timeLabel=void 0,Ce.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,Ce.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,Ce.defineProperty(this,"multiplierLabel",function(){let s=t._clockViewModel;if(s.clockStep===mo.SYSTEM_CLOCK)return"Today";let a=s.multiplier;return a%1===0?`${a.toFixed(0)}x`:`${a.toFixed(3).replace(/0{0,3}$/,"")}x`}),this.shuttleRingAngle=void 0,Ce.defineProperty(this,"shuttleRingAngle",{get:function(){return fTt(e.multiplier,t._allShuttleRingTicks,e)},set:function(s){s=Math.max(Math.min(s,LL),-LL);let a=t._allShuttleRingTicks,c=t._clockViewModel;if(c.clockStep=mo.SYSTEM_CLOCK_MULTIPLIER,Math.abs(s)===LL){c.multiplier=s>0?a[a.length-1]:a[0];return}let d=hTt(s,a);if(t.snapToTicks)d=a[r6(d,a)];else if(d!==0){let u=Math.abs(d);if(u>100){let m=u.toFixed(0).length-2,p=Math.pow(10,m);d=Math.round(d/p)*p|0}else u>Fy?d=Math.round(d):u>1?d=+d.toFixed(1):u>0&&(d=+d.toFixed(2))}c.multiplier=d}}),this._canAnimate=void 0,Ce.defineProperty(this,"_canAnimate",function(){let s=t._clockViewModel,a=s.clockRange;if(t.shuttleRingDragging||a===vr.UNBOUNDED)return!0;let c=s.multiplier,d=s.currentTime,u=s.startTime,m=!1;if(a===vr.LOOP_STOP)m=te.greaterThan(d,u)||d.equals(u)&&c>0;else{let p=s.stopTime;m=te.greaterThan(d,u)&&te.lessThan(d,p)||d.equals(u)&&c>0||d.equals(p)&&c<0}return m||(s.shouldAnimate=!1),m}),this._isSystemTimeAvailable=void 0,Ce.defineProperty(this,"_isSystemTimeAvailable",function(){let s=t._clockViewModel;if(s.clockRange===vr.UNBOUNDED)return!0;let c=s.systemTime;return te.greaterThanOrEquals(c,s.startTime)&&te.lessThanOrEquals(c,s.stopTime)}),this._isAnimating=void 0,Ce.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});let n=Vn(function(){let s=t._clockViewModel;s.shouldAnimate?s.shouldAnimate=!1:t._canAnimate&&(s.shouldAnimate=!0)});this._pauseViewModel=new vy(n,{toggled:Ce.computed(function(){return!t._isAnimating}),tooltip:"Pause"});let i=Vn(function(){let s=t._clockViewModel,a=s.multiplier;a>0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playReverseViewModel=new vy(i,{toggled:Ce.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});let o=Vn(function(){let s=t._clockViewModel,a=s.multiplier;a<0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playForwardViewModel=new vy(o,{toggled:Ce.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==mo.SYSTEM_CLOCK}),tooltip:"Play Forward"});let r=Vn(function(){t._clockViewModel.clockStep=mo.SYSTEM_CLOCK},Ce.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new vy(r,{toggled:Ce.computed(function(){return e.clockStep===mo.SYSTEM_CLOCK}),tooltip:Ce.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=Vn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,d=r6(c,a)-1;d>=0&&(s.multiplier=a[d])}),this._faster=Vn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,d=r6(c,a)+1;d<a.length&&(s.multiplier=a[d])})}am.defaultDateFormatter=function(e,t){let n=te.toGregorianDate(e);return`${mTt[n.month-1]} ${n.day} ${n.year}`};am.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800];am.defaultTimeFormatter=function(e,t){let n=te.toGregorianDate(e),i=Math.round(n.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")}.${i.toString().padStart(3,"0")}`:`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")} UTC`};am.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)};am.prototype.setShuttleRingTicks=function(e){let t,n,i,o={},r=this._sortedFilteredPositiveTicks;for(r.length=0,t=0,n=e.length;t<n;++t)i=e[t],o.hasOwnProperty(i)||(o[i]=!0,r.push(i));r.sort(aSe);let s=[];for(n=r.length,t=n-1;t>=0;--t)i=r[t],i!==0&&s.push(-i);Array.prototype.push.apply(s,r),this._allShuttleRingTicks=s};Object.defineProperties(am.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){this._timeFormatter=e}}});am._maxShuttleRingAngle=LL;am._realtimeShuttleRingAngle=Fy;var RA=am;var L_o=T(S(),1);var y_o=T(S(),1);function cSe(e){e=y(e,y.EMPTY_OBJECT);let t=e.globe,n=y(e.imageryProviderViewModels,[]),i=y(e.terrainProviderViewModels,[]);this._globe=t,this.imageryProviderViewModels=n.slice(0),this.terrainProviderViewModels=i.slice(0),this.dropDownVisible=!1,Ce.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);let o=Ce.getObservable(this,"imageryProviderViewModels"),r=Ce.pureComputed(function(){let m=o(),p={},g;for(g=0;g<m.length;g++){let _=m[g],C=_.category;l(p[C])?p[C].push(_):p[C]=[_]}let f=Object.keys(p),x=[];for(g=0;g<f.length;g++){let _=f[g];x.push({name:_,providers:p[_]})}return x});this._imageryProviders=r;let s=Ce.getObservable(this,"terrainProviderViewModels"),a=Ce.pureComputed(function(){let m=s(),p={},g;for(g=0;g<m.length;g++){let _=m[g],C=_.category;l(p[C])?p[C].push(_):p[C]=[_]}let f=Object.keys(p),x=[];for(g=0;g<f.length;g++){let _=f[g];x.push({name:_,providers:p[_]})}return x});this._terrainProviders=a,this.buttonTooltip=void 0,Ce.defineProperty(this,"buttonTooltip",function(){let m=this.selectedImagery,p=this.selectedTerrain,g=l(m)?m.name:void 0,f=l(p)?p.name:void 0;return l(g)&&l(f)?`${g} -${f}`:l(g)?g:f}),this.buttonImageUrl=void 0,Ce.defineProperty(this,"buttonImageUrl",function(){let m=this.selectedImagery;if(l(m))return m.iconUrl}),this.selectedImagery=void 0;let c=Ce.observable();this._currentImageryLayers=[],Ce.defineProperty(this,"selectedImagery",{get:function(){return c()},set:function(m){if(c()===m){this.dropDownVisible=!1;return}let p,g=this._currentImageryLayers,f=g.length,x=this._globe.imageryLayers,_=!1;for(p=0;p<f;p++){let C=x.length;for(let V=0;V<C;V++){let L=x.get(V);if(L===g[p]){x.remove(L),_=!0;break}}}if(l(m)){let C=m.creationCommand();if(Array.isArray(C)){let V=C.length;for(this._currentImageryLayers=[],p=V-1;p>=0;p--){let L=ma.fromProviderAsync(C[p]);x.add(L,0),this._currentImageryLayers.push(L)}}else{this._currentImageryLayers=[];let V=ma.fromProviderAsync(C);if(V.name=m.name,_)x.add(V,0);else{let L=x.get(0);l(L)&&x.remove(L),x.add(V,0)}this._currentImageryLayers.push(V)}}c(m),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;let d=Ce.observable();Ce.defineProperty(this,"selectedTerrain",{get:function(){return d()},set:function(m){if(d()===m){this.dropDownVisible=!1;return}let p;if(l(m)&&(p=m.creationCommand()),l(p)&&!l(p.then))this._globe.depthTestAgainstTerrain=!(p instanceof Af),this._globe.terrainProvider=p;else if(l(p)){let g=!1,f=this._globe.terrainProviderChanged.addEventListener(()=>{g=!0,f()}),_=new hA(p).readyEvent.addEventListener(C=>{g||(this._globe.depthTestAgainstTerrain=!(C instanceof Af),this._globe.terrainProvider=C,_())})}d(m),this.dropDownVisible=!1}});let u=this;this._toggleDropDown=Vn(function(){u.dropDownVisible=!u.dropDownVisible}),this.selectedImagery=y(e.selectedImageryProviderViewModel,n[0]),this.selectedTerrain=y(e.selectedTerrainProviderViewModel,i[0])}Object.defineProperties(cSe.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}});var ZA=cSe;function H3(e,t){e=In(e);let n=new ZA(t),i=document.createElement("button");i.type="button",i.className="cesium-button cesium-toolbar-button",i.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(i);let o=document.createElement("img");o.setAttribute("draggable","false"),o.className="cesium-baseLayerPicker-selected",o.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-baseLayerPicker-dropDown",r.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(r);let s=document.createElement("div");s.className="cesium-baseLayerPicker-sectionTitle",s.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),s.innerHTML="Imagery",r.appendChild(s);let a=document.createElement("div");a.className="cesium-baseLayerPicker-section",a.setAttribute("data-bind","foreach: _imageryProviders"),r.appendChild(a);let c=document.createElement("div");c.className="cesium-baseLayerPicker-category",a.appendChild(c);let d=document.createElement("div");d.className="cesium-baseLayerPicker-categoryTitle",d.setAttribute("data-bind","text: name"),c.appendChild(d);let u=document.createElement("div");u.className="cesium-baseLayerPicker-choices",u.setAttribute("data-bind","foreach: providers"),c.appendChild(u);let m=document.createElement("div");m.className="cesium-baseLayerPicker-item",m.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),u.appendChild(m);let p=document.createElement("img");p.className="cesium-baseLayerPicker-itemIcon",p.setAttribute("data-bind","attr: { src: iconUrl }"),p.setAttribute("draggable","false"),m.appendChild(p);let g=document.createElement("div");g.className="cesium-baseLayerPicker-itemLabel",g.setAttribute("data-bind","text: name"),m.appendChild(g);let f=document.createElement("div");f.className="cesium-baseLayerPicker-sectionTitle",f.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),f.innerHTML="Terrain",r.appendChild(f);let x=document.createElement("div");x.className="cesium-baseLayerPicker-section",x.setAttribute("data-bind","foreach: _terrainProviders"),r.appendChild(x);let _=document.createElement("div");_.className="cesium-baseLayerPicker-category",x.appendChild(_);let C=document.createElement("div");C.className="cesium-baseLayerPicker-categoryTitle",C.setAttribute("data-bind","text: name"),_.appendChild(C);let V=document.createElement("div");V.className="cesium-baseLayerPicker-choices",V.setAttribute("data-bind","foreach: providers"),_.appendChild(V);let L=document.createElement("div");L.className="cesium-baseLayerPicker-item",L.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),V.appendChild(L);let Z=document.createElement("img");Z.className="cesium-baseLayerPicker-itemIcon",Z.setAttribute("data-bind","attr: { src: iconUrl }"),Z.setAttribute("draggable","false"),L.appendChild(Z);let G=document.createElement("div");G.className="cesium-baseLayerPicker-itemLabel",G.setAttribute("data-bind","text: name"),L.appendChild(G),Ce.applyBindings(n,i),Ce.applyBindings(n,r),this._viewModel=n,this._container=e,this._element=i,this._dropPanel=r,this._closeDropDown=function(X){i.contains(X.target)||r.contains(X.target)||(n.dropDownVisible=!1)},Yt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(H3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});H3.prototype.isDestroyed=function(){return!1};H3.prototype.destroy=function(){return Yt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._element),Ce.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),me(this)};var GA=H3;var I_o=T(S(),1);function lSe(e){let t=e.creationFunction;l(t.canExecute)||(t=Vn(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=y(e.category,""),Ce.track(this,["name","tooltip","iconUrl"])}Object.defineProperties(lSe.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var qr=lSe;var w_o=T(S(),1);function pTt(){let e=[],t=devicePixelRatio>=2;return e.push(new qr({name:"Bing Maps Aerial",iconUrl:tn("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return q0({style:j0.AERIAL})}})),e.push(new qr({name:"Bing Maps Aerial with Labels",iconUrl:tn("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return q0({style:j0.AERIAL_WITH_LABELS})}})),e.push(new qr({name:"Bing Maps Roads",iconUrl:tn("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return q0({style:j0.ROAD})}})),e.push(new qr({name:"ArcGIS World Imagery",iconUrl:tn("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png"),tooltip:`ArcGIS World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes 15m TerraColor imagery at small and mid-scales (~1:591M down to ~1:288k) for the world. The map features Maxar imagery at 0.3m resolution for select metropolitan areas around the world, 0.5m resolution across the United States and parts of Western Europe, and 1m resolution imagery across the rest of the world. In addition to commercial sources, the World Imagery map features high-resolution aerial photography contributed by the GIS User Community. This imagery ranges from 0.3m to 0.03m resolution (down to ~1:280 nin select communities). For more information on this map, including the terms of use, visit us online at -https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9`,category:"Other",creationFunction:function(){return J0.fromBasemapType(Ch.SATELLITE,{enablePickFeatures:!1})}})),e.push(new qr({name:"ArcGIS World Hillshade",iconUrl:tn("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png"),tooltip:`ArcGIS World Hillshade map portrays elevation as an artistic hillshade. This map is designed to be used as a backdrop for topographical, soil, hydro, landcover or other outdoor recreational maps. The map was compiled from a variety of sources from several data providers. The basemap has global coverage down to a scale of ~1:72k. In select areas of the United States and Europe, coverage is available down to ~1:9k. For more information on this map, including the terms of use, visit us online at -https://www.arcgis.com/home/item.html?id=1b243539f4514b6ba35e7d995890db1d`,category:"Other",creationFunction:function(){return J0.fromBasemapType(Ch.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new qr({name:"Esri World Ocean",iconUrl:tn("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png"),tooltip:`ArcGIS World Ocean map is designed to be used as a base map by marine GIS professionals and as a reference map by anyone interested in ocean data. The base map features marine bathymetry. Land features include inland waters and roads overlaid on land cover and shaded relief imagery. The map was compiled from a variety of best available sources from several data providers, including General Bathymetric Chart of the Oceans GEBCO_08 Grid, National Oceanic and Atmospheric Administration (NOAA), and National Geographic, Garmin, HERE, Geonames.org, and Esri, and various other contributors. The base map currently provides coverage for the world down to a scale of ~1:577k, and coverage down to 1:72k in US coastal areas, and various other areas. Coverage down to ~ 1:9k is available limited areas based on regional hydrographic survey data. The base map was designed and developed by Esri. For more information on this map, including our terms of use, visit us online at -https://www.arcgis.com/home/item.html?id=1e126e7520f9466c9ca28b8f28b5e500`,category:"Other",creationFunction:function(){return J0.fromBasemapType(Ch.OCEANS,{enablePickFeatures:!1})}})),e.push(new qr({name:"Open\xADStreet\xADMap",iconUrl:tn("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:`OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world. -http://www.openstreetmap.org`,category:"Other",creationFunction:function(){return new mb({url:"https://tile.openstreetmap.org/"})}})),e.push(new qr({name:"Stadia x Stamen Watercolor",iconUrl:tn("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and reminiscent of hand drawn maps, the watercolor maps from Stamen Design apply raster effect area washes and organic edges over a paper texture to add warm pop to any map. -https://docs.stadiamaps.com/map-styles/stamen-watercolor/`,category:"Other",creationFunction:function(){return new mb({url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/",fileExtension:"jpg",credit:`© <a href="https://stamen.com/" target="_blank">Stamen Design</a> + */var q7="__knockoutObservables",$7="__knockoutSubscribable";function iTe(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=oTe(e,!0);return t=t||Object.getOwnPropertyNames(e),t.forEach(function(o){if(!(o===q7||o===$7)&&!(o in i)){var r=e[o],s=r instanceof Array,a=n.isObservable(r)?r:s?n.observableArray(r):n.observable(r);Object.defineProperty(e,o,{configurable:!0,enumerable:!0,get:a,set:n.isWriteableObservable(a)?a:void 0}),i[o]=a,s&&Y_t(n,a)}}),e}function oTe(e,t){var n=e[q7];return!n&&t&&(n={},Object.defineProperty(e,q7,{value:n})),n}function B_t(e,t,n){var i=this,o={owner:e,deferEvaluation:!0};if(typeof n=="function")o.read=n;else{if("value"in n)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if(typeof n.get!="function")throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');o.read=n.get,o.write=n.set}return e[t]=i.computed(o),iTe.call(i,e,[t]),e}function Y_t(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=O_t(e,t,i))})}function O_t(e,t,n){var i=z_t(e,n);return i.subscribe(t)}function z_t(e,t){var n=t[$7];if(!n){n=new e.subscribable,Object.defineProperty(t,$7,{value:n});var i={};K_t(t,n,i),H_t(e,t,n,i)}return n}function K_t(e,t,n){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(i){var o=e[i];e[i]=function(){var r=o.apply(this,arguments);return n.pause!==!0&&t.notifySubscribers(this),r}})}function H_t(e,t,n,i){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(o){Object.defineProperty(t,o,{enumerable:!1,value:function(){var r;i.pause=!0;try{r=e.observableArray.fn[o].apply(e.observableArray(t),arguments)}finally{i.pause=!1}return n.notifySubscribers(t),r}})})}function rTe(e,t){if(!e)return null;var n=oTe(e,!1);return n&&n[t]||null}function J_t(e,t){var n=rTe(e,t);n&&n.valueHasMutated()}function Q_t(e){e.track=iTe,e.getObservable=rTe,e.valueHasMutated=J_t,e.defineProperty=B_t}var xA={attachToKo:Q_t};var Vxo=S(T(),1),sTe="http://www.w3.org/2000/svg",aTe="cesium-svgPath-svg",j_t={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){let i=document.createElementNS(sTe,"svg:svg");i.setAttribute("class",aTe);let o=document.createElementNS(sTe,"path");return i.appendChild(o),e.virtualElements.setDomNodeChildren(t,[i]),e.computed({read:function(){let r=e.unwrap(n());o.setAttribute("d",e.unwrap(r.path));let s=e.unwrap(r.width),a=e.unwrap(r.height);i.setAttribute("width",s),i.setAttribute("height",a),i.setAttribute("viewBox",`0 0 ${s} ${a}`),r.css&&i.setAttribute("class",`${aTe} ${e.unwrap(r.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}},_A=j_t;xA.attachToKo(hT);_A.register(hT);var Ce=hT;function SA(e){l(e)||(e=new jm),this._clock=e,this._eventHelper=new Wr,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=Ce.observable(ne.now()),this.systemTime.equalityComparer=ne.equals,this.startTime=Ce.observable(e.startTime),this.startTime.equalityComparer=ne.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=Ce.observable(e.stopTime),this.stopTime.equalityComparer=ne.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=Ce.observable(e.currentTime),this.currentTime.equalityComparer=ne.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=Ce.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=Ce.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=Ce.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=Ce.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=Ce.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),Ce.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(SA.prototype,{clock:{get:function(){return this._clock}}});SA.prototype.synchronize=function(){let e=this._clock;this.systemTime=ne.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate};SA.prototype.isDestroyed=function(){return!1};SA.prototype.destroy=function(){this._eventHelper.removeAll(),me(this)};var TA=SA;var Fxo=S(T(),1);function q_t(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,fe.throwInstantiationError()}var e6=q_t;var Uxo=S(T(),1);var CA={};CA.createCheckbox=function(e,t,n){let i=document.createElement("div"),o=document.createElement("label"),r=document.createElement("input");r.type="checkbox";let s=`checked: ${t}`;return l(n)&&(s+=`, enable: ${n}`),r.setAttribute("data-bind",s),o.appendChild(r),o.appendChild(document.createTextNode(e)),i.appendChild(o),i};CA.createSection=function(e,t,n,i){let o=document.createElement("div");o.className="cesium-cesiumInspector-section",o.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${n} }`),e.appendChild(o);let r=document.createElement("h3");r.className="cesium-cesiumInspector-sectionHeader",r.appendChild(document.createTextNode(t)),r.setAttribute("data-bind",`click: ${i}`),o.appendChild(r);let s=document.createElement("div");return s.className="cesium-cesiumInspector-sectionContent",o.appendChild(s),s};CA.createRangeInput=function(e,t,n,i,o,r){r=y(r,t);let s=document.createElement("input");s.setAttribute("data-bind",`value: ${r}`),s.type="number";let a=document.createElement("input");a.type="range",a.min=n,a.max=i,a.step=y(o,"any"),a.setAttribute("data-bind",`valueUpdate: "input", value: ${t}`);let c=document.createElement("div");c.appendChild(a);let d=document.createElement("div");return d.className="cesium-cesiumInspector-slider",d.appendChild(document.createTextNode(e)),d.appendChild(s),d.appendChild(c),d};CA.createButton=function(e,t,n){let i=document.createElement("button");i.type="button",i.textContent=e,i.className="cesium-cesiumInspector-pickButton";let o=`click: ${t}`;return l(n)&&(o+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${n}}`),i.setAttribute("data-bind",o),i};var Na=CA;var zxo=S(T(),1);function cTe(e,t){this._command=e,t=y(t,y.EMPTY_OBJECT),this.toggled=y(t.toggled,!1),this.tooltip=y(t.tooltip,""),Ce.track(this,["toggled","tooltip"])}Object.defineProperties(cTe.prototype,{command:{get:function(){return this._command}}});var Py=cTe;var qxo=S(T(),1);function $_t(e,t){t=y(t,!0);let n=new ge,i=new ge;function o(){let r={args:arguments,cancel:!1},s;return n.raiseEvent(r),r.cancel||(s=e.apply(null,arguments),i.raiseEvent(s)),s}return o.canExecute=t,Ce.track(o,["canExecute"]),Object.defineProperties(o,{beforeExecute:{value:n},afterExecute:{value:i}}),o}var Vn=$_t;var t_o=S(T(),1);function eSt(e,t,n,i,o){return n.call(i,e[t]),Ce.getObservable(e,t).subscribe(n,i,o)}var ga=eSt;var s_o=S(T(),1);var fT="http://www.w3.org/2000/svg",uTe="http://www.w3.org/1999/xlink",BB,VA=Y.fromCssColorString("rgba(247,250,255,0.384)"),YB=Y.fromCssColorString("rgba(143,191,255,0.216)"),t6=Y.fromCssColorString("rgba(153,197,255,0.098)"),OB=Y.fromCssColorString("rgba(255,255,255,0.086)"),tSt=Y.fromCssColorString("rgba(255,255,255,0.267)"),nSt=Y.fromCssColorString("rgba(255,255,255,0)"),lTe=Y.fromCssColorString("rgba(66,67,68,0.3)"),dTe=Y.fromCssColorString("rgba(0,0,0,0.5)");function vy(e){return Y.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}var ZA={animation_pathReset:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},animation_pathPause:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},animation_pathPlay:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathPlayReverse:{tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathLoop:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},animation_pathClock:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},animation_pathWingButton:{tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},animation_pathPointer:{tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},animation_pathSwooshFX:{tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}};function Xh(e){let t=document.createElementNS(fT,e.tagName);for(let n in e)if(e.hasOwnProperty(n)&&n!=="tagName")if(n==="children"){let i=e.children.length;for(let o=0;o<i;++o)t.appendChild(Xh(e.children[o]))}else n.indexOf("xlink:")===0?t.setAttributeNS(uTe,n.substring(6),e[n]):n==="textContent"?t.textContent=e[n]:t.setAttribute(n,e[n]);return t}function n6(e,t,n){let i=document.createElementNS(fT,"text");i.setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("class","cesium-animation-svgText");let o=document.createElementNS(fT,"tspan");return o.textContent=n,i.appendChild(o),i}function iSt(e,t,n){e.setAttribute("transform",`translate(100,100) rotate(${n})`),t.setAttribute("transform",`rotate(${n})`)}var zB=new Y;function $r(e,t){let n=t.alpha,i=1-n;return zB.red=e.red*i+t.red*n,zB.green=e.green*i+t.green*n,zB.blue=e.blue*i+t.blue*n,zB.toCssColorString()}function i6(e,t,n){let i=ZA[n],o={tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{tagName:"rect",class:"cesium-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"cesium-animation-buttonMain",width:32,height:32,rx:4,ry:4},{class:"cesium-animation-buttonPath",id:n,tagName:i.tagName,transform:i.transform,d:i.d},{tagName:"title",textContent:""}]};return Xh(o)}function oSt(e,t,n){let i=ZA[n],o=ZA.animation_pathWingButton,r={tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{class:"cesium-animation-buttonGlow",id:"animation_pathWingButton",tagName:o.tagName,d:o.d},{class:"cesium-animation-buttonMain",id:"animation_pathWingButton",tagName:o.tagName,d:o.d},{class:"cesium-animation-buttonPath",id:n,tagName:i.tagName,transform:i.transform,d:i.d},{tagName:"title",textContent:""}]};return Xh(r)}function rSt(e,t){let n=e._viewModel,i=n.shuttleRingDragging;if(!(i&&BB!==e))if(t.type==="mousedown"||i&&t.type==="mousemove"||t.type==="touchstart"&&t.touches.length===1||i&&t.type==="touchmove"&&t.touches.length===1){let o=e._centerX,r=e._centerY,a=e._svgNode.getBoundingClientRect(),c,d;if(t.type==="touchstart"||t.type==="touchmove"?(c=t.touches[0].clientX,d=t.touches[0].clientY):(c=t.clientX,d=t.clientY),!i&&(c>a.right||c<a.left||d<a.top||d>a.bottom))return;let u=e._shuttleRingPointer.getBoundingClientRect(),m=c-o-a.left,p=d-r-a.top,g=Math.atan2(p,m)*180/Math.PI+90;g>180&&(g-=360);let f=n.shuttleRingAngle;i||c<u.right&&c>u.left&&d>u.top&&d<u.bottom?(BB=e,n.shuttleRingDragging=!0,n.shuttleRingAngle=g):g<f?n.slower():g>f&&n.faster(),t.preventDefault()}else e===BB&&(BB=void 0),n.shuttleRingDragging=!1}function m0(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;let n=this;this._clickFunction=function(){let i=n._viewModel.command;i.canExecute&&i()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[ga(t,"toggled",this.setToggled,this),ga(t,"tooltip",this.setTooltip,this),ga(t.command,"canExecute",this.setEnabled,this)]}m0.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);let e=this._subscriptions;for(let t=0,n=e.length;t<n;t++)e[t].dispose();me(this)};m0.prototype.isDestroyed=function(){return!1};m0.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e){this.svgElement.setAttribute("class","cesium-animation-buttonDisabled");return}if(this._toggled){this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled");return}this.svgElement.setAttribute("class","cesium-animation-rectButton")}};m0.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled"):this.svgElement.setAttribute("class","cesium-animation-rectButton")))};m0.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e};function VZ(e,t){e=In(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;let n=e.ownerDocument,i=document.createElement("style");i.textContent=".cesium-animation-rectButton .cesium-animation-buttonGlow { filter: url(#animation_blurred); }.cesium-animation-rectButton .cesium-animation-buttonMain { fill: url(#animation_buttonNormal); }.cesium-animation-buttonToggled .cesium-animation-buttonMain { fill: url(#animation_buttonToggled); }.cesium-animation-rectButton:hover .cesium-animation-buttonMain { fill: url(#animation_buttonHovered); }.cesium-animation-buttonDisabled .cesium-animation-buttonMain { fill: url(#animation_buttonDisabled); }.cesium-animation-shuttleRingG .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.cesium-animation-shuttleRingG:hover .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.cesium-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.cesium-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.cesium-animation-knobOuter { fill: url(#animation_knobOuter); }.cesium-animation-knobInner { fill: url(#animation_knobInner); }",n.head.insertBefore(i,n.head.childNodes[0]);let o=document.createElement("div");o.className="cesium-animation-theme",o.innerHTML='<div class="cesium-animation-themeNormal"></div><div class="cesium-animation-themeHover"></div><div class="cesium-animation-themeSelect"></div><div class="cesium-animation-themeDisabled"></div><div class="cesium-animation-themeKnob"></div><div class="cesium-animation-themePointer"></div><div class="cesium-animation-themeSwoosh"></div><div class="cesium-animation-themeSwooshHover"></div>',this._theme=o,this._themeNormal=o.childNodes[0],this._themeHover=o.childNodes[1],this._themeSelect=o.childNodes[2],this._themeDisabled=o.childNodes[3],this._themeKnob=o.childNodes[4],this._themePointer=o.childNodes[5],this._themeSwoosh=o.childNodes[6],this._themeSwooshHover=o.childNodes[7];let r=document.createElementNS(fT,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",uTe);let s=document.createElementNS(fT,"g");this._topG=s,this._realtimeSVG=new m0(oSt(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new m0(i6(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new m0(i6(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new m0(i6(84,99,"animation_pathPause"),t.pauseViewModel);let a=document.createElementNS(fT,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);let c=Xh({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=c;let d=ZA.animation_pathSwooshFX,u=ZA.animation_pathPointer,m=Xh({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:d.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:d.d},{tagName:d.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:d.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=m,this._shuttleRingPointer=Xh({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:u.tagName,d:u.d});let p=Xh({tagName:"g",transform:"translate(100,100)"});this._knobOuter=Xh({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});let g=61,f=Xh({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:g});this._knobDate=n6(0,-24,""),this._knobTime=n6(0,-7,""),this._knobStatus=n6(0,-41,"");let x=Xh({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:g}),_=document.createElementNS(fT,"g");_.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(o),s.appendChild(_),s.appendChild(p),s.appendChild(a),_.appendChild(c),_.appendChild(m),_.appendChild(this._shuttleRingPointer),p.appendChild(this._knobOuter),p.appendChild(f),p.appendChild(this._knobDate),p.appendChild(this._knobTime),p.appendChild(this._knobStatus),p.appendChild(x),r.appendChild(s),e.appendChild(r);let C=this;function V(v){rSt(C,v)}this._mouseCallback=V,c.addEventListener("mousedown",V,!0),c.addEventListener("touchstart",V,!0),m.addEventListener("mousedown",V,!0),m.addEventListener("touchstart",V,!0),n.addEventListener("mousemove",V,!0),n.addEventListener("touchmove",V,!0),n.addEventListener("mouseup",V,!0),n.addEventListener("touchend",V,!0),n.addEventListener("touchcancel",V,!0),this._shuttleRingPointer.addEventListener("mousedown",V,!0),this._shuttleRingPointer.addEventListener("touchstart",V,!0),this._knobOuter.addEventListener("mousedown",V,!0),this._knobOuter.addEventListener("touchstart",V,!0);let Z=this._knobTime.childNodes[0],R=this._knobDate.childNodes[0],G=this._knobStatus.childNodes[0],W;this._subscriptions=[ga(t.pauseViewModel,"toggled",function(v){W!==v&&(W=v,W?C._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):C._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))}),ga(t,"shuttleRingAngle",function(v){iSt(C._shuttleRingPointer,C._knobOuter,v)}),ga(t,"dateLabel",function(v){R.textContent!==v&&(R.textContent=v)}),ga(t,"timeLabel",function(v){Z.textContent!==v&&(Z.textContent=v)}),ga(t,"multiplierLabel",function(v){G.textContent!==v&&(G.textContent=v)})],this.applyThemeChanges(),this.resize()}Object.defineProperties(VZ.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});VZ.prototype.isDestroyed=function(){return!1};VZ.prototype.destroy=function(){l(this._observer)&&(this._observer.disconnect(),this._observer=void 0);let e=this._container.ownerDocument,t=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",t,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",t,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",t,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",t,!0),e.removeEventListener("mousemove",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("mouseup",t,!0),e.removeEventListener("touchend",t,!0),e.removeEventListener("touchcancel",t,!0),this._shuttleRingPointer.removeEventListener("mousedown",t,!0),this._shuttleRingPointer.removeEventListener("touchstart",t,!0),this._knobOuter.removeEventListener("mousedown",t,!0),this._knobOuter.removeEventListener("touchstart",t,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();let n=this._subscriptions;for(let i=0,o=n.length;i<o;i++)n[i].dispose();return me(this)};VZ.prototype.resize=function(){let e=this._container.clientWidth,t=this._container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;let n=this._svgNode,i=200,o=132,r=e,s=t;e===0&&t===0?(r=i,s=o):e===0?(s=t,r=i*(t/o)):t===0&&(r=e,s=o*(e/i));let a=r/i,c=s/o;n.style.cssText=`width: ${r}px; height: ${s}px; position: absolute; bottom: 0; left: 0; overflow: hidden;`,n.setAttribute("width",r),n.setAttribute("height",s),n.setAttribute("viewBox",`0 0 ${r} ${s}`),this._topG.setAttribute("transform",`scale(${a},${c})`),this._centerX=Math.max(1,100*a),this._centerY=Math.max(1,100*c),this._lastHeight=e,this._lastWidth=t};VZ.prototype.applyThemeChanges=function(){let e=this._container.ownerDocument;if(!e.body.contains(this._container)){if(l(this._observer))return;let u=this;u._observer=new MutationObserver(function(){e.body.contains(u._container)&&(u._observer.disconnect(),u._observer=void 0,u.applyThemeChanges())}),u._observer.observe(e,{childList:!0,subtree:!0});return}let t=vy(this._themeNormal),n=vy(this._themeHover),i=vy(this._themeSelect),o=vy(this._themeDisabled),r=vy(this._themeKnob),s=vy(this._themePointer),a=vy(this._themeSwoosh),c=vy(this._themeSwooshHover),d=Xh({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":$r(t,VA)},{tagName:"stop",offset:"12%","stop-color":$r(t,YB)},{tagName:"stop",offset:"46%","stop-color":$r(t,t6)},{tagName:"stop",offset:"81%","stop-color":$r(t,OB)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":$r(n,VA)},{tagName:"stop",offset:"12%","stop-color":$r(n,YB)},{tagName:"stop",offset:"46%","stop-color":$r(n,t6)},{tagName:"stop",offset:"81%","stop-color":$r(n,OB)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":$r(i,VA)},{tagName:"stop",offset:"12%","stop-color":$r(i,YB)},{tagName:"stop",offset:"46%","stop-color":$r(i,t6)},{tagName:"stop",offset:"81%","stop-color":$r(i,OB)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":$r(o,tSt)},{tagName:"stop",offset:"75%","stop-color":$r(o,nSt)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":a.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":a.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":a.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":c.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":$r(s,dTe)},{tagName:"stop",offset:"100%","stop-color":$r(s,dTe)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":$r(r,VA)},{tagName:"stop",offset:"60%","stop-color":$r(r,lTe)},{tagName:"stop",offset:"85%","stop-color":$r(r,YB)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":$r(r,lTe)},{tagName:"stop",offset:"60%","stop-color":$r(r,VA)},{tagName:"stop",offset:"85%","stop-color":$r(r,OB)}]}]});l(this._defsElement)?this._svgNode.replaceChild(d,this._defsElement):this._svgNode.appendChild(d),this._defsElement=d};var LA=VZ;var f_o=S(T(),1);var sSt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wy=15,ZZ=105;function mTe(e,t){return e-t}function o6(e,t){let n=Lo(t,e,mTe);return n<0?~n:n}function aSt(e,t){if(Math.abs(e)<=wy)return e/wy;let n=wy,i=ZZ,o,r=0,s;return e>0?(o=Math.log(t[t.length-1]),s=(o-r)/(i-n),Math.exp(r+s*(e-n))):(o=Math.log(-t[0]),s=(o-r)/(i-n),-Math.exp(r+s*(Math.abs(e)-n)))}function cSt(e,t,n){if(n.clockStep===mo.SYSTEM_CLOCK)return wy;if(Math.abs(e)<=1)return e*wy;let i=t[t.length-1];e>i?e=i:e<-i&&(e=-i);let o=wy,r=ZZ,s,a=0,c;return e>0?(s=Math.log(i),c=(s-a)/(r-o),(Math.log(e)-a)/c+o):(s=Math.log(-t[0]),c=(s-a)/(r-o),-((Math.log(Math.abs(e))-a)/c+o))}function sm(e){let t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=sm.defaultDateFormatter,this._timeFormatter=sm.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,Ce.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(sm.defaultTicks),this.timeLabel=void 0,Ce.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,Ce.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,Ce.defineProperty(this,"multiplierLabel",function(){let s=t._clockViewModel;if(s.clockStep===mo.SYSTEM_CLOCK)return"Today";let a=s.multiplier;return a%1===0?`${a.toFixed(0)}x`:`${a.toFixed(3).replace(/0{0,3}$/,"")}x`}),this.shuttleRingAngle=void 0,Ce.defineProperty(this,"shuttleRingAngle",{get:function(){return cSt(e.multiplier,t._allShuttleRingTicks,e)},set:function(s){s=Math.max(Math.min(s,ZZ),-ZZ);let a=t._allShuttleRingTicks,c=t._clockViewModel;if(c.clockStep=mo.SYSTEM_CLOCK_MULTIPLIER,Math.abs(s)===ZZ){c.multiplier=s>0?a[a.length-1]:a[0];return}let d=aSt(s,a);if(t.snapToTicks)d=a[o6(d,a)];else if(d!==0){let u=Math.abs(d);if(u>100){let m=u.toFixed(0).length-2,p=Math.pow(10,m);d=Math.round(d/p)*p|0}else u>wy?d=Math.round(d):u>1?d=+d.toFixed(1):u>0&&(d=+d.toFixed(2))}c.multiplier=d}}),this._canAnimate=void 0,Ce.defineProperty(this,"_canAnimate",function(){let s=t._clockViewModel,a=s.clockRange;if(t.shuttleRingDragging||a===wr.UNBOUNDED)return!0;let c=s.multiplier,d=s.currentTime,u=s.startTime,m=!1;if(a===wr.LOOP_STOP)m=ne.greaterThan(d,u)||d.equals(u)&&c>0;else{let p=s.stopTime;m=ne.greaterThan(d,u)&&ne.lessThan(d,p)||d.equals(u)&&c>0||d.equals(p)&&c<0}return m||(s.shouldAnimate=!1),m}),this._isSystemTimeAvailable=void 0,Ce.defineProperty(this,"_isSystemTimeAvailable",function(){let s=t._clockViewModel;if(s.clockRange===wr.UNBOUNDED)return!0;let c=s.systemTime;return ne.greaterThanOrEquals(c,s.startTime)&&ne.lessThanOrEquals(c,s.stopTime)}),this._isAnimating=void 0,Ce.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});let n=Vn(function(){let s=t._clockViewModel;s.shouldAnimate?s.shouldAnimate=!1:t._canAnimate&&(s.shouldAnimate=!0)});this._pauseViewModel=new Py(n,{toggled:Ce.computed(function(){return!t._isAnimating}),tooltip:"Pause"});let i=Vn(function(){let s=t._clockViewModel,a=s.multiplier;a>0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playReverseViewModel=new Py(i,{toggled:Ce.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});let o=Vn(function(){let s=t._clockViewModel,a=s.multiplier;a<0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playForwardViewModel=new Py(o,{toggled:Ce.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==mo.SYSTEM_CLOCK}),tooltip:"Play Forward"});let r=Vn(function(){t._clockViewModel.clockStep=mo.SYSTEM_CLOCK},Ce.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new Py(r,{toggled:Ce.computed(function(){return e.clockStep===mo.SYSTEM_CLOCK}),tooltip:Ce.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=Vn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,d=o6(c,a)-1;d>=0&&(s.multiplier=a[d])}),this._faster=Vn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,d=o6(c,a)+1;d<a.length&&(s.multiplier=a[d])})}sm.defaultDateFormatter=function(e,t){let n=ne.toGregorianDate(e);return`${sSt[n.month-1]} ${n.day} ${n.year}`};sm.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800];sm.defaultTimeFormatter=function(e,t){let n=ne.toGregorianDate(e),i=Math.round(n.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")}.${i.toString().padStart(3,"0")}`:`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")} UTC`};sm.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)};sm.prototype.setShuttleRingTicks=function(e){let t,n,i,o={},r=this._sortedFilteredPositiveTicks;for(r.length=0,t=0,n=e.length;t<n;++t)i=e[t],o.hasOwnProperty(i)||(o[i]=!0,r.push(i));r.sort(mTe);let s=[];for(n=r.length,t=n-1;t>=0;--t)i=r[t],i!==0&&s.push(-i);Array.prototype.push.apply(s,r),this._allShuttleRingTicks=s};Object.defineProperties(sm.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){this._timeFormatter=e}}});sm._maxShuttleRingAngle=ZZ;sm._realtimeShuttleRingAngle=wy;var RA=sm;var R_o=S(T(),1);var __o=S(T(),1);function hTe(e){e=y(e,y.EMPTY_OBJECT);let t=e.globe,n=y(e.imageryProviderViewModels,[]),i=y(e.terrainProviderViewModels,[]);this._globe=t,this.imageryProviderViewModels=n.slice(0),this.terrainProviderViewModels=i.slice(0),this.dropDownVisible=!1,Ce.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);let o=Ce.getObservable(this,"imageryProviderViewModels"),r=Ce.pureComputed(function(){let m=o(),p={},g;for(g=0;g<m.length;g++){let _=m[g],C=_.category;l(p[C])?p[C].push(_):p[C]=[_]}let f=Object.keys(p),x=[];for(g=0;g<f.length;g++){let _=f[g];x.push({name:_,providers:p[_]})}return x});this._imageryProviders=r;let s=Ce.getObservable(this,"terrainProviderViewModels"),a=Ce.pureComputed(function(){let m=s(),p={},g;for(g=0;g<m.length;g++){let _=m[g],C=_.category;l(p[C])?p[C].push(_):p[C]=[_]}let f=Object.keys(p),x=[];for(g=0;g<f.length;g++){let _=f[g];x.push({name:_,providers:p[_]})}return x});this._terrainProviders=a,this.buttonTooltip=void 0,Ce.defineProperty(this,"buttonTooltip",function(){let m=this.selectedImagery,p=this.selectedTerrain,g=l(m)?m.name:void 0,f=l(p)?p.name:void 0;return l(g)&&l(f)?`${g} +${f}`:l(g)?g:f}),this.buttonImageUrl=void 0,Ce.defineProperty(this,"buttonImageUrl",function(){let m=this.selectedImagery;if(l(m))return m.iconUrl}),this.selectedImagery=void 0;let c=Ce.observable();this._currentImageryLayers=[],Ce.defineProperty(this,"selectedImagery",{get:function(){return c()},set:function(m){if(c()===m){this.dropDownVisible=!1;return}let p,g=this._currentImageryLayers,f=g.length,x=this._globe.imageryLayers,_=!1;for(p=0;p<f;p++){let C=x.length;for(let V=0;V<C;V++){let Z=x.get(V);if(Z===g[p]){x.remove(Z),_=!0;break}}}if(l(m)){let C=m.creationCommand();if(Array.isArray(C)){let V=C.length;for(this._currentImageryLayers=[],p=V-1;p>=0;p--){let Z=ma.fromProviderAsync(C[p]);x.add(Z,0),this._currentImageryLayers.push(Z)}}else{this._currentImageryLayers=[];let V=ma.fromProviderAsync(C);if(V.name=m.name,_)x.add(V,0);else{let Z=x.get(0);l(Z)&&x.remove(Z),x.add(V,0)}this._currentImageryLayers.push(V)}}c(m),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;let d=Ce.observable();Ce.defineProperty(this,"selectedTerrain",{get:function(){return d()},set:function(m){if(d()===m){this.dropDownVisible=!1;return}let p;if(l(m)&&(p=m.creationCommand()),l(p)&&!l(p.then))this._globe.depthTestAgainstTerrain=!(p instanceof Ff),this._globe.terrainProvider=p;else if(l(p)){let g=!1,f=this._globe.terrainProviderChanged.addEventListener(()=>{g=!0,f()}),_=new fA(p).readyEvent.addEventListener(C=>{g||(this._globe.depthTestAgainstTerrain=!(C instanceof Ff),this._globe.terrainProvider=C,_())})}d(m),this.dropDownVisible=!1}});let u=this;this._toggleDropDown=Vn(function(){u.dropDownVisible=!u.dropDownVisible}),this.selectedImagery=y(e.selectedImageryProviderViewModel,n[0]),this.selectedTerrain=e.selectedTerrainProviderViewModel}Object.defineProperties(hTe.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}});var GA=hTe;function KB(e,t){e=In(e);let n=new GA(t),i=document.createElement("button");i.type="button",i.className="cesium-button cesium-toolbar-button",i.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(i);let o=document.createElement("img");o.setAttribute("draggable","false"),o.className="cesium-baseLayerPicker-selected",o.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-baseLayerPicker-dropDown",r.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(r);let s=document.createElement("div");s.className="cesium-baseLayerPicker-sectionTitle",s.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),s.innerHTML="Imagery",r.appendChild(s);let a=document.createElement("div");a.className="cesium-baseLayerPicker-section",a.setAttribute("data-bind","foreach: _imageryProviders"),r.appendChild(a);let c=document.createElement("div");c.className="cesium-baseLayerPicker-category",a.appendChild(c);let d=document.createElement("div");d.className="cesium-baseLayerPicker-categoryTitle",d.setAttribute("data-bind","text: name"),c.appendChild(d);let u=document.createElement("div");u.className="cesium-baseLayerPicker-choices",u.setAttribute("data-bind","foreach: providers"),c.appendChild(u);let m=document.createElement("div");m.className="cesium-baseLayerPicker-item",m.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),u.appendChild(m);let p=document.createElement("img");p.className="cesium-baseLayerPicker-itemIcon",p.setAttribute("data-bind","attr: { src: iconUrl }"),p.setAttribute("draggable","false"),m.appendChild(p);let g=document.createElement("div");g.className="cesium-baseLayerPicker-itemLabel",g.setAttribute("data-bind","text: name"),m.appendChild(g);let f=document.createElement("div");f.className="cesium-baseLayerPicker-sectionTitle",f.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),f.innerHTML="Terrain",r.appendChild(f);let x=document.createElement("div");x.className="cesium-baseLayerPicker-section",x.setAttribute("data-bind","foreach: _terrainProviders"),r.appendChild(x);let _=document.createElement("div");_.className="cesium-baseLayerPicker-category",x.appendChild(_);let C=document.createElement("div");C.className="cesium-baseLayerPicker-categoryTitle",C.setAttribute("data-bind","text: name"),_.appendChild(C);let V=document.createElement("div");V.className="cesium-baseLayerPicker-choices",V.setAttribute("data-bind","foreach: providers"),_.appendChild(V);let Z=document.createElement("div");Z.className="cesium-baseLayerPicker-item",Z.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),V.appendChild(Z);let R=document.createElement("img");R.className="cesium-baseLayerPicker-itemIcon",R.setAttribute("data-bind","attr: { src: iconUrl }"),R.setAttribute("draggable","false"),Z.appendChild(R);let G=document.createElement("div");G.className="cesium-baseLayerPicker-itemLabel",G.setAttribute("data-bind","text: name"),Z.appendChild(G),Ce.applyBindings(n,i),Ce.applyBindings(n,r),this._viewModel=n,this._container=e,this._element=i,this._dropPanel=r,this._closeDropDown=function(W){i.contains(W.target)||r.contains(W.target)||(n.dropDownVisible=!1)},Yt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(KB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});KB.prototype.isDestroyed=function(){return!1};KB.prototype.destroy=function(){return Yt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._element),Ce.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),me(this)};var EA=KB;var P_o=S(T(),1);function fTe(e){let t=e.creationFunction;l(t.canExecute)||(t=Vn(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=y(e.category,""),Ce.track(this,["name","tooltip","iconUrl"])}Object.defineProperties(fTe.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var es=fTe;var A_o=S(T(),1);function lSt(){let e=[],t=devicePixelRatio>=2;return e.push(new es({name:"Bing Maps Aerial",iconUrl:tn("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return zb({style:Ob.AERIAL})}})),e.push(new es({name:"Bing Maps Aerial with Labels",iconUrl:tn("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return zb({style:Ob.AERIAL_WITH_LABELS})}})),e.push(new es({name:"Bing Maps Roads",iconUrl:tn("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return zb({style:Ob.ROAD})}})),e.push(new es({name:"ArcGIS World Imagery",iconUrl:tn("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png"),tooltip:`ArcGIS World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes 15m TerraColor imagery at small and mid-scales (~1:591M down to ~1:288k) for the world. The map features Maxar imagery at 0.3m resolution for select metropolitan areas around the world, 0.5m resolution across the United States and parts of Western Europe, and 1m resolution imagery across the rest of the world. In addition to commercial sources, the World Imagery map features high-resolution aerial photography contributed by the GIS User Community. This imagery ranges from 0.3m to 0.03m resolution (down to ~1:280 nin select communities). For more information on this map, including the terms of use, visit us online at +https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9`,category:"Other",creationFunction:function(){return Bb.fromBasemapType(bh.SATELLITE,{enablePickFeatures:!1})}})),e.push(new es({name:"ArcGIS World Hillshade",iconUrl:tn("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png"),tooltip:`ArcGIS World Hillshade map portrays elevation as an artistic hillshade. This map is designed to be used as a backdrop for topographical, soil, hydro, landcover or other outdoor recreational maps. The map was compiled from a variety of sources from several data providers. The basemap has global coverage down to a scale of ~1:72k. In select areas of the United States and Europe, coverage is available down to ~1:9k. For more information on this map, including the terms of use, visit us online at +https://www.arcgis.com/home/item.html?id=1b243539f4514b6ba35e7d995890db1d`,category:"Other",creationFunction:function(){return Bb.fromBasemapType(bh.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new es({name:"Esri World Ocean",iconUrl:tn("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png"),tooltip:`ArcGIS World Ocean map is designed to be used as a base map by marine GIS professionals and as a reference map by anyone interested in ocean data. The base map features marine bathymetry. Land features include inland waters and roads overlaid on land cover and shaded relief imagery. The map was compiled from a variety of best available sources from several data providers, including General Bathymetric Chart of the Oceans GEBCO_08 Grid, National Oceanic and Atmospheric Administration (NOAA), and National Geographic, Garmin, HERE, Geonames.org, and Esri, and various other contributors. The base map currently provides coverage for the world down to a scale of ~1:577k, and coverage down to 1:72k in US coastal areas, and various other areas. Coverage down to ~ 1:9k is available limited areas based on regional hydrographic survey data. The base map was designed and developed by Esri. For more information on this map, including our terms of use, visit us online at +https://www.arcgis.com/home/item.html?id=1e126e7520f9466c9ca28b8f28b5e500`,category:"Other",creationFunction:function(){return Bb.fromBasemapType(bh.OCEANS,{enablePickFeatures:!1})}})),e.push(new es({name:"Open\xADStreet\xADMap",iconUrl:tn("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:`OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world. +http://www.openstreetmap.org`,category:"Other",creationFunction:function(){return new u0({url:"https://tile.openstreetmap.org/"})}})),e.push(new es({name:"Stadia x Stamen Watercolor",iconUrl:tn("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and reminiscent of hand drawn maps, the watercolor maps from Stamen Design apply raster effect area washes and organic edges over a paper texture to add warm pop to any map. +https://docs.stadiamaps.com/map-styles/stamen-watercolor/`,category:"Other",creationFunction:function(){return new u0({url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/",fileExtension:"jpg",credit:`© <a href="https://stamen.com/" target="_blank">Stamen Design</a> © <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> - © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new qr({name:"Stadia x Stamen Toner",iconUrl:tn("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and the most popular of the excellent styles from Stamen Design, these high-contrast B+W (black and white) maps are the perfect backdrop for your colorful and eye-catching overlays. -https://docs.stadiamaps.com/map-styles/stamen-toner/`,category:"Other",creationFunction:function(){return new mb({url:"https://tiles.stadiamaps.com/tiles/stamen_toner/",retinaTiles:t,credit:`© <a href="https://stamen.com/" target="_blank">Stamen Design</a> + © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new es({name:"Stadia x Stamen Toner",iconUrl:tn("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and the most popular of the excellent styles from Stamen Design, these high-contrast B+W (black and white) maps are the perfect backdrop for your colorful and eye-catching overlays. +https://docs.stadiamaps.com/map-styles/stamen-toner/`,category:"Other",creationFunction:function(){return new u0({url:"https://tiles.stadiamaps.com/tiles/stamen_toner/",retinaTiles:t,credit:`© <a href="https://stamen.com/" target="_blank">Stamen Design</a> © <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> - © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new qr({name:"Stadia Alidade Smooth",iconUrl:tn("Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png"),tooltip:`Stadia's custom Alidade Smooth style is designed for maps that use a lot of markers or overlays. It features a muted color scheme and fewer points of interest to allow your added data to shine. -https://docs.stadiamaps.com/map-styles/alidade-smooth/`,category:"Other",creationFunction:function(){return new mb({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth/",retinaTiles:t,credit:`© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> + © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new es({name:"Stadia Alidade Smooth",iconUrl:tn("Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png"),tooltip:`Stadia's custom Alidade Smooth style is designed for maps that use a lot of markers or overlays. It features a muted color scheme and fewer points of interest to allow your added data to shine. +https://docs.stadiamaps.com/map-styles/alidade-smooth/`,category:"Other",creationFunction:function(){return new u0({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth/",retinaTiles:t,credit:`© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> - © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new qr({name:"Stadia Alidade Smooth Dark",iconUrl:tn("Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png"),tooltip:`Stadia Alidade Smooth Dark, like its lighter cousin, is also designed to stay out of the way. It just flips the dark mode switch on the color scheme. With the lights out, your data can now literally shine. -https://docs.stadiamaps.com/map-styles/alidade-smooth-dark/`,category:"Other",creationFunction:function(){return new mb({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/",retinaTiles:t,credit:`© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> + © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new es({name:"Stadia Alidade Smooth Dark",iconUrl:tn("Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png"),tooltip:`Stadia Alidade Smooth Dark, like its lighter cousin, is also designed to stay out of the way. It just flips the dark mode switch on the color scheme. With the lights out, your data can now literally shine. +https://docs.stadiamaps.com/map-styles/alidade-smooth-dark/`,category:"Other",creationFunction:function(){return new u0({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/",retinaTiles:t,credit:`© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> - © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new qr({name:"Sentinel-2",iconUrl:tn("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"Cesium ion",creationFunction:function(){return Q0.fromAssetId(3954)}})),e.push(new qr({name:"Blue Marble",iconUrl:tn("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return Q0.fromAssetId(3845)}})),e.push(new qr({name:"Earth at night",iconUrl:tn("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"Cesium ion",creationFunction:function(){return Q0.fromAssetId(3812)}})),e.push(new qr({name:"Natural Earth\xA0II",iconUrl:tn("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:`Natural Earth II, darkened for contrast. -http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:function(){return Ty.fromUrl(tn("Assets/Textures/NaturalEarthII"))}})),e}var EA=pTt;var N_o=T(S(),1);function bTt(){let e=[];return e.push(new qr({name:"WGS84 Ellipsoid",iconUrl:tn("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new Af}})),e.push(new qr({name:"Cesium World Terrain",iconUrl:tn("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by Cesium ion",category:"Cesium ion",creationFunction:function(){return LT({requestWaterMask:!0,requestVertexNormals:!0})}})),e}var XA=bTt;var j_o=T(S(),1);var Y_o=T(S(),1);function gTt(e){return function(t){let n=e._scene.pick(t.position);l(n)&&n.primitive instanceof oa&&(e.tileset=n.primitive),e.pickActive=!1}}function uSe(e,t){t?e._eventHandler.setInputAction(function(n){let i=e._scene.pick(n.endPosition);l(i)&&i.primitive instanceof oa&&(e.tileset=i.primitive)},Tn.MOUSE_MOVE):(e._eventHandler.removeInputAction(Tn.MOUSE_MOVE),e.picking=e.picking)}var yTt={maximumFractionDigits:3};function IA(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,yTt):Math.round(t).toLocaleString()}function WA(e,t){if(!l(e))return"";let n=t?e._statisticsPerPass[Io.PICK]:e._statisticsPerPass[Io.RENDER],i='<ul class="cesium-cesiumInspector-statistics">';return i+=`<li><strong>Visited: </strong>${n.visited.toLocaleString()}</li><li><strong>Selected: </strong>${n.selected.toLocaleString()}</li><li><strong>Commands: </strong>${n.numberOfCommands.toLocaleString()}</li>`,i+="</ul>",t||(i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Requests: </strong>${n.numberOfPendingRequests.toLocaleString()}</li><li><strong>Attempted: </strong>${n.numberOfAttemptedRequests.toLocaleString()}</li><li><strong>Processing: </strong>${n.numberOfTilesProcessing.toLocaleString()}</li><li><strong>Content Ready: </strong>${n.numberOfTilesWithContentReady.toLocaleString()}</li><li><strong>Total: </strong>${n.numberOfTilesTotal.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Features Selected: </strong>${n.numberOfFeaturesSelected.toLocaleString()}</li><li><strong>Features Loaded: </strong>${n.numberOfFeaturesLoaded.toLocaleString()}</li><li><strong>Points Selected: </strong>${n.numberOfPointsSelected.toLocaleString()}</li><li><strong>Points Loaded: </strong>${n.numberOfPointsLoaded.toLocaleString()}</li><li><strong>Triangles Selected: </strong>${n.numberOfTrianglesSelected.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Tiles styled: </strong>${n.numberOfTilesStyled.toLocaleString()}</li><li><strong>Features styled: </strong>${n.numberOfFeaturesStyled.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Children Union Culled: </strong>${n.numberOfTilesCulledWithChildrenUnion.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Geometry Memory (MB): </strong>${IA(n.geometryByteLength)}</li><li><strong>Texture Memory (MB): </strong>${IA(n.texturesByteLength)}</li><li><strong>Batch Table Memory (MB): </strong>${IA(n.batchTableByteLength)}</li>`,i+="</ul>"),i}function mSe(){let e=Ni.statistics;return` + © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new es({name:"Sentinel-2",iconUrl:tn("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"Cesium ion",creationFunction:function(){return Yb.fromAssetId(3954)}})),e.push(new es({name:"Blue Marble",iconUrl:tn("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return Yb.fromAssetId(3845)}})),e.push(new es({name:"Earth at night",iconUrl:tn("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"Cesium ion",creationFunction:function(){return Yb.fromAssetId(3812)}})),e.push(new es({name:"Natural Earth\xA0II",iconUrl:tn("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:`Natural Earth II, darkened for contrast. +http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:function(){return ly.fromUrl(tn("Assets/Textures/NaturalEarthII"))}})),e}var WA=lSt;var k_o=S(T(),1);function dSt(){let e=[];return e.push(new es({name:"WGS84 Ellipsoid",iconUrl:tn("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new Ff({ellipsoid:te.WGS84})}})),e.push(new es({name:"Cesium World Terrain",iconUrl:tn("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by Cesium ion",category:"Cesium ion",creationFunction:function(){return $S({requestWaterMask:!0,requestVertexNormals:!0})}})),e}var IA=dSt;var tSo=S(T(),1);var K_o=S(T(),1);function uSt(e){let t;if(l(e)){t="Command Statistics";let n=e.commandsInFrustums;for(let i in n)if(n.hasOwnProperty(i)){let o=parseInt(i,10),r;if(o===7)r="1, 2 and 3";else{let s=[];for(let a=2;a>=0;a--){let c=Math.pow(2,a);o>=c&&(s.push(a+1),o-=c)}r=s.reverse().join(" and ")}t+=`<br>    ${n[i]} in frustum ${r}`}t+=`<br>Total: ${e.totalCommands}`}return t}function r6(e,t,n){let i=Math.min(n,t);return i=Math.max(i,e),i}var mSt=new pn,hSt=new h;function XA(e,t){let n=this,i=e.canvas,o=new Od(i);this._eventHandler=o,this._scene=e,this._canvas=i,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;let r=this._scene.globe;r.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",Ce.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=Vn(function(){n.dropDownVisible=!n.dropDownVisible}),this._toggleGeneral=Vn(function(){n.generalVisible=!n.generalVisible}),this._togglePrimitives=Vn(function(){n.primitivesVisible=!n.primitivesVisible}),this._toggleTerrain=Vn(function(){n.terrainVisible=!n.terrainVisible}),this._frustumsSubscription=Ce.getObservable(this,"frustums").subscribe(function(d){n._scene.debugShowFrustums=d,n._scene.requestRender()}),this._frustumPlanesSubscription=Ce.getObservable(this,"frustumPlanes").subscribe(function(d){n._scene.debugShowFrustumPlanes=d,n._scene.requestRender()}),this._performanceSubscription=Ce.getObservable(this,"performance").subscribe(function(d){d?n._performanceDisplay=new jb({container:n._performanceContainer}):n._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=Vn(function(){return n._primitive.debugShowBoundingVolume=n.primitiveBoundingSphere,n._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=Ce.getObservable(this,"primitiveBoundingSphere").subscribe(function(){n._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=Vn(function(){if(n.primitiveReferenceFrame){let d=n._primitive.modelMatrix;n._modelMatrixPrimitive=new j9({modelMatrix:d}),n._scene.primitives.add(n._modelMatrixPrimitive)}else l(n._modelMatrixPrimitive)&&(n._scene.primitives.remove(n._modelMatrixPrimitive),n._modelMatrixPrimitive=void 0);return n._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=Ce.getObservable(this,"primitiveReferenceFrame").subscribe(function(){n._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=Vn(function(){return n.filterPrimitive?n._scene.debugCommandFilter=function(d){return l(n._modelMatrixPrimitive)&&d.owner===n._modelMatrixPrimitive._primitive?!0:l(n._primitive)?d.owner===n._primitive||d.owner===n._primitive._billboardCollection||d.owner.primitive===n._primitive:!1}:n._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=Ce.getObservable(this,"filterPrimitive").subscribe(function(){n._doFilterPrimitive(),n._scene.requestRender()}),this._wireframeSubscription=Ce.getObservable(this,"wireframe").subscribe(function(d){r._surface.tileProvider._debug.wireframe=d,n._scene.requestRender()}),this._depthFrustumSubscription=Ce.getObservable(this,"depthFrustum").subscribe(function(d){n._scene.debugShowDepthFrustum=d,n._scene.requestRender()}),this._incrementDepthFrustum=Vn(function(){let d=n.depthFrustum+1;return n.depthFrustum=r6(1,n._numberOfFrustums,d),n._scene.requestRender(),!0}),this._decrementDepthFrustum=Vn(function(){let d=n.depthFrustum-1;return n.depthFrustum=r6(1,n._numberOfFrustums,d),n._scene.requestRender(),!0}),this._suspendUpdatesSubscription=Ce.getObservable(this,"suspendUpdates").subscribe(function(d){r._surface._debug.suspendLodUpdate=d,d||(n.filterTile=!1)});let s;this._showTileCoordinates=Vn(function(){return n.tileCoordinates&&!l(s)?s=e.imageryLayers.addImageryProvider(new bA({tilingScheme:e.terrainProvider.tilingScheme})):!n.tileCoordinates&&l(s)&&(e.imageryLayers.remove(s),s=void 0),!0}),this._tileCoordinatesSubscription=Ce.getObservable(this,"tileCoordinates").subscribe(function(){n._showTileCoordinates(),n._scene.requestRender()}),this._tileBoundingSphereSubscription=Ce.getObservable(this,"tileBoundingSphere").subscribe(function(){n._showTileBoundingSphere(),n._scene.requestRender()}),this._showTileBoundingSphere=Vn(function(){return n.tileBoundingSphere?r._surface.tileProvider._debug.boundingSphereTile=n._tile:r._surface.tileProvider._debug.boundingSphereTile=void 0,n._scene.requestRender(),!0}),this._doFilterTile=Vn(function(){return n.filterTile?(n.suspendUpdates=!0,r._surface._tilesToRender=[],l(n._tile)&&n._tile.renderable&&r._surface._tilesToRender.push(n._tile)):n.suspendUpdates=!1,!0}),this._filterTileSubscription=Ce.getObservable(this,"filterTile").subscribe(function(){n.doFilterTile(),n._scene.requestRender()});function a(d){let u=n._scene.pick({x:d.position.x,y:d.position.y});l(u)&&(n.primitive=l(u.collection)?u.collection:u.primitive),n._scene.requestRender(),n.pickPrimitiveActive=!1}this._pickPrimitive=Vn(function(){n.pickPrimitiveActive=!n.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=Ce.getObservable(this,"pickPrimitiveActive").subscribe(function(d){d?o.setInputAction(a,Sn.LEFT_CLICK):o.removeInputAction(Sn.LEFT_CLICK)});function c(d){let u,m=r.ellipsoid,p=n._scene.camera.getPickRay(d.position,mSt),g=r.pick(p,n._scene,hSt);if(l(g)){let f=m.cartesianToCartographic(g),x=r._surface.tileProvider._tilesToRenderByTextureCount;for(let _=0;!u&&_<x.length;++_){let C=x[_];if(l(C))for(let V=0;!u&&V<C.length;++V){let Z=C[V];ce.contains(Z.rectangle,f)&&(u=Z)}}}n.tile=u,n.pickTileActive=!1}this._pickTile=Vn(function(){n.pickTileActive=!n.pickTileActive}),this._pickTileActiveSubscription=Ce.getObservable(this,"pickTileActive").subscribe(function(d){d?o.setInputAction(c,Sn.LEFT_CLICK):o.removeInputAction(Sn.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()})}Object.defineProperties(XA.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){let e=this;return Vn(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){let e=this;return Vn(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){let e=this;return Vn(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){let e=this;return Vn(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){let e=this;return Vn(function(){e.tile=e.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(e){let t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,l(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,l(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout(function(){e.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(l(e)){this.hasPickedTile=!0;let t=this._tile;if(e!==t){this.tileText=`L: ${e.level} X: ${e.x} Y: ${e.y}`,this.tileText+=`<br>SW corner: ${e.rectangle.west}, ${e.rectangle.south}`,this.tileText+=`<br>NE corner: ${e.rectangle.east}, ${e.rectangle.north}`;let n=e.data;l(n)&&l(n.tileBoundingRegion)?this.tileText+=`<br>Min: ${n.tileBoundingRegion.minimumHeight} Max: ${n.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}});XA.prototype._update=function(){this.frustums&&(this.frustumStatisticText=uSt(this._scene.debugFrustumStatistics));let e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=r6(1,e,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${e}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`};XA.prototype.isDestroyed=function(){return!1};XA.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),me(this)};var PA=XA;function HB(e,t){e=In(e);let n=document.createElement("div"),i=new PA(t,n);this._viewModel=i,this._container=e;let o=document.createElement("div");this._element=o;let r=document.createElement("div");r.textContent="Cesium Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleDropDown"),o.appendChild(r),o.className="cesium-cesiumInspector",o.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);let s=document.createElement("div");s.className="cesium-cesiumInspector-dropDown",o.appendChild(s);let a=Na.createSection,c=Na.createCheckbox,d=a(s,"General","generalVisible","toggleGeneral"),u=c("Show Frustums","frustums"),m=document.createElement("div");m.className="cesium-cesiumInspector-frustumStatistics",m.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),u.appendChild(m),d.appendChild(u),d.appendChild(c("Show Frustum Planes","frustumPlanes")),d.appendChild(c("Performance Display","performance")),n.className="cesium-cesiumInspector-performanceDisplay",d.appendChild(n);let p=document.createElement("div");p.className="cesium-cesiumInspector-shaderCache",p.setAttribute("data-bind","html: shaderCacheText"),d.appendChild(p);let g=document.createElement("div");d.appendChild(g);let f=document.createElement("span");f.setAttribute("data-bind",'html: "     Frustum:"'),g.appendChild(f);let x=document.createElement("span");x.setAttribute("data-bind","text: depthFrustumText"),g.appendChild(x);let _=document.createElement("input");_.type="button",_.value="-",_.className="cesium-cesiumInspector-pickButton",_.setAttribute("data-bind","click: decrementDepthFrustum"),g.appendChild(_);let C=document.createElement("input");C.type="button",C.value="+",C.className="cesium-cesiumInspector-pickButton",C.setAttribute("data-bind","click: incrementDepthFrustum"),g.appendChild(C);let V=a(s,"Primitives","primitivesVisible","togglePrimitives"),Z=document.createElement("div");Z.className="cesium-cesiumInspector-pickSection",V.appendChild(Z);let R=document.createElement("input");R.type="button",R.value="Pick a primitive",R.className="cesium-cesiumInspector-pickButton",R.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let G=document.createElement("div");G.className="cesium-cesiumInspector-center",G.appendChild(R),Z.appendChild(G),Z.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),Z.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),Z.appendChild(this._primitiveOnly);let W=a(s,"Terrain","terrainVisible","toggleTerrain"),v=document.createElement("div");v.className="cesium-cesiumInspector-pickSection",W.appendChild(v);let P=document.createElement("input");P.type="button",P.value="Pick a tile",P.className="cesium-cesiumInspector-pickButton",P.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),G=document.createElement("div"),G.appendChild(P),G.className="cesium-cesiumInspector-center",v.appendChild(G);let F=document.createElement("div");v.appendChild(F);let M=document.createElement("input");M.type="button",M.value="Parent",M.className="cesium-cesiumInspector-pickButton",M.setAttribute("data-bind","click: selectParent");let b=document.createElement("input");b.type="button",b.value="NW",b.className="cesium-cesiumInspector-pickButton",b.setAttribute("data-bind","click: selectNW");let L=document.createElement("input");L.type="button",L.value="NE",L.className="cesium-cesiumInspector-pickButton",L.setAttribute("data-bind","click: selectNE");let E=document.createElement("input");E.type="button",E.value="SW",E.className="cesium-cesiumInspector-pickButton",E.setAttribute("data-bind","click: selectSW");let I=document.createElement("input");I.type="button",I.value="SE",I.className="cesium-cesiumInspector-pickButton",I.setAttribute("data-bind","click: selectSE");let w=document.createElement("div");w.className="cesium-cesiumInspector-tileText",F.className="cesium-cesiumInspector-frustumStatistics",F.appendChild(w),F.setAttribute("data-bind","visible: hasPickedTile"),w.setAttribute("data-bind","html: tileText");let N=document.createElement("div");N.className="cesium-cesiumInspector-relativeText",N.textContent="Select relative:",F.appendChild(N);let B=document.createElement("table"),k=document.createElement("tr"),O=document.createElement("tr"),U=document.createElement("td");U.appendChild(M);let J=document.createElement("td");J.appendChild(b);let z=document.createElement("td");z.appendChild(L),k.appendChild(U),k.appendChild(J),k.appendChild(z);let ee=document.createElement("td"),K=document.createElement("td");K.appendChild(E);let j=document.createElement("td");j.appendChild(I),O.appendChild(ee),O.appendChild(K),O.appendChild(j),B.appendChild(k),B.appendChild(O),F.appendChild(B),v.appendChild(c("Show bounding volume","tileBoundingSphere","hasPickedTile")),v.appendChild(c("Show only selected","filterTile","hasPickedTile")),W.appendChild(c("Wireframe","wireframe")),W.appendChild(c("Suspend LOD update","suspendUpdates")),W.appendChild(c("Show tile coordinates","tileCoordinates")),Ce.applyBindings(i,this._element)}Object.defineProperties(HB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});HB.prototype.isDestroyed=function(){return!1};HB.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),me(this)};var vA=HB;var hSo=S(T(),1);var sSo=S(T(),1);function fSt(e){return function(t){let n=e._scene.pick(t.position);l(n)&&n.primitive instanceof ra&&(e.tileset=n.primitive),e.pickActive=!1}}function bTe(e,t){t?e._eventHandler.setInputAction(function(n){let i=e._scene.pick(n.endPosition);l(i)&&i.primitive instanceof ra&&(e.tileset=i.primitive)},Sn.MOUSE_MOVE):(e._eventHandler.removeInputAction(Sn.MOUSE_MOVE),e.picking=e.picking)}var pSt={maximumFractionDigits:3};function wA(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,pSt):Math.round(t).toLocaleString()}function FA(e,t){if(!l(e))return"";let n=t?e._statisticsPerPass[Io.PICK]:e._statisticsPerPass[Io.RENDER],i='<ul class="cesium-cesiumInspector-statistics">';return i+=`<li><strong>Visited: </strong>${n.visited.toLocaleString()}</li><li><strong>Selected: </strong>${n.selected.toLocaleString()}</li><li><strong>Commands: </strong>${n.numberOfCommands.toLocaleString()}</li>`,i+="</ul>",t||(i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Requests: </strong>${n.numberOfPendingRequests.toLocaleString()}</li><li><strong>Attempted: </strong>${n.numberOfAttemptedRequests.toLocaleString()}</li><li><strong>Processing: </strong>${n.numberOfTilesProcessing.toLocaleString()}</li><li><strong>Content Ready: </strong>${n.numberOfTilesWithContentReady.toLocaleString()}</li><li><strong>Total: </strong>${n.numberOfTilesTotal.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Features Selected: </strong>${n.numberOfFeaturesSelected.toLocaleString()}</li><li><strong>Features Loaded: </strong>${n.numberOfFeaturesLoaded.toLocaleString()}</li><li><strong>Points Selected: </strong>${n.numberOfPointsSelected.toLocaleString()}</li><li><strong>Points Loaded: </strong>${n.numberOfPointsLoaded.toLocaleString()}</li><li><strong>Triangles Selected: </strong>${n.numberOfTrianglesSelected.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Tiles styled: </strong>${n.numberOfTilesStyled.toLocaleString()}</li><li><strong>Features styled: </strong>${n.numberOfFeaturesStyled.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Children Union Culled: </strong>${n.numberOfTilesCulledWithChildrenUnion.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Geometry Memory (MB): </strong>${wA(n.geometryByteLength)}</li><li><strong>Texture Memory (MB): </strong>${wA(n.texturesByteLength)}</li><li><strong>Batch Table Memory (MB): </strong>${wA(n.batchTableByteLength)}</li>`,i+="</ul>"),i}function gTe(){let e=Ui.statistics;return` <ul class="cesium-cesiumInspector-statistics"> - <li><strong>Geometry Memory (MB): </strong>${IA(e.geometryByteLength)}</li> - <li><strong>Texture Memory (MB): </strong>${IA(e.texturesByteLength)}</li> + <li><strong>Geometry Memory (MB): </strong>${wA(e.geometryByteLength)}</li> + <li><strong>Texture Memory (MB): </strong>${wA(e.texturesByteLength)}</li> </ul> - `}var xTt=[{text:"Highlight",value:Rl.HIGHLIGHT},{text:"Replace",value:Rl.REPLACE},{text:"Mix",value:Rl.MIX}],dSe=new Y(1,1,0,.4),_Tt=new Y,z3=new Y;function ga(e,t){let n=this,i=e.canvas;this._eventHandler=new Yd(i),this._scene=e,this._performanceContainer=t,this._canvas=i,this._performanceDisplay=new tb({container:t}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,Ce.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=Ce.observable({}),this.properties=[],Ce.defineProperty(this,"properties",function(){let k=[],J=n._properties();for(let H in J)J.hasOwnProperty(H)&&k.push(H);return k});let o=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return o()},set:function(k){o(k),l(n._tileset)&&(n._tileset.dynamicScreenSpaceError=k)}}),this.dynamicScreenSpaceError=!1;let r=Ce.observable();Ce.defineProperty(this,"colorBlendMode",{get:function(){return r()},set:function(k){r(k),l(n._tileset)&&(n._tileset.colorBlendMode=k,n._scene.requestRender())}}),this.colorBlendMode=Rl.HIGHLIGHT;let s=Ce.observable(),a=Ce.observable();Ce.defineProperty(this,"picking",{get:function(){return a()},set:function(k){a(k),k?n._eventHandler.setInputAction(function(J){let H=e.pick(J.endPosition);if(H instanceof Ws?(n.feature=H,n.tile=H.content.tile):l(H)&&l(H.content)?(n.feature=void 0,n.tile=H.content.tile):(n.feature=void 0,n.tile=void 0),!!l(n._tileset)){if(s&&l(H)&&l(H.content)){let ee;e.pickPositionSupported&&(ee=e.pickPosition(J.endPosition),l(ee)&&(n._tileset.debugPickPosition=ee)),n._tileset.debugPickedTile=H.content.tile}else n._tileset.debugPickedTile=void 0;n._scene.requestRender()}},Tn.MOUSE_MOVE):(n.feature=void 0,n.tile=void 0,n._eventHandler.removeInputAction(Tn.MOUSE_MOVE))}}),this.picking=!0;let c=Ce.observable();Ce.defineProperty(this,"colorize",{get:function(){return c()},set:function(k){c(k),l(n._tileset)&&(n._tileset.debugColorizeTiles=k,n._scene.requestRender())}}),this.colorize=!1;let d=Ce.observable();Ce.defineProperty(this,"wireframe",{get:function(){return d()},set:function(k){d(k),l(n._tileset)&&(n._tileset.debugWireframe=k,n._scene.requestRender())}}),this.wireframe=!1;let u=Ce.observable();Ce.defineProperty(this,"showBoundingVolumes",{get:function(){return u()},set:function(k){u(k),l(n._tileset)&&(n._tileset.debugShowBoundingVolume=k,n._scene.requestRender())}}),this.showBoundingVolumes=!1;let m=Ce.observable();Ce.defineProperty(this,"showContentBoundingVolumes",{get:function(){return m()},set:function(k){m(k),l(n._tileset)&&(n._tileset.debugShowContentBoundingVolume=k,n._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let p=Ce.observable();Ce.defineProperty(this,"showRequestVolumes",{get:function(){return p()},set:function(k){p(k),l(n._tileset)&&(n._tileset.debugShowViewerRequestVolume=k,n._scene.requestRender())}}),this.showRequestVolumes=!1;let g=Ce.observable();Ce.defineProperty(this,"freezeFrame",{get:function(){return g()},set:function(k){g(k),l(n._tileset)&&(n._tileset.debugFreezeFrame=k,n._scene.debugShowFrustumPlanes=k,n._scene.requestRender())}}),this.freezeFrame=!1,Ce.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return s()},set:function(k){s(k),l(n._tileset)&&(n._tileset.debugPickedTileLabelOnly=k,n._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;let f=Ce.observable();Ce.defineProperty(this,"showGeometricError",{get:function(){return f()},set:function(k){f(k),l(n._tileset)&&(n._tileset.debugShowGeometricError=k,n._scene.requestRender())}}),this.showGeometricError=!1;let x=Ce.observable();Ce.defineProperty(this,"showRenderingStatistics",{get:function(){return x()},set:function(k){x(k),l(n._tileset)&&(n._tileset.debugShowRenderingStatistics=k,n._scene.requestRender())}}),this.showRenderingStatistics=!1;let _=Ce.observable();Ce.defineProperty(this,"showMemoryUsage",{get:function(){return _()},set:function(k){_(k),l(n._tileset)&&(n._tileset.debugShowMemoryUsage=k,n._scene.requestRender())}}),this.showMemoryUsage=!1;let C=Ce.observable();Ce.defineProperty(this,"showUrl",{get:function(){return C()},set:function(k){C(k),l(n._tileset)&&(n._tileset.debugShowUrl=k,n._scene.requestRender())}}),this.showUrl=!1;let V=Ce.observable();Ce.defineProperty(this,"maximumScreenSpaceError",{get:function(){return V()},set:function(k){k=Number(k),isNaN(k)||(V(k),l(n._tileset)&&(n._tileset.maximumScreenSpaceError=k))}}),this.maximumScreenSpaceError=16;let L=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return L()},set:function(k){k=Number(k),isNaN(k)||(L(k),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=k))}}),this.dynamicScreenSpaceErrorDensity=2e-4,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,Ce.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(L(),1/6)},set:function(k){let J=Math.pow(k,6);L(J),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=J)}});let Z=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return Z()},set:function(k){k=Number(k),isNaN(k)||(Z(k),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorFactor=k))}}),this.dynamicScreenSpaceErrorFactor=24;let G=gTt(this),X=Ce.observable();Ce.defineProperty(this,"pickActive",{get:function(){return X()},set:function(k){X(k),k?n._eventHandler.setInputAction(G,Tn.LEFT_CLICK):n._eventHandler.removeInputAction(Tn.LEFT_CLICK)}});let v=Ce.observable();Ce.defineProperty(this,"pointCloudShading",{get:function(){return v()},set:function(k){v(k),l(n._tileset)&&(n._tileset.pointCloudShading.attenuation=k)}}),this.pointCloudShading=!1;let P=Ce.observable();Ce.defineProperty(this,"geometricErrorScale",{get:function(){return P()},set:function(k){k=Number(k),isNaN(k)||(P(k),l(n._tileset)&&(n._tileset.pointCloudShading.geometricErrorScale=k))}}),this.geometricErrorScale=1;let F=Ce.observable();Ce.defineProperty(this,"maximumAttenuation",{get:function(){return F()},set:function(k){k=Number(k),isNaN(k)||(F(k),l(n._tileset)&&(n._tileset.pointCloudShading.maximumAttenuation=k===0?void 0:k))}}),this.maximumAttenuation=0;let A=Ce.observable();Ce.defineProperty(this,"baseResolution",{get:function(){return A()},set:function(k){k=Number(k),isNaN(k)||(A(k),l(n._tileset)&&(n._tileset.pointCloudShading.baseResolution=k===0?void 0:k))}}),this.baseResolution=0;let b=Ce.observable();Ce.defineProperty(this,"eyeDomeLighting",{get:function(){return b()},set:function(k){b(k),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLighting=k)}}),this.eyeDomeLighting=!1;let R=Ce.observable();Ce.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return R()},set:function(k){k=Number(k),isNaN(k)||(R(k),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingStrength=k))}}),this.eyeDomeLightingStrength=1;let E=Ce.observable();Ce.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return E()},set:function(k){k=Number(k),isNaN(k)||(E(k),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingRadius=k))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;let I=Ce.observable();Ce.defineProperty(this,"skipLevelOfDetail",{get:function(){return I()},set:function(k){I(k),l(n._tileset)&&(n._tileset.skipLevelOfDetail=k)}}),this.skipLevelOfDetail=!0;let w=Ce.observable();Ce.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return w()},set:function(k){k=Number(k),isNaN(k)||(w(k),l(n._tileset)&&(n._tileset.skipScreenSpaceErrorFactor=k))}}),this.skipScreenSpaceErrorFactor=16;let N=Ce.observable();Ce.defineProperty(this,"baseScreenSpaceError",{get:function(){return N()},set:function(k){k=Number(k),isNaN(k)||(N(k),l(n._tileset)&&(n._tileset.baseScreenSpaceError=k))}}),this.baseScreenSpaceError=1024;let B=Ce.observable();Ce.defineProperty(this,"skipLevels",{get:function(){return B()},set:function(k){k=Number(k),isNaN(k)||(B(k),l(n._tileset)&&(n._tileset.skipLevels=k))}}),this.skipLevels=1;let U=Ce.observable();Ce.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return U()},set:function(k){U(k),l(n._tileset)&&(n._tileset.immediatelyLoadDesiredLevelOfDetail=k)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let O=Ce.observable();Ce.defineProperty(this,"loadSiblings",{get:function(){return O()},set:function(k){O(k),l(n._tileset)&&(n._tileset.loadSiblings=k)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()}),l(this._tileset)||uSe(this,!0)}Object.defineProperties(ga.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},resourceCacheStatisticsText:{get:function(){return this._resourceCacheStatisticsText}},colorBlendModes:{get:function(){return xTt}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,l(e)){this._properties(e.properties);let t=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],n=t.length;for(let o=0;o<n;++o){let r=t[o];this[r]=this[r]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings,this.hasEnabledWireframe=e._enableDebugWireframe;let i=e.pointCloudShading;this.pointCloudShading=i.attenuation,this.geometricErrorScale=i.geometricErrorScale,this.maximumAttenuation=i.maximumAttenuation?i.maximumAttenuation:0,this.baseResolution=i.baseResolution?i.baseResolution:0,this.eyeDomeLighting=i.eyeDomeLighting,this.eyeDomeLightingStrength=i.eyeDomeLightingStrength,this.eyeDomeLightingRadius=i.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=WA(e,!1),this._pickStatisticsText=WA(e,!0),this._resourceCacheStatisticsText=mSe(),uSe(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature===e)return;let t=this._feature;l(t)&&!t.content.isDestroyed()&&(!this.colorize&&l(this._style)?t.color=l(this._style.color)?this._style.color.evaluateColor(t,_Tt):Y.WHITE:t.color=z3,this._scene.requestRender()),l(e)&&(Y.clone(e.color,z3),e.color=dSe,this._scene.requestRender()),this._feature=e}},tile:{get:function(){return this._tile},set:function(e){if(this._tile===e)return;let t=this._tile;l(t)&&!t.isDestroyed()&&!s6(t.content)&&(t.color=z3,this._scene.requestRender()),l(e)&&!s6(e.content)&&(Y.clone(e.color,z3),e.color=dSe,this._scene.requestRender()),this._tile=e}}});function s6(e){if(!l(e))return!1;if(e.featuresLength>0)return!0;let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)if(!s6(t[i]))return!1;return!0}return!1}ga.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};ga.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};ga.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};ga.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};ga.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};ga.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};ga.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};ga.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};ga.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};ga.prototype.trimTilesCache=function(){l(this._tileset)&&this._tileset.trimLoadedTiles()};ga.prototype.compileStyle=function(){let e=this._tileset;if(!(!l(e)||this.styleString===JSON.stringify(e.style))){this._editorError="";try{this.styleString.length===0&&(this.styleString="{}"),this._style=new iS(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(t){this._editorError=t.toString()}this.feature=this._feature,this.tile=this._tile}};ga.prototype.styleEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,a=n.value.slice(i,o).split(` + `}var bSt=[{text:"Highlight",value:Zl.HIGHLIGHT},{text:"Replace",value:Zl.REPLACE},{text:"Mix",value:Zl.MIX}],pTe=new Y(1,1,0,.4),gSt=new Y,JB=new Y;function ya(e,t){let n=this,i=e.canvas;this._eventHandler=new Od(i),this._scene=e,this._performanceContainer=t,this._canvas=i,this._performanceDisplay=new jb({container:t}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,Ce.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=Ce.observable({}),this.properties=[],Ce.defineProperty(this,"properties",function(){let U=[],J=n._properties();for(let z in J)J.hasOwnProperty(z)&&U.push(z);return U});let o=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return o()},set:function(U){o(U),l(n._tileset)&&(n._tileset.dynamicScreenSpaceError=U)}}),this.dynamicScreenSpaceError=!1;let r=Ce.observable();Ce.defineProperty(this,"colorBlendMode",{get:function(){return r()},set:function(U){r(U),l(n._tileset)&&(n._tileset.colorBlendMode=U,n._scene.requestRender())}}),this.colorBlendMode=Zl.HIGHLIGHT;let s=Ce.observable(),a=Ce.observable();Ce.defineProperty(this,"picking",{get:function(){return a()},set:function(U){a(U),U?n._eventHandler.setInputAction(function(J){let z=e.pick(J.endPosition);if(z instanceof Ps?(n.feature=z,n.tile=z.content.tile):l(z)&&l(z.content)?(n.feature=void 0,n.tile=z.content.tile):(n.feature=void 0,n.tile=void 0),!!l(n._tileset)){if(s&&l(z)&&l(z.content)){let ee;e.pickPositionSupported&&(ee=e.pickPosition(J.endPosition),l(ee)&&(n._tileset.debugPickPosition=ee)),n._tileset.debugPickedTile=z.content.tile}else n._tileset.debugPickedTile=void 0;n._scene.requestRender()}},Sn.MOUSE_MOVE):(n.feature=void 0,n.tile=void 0,n._eventHandler.removeInputAction(Sn.MOUSE_MOVE))}}),this.picking=!0;let c=Ce.observable();Ce.defineProperty(this,"colorize",{get:function(){return c()},set:function(U){c(U),l(n._tileset)&&(n._tileset.debugColorizeTiles=U,n._scene.requestRender())}}),this.colorize=!1;let d=Ce.observable();Ce.defineProperty(this,"wireframe",{get:function(){return d()},set:function(U){d(U),l(n._tileset)&&(n._tileset.debugWireframe=U,n._scene.requestRender())}}),this.wireframe=!1;let u=Ce.observable();Ce.defineProperty(this,"showBoundingVolumes",{get:function(){return u()},set:function(U){u(U),l(n._tileset)&&(n._tileset.debugShowBoundingVolume=U,n._scene.requestRender())}}),this.showBoundingVolumes=!1;let m=Ce.observable();Ce.defineProperty(this,"showContentBoundingVolumes",{get:function(){return m()},set:function(U){m(U),l(n._tileset)&&(n._tileset.debugShowContentBoundingVolume=U,n._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let p=Ce.observable();Ce.defineProperty(this,"showRequestVolumes",{get:function(){return p()},set:function(U){p(U),l(n._tileset)&&(n._tileset.debugShowViewerRequestVolume=U,n._scene.requestRender())}}),this.showRequestVolumes=!1;let g=Ce.observable();Ce.defineProperty(this,"freezeFrame",{get:function(){return g()},set:function(U){g(U),l(n._tileset)&&(n._tileset.debugFreezeFrame=U,n._scene.debugShowFrustumPlanes=U,n._scene.requestRender())}}),this.freezeFrame=!1,Ce.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return s()},set:function(U){s(U),l(n._tileset)&&(n._tileset.debugPickedTileLabelOnly=U,n._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;let f=Ce.observable();Ce.defineProperty(this,"showGeometricError",{get:function(){return f()},set:function(U){f(U),l(n._tileset)&&(n._tileset.debugShowGeometricError=U,n._scene.requestRender())}}),this.showGeometricError=!1;let x=Ce.observable();Ce.defineProperty(this,"showRenderingStatistics",{get:function(){return x()},set:function(U){x(U),l(n._tileset)&&(n._tileset.debugShowRenderingStatistics=U,n._scene.requestRender())}}),this.showRenderingStatistics=!1;let _=Ce.observable();Ce.defineProperty(this,"showMemoryUsage",{get:function(){return _()},set:function(U){_(U),l(n._tileset)&&(n._tileset.debugShowMemoryUsage=U,n._scene.requestRender())}}),this.showMemoryUsage=!1;let C=Ce.observable();Ce.defineProperty(this,"showUrl",{get:function(){return C()},set:function(U){C(U),l(n._tileset)&&(n._tileset.debugShowUrl=U,n._scene.requestRender())}}),this.showUrl=!1;let V=Ce.observable();Ce.defineProperty(this,"maximumScreenSpaceError",{get:function(){return V()},set:function(U){U=Number(U),isNaN(U)||(V(U),l(n._tileset)&&(n._tileset.maximumScreenSpaceError=U))}}),this.maximumScreenSpaceError=16;let Z=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return Z()},set:function(U){U=Number(U),isNaN(U)||(Z(U),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=U))}}),this.dynamicScreenSpaceErrorDensity=2e-4,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,Ce.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(Z(),1/6)},set:function(U){let J=Math.pow(U,6);Z(J),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=J)}});let R=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return R()},set:function(U){U=Number(U),isNaN(U)||(R(U),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorFactor=U))}}),this.dynamicScreenSpaceErrorFactor=24;let G=fSt(this),W=Ce.observable();Ce.defineProperty(this,"pickActive",{get:function(){return W()},set:function(U){W(U),U?n._eventHandler.setInputAction(G,Sn.LEFT_CLICK):n._eventHandler.removeInputAction(Sn.LEFT_CLICK)}});let v=Ce.observable();Ce.defineProperty(this,"pointCloudShading",{get:function(){return v()},set:function(U){v(U),l(n._tileset)&&(n._tileset.pointCloudShading.attenuation=U)}}),this.pointCloudShading=!1;let P=Ce.observable();Ce.defineProperty(this,"geometricErrorScale",{get:function(){return P()},set:function(U){U=Number(U),isNaN(U)||(P(U),l(n._tileset)&&(n._tileset.pointCloudShading.geometricErrorScale=U))}}),this.geometricErrorScale=1;let F=Ce.observable();Ce.defineProperty(this,"maximumAttenuation",{get:function(){return F()},set:function(U){U=Number(U),isNaN(U)||(F(U),l(n._tileset)&&(n._tileset.pointCloudShading.maximumAttenuation=U===0?void 0:U))}}),this.maximumAttenuation=0;let M=Ce.observable();Ce.defineProperty(this,"baseResolution",{get:function(){return M()},set:function(U){U=Number(U),isNaN(U)||(M(U),l(n._tileset)&&(n._tileset.pointCloudShading.baseResolution=U===0?void 0:U))}}),this.baseResolution=0;let b=Ce.observable();Ce.defineProperty(this,"eyeDomeLighting",{get:function(){return b()},set:function(U){b(U),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLighting=U)}}),this.eyeDomeLighting=!1;let L=Ce.observable();Ce.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return L()},set:function(U){U=Number(U),isNaN(U)||(L(U),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingStrength=U))}}),this.eyeDomeLightingStrength=1;let E=Ce.observable();Ce.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return E()},set:function(U){U=Number(U),isNaN(U)||(E(U),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingRadius=U))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;let I=Ce.observable();Ce.defineProperty(this,"skipLevelOfDetail",{get:function(){return I()},set:function(U){I(U),l(n._tileset)&&(n._tileset.skipLevelOfDetail=U)}}),this.skipLevelOfDetail=!0;let w=Ce.observable();Ce.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return w()},set:function(U){U=Number(U),isNaN(U)||(w(U),l(n._tileset)&&(n._tileset.skipScreenSpaceErrorFactor=U))}}),this.skipScreenSpaceErrorFactor=16;let N=Ce.observable();Ce.defineProperty(this,"baseScreenSpaceError",{get:function(){return N()},set:function(U){U=Number(U),isNaN(U)||(N(U),l(n._tileset)&&(n._tileset.baseScreenSpaceError=U))}}),this.baseScreenSpaceError=1024;let B=Ce.observable();Ce.defineProperty(this,"skipLevels",{get:function(){return B()},set:function(U){U=Number(U),isNaN(U)||(B(U),l(n._tileset)&&(n._tileset.skipLevels=U))}}),this.skipLevels=1;let k=Ce.observable();Ce.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return k()},set:function(U){k(U),l(n._tileset)&&(n._tileset.immediatelyLoadDesiredLevelOfDetail=U)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let O=Ce.observable();Ce.defineProperty(this,"loadSiblings",{get:function(){return O()},set:function(U){O(U),l(n._tileset)&&(n._tileset.loadSiblings=U)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()}),l(this._tileset)||bTe(this,!0)}Object.defineProperties(ya.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},resourceCacheStatisticsText:{get:function(){return this._resourceCacheStatisticsText}},colorBlendModes:{get:function(){return bSt}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,l(e)){this._properties(e.properties);let t=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],n=t.length;for(let o=0;o<n;++o){let r=t[o];this[r]=this[r]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings,this.hasEnabledWireframe=e._enableDebugWireframe;let i=e.pointCloudShading;this.pointCloudShading=i.attenuation,this.geometricErrorScale=i.geometricErrorScale,this.maximumAttenuation=i.maximumAttenuation?i.maximumAttenuation:0,this.baseResolution=i.baseResolution?i.baseResolution:0,this.eyeDomeLighting=i.eyeDomeLighting,this.eyeDomeLightingStrength=i.eyeDomeLightingStrength,this.eyeDomeLightingRadius=i.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=FA(e,!1),this._pickStatisticsText=FA(e,!0),this._resourceCacheStatisticsText=gTe(),bTe(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature===e)return;let t=this._feature;l(t)&&!t.content.isDestroyed()&&(!this.colorize&&l(this._style)?t.color=l(this._style.color)?this._style.color.evaluateColor(t,gSt):Y.WHITE:t.color=JB,this._scene.requestRender()),l(e)&&(Y.clone(e.color,JB),e.color=pTe,this._scene.requestRender()),this._feature=e}},tile:{get:function(){return this._tile},set:function(e){if(this._tile===e)return;let t=this._tile;l(t)&&!t.isDestroyed()&&!s6(t.content)&&(t.color=JB,this._scene.requestRender()),l(e)&&!s6(e.content)&&(Y.clone(e.color,JB),e.color=pTe,this._scene.requestRender()),this._tile=e}}});function s6(e){if(!l(e))return!1;if(e.featuresLength>0)return!0;let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)if(!s6(t[i]))return!1;return!0}return!1}ya.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};ya.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};ya.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};ya.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};ya.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};ya.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};ya.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};ya.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};ya.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};ya.prototype.trimTilesCache=function(){l(this._tileset)&&this._tileset.trimLoadedTiles()};ya.prototype.compileStyle=function(){let e=this._tileset;if(!(!l(e)||this.styleString===JSON.stringify(e.style))){this._editorError="";try{this.styleString.length===0&&(this.styleString="{}"),this._style=new nT(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(t){this._editorError=t.toString()}this.feature=this._feature,this.tile=this._tile}};ya.prototype.styleEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,a=n.value.slice(i,o).split(` `),c=a.length,d;if(t.shiftKey)for(d=0;d<c;++d)a[d][0]===" "&&(a[d][1]===" "?(a[d]=a[d].substr(2),r-=2):(a[d]=a[d].substr(1),r-=1));else for(d=0;d<c;++d)a[d]=` ${a[d]}`,r+=2;let u=a.join(` -`);n.value=n.value.slice(0,i)+u+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileStyle();return!0};ga.prototype._update=function(){let e=this._tileset;if(this.performance&&this._performanceDisplay.update(),l(e)){if(e.isDestroyed()){this.tile=void 0,this.feature=void 0,this.tileset=void 0;return}let t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=WA(e,!1),this._pickStatisticsText=WA(e,!0),this._resourceCacheStatisticsText=mSe())};ga.prototype.isDestroyed=function(){return!1};ga.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let e=this;return this._definedProperties.forEach(function(t){Ce.getObservable(e,t).dispose()}),me(this)};ga.getStatistics=WA;var PA=ga;function K3(e,t){e=In(e);let n=document.createElement("div"),i=document.createElement("div");i.setAttribute("data-bind","visible: performance");let o=new PA(t,i);this._viewModel=o,this._container=e,this._element=n;let r=document.createElement("div");r.textContent="3D Tiles Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleInspector"),n.appendChild(r),n.className="cesium-cesiumInspector cesium-3DTilesInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let s=document.createElement("div");s.className="cesium-cesiumInspector-dropDown",n.appendChild(s);let a=Ma.createSection,c=Ma.createCheckbox,d=Ma.createRangeInput,u=Ma.createButton,m=a(s,"Tileset","tilesetVisible","toggleTileset"),p=a(s,"Display","displayVisible","toggleDisplay"),g=a(s,"Update","updateVisible","toggleUpdate"),f=a(s,"Logging","loggingVisible","toggleLogging"),x=a(s,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),_=a(s,"Style","styleVisible","toggleStyle"),C=a(s,"Optimization","optimizationVisible","toggleOptimization"),V=document.createElement("div");V.className="field-group";let L=document.createElement("label");L.className="field-label",L.appendChild(document.createTextNode("Properties: "));let Z=document.createElement("div");Z.setAttribute("data-bind","text: properties"),V.appendChild(L),V.appendChild(Z),m.appendChild(V),m.appendChild(u("Pick Tileset","togglePickTileset","pickActive")),m.appendChild(u("Trim Tiles Cache","trimTilesCache")),m.appendChild(c("Enable Picking","picking")),p.appendChild(c("Colorize","colorize"));let G=p.appendChild(c("Wireframe","wireframe","_tileset === undefined || hasEnabledWireframe")),X=document.createElement("p");X.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),X.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),X.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",G.appendChild(X),p.appendChild(c("Bounding Volumes","showBoundingVolumes")),p.appendChild(c("Content Volumes","showContentBoundingVolumes")),p.appendChild(c("Request Volumes","showRequestVolumes")),p.appendChild(c("Point Cloud Shading","pointCloudShading"));let v=document.createElement("div");v.setAttribute("data-bind","visible: pointCloudShading"),v.appendChild(d("Geometric Error Scale","geometricErrorScale",0,2,.01)),v.appendChild(d("Maximum Attenuation","maximumAttenuation",0,32,1)),v.appendChild(d("Base Resolution","baseResolution",0,1,.01)),v.appendChild(c("Eye Dome Lighting (EDL)","eyeDomeLighting")),p.appendChild(v);let P=document.createElement("div");P.setAttribute("data-bind","visible: eyeDomeLighting"),P.appendChild(d("EDL Strength","eyeDomeLightingStrength",0,2,.1)),P.appendChild(d("EDL Radius","eyeDomeLightingRadius",0,4,.1)),v.appendChild(P),g.appendChild(c("Freeze Frame","freezeFrame")),g.appendChild(c("Dynamic Screen Space Error","dynamicScreenSpaceError"));let F=document.createElement("div");F.appendChild(d("Maximum Screen Space Error","maximumScreenSpaceError",0,128,1)),g.appendChild(F);let A=document.createElement("div");A.setAttribute("data-bind","visible: dynamicScreenSpaceError"),A.appendChild(d("Screen Space Error Density","dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"dynamicScreenSpaceErrorDensity")),A.appendChild(d("Screen Space Error Factor","dynamicScreenSpaceErrorFactor",1,32,.1)),g.appendChild(A),f.appendChild(c("Performance","performance")),f.appendChild(i),f.appendChild(c("Statistics","showStatistics"));let b=document.createElement("div");b.className="cesium-3dTilesInspector-statistics",b.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),f.appendChild(b),f.appendChild(c("Pick Statistics","showPickStatistics"));let R=document.createElement("div");R.className="cesium-3dTilesInspector-statistics",R.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),f.appendChild(R),f.appendChild(c("Resource Cache Statistics","showResourceCacheStatistics"));let E=document.createElement("div");E.className="cesium-3dTilesInspector-statistics",E.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),f.appendChild(E);let I=document.createElement("div");_.appendChild(I),I.appendChild(document.createTextNode("Color Blend Mode: "));let w=document.createElement("select");w.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),I.appendChild(w);let N=document.createElement("textarea");N.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),I.className="cesium-cesiumInspector-styleEditor",I.appendChild(N);let B=u("Compile (Ctrl+Enter)","compileStyle");I.appendChild(B);let U=document.createElement("div");U.className="cesium-cesiumInspector-error",U.setAttribute("data-bind","text: editorError"),I.appendChild(U),x.appendChild(c("Show Picked Only","showOnlyPickedTileDebugLabel")),x.appendChild(c("Geometric Error","showGeometricError")),x.appendChild(c("Rendering Statistics","showRenderingStatistics")),x.appendChild(c("Memory Usage (MB)","showMemoryUsage")),x.appendChild(c("Url","showUrl")),C.appendChild(c("Skip Tile LODs","skipLevelOfDetail"));let O=document.createElement("div");O.appendChild(d("Skip SSE Factor","skipScreenSpaceErrorFactor",1,50,1)),C.appendChild(O);let k=document.createElement("div");k.appendChild(d("SSE before skipping LOD","baseScreenSpaceError",0,4096,1)),C.appendChild(k);let J=document.createElement("div");J.appendChild(d("Min. levels to skip","skipLevels",0,10,1)),C.appendChild(J),C.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),C.appendChild(c("Load siblings of visible tiles","loadSiblings")),Ce.applyBindings(o,n)}Object.defineProperties(K3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});K3.prototype.isDestroyed=function(){return!1};K3.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),me(this)};var vA=K3;var uTo=T(S(),1);var iTo=T(S(),1);function TTt(e){let t;if(l(e)){t="Command Statistics";let n=e.commandsInFrustums;for(let i in n)if(n.hasOwnProperty(i)){let o=parseInt(i,10),r;if(o===7)r="1, 2 and 3";else{let s=[];for(let a=2;a>=0;a--){let c=Math.pow(2,a);o>=c&&(s.push(a+1),o-=c)}r=s.reverse().join(" and ")}t+=`<br>    ${n[i]} in frustum ${r}`}t+=`<br>Total: ${e.totalCommands}`}return t}function a6(e,t,n){let i=Math.min(n,t);return i=Math.max(i,e),i}var STt=new pn,CTt=new h;function wA(e,t){let n=this,i=e.canvas,o=new Yd(i);this._eventHandler=o,this._scene=e,this._canvas=i,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;let r=this._scene.globe;r.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",Ce.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=Vn(function(){n.dropDownVisible=!n.dropDownVisible}),this._toggleGeneral=Vn(function(){n.generalVisible=!n.generalVisible}),this._togglePrimitives=Vn(function(){n.primitivesVisible=!n.primitivesVisible}),this._toggleTerrain=Vn(function(){n.terrainVisible=!n.terrainVisible}),this._frustumsSubscription=Ce.getObservable(this,"frustums").subscribe(function(d){n._scene.debugShowFrustums=d,n._scene.requestRender()}),this._frustumPlanesSubscription=Ce.getObservable(this,"frustumPlanes").subscribe(function(d){n._scene.debugShowFrustumPlanes=d,n._scene.requestRender()}),this._performanceSubscription=Ce.getObservable(this,"performance").subscribe(function(d){d?n._performanceDisplay=new tb({container:n._performanceContainer}):n._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=Vn(function(){return n._primitive.debugShowBoundingVolume=n.primitiveBoundingSphere,n._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=Ce.getObservable(this,"primitiveBoundingSphere").subscribe(function(){n._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=Vn(function(){if(n.primitiveReferenceFrame){let d=n._primitive.modelMatrix;n._modelMatrixPrimitive=new Q9({modelMatrix:d}),n._scene.primitives.add(n._modelMatrixPrimitive)}else l(n._modelMatrixPrimitive)&&(n._scene.primitives.remove(n._modelMatrixPrimitive),n._modelMatrixPrimitive=void 0);return n._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=Ce.getObservable(this,"primitiveReferenceFrame").subscribe(function(){n._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=Vn(function(){return n.filterPrimitive?n._scene.debugCommandFilter=function(d){return l(n._modelMatrixPrimitive)&&d.owner===n._modelMatrixPrimitive._primitive?!0:l(n._primitive)?d.owner===n._primitive||d.owner===n._primitive._billboardCollection||d.owner.primitive===n._primitive:!1}:n._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=Ce.getObservable(this,"filterPrimitive").subscribe(function(){n._doFilterPrimitive(),n._scene.requestRender()}),this._wireframeSubscription=Ce.getObservable(this,"wireframe").subscribe(function(d){r._surface.tileProvider._debug.wireframe=d,n._scene.requestRender()}),this._depthFrustumSubscription=Ce.getObservable(this,"depthFrustum").subscribe(function(d){n._scene.debugShowDepthFrustum=d,n._scene.requestRender()}),this._incrementDepthFrustum=Vn(function(){let d=n.depthFrustum+1;return n.depthFrustum=a6(1,n._numberOfFrustums,d),n._scene.requestRender(),!0}),this._decrementDepthFrustum=Vn(function(){let d=n.depthFrustum-1;return n.depthFrustum=a6(1,n._numberOfFrustums,d),n._scene.requestRender(),!0}),this._suspendUpdatesSubscription=Ce.getObservable(this,"suspendUpdates").subscribe(function(d){r._surface._debug.suspendLodUpdate=d,d||(n.filterTile=!1)});let s;this._showTileCoordinates=Vn(function(){return n.tileCoordinates&&!l(s)?s=e.imageryLayers.addImageryProvider(new pA({tilingScheme:e.terrainProvider.tilingScheme})):!n.tileCoordinates&&l(s)&&(e.imageryLayers.remove(s),s=void 0),!0}),this._tileCoordinatesSubscription=Ce.getObservable(this,"tileCoordinates").subscribe(function(){n._showTileCoordinates(),n._scene.requestRender()}),this._tileBoundingSphereSubscription=Ce.getObservable(this,"tileBoundingSphere").subscribe(function(){n._showTileBoundingSphere(),n._scene.requestRender()}),this._showTileBoundingSphere=Vn(function(){return n.tileBoundingSphere?r._surface.tileProvider._debug.boundingSphereTile=n._tile:r._surface.tileProvider._debug.boundingSphereTile=void 0,n._scene.requestRender(),!0}),this._doFilterTile=Vn(function(){return n.filterTile?(n.suspendUpdates=!0,r._surface._tilesToRender=[],l(n._tile)&&n._tile.renderable&&r._surface._tilesToRender.push(n._tile)):n.suspendUpdates=!1,!0}),this._filterTileSubscription=Ce.getObservable(this,"filterTile").subscribe(function(){n.doFilterTile(),n._scene.requestRender()});function a(d){let u=n._scene.pick({x:d.position.x,y:d.position.y});l(u)&&(n.primitive=l(u.collection)?u.collection:u.primitive),n._scene.requestRender(),n.pickPrimitiveActive=!1}this._pickPrimitive=Vn(function(){n.pickPrimitiveActive=!n.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=Ce.getObservable(this,"pickPrimitiveActive").subscribe(function(d){d?o.setInputAction(a,Tn.LEFT_CLICK):o.removeInputAction(Tn.LEFT_CLICK)});function c(d){let u,m=r.ellipsoid,p=n._scene.camera.getPickRay(d.position,STt),g=r.pick(p,n._scene,CTt);if(l(g)){let f=m.cartesianToCartographic(g),x=r._surface.tileProvider._tilesToRenderByTextureCount;for(let _=0;!u&&_<x.length;++_){let C=x[_];if(l(C))for(let V=0;!u&&V<C.length;++V){let L=C[V];ce.contains(L.rectangle,f)&&(u=L)}}}n.tile=u,n.pickTileActive=!1}this._pickTile=Vn(function(){n.pickTileActive=!n.pickTileActive}),this._pickTileActiveSubscription=Ce.getObservable(this,"pickTileActive").subscribe(function(d){d?o.setInputAction(c,Tn.LEFT_CLICK):o.removeInputAction(Tn.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()})}Object.defineProperties(wA.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){let e=this;return Vn(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){let e=this;return Vn(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){let e=this;return Vn(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){let e=this;return Vn(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){let e=this;return Vn(function(){e.tile=e.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(e){let t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,l(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,l(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout(function(){e.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(l(e)){this.hasPickedTile=!0;let t=this._tile;if(e!==t){this.tileText=`L: ${e.level} X: ${e.x} Y: ${e.y}`,this.tileText+=`<br>SW corner: ${e.rectangle.west}, ${e.rectangle.south}`,this.tileText+=`<br>NE corner: ${e.rectangle.east}, ${e.rectangle.north}`;let n=e.data;l(n)&&l(n.tileBoundingRegion)?this.tileText+=`<br>Min: ${n.tileBoundingRegion.minimumHeight} Max: ${n.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}});wA.prototype._update=function(){this.frustums&&(this.frustumStatisticText=TTt(this._scene.debugFrustumStatistics));let e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=a6(1,e,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${e}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`};wA.prototype.isDestroyed=function(){return!1};wA.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),me(this)};var FA=wA;function J3(e,t){e=In(e);let n=document.createElement("div"),i=new FA(t,n);this._viewModel=i,this._container=e;let o=document.createElement("div");this._element=o;let r=document.createElement("div");r.textContent="Cesium Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleDropDown"),o.appendChild(r),o.className="cesium-cesiumInspector",o.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);let s=document.createElement("div");s.className="cesium-cesiumInspector-dropDown",o.appendChild(s);let a=Ma.createSection,c=Ma.createCheckbox,d=a(s,"General","generalVisible","toggleGeneral"),u=c("Show Frustums","frustums"),m=document.createElement("div");m.className="cesium-cesiumInspector-frustumStatistics",m.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),u.appendChild(m),d.appendChild(u),d.appendChild(c("Show Frustum Planes","frustumPlanes")),d.appendChild(c("Performance Display","performance")),n.className="cesium-cesiumInspector-performanceDisplay",d.appendChild(n);let p=document.createElement("div");p.className="cesium-cesiumInspector-shaderCache",p.setAttribute("data-bind","html: shaderCacheText"),d.appendChild(p);let g=document.createElement("div");d.appendChild(g);let f=document.createElement("span");f.setAttribute("data-bind",'html: "     Frustum:"'),g.appendChild(f);let x=document.createElement("span");x.setAttribute("data-bind","text: depthFrustumText"),g.appendChild(x);let _=document.createElement("input");_.type="button",_.value="-",_.className="cesium-cesiumInspector-pickButton",_.setAttribute("data-bind","click: decrementDepthFrustum"),g.appendChild(_);let C=document.createElement("input");C.type="button",C.value="+",C.className="cesium-cesiumInspector-pickButton",C.setAttribute("data-bind","click: incrementDepthFrustum"),g.appendChild(C);let V=a(s,"Primitives","primitivesVisible","togglePrimitives"),L=document.createElement("div");L.className="cesium-cesiumInspector-pickSection",V.appendChild(L);let Z=document.createElement("input");Z.type="button",Z.value="Pick a primitive",Z.className="cesium-cesiumInspector-pickButton",Z.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let G=document.createElement("div");G.className="cesium-cesiumInspector-center",G.appendChild(Z),L.appendChild(G),L.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),L.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),L.appendChild(this._primitiveOnly);let X=a(s,"Terrain","terrainVisible","toggleTerrain"),v=document.createElement("div");v.className="cesium-cesiumInspector-pickSection",X.appendChild(v);let P=document.createElement("input");P.type="button",P.value="Pick a tile",P.className="cesium-cesiumInspector-pickButton",P.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),G=document.createElement("div"),G.appendChild(P),G.className="cesium-cesiumInspector-center",v.appendChild(G);let F=document.createElement("div");v.appendChild(F);let A=document.createElement("input");A.type="button",A.value="Parent",A.className="cesium-cesiumInspector-pickButton",A.setAttribute("data-bind","click: selectParent");let b=document.createElement("input");b.type="button",b.value="NW",b.className="cesium-cesiumInspector-pickButton",b.setAttribute("data-bind","click: selectNW");let R=document.createElement("input");R.type="button",R.value="NE",R.className="cesium-cesiumInspector-pickButton",R.setAttribute("data-bind","click: selectNE");let E=document.createElement("input");E.type="button",E.value="SW",E.className="cesium-cesiumInspector-pickButton",E.setAttribute("data-bind","click: selectSW");let I=document.createElement("input");I.type="button",I.value="SE",I.className="cesium-cesiumInspector-pickButton",I.setAttribute("data-bind","click: selectSE");let w=document.createElement("div");w.className="cesium-cesiumInspector-tileText",F.className="cesium-cesiumInspector-frustumStatistics",F.appendChild(w),F.setAttribute("data-bind","visible: hasPickedTile"),w.setAttribute("data-bind","html: tileText");let N=document.createElement("div");N.className="cesium-cesiumInspector-relativeText",N.textContent="Select relative:",F.appendChild(N);let B=document.createElement("table"),U=document.createElement("tr"),O=document.createElement("tr"),k=document.createElement("td");k.appendChild(A);let J=document.createElement("td");J.appendChild(b);let H=document.createElement("td");H.appendChild(R),U.appendChild(k),U.appendChild(J),U.appendChild(H);let ee=document.createElement("td"),z=document.createElement("td");z.appendChild(E);let j=document.createElement("td");j.appendChild(I),O.appendChild(ee),O.appendChild(z),O.appendChild(j),B.appendChild(U),B.appendChild(O),F.appendChild(B),v.appendChild(c("Show bounding volume","tileBoundingSphere","hasPickedTile")),v.appendChild(c("Show only selected","filterTile","hasPickedTile")),X.appendChild(c("Wireframe","wireframe")),X.appendChild(c("Suspend LOD update","suspendUpdates")),X.appendChild(c("Show tile coordinates","tileCoordinates")),Ce.applyBindings(i,this._element)}Object.defineProperties(J3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});J3.prototype.isDestroyed=function(){return!1};J3.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),me(this)};var AA=J3;var VTo=T(S(),1);var gTo=T(S(),1);function Q3(e,t){l(t)||(t=document.body),t=In(t);let n=this,i=Ce.observable(ur.fullscreen),o=Ce.observable(ur.enabled),r=t.ownerDocument;this.isFullscreen=void 0,Ce.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,Ce.defineProperty(this,"isFullscreenEnabled",{get:function(){return o()},set:function(s){o(s&&ur.enabled)}}),this.tooltip=void 0,Ce.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Vn(function(){ur.fullscreen?ur.exitFullscreen():ur.requestFullscreen(n._fullscreenElement)},Ce.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=y(In(e),r.body),this._callback=function(){i(ur.fullscreen)},r.addEventListener(ur.changeEventName,this._callback)}Object.defineProperties(Q3.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}});Q3.prototype.isDestroyed=function(){return!1};Q3.prototype.destroy=function(){document.removeEventListener(ur.changeEventName,this._callback),me(this)};var MA=Q3;var VTt="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",LTt="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function j3(e,t){e=In(e);let n=new MA(t,e);n._exitFullScreenPath=LTt,n._enterFullScreenPath=VTt;let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-fullscreenButton",i.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(i),Ce.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(j3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});j3.prototype.isDestroyed=function(){return!1};j3.prototype.destroy=function(){return this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var NA=j3;var ATo=T(S(),1);var XTo=T(S(),1);var hSe=1e3;function cm(e){l(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new ew({scene:e.scene})],this._viewContainer=e.container,this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._wasGeocodeCancelled=!1,this._previousCredits=[],this._complete=new ge,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=pSe,this._handleArrowUp=fSe;let t=this;this._suggestionsVisible=Ce.pureComputed(function(){let o=Ce.getObservable(t,"_suggestions")().length>0,r=Ce.getObservable(t,"_showSuggestions")();return o&&r}),this._searchCommand=Vn(function(i){if(i=y(i,py.SEARCH),t._focusTextbox=!1,l(t._selectedSuggestion))return t.activateSuggestion(t._selectedSuggestion),!1;if(t.hideSuggestions(),t.isSearchInProgress)ITt(t);else return ETt(t,t._geocoderServices,i)}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38;return(r||s)&&o.preventDefault(),!0},this.handleKeyUp=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38,a=o.key==="Enter"||o.keyCode===13;return s?fSe(t):r?pSe(t):a&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;let o=i.destination;ySe(t),t.destinationFound(t,o)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(i,o){i!==t._selectedSuggestion&&(t._selectedSuggestion=i)},this.keepExpanded=!1,this.autoComplete=y(e.autocomplete,!0),this.destinationFound=y(e.destinationFound,cm.flyToDestination),this._focusTextbox=!1,Ce.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let n=Ce.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){cm._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,Ce.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,Ce.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){this._searchText=i}}),this.flightDuration=void 0,Ce.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){this._flightDuration=i}})}Object.defineProperties(cm.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}});cm.prototype.destroy=function(){this._suggestionSubscription.dispose()};function fSe(e){if(e._suggestions.length===0)return;let t=e._suggestions.indexOf(e._selectedSuggestion);if(t===-1||t===0){e._selectedSuggestion=void 0;return}let n=t-1;e._selectedSuggestion=e._suggestions[n],cm._adjustSuggestionsScroll(e,n)}function pSe(e){if(e._suggestions.length===0)return;let t=e._suggestions.length,i=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t;e._selectedSuggestion=e._suggestions[i],cm._adjustSuggestionsScroll(e,i)}function RTt(e,t){let n=l(t)?t.availability:void 0;return l(n)?RT(t,[e]).then(function(i){return e=i[0],e.height+=hSe,e}):(e.height+=hSe,Promise.resolve(e))}function ZTt(e,t){let n=e._scene,o=n.mapProjection.ellipsoid,r=n.camera,s=n.terrainProvider,a=t,c;return t instanceof ce?W.equalsEpsilon(t.south,t.north,W.EPSILON7)&&W.equalsEpsilon(t.east,t.west,W.EPSILON7)?t=ce.center(t):c=hS(t,n):t=o.cartesianToCartographic(t),l(c)||(c=RTt(t,s)),c.then(function(d){a=o.cartographicToCartesian(d)}).finally(function(){r.flyTo({destination:a,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:M.IDENTITY})})}async function GTt(e,t,n){try{return{state:"fulfilled",value:await e.geocode(t,n),credits:e.credit}}catch(i){return{state:"rejected",reason:i}}}async function ETt(e,t,n){let i=e._searchText;if(gSe(i)){e.showSuggestions();return}e._isSearchInProgress=!0,e._wasGeocodeCancelled=!1;let o,r;for(o=0;o<t.length;o++){if(e._wasGeocodeCancelled)return;if(r=await GTt(t[o],i,n),l(r)&&r.state==="fulfilled"&&r.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,l6(e);let s=r.value;if(r.state==="fulfilled"&&l(s)&&s.length>0){e._searchText=s[0].displayName,e.destinationFound(e,s[0].destination);let a=bSe(e,GV.getCreditsFromResult(s[0]));l(a)||c6(e,t[o].credit);return}e._searchText=`${i} (not found)`}function c6(e,t){l(t)&&!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function bSe(e,t){return l(t)&&t.forEach(n=>c6(e,n)),t}function l6(e){!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function XTt(e,t){let n=In(e._viewContainer),i=n.getElementsByClassName("search-results")[0],r=n.getElementsByTagName("li")[t];if(t===0){i.scrollTop=0;return}let s=r.offsetTop;s+r.clientHeight>i.clientHeight?i.scrollTop=s+r.clientHeight:s<i.scrollTop&&(i.scrollTop=s)}function ITt(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}function gSe(e){return/^\s*$/.test(e)}function ySe(e){Ce.getObservable(e,"_suggestions").removeAll()}async function WTt(e){if(!e.autoComplete)return;let t=e._searchText;if(ySe(e),l6(e),!gSe(t))for(let n of e._geocoderServices){let i=await n.geocode(t,py.AUTOCOMPLETE);if(e._suggestions=e._suggestions.concat(i),i.length>0){let o=!0;i.forEach(r=>{let s=GV.getCreditsFromResult(r);o=o&&!l(s),bSe(e,s)}),o&&c6(e,n.credit)}if(e._suggestions.length>=5)return}}cm.flyToDestination=ZTt;cm._updateSearchSuggestions=WTt;cm._adjustSuggestionsScroll=XTt;cm.prototype.isDestroyed=function(){return!1};cm.prototype.destroy=function(){return l6(this),me(this)};var kA=cm;var PTt="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",vTt="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function q3(e){let t=In(e.container),n=new kA(e);n._startSearchPath=PTt,n._stopSearchPath=vTt;let i=document.createElement("form");i.setAttribute("data-bind","submit: search");let o=document.createElement("input");o.type="search",o.className="cesium-geocoder-input",o.setAttribute("placeholder","Enter an address or landmark..."),o.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){o.select()},0)},o.addEventListener("focus",this._onTextBoxFocus,!1),i.appendChild(o),this._textBox=o;let r=document.createElement("span");r.className="cesium-geocoder-searchButton",r.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),i.appendChild(r),t.appendChild(i);let s=document.createElement("div");s.className="search-results",s.setAttribute("data-bind","visible: _suggestionsVisible");let a=document.createElement("ul");a.setAttribute("data-bind","foreach: _suggestions");let c=document.createElement("li");a.appendChild(c),c.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),s.appendChild(a),t.appendChild(s),Ce.applyBindings(n,i),Ce.applyBindings(n,s),this._container=t,this._searchSuggestionsContainer=s,this._viewModel=n,this._form=i,this._onInputBegin=function(d){let u=d.target;typeof d.composedPath=="function"&&(u=d.composedPath()[0]),t.contains(u)||(n._focusTextbox=!1,n.hideSuggestions())},this._onInputEnd=function(d){n._focusTextbox=!0,n.showSuggestions()},Yt.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),t.addEventListener("pointerup",this._onInputEnd,!0),t.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),t.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),t.addEventListener("touchend",this._onInputEnd,!0),t.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties(q3.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});q3.prototype.isDestroyed=function(){return!1};q3.prototype.destroy=function(){let e=this._container;return Yt.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),e.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),e.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),e.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),Ce.cleanNode(this._form),Ce.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),me(this)};var UA=q3;var KTo=T(S(),1);var UTo=T(S(),1);function xSe(e,t){this._scene=e,this._duration=t;let n=this;this._command=Vn(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",Ce.track(this,["tooltip"])}Object.defineProperties(xSe.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}}});var DA=xSe;function $3(e,t,n){e=In(e);let i=new DA(t,n);i._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-home-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(o),Ce.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties($3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});$3.prototype.isDestroyed=function(){return!1};$3.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var BA=$3;var oSo=T(S(),1);var qTo=T(S(),1);function wTt(e,t){t.currentTarget.parentElement.parentElement.querySelector(`#${e.name}-expander`).classList.toggle("active"),t.currentTarget.textContent=t.currentTarget.textContent==="+"?"-":"+"}function TSe(e,t){Ce.track(e);for(let n=0;n<e.sublayers.length;n++)TSe(e.sublayers[n],t)}function eB(e){return e.modelName==="FullModel"}function SSe(e){return e.modelName==="Overview"}function CSe(e){return SSe(e)||eB(e)}function _Se(e,t){if(CSe(e)){e.visibility=!1;for(let i=0;i<e.sublayers.length;i++)e.sublayers[i].visibility=!0;let n={name:e.name,modelName:e.modelName,disable:Ce.observable(!1),index:t.sublayers.length};return t.topLayers.push(n),t.sublayers.push(e),n}}function FTt(e,t){if(CSe(e)){t.sublayers.forEach(i=>i.visibility=!1),t.sublayers[e.index].visibility=!0;let n=document.getElementById("bsl-wrapper");eB(e)?(t.currentLevel=t.selectedLevel,n.style.display="block"):(t.selectedLevel=t.currentLevel,t.currentLevel="All",n.style.display="none")}}async function ATt(e,t){try{let n=e.getAttributeNames();for(let i=0;i<n.length;i++)if(n[i]==="BldgLevel"){let o=e.getAttributeValues(n[i]);for(let r=0;r<o.length;r++)t.push(o[r])}t.sort((i,o)=>i-o),t.unshift("All")}catch(n){console.log(`There was an error getting attributes: ${n}`)}}function MTt(e){let t=this;this.levels=[],this.viewModel={sublayers:[],levels:this.levels,currentLevel:Ce.observable(),selectedLevel:"All",topLayers:[{name:"Select a layer to explore...",disable:Ce.observable(!0),index:-1}],currentLayer:Ce.observable(),expandClickHandler:wTt,setOptionDisable:function(i,o){Ce.applyBindingsToNode(i,{disable:o.disable},o)},defaultLayer:void 0},this.viewModel.currentLayer.subscribe(function(i){FTt(i,t.viewModel)});let n=e.sublayers;for(let i=0;i<n.length;i++){TSe(n[i],this.viewModel);let o=_Se(n[i],this.viewModel);l(o)&&(SSe(o)||!l(this.viewModel.defaultLayer)&&eB(o))&&(this.viewModel.defaultLayer=o)}if(this.viewModel.topLayers.length===1&&n.length>0){e.show=!1;let i={name:"Full Model",modelName:"FullModel",visibility:e.show,sublayers:e.sublayers};this.viewModel.defaultLayer=_Se(i,this.viewModel),this.viewModel.currentLayer.subscribe(function(o){e.show=eB(o)})}else this.viewModel.topLayers.length===1&&(this.viewModel.topLayers[0].name="Building layers not found");return ATt(e,this.levels),this.viewModel.currentLevel.subscribe(function(i){i!=="All"?e.filterByAttributes([{name:"BldgLevel",values:[i]}]):e.filterByAttributes()}),this.viewModel}var YA=MTt;function NTt(e,t){let n=document.getElementById(e),i=document.createElement("div");i.classList.add("cesium-viewer-i3s-explorer"),i.innerHTML=` +`);n.value=n.value.slice(0,i)+u+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileStyle();return!0};ya.prototype._update=function(){let e=this._tileset;if(this.performance&&this._performanceDisplay.update(),l(e)){if(e.isDestroyed()){this.tile=void 0,this.feature=void 0,this.tileset=void 0;return}let t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=FA(e,!1),this._pickStatisticsText=FA(e,!0),this._resourceCacheStatisticsText=gTe())};ya.prototype.isDestroyed=function(){return!1};ya.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let e=this;return this._definedProperties.forEach(function(t){Ce.getObservable(e,t).dispose()}),me(this)};ya.getStatistics=FA;var AA=ya;function QB(e,t){e=In(e);let n=document.createElement("div"),i=document.createElement("div");i.setAttribute("data-bind","visible: performance");let o=new AA(t,i);this._viewModel=o,this._container=e,this._element=n;let r=document.createElement("div");r.textContent="3D Tiles Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleInspector"),n.appendChild(r),n.className="cesium-cesiumInspector cesium-3DTilesInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let s=document.createElement("div");s.className="cesium-cesiumInspector-dropDown",n.appendChild(s);let a=Na.createSection,c=Na.createCheckbox,d=Na.createRangeInput,u=Na.createButton,m=a(s,"Tileset","tilesetVisible","toggleTileset"),p=a(s,"Display","displayVisible","toggleDisplay"),g=a(s,"Update","updateVisible","toggleUpdate"),f=a(s,"Logging","loggingVisible","toggleLogging"),x=a(s,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),_=a(s,"Style","styleVisible","toggleStyle"),C=a(s,"Optimization","optimizationVisible","toggleOptimization"),V=document.createElement("div");V.className="field-group";let Z=document.createElement("label");Z.className="field-label",Z.appendChild(document.createTextNode("Properties: "));let R=document.createElement("div");R.setAttribute("data-bind","text: properties"),V.appendChild(Z),V.appendChild(R),m.appendChild(V),m.appendChild(u("Pick Tileset","togglePickTileset","pickActive")),m.appendChild(u("Trim Tiles Cache","trimTilesCache")),m.appendChild(c("Enable Picking","picking")),p.appendChild(c("Colorize","colorize"));let G=p.appendChild(c("Wireframe","wireframe","_tileset === undefined || hasEnabledWireframe")),W=document.createElement("p");W.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),W.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),W.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",G.appendChild(W),p.appendChild(c("Bounding Volumes","showBoundingVolumes")),p.appendChild(c("Content Volumes","showContentBoundingVolumes")),p.appendChild(c("Request Volumes","showRequestVolumes")),p.appendChild(c("Point Cloud Shading","pointCloudShading"));let v=document.createElement("div");v.setAttribute("data-bind","visible: pointCloudShading"),v.appendChild(d("Geometric Error Scale","geometricErrorScale",0,2,.01)),v.appendChild(d("Maximum Attenuation","maximumAttenuation",0,32,1)),v.appendChild(d("Base Resolution","baseResolution",0,1,.01)),v.appendChild(c("Eye Dome Lighting (EDL)","eyeDomeLighting")),p.appendChild(v);let P=document.createElement("div");P.setAttribute("data-bind","visible: eyeDomeLighting"),P.appendChild(d("EDL Strength","eyeDomeLightingStrength",0,2,.1)),P.appendChild(d("EDL Radius","eyeDomeLightingRadius",0,4,.1)),v.appendChild(P),g.appendChild(c("Freeze Frame","freezeFrame")),g.appendChild(c("Dynamic Screen Space Error","dynamicScreenSpaceError"));let F=document.createElement("div");F.appendChild(d("Maximum Screen Space Error","maximumScreenSpaceError",0,128,1)),g.appendChild(F);let M=document.createElement("div");M.setAttribute("data-bind","visible: dynamicScreenSpaceError"),M.appendChild(d("Screen Space Error Density","dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"dynamicScreenSpaceErrorDensity")),M.appendChild(d("Screen Space Error Factor","dynamicScreenSpaceErrorFactor",1,32,.1)),g.appendChild(M),f.appendChild(c("Performance","performance")),f.appendChild(i),f.appendChild(c("Statistics","showStatistics"));let b=document.createElement("div");b.className="cesium-3dTilesInspector-statistics",b.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),f.appendChild(b),f.appendChild(c("Pick Statistics","showPickStatistics"));let L=document.createElement("div");L.className="cesium-3dTilesInspector-statistics",L.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),f.appendChild(L),f.appendChild(c("Resource Cache Statistics","showResourceCacheStatistics"));let E=document.createElement("div");E.className="cesium-3dTilesInspector-statistics",E.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),f.appendChild(E);let I=document.createElement("div");_.appendChild(I),I.appendChild(document.createTextNode("Color Blend Mode: "));let w=document.createElement("select");w.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),I.appendChild(w);let N=document.createElement("textarea");N.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),I.className="cesium-cesiumInspector-styleEditor",I.appendChild(N);let B=u("Compile (Ctrl+Enter)","compileStyle");I.appendChild(B);let k=document.createElement("div");k.className="cesium-cesiumInspector-error",k.setAttribute("data-bind","text: editorError"),I.appendChild(k),x.appendChild(c("Show Picked Only","showOnlyPickedTileDebugLabel")),x.appendChild(c("Geometric Error","showGeometricError")),x.appendChild(c("Rendering Statistics","showRenderingStatistics")),x.appendChild(c("Memory Usage (MB)","showMemoryUsage")),x.appendChild(c("Url","showUrl")),C.appendChild(c("Skip Tile LODs","skipLevelOfDetail"));let O=document.createElement("div");O.appendChild(d("Skip SSE Factor","skipScreenSpaceErrorFactor",1,50,1)),C.appendChild(O);let U=document.createElement("div");U.appendChild(d("SSE before skipping LOD","baseScreenSpaceError",0,4096,1)),C.appendChild(U);let J=document.createElement("div");J.appendChild(d("Min. levels to skip","skipLevels",0,10,1)),C.appendChild(J),C.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),C.appendChild(c("Load siblings of visible tiles","loadSiblings")),Ce.applyBindings(o,n)}Object.defineProperties(QB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});QB.prototype.isDestroyed=function(){return!1};QB.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),me(this)};var MA=QB;var LSo=S(T(),1);var xSo=S(T(),1);function jB(e,t){l(t)||(t=document.body),t=In(t);let n=this,i=Ce.observable(mr.fullscreen),o=Ce.observable(mr.enabled),r=t.ownerDocument;this.isFullscreen=void 0,Ce.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,Ce.defineProperty(this,"isFullscreenEnabled",{get:function(){return o()},set:function(s){o(s&&mr.enabled)}}),this.tooltip=void 0,Ce.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Vn(function(){mr.fullscreen?mr.exitFullscreen():mr.requestFullscreen(n._fullscreenElement)},Ce.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=y(In(e),r.body),this._callback=function(){i(mr.fullscreen)},r.addEventListener(mr.changeEventName,this._callback)}Object.defineProperties(jB.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}});jB.prototype.isDestroyed=function(){return!1};jB.prototype.destroy=function(){document.removeEventListener(mr.changeEventName,this._callback),me(this)};var NA=jB;var ySt="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",xSt="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function qB(e,t){e=In(e);let n=new NA(t,e);n._exitFullScreenPath=xSt,n._enterFullScreenPath=ySt;let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-fullscreenButton",i.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(i),Ce.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(qB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});qB.prototype.isDestroyed=function(){return!1};qB.prototype.destroy=function(){return this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var UA=qB;var ASo=S(T(),1);var WSo=S(T(),1);function yTe(e,t){this._scene=e,this._duration=t;let n=this;this._command=Vn(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",Ce.track(this,["tooltip"])}Object.defineProperties(yTe.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}}});var kA=yTe;function $B(e,t,n){e=In(e);let i=new kA(t,n);i._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-home-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(o),Ce.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties($B.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});$B.prototype.isDestroyed=function(){return!1};$B.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var DA=$B;var QSo=S(T(),1);var BSo=S(T(),1);var xTe=1e3;function am(e){l(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new N9({scene:e.scene})],this._viewContainer=e.container,this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._wasGeocodeCancelled=!1,this._previousCredits=[],this._complete=new ge,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=STe,this._handleArrowUp=_Te;let t=this;this._suggestionsVisible=Ce.pureComputed(function(){let o=Ce.getObservable(t,"_suggestions")().length>0,r=Ce.getObservable(t,"_showSuggestions")();return o&&r}),this._searchCommand=Vn(function(i){if(i=y(i,Ry.SEARCH),t._focusTextbox=!1,l(t._selectedSuggestion))return t.activateSuggestion(t._selectedSuggestion),!1;if(t.hideSuggestions(),t.isSearchInProgress)ZSt(t);else return CSt(t,t._geocoderServices,i)}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38;return(r||s)&&o.preventDefault(),!0},this.handleKeyUp=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38,a=o.key==="Enter"||o.keyCode===13;return s?_Te(t):r?STe(t):a&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;let o=i.destination;VTe(t),t.destinationFound(t,o)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(i,o){i!==t._selectedSuggestion&&(t._selectedSuggestion=i)},this.keepExpanded=!1,this.autoComplete=y(e.autocomplete,!0),this.destinationFound=y(e.destinationFound,am.flyToDestination),this._focusTextbox=!1,Ce.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let n=Ce.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){am._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,Ce.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,Ce.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){this._searchText=i}}),this.flightDuration=void 0,Ce.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){this._flightDuration=i}})}Object.defineProperties(am.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}});am.prototype.destroy=function(){this._suggestionSubscription.dispose()};function _Te(e){if(e._suggestions.length===0)return;let t=e._suggestions.indexOf(e._selectedSuggestion);if(t===-1||t===0){e._selectedSuggestion=void 0;return}let n=t-1;e._selectedSuggestion=e._suggestions[n],am._adjustSuggestionsScroll(e,n)}function STe(e){if(e._suggestions.length===0)return;let t=e._suggestions.length,i=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t;e._selectedSuggestion=e._suggestions[i],am._adjustSuggestionsScroll(e,i)}function _St(e,t){let n=l(t)?t.availability:void 0;return l(n)?eT(t,[e]).then(function(i){return e=i[0],e.height+=xTe,e}):(e.height+=xTe,Promise.resolve(e))}function SSt(e,t){let n=e._scene,i=n.ellipsoid,o=n.camera,r=n.terrainProvider,s=t,a;return t instanceof ce?X.equalsEpsilon(t.south,t.north,X.EPSILON7)&&X.equalsEpsilon(t.east,t.west,X.EPSILON7)?t=ce.center(t):a=mT(t,n):t=i.cartesianToCartographic(t),l(a)||(a=_St(t,r)),a.then(function(c){s=i.cartographicToCartesian(c)}).finally(function(){o.flyTo({destination:s,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:A.IDENTITY})})}async function TSt(e,t,n){try{return{state:"fulfilled",value:await e.geocode(t,n),credits:e.credit}}catch(i){return{state:"rejected",reason:i}}}async function CSt(e,t,n){let i=e._searchText;if(CTe(i)){e.showSuggestions();return}e._isSearchInProgress=!0,e._wasGeocodeCancelled=!1;let o,r;for(o=0;o<t.length;o++){if(e._wasGeocodeCancelled)return;if(r=await TSt(t[o],i,n),l(r)&&r.state==="fulfilled"&&r.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,c6(e);let s=r.value;if(r.state==="fulfilled"&&l(s)&&s.length>0){e._searchText=s[0].displayName,e.destinationFound(e,s[0].destination);let a=TTe(e,cZ.getCreditsFromResult(s[0]));l(a)||a6(e,t[o].credit);return}e._searchText=`${i} (not found)`}function a6(e,t){l(t)&&!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function TTe(e,t){return l(t)&&t.forEach(n=>a6(e,n)),t}function c6(e){!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function VSt(e,t){let n=In(e._viewContainer),i=n.getElementsByClassName("search-results")[0],r=n.getElementsByTagName("li")[t];if(t===0){i.scrollTop=0;return}let s=r.offsetTop;s+r.clientHeight>i.clientHeight?i.scrollTop=s+r.clientHeight:s<i.scrollTop&&(i.scrollTop=s)}function ZSt(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}function CTe(e){return/^\s*$/.test(e)}function VTe(e){Ce.getObservable(e,"_suggestions").removeAll()}async function LSt(e){if(!e.autoComplete)return;let t=e._searchText;if(VTe(e),c6(e),!CTe(t))for(let n of e._geocoderServices){let i=await n.geocode(t,Ry.AUTOCOMPLETE);if(e._suggestions=e._suggestions.concat(i),i.length>0){let o=!0;i.forEach(r=>{let s=cZ.getCreditsFromResult(r);o=o&&!l(s),TTe(e,s)}),o&&a6(e,n.credit)}if(e._suggestions.length>=5)return}}am.flyToDestination=SSt;am._updateSearchSuggestions=LSt;am._adjustSuggestionsScroll=VSt;am.prototype.isDestroyed=function(){return!1};am.prototype.destroy=function(){return c6(this),me(this)};var BA=am;var RSt="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",GSt="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function eY(e){let t=In(e.container),n=new BA(e);n._startSearchPath=RSt,n._stopSearchPath=GSt;let i=document.createElement("form");i.setAttribute("data-bind","submit: search");let o=document.createElement("input");o.type="search",o.className="cesium-geocoder-input",o.setAttribute("placeholder","Enter an address or landmark..."),o.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){o.select()},0)},o.addEventListener("focus",this._onTextBoxFocus,!1),i.appendChild(o),this._textBox=o;let r=document.createElement("span");r.className="cesium-geocoder-searchButton",r.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),i.appendChild(r),t.appendChild(i);let s=document.createElement("div");s.className="search-results",s.setAttribute("data-bind","visible: _suggestionsVisible");let a=document.createElement("ul");a.setAttribute("data-bind","foreach: _suggestions");let c=document.createElement("li");a.appendChild(c),c.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),s.appendChild(a),t.appendChild(s),Ce.applyBindings(n,i),Ce.applyBindings(n,s),this._container=t,this._searchSuggestionsContainer=s,this._viewModel=n,this._form=i,this._onInputBegin=function(d){let u=d.target;typeof d.composedPath=="function"&&(u=d.composedPath()[0]),t.contains(u)||(n._focusTextbox=!1,n.hideSuggestions())},this._onInputEnd=function(d){n._focusTextbox=!0,n.showSuggestions()},Yt.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),t.addEventListener("pointerup",this._onInputEnd,!0),t.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),t.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),t.addEventListener("touchend",this._onInputEnd,!0),t.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties(eY.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});eY.prototype.isDestroyed=function(){return!1};eY.prototype.destroy=function(){let e=this._container;return Yt.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),e.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),e.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),e.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),Ce.cleanNode(this._form),Ce.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),me(this)};var YA=eY;var sTo=S(T(),1);var eTo=S(T(),1);function ESt(e,t){t.currentTarget.parentElement.parentElement.querySelector(`#${e.name}-expander`).classList.toggle("active"),t.currentTarget.textContent=t.currentTarget.textContent==="+"?"-":"+"}function LTe(e,t){Ce.track(e);for(let n=0;n<e.sublayers.length;n++)LTe(e.sublayers[n],t)}function tY(e){return e.modelName==="FullModel"}function RTe(e){return e.modelName==="Overview"}function GTe(e){return RTe(e)||tY(e)}function ZTe(e,t){if(GTe(e)){e.visibility=!1;for(let i=0;i<e.sublayers.length;i++)e.sublayers[i].visibility=!0;let n={name:e.name,modelName:e.modelName,disable:Ce.observable(!1),index:t.sublayers.length};return t.topLayers.push(n),t.sublayers.push(e),n}}function WSt(e,t){if(GTe(e)){t.sublayers.forEach(i=>i.visibility=!1),t.sublayers[e.index].visibility=!0;let n=document.getElementById("bsl-wrapper");tY(e)?(t.currentLevel=t.selectedLevel,n.style.display="block"):(t.selectedLevel=t.currentLevel,t.currentLevel="All",n.style.display="none")}}async function ISt(e,t){try{let n=e.getAttributeNames();for(let i=0;i<n.length;i++)if(n[i]==="BldgLevel"){let o=e.getAttributeValues(n[i]);for(let r=0;r<o.length;r++)t.push(o[r])}t.sort((i,o)=>i-o),t.unshift("All")}catch(n){console.log(`There was an error getting attributes: ${n}`)}}function XSt(e){let t=this;this.levels=[],this.viewModel={sublayers:[],levels:this.levels,currentLevel:Ce.observable(),selectedLevel:"All",topLayers:[{name:"Select a layer to explore...",disable:Ce.observable(!0),index:-1}],currentLayer:Ce.observable(),expandClickHandler:ESt,setOptionDisable:function(i,o){Ce.applyBindingsToNode(i,{disable:o.disable},o)},defaultLayer:void 0},this.viewModel.currentLayer.subscribe(function(i){WSt(i,t.viewModel)});let n=e.sublayers;for(let i=0;i<n.length;i++){LTe(n[i],this.viewModel);let o=ZTe(n[i],this.viewModel);l(o)&&(RTe(o)||!l(this.viewModel.defaultLayer)&&tY(o))&&(this.viewModel.defaultLayer=o)}if(this.viewModel.topLayers.length===1&&n.length>0){e.show=!1;let i={name:"Full Model",modelName:"FullModel",visibility:e.show,sublayers:e.sublayers};this.viewModel.defaultLayer=ZTe(i,this.viewModel),this.viewModel.currentLayer.subscribe(function(o){e.show=tY(o)})}else this.viewModel.topLayers.length===1&&(this.viewModel.topLayers[0].name="Building layers not found");return ISt(e,this.levels),this.viewModel.currentLevel.subscribe(function(i){i!=="All"?e.filterByAttributes([{name:"BldgLevel",values:[i]}]):e.filterByAttributes()}),this.viewModel}var OA=XSt;function PSt(e,t){let n=document.getElementById(e),i=document.createElement("div");i.classList.add("cesium-viewer-i3s-explorer"),i.innerHTML=` <h3>Building explorer</h3> <select data-bind="options: topLayers, optionsText: 'name', optionsAfterRender: setOptionDisable, value: currentLayer" @@ -15762,8 +15866,8 @@ http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:functio </li> </ul> </ul> - </div>`,n.appendChild(i);let o=new YA(t);Ce.track(o),Ce.applyBindings(o,n),l(o.defaultLayer)&&(o.currentLayer=o.defaultLayer)}var d6=NTt;var pSo=T(S(),1);var cSo=T(S(),1);function VSe(){this.showInstructions=!1;let e=this;this._command=Vn(function(){e.showInstructions=!e.showInstructions}),this._showClick=Vn(function(){e._touch=!1}),this._showTouch=Vn(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",Ce.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(VSe.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var OA=VSe;function tB(e){let t=In(e.container),n=new OA,i=y(e.instructionsInitiallyVisible,!1);n.showInstructions=i,n._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";let o=document.createElement("span");o.className="cesium-navigationHelpButton-wrapper",t.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),o.appendChild(r);let s=document.createElement("div");s.className="cesium-navigation-help",s.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),o.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-navigation-button cesium-navigation-button-left",a.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');let c=document.createElement("img");c.src=tn("Widgets/Images/NavigationHelp/Mouse.svg"),c.className="cesium-navigation-button-icon",c.style.width="25px",c.style.height="25px",a.appendChild(c),a.appendChild(document.createTextNode("Mouse"));let d=document.createElement("button");d.type="button",d.className="cesium-navigation-button cesium-navigation-button-right",d.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');let u=document.createElement("img");u.src=tn("Widgets/Images/NavigationHelp/Touch.svg"),u.className="cesium-navigation-button-icon",u.style.width="25px",u.style.height="25px",d.appendChild(u),d.appendChild(document.createTextNode("Touch")),s.appendChild(a),s.appendChild(d);let m=document.createElement("div");m.className="cesium-click-navigation-help cesium-navigation-help-instructions",m.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),m.innerHTML=` <table> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/MouseLeft.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/MouseRight.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Right click + drag, or</div> <div class="cesium-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Rotate view</div> <div class="cesium-navigation-help-details">Middle click + drag, or</div> <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>`,s.appendChild(m);let p=document.createElement("div");p.className="cesium-touch-navigation-help cesium-navigation-help-instructions",p.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),p.innerHTML=` <table> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/TouchDrag.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/TouchZoom.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/TouchTilt.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Tilt view</div> <div class="cesium-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-tilt">Rotate view</div> <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>`,s.appendChild(p),Ce.applyBindings(n,o),this._container=t,this._viewModel=n,this._wrapper=o,this._closeInstructions=function(g){o.contains(g.target)||(n.showInstructions=!1)},Yt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(tB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});tB.prototype.isDestroyed=function(){return!1};tB.prototype.destroy=function(){return Yt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),me(this)};var HA=tB;var RSo=T(S(),1);var xSo=T(S(),1);var kTt="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",UTt="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function u6(){this._cameraClicked=new ge,this._closeClicked=new ge,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",Ce.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,Ce.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?UTt:kTt}}),Ce.defineProperty(this,"_bodyless",{get:function(){return!l(this.description)||this.description.length===0}})}u6.prototype.maxHeightOffset=function(e){return`${this.maxHeight-e}px`};Object.defineProperties(u6.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var zA=u6;function nB(e){e=In(e);let t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);let n=document.createElement("div");n.className="cesium-infoBox-title",n.setAttribute("data-bind","text: titleText"),t.appendChild(n);let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-infoBox-camera",i.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-infoBox-close",o.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),o.innerHTML="×",t.appendChild(o);let r=document.createElement("iframe");r.className="cesium-infoBox-iframe",r.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),r.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),r.setAttribute("allowfullscreen",!0),t.appendChild(r);let s=new zA;Ce.applyBindings(s,t),this._container=e,this._element=t,this._frame=r,this._viewModel=s,this._descriptionSubscription=void 0;let a=this;r.addEventListener("load",function(){let c=r.contentDocument,d=c.createElement("link");d.href=tn("Widgets/InfoBox/InfoBoxDescription.css"),d.rel="stylesheet",d.type="text/css";let u=c.createElement("div");u.className="cesium-infoBox-description",c.head.appendChild(d),c.body.appendChild(u),a._descriptionSubscription=ba(s,"description",function(m){r.style.height="5px",u.innerHTML=m;let p=null,g=u.firstElementChild;if(g!==null&&u.childNodes.length===1){let x=window.getComputedStyle(g);if(x!==null){let _=x["background-color"],C=Y.fromCssColorString(_);l(C)&&C.alpha!==0&&(p=x["background-color"])}}t.style["background-color"]=p;let f=u.getBoundingClientRect().height;r.style.height=`${f}px`})}),r.setAttribute("src","about:blank")}Object.defineProperties(nB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});nB.prototype.isDestroyed=function(){return!1};nB.prototype.destroy=function(){let e=this._container;return Ce.cleanNode(this._element),e.removeChild(this._element),l(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),me(this)};var KA=nB;var kSo=T(S(),1);var PSo=T(S(),1);function m6(e){this._scene=e.scene,this.lowFrameRateMessage=y(e.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,Ce.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let t=this;this._dismissMessage=Vn(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});let n=$9.fromScene(e.scene);this._unsubscribeLowFrameRate=n.lowFrameRate.addEventListener(function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=n.nominalFrameRate.addEventListener(function(){t.showingLowFrameRateMessage=!1})}Object.defineProperties(m6.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});m6.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),me(this)};var JA=m6;function iB(e){let t=In(e.container),n=new JA(e),i=document.createElement("div");i.className="cesium-performance-watchdog-message-area",i.setAttribute("data-bind","visible: showingLowFrameRateMessage");let o=document.createElement("button");o.setAttribute("type","button"),o.className="cesium-performance-watchdog-message-dismiss",o.innerHTML="×",o.setAttribute("data-bind","click: dismissMessage"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-performance-watchdog-message",r.setAttribute("data-bind","html: lowFrameRateMessage"),i.appendChild(r),t.appendChild(i),Ce.applyBindings(n,i),this._container=t,this._viewModel=n,this._element=i}Object.defineProperties(iB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});iB.prototype.isDestroyed=function(){return!1};iB.prototype.destroy=function(){return this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var QA=iB;var $So=T(S(),1);var HSo=T(S(),1);function oB(e){this._scene=e,this._orthographic=e.camera.frustum instanceof sn,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,Ce.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let t=this;Ce.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=Vn(function(){t.sceneMode===oe.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new Er,this._eventHelper.add(e.morphComplete,function(n,i,o,r){t.sceneMode=o,t._orthographic=o===oe.SCENE2D||t._scene.camera.frustum instanceof sn}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=l(e.camera._currentFlight)}),this._switchToPerspective=Vn(function(){t.sceneMode!==oe.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=Vn(function(){t.sceneMode!==oe.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=oe}Object.defineProperties(oB.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}});oB.prototype.isDestroyed=function(){return!1};oB.prototype.destroy=function(){this._eventHelper.removeAll(),me(this)};var jA=oB;var DTt="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",BTt="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function rB(e,t){e=In(e);let n=new jA(t);n._perspectivePath=DTt,n._orthographicPath=BTt;let i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',i.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",r.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),i.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),i.appendChild(s),Ce.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(a){i.contains(a.target)||(n.dropDownVisible=!1)},Yt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(rB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});rB.prototype.isDestroyed=function(){return!1};rB.prototype.destroy=function(){return this._viewModel.destroy(),Yt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),me(this)};var qA=rB;var hCo=T(S(),1);var sCo=T(S(),1);function sB(e,t){this._scene=e;let n=this,i=function(o,r,s,a){n.sceneMode=s,n.dropDownVisible=!1};this._eventHelper=new Er,this._eventHelper.add(e.morphStart,i),this._duration=y(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",Ce.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,Ce.defineProperty(this,"selectedTooltip",function(){let o=n.sceneMode;return o===oe.SCENE2D?n.tooltip2D:o===oe.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=Vn(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=Vn(function(){e.morphTo2D(n._duration)}),this._morphTo3D=Vn(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=Vn(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=oe}Object.defineProperties(sB.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}});sB.prototype.isDestroyed=function(){return!1};sB.prototype.destroy=function(){this._eventHelper.removeAll(),me(this)};var $A=sB;var YTt="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",OTt="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",HTt="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function aB(e,t,n){e=In(e);let i=new $A(t,n);i._globePath=YTt,i._flatMapPath=OTt,i._columbusViewPath=HTt;let o=document.createElement("span");o.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',o.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),o.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),o.appendChild(a);let c=document.createElement("button");c.type="button",c.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",c.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),o.appendChild(c),Ce.applyBindings(i,o),this._viewModel=i,this._container=e,this._wrapper=o,this._closeDropDown=function(d){o.contains(d.target)||(i.dropDownVisible=!1)},Yt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(aB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});aB.prototype.isDestroyed=function(){return!1};aB.prototype.destroy=function(){return this._viewModel.destroy(),Yt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),me(this)};var eM=aB;var LCo=T(S(),1);var yCo=T(S(),1);var zTt=new D,cB="-1000px";function tM(e,t,n){this._scene=e,this._screenPositionX=cB,this._screenPositionY=cB,this._tweens=e.tweens,this._container=y(n,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,Ce.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,Ce.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&l(this.position)}}),Ce.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,o){return ki.wgs84ToWindowCoordinates(e,i,o)}}tM.prototype.update=function(){if(this.showSelection&&l(this.position)){let e=this.computeScreenSpacePosition(this.position,zTt);if(!l(e))this._screenPositionX=cB,this._screenPositionY=cB;else{let t=this._container,n=t.parentNode.clientWidth,i=t.parentNode.clientHeight,o=this._selectionIndicatorElement.clientWidth,r=o*.5;e.x=Math.min(Math.max(e.x,-o),n+o)-r,e.y=Math.min(Math.max(e.y,-o),i+o)-r,this._screenPositionX=`${Math.floor(e.x+.25)}px`,this._screenPositionY=`${Math.floor(e.y+.25)}px`}}};tM.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Fr.EXPONENTIAL_OUT})};tM.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Fr.EXPONENTIAL_OUT})};Object.defineProperties(tM.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var nM=tM;function lB(e,t){e=In(e),this._container=e;let n=document.createElement("div");n.className="cesium-selection-wrapper",n.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(n),this._element=n;let i="http://www.w3.org/2000/svg",o="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",r=document.createElementNS(i,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");let s=document.createElementNS(i,"g");s.setAttribute("transform","translate(80,80)"),r.appendChild(s);let a=document.createElementNS(i,"path");a.setAttribute("data-bind","attr: { transform: _transform }"),a.setAttribute("d",o),s.appendChild(a),n.appendChild(r);let c=new nM(t,this._element,this._container);this._viewModel=c,Ce.applyBindings(this._viewModel,this._element)}Object.defineProperties(lB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});lB.prototype.isDestroyed=function(){return!1};lB.prototype.destroy=function(){let e=this._container;return Ce.cleanNode(this._element),e.removeChild(this._element),me(this)};var iM=lB;var ACo=T(S(),1);var GCo=T(S(),1);function bS(e,t,n){this._color=e,this._height=t,this._base=y(n,0)}bS.prototype.getHeight=function(){return this._height};bS.prototype.getBase=function(){return this._base};bS.prototype.getStartTime=function(){return this._start};bS.prototype.getStopTime=function(){return this._stop};bS.prototype.setRange=function(e,t){this._start=e,this._stop=t};bS.prototype.render=function(e){let t="";if(this._start&&this._stop&&this._color){let n=te.secondsDifference(this._start,e.epochJulian),i=Math.round(e.timeBarWidth*e.getAlpha(n)),o=te.secondsDifference(this._stop,e.epochJulian),r=Math.round(e.timeBarWidth*e.getAlpha(o))-i;i<0&&(r+=i,i=0),i+r>e.timeBarWidth&&(r=e.timeBarWidth-i),r>0&&(t=`<span class="cesium-timeline-highlight" style="left: ${i.toString()}px; width: ${r.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return t};var oM=bS;var ICo=T(S(),1);function LSe(e,t,n,i){this.interval=e,this.height=t,this.color=n||new Y(.5,.5,.5,1),this.backgroundColor=i||new Y(0,0,0,0)}LSe.prototype.render=function(e,t){let n=this.interval.start,i=this.interval.stop,o=t.startJulian,r=te.addSeconds(t.startJulian,t.duration,new te);if(te.lessThan(n,o)&&te.greaterThan(i,r))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(te.lessThanOrEquals(n,r)&&te.greaterThanOrEquals(i,o)){let s,a,c;for(s=0;s<t.timeBarWidth;++s){let d=te.addSeconds(t.startJulian,s/t.timeBarWidth*t.duration,new te);!l(a)&&te.greaterThanOrEquals(d,n)?a=s:!l(c)&&te.greaterThanOrEquals(d,i)&&(c=s)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),l(a)&&(l(c)||(c=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(a,t.y,Math.max(c-a,1),this.height))}};var rM=LSe;var h6=1e12,lm={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},dl={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},Ay=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],KTt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ul(e,t){e=In(e);let n=e.ownerDocument;this.container=e;let i=n.createElement("div");i.className="cesium-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=lm.none,this._touchMode=dl.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=JTt(this),this._onMouseUp=QTt(this),this._onMouseMove=jTt(this),this._onMouseWheel=qTt(this),this._onTouchStart=$Tt(this),this._onTouchMove=tSt(this),this._onTouchEnd=eSt(this);let o=this._timeBarEle;n.addEventListener("mouseup",this._onMouseUp,!1),n.addEventListener("mousemove",this._onMouseMove,!1),o.addEventListener("mousedown",this._onMouseDown,!1),o.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),o.addEventListener("mousewheel",this._onMouseWheel,!1),o.addEventListener("touchstart",this._onTouchStart,!1),o.addEventListener("touchmove",this._onTouchMove,!1),o.addEventListener("touchend",this._onTouchEnd,!1),o.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}ul.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)};ul.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)};ul.prototype.isDestroyed=function(){return!1};ul.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);let t=this._timeBarEle;t.removeEventListener("mousedown",this._onMouseDown,!1),t.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),t.removeEventListener("mousewheel",this._onMouseWheel,!1),t.removeEventListener("touchstart",this._onTouchStart,!1),t.removeEventListener("touchmove",this._onTouchMove,!1),t.removeEventListener("touchend",this._onTouchEnd,!1),t.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),me(this)};ul.prototype.addHighlightRange=function(e,t,n){let i=new oM(e,t,n);return this._highlightRanges.push(i),this.resize(),i};ul.prototype.addTrack=function(e,t,n,i){let o=new rM(e,t,n,i);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o};ul.prototype.zoomTo=function(e,t){if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=te.secondsDifference(t,e),this._clock&&this._clock.clockRange!==vr.UNBOUNDED){let i=this._clock.startTime,o=this._clock.stopTime,r=te.secondsDifference(o,i),s=te.secondsDifference(i,this._startJulian),a=te.secondsDifference(o,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):s>0?(this._endJulian=te.addSeconds(this._endJulian,s,new te),this._startJulian=i,this._timeBarSecondsSpan=te.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=te.addSeconds(this._startJulian,a,new te),this._endJulian=o,this._timeBarSecondsSpan=te.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let n=document.createEvent("Event");n.initEvent("setzoom",!0,!0),n.startJulian=this._startJulian,n.endJulian=this._endJulian,n.epochJulian=this._epochJulian,n.totalSpan=this._timeBarSecondsSpan,n.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(n)};ul.prototype.zoomFrom=function(e){let t=te.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=this._timeBarSecondsSpan*.5:t+=t-this._timeBarSecondsSpan*.5;let n=this._timeBarSecondsSpan-t;this.zoomTo(te.addSeconds(this._startJulian,t-t*e,new te),te.addSeconds(this._endJulian,n*e-n,new te))};function f6(e){return e<10?`0${e.toString()}`:e.toString()}ul.prototype.makeLabel=function(e){let t=te.toGregorianDate(e),n=t.millisecond,i=" UTC";if(n>0&&this._timeBarSecondsSpan<3600){for(i=Math.floor(n).toString();i.length<3;)i=`0${i}`;i=`.${i}`}return`${KTt[t.month-1]} ${t.day} ${t.year} ${f6(t.hour)}:${f6(t.minute)}:${f6(t.second)}${i}`};ul.prototype.smallestTicInPixels=7;ul.prototype._makeTics=function(){let e=this._timeBarEle,t=te.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),i=n-8,o,r=this;this._needleEle.style.left=`${n.toString()}px`;let s="",a=.01,c=31536e6,d=1e-10,u=0,m=this._timeBarSecondsSpan;m<a?(m=a,this._timeBarSecondsSpan=a,this._endJulian=te.addSeconds(this._startJulian,a,new te)):m>c&&(m=c,this._timeBarSecondsSpan=c,this._endJulian=te.addSeconds(this._startJulian,c,new te));let p=this._timeBarEle.clientWidth;p<10&&(p=10);let g=this._startJulian,f=Math.min(m/p*1e-5,.4),x,_=te.toGregorianDate(g);m>31536e4?x=te.fromDate(new Date(Date.UTC(Math.floor(_.year/100)*100,0))):m>31536e3?x=te.fromDate(new Date(Date.UTC(Math.floor(_.year/10)*10,0))):m>86400?x=te.fromDate(new Date(Date.UTC(_.year,0))):x=te.fromDate(new Date(Date.UTC(_.year,_.month,_.day)));let C=te.secondsDifference(this._startJulian,te.addSeconds(x,f,new te)),V=C+m;this._epochJulian=x;function L(k){return Math.floor(C/k)*k}function Z(k,J){return Math.ceil(k/J+.5)*J}function G(k){return(k-C)/m}function X(k,J){return k-J*Math.round(k/J)}this._rulerEle.innerHTML=this.makeLabel(te.addSeconds(this._endJulian,-a,new te));let v=this._rulerEle.offsetWidth+20;v<30&&(v=180);let P=u;u-=d;let F={startTime:C,startJulian:g,epochJulian:x,duration:m,timeBarWidth:p,getAlpha:G};this._highlightRanges.forEach(function(k){s+=k.render(F)});let A=0,b=0,R=0,E=v/p;E>1&&(E=1),E*=this._timeBarSecondsSpan;let I=-1,w=-1,N=Ay.length,B;for(B=0;B<N;++B){let k=Ay[B];if(++I,A=k,k>E&&k>u)break;w<0&&p*(k/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(w=I)}if(I>0){for(;I>0;)if(--I,Math.abs(X(A,Ay[I]))<1e-5){Ay[I]>=u&&(b=Ay[I]);break}if(w>=0)for(;w<I;){if(Math.abs(X(b,Ay[w]))<1e-5&&Ay[w]>=u){R=Ay[w];break}++w}}u=P,u>d&&R<1e-5&&Math.abs(u-A)>d&&(R=u,u<=A+d&&(b=0));let U=-999999,O;if(p*(R/this._timeBarSecondsSpan)>=3)for(o=L(R);o<=V;o=Z(o,R))s+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(p*G(o)).toString()}px;"></span>`;if(p*(b/this._timeBarSecondsSpan)>=3)for(o=L(b);o<=V;o=Z(o,b))s+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(p*G(o)).toString()}px;"></span>`;if(p*(A/this._timeBarSecondsSpan)>=2){this._mainTicSpan=A,V+=A,o=L(A);let k=te.computeTaiMinusUtc(x);for(;o<=V;){let J=te.addSeconds(g,o-C,new te);if(A>2.1){let j=te.computeTaiMinusUtc(J);Math.abs(j-k)>.1&&(o+=j-k,J=te.addSeconds(g,o-C,new te))}let H=Math.round(p*G(o)),ee=this.makeLabel(J);this._rulerEle.innerHTML=ee,O=this._rulerEle.offsetWidth,O<10&&(O=v);let z=H-(O/2-1);z>U?(U=z+O+5,s+=`<span class="cesium-timeline-ticMain" style="left: ${H.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${z.toString()}px;">${ee}</span>`):s+=`<span class="cesium-timeline-ticSub" style="left: ${H.toString()}px;"></span>`,o=Z(o,A)}}else this._mainTicSpan=-1;s+=`<span class="cesium-timeline-icon16" style="left:${i}px;bottom:0;background-position: 0 0;"></span>`,e.innerHTML=s,this._scrubElement=e.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),F.y=0,this._trackList.forEach(function(k){k.render(r._context,F),F.y+=k.height})};ul.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let e=this._scrubElement;if(l(this._scrubElement)){let t=te.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==n&&(this._lastXPos=n,e.style.left=`${n-8}px`,this._needleEle.style.left=`${n}px`)}l(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(te.addSeconds(this._startJulian,this._timelineDrag,new te),te.addSeconds(this._endJulian,this._timelineDrag,new te)))};ul.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=te.addSeconds(this._startJulian,t,new te),this._scrubElement){let i=e-8;this._scrubElement.style.left=`${i.toString()}px`,this._needleEle.style.left=`${e.toString()}px`}let n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)};function JTt(e){return function(t){e._mouseMode!==lm.touchOnly&&(t.button===0?(e._mouseMode=lm.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=lm.zoom:e._mouseMode=lm.slide)),t.preventDefault()}}function QTt(e){return function(t){e._mouseMode=lm.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function jTt(e){return function(t){let n;if(e._mouseMode===lm.scrub){t.preventDefault();let i=t.clientX-e._topDiv.getBoundingClientRect().left;i<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):i>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===lm.slide){if(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0){let i=n*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(te.addSeconds(e._startJulian,i,new te),te.addSeconds(e._endJulian,i,new te))}}else e._mouseMode===lm.zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0&&e.zoomFrom(Math.pow(1.01,n)))}}function qTt(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;h6=Math.max(Math.min(Math.abs(n),h6),1),n/=h6,e.zoomFrom(Math.pow(1.05,-n))}}function $Tt(e){return function(t){let n=t.touches.length,i,o,r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=lm.touchOnly,n===1?(i=te.secondsDifference(e._scrubJulian,e._startJulian),o=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+r),Math.abs(t.touches[0].clientX-o)<50?(e._touchMode=dl.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=n===1?"-16px 0":"0 0")):(e._touchMode=dl.singleTap,e._touchState.centerX=t.touches[0].clientX-r)):n===2?(e._touchMode=dl.slideZoom,e._touchState.centerX=(t.touches[0].clientX+t.touches[1].clientX)*.5-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=dl.ignore}}function eSt(e){return function(t){let n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===dl.singleTap?(e._touchMode=dl.scrub,e._onTouchMove(t)):e._touchMode===dl.scrub&&e._onTouchMove(t),e._mouseMode=lm.touchOnly,n!==1?e._touchMode=n>0?dl.ignore:dl.none:e._touchMode===dl.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function tSt(e){return function(t){let n,i,o,r,s,a,c=1,d=e._topDiv.getBoundingClientRect().left;e._touchMode===dl.singleTap&&(e._touchMode=dl.slideZoom),e._mouseMode=lm.touchOnly,e._touchMode===dl.scrub?(t.preventDefault(),t.changedTouches.length===1&&(i=t.changedTouches[0].clientX-d,i>=0&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===dl.slideZoom&&(o=t.touches.length,o===2?(r=(t.touches[0].clientX+t.touches[1].clientX)*.5-d,s=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):o===1&&(r=t.touches[0].clientX-d,s=0),l(r)&&(s>0&&e._touchState.spanX>0?(c=e._touchState.spanX/s,a=te.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new te)):(n=e._touchState.centerX-r,a=te.addSeconds(e._startJulian,n*e._timeBarSecondsSpan/e._topDiv.clientWidth,new te)),e.zoomTo(a,te.addSeconds(a,e._timeBarSecondsSpan*c,new te)),e._touchState.centerX=r,e._touchState.spanX=s))}}ul.prototype.resize=function(){let e=this.container.clientWidth,t=this.container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;this._trackContainer.style.height=`${t}px`;let n=1;this._trackList.forEach(function(i){n+=i.height}),this._trackListEle.style.height=`${n.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=n,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t};var sM=ul;var e1o=T(S(),1);var zCo=T(S(),1);var XSe=T(ESe(),1);function oSt(e){let t=!1,n=window.screen;return l(n)&&(l(n.lockOrientation)?t=n.lockOrientation(e):l(n.mozLockOrientation)?t=n.mozLockOrientation(e):l(n.msLockOrientation)?t=n.msLockOrientation(e):l(n.orientation&&n.orientation.lock)&&(t=n.orientation.lock(e))),t}function ISe(){let e=window.screen;l(e)&&(l(e.unlockOrientation)?e.unlockOrientation():l(e.mozUnlockOrientation)?e.mozUnlockOrientation():l(e.msUnlockOrientation)?e.msUnlockOrientation():l(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function rSt(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(ISe(),e._locked=!1),e._noSleep.disable(),ur.exitFullscreen(),n(!1)):(ur.fullscreen||ur.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=oSt("landscape")),t.useWebVR=!0,n(!0)))}function dB(e,t){let n=this,i=Ce.observable(ur.enabled),o=Ce.observable(!1);this.isVRMode=void 0,Ce.defineProperty(this,"isVRMode",{get:function(){return o()}}),this.isVREnabled=void 0,Ce.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(s){i(s&&ur.enabled)}}),this.tooltip=void 0,Ce.defineProperty(this,"tooltip",function(){return i()?o()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let r=Ce.observable(!1);this._isOrthographic=void 0,Ce.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new Er,this._eventHelper.add(e.preRender,function(){r(e.camera.frustum instanceof sn)}),this._locked=!1,this._noSleep=new XSe.default,this._command=Vn(function(){rSt(n,e,o,r)},Ce.getObservable(this,"isVREnabled")),this._vrElement=y(In(t),document.body),this._callback=function(){!ur.fullscreen&&o()&&(e.useWebVR=!1,n._locked&&(ISe(),n._locked=!1),n._noSleep.disable(),o(!1))},document.addEventListener(ur.changeEventName,this._callback)}Object.defineProperties(dB.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}});dB.prototype.isDestroyed=function(){return!1};dB.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(ur.changeEventName,this._callback),me(this)};var aM=dB;var sSt="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",aSt="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function uB(e,t,n){e=In(e);let i=new aM(t,n);i._exitVRPath=aSt,i._enterVRPath=sSt;let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-vrButton",o.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(o),Ce.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(uB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});uB.prototype.isDestroyed=function(){return!1};uB.prototype.destroy=function(){return this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var cM=uB;var S1o=T(S(),1);var My=new le;function vSe(e){let t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function cSt(e){let t=e.getPropertyIds(),n="";return t.forEach(function(i){let o=e.getProperty(i);l(o)&&(n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}),n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function lSt(e){let t,n=[],i=e.getPropertyIds();for(t=0;t<i.length;t++){let r=i[t];/^name$/i.test(r)?n[0]=e.getProperty(r):/name/i.test(r)?n[1]=e.getProperty(r):/^title$/i.test(r)?n[2]=e.getProperty(r):/^(id|identifier)$/i.test(r)?n[3]=e.getProperty(r):/element/i.test(r)?n[4]=e.getProperty(r):/(id|identifier)$/i.test(r)&&(n[5]=e.getProperty(r))}let o=n.length;for(t=0;t<o;t++){let r=n[t];if(l(r)&&r!=="")return r}return"Unnamed Feature"}function WSe(e,t){let n=e.scene.pick(t.position);if(l(n)){let i=y(n.id,n.primitive.id);if(i instanceof Ko)return i;if(n instanceof Ws)return new Ko({name:lSt(n),description:cSt(n),feature:n})}if(l(e.scene.globe))return mSt(e,t.position)}var dSt=new te;function wSe(e,t,n){if(l(n)){let i=n.clock;if(l(i)&&(i.getValue(t),l(e))){let o=i.startTime,r=i.stopTime;te.equals(o,r)&&(r=te.addSeconds(o,W.EPSILON2,dSt)),e.updateFromClock(),e.zoomTo(o,r)}}}var uSt=new h;function mSt(e,t){let n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!l(o))return;let r=new Ko({id:"Loading...",description:"Loading feature information..."});return o.then(function(s){if(e.selectedEntity!==r)return;if(!l(s)||s.length===0){e.selectedEntity=PSe();return}let a=s[0],c=new Ko({id:a.name,description:a.description});if(l(a.position)){let d=e.scene.globe.ellipsoid.cartographicToCartesian(a.position,uSt);c.position=new Mc(d)}e.selectedEntity=c},function(){e.selectedEntity===r&&(e.selectedEntity=PSe())}),r}function PSe(){return new Ko({id:"None",description:"No features found."})}function hSt(e,t){let n=e._geocoder,i=e._homeButton,o=e._sceneModePicker,r=e._projectionPicker,s=e._baseLayerPicker,a=e._animation,c=e._timeline,d=e._fullscreenButton,u=e._infoBox,m=e._selectionIndicator,p=t?"hidden":"visible";if(l(n)&&(n.container.style.visibility=p),l(i)&&(i.container.style.visibility=p),l(o)&&(o.container.style.visibility=p),l(r)&&(r.container.style.visibility=p),l(s)&&(s.container.style.visibility=p),l(a)&&(a.container.style.visibility=p),l(c)&&(c.container.style.visibility=p),l(d)&&d.viewModel.isFullscreenEnabled&&(d.container.style.visibility=p),l(u)&&(u.container.style.visibility=p),l(m)&&(m.container.style.visibility=p),e._container){let g=t||!l(d)?0:d.container.clientWidth;e._vrButton.container.style.right=`${g}px`,e.forceResize()}}function Ii(e,t){e=In(e),t=y(t,y.EMPTY_OBJECT);let n=(!l(t.globe)||t.globe!==!1)&&(!l(t.baseLayerPicker)||t.baseLayerPicker!==!1),i=this,o=document.createElement("div");o.className="cesium-viewer",e.appendChild(o);let r=document.createElement("div");r.className="cesium-viewer-cesiumWidgetContainer",o.appendChild(r);let s=document.createElement("div");s.className="cesium-viewer-bottom",o.appendChild(s);let a=y(t.scene3DOnly,!1),c,d,u=!1;l(t.clockViewModel)?(d=t.clockViewModel,c=d.clock):(c=new qm,d=new TA(c),u=!0),l(t.shouldAnimate)&&(c.shouldAnimate=t.shouldAnimate);let m=new B9(r,{baseLayer:n||l(t.baseLayer)||l(t.imageryProvider)?!1:void 0,clock:c,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:l(t.creditContainer)?t.creditContainer:s,creditViewport:t.creditViewport,scene3DOnly:a,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,blurActiveElementOnCanvasFocus:t.blurActiveElementOnCanvasFocus,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples}),p=t.dataSources,g=!1;l(p)||(p=new uP,g=!0);let f=m.scene,x=new JP({scene:f,dataSourceCollection:p}),_=new Er;_.add(c.onTick,Ii.prototype._onTick,this),_.add(f.morphStart,Ii.prototype._clearTrackedObject,this);let C;if(!l(t.selectionIndicator)||t.selectionIndicator!==!1){let H=document.createElement("div");H.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(H),C=new iM(H,f)}let V;if(!l(t.infoBox)||t.infoBox!==!1){let H=document.createElement("div");H.className="cesium-viewer-infoBoxContainer",o.appendChild(H),V=new KA(H);let ee=V.viewModel;_.add(ee.cameraClicked,Ii.prototype._onInfoBoxCameraClicked,this),_.add(ee.closeClicked,Ii.prototype._onInfoBoxClockClicked,this)}let L=document.createElement("div");L.className="cesium-viewer-toolbar",o.appendChild(L);let Z;if(!l(t.geocoder)||t.geocoder!==!1){let H=document.createElement("div");H.className="cesium-viewer-geocoderContainer",L.appendChild(H);let ee;l(t.geocoder)&&typeof t.geocoder!="boolean"&&(ee=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),Z=new UA({container:H,geocoderServices:ee,scene:f}),_.add(Z.viewModel.search.beforeExecute,Ii.prototype._clearObjects,this)}let G;(!l(t.homeButton)||t.homeButton!==!1)&&(G=new BA(L,f),l(Z)&&_.add(G.viewModel.command.afterExecute,function(){let H=Z.viewModel;H.searchText="",H.isSearchInProgress&&H.search()}),_.add(G.viewModel.command.beforeExecute,Ii.prototype._clearTrackedObject,this));let X;!a&&(!l(t.sceneModePicker)||t.sceneModePicker!==!1)&&(X=new eM(L,f));let v;t.projectionPicker&&(v=new qA(L,f));let P,F;if(n){let H=y(t.imageryProviderViewModels,EA()),ee=y(t.terrainProviderViewModels,XA());P=new GA(L,{globe:f.globe,imageryProviderViewModels:H,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:ee,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),F=L.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}l(t.baseLayer)&&t.baseLayer!==!1&&(n&&(P.viewModel.selectedImagery=void 0),f.imageryLayers.removeAll(),f.imageryLayers.add(t.baseLayer)),l(t.terrainProvider)&&(n&&(P.viewModel.selectedTerrain=void 0),f.terrainProvider=t.terrainProvider),l(t.terrain)&&(n&&(P.viewModel.selectedTerrain=void 0,f.globe.depthTestAgainstTerrain=!0),f.setTerrain(t.terrain));let A;if(!l(t.navigationHelpButton)||t.navigationHelpButton!==!1){let H=!0;try{if(l(window.localStorage)){let ee=window.localStorage.getItem("cesium-hasSeenNavHelp");l(ee)&&ee?H=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}A=new HA({container:L,instructionsInitiallyVisible:y(t.navigationInstructionsInitiallyVisible,H)})}let b;if(!l(t.animation)||t.animation!==!1){let H=document.createElement("div");H.className="cesium-viewer-animationContainer",o.appendChild(H),b=new LA(H,new RA(d))}let R;if(!l(t.timeline)||t.timeline!==!1){let H=document.createElement("div");H.className="cesium-viewer-timelineContainer",o.appendChild(H),R=new sM(H,c),R.addEventListener("settime",vSe,!1),R.zoomTo(c.startTime,c.stopTime)}let E,I,w;(!l(t.fullscreenButton)||t.fullscreenButton!==!1)&&(w=document.createElement("div"),w.className="cesium-viewer-fullscreenContainer",o.appendChild(w),E=new NA(w,t.fullscreenElement),I=ba(E.viewModel,"isFullscreenEnabled",function(H){w.style.display=H?"block":"none",l(R)&&(R.container.style.right=`${w.clientWidth}px`,R.resize())}));let N,B,U;if(t.vrButton){let H=document.createElement("div");H.className="cesium-viewer-vrContainer",o.appendChild(H),N=new cM(H,f,t.fullScreenElement),B=ba(N.viewModel,"isVREnabled",function(ee){H.style.display=ee?"block":"none",l(E)&&(H.style.right=`${w.clientWidth}px`),l(R)&&(R.container.style.right=`${H.clientWidth}px`,R.resize())}),U=ba(N.viewModel,"isVRMode",function(ee){hSt(i,ee)})}this._baseLayerPickerDropDown=F,this._fullscreenSubscription=I,this._vrSubscription=B,this._vrModeSubscription=U,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=y(t.automaticallyTrackDataSourceClocks,!0),this._container=e,this._bottomContainer=s,this._element=o,this._cesiumWidget=m,this._selectionIndicator=C,this._infoBox=V,this._dataSourceCollection=p,this._destroyDataSourceCollection=g,this._dataSourceDisplay=x,this._clockViewModel=d,this._destroyClockViewModel=u,this._toolbar=L,this._homeButton=G,this._sceneModePicker=X,this._projectionPicker=v,this._baseLayerPicker=P,this._navigationHelpButton=A,this._animation=b,this._timeline=R,this._fullscreenButton=E,this._vrButton=N,this._geocoder=Z,this._eventHelper=_,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=l(V)||l(C),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new ge,this._trackedEntityChanged=new ge,Ce.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),_.add(p.dataSourceAdded,Ii.prototype._onDataSourceAdded,this),_.add(p.dataSourceRemoved,Ii.prototype._onDataSourceRemoved,this),_.add(f.postUpdate,Ii.prototype.resize,this),_.add(f.postRender,Ii.prototype._postRender,this);let O=p.length;for(let H=0;H<O;H++)this._dataSourceAdded(p,p.get(H));this._dataSourceAdded(void 0,x.defaultDataSource),_.add(p.dataSourceAdded,Ii.prototype._dataSourceAdded,this),_.add(p.dataSourceRemoved,Ii.prototype._dataSourceRemoved,this);function k(H){let ee=WSe(i,H);l(ee)?K.getValueOrUndefined(ee.position,i.clock.currentTime)?i.trackedEntity=ee:i.zoomTo(ee):l(i.trackedEntity)&&(i.trackedEntity=void 0)}function J(H){i.selectedEntity=WSe(i,H)}m.screenSpaceEventHandler.setInputAction(J,Tn.LEFT_CLICK),m.screenSpaceEventHandler.setInputAction(k,Tn.LEFT_DOUBLE_CLICK)}Object.defineProperties(Ii.prototype,{container:{get:function(){return this._container}},creditDisplay:{get:function(){return this._cesiumWidget.creditDisplay}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(e){this._cesiumWidget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,y6(this);let t=this.scene,n=t.mode;!l(e)||!l(e.position)?(this._needTrackedEntityUpdate=!1,(n===oe.COLUMBUS_VIEW||n===oe.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(n===oe.COLUMBUS_VIEW||n===oe.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(M.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;let t=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(e)?l(t)&&t.animateAppear():l(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,wSe(this._timeline,this.clock,e))}}});Ii.prototype.extend=function(e,t){e(this,t)};Ii.prototype.resize=function(){let e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,o=l(this._animation),r=l(this._timeline);if(e.resize(),n===this._lastWidth&&i===this._lastHeight)return;let s=i-125,a=this._baseLayerPickerDropDown;if(l(a)&&(a.style.maxHeight=`${s}px`),l(this._geocoder)){let g=this._geocoder.searchSuggestionsContainer;g.style.maxHeight=`${s}px`}l(this._infoBox)&&(this._infoBox.viewModel.maxHeight=s);let c=this._timeline,d,u=0,m=0,p=0;if(o&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let g=this._lastWidth;d=this._animation.container,n>900?(u=169,g<=900&&(d.style.width="169px",d.style.height="112px",this._animation.resize())):n>=600?(u=136,(g<600||g>900)&&(d.style.width="136px",d.style.height="90px",this._animation.resize())):(u=106,(g>600||g===0)&&(d.style.width="106px",d.style.height="70px",this._animation.resize())),m=u+5}if(r&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let g=this._fullscreenButton,f=this._vrButton,x=c.container,_=x.style;p=x.clientHeight+3,_.left=`${u}px`;let C=0;l(g)&&(C+=g.container.clientWidth),l(f)&&(C+=f.container.clientWidth),_.right=`${C}px`,c.resize()}this._bottomContainer.style.left=`${m}px`,this._bottomContainer.style.bottom=`${p}px`,this._lastWidth=n,this._lastHeight=i};Ii.prototype.forceResize=function(){this._lastWidth=0,this.resize()};Ii.prototype.render=function(){this._cesiumWidget.render()};Ii.prototype.isDestroyed=function(){return!1};Ii.prototype.destroy=function(){let e;l(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(Tn.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Tn.LEFT_DOUBLE_CLICK));let t=this.dataSources,n=t.length;for(e=0;e<n;e++)this._dataSourceRemoved(t,t.get(e));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),l(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),l(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),l(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),l(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),l(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),l(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),l(this._timeline)&&(this._timeline.removeEventListener("settime",vSe,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),l(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),l(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),l(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),l(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),me(this)};Ii.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Ii.prototype._onEntityCollectionChanged,this)};Ii.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(Ii.prototype._onEntityCollectionChanged,this),l(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),l(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};Ii.prototype._onTick=function(e){let t=e.currentTime,n=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=n);let i=this._entityView;if(l(i)){let u=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(u,!1,My)===mt.DONE&&i.update(t,My)}let o,r=!1,s=this.selectedEntity,a=l(s)&&this._enableInfoOrSelection;a&&s.isShowing&&s.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(s,!0,My)!==mt.FAILED?o=My.center:l(s.position)&&(o=s.position.getValue(t,o)),r=l(o));let c=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(c)&&(c.position=h.clone(o,c.position),c.showSelection=a&&r,c.update());let d=l(this._infoBox)?this._infoBox.viewModel:void 0;l(d)&&(d.showInfo=a,d.enableCamera=r,d.isCameraTracking=this.trackedEntity===this.selectedEntity,a?(d.titleText=y(s.name,s.id),d.description=K.getValueOrDefault(s.description,t,"")):(d.titleText="",d.description=""))};Ii.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.trackedEntity===r&&(this.trackedEntity=void 0),this.selectedEntity===r&&(this.selectedEntity=void 0)}};Ii.prototype._onInfoBoxCameraClicked=function(e){if(e.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let n=this.selectedEntity.position;l(n)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};Ii.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};Ii.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0};Ii.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};Ii.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&wSe(this.timeline,this.clock,e)};Ii.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,Ii.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};Ii.prototype._onDataSourceRemoved=function(e,t){let n=this.clockTrackedDataSource===t,i=t.entities.id;if(this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0,n){let o=e.length;this._automaticallyTrackDataSourceClocks&&o>0?this.clockTrackedDataSource=e.get(o-1):this.clockTrackedDataSource=void 0}};Ii.prototype.zoomTo=function(e,t){return FSe(this,e,{offset:t},!1)};Ii.prototype.flyTo=function(e,t){return FSe(this,e,t,!0)};function FSe(e,t,n,i){y6(e);let o=new Promise(r=>{e._completeZoom=function(s){r(s)}});return e._zoomPromise=o,e._zoomIsFlight=i,e._zoomOptions=n,Promise.resolve(t).then(function(r){if(e._zoomPromise===o){if(r instanceof ma){let s;l(r.imageryProvider)?s=Promise.resolve(r.getImageryRectangle()):s=new Promise(a=>{let c=r.readyEvent.addEventListener(()=>{c(),a(r.getImageryRectangle())})}),s.then(function(a){return hS(a,e.scene)}).then(function(a){e._zoomPromise===o&&(e._zoomTarget=a)});return}if(r instanceof oa||r instanceof CL||r instanceof Iy){e._zoomTarget=r;return}if(r.isLoading&&l(r.loadingEvent)){let s=r.loadingEvent.addEventListener(function(){s(),e._zoomPromise===o&&(e._zoomTarget=r.entities.values.slice(0))});return}if(Array.isArray(r)){e._zoomTarget=r.slice(0);return}r=y(r.values,r),l(r.entities)&&(r=r.entities.values),Array.isArray(r)?e._zoomTarget=r.slice(0):e._zoomTarget=[r]}}),e.scene.requestRender(),o}function lM(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function y6(e){let t=e._zoomPromise;l(t)&&(lM(e),e._completeZoom(!1))}Ii.prototype._postRender=function(){fSt(this),pSt(this)};function fSt(e){let t=e._zoomTarget;if(!l(t)||e.scene.mode===oe.MORPHING)return;let n=e.scene,i=n.camera,o=y(e._zoomOptions,{}),r;function s(u){l(o.offset)||(o.offset=new Yu(0,-.5,u.radius)),r={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyToBoundingSphere(t.boundingSphere,r):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(M.IDENTITY),e._completeZoom(!0)),lM(e)}if(t instanceof CL){if(l(t.boundingSphere)){s(t.boundingSphere);return}let u=t.frameChanged.addEventListener(function(m){s(m.boundingSphere),u()});return}if(t instanceof oa||t instanceof Iy){s(t.boundingSphere);return}if(t instanceof he){r={destination:n.mapProjection.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyTo(r):(i.setView(r),e._completeZoom(!0)),lM(e);return}let a=t,c=[];for(let u=0,m=a.length;u<m;u++){let p=e._dataSourceDisplay.getBoundingSphere(a[u],!1,My);if(p===mt.PENDING)return;p!==mt.FAILED&&c.push(le.clone(My))}if(c.length===0){y6(e);return}e.trackedEntity=void 0;let d=le.fromBoundingSpheres(c);e._zoomIsFlight?(lM(e),i.flyToBoundingSphere(d,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)},offset:o.offset})):(i.viewBoundingSphere(d,o.offset),i.lookAtTransform(M.IDENTITY),lM(e),e._completeZoom(!0))}function pSt(e){if(!e._needTrackedEntityUpdate)return;let t=e._trackedEntity,n=e.clock.currentTime,i=K.getValueOrUndefined(t.position,n);if(!l(i))return;let o=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,My);if(r===mt.PENDING)return;let s=o.mode;(s===oe.COLUMBUS_VIEW||s===oe.SCENE2D)&&(o.screenSpaceCameraController.enableTranslate=!1),(s===oe.COLUMBUS_VIEW||s===oe.SCENE3D)&&(o.screenSpaceCameraController.enableTilt=!1);let a=r!==mt.FAILED?My:void 0;e._entityView=new jP(t,o,o.mapProjection.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}var x6=Ii;var L1o=T(S(),1);function bSt(e){let t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);let n=new vA(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return n}}})}var _6=bSt;var G1o=T(S(),1);function gSt(e){let t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);let n=new AA(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return n}}})}var T6=gSt;var W1o=T(S(),1);function ySt(e,t){t=y(t,y.EMPTY_OBJECT);let n=!0,i=y(t.flyToOnDrop,!0),o=new ge,r=y(t.clearOnDrop,!0),s=y(t.dropTarget,e.container),a=y(t.clampToGround,!0),c=t.proxy;s=In(s),Object.defineProperties(e,{dropTarget:{get:function(){return s},set:function(u){ASe(s,d),s=u,S6(s,d)}},dropEnabled:{get:function(){return n},set:function(u){u!==n&&(u?S6(s,d):ASe(s,d),n=u)}},dropError:{get:function(){return o}},clearOnDrop:{get:function(){return r},set:function(u){r=u}},flyToOnDrop:{get:function(){return i},set:function(u){i=u}},proxy:{get:function(){return c},set:function(u){c=u}},clampToGround:{get:function(){return a},set:function(u){a=u}}});function d(u){gS(u),r&&(e.entities.removeAll(),e.dataSources.removeAll());let m=u.dataTransfer.files,p=m.length;for(let g=0;g<p;g++){let f=m[g],x=new FileReader;x.onload=xSt(e,f,c,a),x.onerror=_St(e,f),x.readAsText(f)}}S6(s,d),e.destroy=cw(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=d}function gS(e){e.stopPropagation(),e.preventDefault()}function ASe(e,t){let n=e;l(n)&&(n.removeEventListener("drop",t,!1),n.removeEventListener("dragenter",gS,!1),n.removeEventListener("dragover",gS,!1),n.removeEventListener("dragexit",gS,!1))}function S6(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",gS,!1),e.addEventListener("dragover",gS,!1),e.addEventListener("dragexit",gS,!1)}function xSt(e,t,n,i){let o=e.scene;return function(r){let s=t.name;try{let a;if(/\.czml$/i.test(s))a=dP.load(JSON.parse(r.target.result),{sourceUri:s});else if(/\.geojson$/i.test(s)||/\.json$/i.test(s)||/\.topojson$/i.test(s))a=ev.load(JSON.parse(r.target.result),{sourceUri:s,clampToGround:i});else if(/\.(kml|kmz)$/i.test(s))a=Iv.load(t,{sourceUri:s,proxy:n,camera:o.camera,canvas:o.canvas,clampToGround:i,screenOverlayContainer:e.container});else if(/\.gpx$/i.test(s))a=ov.load(t,{sourceUri:s,proxy:n});else{e.dropError.raiseEvent(e,s,`Unrecognized file: ${s}`);return}l(a)&&e.dataSources.add(a).then(function(c){e.flyToOnDrop&&e.flyTo(c)}).catch(function(c){e.dropError.raiseEvent(e,s,c)})}catch(a){e.dropError.raiseEvent(e,s,a)}}}function _St(e,t){return function(n){e.dropError.raiseEvent(e,t.name,n.target.error)}}var C6=ySt;var M1o=T(S(),1);function TSt(e,t){t=y(t,y.EMPTY_OBJECT);let n=new QA({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return n}}})}var V6=TSt;var $1o=T(S(),1);var Q1o=T(S(),1);var B1o=T(S(),1);function MSe(e){let t=e.split(` + </div>`,n.appendChild(i);let o=new OA(t);Ce.track(o),Ce.applyBindings(o,n),l(o.defaultLayer)&&(o.currentLayer=o.defaultLayer)}var l6=PSt;var gTo=S(T(),1);var dTo=S(T(),1);var vSt="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",wSt="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function d6(){this._cameraClicked=new ge,this._closeClicked=new ge,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",Ce.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,Ce.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?wSt:vSt}}),Ce.defineProperty(this,"_bodyless",{get:function(){return!l(this.description)||this.description.length===0}})}d6.prototype.maxHeightOffset=function(e){return`${this.maxHeight-e}px`};Object.defineProperties(d6.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var zA=d6;function nY(e){e=In(e);let t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);let n=document.createElement("div");n.className="cesium-infoBox-title",n.setAttribute("data-bind","text: titleText"),t.appendChild(n);let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-infoBox-camera",i.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-infoBox-close",o.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),o.innerHTML="×",t.appendChild(o);let r=document.createElement("iframe");r.className="cesium-infoBox-iframe",r.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),r.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),r.setAttribute("allowfullscreen",!0),t.appendChild(r);let s=new zA;Ce.applyBindings(s,t),this._container=e,this._element=t,this._frame=r,this._viewModel=s,this._descriptionSubscription=void 0;let a=this;r.addEventListener("load",function(){let c=r.contentDocument,d=c.createElement("link");d.href=tn("Widgets/InfoBox/InfoBoxDescription.css"),d.rel="stylesheet",d.type="text/css";let u=c.createElement("div");u.className="cesium-infoBox-description",c.head.appendChild(d),c.body.appendChild(u),a._descriptionSubscription=ga(s,"description",function(m){r.style.height="5px",u.innerHTML=m;let p=null,g=u.firstElementChild;if(g!==null&&u.childNodes.length===1){let x=window.getComputedStyle(g);if(x!==null){let _=x["background-color"],C=Y.fromCssColorString(_);l(C)&&C.alpha!==0&&(p=x["background-color"])}}t.style["background-color"]=p;let f=u.getBoundingClientRect().height;r.style.height=`${f}px`})}),r.setAttribute("src","about:blank")}Object.defineProperties(nY.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});nY.prototype.isDestroyed=function(){return!1};nY.prototype.destroy=function(){let e=this._container;return Ce.cleanNode(this._element),e.removeChild(this._element),l(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),me(this)};var KA=nY;var GTo=S(T(),1);var STo=S(T(),1);function ETe(){this.showInstructions=!1;let e=this;this._command=Vn(function(){e.showInstructions=!e.showInstructions}),this._showClick=Vn(function(){e._touch=!1}),this._showTouch=Vn(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",Ce.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(ETe.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var HA=ETe;function iY(e){let t=In(e.container),n=new HA,i=y(e.instructionsInitiallyVisible,!1);n.showInstructions=i,n._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";let o=document.createElement("span");o.className="cesium-navigationHelpButton-wrapper",t.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),o.appendChild(r);let s=document.createElement("div");s.className="cesium-navigation-help",s.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),o.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-navigation-button cesium-navigation-button-left",a.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');let c=document.createElement("img");c.src=tn("Widgets/Images/NavigationHelp/Mouse.svg"),c.className="cesium-navigation-button-icon",c.style.width="25px",c.style.height="25px",a.appendChild(c),a.appendChild(document.createTextNode("Mouse"));let d=document.createElement("button");d.type="button",d.className="cesium-navigation-button cesium-navigation-button-right",d.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');let u=document.createElement("img");u.src=tn("Widgets/Images/NavigationHelp/Touch.svg"),u.className="cesium-navigation-button-icon",u.style.width="25px",u.style.height="25px",d.appendChild(u),d.appendChild(document.createTextNode("Touch")),s.appendChild(a),s.appendChild(d);let m=document.createElement("div");m.className="cesium-click-navigation-help cesium-navigation-help-instructions",m.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),m.innerHTML=` <table> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/MouseLeft.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/MouseRight.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Right click + drag, or</div> <div class="cesium-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Rotate view</div> <div class="cesium-navigation-help-details">Middle click + drag, or</div> <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>`,s.appendChild(m);let p=document.createElement("div");p.className="cesium-touch-navigation-help cesium-navigation-help-instructions",p.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),p.innerHTML=` <table> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/TouchDrag.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/TouchZoom.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/TouchTilt.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Tilt view</div> <div class="cesium-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="${tn("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-tilt">Rotate view</div> <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>`,s.appendChild(p),Ce.applyBindings(n,o),this._container=t,this._viewModel=n,this._wrapper=o,this._closeInstructions=function(g){o.contains(g.target)||(n.showInstructions=!1)},Yt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(iY.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});iY.prototype.isDestroyed=function(){return!1};iY.prototype.destroy=function(){return Yt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),me(this)};var JA=iY;var DTo=S(T(),1);var wTo=S(T(),1);function u6(e){this._scene=e.scene,this.lowFrameRateMessage=y(e.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,Ce.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let t=this;this._dismissMessage=Vn(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});let n=eA.fromScene(e.scene);this._unsubscribeLowFrameRate=n.lowFrameRate.addEventListener(function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=n.nominalFrameRate.addEventListener(function(){t.showingLowFrameRateMessage=!1})}Object.defineProperties(u6.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});u6.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),me(this)};var QA=u6;function oY(e){let t=In(e.container),n=new QA(e),i=document.createElement("div");i.className="cesium-performance-watchdog-message-area",i.setAttribute("data-bind","visible: showingLowFrameRateMessage");let o=document.createElement("button");o.setAttribute("type","button"),o.className="cesium-performance-watchdog-message-dismiss",o.innerHTML="×",o.setAttribute("data-bind","click: dismissMessage"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-performance-watchdog-message",r.setAttribute("data-bind","html: lowFrameRateMessage"),i.appendChild(r),t.appendChild(i),Ce.applyBindings(n,i),this._container=t,this._viewModel=n,this._element=i}Object.defineProperties(oY.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});oY.prototype.isDestroyed=function(){return!1};oY.prototype.destroy=function(){return this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var jA=oY;var tCo=S(T(),1);var HTo=S(T(),1);function rY(e){this._scene=e,this._orthographic=e.camera.frustum instanceof sn,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,Ce.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let t=this;Ce.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=Vn(function(){t.sceneMode===oe.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new Wr,this._eventHelper.add(e.morphComplete,function(n,i,o,r){t.sceneMode=o,t._orthographic=o===oe.SCENE2D||t._scene.camera.frustum instanceof sn}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=l(e.camera._currentFlight)}),this._switchToPerspective=Vn(function(){t.sceneMode!==oe.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=Vn(function(){t.sceneMode!==oe.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=oe}Object.defineProperties(rY.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}});rY.prototype.isDestroyed=function(){return!1};rY.prototype.destroy=function(){this._eventHelper.removeAll(),me(this)};var qA=rY;var FSt="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",ASt="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function sY(e,t){e=In(e);let n=new qA(t);n._perspectivePath=FSt,n._orthographicPath=ASt;let i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',i.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",r.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),i.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),i.appendChild(s),Ce.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(a){i.contains(a.target)||(n.dropDownVisible=!1)},Yt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(sY.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});sY.prototype.isDestroyed=function(){return!1};sY.prototype.destroy=function(){return this._viewModel.destroy(),Yt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),me(this)};var $A=sY;var pCo=S(T(),1);var cCo=S(T(),1);function aY(e,t){this._scene=e;let n=this,i=function(o,r,s,a){n.sceneMode=s,n.dropDownVisible=!1};this._eventHelper=new Wr,this._eventHelper.add(e.morphStart,i),this._duration=y(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",Ce.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,Ce.defineProperty(this,"selectedTooltip",function(){let o=n.sceneMode;return o===oe.SCENE2D?n.tooltip2D:o===oe.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=Vn(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=Vn(function(){e.morphTo2D(n._duration)}),this._morphTo3D=Vn(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=Vn(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=oe}Object.defineProperties(aY.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}});aY.prototype.isDestroyed=function(){return!1};aY.prototype.destroy=function(){this._eventHelper.removeAll(),me(this)};var eM=aY;var MSt="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",NSt="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",USt="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function cY(e,t,n){e=In(e);let i=new eM(t,n);i._globePath=MSt,i._flatMapPath=NSt,i._columbusViewPath=USt;let o=document.createElement("span");o.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',o.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),o.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),o.appendChild(a);let c=document.createElement("button");c.type="button",c.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",c.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),o.appendChild(c),Ce.applyBindings(i,o),this._viewModel=i,this._container=e,this._wrapper=o,this._closeDropDown=function(d){o.contains(d.target)||(i.dropDownVisible=!1)},Yt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(cY.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});cY.prototype.isDestroyed=function(){return!1};cY.prototype.destroy=function(){return this._viewModel.destroy(),Yt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),me(this)};var tM=cY;var RCo=S(T(),1);var _Co=S(T(),1);var kSt=new D,lY="-1000px";function nM(e,t,n){this._scene=e,this._screenPositionX=lY,this._screenPositionY=lY,this._tweens=e.tweens,this._container=y(n,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,Ce.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,Ce.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&l(this.position)}}),Ce.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,o){return ki.worldToWindowCoordinates(e,i,o)}}nM.prototype.update=function(){if(this.showSelection&&l(this.position)){let e=this.computeScreenSpacePosition(this.position,kSt);if(!l(e))this._screenPositionX=lY,this._screenPositionY=lY;else{let t=this._container,n=t.parentNode.clientWidth,i=t.parentNode.clientHeight,o=this._selectionIndicatorElement.clientWidth,r=o*.5;e.x=Math.min(Math.max(e.x,-o),n+o)-r,e.y=Math.min(Math.max(e.y,-o),i+o)-r,this._screenPositionX=`${Math.floor(e.x+.25)}px`,this._screenPositionY=`${Math.floor(e.y+.25)}px`}}};nM.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Ar.EXPONENTIAL_OUT})};nM.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Ar.EXPONENTIAL_OUT})};Object.defineProperties(nM.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var iM=nM;function dY(e,t){e=In(e),this._container=e;let n=document.createElement("div");n.className="cesium-selection-wrapper",n.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(n),this._element=n;let i="http://www.w3.org/2000/svg",o="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",r=document.createElementNS(i,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");let s=document.createElementNS(i,"g");s.setAttribute("transform","translate(80,80)"),r.appendChild(s);let a=document.createElementNS(i,"path");a.setAttribute("data-bind","attr: { transform: _transform }"),a.setAttribute("d",o),s.appendChild(a),n.appendChild(r);let c=new iM(t,this._element,this._container);this._viewModel=c,Ce.applyBindings(this._viewModel,this._element)}Object.defineProperties(dY.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});dY.prototype.isDestroyed=function(){return!1};dY.prototype.destroy=function(){let e=this._container;return Ce.cleanNode(this._element),e.removeChild(this._element),me(this)};var oM=dY;var NCo=S(T(),1);var WCo=S(T(),1);function pT(e,t,n){this._color=e,this._height=t,this._base=y(n,0)}pT.prototype.getHeight=function(){return this._height};pT.prototype.getBase=function(){return this._base};pT.prototype.getStartTime=function(){return this._start};pT.prototype.getStopTime=function(){return this._stop};pT.prototype.setRange=function(e,t){this._start=e,this._stop=t};pT.prototype.render=function(e){let t="";if(this._start&&this._stop&&this._color){let n=ne.secondsDifference(this._start,e.epochJulian),i=Math.round(e.timeBarWidth*e.getAlpha(n)),o=ne.secondsDifference(this._stop,e.epochJulian),r=Math.round(e.timeBarWidth*e.getAlpha(o))-i;i<0&&(r+=i,i=0),i+r>e.timeBarWidth&&(r=e.timeBarWidth-i),r>0&&(t=`<span class="cesium-timeline-highlight" style="left: ${i.toString()}px; width: ${r.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return t};var rM=pT;var PCo=S(T(),1);function WTe(e,t,n,i){this.interval=e,this.height=t,this.color=n||new Y(.5,.5,.5,1),this.backgroundColor=i||new Y(0,0,0,0)}WTe.prototype.render=function(e,t){let n=this.interval.start,i=this.interval.stop,o=t.startJulian,r=ne.addSeconds(t.startJulian,t.duration,new ne);if(ne.lessThan(n,o)&&ne.greaterThan(i,r))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(ne.lessThanOrEquals(n,r)&&ne.greaterThanOrEquals(i,o)){let s,a,c;for(s=0;s<t.timeBarWidth;++s){let d=ne.addSeconds(t.startJulian,s/t.timeBarWidth*t.duration,new ne);!l(a)&&ne.greaterThanOrEquals(d,n)?a=s:!l(c)&&ne.greaterThanOrEquals(d,i)&&(c=s)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),l(a)&&(l(c)||(c=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(a,t.y,Math.max(c-a,1),this.height))}};var sM=WTe;var m6=1e12,cm={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},ll={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},Fy=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],DSt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dl(e,t){e=In(e);let n=e.ownerDocument;this.container=e;let i=n.createElement("div");i.className="cesium-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=cm.none,this._touchMode=ll.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=BSt(this),this._onMouseUp=YSt(this),this._onMouseMove=OSt(this),this._onMouseWheel=zSt(this),this._onTouchStart=KSt(this),this._onTouchMove=JSt(this),this._onTouchEnd=HSt(this);let o=this._timeBarEle;n.addEventListener("mouseup",this._onMouseUp,!1),n.addEventListener("mousemove",this._onMouseMove,!1),o.addEventListener("mousedown",this._onMouseDown,!1),o.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),o.addEventListener("mousewheel",this._onMouseWheel,!1),o.addEventListener("touchstart",this._onTouchStart,!1),o.addEventListener("touchmove",this._onTouchMove,!1),o.addEventListener("touchend",this._onTouchEnd,!1),o.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}dl.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)};dl.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)};dl.prototype.isDestroyed=function(){return!1};dl.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);let t=this._timeBarEle;t.removeEventListener("mousedown",this._onMouseDown,!1),t.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),t.removeEventListener("mousewheel",this._onMouseWheel,!1),t.removeEventListener("touchstart",this._onTouchStart,!1),t.removeEventListener("touchmove",this._onTouchMove,!1),t.removeEventListener("touchend",this._onTouchEnd,!1),t.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),me(this)};dl.prototype.addHighlightRange=function(e,t,n){let i=new rM(e,t,n);return this._highlightRanges.push(i),this.resize(),i};dl.prototype.addTrack=function(e,t,n,i){let o=new sM(e,t,n,i);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o};dl.prototype.zoomTo=function(e,t){if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=ne.secondsDifference(t,e),this._clock&&this._clock.clockRange!==wr.UNBOUNDED){let i=this._clock.startTime,o=this._clock.stopTime,r=ne.secondsDifference(o,i),s=ne.secondsDifference(i,this._startJulian),a=ne.secondsDifference(o,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):s>0?(this._endJulian=ne.addSeconds(this._endJulian,s,new ne),this._startJulian=i,this._timeBarSecondsSpan=ne.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=ne.addSeconds(this._startJulian,a,new ne),this._endJulian=o,this._timeBarSecondsSpan=ne.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let n=document.createEvent("Event");n.initEvent("setzoom",!0,!0),n.startJulian=this._startJulian,n.endJulian=this._endJulian,n.epochJulian=this._epochJulian,n.totalSpan=this._timeBarSecondsSpan,n.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(n)};dl.prototype.zoomFrom=function(e){let t=ne.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=this._timeBarSecondsSpan*.5:t+=t-this._timeBarSecondsSpan*.5;let n=this._timeBarSecondsSpan-t;this.zoomTo(ne.addSeconds(this._startJulian,t-t*e,new ne),ne.addSeconds(this._endJulian,n*e-n,new ne))};function h6(e){return e<10?`0${e.toString()}`:e.toString()}dl.prototype.makeLabel=function(e){let t=ne.toGregorianDate(e),n=t.millisecond,i=" UTC";if(n>0&&this._timeBarSecondsSpan<3600){for(i=Math.floor(n).toString();i.length<3;)i=`0${i}`;i=`.${i}`}return`${DSt[t.month-1]} ${t.day} ${t.year} ${h6(t.hour)}:${h6(t.minute)}:${h6(t.second)}${i}`};dl.prototype.smallestTicInPixels=7;dl.prototype._makeTics=function(){let e=this._timeBarEle,t=ne.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),i=n-8,o,r=this;this._needleEle.style.left=`${n.toString()}px`;let s="",a=.01,c=31536e6,d=1e-10,u=0,m=this._timeBarSecondsSpan;m<a?(m=a,this._timeBarSecondsSpan=a,this._endJulian=ne.addSeconds(this._startJulian,a,new ne)):m>c&&(m=c,this._timeBarSecondsSpan=c,this._endJulian=ne.addSeconds(this._startJulian,c,new ne));let p=this._timeBarEle.clientWidth;p<10&&(p=10);let g=this._startJulian,f=Math.min(m/p*1e-5,.4),x,_=ne.toGregorianDate(g);m>31536e4?x=ne.fromDate(new Date(Date.UTC(Math.floor(_.year/100)*100,0))):m>31536e3?x=ne.fromDate(new Date(Date.UTC(Math.floor(_.year/10)*10,0))):m>86400?x=ne.fromDate(new Date(Date.UTC(_.year,0))):x=ne.fromDate(new Date(Date.UTC(_.year,_.month,_.day)));let C=ne.secondsDifference(this._startJulian,ne.addSeconds(x,f,new ne)),V=C+m;this._epochJulian=x;function Z(U){return Math.floor(C/U)*U}function R(U,J){return Math.ceil(U/J+.5)*J}function G(U){return(U-C)/m}function W(U,J){return U-J*Math.round(U/J)}this._rulerEle.innerHTML=this.makeLabel(ne.addSeconds(this._endJulian,-a,new ne));let v=this._rulerEle.offsetWidth+20;v<30&&(v=180);let P=u;u-=d;let F={startTime:C,startJulian:g,epochJulian:x,duration:m,timeBarWidth:p,getAlpha:G};this._highlightRanges.forEach(function(U){s+=U.render(F)});let M=0,b=0,L=0,E=v/p;E>1&&(E=1),E*=this._timeBarSecondsSpan;let I=-1,w=-1,N=Fy.length,B;for(B=0;B<N;++B){let U=Fy[B];if(++I,M=U,U>E&&U>u)break;w<0&&p*(U/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(w=I)}if(I>0){for(;I>0;)if(--I,Math.abs(W(M,Fy[I]))<1e-5){Fy[I]>=u&&(b=Fy[I]);break}if(w>=0)for(;w<I;){if(Math.abs(W(b,Fy[w]))<1e-5&&Fy[w]>=u){L=Fy[w];break}++w}}u=P,u>d&&L<1e-5&&Math.abs(u-M)>d&&(L=u,u<=M+d&&(b=0));let k=-999999,O;if(p*(L/this._timeBarSecondsSpan)>=3)for(o=Z(L);o<=V;o=R(o,L))s+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(p*G(o)).toString()}px;"></span>`;if(p*(b/this._timeBarSecondsSpan)>=3)for(o=Z(b);o<=V;o=R(o,b))s+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(p*G(o)).toString()}px;"></span>`;if(p*(M/this._timeBarSecondsSpan)>=2){this._mainTicSpan=M,V+=M,o=Z(M);let U=ne.computeTaiMinusUtc(x);for(;o<=V;){let J=ne.addSeconds(g,o-C,new ne);if(M>2.1){let j=ne.computeTaiMinusUtc(J);Math.abs(j-U)>.1&&(o+=j-U,J=ne.addSeconds(g,o-C,new ne))}let z=Math.round(p*G(o)),ee=this.makeLabel(J);this._rulerEle.innerHTML=ee,O=this._rulerEle.offsetWidth,O<10&&(O=v);let K=z-(O/2-1);K>k?(k=K+O+5,s+=`<span class="cesium-timeline-ticMain" style="left: ${z.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${K.toString()}px;">${ee}</span>`):s+=`<span class="cesium-timeline-ticSub" style="left: ${z.toString()}px;"></span>`,o=R(o,M)}}else this._mainTicSpan=-1;s+=`<span class="cesium-timeline-icon16" style="left:${i}px;bottom:0;background-position: 0 0;"></span>`,e.innerHTML=s,this._scrubElement=e.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),F.y=0,this._trackList.forEach(function(U){U.render(r._context,F),F.y+=U.height})};dl.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let e=this._scrubElement;if(l(this._scrubElement)){let t=ne.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==n&&(this._lastXPos=n,e.style.left=`${n-8}px`,this._needleEle.style.left=`${n}px`)}l(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(ne.addSeconds(this._startJulian,this._timelineDrag,new ne),ne.addSeconds(this._endJulian,this._timelineDrag,new ne)))};dl.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=ne.addSeconds(this._startJulian,t,new ne),this._scrubElement){let i=e-8;this._scrubElement.style.left=`${i.toString()}px`,this._needleEle.style.left=`${e.toString()}px`}let n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)};function BSt(e){return function(t){e._mouseMode!==cm.touchOnly&&(t.button===0?(e._mouseMode=cm.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=cm.zoom:e._mouseMode=cm.slide)),t.preventDefault()}}function YSt(e){return function(t){e._mouseMode=cm.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function OSt(e){return function(t){let n;if(e._mouseMode===cm.scrub){t.preventDefault();let i=t.clientX-e._topDiv.getBoundingClientRect().left;i<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):i>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===cm.slide){if(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0){let i=n*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(ne.addSeconds(e._startJulian,i,new ne),ne.addSeconds(e._endJulian,i,new ne))}}else e._mouseMode===cm.zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0&&e.zoomFrom(Math.pow(1.01,n)))}}function zSt(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;m6=Math.max(Math.min(Math.abs(n),m6),1),n/=m6,e.zoomFrom(Math.pow(1.05,-n))}}function KSt(e){return function(t){let n=t.touches.length,i,o,r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=cm.touchOnly,n===1?(i=ne.secondsDifference(e._scrubJulian,e._startJulian),o=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+r),Math.abs(t.touches[0].clientX-o)<50?(e._touchMode=ll.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=n===1?"-16px 0":"0 0")):(e._touchMode=ll.singleTap,e._touchState.centerX=t.touches[0].clientX-r)):n===2?(e._touchMode=ll.slideZoom,e._touchState.centerX=(t.touches[0].clientX+t.touches[1].clientX)*.5-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=ll.ignore}}function HSt(e){return function(t){let n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===ll.singleTap?(e._touchMode=ll.scrub,e._onTouchMove(t)):e._touchMode===ll.scrub&&e._onTouchMove(t),e._mouseMode=cm.touchOnly,n!==1?e._touchMode=n>0?ll.ignore:ll.none:e._touchMode===ll.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function JSt(e){return function(t){let n,i,o,r,s,a,c=1,d=e._topDiv.getBoundingClientRect().left;e._touchMode===ll.singleTap&&(e._touchMode=ll.slideZoom),e._mouseMode=cm.touchOnly,e._touchMode===ll.scrub?(t.preventDefault(),t.changedTouches.length===1&&(i=t.changedTouches[0].clientX-d,i>=0&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===ll.slideZoom&&(o=t.touches.length,o===2?(r=(t.touches[0].clientX+t.touches[1].clientX)*.5-d,s=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):o===1&&(r=t.touches[0].clientX-d,s=0),l(r)&&(s>0&&e._touchState.spanX>0?(c=e._touchState.spanX/s,a=ne.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new ne)):(n=e._touchState.centerX-r,a=ne.addSeconds(e._startJulian,n*e._timeBarSecondsSpan/e._topDiv.clientWidth,new ne)),e.zoomTo(a,ne.addSeconds(a,e._timeBarSecondsSpan*c,new ne)),e._touchState.centerX=r,e._touchState.spanX=s))}}dl.prototype.resize=function(){let e=this.container.clientWidth,t=this.container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;this._trackContainer.style.height=`${t}px`;let n=1;this._trackList.forEach(function(i){n+=i.height}),this._trackListEle.style.height=`${n.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=n,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t};var aM=dl;var n1o=S(T(),1);var JCo=S(T(),1);var wTe=S(vTe(),1);function qSt(e){let t=!1,n=window.screen;return l(n)&&(l(n.lockOrientation)?t=n.lockOrientation(e):l(n.mozLockOrientation)?t=n.mozLockOrientation(e):l(n.msLockOrientation)?t=n.msLockOrientation(e):l(n.orientation&&n.orientation.lock)&&(t=n.orientation.lock(e))),t}function FTe(){let e=window.screen;l(e)&&(l(e.unlockOrientation)?e.unlockOrientation():l(e.mozUnlockOrientation)?e.mozUnlockOrientation():l(e.msUnlockOrientation)?e.msUnlockOrientation():l(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function $St(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(FTe(),e._locked=!1),e._noSleep.disable(),mr.exitFullscreen(),n(!1)):(mr.fullscreen||mr.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=qSt("landscape")),t.useWebVR=!0,n(!0)))}function uY(e,t){let n=this,i=Ce.observable(mr.enabled),o=Ce.observable(!1);this.isVRMode=void 0,Ce.defineProperty(this,"isVRMode",{get:function(){return o()}}),this.isVREnabled=void 0,Ce.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(s){i(s&&mr.enabled)}}),this.tooltip=void 0,Ce.defineProperty(this,"tooltip",function(){return i()?o()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let r=Ce.observable(!1);this._isOrthographic=void 0,Ce.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new Wr,this._eventHelper.add(e.preRender,function(){r(e.camera.frustum instanceof sn)}),this._locked=!1,this._noSleep=new wTe.default,this._command=Vn(function(){$St(n,e,o,r)},Ce.getObservable(this,"isVREnabled")),this._vrElement=y(In(t),document.body),this._callback=function(){!mr.fullscreen&&o()&&(e.useWebVR=!1,n._locked&&(FTe(),n._locked=!1),n._noSleep.disable(),o(!1))},document.addEventListener(mr.changeEventName,this._callback)}Object.defineProperties(uY.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}});uY.prototype.isDestroyed=function(){return!1};uY.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(mr.changeEventName,this._callback),me(this)};var cM=uY;var eTt="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",tTt="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function mY(e,t,n){e=In(e);let i=new cM(t,n);i._exitVRPath=tTt,i._enterVRPath=eTt;let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-vrButton",o.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(o),Ce.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(mY.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});mY.prototype.isDestroyed=function(){return!1};mY.prototype.destroy=function(){return this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var lM=mY;var V1o=S(T(),1);var Ay=new le;function NTe(e){let t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function nTt(e){let t=e.getPropertyIds(),n="";return t.forEach(function(i){let o=e.getProperty(i);l(o)&&(n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}),n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function iTt(e){let t,n=[],i=e.getPropertyIds();for(t=0;t<i.length;t++){let r=i[t];/^name$/i.test(r)?n[0]=e.getProperty(r):/name/i.test(r)?n[1]=e.getProperty(r):/^title$/i.test(r)?n[2]=e.getProperty(r):/^(id|identifier)$/i.test(r)?n[3]=e.getProperty(r):/element/i.test(r)?n[4]=e.getProperty(r):/(id|identifier)$/i.test(r)&&(n[5]=e.getProperty(r))}let o=n.length;for(t=0;t<o;t++){let r=n[t];if(l(r)&&r!=="")return r}return"Unnamed Feature"}function ATe(e,t){let n=e.scene.pick(t.position);if(l(n)){let i=y(n.id,n.primitive.id);if(i instanceof Jo)return i;if(n instanceof Ps)return new Jo({name:iTt(n),description:nTt(n),feature:n})}if(l(e.scene.globe))return sTt(e,t.position)}var oTt=new ne;function UTe(e,t,n){if(l(n)){let i=n.clock;if(l(i)&&(i.getValue(t),l(e))){let o=i.startTime,r=i.stopTime;ne.equals(o,r)&&(r=ne.addSeconds(o,X.EPSILON2,oTt)),e.updateFromClock(),e.zoomTo(o,r)}}}var rTt=new h;function sTt(e,t){let n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!l(o))return;let r=new Jo({id:"Loading...",description:"Loading feature information..."});return o.then(function(s){if(e.selectedEntity!==r)return;if(!l(s)||s.length===0){e.selectedEntity=MTe();return}let a=s[0],c=new Jo({id:a.name,description:a.description});if(l(a.position)){let d=e.scene.ellipsoid.cartographicToCartesian(a.position,rTt);c.position=new Ac(d)}e.selectedEntity=c},function(){e.selectedEntity===r&&(e.selectedEntity=MTe())}),r}function MTe(){return new Jo({id:"None",description:"No features found."})}function aTt(e,t){let n=e._geocoder,i=e._homeButton,o=e._sceneModePicker,r=e._projectionPicker,s=e._baseLayerPicker,a=e._animation,c=e._timeline,d=e._fullscreenButton,u=e._infoBox,m=e._selectionIndicator,p=t?"hidden":"visible";if(l(n)&&(n.container.style.visibility=p),l(i)&&(i.container.style.visibility=p),l(o)&&(o.container.style.visibility=p),l(r)&&(r.container.style.visibility=p),l(s)&&(s.container.style.visibility=p),l(a)&&(a.container.style.visibility=p),l(c)&&(c.container.style.visibility=p),l(d)&&d.viewModel.isFullscreenEnabled&&(d.container.style.visibility=p),l(u)&&(u.container.style.visibility=p),l(m)&&(m.container.style.visibility=p),e._container){let g=t||!l(d)?0:d.container.clientWidth;e._vrButton.container.style.right=`${g}px`,e.forceResize()}}function Xi(e,t){e=In(e),t=y(t,y.EMPTY_OBJECT);let n=(!l(t.globe)||t.globe!==!1)&&(!l(t.baseLayerPicker)||t.baseLayerPicker!==!1),i=this,o=document.createElement("div");o.className="cesium-viewer",e.appendChild(o);let r=document.createElement("div");r.className="cesium-viewer-cesiumWidgetContainer",o.appendChild(r);let s=document.createElement("div");s.className="cesium-viewer-bottom",o.appendChild(s);let a=y(t.scene3DOnly,!1),c,d,u=!1;l(t.clockViewModel)?(d=t.clockViewModel,c=d.clock):(c=new jm,d=new TA(c),u=!0),l(t.shouldAnimate)&&(c.shouldAnimate=t.shouldAnimate);let m=new P9(r,{baseLayer:n&&l(t.selectedImageryProviderViewModel)||l(t.baseLayer)||l(t.imageryProvider)?!1:void 0,clock:c,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,ellipsoid:t.ellipsoid,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:l(t.creditContainer)?t.creditContainer:s,creditViewport:t.creditViewport,scene3DOnly:a,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,blurActiveElementOnCanvasFocus:t.blurActiveElementOnCanvasFocus,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples}),p=t.dataSources,g=!1;l(p)||(p=new mP,g=!0);let f=m.scene,x=new QP({scene:f,dataSourceCollection:p}),_=new Wr;_.add(c.onTick,Xi.prototype._onTick,this),_.add(f.morphStart,Xi.prototype._clearTrackedObject,this);let C;if(!l(t.selectionIndicator)||t.selectionIndicator!==!1){let z=document.createElement("div");z.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(z),C=new oM(z,f)}let V;if(!l(t.infoBox)||t.infoBox!==!1){let z=document.createElement("div");z.className="cesium-viewer-infoBoxContainer",o.appendChild(z),V=new KA(z);let ee=V.viewModel;_.add(ee.cameraClicked,Xi.prototype._onInfoBoxCameraClicked,this),_.add(ee.closeClicked,Xi.prototype._onInfoBoxClockClicked,this)}let Z=document.createElement("div");Z.className="cesium-viewer-toolbar",o.appendChild(Z);let R;if(!l(t.geocoder)||t.geocoder!==!1){let z=document.createElement("div");z.className="cesium-viewer-geocoderContainer",Z.appendChild(z);let ee;l(t.geocoder)&&typeof t.geocoder!="boolean"&&(ee=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),R=new YA({container:z,geocoderServices:ee,scene:f}),_.add(R.viewModel.search.beforeExecute,Xi.prototype._clearObjects,this)}let G;(!l(t.homeButton)||t.homeButton!==!1)&&(G=new DA(Z,f),l(R)&&_.add(G.viewModel.command.afterExecute,function(){let z=R.viewModel;z.searchText="",z.isSearchInProgress&&z.search()}),_.add(G.viewModel.command.beforeExecute,Xi.prototype._clearTrackedObject,this));let W;!a&&(!l(t.sceneModePicker)||t.sceneModePicker!==!1)&&(W=new tM(Z,f));let v;t.projectionPicker&&(v=new $A(Z,f));let P,F;if(n){let z=y(t.imageryProviderViewModels,WA()),ee=y(t.terrainProviderViewModels,IA());P=new EA(Z,{globe:f.globe,imageryProviderViewModels:z,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:ee,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),F=Z.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}l(t.baseLayer)&&t.baseLayer!==!1&&(n&&(P.viewModel.selectedImagery=void 0),f.imageryLayers.removeAll(),f.imageryLayers.add(t.baseLayer)),l(t.terrainProvider)&&(n&&(P.viewModel.selectedTerrain=void 0),f.terrainProvider=t.terrainProvider),l(t.terrain)&&(n&&(f.globe.depthTestAgainstTerrain=!0),f.setTerrain(t.terrain));let M;if(!l(t.navigationHelpButton)||t.navigationHelpButton!==!1){let z=!0;try{if(l(window.localStorage)){let ee=window.localStorage.getItem("cesium-hasSeenNavHelp");l(ee)&&ee?z=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}M=new JA({container:Z,instructionsInitiallyVisible:y(t.navigationInstructionsInitiallyVisible,z)})}let b;if(!l(t.animation)||t.animation!==!1){let z=document.createElement("div");z.className="cesium-viewer-animationContainer",o.appendChild(z),b=new LA(z,new RA(d))}let L;if(!l(t.timeline)||t.timeline!==!1){let z=document.createElement("div");z.className="cesium-viewer-timelineContainer",o.appendChild(z),L=new aM(z,c),L.addEventListener("settime",NTe,!1),L.zoomTo(c.startTime,c.stopTime)}let E,I,w;(!l(t.fullscreenButton)||t.fullscreenButton!==!1)&&(w=document.createElement("div"),w.className="cesium-viewer-fullscreenContainer",o.appendChild(w),E=new UA(w,t.fullscreenElement),I=ga(E.viewModel,"isFullscreenEnabled",function(z){w.style.display=z?"block":"none",l(L)&&(L.container.style.right=`${w.clientWidth}px`,L.resize())}));let N,B,k;if(t.vrButton){let z=document.createElement("div");z.className="cesium-viewer-vrContainer",o.appendChild(z),N=new lM(z,f,t.fullScreenElement),B=ga(N.viewModel,"isVREnabled",function(ee){z.style.display=ee?"block":"none",l(E)&&(z.style.right=`${w.clientWidth}px`),l(L)&&(L.container.style.right=`${z.clientWidth}px`,L.resize())}),k=ga(N.viewModel,"isVRMode",function(ee){aTt(i,ee)})}this._baseLayerPickerDropDown=F,this._fullscreenSubscription=I,this._vrSubscription=B,this._vrModeSubscription=k,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=y(t.automaticallyTrackDataSourceClocks,!0),this._container=e,this._bottomContainer=s,this._element=o,this._cesiumWidget=m,this._selectionIndicator=C,this._infoBox=V,this._dataSourceCollection=p,this._destroyDataSourceCollection=g,this._dataSourceDisplay=x,this._clockViewModel=d,this._destroyClockViewModel=u,this._toolbar=Z,this._homeButton=G,this._sceneModePicker=W,this._projectionPicker=v,this._baseLayerPicker=P,this._navigationHelpButton=M,this._animation=b,this._timeline=L,this._fullscreenButton=E,this._vrButton=N,this._geocoder=R,this._eventHelper=_,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=l(V)||l(C),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new ge,this._trackedEntityChanged=new ge,Ce.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),_.add(p.dataSourceAdded,Xi.prototype._onDataSourceAdded,this),_.add(p.dataSourceRemoved,Xi.prototype._onDataSourceRemoved,this),_.add(f.postUpdate,Xi.prototype.resize,this),_.add(f.postRender,Xi.prototype._postRender,this);let O=p.length;for(let z=0;z<O;z++)this._dataSourceAdded(p,p.get(z));this._dataSourceAdded(void 0,x.defaultDataSource),_.add(p.dataSourceAdded,Xi.prototype._dataSourceAdded,this),_.add(p.dataSourceRemoved,Xi.prototype._dataSourceRemoved,this);function U(z){let ee=ATe(i,z);l(ee)?H.getValueOrUndefined(ee.position,i.clock.currentTime)?i.trackedEntity=ee:i.zoomTo(ee):l(i.trackedEntity)&&(i.trackedEntity=void 0)}function J(z){i.selectedEntity=ATe(i,z)}m.screenSpaceEventHandler.setInputAction(J,Sn.LEFT_CLICK),m.screenSpaceEventHandler.setInputAction(U,Sn.LEFT_DOUBLE_CLICK)}Object.defineProperties(Xi.prototype,{container:{get:function(){return this._container}},creditDisplay:{get:function(){return this._cesiumWidget.creditDisplay}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e}},camera:{get:function(){return this.scene.camera}},ellipsoid:{get:function(){return this._scene.ellipsoid}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(e){this._cesiumWidget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,g6(this);let t=this.scene,n=t.mode;!l(e)||!l(e.position)?(this._needTrackedEntityUpdate=!1,(n===oe.COLUMBUS_VIEW||n===oe.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(n===oe.COLUMBUS_VIEW||n===oe.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(A.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;let t=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(e)?l(t)&&t.animateAppear():l(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,UTe(this._timeline,this.clock,e))}}});Xi.prototype.extend=function(e,t){e(this,t)};Xi.prototype.resize=function(){let e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,o=l(this._animation),r=l(this._timeline);if(e.resize(),n===this._lastWidth&&i===this._lastHeight)return;let s=i-125,a=this._baseLayerPickerDropDown;if(l(a)&&(a.style.maxHeight=`${s}px`),l(this._geocoder)){let f=this._geocoder.searchSuggestionsContainer;f.style.maxHeight=`${s}px`}l(this._infoBox)&&(this._infoBox.viewModel.maxHeight=s);let c=this._timeline,d,u=0,m=5,p=3,g=0;if(o&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let f=this._lastWidth;d=this._animation.container,n>900?(u=169,f<=900&&(d.style.width="169px",d.style.height="112px",this._animation.resize())):n>=600?(u=136,(f<600||f>900)&&(d.style.width="136px",d.style.height="90px",this._animation.resize())):(u=106,(f>600||f===0)&&(d.style.width="106px",d.style.height="70px",this._animation.resize())),m=u+5}if(r&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let f=this._fullscreenButton,x=this._vrButton,_=c.container,C=_.style;p=_.clientHeight+3,C.left=`${u}px`;let V=0;l(f)&&(V+=f.container.clientWidth),l(x)&&(V+=x.container.clientWidth),C.right=`${V}px`,c.resize()}!r&&l(this._fullscreenButton)&&(g=this._fullscreenButton.container.clientWidth),this._bottomContainer.style.left=`${m}px`,this._bottomContainer.style.bottom=`${p}px`,this._bottomContainer.style.right=`${g}px`,this._lastWidth=n,this._lastHeight=i};Xi.prototype.forceResize=function(){this._lastWidth=0,this.resize()};Xi.prototype.render=function(){this._cesiumWidget.render()};Xi.prototype.isDestroyed=function(){return!1};Xi.prototype.destroy=function(){let e;l(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(Sn.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Sn.LEFT_DOUBLE_CLICK));let t=this.dataSources,n=t.length;for(e=0;e<n;e++)this._dataSourceRemoved(t,t.get(e));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),l(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),l(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),l(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),l(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),l(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),l(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),l(this._timeline)&&(this._timeline.removeEventListener("settime",NTe,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),l(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),l(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),l(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),l(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),me(this)};Xi.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Xi.prototype._onEntityCollectionChanged,this)};Xi.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(Xi.prototype._onEntityCollectionChanged,this),l(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),l(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};Xi.prototype._onTick=function(e){let t=e.currentTime,n=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=n);let i=this._entityView;if(l(i)){let u=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(u,!1,Ay)===mt.DONE&&i.update(t,Ay)}let o,r=!1,s=this.selectedEntity,a=l(s)&&this._enableInfoOrSelection;a&&s.isShowing&&s.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(s,!0,Ay)!==mt.FAILED?o=Ay.center:l(s.position)&&(o=s.position.getValue(t,o)),r=l(o));let c=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(c)&&(c.position=h.clone(o,c.position),c.showSelection=a&&r,c.update());let d=l(this._infoBox)?this._infoBox.viewModel:void 0;l(d)&&(d.showInfo=a,d.enableCamera=r,d.isCameraTracking=this.trackedEntity===this.selectedEntity,a?(d.titleText=y(s.name,s.id),d.description=H.getValueOrDefault(s.description,t,"")):(d.titleText="",d.description=""))};Xi.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.trackedEntity===r&&(this.trackedEntity=void 0),this.selectedEntity===r&&(this.selectedEntity=void 0)}};Xi.prototype._onInfoBoxCameraClicked=function(e){if(e.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let n=this.selectedEntity.position;l(n)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};Xi.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};Xi.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0};Xi.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};Xi.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&UTe(this.timeline,this.clock,e)};Xi.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,Xi.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};Xi.prototype._onDataSourceRemoved=function(e,t){let n=this.clockTrackedDataSource===t,i=t.entities.id;if(this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0,n){let o=e.length;this._automaticallyTrackDataSourceClocks&&o>0?this.clockTrackedDataSource=e.get(o-1):this.clockTrackedDataSource=void 0}};Xi.prototype.zoomTo=function(e,t){return kTe(this,e,{offset:t},!1)};Xi.prototype.flyTo=function(e,t){return kTe(this,e,t,!0)};function kTe(e,t,n,i){g6(e);let o=new Promise(r=>{e._completeZoom=function(s){r(s)}});return e._zoomPromise=o,e._zoomIsFlight=i,e._zoomOptions=n,Promise.resolve(t).then(function(r){if(e._zoomPromise===o){if(r instanceof ma){let s;l(r.imageryProvider)?s=Promise.resolve(r.getImageryRectangle()):s=new Promise(a=>{let c=r.readyEvent.addEventListener(()=>{c(),a(r.getImageryRectangle())})}),s.then(function(a){return mT(a,e.scene)}).then(function(a){e._zoomPromise===o&&(e._zoomTarget=a)});return}if(r instanceof ra||r instanceof CZ||r instanceof Ty){e._zoomTarget=r;return}if(r.isLoading&&l(r.loadingEvent)){let s=r.loadingEvent.addEventListener(function(){s(),e._zoomPromise===o&&(e._zoomTarget=r.entities.values.slice(0))});return}if(Array.isArray(r)){e._zoomTarget=r.slice(0);return}r=y(r.values,r),l(r.entities)&&(r=r.entities.values),Array.isArray(r)?e._zoomTarget=r.slice(0):e._zoomTarget=[r]}}),e.scene.requestRender(),o}function dM(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function g6(e){let t=e._zoomPromise;l(t)&&(dM(e),e._completeZoom(!1))}Xi.prototype._postRender=function(){cTt(this),lTt(this)};function cTt(e){let t=e._zoomTarget;if(!l(t)||e.scene.mode===oe.MORPHING)return;let n=e.scene,i=n.camera,o=y(e._zoomOptions,{}),r;function s(u){l(o.offset)||(o.offset=new Bu(0,-.5,u.radius)),r={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyToBoundingSphere(t.boundingSphere,r):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(A.IDENTITY),e._completeZoom(!0)),dM(e)}if(t instanceof CZ){if(l(t.boundingSphere)){s(t.boundingSphere);return}let u=t.frameChanged.addEventListener(function(m){s(m.boundingSphere),u()});return}if(t instanceof ra||t instanceof Ty){s(t.boundingSphere);return}if(t instanceof he){r={destination:n.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyTo(r):(i.setView(r),e._completeZoom(!0)),dM(e);return}let a=t,c=[];for(let u=0,m=a.length;u<m;u++){let p=e._dataSourceDisplay.getBoundingSphere(a[u],!1,Ay);if(p===mt.PENDING)return;p!==mt.FAILED&&c.push(le.clone(Ay))}if(c.length===0){g6(e);return}e.trackedEntity=void 0;let d=le.fromBoundingSpheres(c);e._zoomIsFlight?(dM(e),i.flyToBoundingSphere(d,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)},offset:o.offset})):(i.viewBoundingSphere(d,o.offset),i.lookAtTransform(A.IDENTITY),dM(e),e._completeZoom(!0))}function lTt(e){if(!e._needTrackedEntityUpdate)return;let t=e._trackedEntity,n=e.clock.currentTime,i=H.getValueOrUndefined(t.position,n);if(!l(i))return;let o=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,Ay);if(r===mt.PENDING)return;let s=o.mode;(s===oe.COLUMBUS_VIEW||s===oe.SCENE2D)&&(o.screenSpaceCameraController.enableTranslate=!1),(s===oe.COLUMBUS_VIEW||s===oe.SCENE3D)&&(o.screenSpaceCameraController.enableTilt=!1);let a=r!==mt.FAILED?Ay:void 0;e._entityView=new qP(t,o,o.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}var y6=Xi;var R1o=S(T(),1);function dTt(e){let t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);let n=new MA(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return n}}})}var x6=dTt;var W1o=S(T(),1);function uTt(e){let t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);let n=new vA(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return n}}})}var _6=uTt;var v1o=S(T(),1);function mTt(e,t){t=y(t,y.EMPTY_OBJECT);let n=!0,i=y(t.flyToOnDrop,!0),o=new ge,r=y(t.clearOnDrop,!0),s=y(t.dropTarget,e.container),a=y(t.clampToGround,!0),c=t.proxy;s=In(s),Object.defineProperties(e,{dropTarget:{get:function(){return s},set:function(u){DTe(s,d),s=u,S6(s,d)}},dropEnabled:{get:function(){return n},set:function(u){u!==n&&(u?S6(s,d):DTe(s,d),n=u)}},dropError:{get:function(){return o}},clearOnDrop:{get:function(){return r},set:function(u){r=u}},flyToOnDrop:{get:function(){return i},set:function(u){i=u}},proxy:{get:function(){return c},set:function(u){c=u}},clampToGround:{get:function(){return a},set:function(u){a=u}}});function d(u){bT(u),r&&(e.entities.removeAll(),e.dataSources.removeAll());let m=u.dataTransfer.files,p=m.length;for(let g=0;g<p;g++){let f=m[g],x=new FileReader;x.onload=hTt(e,f,c,a),x.onerror=fTt(e,f),x.readAsText(f)}}S6(s,d),e.destroy=Y9(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=d}function bT(e){e.stopPropagation(),e.preventDefault()}function DTe(e,t){let n=e;l(n)&&(n.removeEventListener("drop",t,!1),n.removeEventListener("dragenter",bT,!1),n.removeEventListener("dragover",bT,!1),n.removeEventListener("dragexit",bT,!1))}function S6(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",bT,!1),e.addEventListener("dragover",bT,!1),e.addEventListener("dragexit",bT,!1)}function hTt(e,t,n,i){let o=e.scene;return function(r){let s=t.name;try{let a;if(/\.czml$/i.test(s))a=uP.load(JSON.parse(r.target.result),{sourceUri:s});else if(/\.geojson$/i.test(s)||/\.json$/i.test(s)||/\.topojson$/i.test(s))a=tv.load(JSON.parse(r.target.result),{sourceUri:s,clampToGround:i});else if(/\.(kml|kmz)$/i.test(s))a=Xv.load(t,{sourceUri:s,proxy:n,camera:o.camera,canvas:o.canvas,clampToGround:i,screenOverlayContainer:e.container});else if(/\.gpx$/i.test(s))a=rv.load(t,{sourceUri:s,proxy:n});else{e.dropError.raiseEvent(e,s,`Unrecognized file: ${s}`);return}l(a)&&e.dataSources.add(a).then(function(c){e.flyToOnDrop&&e.flyTo(c)}).catch(function(c){e.dropError.raiseEvent(e,s,c)})}catch(a){e.dropError.raiseEvent(e,s,a)}}}function fTt(e,t){return function(n){e.dropError.raiseEvent(e,t.name,n.target.error)}}var T6=mTt;var U1o=S(T(),1);function pTt(e,t){t=y(t,y.EMPTY_OBJECT);let n=new jA({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return n}}})}var C6=pTt;var tVo=S(T(),1);var q1o=S(T(),1);var O1o=S(T(),1);function BTe(e){let t=e.split(` `),n;for(n=0;n<t.length&&!t[n].match(/\S/);n++);if(n===t.length)return"";let i="",o=/^\s*/,s=t[n].match(o)[0].length;for(let a=n;a<t.length;a++){let c=t[a];c.match(o)[0].length>=s&&(c=c.slice(s)),i+=`${c} -`}return i}function dm(e){this._scene=e,this._voxelPrimitive=void 0,this._customShaderCompilationRemoveCallback=void 0,this._definedProperties=[],this._getPrimitiveFunctions=[],this._modelMatrixReady=!1;let t=this;function n(o){let{name:r,initialValue:s}=o;t._definedProperties.push(r);let a=o.setPrimitiveFunction;a===!0&&(a=function(u){t._voxelPrimitive[r]=u});let c=o.getPrimitiveFunction;c===!0&&(c=function(){t[r]=t._voxelPrimitive[r]}),l(c)&&t._getPrimitiveFunctions.push(c);let d=Ce.observable();return Ce.defineProperty(t,r,{get:function(){return d()},set:function(u){typeof s=="number"&&typeof u=="string"&&(u=Number(u),isNaN(u)&&(u=s)),typeof s=="boolean"&&typeof u=="number"&&(u=u===1),d(u),l(a)&&l(t._voxelPrimitive)&&(a(u),e.requestRender())}}),t[r]=s,d}function i(o,r){return function(s){let a=t._voxelPrimitive[o].clone();a[r]=s,t._voxelPrimitive[o]=a}}n({name:"inspectorVisible",initialValue:!0}),n({name:"displayVisible",initialValue:!1}),n({name:"transformVisible",initialValue:!1}),n({name:"boundsVisible",initialValue:!1}),n({name:"clippingVisible",initialValue:!1}),n({name:"shaderVisible",initialValue:!1}),n({name:"shaderString",initialValue:"",getPrimitiveFunction:function(){let o=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=MSe(o)}}),n({name:"shaderCompilationMessage",initialValue:""}),n({name:"shaderCompilationSuccess",initialValue:!0}),n({name:"depthTest",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"show",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"disableUpdate",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"debugDraw",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"jitter",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"nearestSampling",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"screenSpaceError",initialValue:4,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"stepSize",initialValue:1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"shapeIsBox",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsBox=o===Xi.BOX}}),n({name:"shapeIsEllipsoid",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsEllipsoid=o===Xi.ELLIPSOID}}),n({name:"shapeIsCylinder",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsCylinder=o===Xi.CYLINDER}}),n({name:"boundsBoxMaxX",initialValue:0,setPrimitiveFunction:i("maxBounds","x"),getPrimitiveFunction:function(){t.boundsBoxMaxX=t._voxelPrimitive.maxBounds.x}}),n({name:"boundsBoxMinX",initialValue:0,setPrimitiveFunction:i("minBounds","x"),getPrimitiveFunction:function(){t.boundsBoxMinX=t._voxelPrimitive.minBounds.x}}),n({name:"boundsBoxMaxY",initialValue:0,setPrimitiveFunction:i("maxBounds","y"),getPrimitiveFunction:function(){t.boundsBoxMaxY=t._voxelPrimitive.maxBounds.y}}),n({name:"boundsBoxMinY",initialValue:0,setPrimitiveFunction:i("minBounds","y"),getPrimitiveFunction:function(){t.boundsBoxMinY=t._voxelPrimitive.minBounds.y}}),n({name:"boundsBoxMaxZ",initialValue:0,setPrimitiveFunction:i("maxBounds","z"),getPrimitiveFunction:function(){t.boundsBoxMaxZ=t._voxelPrimitive.maxBounds.z}}),n({name:"boundsBoxMinZ",initialValue:0,setPrimitiveFunction:i("minBounds","z"),getPrimitiveFunction:function(){t.boundsBoxMinZ=t._voxelPrimitive.minBounds.z}}),n({name:"boundsEllipsoidMaxLongitude",initialValue:0,setPrimitiveFunction:i("maxBounds","x"),getPrimitiveFunction:function(){t.boundsEllipsoidMaxLongitude=t._voxelPrimitive.maxBounds.x}}),n({name:"boundsEllipsoidMinLongitude",initialValue:0,setPrimitiveFunction:i("minBounds","x"),getPrimitiveFunction:function(){t.boundsEllipsoidMinLongitude=t._voxelPrimitive.minBounds.x}}),n({name:"boundsEllipsoidMaxLatitude",initialValue:0,setPrimitiveFunction:i("maxBounds","y"),getPrimitiveFunction:function(){t.boundsEllipsoidMaxLatitude=t._voxelPrimitive.maxBounds.y}}),n({name:"boundsEllipsoidMinLatitude",initialValue:0,setPrimitiveFunction:i("minBounds","y"),getPrimitiveFunction:function(){t.boundsEllipsoidMinLatitude=t._voxelPrimitive.minBounds.y}}),n({name:"boundsEllipsoidMaxHeight",initialValue:0,setPrimitiveFunction:i("maxBounds","z"),getPrimitiveFunction:function(){t.boundsEllipsoidMaxHeight=t._voxelPrimitive.maxBounds.z}}),n({name:"boundsEllipsoidMinHeight",initialValue:0,setPrimitiveFunction:i("minBounds","z"),getPrimitiveFunction:function(){t.boundsEllipsoidMinHeight=t._voxelPrimitive.minBounds.z}}),n({name:"boundsCylinderMaxRadius",initialValue:0,setPrimitiveFunction:i("maxBounds","x"),getPrimitiveFunction:function(){t.boundsCylinderMaxRadius=t._voxelPrimitive.maxBounds.x}}),n({name:"boundsCylinderMinRadius",initialValue:0,setPrimitiveFunction:i("minBounds","x"),getPrimitiveFunction:function(){t.boundsCylinderMinRadius=t._voxelPrimitive.minBounds.x}}),n({name:"boundsCylinderMaxHeight",initialValue:0,setPrimitiveFunction:i("maxBounds","y"),getPrimitiveFunction:function(){t.boundsCylinderMaxHeight=t._voxelPrimitive.maxBounds.y}}),n({name:"boundsCylinderMinHeight",initialValue:0,setPrimitiveFunction:i("minBounds","y"),getPrimitiveFunction:function(){t.boundsCylinderMinHeight=t._voxelPrimitive.minBounds.y}}),n({name:"boundsCylinderMaxAngle",initialValue:0,setPrimitiveFunction:i("maxBounds","z"),getPrimitiveFunction:function(){t.boundsCylinderMaxAngle=t._voxelPrimitive.maxBounds.z}}),n({name:"boundsCylinderMinAngle",initialValue:0,setPrimitiveFunction:i("minBounds","z"),getPrimitiveFunction:function(){t.boundsCylinderMinAngle=t._voxelPrimitive.minBounds.z}}),n({name:"clippingBoxMaxX",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMaxX=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingBoxMinX",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMinX=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingBoxMaxY",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMaxY=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingBoxMinY",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMinY=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingBoxMaxZ",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMaxZ=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingBoxMinZ",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMinZ=t._voxelPrimitive.minClippingBounds.z}}),n({name:"clippingEllipsoidMaxLongitude",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitude=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingEllipsoidMinLongitude",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitude=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingEllipsoidMaxLatitude",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitude=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingEllipsoidMinLatitude",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitude=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingEllipsoidMaxHeight",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingEllipsoidMinHeight",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMinHeight=t._voxelPrimitive.minClippingBounds.z}}),n({name:"clippingCylinderMaxRadius",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMaxRadius=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingCylinderMinRadius",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMinRadius=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingCylinderMaxHeight",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMaxHeight=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingCylinderMinHeight",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMinHeight=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingCylinderMaxAngle",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMaxAngle=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingCylinderMinAngle",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMinAngle=t._voxelPrimitive.minClippingBounds.z}}),n({name:"translationX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&ep(t)},getPrimitiveFunction:function(){t.translationX=M.getTranslation(t._voxelPrimitive.modelMatrix,new h).x}}),n({name:"translationY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&ep(t)},getPrimitiveFunction:function(){t.translationY=M.getTranslation(t._voxelPrimitive.modelMatrix,new h).y}}),n({name:"translationZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&ep(t)},getPrimitiveFunction:function(){t.translationZ=M.getTranslation(t._voxelPrimitive.modelMatrix,new h).z}}),n({name:"scaleX",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&ep(t)},getPrimitiveFunction:function(){t.scaleX=M.getScale(t._voxelPrimitive.modelMatrix,new h).x}}),n({name:"scaleY",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&ep(t)},getPrimitiveFunction:function(){t.scaleY=M.getScale(t._voxelPrimitive.modelMatrix,new h).y}}),n({name:"scaleZ",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&ep(t)},getPrimitiveFunction:function(){t.scaleZ=M.getScale(t._voxelPrimitive.modelMatrix,new h).z}}),n({name:"angleX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&ep(t)}}),n({name:"angleY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&ep(t)}}),n({name:"angleZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&ep(t)}})}var SSt=new h,CSt=new h,VSt=new Ka,LSt=new $;function ep(e){let t=h.fromElements(e.translationX,e.translationY,e.translationZ,SSt),n=h.fromElements(e.scaleX,e.scaleY,e.scaleZ,CSt),i=VSt;i.heading=e.angleX,i.pitch=e.angleY,i.roll=e.angleZ;let o=$.fromHeadingPitchRoll(i,LSt),r=$.multiplyByScale(o,n,o);e._voxelPrimitive.modelMatrix=M.fromRotationTranslation(r,t,e._voxelPrimitive.modelMatrix)}Object.defineProperties(dm.prototype,{scene:{get:function(){return this._scene}},voxelPrimitive:{get:function(){return this._voxelPrimitive},set:function(e){if(l(this._customShaderCompilationRemoveCallback)&&this._customShaderCompilationRemoveCallback(),l(e)){this._voxelPrimitive=e;let t=this;t._customShaderCompilationRemoveCallback=t._voxelPrimitive.customShaderCompilationEvent.addEventListener(function(n){let i=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=MSe(i),l(n)?(t.shaderCompilationMessage=n.message,t.shaderCompilationSuccess=!1):(t.shaderCompilationMessage="Shader compiled successfully!",t.shaderCompilationSuccess=!0)}),t._modelMatrixReady=!1;for(let n=0;n<t._getPrimitiveFunctions.length;n++)t._getPrimitiveFunctions[n]();t._modelMatrixReady=!0,ep(t)}}}});dm.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};dm.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};dm.prototype.toggleTransform=function(){this.transformVisible=!this.transformVisible};dm.prototype.toggleBounds=function(){this.boundsVisible=!this.boundsVisible};dm.prototype.toggleClipping=function(){this.clippingVisible=!this.clippingVisible};dm.prototype.toggleShader=function(){this.shaderVisible=!this.shaderVisible};dm.prototype.compileShader=function(){l(this._voxelPrimitive)&&(this._voxelPrimitive.customShader=new $T({fragmentShaderText:this.shaderString,uniforms:this._voxelPrimitive.customShader.uniforms}))};dm.prototype.shaderEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,a=n.value.slice(i,o).split(` +`}return i}function lm(e){this._scene=e,this._voxelPrimitive=void 0,this._customShaderCompilationRemoveCallback=void 0,this._definedProperties=[],this._getPrimitiveFunctions=[],this._modelMatrixReady=!1;let t=this;function n(o){let{name:r,initialValue:s}=o;t._definedProperties.push(r);let a=o.setPrimitiveFunction;a===!0&&(a=function(u){t._voxelPrimitive[r]=u});let c=o.getPrimitiveFunction;c===!0&&(c=function(){t[r]=t._voxelPrimitive[r]}),l(c)&&t._getPrimitiveFunctions.push(c);let d=Ce.observable();return Ce.defineProperty(t,r,{get:function(){return d()},set:function(u){typeof s=="number"&&typeof u=="string"&&(u=Number(u),isNaN(u)&&(u=s)),typeof s=="boolean"&&typeof u=="number"&&(u=u===1),d(u),l(a)&&l(t._voxelPrimitive)&&(a(u),e.requestRender())}}),t[r]=s,d}function i(o,r){return function(s){let a=t._voxelPrimitive[o].clone();a[r]=s,t._voxelPrimitive[o]=a}}n({name:"inspectorVisible",initialValue:!0}),n({name:"displayVisible",initialValue:!1}),n({name:"transformVisible",initialValue:!1}),n({name:"boundsVisible",initialValue:!1}),n({name:"clippingVisible",initialValue:!1}),n({name:"shaderVisible",initialValue:!1}),n({name:"shaderString",initialValue:"",getPrimitiveFunction:function(){let o=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=BTe(o)}}),n({name:"shaderCompilationMessage",initialValue:""}),n({name:"shaderCompilationSuccess",initialValue:!0}),n({name:"depthTest",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"show",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"disableUpdate",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"debugDraw",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"jitter",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"nearestSampling",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"screenSpaceError",initialValue:4,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"stepSize",initialValue:1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"shapeIsBox",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsBox=o===Ii.BOX}}),n({name:"shapeIsEllipsoid",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsEllipsoid=o===Ii.ELLIPSOID}}),n({name:"shapeIsCylinder",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsCylinder=o===Ii.CYLINDER}}),n({name:"boundsBoxMaxX",initialValue:0,setPrimitiveFunction:i("maxBounds","x"),getPrimitiveFunction:function(){t.boundsBoxMaxX=t._voxelPrimitive.maxBounds.x}}),n({name:"boundsBoxMinX",initialValue:0,setPrimitiveFunction:i("minBounds","x"),getPrimitiveFunction:function(){t.boundsBoxMinX=t._voxelPrimitive.minBounds.x}}),n({name:"boundsBoxMaxY",initialValue:0,setPrimitiveFunction:i("maxBounds","y"),getPrimitiveFunction:function(){t.boundsBoxMaxY=t._voxelPrimitive.maxBounds.y}}),n({name:"boundsBoxMinY",initialValue:0,setPrimitiveFunction:i("minBounds","y"),getPrimitiveFunction:function(){t.boundsBoxMinY=t._voxelPrimitive.minBounds.y}}),n({name:"boundsBoxMaxZ",initialValue:0,setPrimitiveFunction:i("maxBounds","z"),getPrimitiveFunction:function(){t.boundsBoxMaxZ=t._voxelPrimitive.maxBounds.z}}),n({name:"boundsBoxMinZ",initialValue:0,setPrimitiveFunction:i("minBounds","z"),getPrimitiveFunction:function(){t.boundsBoxMinZ=t._voxelPrimitive.minBounds.z}}),n({name:"boundsEllipsoidMaxLongitude",initialValue:0,setPrimitiveFunction:i("maxBounds","x"),getPrimitiveFunction:function(){t.boundsEllipsoidMaxLongitude=t._voxelPrimitive.maxBounds.x}}),n({name:"boundsEllipsoidMinLongitude",initialValue:0,setPrimitiveFunction:i("minBounds","x"),getPrimitiveFunction:function(){t.boundsEllipsoidMinLongitude=t._voxelPrimitive.minBounds.x}}),n({name:"boundsEllipsoidMaxLatitude",initialValue:0,setPrimitiveFunction:i("maxBounds","y"),getPrimitiveFunction:function(){t.boundsEllipsoidMaxLatitude=t._voxelPrimitive.maxBounds.y}}),n({name:"boundsEllipsoidMinLatitude",initialValue:0,setPrimitiveFunction:i("minBounds","y"),getPrimitiveFunction:function(){t.boundsEllipsoidMinLatitude=t._voxelPrimitive.minBounds.y}}),n({name:"boundsEllipsoidMaxHeight",initialValue:0,setPrimitiveFunction:i("maxBounds","z"),getPrimitiveFunction:function(){t.boundsEllipsoidMaxHeight=t._voxelPrimitive.maxBounds.z}}),n({name:"boundsEllipsoidMinHeight",initialValue:0,setPrimitiveFunction:i("minBounds","z"),getPrimitiveFunction:function(){t.boundsEllipsoidMinHeight=t._voxelPrimitive.minBounds.z}}),n({name:"boundsCylinderMaxRadius",initialValue:0,setPrimitiveFunction:i("maxBounds","x"),getPrimitiveFunction:function(){t.boundsCylinderMaxRadius=t._voxelPrimitive.maxBounds.x}}),n({name:"boundsCylinderMinRadius",initialValue:0,setPrimitiveFunction:i("minBounds","x"),getPrimitiveFunction:function(){t.boundsCylinderMinRadius=t._voxelPrimitive.minBounds.x}}),n({name:"boundsCylinderMaxHeight",initialValue:0,setPrimitiveFunction:i("maxBounds","y"),getPrimitiveFunction:function(){t.boundsCylinderMaxHeight=t._voxelPrimitive.maxBounds.y}}),n({name:"boundsCylinderMinHeight",initialValue:0,setPrimitiveFunction:i("minBounds","y"),getPrimitiveFunction:function(){t.boundsCylinderMinHeight=t._voxelPrimitive.minBounds.y}}),n({name:"boundsCylinderMaxAngle",initialValue:0,setPrimitiveFunction:i("maxBounds","z"),getPrimitiveFunction:function(){t.boundsCylinderMaxAngle=t._voxelPrimitive.maxBounds.z}}),n({name:"boundsCylinderMinAngle",initialValue:0,setPrimitiveFunction:i("minBounds","z"),getPrimitiveFunction:function(){t.boundsCylinderMinAngle=t._voxelPrimitive.minBounds.z}}),n({name:"clippingBoxMaxX",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMaxX=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingBoxMinX",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMinX=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingBoxMaxY",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMaxY=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingBoxMinY",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMinY=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingBoxMaxZ",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMaxZ=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingBoxMinZ",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMinZ=t._voxelPrimitive.minClippingBounds.z}}),n({name:"clippingEllipsoidMaxLongitude",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitude=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingEllipsoidMinLongitude",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitude=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingEllipsoidMaxLatitude",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitude=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingEllipsoidMinLatitude",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitude=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingEllipsoidMaxHeight",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingEllipsoidMinHeight",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMinHeight=t._voxelPrimitive.minClippingBounds.z}}),n({name:"clippingCylinderMaxRadius",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMaxRadius=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingCylinderMinRadius",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMinRadius=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingCylinderMaxHeight",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMaxHeight=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingCylinderMinHeight",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMinHeight=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingCylinderMaxAngle",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMaxAngle=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingCylinderMinAngle",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMinAngle=t._voxelPrimitive.minClippingBounds.z}}),n({name:"translationX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&$f(t)},getPrimitiveFunction:function(){t.translationX=A.getTranslation(t._voxelPrimitive.modelMatrix,new h).x}}),n({name:"translationY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&$f(t)},getPrimitiveFunction:function(){t.translationY=A.getTranslation(t._voxelPrimitive.modelMatrix,new h).y}}),n({name:"translationZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&$f(t)},getPrimitiveFunction:function(){t.translationZ=A.getTranslation(t._voxelPrimitive.modelMatrix,new h).z}}),n({name:"scaleX",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&$f(t)},getPrimitiveFunction:function(){t.scaleX=A.getScale(t._voxelPrimitive.modelMatrix,new h).x}}),n({name:"scaleY",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&$f(t)},getPrimitiveFunction:function(){t.scaleY=A.getScale(t._voxelPrimitive.modelMatrix,new h).y}}),n({name:"scaleZ",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&$f(t)},getPrimitiveFunction:function(){t.scaleZ=A.getScale(t._voxelPrimitive.modelMatrix,new h).z}}),n({name:"angleX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&$f(t)}}),n({name:"angleY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&$f(t)}}),n({name:"angleZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&$f(t)}})}var bTt=new h,gTt=new h,yTt=new Ja,xTt=new $;function $f(e){let t=h.fromElements(e.translationX,e.translationY,e.translationZ,bTt),n=h.fromElements(e.scaleX,e.scaleY,e.scaleZ,gTt),i=yTt;i.heading=e.angleX,i.pitch=e.angleY,i.roll=e.angleZ;let o=$.fromHeadingPitchRoll(i,xTt),r=$.multiplyByScale(o,n,o);e._voxelPrimitive.modelMatrix=A.fromRotationTranslation(r,t,e._voxelPrimitive.modelMatrix)}Object.defineProperties(lm.prototype,{scene:{get:function(){return this._scene}},voxelPrimitive:{get:function(){return this._voxelPrimitive},set:function(e){if(l(this._customShaderCompilationRemoveCallback)&&this._customShaderCompilationRemoveCallback(),l(e)){this._voxelPrimitive=e;let t=this;t._customShaderCompilationRemoveCallback=t._voxelPrimitive.customShaderCompilationEvent.addEventListener(function(n){let i=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=BTe(i),l(n)?(t.shaderCompilationMessage=n.message,t.shaderCompilationSuccess=!1):(t.shaderCompilationMessage="Shader compiled successfully!",t.shaderCompilationSuccess=!0)}),t._modelMatrixReady=!1;for(let n=0;n<t._getPrimitiveFunctions.length;n++)t._getPrimitiveFunctions[n]();t._modelMatrixReady=!0,$f(t)}}}});lm.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};lm.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};lm.prototype.toggleTransform=function(){this.transformVisible=!this.transformVisible};lm.prototype.toggleBounds=function(){this.boundsVisible=!this.boundsVisible};lm.prototype.toggleClipping=function(){this.clippingVisible=!this.clippingVisible};lm.prototype.toggleShader=function(){this.shaderVisible=!this.shaderVisible};lm.prototype.compileShader=function(){l(this._voxelPrimitive)&&(this._voxelPrimitive.customShader=new BS({fragmentShaderText:this.shaderString,uniforms:this._voxelPrimitive.customShader.uniforms}))};lm.prototype.shaderEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,a=n.value.slice(i,o).split(` `),c=a.length,d;if(t.shiftKey)for(d=0;d<c;++d)a[d][0]===" "&&(a[d][1]===" "?(a[d]=a[d].substr(2),r-=2):(a[d]=a[d].substr(1),r-=1));else for(d=0;d<c;++d)a[d]=` ${a[d]}`,r+=2;let u=a.join(` -`);n.value=n.value.slice(0,i)+u+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileShader();return!0};dm.prototype.isDestroyed=function(){return!1};dm.prototype.destroy=function(){let e=this;return this._definedProperties.forEach(function(t){Ce.getObservable(e,t).dispose()}),me(this)};var dM=dm;function mB(e,t){e=In(e);let n=document.createElement("div"),i=new dM(t);this._viewModel=i,this._container=e,this._element=n;let o=document.createElement("div");o.textContent="Voxel Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),n.appendChild(o),n.className="cesium-cesiumInspector cesium-VoxelInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let r=document.createElement("div");r.className="cesium-cesiumInspector-dropDown",n.appendChild(r);let s=Ma.createSection,a=Ma.createCheckbox,c=Ma.createRangeInput,d=Ma.createButton,u=s(r,"Display","displayVisible","toggleDisplay"),m=s(r,"Transform","transformVisible","toggleTransform"),p=s(r,"Bounds","boundsVisible","toggleBounds"),g=s(r,"Clipping","clippingVisible","toggleClipping"),f=s(r,"Shader","shaderVisible","toggleShader");u.appendChild(a("Depth Test","depthTest")),u.appendChild(a("Show","show")),u.appendChild(a("Disable Update","disableUpdate")),u.appendChild(a("Debug Draw","debugDraw")),u.appendChild(a("Jitter","jitter")),u.appendChild(a("Nearest Sampling","nearestSampling")),u.appendChild(c("Screen Space Error","screenSpaceError",0,128)),u.appendChild(c("Step Size","stepSize",0,2));let x=10,_=10,C=W.PI;m.appendChild(c("Translation X","translationX",-x,+x)),m.appendChild(c("Translation Y","translationY",-x,+x)),m.appendChild(c("Translation Z","translationZ",-x,+x)),m.appendChild(c("Scale X","scaleX",0,+_)),m.appendChild(c("Scale Y","scaleY",0,+_)),m.appendChild(c("Scale Z","scaleZ",0,+_)),m.appendChild(c("Heading","angleX",-C,+C)),m.appendChild(c("Pitch","angleY",-C,+C)),m.appendChild(c("Roll","angleZ",-C,+C));let V=Xi.getMinBounds(Xi.BOX),L=Xi.getMaxBounds(Xi.BOX),Z=h.fromElements(Xi.getMinBounds(Xi.ELLIPSOID).x,Xi.getMinBounds(Xi.ELLIPSOID).y,-ie.WGS84.maximumRadius,new h),G=h.fromElements(Xi.getMaxBounds(Xi.ELLIPSOID).x,Xi.getMaxBounds(Xi.ELLIPSOID).y,1e7,new h),X=Xi.getMinBounds(Xi.CYLINDER),v=Xi.getMaxBounds(Xi.CYLINDER);RL("Max X","Min X","Max Y","Min Y","Max Z","Min Z","boundsBoxMaxX","boundsBoxMinX","boundsBoxMaxY","boundsBoxMinY","boundsBoxMaxZ","boundsBoxMinZ",V,L,"shapeIsBox",p),RL("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","boundsEllipsoidMaxLongitude","boundsEllipsoidMinLongitude","boundsEllipsoidMaxLatitude","boundsEllipsoidMinLatitude","boundsEllipsoidMaxHeight","boundsEllipsoidMinHeight",Z,G,"shapeIsEllipsoid",p),RL("Max Radius","Min Radius","Max Height","Min Height","Max Angle","Min Angle","boundsCylinderMaxRadius","boundsCylinderMinRadius","boundsCylinderMaxHeight","boundsCylinderMinHeight","boundsCylinderMaxAngle","boundsCylinderMinAngle",X,v,"shapeIsCylinder",p),RL("Max X","Min X","Max Y","Min Y","Max Z","Min Z","clippingBoxMaxX","clippingBoxMinX","clippingBoxMaxY","clippingBoxMinY","clippingBoxMaxZ","clippingBoxMinZ",V,L,"shapeIsBox",g),RL("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","clippingEllipsoidMaxLongitude","clippingEllipsoidMinLongitude","clippingEllipsoidMaxLatitude","clippingEllipsoidMinLatitude","clippingEllipsoidMaxHeight","clippingEllipsoidMinHeight",Z,G,"shapeIsEllipsoid",g),RL("Max Radius","Min Radius","Max Height","Min Height","Max Angle","Min Angle","clippingCylinderMaxRadius","clippingCylinderMinRadius","clippingCylinderMaxHeight","clippingCylinderMinHeight","clippingCylinderMaxAngle","clippingCylinderMinAngle",X,v,"shapeIsCylinder",g);let P=document.createElement("div");f.appendChild(P);let F=document.createElement("textarea");F.setAttribute("data-bind","textInput: shaderString, event: { keydown: shaderEditorKeyPress }"),P.className="cesium-cesiumInspector-styleEditor",P.appendChild(F);let A=d("Compile (Ctrl+Enter)","compileShader");P.appendChild(A);let b=document.createElement("label");b.style.display="block",b.setAttribute("data-bind","text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"),P.appendChild(b),Ce.applyBindings(i,n)}Object.defineProperties(mB.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});mB.prototype.isDestroyed=function(){return!1};mB.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),me(this)};function RL(e,t,n,i,o,r,s,a,c,d,u,m,p,g,f,x){let _=Ma.createRangeInput,C=p,V=g,L=x.appendChild(document.createElement("div"));L.setAttribute("data-bind",`if: ${f}`),L.appendChild(_(e,s,C.x,V.x)),L.appendChild(_(t,a,C.x,V.x)),L.appendChild(_(n,c,C.y,V.y)),L.appendChild(_(i,d,C.y,V.y)),L.appendChild(_(o,u,C.z,V.z)),L.appendChild(_(r,m,C.z,V.z))}var uM=mB;function RSt(e){let t=document.createElement("div");t.className="cesium-viewer-voxelInspectorContainer",e.container.appendChild(t);let n=new uM(t,e.scene);Object.defineProperties(e,{voxelInspector:{get:function(){return n}}})}var L6=RSt;globalThis.CESIUM_VERSION="1.118.1";var ZSt="1.118.1";return $Se(GSt);})(); +`);n.value=n.value.slice(0,i)+u+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileShader();return!0};lm.prototype.isDestroyed=function(){return!1};lm.prototype.destroy=function(){let e=this;return this._definedProperties.forEach(function(t){Ce.getObservable(e,t).dispose()}),me(this)};var uM=lm;function hY(e,t){e=In(e);let n=document.createElement("div"),i=new uM(t);this._viewModel=i,this._container=e,this._element=n;let o=document.createElement("div");o.textContent="Voxel Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),n.appendChild(o),n.className="cesium-cesiumInspector cesium-VoxelInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let r=document.createElement("div");r.className="cesium-cesiumInspector-dropDown",n.appendChild(r);let s=Na.createSection,a=Na.createCheckbox,c=Na.createRangeInput,d=Na.createButton,u=s(r,"Display","displayVisible","toggleDisplay"),m=s(r,"Transform","transformVisible","toggleTransform"),p=s(r,"Bounds","boundsVisible","toggleBounds"),g=s(r,"Clipping","clippingVisible","toggleClipping"),f=s(r,"Shader","shaderVisible","toggleShader");u.appendChild(a("Depth Test","depthTest")),u.appendChild(a("Show","show")),u.appendChild(a("Disable Update","disableUpdate")),u.appendChild(a("Debug Draw","debugDraw")),u.appendChild(a("Jitter","jitter")),u.appendChild(a("Nearest Sampling","nearestSampling")),u.appendChild(c("Screen Space Error","screenSpaceError",0,128)),u.appendChild(c("Step Size","stepSize",0,2));let x=10,_=10,C=X.PI;m.appendChild(c("Translation X","translationX",-x,+x)),m.appendChild(c("Translation Y","translationY",-x,+x)),m.appendChild(c("Translation Z","translationZ",-x,+x)),m.appendChild(c("Scale X","scaleX",0,+_)),m.appendChild(c("Scale Y","scaleY",0,+_)),m.appendChild(c("Scale Z","scaleZ",0,+_)),m.appendChild(c("Heading","angleX",-C,+C)),m.appendChild(c("Pitch","angleY",-C,+C)),m.appendChild(c("Roll","angleZ",-C,+C));let V=Ii.getMinBounds(Ii.BOX),Z=Ii.getMaxBounds(Ii.BOX),R=h.fromElements(Ii.getMinBounds(Ii.ELLIPSOID).x,Ii.getMinBounds(Ii.ELLIPSOID).y,-te.WGS84.maximumRadius,new h),G=h.fromElements(Ii.getMaxBounds(Ii.ELLIPSOID).x,Ii.getMaxBounds(Ii.ELLIPSOID).y,1e7,new h),W=Ii.getMinBounds(Ii.CYLINDER),v=Ii.getMaxBounds(Ii.CYLINDER);LZ("Max X","Min X","Max Y","Min Y","Max Z","Min Z","boundsBoxMaxX","boundsBoxMinX","boundsBoxMaxY","boundsBoxMinY","boundsBoxMaxZ","boundsBoxMinZ",V,Z,"shapeIsBox",p),LZ("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","boundsEllipsoidMaxLongitude","boundsEllipsoidMinLongitude","boundsEllipsoidMaxLatitude","boundsEllipsoidMinLatitude","boundsEllipsoidMaxHeight","boundsEllipsoidMinHeight",R,G,"shapeIsEllipsoid",p),LZ("Max Radius","Min Radius","Max Height","Min Height","Max Angle","Min Angle","boundsCylinderMaxRadius","boundsCylinderMinRadius","boundsCylinderMaxHeight","boundsCylinderMinHeight","boundsCylinderMaxAngle","boundsCylinderMinAngle",W,v,"shapeIsCylinder",p),LZ("Max X","Min X","Max Y","Min Y","Max Z","Min Z","clippingBoxMaxX","clippingBoxMinX","clippingBoxMaxY","clippingBoxMinY","clippingBoxMaxZ","clippingBoxMinZ",V,Z,"shapeIsBox",g),LZ("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","clippingEllipsoidMaxLongitude","clippingEllipsoidMinLongitude","clippingEllipsoidMaxLatitude","clippingEllipsoidMinLatitude","clippingEllipsoidMaxHeight","clippingEllipsoidMinHeight",R,G,"shapeIsEllipsoid",g),LZ("Max Radius","Min Radius","Max Height","Min Height","Max Angle","Min Angle","clippingCylinderMaxRadius","clippingCylinderMinRadius","clippingCylinderMaxHeight","clippingCylinderMinHeight","clippingCylinderMaxAngle","clippingCylinderMinAngle",W,v,"shapeIsCylinder",g);let P=document.createElement("div");f.appendChild(P);let F=document.createElement("textarea");F.setAttribute("data-bind","textInput: shaderString, event: { keydown: shaderEditorKeyPress }"),P.className="cesium-cesiumInspector-styleEditor",P.appendChild(F);let M=d("Compile (Ctrl+Enter)","compileShader");P.appendChild(M);let b=document.createElement("label");b.style.display="block",b.setAttribute("data-bind","text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"),P.appendChild(b),Ce.applyBindings(i,n)}Object.defineProperties(hY.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});hY.prototype.isDestroyed=function(){return!1};hY.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),me(this)};function LZ(e,t,n,i,o,r,s,a,c,d,u,m,p,g,f,x){let _=Na.createRangeInput,C=p,V=g,Z=x.appendChild(document.createElement("div"));Z.setAttribute("data-bind",`if: ${f}`),Z.appendChild(_(e,s,C.x,V.x)),Z.appendChild(_(t,a,C.x,V.x)),Z.appendChild(_(n,c,C.y,V.y)),Z.appendChild(_(i,d,C.y,V.y)),Z.appendChild(_(o,u,C.z,V.z)),Z.appendChild(_(r,m,C.z,V.z))}var mM=hY;function _Tt(e){let t=document.createElement("div");t.className="cesium-viewer-voxelInspectorContainer",e.container.appendChild(t);let n=new mM(t,e.scene);Object.defineProperties(e,{voxelInspector:{get:function(){return n}}})}var V6=_Tt;globalThis.CESIUM_VERSION="1.119";var STt="1.119";return oCe(TTt);})(); diff --git a/cesium/Widgets/CesiumWidget/CesiumWidget.css b/cesium/Widgets/CesiumWidget/CesiumWidget.css index da3bde2..0763b64 100644 --- a/cesium/Widgets/CesiumWidget/CesiumWidget.css +++ b/cesium/Widgets/CesiumWidget/CesiumWidget.css @@ -28,11 +28,6 @@ padding-right: 5px; } -.cesium-widget-credits a, -.cesium-widget-credits a:visited { - color: #fff; -} - .cesium-widget-errorPanel { position: absolute; top: 0; diff --git a/cesium/Widgets/widgets.css b/cesium/Widgets/widgets.css index c0ad0fc..df675d5 100644 --- a/cesium/Widgets/widgets.css +++ b/cesium/Widgets/widgets.css @@ -367,10 +367,6 @@ text-shadow: 0px 0px 2px #000000; padding-right: 5px; } -.cesium-widget-credits a, -.cesium-widget-credits a:visited { - color: #fff; -} .cesium-widget-errorPanel { position: absolute; top: 0; diff --git a/cesium/Workers/chunk-JZYZ7RT4.js b/cesium/Workers/chunk-3C7WC463.js similarity index 99% rename from cesium/Workers/chunk-JZYZ7RT4.js rename to cesium/Workers/chunk-3C7WC463.js index 68a312e..927f4fa 100644 --- a/cesium/Workers/chunk-JZYZ7RT4.js +++ b/cesium/Workers/chunk-3C7WC463.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * diff --git a/cesium/Workers/chunk-3FEM743H.js b/cesium/Workers/chunk-3FEM743H.js deleted file mode 100644 index 42f61df..0000000 --- a/cesium/Workers/chunk-3FEM743H.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 - * - * Copyright 2011-2022 Cesium Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Columbus View (Pat. Pend.) - * - * Portions licensed separately. - * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. - */ - -import{b as Z,h as I}from"./chunk-CMXCDAKR.js";import{a as n,b as N,d as A,e as _}from"./chunk-LJCGAQ64.js";import{a as cn}from"./chunk-JFG572S7.js";import{a as T}from"./chunk-42NIXFVW.js";import{a as on,b as S}from"./chunk-5YVCOCPP.js";import{e as x}from"./chunk-U73D6PDD.js";function V(e){this._ellipsoid=T(e,A.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(V.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});V.prototype.project=function(e,t){let o=this._semimajorAxis,c=e.longitude*o,r=e.latitude*o,d=e.height;return x(t)?(t.x=c,t.y=r,t.z=d,t):new n(c,r,d)};V.prototype.unproject=function(e,t){if(!x(e))throw new on("cartesian is required");let o=this._oneOverSemimajorAxis,c=e.x*o,r=e.y*o,d=e.z;return x(t)?(t.longitude=c,t.latitude=r,t.height=d,t):new N(c,r,d)};var U=V;var fn={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},W=Object.freeze(fn);function sn(e,t){this.start=T(e,0),this.stop=T(t,0)}var rn=sn;function a(e,t){this.center=n.clone(T(e,n.ZERO)),this.radius=T(t,0)}var F=new n,Y=new n,J=new n,K=new n,Q=new n,$=new n,L=new n,b=new n,H=new n,nn=new n,tn=new n,en=new n,mn=4/3*cn.PI;a.fromPoints=function(e,t){if(x(t)||(t=new a),!x(e)||e.length===0)return t.center=n.clone(n.ZERO,t.center),t.radius=0,t;let o=n.clone(e[0],L),c=n.clone(o,F),r=n.clone(o,Y),d=n.clone(o,J),f=n.clone(o,K),s=n.clone(o,Q),m=n.clone(o,$),h=e.length,y;for(y=1;y<h;y++){n.clone(e[y],o);let R=o.x,M=o.y,w=o.z;R<c.x&&n.clone(o,c),R>f.x&&n.clone(o,f),M<r.y&&n.clone(o,r),M>s.y&&n.clone(o,s),w<d.z&&n.clone(o,d),w>m.z&&n.clone(o,m)}let u=n.magnitudeSquared(n.subtract(f,c,b)),i=n.magnitudeSquared(n.subtract(s,r,b)),v=n.magnitudeSquared(n.subtract(m,d,b)),C=c,q=f,O=u;i>O&&(O=i,C=r,q=s),v>O&&(O=v,C=d,q=m);let p=H;p.x=(C.x+q.x)*.5,p.y=(C.y+q.y)*.5,p.z=(C.z+q.z)*.5;let z=n.magnitudeSquared(n.subtract(q,p,b)),l=Math.sqrt(z),j=nn;j.x=c.x,j.y=r.y,j.z=d.z;let P=tn;P.x=f.x,P.y=s.y,P.z=m.z;let D=n.midpoint(j,P,en),B=0;for(y=0;y<h;y++){n.clone(e[y],o);let R=n.magnitude(n.subtract(o,D,b));R>B&&(B=R);let M=n.magnitudeSquared(n.subtract(o,p,b));if(M>z){let w=Math.sqrt(M);l=(l+w)*.5,z=l*l;let g=w-l;p.x=(l*p.x+g*o.x)/w,p.y=(l*p.y+g*o.y)/w,p.z=(l*p.z+g*o.z)/w}}return l<B?(n.clone(p,t.center),t.radius=l):(n.clone(D,t.center),t.radius=B),t};var un=new U,xn=new n,yn=new n,k=new N,X=new N;a.fromRectangle2D=function(e,t,o){return a.fromRectangleWithHeights2D(e,t,0,0,o)};a.fromRectangleWithHeights2D=function(e,t,o,c,r){if(x(r)||(r=new a),!x(e))return r.center=n.clone(n.ZERO,r.center),r.radius=0,r;t=T(t,un),I.southwest(e,k),k.height=o,I.northeast(e,X),X.height=c;let d=t.project(k,xn),f=t.project(X,yn),s=f.x-d.x,m=f.y-d.y,h=f.z-d.z;r.radius=Math.sqrt(s*s+m*m+h*h)*.5;let y=r.center;return y.x=d.x+s*.5,y.y=d.y+m*.5,y.z=d.z+h*.5,r};var ln=[];a.fromRectangle3D=function(e,t,o,c){if(t=T(t,A.WGS84),o=T(o,0),x(c)||(c=new a),!x(e))return c.center=n.clone(n.ZERO,c.center),c.radius=0,c;let r=I.subsample(e,t,o,ln);return a.fromPoints(r,c)};a.fromVertices=function(e,t,o,c){if(x(c)||(c=new a),!x(e)||e.length===0)return c.center=n.clone(n.ZERO,c.center),c.radius=0,c;t=T(t,n.ZERO),o=T(o,3),S.typeOf.number.greaterThanOrEquals("stride",o,3);let r=L;r.x=e[0]+t.x,r.y=e[1]+t.y,r.z=e[2]+t.z;let d=n.clone(r,F),f=n.clone(r,Y),s=n.clone(r,J),m=n.clone(r,K),h=n.clone(r,Q),y=n.clone(r,$),u=e.length,i;for(i=0;i<u;i+=o){let w=e[i]+t.x,g=e[i+1]+t.y,E=e[i+2]+t.z;r.x=w,r.y=g,r.z=E,w<d.x&&n.clone(r,d),w>m.x&&n.clone(r,m),g<f.y&&n.clone(r,f),g>h.y&&n.clone(r,h),E<s.z&&n.clone(r,s),E>y.z&&n.clone(r,y)}let v=n.magnitudeSquared(n.subtract(m,d,b)),C=n.magnitudeSquared(n.subtract(h,f,b)),q=n.magnitudeSquared(n.subtract(y,s,b)),O=d,p=m,z=v;C>z&&(z=C,O=f,p=h),q>z&&(z=q,O=s,p=y);let l=H;l.x=(O.x+p.x)*.5,l.y=(O.y+p.y)*.5,l.z=(O.z+p.z)*.5;let j=n.magnitudeSquared(n.subtract(p,l,b)),P=Math.sqrt(j),D=nn;D.x=d.x,D.y=f.y,D.z=s.z;let B=tn;B.x=m.x,B.y=h.y,B.z=y.z;let R=n.midpoint(D,B,en),M=0;for(i=0;i<u;i+=o){r.x=e[i]+t.x,r.y=e[i+1]+t.y,r.z=e[i+2]+t.z;let w=n.magnitude(n.subtract(r,R,b));w>M&&(M=w);let g=n.magnitudeSquared(n.subtract(r,l,b));if(g>j){let E=Math.sqrt(g);P=(P+E)*.5,j=P*P;let G=E-P;l.x=(P*l.x+G*r.x)/E,l.y=(P*l.y+G*r.y)/E,l.z=(P*l.z+G*r.z)/E}}return P<M?(n.clone(l,c.center),c.radius=P):(n.clone(R,c.center),c.radius=M),c};a.fromEncodedCartesianVertices=function(e,t,o){if(x(o)||(o=new a),!x(e)||!x(t)||e.length!==t.length||e.length===0)return o.center=n.clone(n.ZERO,o.center),o.radius=0,o;let c=L;c.x=e[0]+t[0],c.y=e[1]+t[1],c.z=e[2]+t[2];let r=n.clone(c,F),d=n.clone(c,Y),f=n.clone(c,J),s=n.clone(c,K),m=n.clone(c,Q),h=n.clone(c,$),y=e.length,u;for(u=0;u<y;u+=3){let M=e[u]+t[u],w=e[u+1]+t[u+1],g=e[u+2]+t[u+2];c.x=M,c.y=w,c.z=g,M<r.x&&n.clone(c,r),M>s.x&&n.clone(c,s),w<d.y&&n.clone(c,d),w>m.y&&n.clone(c,m),g<f.z&&n.clone(c,f),g>h.z&&n.clone(c,h)}let i=n.magnitudeSquared(n.subtract(s,r,b)),v=n.magnitudeSquared(n.subtract(m,d,b)),C=n.magnitudeSquared(n.subtract(h,f,b)),q=r,O=s,p=i;v>p&&(p=v,q=d,O=m),C>p&&(p=C,q=f,O=h);let z=H;z.x=(q.x+O.x)*.5,z.y=(q.y+O.y)*.5,z.z=(q.z+O.z)*.5;let l=n.magnitudeSquared(n.subtract(O,z,b)),j=Math.sqrt(l),P=nn;P.x=r.x,P.y=d.y,P.z=f.z;let D=tn;D.x=s.x,D.y=m.y,D.z=h.z;let B=n.midpoint(P,D,en),R=0;for(u=0;u<y;u+=3){c.x=e[u]+t[u],c.y=e[u+1]+t[u+1],c.z=e[u+2]+t[u+2];let M=n.magnitude(n.subtract(c,B,b));M>R&&(R=M);let w=n.magnitudeSquared(n.subtract(c,z,b));if(w>l){let g=Math.sqrt(w);j=(j+g)*.5,l=j*j;let E=g-j;z.x=(j*z.x+E*c.x)/g,z.y=(j*z.y+E*c.y)/g,z.z=(j*z.z+E*c.z)/g}}return j<R?(n.clone(z,o.center),o.radius=j):(n.clone(B,o.center),o.radius=R),o};a.fromCornerPoints=function(e,t,o){S.typeOf.object("corner",e),S.typeOf.object("oppositeCorner",t),x(o)||(o=new a);let c=n.midpoint(e,t,o.center);return o.radius=n.distance(c,t),o};a.fromEllipsoid=function(e,t){return S.typeOf.object("ellipsoid",e),x(t)||(t=new a),n.clone(n.ZERO,t.center),t.radius=e.maximumRadius,t};var pn=new n;a.fromBoundingSpheres=function(e,t){if(x(t)||(t=new a),!x(e)||e.length===0)return t.center=n.clone(n.ZERO,t.center),t.radius=0,t;let o=e.length;if(o===1)return a.clone(e[0],t);if(o===2)return a.union(e[0],e[1],t);let c=[],r;for(r=0;r<o;r++)c.push(e[r].center);t=a.fromPoints(c,t);let d=t.center,f=t.radius;for(r=0;r<o;r++){let s=e[r];f=Math.max(f,n.distance(d,s.center,pn)+s.radius)}return t.radius=f,t};var Sn=new n,hn=new n,zn=new n;a.fromOrientedBoundingBox=function(e,t){S.defined("orientedBoundingBox",e),x(t)||(t=new a);let o=e.halfAxes,c=_.getColumn(o,0,Sn),r=_.getColumn(o,1,hn),d=_.getColumn(o,2,zn);return n.add(c,r,c),n.add(c,d,c),t.center=n.clone(e.center,t.center),t.radius=n.magnitude(c),t};var wn=new n,Pn=new n;a.fromTransformation=function(e,t){S.typeOf.object("transformation",e),x(t)||(t=new a);let o=Z.getTranslation(e,wn),c=Z.getScale(e,Pn),r=.5*n.magnitude(c);return t.center=n.clone(o,t.center),t.radius=r,t};a.clone=function(e,t){if(x(e))return x(t)?(t.center=n.clone(e.center,t.center),t.radius=e.radius,t):new a(e.center,e.radius)};a.packedLength=4;a.pack=function(e,t,o){S.typeOf.object("value",e),S.defined("array",t),o=T(o,0);let c=e.center;return t[o++]=c.x,t[o++]=c.y,t[o++]=c.z,t[o]=e.radius,t};a.unpack=function(e,t,o){S.defined("array",e),t=T(t,0),x(o)||(o=new a);let c=o.center;return c.x=e[t++],c.y=e[t++],c.z=e[t++],o.radius=e[t],o};var gn=new n,On=new n;a.union=function(e,t,o){S.typeOf.object("left",e),S.typeOf.object("right",t),x(o)||(o=new a);let c=e.center,r=e.radius,d=t.center,f=t.radius,s=n.subtract(d,c,gn),m=n.magnitude(s);if(r>=m+f)return e.clone(o),o;if(f>=m+r)return t.clone(o),o;let h=(r+m+f)*.5,y=n.multiplyByScalar(s,(-r+h)/m,On);return n.add(y,c,y),n.clone(y,o.center),o.radius=h,o};var jn=new n;a.expand=function(e,t,o){S.typeOf.object("sphere",e),S.typeOf.object("point",t),o=a.clone(e,o);let c=n.magnitude(n.subtract(t,o.center,jn));return c>o.radius&&(o.radius=c),o};a.intersectPlane=function(e,t){S.typeOf.object("sphere",e),S.typeOf.object("plane",t);let o=e.center,c=e.radius,r=t.normal,d=n.dot(r,o)+t.distance;return d<-c?W.OUTSIDE:d<c?W.INTERSECTING:W.INSIDE};a.transform=function(e,t,o){return S.typeOf.object("sphere",e),S.typeOf.object("transform",t),x(o)||(o=new a),o.center=Z.multiplyByPoint(t,e.center,o.center),o.radius=Z.getMaximumScale(t)*e.radius,o};var bn=new n;a.distanceSquaredTo=function(e,t){S.typeOf.object("sphere",e),S.typeOf.object("cartesian",t);let o=n.subtract(e.center,t,bn),c=n.magnitude(o)-e.radius;return c<=0?0:c*c};a.transformWithoutScale=function(e,t,o){return S.typeOf.object("sphere",e),S.typeOf.object("transform",t),x(o)||(o=new a),o.center=Z.multiplyByPoint(t,e.center,o.center),o.radius=e.radius,o};var qn=new n;a.computePlaneDistances=function(e,t,o,c){S.typeOf.object("sphere",e),S.typeOf.object("position",t),S.typeOf.object("direction",o),x(c)||(c=new rn);let r=n.subtract(e.center,t,qn),d=n.dot(o,r);return c.start=d-e.radius,c.stop=d+e.radius,c};var an=new n,Mn=new n,Tn=new n,Cn=new n,Rn=new n,En=new N,dn=new Array(8);for(let e=0;e<8;++e)dn[e]=new n;var Dn=new U;a.projectTo2D=function(e,t,o){S.typeOf.object("sphere",e),t=T(t,Dn);let c=t.ellipsoid,r=e.center,d=e.radius,f;n.equals(r,n.ZERO)?f=n.clone(n.UNIT_X,an):f=c.geodeticSurfaceNormal(r,an);let s=n.cross(n.UNIT_Z,f,Mn);n.normalize(s,s);let m=n.cross(f,s,Tn);n.normalize(m,m),n.multiplyByScalar(f,d,f),n.multiplyByScalar(m,d,m),n.multiplyByScalar(s,d,s);let h=n.negate(m,Rn),y=n.negate(s,Cn),u=dn,i=u[0];n.add(f,m,i),n.add(i,s,i),i=u[1],n.add(f,m,i),n.add(i,y,i),i=u[2],n.add(f,h,i),n.add(i,y,i),i=u[3],n.add(f,h,i),n.add(i,s,i),n.negate(f,f),i=u[4],n.add(f,m,i),n.add(i,s,i),i=u[5],n.add(f,m,i),n.add(i,y,i),i=u[6],n.add(f,h,i),n.add(i,y,i),i=u[7],n.add(f,h,i),n.add(i,s,i);let v=u.length;for(let p=0;p<v;++p){let z=u[p];n.add(r,z,z);let l=c.cartesianToCartographic(z,En);t.project(l,z)}o=a.fromPoints(u,o),r=o.center;let C=r.x,q=r.y,O=r.z;return r.x=O,r.y=C,r.z=q,o};a.isOccluded=function(e,t){return S.typeOf.object("sphere",e),S.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)};a.equals=function(e,t){return e===t||x(e)&&x(t)&&n.equals(e.center,t.center)&&e.radius===t.radius};a.prototype.intersectPlane=function(e){return a.intersectPlane(this,e)};a.prototype.distanceSquaredTo=function(e){return a.distanceSquaredTo(this,e)};a.prototype.computePlaneDistances=function(e,t,o){return a.computePlaneDistances(this,e,t,o)};a.prototype.isOccluded=function(e){return a.isOccluded(this,e)};a.prototype.equals=function(e){return a.equals(this,e)};a.prototype.clone=function(e){return a.clone(this,e)};a.prototype.volume=function(){let e=this.radius;return mn*e*e*e};var et=a;export{U as a,W as b,rn as c,et as d}; diff --git a/cesium/Workers/chunk-3JW36LZF.js b/cesium/Workers/chunk-3JW36LZF.js new file mode 100644 index 0000000..178c681 --- /dev/null +++ b/cesium/Workers/chunk-3JW36LZF.js @@ -0,0 +1,26 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.119 + * + * Copyright 2011-2022 Cesium Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Columbus View (Pat. Pend.) + * + * Portions licensed separately. + * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. + */ + +import{a as L,b as x}from"./chunk-TMSETF7M.js";import{h as R}from"./chunk-7Z5IIKOJ.js";import{b as d,c as O,d as g}from"./chunk-POASMU2N.js";import{a as w}from"./chunk-IUA6FAOZ.js";import{b as m}from"./chunk-UH2WFNTA.js";import{e as f}from"./chunk-PEYJTJPE.js";function t(i,h,o,n){this.x=w(i,0),this.y=w(h,0),this.width=w(o,0),this.height=w(n,0)}t.packedLength=4;t.pack=function(i,h,o){return m.typeOf.object("value",i),m.defined("array",h),o=w(o,0),h[o++]=i.x,h[o++]=i.y,h[o++]=i.width,h[o]=i.height,h};t.unpack=function(i,h,o){return m.defined("array",i),h=w(h,0),f(o)||(o=new t),o.x=i[h++],o.y=i[h++],o.width=i[h++],o.height=i[h],o};t.fromPoints=function(i,h){if(f(h)||(h=new t),!f(i)||i.length===0)return h.x=0,h.y=0,h.width=0,h.height=0,h;let o=i.length,n=i[0].x,c=i[0].y,e=i[0].x,y=i[0].y;for(let p=1;p<o;p++){let b=i[p],j=b.x,M=b.y;n=Math.min(j,n),e=Math.max(j,e),c=Math.min(M,c),y=Math.max(M,y)}return h.x=n,h.y=c,h.width=e-n,h.height=y-c,h};var X=new L,Y=new d,k=new d;t.fromRectangle=function(i,h,o){if(f(o)||(o=new t),!f(i))return o.x=0,o.y=0,o.width=0,o.height=0,o;X._ellipsoid=g.default,h=w(h,X);let n=h.project(R.southwest(i,Y)),c=h.project(R.northeast(i,k));return O.subtract(c,n,c),o.x=n.x,o.y=n.y,o.width=c.x,o.height=c.y,o};t.clone=function(i,h){if(f(i))return f(h)?(h.x=i.x,h.y=i.y,h.width=i.width,h.height=i.height,h):new t(i.x,i.y,i.width,i.height)};t.union=function(i,h,o){m.typeOf.object("left",i),m.typeOf.object("right",h),f(o)||(o=new t);let n=Math.min(i.x,h.x),c=Math.min(i.y,h.y),e=Math.max(i.x+i.width,h.x+h.width),y=Math.max(i.y+i.height,h.y+h.height);return o.x=n,o.y=c,o.width=e-n,o.height=y-c,o};t.expand=function(i,h,o){m.typeOf.object("rectangle",i),m.typeOf.object("point",h),o=t.clone(i,o);let n=h.x-o.x,c=h.y-o.y;return n>o.width?o.width=n:n<0&&(o.width-=n,o.x=h.x),c>o.height?o.height=c:c<0&&(o.height-=c,o.y=h.y),o};t.intersect=function(i,h){m.typeOf.object("left",i),m.typeOf.object("right",h);let o=i.x,n=i.y,c=h.x,e=h.y;return o>c+h.width||o+i.width<c||n+i.height<e||n>e+h.height?x.OUTSIDE:x.INTERSECTING};t.equals=function(i,h){return i===h||f(i)&&f(h)&&i.x===h.x&&i.y===h.y&&i.width===h.width&&i.height===h.height};t.prototype.clone=function(i){return t.clone(this,i)};t.prototype.intersect=function(i){return t.intersect(this,i)};t.prototype.equals=function(i){return t.equals(this,i)};var a=t;export{a}; diff --git a/cesium/Workers/chunk-4BTGX3WJ.js b/cesium/Workers/chunk-4BTGX3WJ.js new file mode 100644 index 0000000..e82707e --- /dev/null +++ b/cesium/Workers/chunk-4BTGX3WJ.js @@ -0,0 +1,26 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.119 + * + * Copyright 2011-2022 Cesium Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Columbus View (Pat. Pend.) + * + * Portions licensed separately. + * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. + */ + +import{a as S}from"./chunk-BMHPVZ4H.js";import{a as j}from"./chunk-ILGBPNP6.js";import{a as D}from"./chunk-P37AI2DW.js";import{a as V}from"./chunk-T6BE4RZK.js";import{b as T,c as B,d as L}from"./chunk-X5IHHI6X.js";import{d as O}from"./chunk-TMSETF7M.js";import{a as x}from"./chunk-KZNJOCYU.js";import{a as c,d as l}from"./chunk-POASMU2N.js";import{a as E}from"./chunk-R6KGAEF6.js";import{a as m}from"./chunk-IUA6FAOZ.js";import{a as _}from"./chunk-UH2WFNTA.js";import{e as d}from"./chunk-PEYJTJPE.js";var q=new c,M=new c;function U(e){let t=e.center;M=c.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,M),e.height,M),M=c.add(t,M,M);let i=new O(M,e.semiMajorAxis),f=S.computeEllipsePositions(e,!1,!0).outerPositions,o=new V({position:new L({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:S.raisePositionsToHeight(f,e,!1)})}),r=f.length/3,u=D.createTypedArray(r,r*2),h=0;for(let n=0;n<r;++n)u[h++]=n,u[h++]=(n+1)%r;return{boundingSphere:i,attributes:o,indices:u}}var N=new O,P=new O;function R(e){let t=e.center,i=e.ellipsoid,f=e.semiMajorAxis,o=c.multiplyByScalar(i.geodeticSurfaceNormal(t,q),e.height,q);N.center=c.add(t,o,N.center),N.radius=f,o=c.multiplyByScalar(i.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),P.center=c.add(t,o,P.center),P.radius=f;let r=S.computeEllipsePositions(e,!1,!0).outerPositions,u=new V({position:new L({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:S.raisePositionsToHeight(r,e,!0)})});r=u.position.values;let h=O.union(N,P),n=r.length/3;if(d(e.offsetAttribute)){let g=new Uint8Array(n);if(e.offsetAttribute===j.TOP)g=g.fill(1,0,n/2);else{let H=e.offsetAttribute===j.NONE?0:1;g=g.fill(H)}u.applyOffset=new L({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}let p=m(e.numberOfVerticalLines,16);p=E.clamp(p,0,n/2);let a=D.createTypedArray(n,n*2+p*2);n/=2;let A=0,s;for(s=0;s<n;++s)a[A++]=s,a[A++]=(s+1)%n,a[A++]=s+n,a[A++]=(s+1)%n+n;let k;if(p>0){let g=Math.min(p,n);k=Math.round(n/g);let H=Math.min(k*p,n);for(s=0;s<H;s+=k)a[A++]=s,a[A++]=s+n}return{boundingSphere:h,attributes:u,indices:a}}function w(e){e=m(e,m.EMPTY_OBJECT);let t=e.center,i=m(e.ellipsoid,l.default),f=e.semiMajorAxis,o=e.semiMinorAxis,r=m(e.granularity,E.RADIANS_PER_DEGREE);if(!d(t))throw new _("center is required.");if(!d(f))throw new _("semiMajorAxis is required.");if(!d(o))throw new _("semiMinorAxis is required.");if(f<o)throw new _("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new _("granularity must be greater than zero.");let u=m(e.height,0),h=m(e.extrudedHeight,u);this._center=c.clone(t),this._semiMajorAxis=f,this._semiMinorAxis=o,this._ellipsoid=l.clone(i),this._rotation=m(e.rotation,0),this._height=Math.max(h,u),this._granularity=r,this._extrudedHeight=Math.min(h,u),this._numberOfVerticalLines=Math.max(m(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}w.packedLength=c.packedLength+l.packedLength+8;w.pack=function(e,t,i){if(!d(e))throw new _("value is required");if(!d(t))throw new _("array is required");return i=m(i,0),c.pack(e._center,t,i),i+=c.packedLength,l.pack(e._ellipsoid,t,i),i+=l.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i]=m(e._offsetAttribute,-1),t};var y=new c,C=new l,b={center:y,ellipsoid:C,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};w.unpack=function(e,t,i){if(!d(e))throw new _("array is required");t=m(t,0);let f=c.unpack(e,t,y);t+=c.packedLength;let o=l.unpack(e,t,C);t+=l.packedLength;let r=e[t++],u=e[t++],h=e[t++],n=e[t++],p=e[t++],a=e[t++],A=e[t++],s=e[t];return d(i)?(i._center=c.clone(f,i._center),i._ellipsoid=l.clone(o,i._ellipsoid),i._semiMajorAxis=r,i._semiMinorAxis=u,i._rotation=h,i._height=n,i._granularity=p,i._extrudedHeight=a,i._numberOfVerticalLines=A,i._offsetAttribute=s===-1?void 0:s,i):(b.height=n,b.extrudedHeight=a,b.granularity=p,b.rotation=h,b.semiMajorAxis=r,b.semiMinorAxis=u,b.numberOfVerticalLines=A,b.offsetAttribute=s===-1?void 0:s,new w(b))};w.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,i=e._extrudedHeight,f=!E.equalsEpsilon(t,i,0,E.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},r;if(f)o.extrudedHeight=i,o.offsetAttribute=e._offsetAttribute,r=R(o);else if(r=U(o),d(e._offsetAttribute)){let u=r.attributes.position.values.length,h=e._offsetAttribute===j.NONE?0:1,n=new Uint8Array(u/3).fill(h);r.attributes.applyOffset=new L({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}return new B({attributes:r.attributes,indices:r.indices,primitiveType:T.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var ie=w;export{ie as a}; diff --git a/cesium/Workers/chunk-4IWHN7T4.js b/cesium/Workers/chunk-4WRMLZA7.js similarity index 90% rename from cesium/Workers/chunk-4IWHN7T4.js rename to cesium/Workers/chunk-4WRMLZA7.js index 238a072..184eb84 100644 --- a/cesium/Workers/chunk-4IWHN7T4.js +++ b/cesium/Workers/chunk-4WRMLZA7.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{b as d}from"./chunk-3FEM743H.js";import{a as i}from"./chunk-LJCGAQ64.js";import{a as z}from"./chunk-42NIXFVW.js";import{b as r}from"./chunk-5YVCOCPP.js";import{e as c}from"./chunk-U73D6PDD.js";function t(m,n,e){this.minimum=i.clone(z(m,i.ZERO)),this.maximum=i.clone(z(n,i.ZERO)),c(e)?e=i.clone(e):e=i.midpoint(this.minimum,this.maximum,new i),this.center=e}t.fromCorners=function(m,n,e){return r.defined("minimum",m),r.defined("maximum",n),c(e)||(e=new t),e.minimum=i.clone(m,e.minimum),e.maximum=i.clone(n,e.maximum),e.center=i.midpoint(m,n,e.center),e};t.fromPoints=function(m,n){if(c(n)||(n=new t),!c(m)||m.length===0)return n.minimum=i.clone(i.ZERO,n.minimum),n.maximum=i.clone(i.ZERO,n.maximum),n.center=i.clone(i.ZERO,n.center),n;let e=m[0].x,a=m[0].y,u=m[0].z,o=m[0].x,y=m[0].y,l=m[0].z,I=m.length;for(let E=1;E<I;E++){let M=m[E],p=M.x,Z=M.y,q=M.z;e=Math.min(p,e),o=Math.max(p,o),a=Math.min(Z,a),y=Math.max(Z,y),u=Math.min(q,u),l=Math.max(q,l)}let f=n.minimum;f.x=e,f.y=a,f.z=u;let x=n.maximum;return x.x=o,x.y=y,x.z=l,n.center=i.midpoint(f,x,n.center),n};t.clone=function(m,n){if(c(m))return c(n)?(n.minimum=i.clone(m.minimum,n.minimum),n.maximum=i.clone(m.maximum,n.maximum),n.center=i.clone(m.center,n.center),n):new t(m.minimum,m.maximum,m.center)};t.equals=function(m,n){return m===n||c(m)&&c(n)&&i.equals(m.center,n.center)&&i.equals(m.minimum,n.minimum)&&i.equals(m.maximum,n.maximum)};var h=new i;t.intersectPlane=function(m,n){r.defined("box",m),r.defined("plane",n),h=i.subtract(m.maximum,m.minimum,h);let e=i.multiplyByScalar(h,.5,h),a=n.normal,u=e.x*Math.abs(a.x)+e.y*Math.abs(a.y)+e.z*Math.abs(a.z),o=i.dot(m.center,a)+n.distance;return o-u>0?d.INSIDE:o+u<0?d.OUTSIDE:d.INTERSECTING};t.prototype.clone=function(m){return t.clone(this,m)};t.prototype.intersectPlane=function(m){return t.intersectPlane(this,m)};t.prototype.equals=function(m){return t.equals(this,m)};var P=t;export{P as a}; +import{b as d}from"./chunk-TMSETF7M.js";import{a as i}from"./chunk-POASMU2N.js";import{a as z}from"./chunk-IUA6FAOZ.js";import{b as r}from"./chunk-UH2WFNTA.js";import{e as c}from"./chunk-PEYJTJPE.js";function t(m,n,e){this.minimum=i.clone(z(m,i.ZERO)),this.maximum=i.clone(z(n,i.ZERO)),c(e)?e=i.clone(e):e=i.midpoint(this.minimum,this.maximum,new i),this.center=e}t.fromCorners=function(m,n,e){return r.defined("minimum",m),r.defined("maximum",n),c(e)||(e=new t),e.minimum=i.clone(m,e.minimum),e.maximum=i.clone(n,e.maximum),e.center=i.midpoint(m,n,e.center),e};t.fromPoints=function(m,n){if(c(n)||(n=new t),!c(m)||m.length===0)return n.minimum=i.clone(i.ZERO,n.minimum),n.maximum=i.clone(i.ZERO,n.maximum),n.center=i.clone(i.ZERO,n.center),n;let e=m[0].x,a=m[0].y,u=m[0].z,o=m[0].x,y=m[0].y,l=m[0].z,I=m.length;for(let E=1;E<I;E++){let M=m[E],p=M.x,Z=M.y,q=M.z;e=Math.min(p,e),o=Math.max(p,o),a=Math.min(Z,a),y=Math.max(Z,y),u=Math.min(q,u),l=Math.max(q,l)}let f=n.minimum;f.x=e,f.y=a,f.z=u;let x=n.maximum;return x.x=o,x.y=y,x.z=l,n.center=i.midpoint(f,x,n.center),n};t.clone=function(m,n){if(c(m))return c(n)?(n.minimum=i.clone(m.minimum,n.minimum),n.maximum=i.clone(m.maximum,n.maximum),n.center=i.clone(m.center,n.center),n):new t(m.minimum,m.maximum,m.center)};t.equals=function(m,n){return m===n||c(m)&&c(n)&&i.equals(m.center,n.center)&&i.equals(m.minimum,n.minimum)&&i.equals(m.maximum,n.maximum)};var h=new i;t.intersectPlane=function(m,n){r.defined("box",m),r.defined("plane",n),h=i.subtract(m.maximum,m.minimum,h);let e=i.multiplyByScalar(h,.5,h),a=n.normal,u=e.x*Math.abs(a.x)+e.y*Math.abs(a.y)+e.z*Math.abs(a.z),o=i.dot(m.center,a)+n.distance;return o-u>0?d.INSIDE:o+u<0?d.OUTSIDE:d.INTERSECTING};t.prototype.clone=function(m){return t.clone(this,m)};t.prototype.intersectPlane=function(m){return t.intersectPlane(this,m)};t.prototype.equals=function(m){return t.equals(this,m)};var P=t;export{P as a}; diff --git a/cesium/Workers/chunk-CMXCDAKR.js b/cesium/Workers/chunk-7Z5IIKOJ.js similarity index 82% rename from cesium/Workers/chunk-CMXCDAKR.js rename to cesium/Workers/chunk-7Z5IIKOJ.js index 49c94a7..99b06dc 100644 --- a/cesium/Workers/chunk-CMXCDAKR.js +++ b/cesium/Workers/chunk-7Z5IIKOJ.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,7 +23,7 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as _,b as Pe,c as Oe,d as Ie,e as $,f as un}from"./chunk-LJCGAQ64.js";import{a as I}from"./chunk-JFG572S7.js";import{a as Se}from"./chunk-IRDBGNMC.js";import{a as O}from"./chunk-42NIXFVW.js";import{a as A,b as s}from"./chunk-5YVCOCPP.js";import{a as Sn,c as En,d as Ze,e as p}from"./chunk-U73D6PDD.js";var Pt=En((en,nn)=>{/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var n=typeof en=="object"&&en&&!en.nodeType&&en,t=typeof nn=="object"&&nn&&!nn.nodeType&&nn,o=typeof global=="object"&&global;(o.global===o||o.window===o||o.self===o)&&(e=o);var i,r=2147483647,a=36,u=1,d=26,m=38,l=700,w=72,T=128,R="-",P=/^xn--/,C=/[^\x20-\x7E]/,q=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=a-u,F=Math.floor,x=String.fromCharCode,W;function Q(b){throw new RangeError(k[b])}function ee(b,z){for(var N=b.length,V=[];N--;)V[N]=z(b[N]);return V}function re(b,z){var N=b.split("@"),V="";N.length>1&&(V=N[0]+"@",b=N[1]),b=b.replace(q,".");var ie=b.split("."),ae=ee(ie,z).join(".");return V+ae}function Z(b){for(var z=[],N=0,V=b.length,ie,ae;N<V;)ie=b.charCodeAt(N++),ie>=55296&&ie<=56319&&N<V?(ae=b.charCodeAt(N++),(ae&64512)==56320?z.push(((ie&1023)<<10)+(ae&1023)+65536):(z.push(ie),N--)):z.push(ie);return z}function oe(b){return ee(b,function(z){var N="";return z>65535&&(z-=65536,N+=x(z>>>10&1023|55296),z=56320|z&1023),N+=x(z),N}).join("")}function J(b){return b-48<10?b-22:b-65<26?b-65:b-97<26?b-97:a}function c(b,z){return b+22+75*(b<26)-((z!=0)<<5)}function f(b,z,N){var V=0;for(b=N?F(b/l):b>>1,b+=F(b/z);b>L*d>>1;V+=a)b=F(b/L);return F(V+(L+1)*b/(b+m))}function h(b){var z=[],N=b.length,V,ie=0,ae=T,ne=w,ue,he,ye,de,pe,Y,_e,Re,je;for(ue=b.lastIndexOf(R),ue<0&&(ue=0),he=0;he<ue;++he)b.charCodeAt(he)>=128&&Q("not-basic"),z.push(b.charCodeAt(he));for(ye=ue>0?ue+1:0;ye<N;){for(de=ie,pe=1,Y=a;ye>=N&&Q("invalid-input"),_e=J(b.charCodeAt(ye++)),(_e>=a||_e>F((r-ie)/pe))&&Q("overflow"),ie+=_e*pe,Re=Y<=ne?u:Y>=ne+d?d:Y-ne,!(_e<Re);Y+=a)je=a-Re,pe>F(r/je)&&Q("overflow"),pe*=je;V=z.length+1,ne=f(ie-de,V,de==0),F(ie/V)>r-ae&&Q("overflow"),ae+=F(ie/V),ie%=V,z.splice(ie++,0,ae)}return oe(z)}function y(b){var z,N,V,ie,ae,ne,ue,he,ye,de,pe,Y=[],_e,Re,je,fn;for(b=Z(b),_e=b.length,z=T,N=0,ae=w,ne=0;ne<_e;++ne)pe=b[ne],pe<128&&Y.push(x(pe));for(V=ie=Y.length,ie&&Y.push(R);V<_e;){for(ue=r,ne=0;ne<_e;++ne)pe=b[ne],pe>=z&&pe<ue&&(ue=pe);for(Re=V+1,ue-z>F((r-N)/Re)&&Q("overflow"),N+=(ue-z)*Re,z=ue,ne=0;ne<_e;++ne)if(pe=b[ne],pe<z&&++N>r&&Q("overflow"),pe==z){for(he=N,ye=a;de=ye<=ae?u:ye>=ae+d?d:ye-ae,!(he<de);ye+=a)fn=he-de,je=a-de,Y.push(x(c(de+fn%je,0))),he=F(fn/je);Y.push(x(c(he,0))),ae=f(N,Re,V==ie),N=0,++V}++N,++z}return Y.join("")}function g(b){return re(b,function(z){return P.test(z)?h(z.slice(4).toLowerCase()):z})}function v(b){return re(b,function(z){return C.test(z)?"xn--"+y(z):z})}if(i={version:"1.3.2",ucs2:{decode:Z,encode:oe},decode:h,encode:y,toASCII:v,toUnicode:g},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return i});else if(n&&t)if(nn.exports==n)t.exports=i;else for(W in i)i.hasOwnProperty(W)&&(n[W]=i[W]);else e.punycode=i})(en)});var Ut=En((Mt,Pn)=>{/*! +import{a as _,b as Pe,c as Oe,d as Ie,e as $,f as un}from"./chunk-POASMU2N.js";import{a as I}from"./chunk-R6KGAEF6.js";import{a as Se}from"./chunk-II4VNKYR.js";import{a as O}from"./chunk-IUA6FAOZ.js";import{a as A,b as s}from"./chunk-UH2WFNTA.js";import{a as Sn,c as En,d as Ze,e as p}from"./chunk-PEYJTJPE.js";var Pt=En((en,nn)=>{/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var n=typeof en=="object"&&en&&!en.nodeType&&en,t=typeof nn=="object"&&nn&&!nn.nodeType&&nn,o=typeof global=="object"&&global;(o.global===o||o.window===o||o.self===o)&&(e=o);var i,r=2147483647,a=36,u=1,d=26,m=38,l=700,w=72,T=128,R="-",P=/^xn--/,C=/[^\x20-\x7E]/,q=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=a-u,F=Math.floor,x=String.fromCharCode,Q;function W(b){throw new RangeError(k[b])}function ee(b,z){for(var N=b.length,V=[];N--;)V[N]=z(b[N]);return V}function re(b,z){var N=b.split("@"),V="";N.length>1&&(V=N[0]+"@",b=N[1]),b=b.replace(q,".");var ie=b.split("."),ae=ee(ie,z).join(".");return V+ae}function Z(b){for(var z=[],N=0,V=b.length,ie,ae;N<V;)ie=b.charCodeAt(N++),ie>=55296&&ie<=56319&&N<V?(ae=b.charCodeAt(N++),(ae&64512)==56320?z.push(((ie&1023)<<10)+(ae&1023)+65536):(z.push(ie),N--)):z.push(ie);return z}function oe(b){return ee(b,function(z){var N="";return z>65535&&(z-=65536,N+=x(z>>>10&1023|55296),z=56320|z&1023),N+=x(z),N}).join("")}function J(b){return b-48<10?b-22:b-65<26?b-65:b-97<26?b-97:a}function c(b,z){return b+22+75*(b<26)-((z!=0)<<5)}function f(b,z,N){var V=0;for(b=N?F(b/l):b>>1,b+=F(b/z);b>L*d>>1;V+=a)b=F(b/L);return F(V+(L+1)*b/(b+m))}function h(b){var z=[],N=b.length,V,ie=0,ae=T,ne=w,ue,he,ye,de,pe,Y,_e,Re,je;for(ue=b.lastIndexOf(R),ue<0&&(ue=0),he=0;he<ue;++he)b.charCodeAt(he)>=128&&W("not-basic"),z.push(b.charCodeAt(he));for(ye=ue>0?ue+1:0;ye<N;){for(de=ie,pe=1,Y=a;ye>=N&&W("invalid-input"),_e=J(b.charCodeAt(ye++)),(_e>=a||_e>F((r-ie)/pe))&&W("overflow"),ie+=_e*pe,Re=Y<=ne?u:Y>=ne+d?d:Y-ne,!(_e<Re);Y+=a)je=a-Re,pe>F(r/je)&&W("overflow"),pe*=je;V=z.length+1,ne=f(ie-de,V,de==0),F(ie/V)>r-ae&&W("overflow"),ae+=F(ie/V),ie%=V,z.splice(ie++,0,ae)}return oe(z)}function y(b){var z,N,V,ie,ae,ne,ue,he,ye,de,pe,Y=[],_e,Re,je,fn;for(b=Z(b),_e=b.length,z=T,N=0,ae=w,ne=0;ne<_e;++ne)pe=b[ne],pe<128&&Y.push(x(pe));for(V=ie=Y.length,ie&&Y.push(R);V<_e;){for(ue=r,ne=0;ne<_e;++ne)pe=b[ne],pe>=z&&pe<ue&&(ue=pe);for(Re=V+1,ue-z>F((r-N)/Re)&&W("overflow"),N+=(ue-z)*Re,z=ue,ne=0;ne<_e;++ne)if(pe=b[ne],pe<z&&++N>r&&W("overflow"),pe==z){for(he=N,ye=a;de=ye<=ae?u:ye>=ae+d?d:ye-ae,!(he<de);ye+=a)fn=he-de,je=a-de,Y.push(x(c(de+fn%je,0))),he=F(fn/je);Y.push(x(c(he,0))),ae=f(N,Re,V==ie),N=0,++V}++N,++z}return Y.join("")}function g(b){return re(b,function(z){return P.test(z)?h(z.slice(4).toLowerCase()):z})}function v(b){return re(b,function(z){return C.test(z)?"xn--"+y(z):z})}if(i={version:"1.3.2",ucs2:{decode:Z,encode:oe},decode:h,encode:y,toASCII:v,toUnicode:g},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return i});else if(n&&t)if(nn.exports==n)t.exports=i;else for(Q in i)i.hasOwnProperty(Q)&&(n[Q]=i[Q]);else e.punycode=i})(en)});var Ut=En((Mt,Pn)=>{/*! * URI.js - Mutating URLs * IPv6 Support * @@ -47,7 +47,7 @@ import{a as _,b as Pe,c as Oe,d as Ie,e as $,f as un}from"./chunk-LJCGAQ64.js";i * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * - */(function(e,n){"use strict";typeof Mn=="object"&&Mn.exports?Mn.exports=n():typeof define=="function"&&define.amd?define(n):e.SecondLevelDomains=n(e)})(zt,function(e){"use strict";var n=e&&e.SecondLevelDomains,t={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(o){var i=o.lastIndexOf(".");if(i<=0||i>=o.length-1)return!1;var r=o.lastIndexOf(".",i-1);if(r<=0||r>=i-1)return!1;var a=t.list[o.slice(i+1)];return a?a.indexOf(" "+o.slice(r+1,i)+" ")>=0:!1},is:function(o){var i=o.lastIndexOf(".");if(i<=0||i>=o.length-1)return!1;var r=o.lastIndexOf(".",i-1);if(r>=0)return!1;var a=t.list[o.slice(i+1)];return a?a.indexOf(" "+o.slice(0,i)+" ")>=0:!1},get:function(o){var i=o.lastIndexOf(".");if(i<=0||i>=o.length-1)return null;var r=o.lastIndexOf(".",i-1);if(r<=0||r>=i-1)return null;var a=t.list[o.slice(i+1)];return!a||a.indexOf(" "+o.slice(r+1,i)+" ")<0?null:o.slice(r+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=n),this}};return t})});var We=En((qt,Un)=>{/*! + */(function(e,n){"use strict";typeof Mn=="object"&&Mn.exports?Mn.exports=n():typeof define=="function"&&define.amd?define(n):e.SecondLevelDomains=n(e)})(zt,function(e){"use strict";var n=e&&e.SecondLevelDomains,t={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(o){var i=o.lastIndexOf(".");if(i<=0||i>=o.length-1)return!1;var r=o.lastIndexOf(".",i-1);if(r<=0||r>=i-1)return!1;var a=t.list[o.slice(i+1)];return a?a.indexOf(" "+o.slice(r+1,i)+" ")>=0:!1},is:function(o){var i=o.lastIndexOf(".");if(i<=0||i>=o.length-1)return!1;var r=o.lastIndexOf(".",i-1);if(r>=0)return!1;var a=t.list[o.slice(i+1)];return a?a.indexOf(" "+o.slice(0,i)+" ")>=0:!1},get:function(o){var i=o.lastIndexOf(".");if(i<=0||i>=o.length-1)return null;var r=o.lastIndexOf(".",i-1);if(r<=0||r>=i-1)return null;var a=t.list[o.slice(i+1)];return!a||a.indexOf(" "+o.slice(r+1,i)+" ")<0?null:o.slice(r+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=n),this}};return t})});var Qe=En((qt,Un)=>{/*! * URI.js - Mutating URLs * * Version: 1.19.11 @@ -58,9 +58,9 @@ import{a as _,b as Pe,c as Oe,d as Ie,e as $,f as un}from"./chunk-LJCGAQ64.js";i * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * - */(function(e,n){"use strict";typeof Un=="object"&&Un.exports?Un.exports=n(Pt(),Ut(),It()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],n):e.URI=n(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(qt,function(e,n,t,o){"use strict";var i=o&&o.URI;function r(c,f){var h=arguments.length>=1,y=arguments.length>=2;if(!(this instanceof r))return h?y?new r(c,f):new r(c):new r;if(c===void 0){if(h)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?c=location.href+"":c=""}if(c===null&&h)throw new TypeError("null is not a valid argument for URI");return this.href(c),f!==void 0?this.absoluteTo(f):this}function a(c){return/^[0-9]+$/.test(c)}r.version="1.19.11";var u=r.prototype,d=Object.prototype.hasOwnProperty;function m(c){return c.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(c){return c===void 0?"Undefined":String(Object.prototype.toString.call(c)).slice(8,-1)}function w(c){return l(c)==="Array"}function T(c,f){var h={},y,g;if(l(f)==="RegExp")h=null;else if(w(f))for(y=0,g=f.length;y<g;y++)h[f[y]]=!0;else h[f]=!0;for(y=0,g=c.length;y<g;y++){var v=h&&h[c[y]]!==void 0||!h&&f.test(c[y]);v&&(c.splice(y,1),g--,y--)}return c}function R(c,f){var h,y;if(w(f)){for(h=0,y=f.length;h<y;h++)if(!R(c,f[h]))return!1;return!0}var g=l(f);for(h=0,y=c.length;h<y;h++)if(g==="RegExp"){if(typeof c[h]=="string"&&c[h].match(f))return!0}else if(c[h]===f)return!0;return!1}function P(c,f){if(!w(c)||!w(f)||c.length!==f.length)return!1;c.sort(),f.sort();for(var h=0,y=c.length;h<y;h++)if(c[h]!==f[h])return!1;return!0}function C(c){var f=/^\/+|\/+$/g;return c.replace(f,"")}r._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:r.preventInvalidHostname,duplicateQueryParameters:r.duplicateQueryParameters,escapeQuerySpace:r.escapeQuerySpace}},r.preventInvalidHostname=!1,r.duplicateQueryParameters=!1,r.escapeQuerySpace=!0,r.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,r.idn_expression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-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,r.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(c){if(!(!c||!c.nodeName)){var f=c.nodeName.toLowerCase();if(!(f==="input"&&c.type!=="image"))return r.domAttributes[f]}};function q(c){return escape(c)}function k(c){return encodeURIComponent(c).replace(/[!'()*]/g,q).replace(/\*/g,"%2A")}r.encode=k,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=k,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(c,f){var h=r.encode(c+"");return f===void 0&&(f=r.escapeQuerySpace),f?h.replace(/%20/g,"+"):h},r.decodeQuery=function(c,f){c+="",f===void 0&&(f=r.escapeQuerySpace);try{return r.decode(f?c.replace(/\+/g,"%20"):c)}catch{return c}};var L={encode:"encode",decode:"decode"},F,x=function(c,f){return function(h){try{return r[f](h+"").replace(r.characters[c][f].expression,function(y){return r.characters[c][f].map[y]})}catch{return h}}};for(F in L)r[F+"PathSegment"]=x("pathname",L[F]),r[F+"UrnPathSegment"]=x("urnpath",L[F]);var W=function(c,f,h){return function(y){var g;h?g=function(N){return r[f](r[h](N))}:g=r[f];for(var v=(y+"").split(c),b=0,z=v.length;b<z;b++)v[b]=g(v[b]);return v.join(c)}};r.decodePath=W("/","decodePathSegment"),r.decodeUrnPath=W(":","decodeUrnPathSegment"),r.recodePath=W("/","encodePathSegment","decode"),r.recodeUrnPath=W(":","encodeUrnPathSegment","decode"),r.encodeReserved=x("reserved","encode"),r.parse=function(c,f){var h;return f||(f={preventInvalidHostname:r.preventInvalidHostname}),c=c.replace(r.leading_whitespace_expression,""),c=c.replace(r.ascii_tab_whitespace,""),h=c.indexOf("#"),h>-1&&(f.fragment=c.substring(h+1)||null,c=c.substring(0,h)),h=c.indexOf("?"),h>-1&&(f.query=c.substring(h+1)||null,c=c.substring(0,h)),c=c.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),c=c.replace(/^[/\\]{2,}/i,"//"),c.substring(0,2)==="//"?(f.protocol=null,c=c.substring(2),c=r.parseAuthority(c,f)):(h=c.indexOf(":"),h>-1&&(f.protocol=c.substring(0,h)||null,f.protocol&&!f.protocol.match(r.protocol_expression)?f.protocol=void 0:c.substring(h+1,h+3).replace(/\\/g,"/")==="//"?(c=c.substring(h+3),c=r.parseAuthority(c,f)):(c=c.substring(h+1),f.urn=!0))),f.path=c,f},r.parseHost=function(c,f){c||(c=""),c=c.replace(/\\/g,"/");var h=c.indexOf("/"),y,g;if(h===-1&&(h=c.length),c.charAt(0)==="[")y=c.indexOf("]"),f.hostname=c.substring(1,y)||null,f.port=c.substring(y+2,h)||null,f.port==="/"&&(f.port=null);else{var v=c.indexOf(":"),b=c.indexOf("/"),z=c.indexOf(":",v+1);z!==-1&&(b===-1||z<b)?(f.hostname=c.substring(0,h)||null,f.port=null):(g=c.substring(0,h).split(":"),f.hostname=g[0]||null,f.port=g[1]||null)}return f.hostname&&c.substring(h).charAt(0)!=="/"&&(h++,c="/"+c),f.preventInvalidHostname&&r.ensureValidHostname(f.hostname,f.protocol),f.port&&r.ensureValidPort(f.port),c.substring(h)||"/"},r.parseAuthority=function(c,f){return c=r.parseUserinfo(c,f),r.parseHost(c,f)},r.parseUserinfo=function(c,f){var h=c,y=c.indexOf("\\");y!==-1&&(c=c.replace(/\\/g,"/"));var g=c.indexOf("/"),v=c.lastIndexOf("@",g>-1?g:c.length-1),b;return v>-1&&(g===-1||v<g)?(b=c.substring(0,v).split(":"),f.username=b[0]?r.decode(b[0]):null,b.shift(),f.password=b[0]?r.decode(b.join(":")):null,c=h.substring(v+1)):(f.username=null,f.password=null),c},r.parseQuery=function(c,f){if(!c)return{};if(c=c.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!c)return{};for(var h={},y=c.split("&"),g=y.length,v,b,z,N=0;N<g;N++)v=y[N].split("="),b=r.decodeQuery(v.shift(),f),z=v.length?r.decodeQuery(v.join("="),f):null,b!=="__proto__"&&(d.call(h,b)?((typeof h[b]=="string"||h[b]===null)&&(h[b]=[h[b]]),h[b].push(z)):h[b]=z);return h},r.build=function(c){var f="",h=!1;return c.protocol&&(f+=c.protocol+":"),!c.urn&&(f||c.hostname)&&(f+="//",h=!0),f+=r.buildAuthority(c)||"",typeof c.path=="string"&&(c.path.charAt(0)!=="/"&&h&&(f+="/"),f+=c.path),typeof c.query=="string"&&c.query&&(f+="?"+c.query),typeof c.fragment=="string"&&c.fragment&&(f+="#"+c.fragment),f},r.buildHost=function(c){var f="";if(c.hostname)r.ip6_expression.test(c.hostname)?f+="["+c.hostname+"]":f+=c.hostname;else return"";return c.port&&(f+=":"+c.port),f},r.buildAuthority=function(c){return r.buildUserinfo(c)+r.buildHost(c)},r.buildUserinfo=function(c){var f="";return c.username&&(f+=r.encode(c.username)),c.password&&(f+=":"+r.encode(c.password)),f&&(f+="@"),f},r.buildQuery=function(c,f,h){var y="",g,v,b,z;for(v in c)if(v!=="__proto__"&&d.call(c,v))if(w(c[v]))for(g={},b=0,z=c[v].length;b<z;b++)c[v][b]!==void 0&&g[c[v][b]+""]===void 0&&(y+="&"+r.buildQueryParameter(v,c[v][b],h),f!==!0&&(g[c[v][b]+""]=!0));else c[v]!==void 0&&(y+="&"+r.buildQueryParameter(v,c[v],h));return y.substring(1)},r.buildQueryParameter=function(c,f,h){return r.encodeQuery(c,h)+(f!==null?"="+r.encodeQuery(f,h):"")},r.addQuery=function(c,f,h){if(typeof f=="object")for(var y in f)d.call(f,y)&&r.addQuery(c,y,f[y]);else if(typeof f=="string"){if(c[f]===void 0){c[f]=h;return}else typeof c[f]=="string"&&(c[f]=[c[f]]);w(h)||(h=[h]),c[f]=(c[f]||[]).concat(h)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},r.setQuery=function(c,f,h){if(typeof f=="object")for(var y in f)d.call(f,y)&&r.setQuery(c,y,f[y]);else if(typeof f=="string")c[f]=h===void 0?null:h;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},r.removeQuery=function(c,f,h){var y,g,v;if(w(f))for(y=0,g=f.length;y<g;y++)c[f[y]]=void 0;else if(l(f)==="RegExp")for(v in c)f.test(v)&&(c[v]=void 0);else if(typeof f=="object")for(v in f)d.call(f,v)&&r.removeQuery(c,v,f[v]);else if(typeof f=="string")h!==void 0?l(h)==="RegExp"?!w(c[f])&&h.test(c[f])?c[f]=void 0:c[f]=T(c[f],h):c[f]===String(h)&&(!w(h)||h.length===1)?c[f]=void 0:w(c[f])&&(c[f]=T(c[f],h)):c[f]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},r.hasQuery=function(c,f,h,y){switch(l(f)){case"String":break;case"RegExp":for(var g in c)if(d.call(c,g)&&f.test(g)&&(h===void 0||r.hasQuery(c,g,h)))return!0;return!1;case"Object":for(var v in f)if(d.call(f,v)&&!r.hasQuery(c,v,f[v]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(l(h)){case"Undefined":return f in c;case"Boolean":var b=!!(w(c[f])?c[f].length:c[f]);return h===b;case"Function":return!!h(c[f],f,c);case"Array":if(!w(c[f]))return!1;var z=y?R:P;return z(c[f],h);case"RegExp":return w(c[f])?y?R(c[f],h):!1:!!(c[f]&&c[f].match(h));case"Number":h=String(h);case"String":return w(c[f])?y?R(c[f],h):!1:c[f]===h;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.joinPaths=function(){for(var c=[],f=[],h=0,y=0;y<arguments.length;y++){var g=new r(arguments[y]);c.push(g);for(var v=g.segment(),b=0;b<v.length;b++)typeof v[b]=="string"&&f.push(v[b]),v[b]&&h++}if(!f.length||!h)return new r("");var z=new r("").segment(f);return(c[0].path()===""||c[0].path().slice(0,1)==="/")&&z.path("/"+z.path()),z.normalize()},r.commonPath=function(c,f){var h=Math.min(c.length,f.length),y;for(y=0;y<h;y++)if(c.charAt(y)!==f.charAt(y)){y--;break}return y<1?c.charAt(0)===f.charAt(0)&&c.charAt(0)==="/"?"/":"":((c.charAt(y)!=="/"||f.charAt(y)!=="/")&&(y=c.substring(0,y).lastIndexOf("/")),c.substring(0,y+1))},r.withinString=function(c,f,h){h||(h={});var y=h.start||r.findUri.start,g=h.end||r.findUri.end,v=h.trim||r.findUri.trim,b=h.parens||r.findUri.parens,z=/[a-z0-9-]=["']?$/i;for(y.lastIndex=0;;){var N=y.exec(c);if(!N)break;var V=N.index;if(h.ignoreHtml){var ie=c.slice(Math.max(V-3,0),V);if(ie&&z.test(ie))continue}for(var ae=V+c.slice(V).search(g),ne=c.slice(V,ae),ue=-1;;){var he=b.exec(ne);if(!he)break;var ye=he.index+he[0].length;ue=Math.max(ue,ye)}if(ue>-1?ne=ne.slice(0,ue)+ne.slice(ue).replace(v,""):ne=ne.replace(v,""),!(ne.length<=N[0].length)&&!(h.ignore&&h.ignore.test(ne))){ae=V+ne.length;var de=f(ne,V,ae,c);if(de===void 0){y.lastIndex=ae;continue}de=String(de),c=c.slice(0,V)+de+c.slice(ae),y.lastIndex=V+de.length}}return y.lastIndex=0,c},r.ensureValidHostname=function(c,f){var h=!!c,y=!!f,g=!1;if(y&&(g=R(r.hostProtocols,f)),g&&!h)throw new TypeError("Hostname cannot be empty, if protocol is "+f);if(c&&c.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(c).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(c){if(c){var f=Number(c);if(!(a(f)&&f>0&&f<65536))throw new TypeError('Port "'+c+'" is not a valid port')}},r.noConflict=function(c){if(c){var f={URI:this.noConflict()};return o.URITemplate&&typeof o.URITemplate.noConflict=="function"&&(f.URITemplate=o.URITemplate.noConflict()),o.IPv6&&typeof o.IPv6.noConflict=="function"&&(f.IPv6=o.IPv6.noConflict()),o.SecondLevelDomains&&typeof o.SecondLevelDomains.noConflict=="function"&&(f.SecondLevelDomains=o.SecondLevelDomains.noConflict()),f}else o.URI===this&&(o.URI=i);return this},u.build=function(c){return c===!0?this._deferred_build=!0:(c===void 0||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},u.clone=function(){return new r(this)},u.valueOf=u.toString=function(){return this.build(!1)._string};function Q(c){return function(f,h){return f===void 0?this._parts[c]||"":(this._parts[c]=f||null,this.build(!h),this)}}function ee(c,f){return function(h,y){return h===void 0?this._parts[c]||"":(h!==null&&(h=h+"",h.charAt(0)===f&&(h=h.substring(1))),this._parts[c]=h,this.build(!y),this)}}u.protocol=Q("protocol"),u.username=Q("username"),u.password=Q("password"),u.hostname=Q("hostname"),u.port=Q("port"),u.query=ee("query","?"),u.fragment=ee("fragment","#"),u.search=function(c,f){var h=this.query(c,f);return typeof h=="string"&&h.length?"?"+h:h},u.hash=function(c,f){var h=this.fragment(c,f);return typeof h=="string"&&h.length?"#"+h:h},u.pathname=function(c,f){if(c===void 0||c===!0){var h=this._parts.path||(this._parts.hostname?"/":"");return c?(this._parts.urn?r.decodeUrnPath:r.decodePath)(h):h}else return this._parts.urn?this._parts.path=c?r.recodeUrnPath(c):"":this._parts.path=c?r.recodePath(c):"/",this.build(!f),this},u.path=u.pathname,u.href=function(c,f){var h;if(c===void 0)return this.toString();this._string="",this._parts=r._parts();var y=c instanceof r,g=typeof c=="object"&&(c.hostname||c.path||c.pathname);if(c.nodeName){var v=r.getDomAttribute(c);c=c[v]||"",g=!1}if(!y&&g&&c.pathname!==void 0&&(c=c.toString()),typeof c=="string"||c instanceof String)this._parts=r.parse(String(c),this._parts);else if(y||g){var b=y?c._parts:c;for(h in b)h!=="query"&&d.call(this._parts,h)&&(this._parts[h]=b[h]);b.query&&this.query(b.query,!1)}else throw new TypeError("invalid input");return this.build(!f),this},u.is=function(c){var f=!1,h=!1,y=!1,g=!1,v=!1,b=!1,z=!1,N=!this._parts.urn;switch(this._parts.hostname&&(N=!1,h=r.ip4_expression.test(this._parts.hostname),y=r.ip6_expression.test(this._parts.hostname),f=h||y,g=!f,v=g&&t&&t.has(this._parts.hostname),b=g&&r.idn_expression.test(this._parts.hostname),z=g&&r.punycode_expression.test(this._parts.hostname)),c.toLowerCase()){case"relative":return N;case"absolute":return!N;case"domain":case"name":return g;case"sld":return v;case"ip":return f;case"ip4":case"ipv4":case"inet4":return h;case"ip6":case"ipv6":case"inet6":return y;case"idn":return b;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return z}return null};var re=u.protocol,Z=u.port,oe=u.hostname;u.protocol=function(c,f){if(c&&(c=c.replace(/:(\/\/)?$/,""),!c.match(r.protocol_expression)))throw new TypeError('Protocol "'+c+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return re.call(this,c,f)},u.scheme=u.protocol,u.port=function(c,f){return this._parts.urn?c===void 0?"":this:(c!==void 0&&(c===0&&(c=null),c&&(c+="",c.charAt(0)===":"&&(c=c.substring(1)),r.ensureValidPort(c))),Z.call(this,c,f))},u.hostname=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c!==void 0){var h={preventInvalidHostname:this._parts.preventInvalidHostname},y=r.parseHost(c,h);if(y!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');c=h.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(c,this._parts.protocol)}return oe.call(this,c,f)},u.origin=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){var h=this.protocol(),y=this.authority();return y?(h?h+"://":"")+this.authority():""}else{var g=r(c);return this.protocol(g.protocol()).authority(g.authority()).build(!f),this}},u.host=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0)return this._parts.hostname?r.buildHost(this._parts):"";var h=r.parseHost(c,this._parts);if(h!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');return this.build(!f),this},u.authority=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0)return this._parts.hostname?r.buildAuthority(this._parts):"";var h=r.parseAuthority(c,this._parts);if(h!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');return this.build(!f),this},u.userinfo=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){var h=r.buildUserinfo(this._parts);return h&&h.substring(0,h.length-1)}else return c[c.length-1]!=="@"&&(c+="@"),r.parseUserinfo(c,this._parts),this.build(!f),this},u.resource=function(c,f){var h;return c===void 0?this.path()+this.search()+this.hash():(h=r.parse(c),this._parts.path=h.path,this._parts.query=h.query,this._parts.fragment=h.fragment,this.build(!f),this)},u.subdomain=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var h=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,h)||""}else{var y=this._parts.hostname.length-this.domain().length,g=this._parts.hostname.substring(0,y),v=new RegExp("^"+m(g));if(c&&c.charAt(c.length-1)!=="."&&(c+="."),c.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return c&&r.ensureValidHostname(c,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(v,c),this.build(!f),this}},u.domain=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(typeof c=="boolean"&&(f=c,c=void 0),c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var h=this._parts.hostname.match(/\./g);if(h&&h.length<2)return this._parts.hostname;var y=this._parts.hostname.length-this.tld(f).length-1;return y=this._parts.hostname.lastIndexOf(".",y-1)+1,this._parts.hostname.substring(y)||""}else{if(!c)throw new TypeError("cannot set domain empty");if(c.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(c,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=c;else{var g=new RegExp(m(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(g,c)}return this.build(!f),this}},u.tld=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(typeof c=="boolean"&&(f=c,c=void 0),c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var h=this._parts.hostname.lastIndexOf("."),y=this._parts.hostname.substring(h+1);return f!==!0&&t&&t.list[y.toLowerCase()]&&t.get(this._parts.hostname)||y}else{var g;if(c)if(c.match(/[^a-zA-Z0-9-]/))if(t&&t.is(c))g=new RegExp(m(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(g,c);else throw new TypeError('TLD "'+c+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");g=new RegExp(m(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(g,c)}else throw new TypeError("cannot set TLD empty");return this.build(!f),this}},u.directory=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0||c===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var h=this._parts.path.length-this.filename().length-1,y=this._parts.path.substring(0,h)||(this._parts.hostname?"/":"");return c?r.decodePath(y):y}else{var g=this._parts.path.length-this.filename().length,v=this._parts.path.substring(0,g),b=new RegExp("^"+m(v));return this.is("relative")||(c||(c="/"),c.charAt(0)!=="/"&&(c="/"+c)),c&&c.charAt(c.length-1)!=="/"&&(c+="/"),c=r.recodePath(c),this._parts.path=this._parts.path.replace(b,c),this.build(!f),this}},u.filename=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(typeof c!="string"){if(!this._parts.path||this._parts.path==="/")return"";var h=this._parts.path.lastIndexOf("/"),y=this._parts.path.substring(h+1);return c?r.decodePathSegment(y):y}else{var g=!1;c.charAt(0)==="/"&&(c=c.substring(1)),c.match(/\.?\//)&&(g=!0);var v=new RegExp(m(this.filename())+"$");return c=r.recodePath(c),this._parts.path=this._parts.path.replace(v,c),g?this.normalizePath(f):this.build(!f),this}},u.suffix=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0||c===!0){if(!this._parts.path||this._parts.path==="/")return"";var h=this.filename(),y=h.lastIndexOf("."),g,v;return y===-1?"":(g=h.substring(y+1),v=/^[a-z0-9%]+$/i.test(g)?g:"",c?r.decodePathSegment(v):v)}else{c.charAt(0)==="."&&(c=c.substring(1));var b=this.suffix(),z;if(b)c?z=new RegExp(m(b)+"$"):z=new RegExp(m("."+b)+"$");else{if(!c)return this;this._parts.path+="."+r.recodePath(c)}return z&&(c=r.recodePath(c),this._parts.path=this._parts.path.replace(z,c)),this.build(!f),this}},u.segment=function(c,f,h){var y=this._parts.urn?":":"/",g=this.path(),v=g.substring(0,1)==="/",b=g.split(y);if(c!==void 0&&typeof c!="number"&&(h=f,f=c,c=void 0),c!==void 0&&typeof c!="number")throw new Error('Bad segment "'+c+'", must be 0-based integer');if(v&&b.shift(),c<0&&(c=Math.max(b.length+c,0)),f===void 0)return c===void 0?b:b[c];if(c===null||b[c]===void 0)if(w(f)){b=[];for(var z=0,N=f.length;z<N;z++)!f[z].length&&(!b.length||!b[b.length-1].length)||(b.length&&!b[b.length-1].length&&b.pop(),b.push(C(f[z])))}else(f||typeof f=="string")&&(f=C(f),b[b.length-1]===""?b[b.length-1]=f:b.push(f));else f?b[c]=C(f):b.splice(c,1);return v&&b.unshift(""),this.path(b.join(y),h)},u.segmentCoded=function(c,f,h){var y,g,v;if(typeof c!="number"&&(h=f,f=c,c=void 0),f===void 0){if(y=this.segment(c,f,h),!w(y))y=y!==void 0?r.decode(y):void 0;else for(g=0,v=y.length;g<v;g++)y[g]=r.decode(y[g]);return y}if(!w(f))f=typeof f=="string"||f instanceof String?r.encode(f):f;else for(g=0,v=f.length;g<v;g++)f[g]=r.encode(f[g]);return this.segment(c,f,h)};var J=u.query;return u.query=function(c,f){if(c===!0)return r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof c=="function"){var h=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),y=c.call(this,h);return this._parts.query=r.buildQuery(y||h,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this}else return c!==void 0&&typeof c!="string"?(this._parts.query=r.buildQuery(c,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this):J.call(this,c,f)},u.setQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof c=="string"||c instanceof String)y[c]=f!==void 0?f:null;else if(typeof c=="object")for(var g in c)d.call(c,g)&&(y[g]=c[g]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof c!="string"&&(h=f),this.build(!h),this},u.addQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.addQuery(y,c,f===void 0?null:f),this._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof c!="string"&&(h=f),this.build(!h),this},u.removeQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.removeQuery(y,c,f),this._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof c!="string"&&(h=f),this.build(!h),this},u.hasQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.hasQuery(y,c,f,h)},u.setSearch=u.setQuery,u.addSearch=u.addQuery,u.removeSearch=u.removeQuery,u.hasSearch=u.hasQuery,u.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},u.normalizeProtocol=function(c){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!c)),this},u.normalizeHostname=function(c){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&n&&(this._parts.hostname=n.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!c)),this},u.normalizePort=function(c){return typeof this._parts.protocol=="string"&&this._parts.port===r.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!c)),this},u.normalizePath=function(c){var f=this._parts.path;if(!f)return this;if(this._parts.urn)return this._parts.path=r.recodeUrnPath(this._parts.path),this.build(!c),this;if(this._parts.path==="/")return this;f=r.recodePath(f);var h,y="",g,v;for(f.charAt(0)!=="/"&&(h=!0,f="/"+f),(f.slice(-3)==="/.."||f.slice(-2)==="/.")&&(f+="/"),f=f.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),h&&(y=f.substring(1).match(/^(\.\.\/)+/)||"",y&&(y=y[0]));g=f.search(/\/\.\.(\/|$)/),g!==-1;){if(g===0){f=f.substring(3);continue}v=f.substring(0,g).lastIndexOf("/"),v===-1&&(v=g),f=f.substring(0,v)+f.substring(g+3)}return h&&this.is("relative")&&(f=y+f.substring(1)),this._parts.path=f,this.build(!c),this},u.normalizePathname=u.normalizePath,u.normalizeQuery=function(c){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(r.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!c)),this},u.normalizeFragment=function(c){return this._parts.fragment||(this._parts.fragment=null,this.build(!c)),this},u.normalizeSearch=u.normalizeQuery,u.normalizeHash=u.normalizeFragment,u.iso8859=function(){var c=r.encode,f=r.decode;r.encode=escape,r.decode=decodeURIComponent;try{this.normalize()}finally{r.encode=c,r.decode=f}return this},u.unicode=function(){var c=r.encode,f=r.decode;r.encode=k,r.decode=unescape;try{this.normalize()}finally{r.encode=c,r.decode=f}return this},u.readable=function(){var c=this.clone();c.username("").password("").normalize();var f="";if(c._parts.protocol&&(f+=c._parts.protocol+"://"),c._parts.hostname&&(c.is("punycode")&&e?(f+=e.toUnicode(c._parts.hostname),c._parts.port&&(f+=":"+c._parts.port)):f+=c.host()),c._parts.hostname&&c._parts.path&&c._parts.path.charAt(0)!=="/"&&(f+="/"),f+=c.path(!0),c._parts.query){for(var h="",y=0,g=c._parts.query.split("&"),v=g.length;y<v;y++){var b=(g[y]||"").split("=");h+="&"+r.decodeQuery(b[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),b[1]!==void 0&&(h+="="+r.decodeQuery(b[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}f+="?"+h.substring(1)}return f+=r.decodeQuery(c.hash(),!0),f},u.absoluteTo=function(c){var f=this.clone(),h=["protocol","username","password","hostname","port"],y,g,v;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(c instanceof r||(c=new r(c)),f._parts.protocol||(f._parts.protocol=c._parts.protocol,this._parts.hostname))return f;for(g=0;v=h[g];g++)f._parts[v]=c._parts[v];return f._parts.path?(f._parts.path.substring(-2)===".."&&(f._parts.path+="/"),f.path().charAt(0)!=="/"&&(y=c.directory(),y=y||(c.path().indexOf("/")===0?"/":""),f._parts.path=(y?y+"/":"")+f._parts.path,f.normalizePath())):(f._parts.path=c._parts.path,f._parts.query||(f._parts.query=c._parts.query)),f.build(),f},u.relativeTo=function(c){var f=this.clone().normalize(),h,y,g,v,b;if(f._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(c=new r(c).normalize(),h=f._parts,y=c._parts,v=f.path(),b=c.path(),v.charAt(0)!=="/")throw new Error("URI is already relative");if(b.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(h.protocol===y.protocol&&(h.protocol=null),h.username!==y.username||h.password!==y.password||h.protocol!==null||h.username!==null||h.password!==null)return f.build();if(h.hostname===y.hostname&&h.port===y.port)h.hostname=null,h.port=null;else return f.build();if(v===b)return h.path="",f.build();if(g=r.commonPath(v,b),!g)return f.build();var z=y.path.substring(g.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return h.path=z+h.path.substring(g.length)||"./",f.build()},u.equals=function(c){var f=this.clone(),h=new r(c),y={},g={},v={},b,z,N;if(f.normalize(),h.normalize(),f.toString()===h.toString())return!0;if(b=f.query(),z=h.query(),f.query(""),h.query(""),f.toString()!==h.toString()||b.length!==z.length)return!1;y=r.parseQuery(b,this._parts.escapeQuerySpace),g=r.parseQuery(z,this._parts.escapeQuerySpace);for(N in y)if(d.call(y,N)){if(w(y[N])){if(!P(y[N],g[N]))return!1}else if(y[N]!==g[N])return!1;v[N]=!0}for(N in g)if(d.call(g,N)&&!v[N])return!1;return!0},u.preventInvalidHostname=function(c){return this._parts.preventInvalidHostname=!!c,this},u.duplicateQueryParameters=function(c){return this._parts.duplicateQueryParameters=!!c,this},u.escapeQuerySpace=function(c){return this._parts.escapeQuerySpace=!!c,this},r})});function j(e,n,t,o){this.x=O(e,0),this.y=O(n,0),this.z=O(t,0),this.w=O(o,0)}j.fromElements=function(e,n,t,o,i){return p(i)?(i.x=e,i.y=n,i.z=t,i.w=o,i):new j(e,n,t,o)};j.fromColor=function(e,n){return s.typeOf.object("color",e),p(n)?(n.x=e.red,n.y=e.green,n.z=e.blue,n.w=e.alpha,n):new j(e.red,e.green,e.blue,e.alpha)};j.clone=function(e,n){if(p(e))return p(n)?(n.x=e.x,n.y=e.y,n.z=e.z,n.w=e.w,n):new j(e.x,e.y,e.z,e.w)};j.packedLength=4;j.pack=function(e,n,t){return s.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e.x,n[t++]=e.y,n[t++]=e.z,n[t]=e.w,n};j.unpack=function(e,n,t){return s.defined("array",e),n=O(n,0),p(t)||(t=new j),t.x=e[n++],t.y=e[n++],t.z=e[n++],t.w=e[n],t};j.packArray=function(e,n){s.defined("array",e);let t=e.length,o=t*4;if(!p(n))n=new Array(o);else{if(!Array.isArray(n)&&n.length!==o)throw new A("If result is a typed array, it must have exactly array.length * 4 elements");n.length!==o&&(n.length=o)}for(let i=0;i<t;++i)j.pack(e[i],n,i*4);return n};j.unpackArray=function(e,n){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!==0)throw new A("array length must be a multiple of 4.");let t=e.length;p(n)?n.length=t/4:n=new Array(t/4);for(let o=0;o<t;o+=4){let i=o/4;n[i]=j.unpack(e,o,n[i])}return n};j.fromArray=j.unpack;j.maximumComponent=function(e){return s.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)};j.minimumComponent=function(e){return s.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)};j.minimumByComponent=function(e,n,t){return s.typeOf.object("first",e),s.typeOf.object("second",n),s.typeOf.object("result",t),t.x=Math.min(e.x,n.x),t.y=Math.min(e.y,n.y),t.z=Math.min(e.z,n.z),t.w=Math.min(e.w,n.w),t};j.maximumByComponent=function(e,n,t){return s.typeOf.object("first",e),s.typeOf.object("second",n),s.typeOf.object("result",t),t.x=Math.max(e.x,n.x),t.y=Math.max(e.y,n.y),t.z=Math.max(e.z,n.z),t.w=Math.max(e.w,n.w),t};j.clamp=function(e,n,t,o){s.typeOf.object("value",e),s.typeOf.object("min",n),s.typeOf.object("max",t),s.typeOf.object("result",o);let i=I.clamp(e.x,n.x,t.x),r=I.clamp(e.y,n.y,t.y),a=I.clamp(e.z,n.z,t.z),u=I.clamp(e.w,n.w,t.w);return o.x=i,o.y=r,o.z=a,o.w=u,o};j.magnitudeSquared=function(e){return s.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};j.magnitude=function(e){return Math.sqrt(j.magnitudeSquared(e))};var Tn=new j;j.distance=function(e,n){return s.typeOf.object("left",e),s.typeOf.object("right",n),j.subtract(e,n,Tn),j.magnitude(Tn)};j.distanceSquared=function(e,n){return s.typeOf.object("left",e),s.typeOf.object("right",n),j.subtract(e,n,Tn),j.magnitudeSquared(Tn)};j.normalize=function(e,n){s.typeOf.object("cartesian",e),s.typeOf.object("result",n);let t=j.magnitude(e);if(n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,isNaN(n.x)||isNaN(n.y)||isNaN(n.z)||isNaN(n.w))throw new A("normalized result is not a number");return n};j.dot=function(e,n){return s.typeOf.object("left",e),s.typeOf.object("right",n),e.x*n.x+e.y*n.y+e.z*n.z+e.w*n.w};j.multiplyComponents=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x*n.x,t.y=e.y*n.y,t.z=e.z*n.z,t.w=e.w*n.w,t};j.divideComponents=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x/n.x,t.y=e.y/n.y,t.z=e.z/n.z,t.w=e.w/n.w,t};j.add=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x+n.x,t.y=e.y+n.y,t.z=e.z+n.z,t.w=e.w+n.w,t};j.subtract=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x-n.x,t.y=e.y-n.y,t.z=e.z-n.z,t.w=e.w-n.w,t};j.multiplyByScalar=function(e,n,t){return s.typeOf.object("cartesian",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t.w=e.w*n,t};j.divideByScalar=function(e,n,t){return s.typeOf.object("cartesian",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,t};j.negate=function(e,n){return s.typeOf.object("cartesian",e),s.typeOf.object("result",n),n.x=-e.x,n.y=-e.y,n.z=-e.z,n.w=-e.w,n};j.abs=function(e,n){return s.typeOf.object("cartesian",e),s.typeOf.object("result",n),n.x=Math.abs(e.x),n.y=Math.abs(e.y),n.z=Math.abs(e.z),n.w=Math.abs(e.w),n};var Et=new j;j.lerp=function(e,n,t,o){return s.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o),j.multiplyByScalar(n,t,Et),o=j.multiplyByScalar(e,1-t,o),j.add(Et,o,o)};var Uo=new j;j.mostOrthogonalAxis=function(e,n){s.typeOf.object("cartesian",e),s.typeOf.object("result",n);let t=j.normalize(e,Uo);return j.abs(t,t),t.x<=t.y?t.x<=t.z?t.x<=t.w?n=j.clone(j.UNIT_X,n):n=j.clone(j.UNIT_W,n):t.z<=t.w?n=j.clone(j.UNIT_Z,n):n=j.clone(j.UNIT_W,n):t.y<=t.z?t.y<=t.w?n=j.clone(j.UNIT_Y,n):n=j.clone(j.UNIT_W,n):t.z<=t.w?n=j.clone(j.UNIT_Z,n):n=j.clone(j.UNIT_W,n),n};j.equals=function(e,n){return e===n||p(e)&&p(n)&&e.x===n.x&&e.y===n.y&&e.z===n.z&&e.w===n.w};j.equalsArray=function(e,n,t){return e.x===n[t]&&e.y===n[t+1]&&e.z===n[t+2]&&e.w===n[t+3]};j.equalsEpsilon=function(e,n,t,o){return e===n||p(e)&&p(n)&&I.equalsEpsilon(e.x,n.x,t,o)&&I.equalsEpsilon(e.y,n.y,t,o)&&I.equalsEpsilon(e.z,n.z,t,o)&&I.equalsEpsilon(e.w,n.w,t,o)};j.ZERO=Object.freeze(new j(0,0,0,0));j.ONE=Object.freeze(new j(1,1,1,1));j.UNIT_X=Object.freeze(new j(1,0,0,0));j.UNIT_Y=Object.freeze(new j(0,1,0,0));j.UNIT_Z=Object.freeze(new j(0,0,1,0));j.UNIT_W=Object.freeze(new j(0,0,0,1));j.prototype.clone=function(e){return j.clone(this,e)};j.prototype.equals=function(e){return j.equals(this,e)};j.prototype.equalsEpsilon=function(e,n,t){return j.equalsEpsilon(this,e,n,t)};j.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Xn=new Float32Array(1),le=new Uint8Array(Xn.buffer),zo=new Uint32Array([287454020]),Io=new Uint8Array(zo.buffer),Tt=Io[0]===68;j.packFloat=function(e,n){return s.typeOf.number("value",e),p(n)||(n=new j),Xn[0]=e,Tt?(n.x=le[0],n.y=le[1],n.z=le[2],n.w=le[3]):(n.x=le[3],n.y=le[2],n.z=le[1],n.w=le[0]),n};j.unpackFloat=function(e){return s.typeOf.object("packedFloat",e),Tt?(le[0]=e.x,le[1]=e.y,le[2]=e.z,le[3]=e.w):(le[0]=e.w,le[1]=e.z,le[2]=e.y,le[3]=e.x),Xn[0]};var qe=j;function S(e,n,t,o,i,r,a,u,d,m,l,w,T,R,P,C){this[0]=O(e,0),this[1]=O(i,0),this[2]=O(d,0),this[3]=O(T,0),this[4]=O(n,0),this[5]=O(r,0),this[6]=O(m,0),this[7]=O(R,0),this[8]=O(t,0),this[9]=O(a,0),this[10]=O(l,0),this[11]=O(P,0),this[12]=O(o,0),this[13]=O(u,0),this[14]=O(w,0),this[15]=O(C,0)}S.packedLength=16;S.pack=function(e,n,t){return s.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n[t++]=e[3],n[t++]=e[4],n[t++]=e[5],n[t++]=e[6],n[t++]=e[7],n[t++]=e[8],n[t++]=e[9],n[t++]=e[10],n[t++]=e[11],n[t++]=e[12],n[t++]=e[13],n[t++]=e[14],n[t]=e[15],n};S.unpack=function(e,n,t){return s.defined("array",e),n=O(n,0),p(t)||(t=new S),t[0]=e[n++],t[1]=e[n++],t[2]=e[n++],t[3]=e[n++],t[4]=e[n++],t[5]=e[n++],t[6]=e[n++],t[7]=e[n++],t[8]=e[n++],t[9]=e[n++],t[10]=e[n++],t[11]=e[n++],t[12]=e[n++],t[13]=e[n++],t[14]=e[n++],t[15]=e[n],t};S.packArray=function(e,n){s.defined("array",e);let t=e.length,o=t*16;if(!p(n))n=new Array(o);else{if(!Array.isArray(n)&&n.length!==o)throw new A("If result is a typed array, it must have exactly array.length * 16 elements");n.length!==o&&(n.length=o)}for(let i=0;i<t;++i)S.pack(e[i],n,i*16);return n};S.unpackArray=function(e,n){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,16),e.length%16!==0)throw new A("array length must be a multiple of 16.");let t=e.length;p(n)?n.length=t/16:n=new Array(t/16);for(let o=0;o<t;o+=16){let i=o/16;n[i]=S.unpack(e,o,n[i])}return n};S.clone=function(e,n){if(p(e))return p(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n):new S(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])};S.fromArray=S.unpack;S.fromColumnMajorArray=function(e,n){return s.defined("values",e),S.clone(e,n)};S.fromRowMajorArray=function(e,n){return s.defined("values",e),p(n)?(n[0]=e[0],n[1]=e[4],n[2]=e[8],n[3]=e[12],n[4]=e[1],n[5]=e[5],n[6]=e[9],n[7]=e[13],n[8]=e[2],n[9]=e[6],n[10]=e[10],n[11]=e[14],n[12]=e[3],n[13]=e[7],n[14]=e[11],n[15]=e[15],n):new S(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])};S.fromRotationTranslation=function(e,n,t){return s.typeOf.object("rotation",e),n=O(n,_.ZERO),p(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=n.x,t[13]=n.y,t[14]=n.z,t[15]=1,t):new S(e[0],e[3],e[6],n.x,e[1],e[4],e[7],n.y,e[2],e[5],e[8],n.z,0,0,0,1)};S.fromTranslationQuaternionRotationScale=function(e,n,t,o){s.typeOf.object("translation",e),s.typeOf.object("rotation",n),s.typeOf.object("scale",t),p(o)||(o=new S);let i=t.x,r=t.y,a=t.z,u=n.x*n.x,d=n.x*n.y,m=n.x*n.z,l=n.x*n.w,w=n.y*n.y,T=n.y*n.z,R=n.y*n.w,P=n.z*n.z,C=n.z*n.w,q=n.w*n.w,k=u-w-P+q,L=2*(d-C),F=2*(m+R),x=2*(d+C),W=-u+w-P+q,Q=2*(T-l),ee=2*(m-R),re=2*(T+l),Z=-u-w+P+q;return o[0]=k*i,o[1]=x*i,o[2]=ee*i,o[3]=0,o[4]=L*r,o[5]=W*r,o[6]=re*r,o[7]=0,o[8]=F*a,o[9]=Q*a,o[10]=Z*a,o[11]=0,o[12]=e.x,o[13]=e.y,o[14]=e.z,o[15]=1,o};S.fromTranslationRotationScale=function(e,n){return s.typeOf.object("translationRotationScale",e),S.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,n)};S.fromTranslation=function(e,n){return s.typeOf.object("translation",e),S.fromRotationTranslation($.IDENTITY,e,n)};S.fromScale=function(e,n){return s.typeOf.object("scale",e),p(n)?(n[0]=e.x,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=e.y,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=e.z,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new S(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)};S.fromUniformScale=function(e,n){return s.typeOf.number("scale",e),p(n)?(n[0]=e,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=e,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=e,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new S(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};S.fromRotation=function(e,n){return s.typeOf.object("rotation",e),p(n)||(n=new S),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=0,n[4]=e[3],n[5]=e[4],n[6]=e[5],n[7]=0,n[8]=e[6],n[9]=e[7],n[10]=e[8],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n};var Je=new _,Ge=new _,pn=new _;S.fromCamera=function(e,n){s.typeOf.object("camera",e);let t=e.position,o=e.direction,i=e.up;s.typeOf.object("camera.position",t),s.typeOf.object("camera.direction",o),s.typeOf.object("camera.up",i),_.normalize(o,Je),_.normalize(_.cross(Je,i,Ge),Ge),_.normalize(_.cross(Ge,Je,pn),pn);let r=Ge.x,a=Ge.y,u=Ge.z,d=Je.x,m=Je.y,l=Je.z,w=pn.x,T=pn.y,R=pn.z,P=t.x,C=t.y,q=t.z,k=r*-P+a*-C+u*-q,L=w*-P+T*-C+R*-q,F=d*P+m*C+l*q;return p(n)?(n[0]=r,n[1]=w,n[2]=-d,n[3]=0,n[4]=a,n[5]=T,n[6]=-m,n[7]=0,n[8]=u,n[9]=R,n[10]=-l,n[11]=0,n[12]=k,n[13]=L,n[14]=F,n[15]=1,n):new S(r,a,u,k,w,T,R,L,-d,-m,-l,F,0,0,0,1)};S.computePerspectiveFieldOfView=function(e,n,t,o,i){s.typeOf.number.greaterThan("fovY",e,0),s.typeOf.number.lessThan("fovY",e,Math.PI),s.typeOf.number.greaterThan("near",t,0),s.typeOf.number.greaterThan("far",o,0),s.typeOf.object("result",i);let a=1/Math.tan(e*.5),u=a/n,d=(o+t)/(t-o),m=2*o*t/(t-o);return i[0]=u,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=a,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=d,i[11]=-1,i[12]=0,i[13]=0,i[14]=m,i[15]=0,i};S.computeOrthographicOffCenter=function(e,n,t,o,i,r,a){s.typeOf.number("left",e),s.typeOf.number("right",n),s.typeOf.number("bottom",t),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.number("far",r),s.typeOf.object("result",a);let u=1/(n-e),d=1/(o-t),m=1/(r-i),l=-(n+e)*u,w=-(o+t)*d,T=-(r+i)*m;return u*=2,d*=2,m*=-2,a[0]=u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=m,a[11]=0,a[12]=l,a[13]=w,a[14]=T,a[15]=1,a};S.computePerspectiveOffCenter=function(e,n,t,o,i,r,a){s.typeOf.number("left",e),s.typeOf.number("right",n),s.typeOf.number("bottom",t),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.number("far",r),s.typeOf.object("result",a);let u=2*i/(n-e),d=2*i/(o-t),m=(n+e)/(n-e),l=(o+t)/(o-t),w=-(r+i)/(r-i),T=-1,R=-2*r*i/(r-i);return a[0]=u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=m,a[9]=l,a[10]=w,a[11]=T,a[12]=0,a[13]=0,a[14]=R,a[15]=0,a};S.computeInfinitePerspectiveOffCenter=function(e,n,t,o,i,r){s.typeOf.number("left",e),s.typeOf.number("right",n),s.typeOf.number("bottom",t),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.object("result",r);let a=2*i/(n-e),u=2*i/(o-t),d=(n+e)/(n-e),m=(o+t)/(o-t),l=-1,w=-1,T=-2*i;return r[0]=a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=u,r[6]=0,r[7]=0,r[8]=d,r[9]=m,r[10]=l,r[11]=w,r[12]=0,r[13]=0,r[14]=T,r[15]=0,r};S.computeViewportTransformation=function(e,n,t,o){p(o)||(o=new S),e=O(e,O.EMPTY_OBJECT);let i=O(e.x,0),r=O(e.y,0),a=O(e.width,0),u=O(e.height,0);n=O(n,0),t=O(t,1);let d=a*.5,m=u*.5,l=(t-n)*.5,w=d,T=m,R=l,P=i+d,C=r+m,q=n+l,k=1;return o[0]=w,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=T,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=R,o[11]=0,o[12]=P,o[13]=C,o[14]=q,o[15]=k,o};S.computeView=function(e,n,t,o,i){return s.typeOf.object("position",e),s.typeOf.object("direction",n),s.typeOf.object("up",t),s.typeOf.object("right",o),s.typeOf.object("result",i),i[0]=o.x,i[1]=t.x,i[2]=-n.x,i[3]=0,i[4]=o.y,i[5]=t.y,i[6]=-n.y,i[7]=0,i[8]=o.z,i[9]=t.z,i[10]=-n.z,i[11]=0,i[12]=-_.dot(o,e),i[13]=-_.dot(t,e),i[14]=_.dot(n,e),i[15]=1,i};S.toArray=function(e,n){return s.typeOf.object("matrix",e),p(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]};S.getElementIndex=function(e,n){return s.typeOf.number.greaterThanOrEquals("row",n,0),s.typeOf.number.lessThanOrEquals("row",n,3),s.typeOf.number.greaterThanOrEquals("column",e,0),s.typeOf.number.lessThanOrEquals("column",e,3),e*4+n};S.getColumn=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("result",t);let o=n*4,i=e[o],r=e[o+1],a=e[o+2],u=e[o+3];return t.x=i,t.y=r,t.z=a,t.w=u,t};S.setColumn=function(e,n,t,o){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=S.clone(e,o);let i=n*4;return o[i]=t.x,o[i+1]=t.y,o[i+2]=t.z,o[i+3]=t.w,o};S.getRow=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("result",t);let o=e[n],i=e[n+4],r=e[n+8],a=e[n+12];return t.x=o,t.y=i,t.z=r,t.w=a,t};S.setRow=function(e,n,t,o){return s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=S.clone(e,o),o[n]=t.x,o[n+4]=t.y,o[n+8]=t.z,o[n+12]=t.w,o};S.setTranslation=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.object("translation",n),s.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[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=n.x,t[13]=n.y,t[14]=n.z,t[15]=e[15],t};var qo=new _;S.setScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t);let o=S.getScale(e,qo),i=n.x/o.x,r=n.y/o.y,a=n.z/o.z;return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3],t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7],t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};var Do=new _;S.setUniformScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t);let o=S.getScale(e,Do),i=n/o.x,r=n/o.y,a=n/o.z;return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3],t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7],t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};var Zn=new _;S.getScale=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n.x=_.magnitude(_.fromElements(e[0],e[1],e[2],Zn)),n.y=_.magnitude(_.fromElements(e[4],e[5],e[6],Zn)),n.z=_.magnitude(_.fromElements(e[8],e[9],e[10],Zn)),n};var Rt=new _;S.getMaximumScale=function(e){return S.getScale(e,Rt),_.maximumComponent(Rt)};var No=new _;S.setRotation=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);let o=S.getScale(e,No);return t[0]=n[0]*o.x,t[1]=n[1]*o.x,t[2]=n[2]*o.x,t[3]=e[3],t[4]=n[3]*o.y,t[5]=n[4]*o.y,t[6]=n[5]*o.y,t[7]=e[7],t[8]=n[6]*o.z,t[9]=n[7]*o.z,t[10]=n[8]*o.z,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};var ko=new _;S.getRotation=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=S.getScale(e,ko);return n[0]=e[0]/t.x,n[1]=e[1]/t.x,n[2]=e[2]/t.x,n[3]=e[4]/t.y,n[4]=e[5]/t.y,n[5]=e[6]/t.y,n[6]=e[8]/t.z,n[7]=e[9]/t.z,n[8]=e[10]/t.z,n};S.multiply=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);let o=e[0],i=e[1],r=e[2],a=e[3],u=e[4],d=e[5],m=e[6],l=e[7],w=e[8],T=e[9],R=e[10],P=e[11],C=e[12],q=e[13],k=e[14],L=e[15],F=n[0],x=n[1],W=n[2],Q=n[3],ee=n[4],re=n[5],Z=n[6],oe=n[7],J=n[8],c=n[9],f=n[10],h=n[11],y=n[12],g=n[13],v=n[14],b=n[15],z=o*F+u*x+w*W+C*Q,N=i*F+d*x+T*W+q*Q,V=r*F+m*x+R*W+k*Q,ie=a*F+l*x+P*W+L*Q,ae=o*ee+u*re+w*Z+C*oe,ne=i*ee+d*re+T*Z+q*oe,ue=r*ee+m*re+R*Z+k*oe,he=a*ee+l*re+P*Z+L*oe,ye=o*J+u*c+w*f+C*h,de=i*J+d*c+T*f+q*h,pe=r*J+m*c+R*f+k*h,Y=a*J+l*c+P*f+L*h,_e=o*y+u*g+w*v+C*b,Re=i*y+d*g+T*v+q*b,je=r*y+m*g+R*v+k*b,fn=a*y+l*g+P*v+L*b;return t[0]=z,t[1]=N,t[2]=V,t[3]=ie,t[4]=ae,t[5]=ne,t[6]=ue,t[7]=he,t[8]=ye,t[9]=de,t[10]=pe,t[11]=Y,t[12]=_e,t[13]=Re,t[14]=je,t[15]=fn,t};S.add=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t};S.subtract=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t};S.multiplyTransformation=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);let o=e[0],i=e[1],r=e[2],a=e[4],u=e[5],d=e[6],m=e[8],l=e[9],w=e[10],T=e[12],R=e[13],P=e[14],C=n[0],q=n[1],k=n[2],L=n[4],F=n[5],x=n[6],W=n[8],Q=n[9],ee=n[10],re=n[12],Z=n[13],oe=n[14],J=o*C+a*q+m*k,c=i*C+u*q+l*k,f=r*C+d*q+w*k,h=o*L+a*F+m*x,y=i*L+u*F+l*x,g=r*L+d*F+w*x,v=o*W+a*Q+m*ee,b=i*W+u*Q+l*ee,z=r*W+d*Q+w*ee,N=o*re+a*Z+m*oe+T,V=i*re+u*Z+l*oe+R,ie=r*re+d*Z+w*oe+P;return t[0]=J,t[1]=c,t[2]=f,t[3]=0,t[4]=h,t[5]=y,t[6]=g,t[7]=0,t[8]=v,t[9]=b,t[10]=z,t[11]=0,t[12]=N,t[13]=V,t[14]=ie,t[15]=1,t};S.multiplyByMatrix3=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("rotation",n),s.typeOf.object("result",t);let o=e[0],i=e[1],r=e[2],a=e[4],u=e[5],d=e[6],m=e[8],l=e[9],w=e[10],T=n[0],R=n[1],P=n[2],C=n[3],q=n[4],k=n[5],L=n[6],F=n[7],x=n[8],W=o*T+a*R+m*P,Q=i*T+u*R+l*P,ee=r*T+d*R+w*P,re=o*C+a*q+m*k,Z=i*C+u*q+l*k,oe=r*C+d*q+w*k,J=o*L+a*F+m*x,c=i*L+u*F+l*x,f=r*L+d*F+w*x;return t[0]=W,t[1]=Q,t[2]=ee,t[3]=0,t[4]=re,t[5]=Z,t[6]=oe,t[7]=0,t[8]=J,t[9]=c,t[10]=f,t[11]=0,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};S.multiplyByTranslation=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("translation",n),s.typeOf.object("result",t);let o=n.x,i=n.y,r=n.z,a=o*e[0]+i*e[4]+r*e[8]+e[12],u=o*e[1]+i*e[5]+r*e[9]+e[13],d=o*e[2]+i*e[6]+r*e[10]+e[14];return 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[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=a,t[13]=u,t[14]=d,t[15]=e[15],t};S.multiplyByScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t);let o=n.x,i=n.y,r=n.z;return o===1&&i===1&&r===1?S.clone(e,t):(t[0]=o*e[0],t[1]=o*e[1],t[2]=o*e[2],t[3]=e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=i*e[6],t[7]=e[7],t[8]=r*e[8],t[9]=r*e[9],t[10]=r*e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t)};S.multiplyByUniformScale=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3],t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7],t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};S.multiplyByVector=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);let o=n.x,i=n.y,r=n.z,a=n.w,u=e[0]*o+e[4]*i+e[8]*r+e[12]*a,d=e[1]*o+e[5]*i+e[9]*r+e[13]*a,m=e[2]*o+e[6]*i+e[10]*r+e[14]*a,l=e[3]*o+e[7]*i+e[11]*r+e[15]*a;return t.x=u,t.y=d,t.z=m,t.w=l,t};S.multiplyByPointAsVector=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);let o=n.x,i=n.y,r=n.z,a=e[0]*o+e[4]*i+e[8]*r,u=e[1]*o+e[5]*i+e[9]*r,d=e[2]*o+e[6]*i+e[10]*r;return t.x=a,t.y=u,t.z=d,t};S.multiplyByPoint=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);let o=n.x,i=n.y,r=n.z,a=e[0]*o+e[4]*i+e[8]*r+e[12],u=e[1]*o+e[5]*i+e[9]*r+e[13],d=e[2]*o+e[6]*i+e[10]*r+e[14];return t.x=a,t.y=u,t.z=d,t};S.multiplyByScalar=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t};S.negate=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=-e[0],n[1]=-e[1],n[2]=-e[2],n[3]=-e[3],n[4]=-e[4],n[5]=-e[5],n[6]=-e[6],n[7]=-e[7],n[8]=-e[8],n[9]=-e[9],n[10]=-e[10],n[11]=-e[11],n[12]=-e[12],n[13]=-e[13],n[14]=-e[14],n[15]=-e[15],n};S.transpose=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=e[1],o=e[2],i=e[3],r=e[6],a=e[7],u=e[11];return n[0]=e[0],n[1]=e[4],n[2]=e[8],n[3]=e[12],n[4]=t,n[5]=e[5],n[6]=e[9],n[7]=e[13],n[8]=o,n[9]=r,n[10]=e[10],n[11]=e[14],n[12]=i,n[13]=a,n[14]=u,n[15]=e[15],n};S.abs=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=Math.abs(e[0]),n[1]=Math.abs(e[1]),n[2]=Math.abs(e[2]),n[3]=Math.abs(e[3]),n[4]=Math.abs(e[4]),n[5]=Math.abs(e[5]),n[6]=Math.abs(e[6]),n[7]=Math.abs(e[7]),n[8]=Math.abs(e[8]),n[9]=Math.abs(e[9]),n[10]=Math.abs(e[10]),n[11]=Math.abs(e[11]),n[12]=Math.abs(e[12]),n[13]=Math.abs(e[13]),n[14]=Math.abs(e[14]),n[15]=Math.abs(e[15]),n};S.equals=function(e,n){return e===n||p(e)&&p(n)&&e[12]===n[12]&&e[13]===n[13]&&e[14]===n[14]&&e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]&&e[4]===n[4]&&e[5]===n[5]&&e[6]===n[6]&&e[8]===n[8]&&e[9]===n[9]&&e[10]===n[10]&&e[3]===n[3]&&e[7]===n[7]&&e[11]===n[11]&&e[15]===n[15]};S.equalsEpsilon=function(e,n,t){return t=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e[0]-n[0])<=t&&Math.abs(e[1]-n[1])<=t&&Math.abs(e[2]-n[2])<=t&&Math.abs(e[3]-n[3])<=t&&Math.abs(e[4]-n[4])<=t&&Math.abs(e[5]-n[5])<=t&&Math.abs(e[6]-n[6])<=t&&Math.abs(e[7]-n[7])<=t&&Math.abs(e[8]-n[8])<=t&&Math.abs(e[9]-n[9])<=t&&Math.abs(e[10]-n[10])<=t&&Math.abs(e[11]-n[11])<=t&&Math.abs(e[12]-n[12])<=t&&Math.abs(e[13]-n[13])<=t&&Math.abs(e[14]-n[14])<=t&&Math.abs(e[15]-n[15])<=t};S.getTranslation=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n.x=e[12],n.y=e[13],n.z=e[14],n};S.getMatrix3=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[4],n[4]=e[5],n[5]=e[6],n[6]=e[8],n[7]=e[9],n[8]=e[10],n};var Fo=new $,Lo=new $,Bo=new qe,xo=new qe(0,0,0,1);S.inverse=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=e[0],o=e[4],i=e[8],r=e[12],a=e[1],u=e[5],d=e[9],m=e[13],l=e[2],w=e[6],T=e[10],R=e[14],P=e[3],C=e[7],q=e[11],k=e[15],L=T*k,F=R*q,x=w*k,W=R*C,Q=w*q,ee=T*C,re=l*k,Z=R*P,oe=l*q,J=T*P,c=l*C,f=w*P,h=L*u+W*d+Q*m-(F*u+x*d+ee*m),y=F*a+re*d+J*m-(L*a+Z*d+oe*m),g=x*a+Z*u+c*m-(W*a+re*u+f*m),v=ee*a+oe*u+f*d-(Q*a+J*u+c*d),b=F*o+x*i+ee*r-(L*o+W*i+Q*r),z=L*t+Z*i+oe*r-(F*t+re*i+J*r),N=W*t+re*o+f*r-(x*t+Z*o+c*r),V=Q*t+J*o+c*i-(ee*t+oe*o+f*i);L=i*m,F=r*d,x=o*m,W=r*u,Q=o*d,ee=i*u,re=t*m,Z=r*a,oe=t*d,J=i*a,c=t*u,f=o*a;let ie=L*C+W*q+Q*k-(F*C+x*q+ee*k),ae=F*P+re*q+J*k-(L*P+Z*q+oe*k),ne=x*P+Z*C+c*k-(W*P+re*C+f*k),ue=ee*P+oe*C+f*q-(Q*P+J*C+c*q),he=x*T+ee*R+F*w-(Q*R+L*w+W*T),ye=oe*R+L*l+Z*T-(re*T+J*R+F*l),de=re*w+f*R+W*l-(c*R+x*l+Z*w),pe=c*T+Q*l+J*w-(oe*w+f*T+ee*l),Y=t*h+o*y+i*g+r*v;if(Math.abs(Y)<I.EPSILON21){if($.equalsEpsilon(S.getMatrix3(e,Fo),Lo,I.EPSILON7)&&qe.equals(S.getRow(e,3,Bo),xo))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-e[12],n[13]=-e[13],n[14]=-e[14],n[15]=1,n;throw new Se("matrix is not invertible because its determinate is zero.")}return Y=1/Y,n[0]=h*Y,n[1]=y*Y,n[2]=g*Y,n[3]=v*Y,n[4]=b*Y,n[5]=z*Y,n[6]=N*Y,n[7]=V*Y,n[8]=ie*Y,n[9]=ae*Y,n[10]=ne*Y,n[11]=ue*Y,n[12]=he*Y,n[13]=ye*Y,n[14]=de*Y,n[15]=pe*Y,n};S.inverseTransformation=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=e[0],o=e[1],i=e[2],r=e[4],a=e[5],u=e[6],d=e[8],m=e[9],l=e[10],w=e[12],T=e[13],R=e[14],P=-t*w-o*T-i*R,C=-r*w-a*T-u*R,q=-d*w-m*T-l*R;return n[0]=t,n[1]=r,n[2]=d,n[3]=0,n[4]=o,n[5]=a,n[6]=m,n[7]=0,n[8]=i,n[9]=u,n[10]=l,n[11]=0,n[12]=P,n[13]=C,n[14]=q,n[15]=1,n};var Wo=new S;S.inverseTranspose=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),S.inverse(S.transpose(e,Wo),n)};S.IDENTITY=Object.freeze(new S(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));S.ZERO=Object.freeze(new S(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));S.COLUMN0ROW0=0;S.COLUMN0ROW1=1;S.COLUMN0ROW2=2;S.COLUMN0ROW3=3;S.COLUMN1ROW0=4;S.COLUMN1ROW1=5;S.COLUMN1ROW2=6;S.COLUMN1ROW3=7;S.COLUMN2ROW0=8;S.COLUMN2ROW1=9;S.COLUMN2ROW2=10;S.COLUMN2ROW3=11;S.COLUMN3ROW0=12;S.COLUMN3ROW1=13;S.COLUMN3ROW2=14;S.COLUMN3ROW3=15;Object.defineProperties(S.prototype,{length:{get:function(){return S.packedLength}}});S.prototype.clone=function(e){return S.clone(this,e)};S.prototype.equals=function(e){return S.equals(this,e)};S.equalsArray=function(e,n,t){return e[0]===n[t]&&e[1]===n[t+1]&&e[2]===n[t+2]&&e[3]===n[t+3]&&e[4]===n[t+4]&&e[5]===n[t+5]&&e[6]===n[t+6]&&e[7]===n[t+7]&&e[8]===n[t+8]&&e[9]===n[t+9]&&e[10]===n[t+10]&&e[11]===n[t+11]&&e[12]===n[t+12]&&e[13]===n[t+13]&&e[14]===n[t+14]&&e[15]===n[t+15]};S.prototype.equalsEpsilon=function(e,n){return S.equalsEpsilon(this,e,n)};S.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]}) + */(function(e,n){"use strict";typeof Un=="object"&&Un.exports?Un.exports=n(Pt(),Ut(),It()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],n):e.URI=n(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(qt,function(e,n,t,o){"use strict";var i=o&&o.URI;function r(c,f){var h=arguments.length>=1,y=arguments.length>=2;if(!(this instanceof r))return h?y?new r(c,f):new r(c):new r;if(c===void 0){if(h)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?c=location.href+"":c=""}if(c===null&&h)throw new TypeError("null is not a valid argument for URI");return this.href(c),f!==void 0?this.absoluteTo(f):this}function a(c){return/^[0-9]+$/.test(c)}r.version="1.19.11";var u=r.prototype,d=Object.prototype.hasOwnProperty;function m(c){return c.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(c){return c===void 0?"Undefined":String(Object.prototype.toString.call(c)).slice(8,-1)}function w(c){return l(c)==="Array"}function T(c,f){var h={},y,g;if(l(f)==="RegExp")h=null;else if(w(f))for(y=0,g=f.length;y<g;y++)h[f[y]]=!0;else h[f]=!0;for(y=0,g=c.length;y<g;y++){var v=h&&h[c[y]]!==void 0||!h&&f.test(c[y]);v&&(c.splice(y,1),g--,y--)}return c}function R(c,f){var h,y;if(w(f)){for(h=0,y=f.length;h<y;h++)if(!R(c,f[h]))return!1;return!0}var g=l(f);for(h=0,y=c.length;h<y;h++)if(g==="RegExp"){if(typeof c[h]=="string"&&c[h].match(f))return!0}else if(c[h]===f)return!0;return!1}function P(c,f){if(!w(c)||!w(f)||c.length!==f.length)return!1;c.sort(),f.sort();for(var h=0,y=c.length;h<y;h++)if(c[h]!==f[h])return!1;return!0}function C(c){var f=/^\/+|\/+$/g;return c.replace(f,"")}r._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:r.preventInvalidHostname,duplicateQueryParameters:r.duplicateQueryParameters,escapeQuerySpace:r.escapeQuerySpace}},r.preventInvalidHostname=!1,r.duplicateQueryParameters=!1,r.escapeQuerySpace=!0,r.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,r.idn_expression=/[^a-z0-9\._-]/i,r.punycode_expression=/(xn--)/i,r.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,r.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,r.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(c){if(!(!c||!c.nodeName)){var f=c.nodeName.toLowerCase();if(!(f==="input"&&c.type!=="image"))return r.domAttributes[f]}};function q(c){return escape(c)}function k(c){return encodeURIComponent(c).replace(/[!'()*]/g,q).replace(/\*/g,"%2A")}r.encode=k,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=k,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(c,f){var h=r.encode(c+"");return f===void 0&&(f=r.escapeQuerySpace),f?h.replace(/%20/g,"+"):h},r.decodeQuery=function(c,f){c+="",f===void 0&&(f=r.escapeQuerySpace);try{return r.decode(f?c.replace(/\+/g,"%20"):c)}catch{return c}};var L={encode:"encode",decode:"decode"},F,x=function(c,f){return function(h){try{return r[f](h+"").replace(r.characters[c][f].expression,function(y){return r.characters[c][f].map[y]})}catch{return h}}};for(F in L)r[F+"PathSegment"]=x("pathname",L[F]),r[F+"UrnPathSegment"]=x("urnpath",L[F]);var Q=function(c,f,h){return function(y){var g;h?g=function(N){return r[f](r[h](N))}:g=r[f];for(var v=(y+"").split(c),b=0,z=v.length;b<z;b++)v[b]=g(v[b]);return v.join(c)}};r.decodePath=Q("/","decodePathSegment"),r.decodeUrnPath=Q(":","decodeUrnPathSegment"),r.recodePath=Q("/","encodePathSegment","decode"),r.recodeUrnPath=Q(":","encodeUrnPathSegment","decode"),r.encodeReserved=x("reserved","encode"),r.parse=function(c,f){var h;return f||(f={preventInvalidHostname:r.preventInvalidHostname}),c=c.replace(r.leading_whitespace_expression,""),c=c.replace(r.ascii_tab_whitespace,""),h=c.indexOf("#"),h>-1&&(f.fragment=c.substring(h+1)||null,c=c.substring(0,h)),h=c.indexOf("?"),h>-1&&(f.query=c.substring(h+1)||null,c=c.substring(0,h)),c=c.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),c=c.replace(/^[/\\]{2,}/i,"//"),c.substring(0,2)==="//"?(f.protocol=null,c=c.substring(2),c=r.parseAuthority(c,f)):(h=c.indexOf(":"),h>-1&&(f.protocol=c.substring(0,h)||null,f.protocol&&!f.protocol.match(r.protocol_expression)?f.protocol=void 0:c.substring(h+1,h+3).replace(/\\/g,"/")==="//"?(c=c.substring(h+3),c=r.parseAuthority(c,f)):(c=c.substring(h+1),f.urn=!0))),f.path=c,f},r.parseHost=function(c,f){c||(c=""),c=c.replace(/\\/g,"/");var h=c.indexOf("/"),y,g;if(h===-1&&(h=c.length),c.charAt(0)==="[")y=c.indexOf("]"),f.hostname=c.substring(1,y)||null,f.port=c.substring(y+2,h)||null,f.port==="/"&&(f.port=null);else{var v=c.indexOf(":"),b=c.indexOf("/"),z=c.indexOf(":",v+1);z!==-1&&(b===-1||z<b)?(f.hostname=c.substring(0,h)||null,f.port=null):(g=c.substring(0,h).split(":"),f.hostname=g[0]||null,f.port=g[1]||null)}return f.hostname&&c.substring(h).charAt(0)!=="/"&&(h++,c="/"+c),f.preventInvalidHostname&&r.ensureValidHostname(f.hostname,f.protocol),f.port&&r.ensureValidPort(f.port),c.substring(h)||"/"},r.parseAuthority=function(c,f){return c=r.parseUserinfo(c,f),r.parseHost(c,f)},r.parseUserinfo=function(c,f){var h=c,y=c.indexOf("\\");y!==-1&&(c=c.replace(/\\/g,"/"));var g=c.indexOf("/"),v=c.lastIndexOf("@",g>-1?g:c.length-1),b;return v>-1&&(g===-1||v<g)?(b=c.substring(0,v).split(":"),f.username=b[0]?r.decode(b[0]):null,b.shift(),f.password=b[0]?r.decode(b.join(":")):null,c=h.substring(v+1)):(f.username=null,f.password=null),c},r.parseQuery=function(c,f){if(!c)return{};if(c=c.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!c)return{};for(var h={},y=c.split("&"),g=y.length,v,b,z,N=0;N<g;N++)v=y[N].split("="),b=r.decodeQuery(v.shift(),f),z=v.length?r.decodeQuery(v.join("="),f):null,b!=="__proto__"&&(d.call(h,b)?((typeof h[b]=="string"||h[b]===null)&&(h[b]=[h[b]]),h[b].push(z)):h[b]=z);return h},r.build=function(c){var f="",h=!1;return c.protocol&&(f+=c.protocol+":"),!c.urn&&(f||c.hostname)&&(f+="//",h=!0),f+=r.buildAuthority(c)||"",typeof c.path=="string"&&(c.path.charAt(0)!=="/"&&h&&(f+="/"),f+=c.path),typeof c.query=="string"&&c.query&&(f+="?"+c.query),typeof c.fragment=="string"&&c.fragment&&(f+="#"+c.fragment),f},r.buildHost=function(c){var f="";if(c.hostname)r.ip6_expression.test(c.hostname)?f+="["+c.hostname+"]":f+=c.hostname;else return"";return c.port&&(f+=":"+c.port),f},r.buildAuthority=function(c){return r.buildUserinfo(c)+r.buildHost(c)},r.buildUserinfo=function(c){var f="";return c.username&&(f+=r.encode(c.username)),c.password&&(f+=":"+r.encode(c.password)),f&&(f+="@"),f},r.buildQuery=function(c,f,h){var y="",g,v,b,z;for(v in c)if(v!=="__proto__"&&d.call(c,v))if(w(c[v]))for(g={},b=0,z=c[v].length;b<z;b++)c[v][b]!==void 0&&g[c[v][b]+""]===void 0&&(y+="&"+r.buildQueryParameter(v,c[v][b],h),f!==!0&&(g[c[v][b]+""]=!0));else c[v]!==void 0&&(y+="&"+r.buildQueryParameter(v,c[v],h));return y.substring(1)},r.buildQueryParameter=function(c,f,h){return r.encodeQuery(c,h)+(f!==null?"="+r.encodeQuery(f,h):"")},r.addQuery=function(c,f,h){if(typeof f=="object")for(var y in f)d.call(f,y)&&r.addQuery(c,y,f[y]);else if(typeof f=="string"){if(c[f]===void 0){c[f]=h;return}else typeof c[f]=="string"&&(c[f]=[c[f]]);w(h)||(h=[h]),c[f]=(c[f]||[]).concat(h)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},r.setQuery=function(c,f,h){if(typeof f=="object")for(var y in f)d.call(f,y)&&r.setQuery(c,y,f[y]);else if(typeof f=="string")c[f]=h===void 0?null:h;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},r.removeQuery=function(c,f,h){var y,g,v;if(w(f))for(y=0,g=f.length;y<g;y++)c[f[y]]=void 0;else if(l(f)==="RegExp")for(v in c)f.test(v)&&(c[v]=void 0);else if(typeof f=="object")for(v in f)d.call(f,v)&&r.removeQuery(c,v,f[v]);else if(typeof f=="string")h!==void 0?l(h)==="RegExp"?!w(c[f])&&h.test(c[f])?c[f]=void 0:c[f]=T(c[f],h):c[f]===String(h)&&(!w(h)||h.length===1)?c[f]=void 0:w(c[f])&&(c[f]=T(c[f],h)):c[f]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},r.hasQuery=function(c,f,h,y){switch(l(f)){case"String":break;case"RegExp":for(var g in c)if(d.call(c,g)&&f.test(g)&&(h===void 0||r.hasQuery(c,g,h)))return!0;return!1;case"Object":for(var v in f)if(d.call(f,v)&&!r.hasQuery(c,v,f[v]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(l(h)){case"Undefined":return f in c;case"Boolean":var b=!!(w(c[f])?c[f].length:c[f]);return h===b;case"Function":return!!h(c[f],f,c);case"Array":if(!w(c[f]))return!1;var z=y?R:P;return z(c[f],h);case"RegExp":return w(c[f])?y?R(c[f],h):!1:!!(c[f]&&c[f].match(h));case"Number":h=String(h);case"String":return w(c[f])?y?R(c[f],h):!1:c[f]===h;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.joinPaths=function(){for(var c=[],f=[],h=0,y=0;y<arguments.length;y++){var g=new r(arguments[y]);c.push(g);for(var v=g.segment(),b=0;b<v.length;b++)typeof v[b]=="string"&&f.push(v[b]),v[b]&&h++}if(!f.length||!h)return new r("");var z=new r("").segment(f);return(c[0].path()===""||c[0].path().slice(0,1)==="/")&&z.path("/"+z.path()),z.normalize()},r.commonPath=function(c,f){var h=Math.min(c.length,f.length),y;for(y=0;y<h;y++)if(c.charAt(y)!==f.charAt(y)){y--;break}return y<1?c.charAt(0)===f.charAt(0)&&c.charAt(0)==="/"?"/":"":((c.charAt(y)!=="/"||f.charAt(y)!=="/")&&(y=c.substring(0,y).lastIndexOf("/")),c.substring(0,y+1))},r.withinString=function(c,f,h){h||(h={});var y=h.start||r.findUri.start,g=h.end||r.findUri.end,v=h.trim||r.findUri.trim,b=h.parens||r.findUri.parens,z=/[a-z0-9-]=["']?$/i;for(y.lastIndex=0;;){var N=y.exec(c);if(!N)break;var V=N.index;if(h.ignoreHtml){var ie=c.slice(Math.max(V-3,0),V);if(ie&&z.test(ie))continue}for(var ae=V+c.slice(V).search(g),ne=c.slice(V,ae),ue=-1;;){var he=b.exec(ne);if(!he)break;var ye=he.index+he[0].length;ue=Math.max(ue,ye)}if(ue>-1?ne=ne.slice(0,ue)+ne.slice(ue).replace(v,""):ne=ne.replace(v,""),!(ne.length<=N[0].length)&&!(h.ignore&&h.ignore.test(ne))){ae=V+ne.length;var de=f(ne,V,ae,c);if(de===void 0){y.lastIndex=ae;continue}de=String(de),c=c.slice(0,V)+de+c.slice(ae),y.lastIndex=V+de.length}}return y.lastIndex=0,c},r.ensureValidHostname=function(c,f){var h=!!c,y=!!f,g=!1;if(y&&(g=R(r.hostProtocols,f)),g&&!h)throw new TypeError("Hostname cannot be empty, if protocol is "+f);if(c&&c.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(c).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(c){if(c){var f=Number(c);if(!(a(f)&&f>0&&f<65536))throw new TypeError('Port "'+c+'" is not a valid port')}},r.noConflict=function(c){if(c){var f={URI:this.noConflict()};return o.URITemplate&&typeof o.URITemplate.noConflict=="function"&&(f.URITemplate=o.URITemplate.noConflict()),o.IPv6&&typeof o.IPv6.noConflict=="function"&&(f.IPv6=o.IPv6.noConflict()),o.SecondLevelDomains&&typeof o.SecondLevelDomains.noConflict=="function"&&(f.SecondLevelDomains=o.SecondLevelDomains.noConflict()),f}else o.URI===this&&(o.URI=i);return this},u.build=function(c){return c===!0?this._deferred_build=!0:(c===void 0||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},u.clone=function(){return new r(this)},u.valueOf=u.toString=function(){return this.build(!1)._string};function W(c){return function(f,h){return f===void 0?this._parts[c]||"":(this._parts[c]=f||null,this.build(!h),this)}}function ee(c,f){return function(h,y){return h===void 0?this._parts[c]||"":(h!==null&&(h=h+"",h.charAt(0)===f&&(h=h.substring(1))),this._parts[c]=h,this.build(!y),this)}}u.protocol=W("protocol"),u.username=W("username"),u.password=W("password"),u.hostname=W("hostname"),u.port=W("port"),u.query=ee("query","?"),u.fragment=ee("fragment","#"),u.search=function(c,f){var h=this.query(c,f);return typeof h=="string"&&h.length?"?"+h:h},u.hash=function(c,f){var h=this.fragment(c,f);return typeof h=="string"&&h.length?"#"+h:h},u.pathname=function(c,f){if(c===void 0||c===!0){var h=this._parts.path||(this._parts.hostname?"/":"");return c?(this._parts.urn?r.decodeUrnPath:r.decodePath)(h):h}else return this._parts.urn?this._parts.path=c?r.recodeUrnPath(c):"":this._parts.path=c?r.recodePath(c):"/",this.build(!f),this},u.path=u.pathname,u.href=function(c,f){var h;if(c===void 0)return this.toString();this._string="",this._parts=r._parts();var y=c instanceof r,g=typeof c=="object"&&(c.hostname||c.path||c.pathname);if(c.nodeName){var v=r.getDomAttribute(c);c=c[v]||"",g=!1}if(!y&&g&&c.pathname!==void 0&&(c=c.toString()),typeof c=="string"||c instanceof String)this._parts=r.parse(String(c),this._parts);else if(y||g){var b=y?c._parts:c;for(h in b)h!=="query"&&d.call(this._parts,h)&&(this._parts[h]=b[h]);b.query&&this.query(b.query,!1)}else throw new TypeError("invalid input");return this.build(!f),this},u.is=function(c){var f=!1,h=!1,y=!1,g=!1,v=!1,b=!1,z=!1,N=!this._parts.urn;switch(this._parts.hostname&&(N=!1,h=r.ip4_expression.test(this._parts.hostname),y=r.ip6_expression.test(this._parts.hostname),f=h||y,g=!f,v=g&&t&&t.has(this._parts.hostname),b=g&&r.idn_expression.test(this._parts.hostname),z=g&&r.punycode_expression.test(this._parts.hostname)),c.toLowerCase()){case"relative":return N;case"absolute":return!N;case"domain":case"name":return g;case"sld":return v;case"ip":return f;case"ip4":case"ipv4":case"inet4":return h;case"ip6":case"ipv6":case"inet6":return y;case"idn":return b;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return z}return null};var re=u.protocol,Z=u.port,oe=u.hostname;u.protocol=function(c,f){if(c&&(c=c.replace(/:(\/\/)?$/,""),!c.match(r.protocol_expression)))throw new TypeError('Protocol "'+c+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return re.call(this,c,f)},u.scheme=u.protocol,u.port=function(c,f){return this._parts.urn?c===void 0?"":this:(c!==void 0&&(c===0&&(c=null),c&&(c+="",c.charAt(0)===":"&&(c=c.substring(1)),r.ensureValidPort(c))),Z.call(this,c,f))},u.hostname=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c!==void 0){var h={preventInvalidHostname:this._parts.preventInvalidHostname},y=r.parseHost(c,h);if(y!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');c=h.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(c,this._parts.protocol)}return oe.call(this,c,f)},u.origin=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){var h=this.protocol(),y=this.authority();return y?(h?h+"://":"")+this.authority():""}else{var g=r(c);return this.protocol(g.protocol()).authority(g.authority()).build(!f),this}},u.host=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0)return this._parts.hostname?r.buildHost(this._parts):"";var h=r.parseHost(c,this._parts);if(h!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');return this.build(!f),this},u.authority=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0)return this._parts.hostname?r.buildAuthority(this._parts):"";var h=r.parseAuthority(c,this._parts);if(h!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');return this.build(!f),this},u.userinfo=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){var h=r.buildUserinfo(this._parts);return h&&h.substring(0,h.length-1)}else return c[c.length-1]!=="@"&&(c+="@"),r.parseUserinfo(c,this._parts),this.build(!f),this},u.resource=function(c,f){var h;return c===void 0?this.path()+this.search()+this.hash():(h=r.parse(c),this._parts.path=h.path,this._parts.query=h.query,this._parts.fragment=h.fragment,this.build(!f),this)},u.subdomain=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var h=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,h)||""}else{var y=this._parts.hostname.length-this.domain().length,g=this._parts.hostname.substring(0,y),v=new RegExp("^"+m(g));if(c&&c.charAt(c.length-1)!=="."&&(c+="."),c.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return c&&r.ensureValidHostname(c,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(v,c),this.build(!f),this}},u.domain=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(typeof c=="boolean"&&(f=c,c=void 0),c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var h=this._parts.hostname.match(/\./g);if(h&&h.length<2)return this._parts.hostname;var y=this._parts.hostname.length-this.tld(f).length-1;return y=this._parts.hostname.lastIndexOf(".",y-1)+1,this._parts.hostname.substring(y)||""}else{if(!c)throw new TypeError("cannot set domain empty");if(c.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(c,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=c;else{var g=new RegExp(m(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(g,c)}return this.build(!f),this}},u.tld=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(typeof c=="boolean"&&(f=c,c=void 0),c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var h=this._parts.hostname.lastIndexOf("."),y=this._parts.hostname.substring(h+1);return f!==!0&&t&&t.list[y.toLowerCase()]&&t.get(this._parts.hostname)||y}else{var g;if(c)if(c.match(/[^a-zA-Z0-9-]/))if(t&&t.is(c))g=new RegExp(m(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(g,c);else throw new TypeError('TLD "'+c+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");g=new RegExp(m(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(g,c)}else throw new TypeError("cannot set TLD empty");return this.build(!f),this}},u.directory=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0||c===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var h=this._parts.path.length-this.filename().length-1,y=this._parts.path.substring(0,h)||(this._parts.hostname?"/":"");return c?r.decodePath(y):y}else{var g=this._parts.path.length-this.filename().length,v=this._parts.path.substring(0,g),b=new RegExp("^"+m(v));return this.is("relative")||(c||(c="/"),c.charAt(0)!=="/"&&(c="/"+c)),c&&c.charAt(c.length-1)!=="/"&&(c+="/"),c=r.recodePath(c),this._parts.path=this._parts.path.replace(b,c),this.build(!f),this}},u.filename=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(typeof c!="string"){if(!this._parts.path||this._parts.path==="/")return"";var h=this._parts.path.lastIndexOf("/"),y=this._parts.path.substring(h+1);return c?r.decodePathSegment(y):y}else{var g=!1;c.charAt(0)==="/"&&(c=c.substring(1)),c.match(/\.?\//)&&(g=!0);var v=new RegExp(m(this.filename())+"$");return c=r.recodePath(c),this._parts.path=this._parts.path.replace(v,c),g?this.normalizePath(f):this.build(!f),this}},u.suffix=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0||c===!0){if(!this._parts.path||this._parts.path==="/")return"";var h=this.filename(),y=h.lastIndexOf("."),g,v;return y===-1?"":(g=h.substring(y+1),v=/^[a-z0-9%]+$/i.test(g)?g:"",c?r.decodePathSegment(v):v)}else{c.charAt(0)==="."&&(c=c.substring(1));var b=this.suffix(),z;if(b)c?z=new RegExp(m(b)+"$"):z=new RegExp(m("."+b)+"$");else{if(!c)return this;this._parts.path+="."+r.recodePath(c)}return z&&(c=r.recodePath(c),this._parts.path=this._parts.path.replace(z,c)),this.build(!f),this}},u.segment=function(c,f,h){var y=this._parts.urn?":":"/",g=this.path(),v=g.substring(0,1)==="/",b=g.split(y);if(c!==void 0&&typeof c!="number"&&(h=f,f=c,c=void 0),c!==void 0&&typeof c!="number")throw new Error('Bad segment "'+c+'", must be 0-based integer');if(v&&b.shift(),c<0&&(c=Math.max(b.length+c,0)),f===void 0)return c===void 0?b:b[c];if(c===null||b[c]===void 0)if(w(f)){b=[];for(var z=0,N=f.length;z<N;z++)!f[z].length&&(!b.length||!b[b.length-1].length)||(b.length&&!b[b.length-1].length&&b.pop(),b.push(C(f[z])))}else(f||typeof f=="string")&&(f=C(f),b[b.length-1]===""?b[b.length-1]=f:b.push(f));else f?b[c]=C(f):b.splice(c,1);return v&&b.unshift(""),this.path(b.join(y),h)},u.segmentCoded=function(c,f,h){var y,g,v;if(typeof c!="number"&&(h=f,f=c,c=void 0),f===void 0){if(y=this.segment(c,f,h),!w(y))y=y!==void 0?r.decode(y):void 0;else for(g=0,v=y.length;g<v;g++)y[g]=r.decode(y[g]);return y}if(!w(f))f=typeof f=="string"||f instanceof String?r.encode(f):f;else for(g=0,v=f.length;g<v;g++)f[g]=r.encode(f[g]);return this.segment(c,f,h)};var J=u.query;return u.query=function(c,f){if(c===!0)return r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof c=="function"){var h=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),y=c.call(this,h);return this._parts.query=r.buildQuery(y||h,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this}else return c!==void 0&&typeof c!="string"?(this._parts.query=r.buildQuery(c,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this):J.call(this,c,f)},u.setQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof c=="string"||c instanceof String)y[c]=f!==void 0?f:null;else if(typeof c=="object")for(var g in c)d.call(c,g)&&(y[g]=c[g]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof c!="string"&&(h=f),this.build(!h),this},u.addQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.addQuery(y,c,f===void 0?null:f),this._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof c!="string"&&(h=f),this.build(!h),this},u.removeQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.removeQuery(y,c,f),this._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof c!="string"&&(h=f),this.build(!h),this},u.hasQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.hasQuery(y,c,f,h)},u.setSearch=u.setQuery,u.addSearch=u.addQuery,u.removeSearch=u.removeQuery,u.hasSearch=u.hasQuery,u.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},u.normalizeProtocol=function(c){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!c)),this},u.normalizeHostname=function(c){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&n&&(this._parts.hostname=n.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!c)),this},u.normalizePort=function(c){return typeof this._parts.protocol=="string"&&this._parts.port===r.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!c)),this},u.normalizePath=function(c){var f=this._parts.path;if(!f)return this;if(this._parts.urn)return this._parts.path=r.recodeUrnPath(this._parts.path),this.build(!c),this;if(this._parts.path==="/")return this;f=r.recodePath(f);var h,y="",g,v;for(f.charAt(0)!=="/"&&(h=!0,f="/"+f),(f.slice(-3)==="/.."||f.slice(-2)==="/.")&&(f+="/"),f=f.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),h&&(y=f.substring(1).match(/^(\.\.\/)+/)||"",y&&(y=y[0]));g=f.search(/\/\.\.(\/|$)/),g!==-1;){if(g===0){f=f.substring(3);continue}v=f.substring(0,g).lastIndexOf("/"),v===-1&&(v=g),f=f.substring(0,v)+f.substring(g+3)}return h&&this.is("relative")&&(f=y+f.substring(1)),this._parts.path=f,this.build(!c),this},u.normalizePathname=u.normalizePath,u.normalizeQuery=function(c){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(r.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!c)),this},u.normalizeFragment=function(c){return this._parts.fragment||(this._parts.fragment=null,this.build(!c)),this},u.normalizeSearch=u.normalizeQuery,u.normalizeHash=u.normalizeFragment,u.iso8859=function(){var c=r.encode,f=r.decode;r.encode=escape,r.decode=decodeURIComponent;try{this.normalize()}finally{r.encode=c,r.decode=f}return this},u.unicode=function(){var c=r.encode,f=r.decode;r.encode=k,r.decode=unescape;try{this.normalize()}finally{r.encode=c,r.decode=f}return this},u.readable=function(){var c=this.clone();c.username("").password("").normalize();var f="";if(c._parts.protocol&&(f+=c._parts.protocol+"://"),c._parts.hostname&&(c.is("punycode")&&e?(f+=e.toUnicode(c._parts.hostname),c._parts.port&&(f+=":"+c._parts.port)):f+=c.host()),c._parts.hostname&&c._parts.path&&c._parts.path.charAt(0)!=="/"&&(f+="/"),f+=c.path(!0),c._parts.query){for(var h="",y=0,g=c._parts.query.split("&"),v=g.length;y<v;y++){var b=(g[y]||"").split("=");h+="&"+r.decodeQuery(b[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),b[1]!==void 0&&(h+="="+r.decodeQuery(b[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}f+="?"+h.substring(1)}return f+=r.decodeQuery(c.hash(),!0),f},u.absoluteTo=function(c){var f=this.clone(),h=["protocol","username","password","hostname","port"],y,g,v;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(c instanceof r||(c=new r(c)),f._parts.protocol||(f._parts.protocol=c._parts.protocol,this._parts.hostname))return f;for(g=0;v=h[g];g++)f._parts[v]=c._parts[v];return f._parts.path?(f._parts.path.substring(-2)===".."&&(f._parts.path+="/"),f.path().charAt(0)!=="/"&&(y=c.directory(),y=y||(c.path().indexOf("/")===0?"/":""),f._parts.path=(y?y+"/":"")+f._parts.path,f.normalizePath())):(f._parts.path=c._parts.path,f._parts.query||(f._parts.query=c._parts.query)),f.build(),f},u.relativeTo=function(c){var f=this.clone().normalize(),h,y,g,v,b;if(f._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(c=new r(c).normalize(),h=f._parts,y=c._parts,v=f.path(),b=c.path(),v.charAt(0)!=="/")throw new Error("URI is already relative");if(b.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(h.protocol===y.protocol&&(h.protocol=null),h.username!==y.username||h.password!==y.password||h.protocol!==null||h.username!==null||h.password!==null)return f.build();if(h.hostname===y.hostname&&h.port===y.port)h.hostname=null,h.port=null;else return f.build();if(v===b)return h.path="",f.build();if(g=r.commonPath(v,b),!g)return f.build();var z=y.path.substring(g.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return h.path=z+h.path.substring(g.length)||"./",f.build()},u.equals=function(c){var f=this.clone(),h=new r(c),y={},g={},v={},b,z,N;if(f.normalize(),h.normalize(),f.toString()===h.toString())return!0;if(b=f.query(),z=h.query(),f.query(""),h.query(""),f.toString()!==h.toString()||b.length!==z.length)return!1;y=r.parseQuery(b,this._parts.escapeQuerySpace),g=r.parseQuery(z,this._parts.escapeQuerySpace);for(N in y)if(d.call(y,N)){if(w(y[N])){if(!P(y[N],g[N]))return!1}else if(y[N]!==g[N])return!1;v[N]=!0}for(N in g)if(d.call(g,N)&&!v[N])return!1;return!0},u.preventInvalidHostname=function(c){return this._parts.preventInvalidHostname=!!c,this},u.duplicateQueryParameters=function(c){return this._parts.duplicateQueryParameters=!!c,this},u.escapeQuerySpace=function(c){return this._parts.escapeQuerySpace=!!c,this},r})});function j(e,n,t,o){this.x=O(e,0),this.y=O(n,0),this.z=O(t,0),this.w=O(o,0)}j.fromElements=function(e,n,t,o,i){return p(i)?(i.x=e,i.y=n,i.z=t,i.w=o,i):new j(e,n,t,o)};j.fromColor=function(e,n){return s.typeOf.object("color",e),p(n)?(n.x=e.red,n.y=e.green,n.z=e.blue,n.w=e.alpha,n):new j(e.red,e.green,e.blue,e.alpha)};j.clone=function(e,n){if(p(e))return p(n)?(n.x=e.x,n.y=e.y,n.z=e.z,n.w=e.w,n):new j(e.x,e.y,e.z,e.w)};j.packedLength=4;j.pack=function(e,n,t){return s.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e.x,n[t++]=e.y,n[t++]=e.z,n[t]=e.w,n};j.unpack=function(e,n,t){return s.defined("array",e),n=O(n,0),p(t)||(t=new j),t.x=e[n++],t.y=e[n++],t.z=e[n++],t.w=e[n],t};j.packArray=function(e,n){s.defined("array",e);let t=e.length,o=t*4;if(!p(n))n=new Array(o);else{if(!Array.isArray(n)&&n.length!==o)throw new A("If result is a typed array, it must have exactly array.length * 4 elements");n.length!==o&&(n.length=o)}for(let i=0;i<t;++i)j.pack(e[i],n,i*4);return n};j.unpackArray=function(e,n){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!==0)throw new A("array length must be a multiple of 4.");let t=e.length;p(n)?n.length=t/4:n=new Array(t/4);for(let o=0;o<t;o+=4){let i=o/4;n[i]=j.unpack(e,o,n[i])}return n};j.fromArray=j.unpack;j.maximumComponent=function(e){return s.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)};j.minimumComponent=function(e){return s.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)};j.minimumByComponent=function(e,n,t){return s.typeOf.object("first",e),s.typeOf.object("second",n),s.typeOf.object("result",t),t.x=Math.min(e.x,n.x),t.y=Math.min(e.y,n.y),t.z=Math.min(e.z,n.z),t.w=Math.min(e.w,n.w),t};j.maximumByComponent=function(e,n,t){return s.typeOf.object("first",e),s.typeOf.object("second",n),s.typeOf.object("result",t),t.x=Math.max(e.x,n.x),t.y=Math.max(e.y,n.y),t.z=Math.max(e.z,n.z),t.w=Math.max(e.w,n.w),t};j.clamp=function(e,n,t,o){s.typeOf.object("value",e),s.typeOf.object("min",n),s.typeOf.object("max",t),s.typeOf.object("result",o);let i=I.clamp(e.x,n.x,t.x),r=I.clamp(e.y,n.y,t.y),a=I.clamp(e.z,n.z,t.z),u=I.clamp(e.w,n.w,t.w);return o.x=i,o.y=r,o.z=a,o.w=u,o};j.magnitudeSquared=function(e){return s.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};j.magnitude=function(e){return Math.sqrt(j.magnitudeSquared(e))};var Tn=new j;j.distance=function(e,n){return s.typeOf.object("left",e),s.typeOf.object("right",n),j.subtract(e,n,Tn),j.magnitude(Tn)};j.distanceSquared=function(e,n){return s.typeOf.object("left",e),s.typeOf.object("right",n),j.subtract(e,n,Tn),j.magnitudeSquared(Tn)};j.normalize=function(e,n){s.typeOf.object("cartesian",e),s.typeOf.object("result",n);let t=j.magnitude(e);if(n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,isNaN(n.x)||isNaN(n.y)||isNaN(n.z)||isNaN(n.w))throw new A("normalized result is not a number");return n};j.dot=function(e,n){return s.typeOf.object("left",e),s.typeOf.object("right",n),e.x*n.x+e.y*n.y+e.z*n.z+e.w*n.w};j.multiplyComponents=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x*n.x,t.y=e.y*n.y,t.z=e.z*n.z,t.w=e.w*n.w,t};j.divideComponents=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x/n.x,t.y=e.y/n.y,t.z=e.z/n.z,t.w=e.w/n.w,t};j.add=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x+n.x,t.y=e.y+n.y,t.z=e.z+n.z,t.w=e.w+n.w,t};j.subtract=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x-n.x,t.y=e.y-n.y,t.z=e.z-n.z,t.w=e.w-n.w,t};j.multiplyByScalar=function(e,n,t){return s.typeOf.object("cartesian",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t.w=e.w*n,t};j.divideByScalar=function(e,n,t){return s.typeOf.object("cartesian",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,t};j.negate=function(e,n){return s.typeOf.object("cartesian",e),s.typeOf.object("result",n),n.x=-e.x,n.y=-e.y,n.z=-e.z,n.w=-e.w,n};j.abs=function(e,n){return s.typeOf.object("cartesian",e),s.typeOf.object("result",n),n.x=Math.abs(e.x),n.y=Math.abs(e.y),n.z=Math.abs(e.z),n.w=Math.abs(e.w),n};var Et=new j;j.lerp=function(e,n,t,o){return s.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o),j.multiplyByScalar(n,t,Et),o=j.multiplyByScalar(e,1-t,o),j.add(Et,o,o)};var Uo=new j;j.mostOrthogonalAxis=function(e,n){s.typeOf.object("cartesian",e),s.typeOf.object("result",n);let t=j.normalize(e,Uo);return j.abs(t,t),t.x<=t.y?t.x<=t.z?t.x<=t.w?n=j.clone(j.UNIT_X,n):n=j.clone(j.UNIT_W,n):t.z<=t.w?n=j.clone(j.UNIT_Z,n):n=j.clone(j.UNIT_W,n):t.y<=t.z?t.y<=t.w?n=j.clone(j.UNIT_Y,n):n=j.clone(j.UNIT_W,n):t.z<=t.w?n=j.clone(j.UNIT_Z,n):n=j.clone(j.UNIT_W,n),n};j.equals=function(e,n){return e===n||p(e)&&p(n)&&e.x===n.x&&e.y===n.y&&e.z===n.z&&e.w===n.w};j.equalsArray=function(e,n,t){return e.x===n[t]&&e.y===n[t+1]&&e.z===n[t+2]&&e.w===n[t+3]};j.equalsEpsilon=function(e,n,t,o){return e===n||p(e)&&p(n)&&I.equalsEpsilon(e.x,n.x,t,o)&&I.equalsEpsilon(e.y,n.y,t,o)&&I.equalsEpsilon(e.z,n.z,t,o)&&I.equalsEpsilon(e.w,n.w,t,o)};j.ZERO=Object.freeze(new j(0,0,0,0));j.ONE=Object.freeze(new j(1,1,1,1));j.UNIT_X=Object.freeze(new j(1,0,0,0));j.UNIT_Y=Object.freeze(new j(0,1,0,0));j.UNIT_Z=Object.freeze(new j(0,0,1,0));j.UNIT_W=Object.freeze(new j(0,0,0,1));j.prototype.clone=function(e){return j.clone(this,e)};j.prototype.equals=function(e){return j.equals(this,e)};j.prototype.equalsEpsilon=function(e,n,t){return j.equalsEpsilon(this,e,n,t)};j.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Xn=new Float32Array(1),le=new Uint8Array(Xn.buffer),zo=new Uint32Array([287454020]),Io=new Uint8Array(zo.buffer),Tt=Io[0]===68;j.packFloat=function(e,n){return s.typeOf.number("value",e),p(n)||(n=new j),Xn[0]=e,Tt?(n.x=le[0],n.y=le[1],n.z=le[2],n.w=le[3]):(n.x=le[3],n.y=le[2],n.z=le[1],n.w=le[0]),n};j.unpackFloat=function(e){return s.typeOf.object("packedFloat",e),Tt?(le[0]=e.x,le[1]=e.y,le[2]=e.z,le[3]=e.w):(le[0]=e.w,le[1]=e.z,le[2]=e.y,le[3]=e.x),Xn[0]};var qe=j;function S(e,n,t,o,i,r,a,u,d,m,l,w,T,R,P,C){this[0]=O(e,0),this[1]=O(i,0),this[2]=O(d,0),this[3]=O(T,0),this[4]=O(n,0),this[5]=O(r,0),this[6]=O(m,0),this[7]=O(R,0),this[8]=O(t,0),this[9]=O(a,0),this[10]=O(l,0),this[11]=O(P,0),this[12]=O(o,0),this[13]=O(u,0),this[14]=O(w,0),this[15]=O(C,0)}S.packedLength=16;S.pack=function(e,n,t){return s.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n[t++]=e[3],n[t++]=e[4],n[t++]=e[5],n[t++]=e[6],n[t++]=e[7],n[t++]=e[8],n[t++]=e[9],n[t++]=e[10],n[t++]=e[11],n[t++]=e[12],n[t++]=e[13],n[t++]=e[14],n[t]=e[15],n};S.unpack=function(e,n,t){return s.defined("array",e),n=O(n,0),p(t)||(t=new S),t[0]=e[n++],t[1]=e[n++],t[2]=e[n++],t[3]=e[n++],t[4]=e[n++],t[5]=e[n++],t[6]=e[n++],t[7]=e[n++],t[8]=e[n++],t[9]=e[n++],t[10]=e[n++],t[11]=e[n++],t[12]=e[n++],t[13]=e[n++],t[14]=e[n++],t[15]=e[n],t};S.packArray=function(e,n){s.defined("array",e);let t=e.length,o=t*16;if(!p(n))n=new Array(o);else{if(!Array.isArray(n)&&n.length!==o)throw new A("If result is a typed array, it must have exactly array.length * 16 elements");n.length!==o&&(n.length=o)}for(let i=0;i<t;++i)S.pack(e[i],n,i*16);return n};S.unpackArray=function(e,n){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,16),e.length%16!==0)throw new A("array length must be a multiple of 16.");let t=e.length;p(n)?n.length=t/16:n=new Array(t/16);for(let o=0;o<t;o+=16){let i=o/16;n[i]=S.unpack(e,o,n[i])}return n};S.clone=function(e,n){if(p(e))return p(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n):new S(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])};S.fromArray=S.unpack;S.fromColumnMajorArray=function(e,n){return s.defined("values",e),S.clone(e,n)};S.fromRowMajorArray=function(e,n){return s.defined("values",e),p(n)?(n[0]=e[0],n[1]=e[4],n[2]=e[8],n[3]=e[12],n[4]=e[1],n[5]=e[5],n[6]=e[9],n[7]=e[13],n[8]=e[2],n[9]=e[6],n[10]=e[10],n[11]=e[14],n[12]=e[3],n[13]=e[7],n[14]=e[11],n[15]=e[15],n):new S(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])};S.fromRotationTranslation=function(e,n,t){return s.typeOf.object("rotation",e),n=O(n,_.ZERO),p(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=n.x,t[13]=n.y,t[14]=n.z,t[15]=1,t):new S(e[0],e[3],e[6],n.x,e[1],e[4],e[7],n.y,e[2],e[5],e[8],n.z,0,0,0,1)};S.fromTranslationQuaternionRotationScale=function(e,n,t,o){s.typeOf.object("translation",e),s.typeOf.object("rotation",n),s.typeOf.object("scale",t),p(o)||(o=new S);let i=t.x,r=t.y,a=t.z,u=n.x*n.x,d=n.x*n.y,m=n.x*n.z,l=n.x*n.w,w=n.y*n.y,T=n.y*n.z,R=n.y*n.w,P=n.z*n.z,C=n.z*n.w,q=n.w*n.w,k=u-w-P+q,L=2*(d-C),F=2*(m+R),x=2*(d+C),Q=-u+w-P+q,W=2*(T-l),ee=2*(m-R),re=2*(T+l),Z=-u-w+P+q;return o[0]=k*i,o[1]=x*i,o[2]=ee*i,o[3]=0,o[4]=L*r,o[5]=Q*r,o[6]=re*r,o[7]=0,o[8]=F*a,o[9]=W*a,o[10]=Z*a,o[11]=0,o[12]=e.x,o[13]=e.y,o[14]=e.z,o[15]=1,o};S.fromTranslationRotationScale=function(e,n){return s.typeOf.object("translationRotationScale",e),S.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,n)};S.fromTranslation=function(e,n){return s.typeOf.object("translation",e),S.fromRotationTranslation($.IDENTITY,e,n)};S.fromScale=function(e,n){return s.typeOf.object("scale",e),p(n)?(n[0]=e.x,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=e.y,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=e.z,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new S(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)};S.fromUniformScale=function(e,n){return s.typeOf.number("scale",e),p(n)?(n[0]=e,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=e,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=e,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new S(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};S.fromRotation=function(e,n){return s.typeOf.object("rotation",e),p(n)||(n=new S),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=0,n[4]=e[3],n[5]=e[4],n[6]=e[5],n[7]=0,n[8]=e[6],n[9]=e[7],n[10]=e[8],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n};var Je=new _,Ge=new _,pn=new _;S.fromCamera=function(e,n){s.typeOf.object("camera",e);let t=e.position,o=e.direction,i=e.up;s.typeOf.object("camera.position",t),s.typeOf.object("camera.direction",o),s.typeOf.object("camera.up",i),_.normalize(o,Je),_.normalize(_.cross(Je,i,Ge),Ge),_.normalize(_.cross(Ge,Je,pn),pn);let r=Ge.x,a=Ge.y,u=Ge.z,d=Je.x,m=Je.y,l=Je.z,w=pn.x,T=pn.y,R=pn.z,P=t.x,C=t.y,q=t.z,k=r*-P+a*-C+u*-q,L=w*-P+T*-C+R*-q,F=d*P+m*C+l*q;return p(n)?(n[0]=r,n[1]=w,n[2]=-d,n[3]=0,n[4]=a,n[5]=T,n[6]=-m,n[7]=0,n[8]=u,n[9]=R,n[10]=-l,n[11]=0,n[12]=k,n[13]=L,n[14]=F,n[15]=1,n):new S(r,a,u,k,w,T,R,L,-d,-m,-l,F,0,0,0,1)};S.computePerspectiveFieldOfView=function(e,n,t,o,i){s.typeOf.number.greaterThan("fovY",e,0),s.typeOf.number.lessThan("fovY",e,Math.PI),s.typeOf.number.greaterThan("near",t,0),s.typeOf.number.greaterThan("far",o,0),s.typeOf.object("result",i);let a=1/Math.tan(e*.5),u=a/n,d=(o+t)/(t-o),m=2*o*t/(t-o);return i[0]=u,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=a,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=d,i[11]=-1,i[12]=0,i[13]=0,i[14]=m,i[15]=0,i};S.computeOrthographicOffCenter=function(e,n,t,o,i,r,a){s.typeOf.number("left",e),s.typeOf.number("right",n),s.typeOf.number("bottom",t),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.number("far",r),s.typeOf.object("result",a);let u=1/(n-e),d=1/(o-t),m=1/(r-i),l=-(n+e)*u,w=-(o+t)*d,T=-(r+i)*m;return u*=2,d*=2,m*=-2,a[0]=u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=m,a[11]=0,a[12]=l,a[13]=w,a[14]=T,a[15]=1,a};S.computePerspectiveOffCenter=function(e,n,t,o,i,r,a){s.typeOf.number("left",e),s.typeOf.number("right",n),s.typeOf.number("bottom",t),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.number("far",r),s.typeOf.object("result",a);let u=2*i/(n-e),d=2*i/(o-t),m=(n+e)/(n-e),l=(o+t)/(o-t),w=-(r+i)/(r-i),T=-1,R=-2*r*i/(r-i);return a[0]=u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=m,a[9]=l,a[10]=w,a[11]=T,a[12]=0,a[13]=0,a[14]=R,a[15]=0,a};S.computeInfinitePerspectiveOffCenter=function(e,n,t,o,i,r){s.typeOf.number("left",e),s.typeOf.number("right",n),s.typeOf.number("bottom",t),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.object("result",r);let a=2*i/(n-e),u=2*i/(o-t),d=(n+e)/(n-e),m=(o+t)/(o-t),l=-1,w=-1,T=-2*i;return r[0]=a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=u,r[6]=0,r[7]=0,r[8]=d,r[9]=m,r[10]=l,r[11]=w,r[12]=0,r[13]=0,r[14]=T,r[15]=0,r};S.computeViewportTransformation=function(e,n,t,o){p(o)||(o=new S),e=O(e,O.EMPTY_OBJECT);let i=O(e.x,0),r=O(e.y,0),a=O(e.width,0),u=O(e.height,0);n=O(n,0),t=O(t,1);let d=a*.5,m=u*.5,l=(t-n)*.5,w=d,T=m,R=l,P=i+d,C=r+m,q=n+l,k=1;return o[0]=w,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=T,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=R,o[11]=0,o[12]=P,o[13]=C,o[14]=q,o[15]=k,o};S.computeView=function(e,n,t,o,i){return s.typeOf.object("position",e),s.typeOf.object("direction",n),s.typeOf.object("up",t),s.typeOf.object("right",o),s.typeOf.object("result",i),i[0]=o.x,i[1]=t.x,i[2]=-n.x,i[3]=0,i[4]=o.y,i[5]=t.y,i[6]=-n.y,i[7]=0,i[8]=o.z,i[9]=t.z,i[10]=-n.z,i[11]=0,i[12]=-_.dot(o,e),i[13]=-_.dot(t,e),i[14]=_.dot(n,e),i[15]=1,i};S.toArray=function(e,n){return s.typeOf.object("matrix",e),p(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]};S.getElementIndex=function(e,n){return s.typeOf.number.greaterThanOrEquals("row",n,0),s.typeOf.number.lessThanOrEquals("row",n,3),s.typeOf.number.greaterThanOrEquals("column",e,0),s.typeOf.number.lessThanOrEquals("column",e,3),e*4+n};S.getColumn=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("result",t);let o=n*4,i=e[o],r=e[o+1],a=e[o+2],u=e[o+3];return t.x=i,t.y=r,t.z=a,t.w=u,t};S.setColumn=function(e,n,t,o){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=S.clone(e,o);let i=n*4;return o[i]=t.x,o[i+1]=t.y,o[i+2]=t.z,o[i+3]=t.w,o};S.getRow=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("result",t);let o=e[n],i=e[n+4],r=e[n+8],a=e[n+12];return t.x=o,t.y=i,t.z=r,t.w=a,t};S.setRow=function(e,n,t,o){return s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=S.clone(e,o),o[n]=t.x,o[n+4]=t.y,o[n+8]=t.z,o[n+12]=t.w,o};S.setTranslation=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.object("translation",n),s.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[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=n.x,t[13]=n.y,t[14]=n.z,t[15]=e[15],t};var qo=new _;S.setScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t);let o=S.getScale(e,qo),i=n.x/o.x,r=n.y/o.y,a=n.z/o.z;return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3],t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7],t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};var Do=new _;S.setUniformScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t);let o=S.getScale(e,Do),i=n/o.x,r=n/o.y,a=n/o.z;return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3],t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7],t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};var Zn=new _;S.getScale=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n.x=_.magnitude(_.fromElements(e[0],e[1],e[2],Zn)),n.y=_.magnitude(_.fromElements(e[4],e[5],e[6],Zn)),n.z=_.magnitude(_.fromElements(e[8],e[9],e[10],Zn)),n};var Rt=new _;S.getMaximumScale=function(e){return S.getScale(e,Rt),_.maximumComponent(Rt)};var No=new _;S.setRotation=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);let o=S.getScale(e,No);return t[0]=n[0]*o.x,t[1]=n[1]*o.x,t[2]=n[2]*o.x,t[3]=e[3],t[4]=n[3]*o.y,t[5]=n[4]*o.y,t[6]=n[5]*o.y,t[7]=e[7],t[8]=n[6]*o.z,t[9]=n[7]*o.z,t[10]=n[8]*o.z,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};var ko=new _;S.getRotation=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=S.getScale(e,ko);return n[0]=e[0]/t.x,n[1]=e[1]/t.x,n[2]=e[2]/t.x,n[3]=e[4]/t.y,n[4]=e[5]/t.y,n[5]=e[6]/t.y,n[6]=e[8]/t.z,n[7]=e[9]/t.z,n[8]=e[10]/t.z,n};S.multiply=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);let o=e[0],i=e[1],r=e[2],a=e[3],u=e[4],d=e[5],m=e[6],l=e[7],w=e[8],T=e[9],R=e[10],P=e[11],C=e[12],q=e[13],k=e[14],L=e[15],F=n[0],x=n[1],Q=n[2],W=n[3],ee=n[4],re=n[5],Z=n[6],oe=n[7],J=n[8],c=n[9],f=n[10],h=n[11],y=n[12],g=n[13],v=n[14],b=n[15],z=o*F+u*x+w*Q+C*W,N=i*F+d*x+T*Q+q*W,V=r*F+m*x+R*Q+k*W,ie=a*F+l*x+P*Q+L*W,ae=o*ee+u*re+w*Z+C*oe,ne=i*ee+d*re+T*Z+q*oe,ue=r*ee+m*re+R*Z+k*oe,he=a*ee+l*re+P*Z+L*oe,ye=o*J+u*c+w*f+C*h,de=i*J+d*c+T*f+q*h,pe=r*J+m*c+R*f+k*h,Y=a*J+l*c+P*f+L*h,_e=o*y+u*g+w*v+C*b,Re=i*y+d*g+T*v+q*b,je=r*y+m*g+R*v+k*b,fn=a*y+l*g+P*v+L*b;return t[0]=z,t[1]=N,t[2]=V,t[3]=ie,t[4]=ae,t[5]=ne,t[6]=ue,t[7]=he,t[8]=ye,t[9]=de,t[10]=pe,t[11]=Y,t[12]=_e,t[13]=Re,t[14]=je,t[15]=fn,t};S.add=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t};S.subtract=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t};S.multiplyTransformation=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);let o=e[0],i=e[1],r=e[2],a=e[4],u=e[5],d=e[6],m=e[8],l=e[9],w=e[10],T=e[12],R=e[13],P=e[14],C=n[0],q=n[1],k=n[2],L=n[4],F=n[5],x=n[6],Q=n[8],W=n[9],ee=n[10],re=n[12],Z=n[13],oe=n[14],J=o*C+a*q+m*k,c=i*C+u*q+l*k,f=r*C+d*q+w*k,h=o*L+a*F+m*x,y=i*L+u*F+l*x,g=r*L+d*F+w*x,v=o*Q+a*W+m*ee,b=i*Q+u*W+l*ee,z=r*Q+d*W+w*ee,N=o*re+a*Z+m*oe+T,V=i*re+u*Z+l*oe+R,ie=r*re+d*Z+w*oe+P;return t[0]=J,t[1]=c,t[2]=f,t[3]=0,t[4]=h,t[5]=y,t[6]=g,t[7]=0,t[8]=v,t[9]=b,t[10]=z,t[11]=0,t[12]=N,t[13]=V,t[14]=ie,t[15]=1,t};S.multiplyByMatrix3=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("rotation",n),s.typeOf.object("result",t);let o=e[0],i=e[1],r=e[2],a=e[4],u=e[5],d=e[6],m=e[8],l=e[9],w=e[10],T=n[0],R=n[1],P=n[2],C=n[3],q=n[4],k=n[5],L=n[6],F=n[7],x=n[8],Q=o*T+a*R+m*P,W=i*T+u*R+l*P,ee=r*T+d*R+w*P,re=o*C+a*q+m*k,Z=i*C+u*q+l*k,oe=r*C+d*q+w*k,J=o*L+a*F+m*x,c=i*L+u*F+l*x,f=r*L+d*F+w*x;return t[0]=Q,t[1]=W,t[2]=ee,t[3]=0,t[4]=re,t[5]=Z,t[6]=oe,t[7]=0,t[8]=J,t[9]=c,t[10]=f,t[11]=0,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};S.multiplyByTranslation=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("translation",n),s.typeOf.object("result",t);let o=n.x,i=n.y,r=n.z,a=o*e[0]+i*e[4]+r*e[8]+e[12],u=o*e[1]+i*e[5]+r*e[9]+e[13],d=o*e[2]+i*e[6]+r*e[10]+e[14];return 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[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=a,t[13]=u,t[14]=d,t[15]=e[15],t};S.multiplyByScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t);let o=n.x,i=n.y,r=n.z;return o===1&&i===1&&r===1?S.clone(e,t):(t[0]=o*e[0],t[1]=o*e[1],t[2]=o*e[2],t[3]=e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=i*e[6],t[7]=e[7],t[8]=r*e[8],t[9]=r*e[9],t[10]=r*e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t)};S.multiplyByUniformScale=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3],t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7],t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};S.multiplyByVector=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);let o=n.x,i=n.y,r=n.z,a=n.w,u=e[0]*o+e[4]*i+e[8]*r+e[12]*a,d=e[1]*o+e[5]*i+e[9]*r+e[13]*a,m=e[2]*o+e[6]*i+e[10]*r+e[14]*a,l=e[3]*o+e[7]*i+e[11]*r+e[15]*a;return t.x=u,t.y=d,t.z=m,t.w=l,t};S.multiplyByPointAsVector=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);let o=n.x,i=n.y,r=n.z,a=e[0]*o+e[4]*i+e[8]*r,u=e[1]*o+e[5]*i+e[9]*r,d=e[2]*o+e[6]*i+e[10]*r;return t.x=a,t.y=u,t.z=d,t};S.multiplyByPoint=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);let o=n.x,i=n.y,r=n.z,a=e[0]*o+e[4]*i+e[8]*r+e[12],u=e[1]*o+e[5]*i+e[9]*r+e[13],d=e[2]*o+e[6]*i+e[10]*r+e[14];return t.x=a,t.y=u,t.z=d,t};S.multiplyByScalar=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t};S.negate=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=-e[0],n[1]=-e[1],n[2]=-e[2],n[3]=-e[3],n[4]=-e[4],n[5]=-e[5],n[6]=-e[6],n[7]=-e[7],n[8]=-e[8],n[9]=-e[9],n[10]=-e[10],n[11]=-e[11],n[12]=-e[12],n[13]=-e[13],n[14]=-e[14],n[15]=-e[15],n};S.transpose=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=e[1],o=e[2],i=e[3],r=e[6],a=e[7],u=e[11];return n[0]=e[0],n[1]=e[4],n[2]=e[8],n[3]=e[12],n[4]=t,n[5]=e[5],n[6]=e[9],n[7]=e[13],n[8]=o,n[9]=r,n[10]=e[10],n[11]=e[14],n[12]=i,n[13]=a,n[14]=u,n[15]=e[15],n};S.abs=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=Math.abs(e[0]),n[1]=Math.abs(e[1]),n[2]=Math.abs(e[2]),n[3]=Math.abs(e[3]),n[4]=Math.abs(e[4]),n[5]=Math.abs(e[5]),n[6]=Math.abs(e[6]),n[7]=Math.abs(e[7]),n[8]=Math.abs(e[8]),n[9]=Math.abs(e[9]),n[10]=Math.abs(e[10]),n[11]=Math.abs(e[11]),n[12]=Math.abs(e[12]),n[13]=Math.abs(e[13]),n[14]=Math.abs(e[14]),n[15]=Math.abs(e[15]),n};S.equals=function(e,n){return e===n||p(e)&&p(n)&&e[12]===n[12]&&e[13]===n[13]&&e[14]===n[14]&&e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]&&e[4]===n[4]&&e[5]===n[5]&&e[6]===n[6]&&e[8]===n[8]&&e[9]===n[9]&&e[10]===n[10]&&e[3]===n[3]&&e[7]===n[7]&&e[11]===n[11]&&e[15]===n[15]};S.equalsEpsilon=function(e,n,t){return t=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e[0]-n[0])<=t&&Math.abs(e[1]-n[1])<=t&&Math.abs(e[2]-n[2])<=t&&Math.abs(e[3]-n[3])<=t&&Math.abs(e[4]-n[4])<=t&&Math.abs(e[5]-n[5])<=t&&Math.abs(e[6]-n[6])<=t&&Math.abs(e[7]-n[7])<=t&&Math.abs(e[8]-n[8])<=t&&Math.abs(e[9]-n[9])<=t&&Math.abs(e[10]-n[10])<=t&&Math.abs(e[11]-n[11])<=t&&Math.abs(e[12]-n[12])<=t&&Math.abs(e[13]-n[13])<=t&&Math.abs(e[14]-n[14])<=t&&Math.abs(e[15]-n[15])<=t};S.getTranslation=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n.x=e[12],n.y=e[13],n.z=e[14],n};S.getMatrix3=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[4],n[4]=e[5],n[5]=e[6],n[6]=e[8],n[7]=e[9],n[8]=e[10],n};var Fo=new $,Lo=new $,Bo=new qe,xo=new qe(0,0,0,1);S.inverse=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=e[0],o=e[4],i=e[8],r=e[12],a=e[1],u=e[5],d=e[9],m=e[13],l=e[2],w=e[6],T=e[10],R=e[14],P=e[3],C=e[7],q=e[11],k=e[15],L=T*k,F=R*q,x=w*k,Q=R*C,W=w*q,ee=T*C,re=l*k,Z=R*P,oe=l*q,J=T*P,c=l*C,f=w*P,h=L*u+Q*d+W*m-(F*u+x*d+ee*m),y=F*a+re*d+J*m-(L*a+Z*d+oe*m),g=x*a+Z*u+c*m-(Q*a+re*u+f*m),v=ee*a+oe*u+f*d-(W*a+J*u+c*d),b=F*o+x*i+ee*r-(L*o+Q*i+W*r),z=L*t+Z*i+oe*r-(F*t+re*i+J*r),N=Q*t+re*o+f*r-(x*t+Z*o+c*r),V=W*t+J*o+c*i-(ee*t+oe*o+f*i);L=i*m,F=r*d,x=o*m,Q=r*u,W=o*d,ee=i*u,re=t*m,Z=r*a,oe=t*d,J=i*a,c=t*u,f=o*a;let ie=L*C+Q*q+W*k-(F*C+x*q+ee*k),ae=F*P+re*q+J*k-(L*P+Z*q+oe*k),ne=x*P+Z*C+c*k-(Q*P+re*C+f*k),ue=ee*P+oe*C+f*q-(W*P+J*C+c*q),he=x*T+ee*R+F*w-(W*R+L*w+Q*T),ye=oe*R+L*l+Z*T-(re*T+J*R+F*l),de=re*w+f*R+Q*l-(c*R+x*l+Z*w),pe=c*T+W*l+J*w-(oe*w+f*T+ee*l),Y=t*h+o*y+i*g+r*v;if(Math.abs(Y)<I.EPSILON21){if($.equalsEpsilon(S.getMatrix3(e,Fo),Lo,I.EPSILON7)&&qe.equals(S.getRow(e,3,Bo),xo))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-e[12],n[13]=-e[13],n[14]=-e[14],n[15]=1,n;throw new Se("matrix is not invertible because its determinate is zero.")}return Y=1/Y,n[0]=h*Y,n[1]=y*Y,n[2]=g*Y,n[3]=v*Y,n[4]=b*Y,n[5]=z*Y,n[6]=N*Y,n[7]=V*Y,n[8]=ie*Y,n[9]=ae*Y,n[10]=ne*Y,n[11]=ue*Y,n[12]=he*Y,n[13]=ye*Y,n[14]=de*Y,n[15]=pe*Y,n};S.inverseTransformation=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=e[0],o=e[1],i=e[2],r=e[4],a=e[5],u=e[6],d=e[8],m=e[9],l=e[10],w=e[12],T=e[13],R=e[14],P=-t*w-o*T-i*R,C=-r*w-a*T-u*R,q=-d*w-m*T-l*R;return n[0]=t,n[1]=r,n[2]=d,n[3]=0,n[4]=o,n[5]=a,n[6]=m,n[7]=0,n[8]=i,n[9]=u,n[10]=l,n[11]=0,n[12]=P,n[13]=C,n[14]=q,n[15]=1,n};var Qo=new S;S.inverseTranspose=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),S.inverse(S.transpose(e,Qo),n)};S.IDENTITY=Object.freeze(new S(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));S.ZERO=Object.freeze(new S(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));S.COLUMN0ROW0=0;S.COLUMN0ROW1=1;S.COLUMN0ROW2=2;S.COLUMN0ROW3=3;S.COLUMN1ROW0=4;S.COLUMN1ROW1=5;S.COLUMN1ROW2=6;S.COLUMN1ROW3=7;S.COLUMN2ROW0=8;S.COLUMN2ROW1=9;S.COLUMN2ROW2=10;S.COLUMN2ROW3=11;S.COLUMN3ROW0=12;S.COLUMN3ROW1=13;S.COLUMN3ROW2=14;S.COLUMN3ROW3=15;Object.defineProperties(S.prototype,{length:{get:function(){return S.packedLength}}});S.prototype.clone=function(e){return S.clone(this,e)};S.prototype.equals=function(e){return S.equals(this,e)};S.equalsArray=function(e,n,t){return e[0]===n[t]&&e[1]===n[t+1]&&e[2]===n[t+2]&&e[3]===n[t+3]&&e[4]===n[t+4]&&e[5]===n[t+5]&&e[6]===n[t+6]&&e[7]===n[t+7]&&e[8]===n[t+8]&&e[9]===n[t+9]&&e[10]===n[t+10]&&e[11]===n[t+11]&&e[12]===n[t+12]&&e[13]===n[t+13]&&e[14]===n[t+14]&&e[15]===n[t+15]};S.prototype.equalsEpsilon=function(e,n){return S.equalsEpsilon(this,e,n)};S.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]}) (${this[1]}, ${this[5]}, ${this[9]}, ${this[13]}) (${this[2]}, ${this[6]}, ${this[10]}, ${this[14]}) -(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var G=S;function vt(e,n,t){t=O(t,!1);let o={},i=p(e),r=p(n),a,u,d;if(i)for(a in e)e.hasOwnProperty(a)&&(u=e[a],r&&t&&typeof u=="object"&&n.hasOwnProperty(a)?(d=n[a],typeof d=="object"?o[a]=vt(u,d,t):o[a]=u):o[a]=u);if(r)for(a in n)n.hasOwnProperty(a)&&!o.hasOwnProperty(a)&&(d=n[a],o[a]=d);return o}var De=vt;function Qo(e,n,t){s.defined("array",e),s.defined("itemToFind",n),s.defined("comparator",t);let o=0,i=e.length-1,r,a;for(;o<=i;){if(r=~~((o+i)/2),a=t(e[r],n),a<0){o=r+1;continue}if(a>0){i=r-1;continue}return r}return~(i+1)}var xe=Qo;function Ho(e,n,t,o,i){this.xPoleWander=e,this.yPoleWander=n,this.xPoleOffset=t,this.yPoleOffset=o,this.ut1MinusUtc=i}var hn=Ho;function $o(e){if(e===null||isNaN(e))throw new A("year is required and must be a number.");return e%4===0&&e%100!==0||e%400===0}var dn=$o;var Ct=[31,28,31,30,31,30,31,31,30,31,30,31];function Vo(e,n,t,o,i,r,a,u){e=O(e,1),n=O(n,1),t=O(t,1),o=O(o,0),i=O(i,0),r=O(r,0),a=O(a,0),u=O(u,!1),C(),q(),this.year=e,this.month=n,this.day=t,this.hour=o,this.minute=i,this.second=r,this.millisecond=a,this.isLeapSecond=u;function C(){s.typeOf.number.greaterThanOrEquals("Year",e,1),s.typeOf.number.lessThanOrEquals("Year",e,9999),s.typeOf.number.greaterThanOrEquals("Month",n,1),s.typeOf.number.lessThanOrEquals("Month",n,12),s.typeOf.number.greaterThanOrEquals("Day",t,1),s.typeOf.number.lessThanOrEquals("Day",t,31),s.typeOf.number.greaterThanOrEquals("Hour",o,0),s.typeOf.number.lessThanOrEquals("Hour",o,23),s.typeOf.number.greaterThanOrEquals("Minute",i,0),s.typeOf.number.lessThanOrEquals("Minute",i,59),s.typeOf.bool("IsLeapSecond",u),s.typeOf.number.greaterThanOrEquals("Second",r,0),s.typeOf.number.lessThanOrEquals("Second",r,u?60:59),s.typeOf.number.greaterThanOrEquals("Millisecond",a,0),s.typeOf.number.lessThan("Millisecond",a,1e3)}function q(){let k=n===2&&dn(e)?Ct[n-1]+1:Ct[n-1];if(t>k)throw new A("Month and Day represents invalid date")}}var Rn=Vo;function Yo(e,n){this.julianDate=e,this.offset=n}var te=Yo;var Xo={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1},ce=Object.freeze(Xo);var Zo={UTC:0,TAI:1},H=Object.freeze(Zo);var jt=new Rn,vn=[31,28,31,30,31,30,31,31,30,31,30,31],Cn=29;function Jn(e,n){return U.compare(e.julianDate,n.julianDate)}var Ke=new te;function jn(e){Ke.julianDate=e;let n=U.leapSeconds,t=xe(n,Ke,Jn);t<0&&(t=~t),t>=n.length&&(t=n.length-1);let o=n[t].offset;t>0&&U.secondsDifference(n[t].julianDate,e)>o&&(t--,o=n[t].offset),U.addSeconds(e,o,e)}function At(e,n){Ke.julianDate=e;let t=U.leapSeconds,o=xe(t,Ke,Jn);if(o<0&&(o=~o),o===0)return U.addSeconds(e,-t[0].offset,n);if(o>=t.length)return U.addSeconds(e,-t[o-1].offset,n);let i=U.secondsDifference(t[o].julianDate,e);if(i===0)return U.addSeconds(e,-t[o].offset,n);if(!(i<=1))return U.addSeconds(e,-t[--o].offset,n)}function Ne(e,n,t){let o=n/ce.SECONDS_PER_DAY|0;return e+=o,n-=ce.SECONDS_PER_DAY*o,n<0&&(e--,n+=ce.SECONDS_PER_DAY),t.dayNumber=e,t.secondsOfDay=n,t}function Gn(e,n,t,o,i,r,a){let u=(n-14)/12|0,d=e+4800+u,m=(1461*d/4|0)+(367*(n-2-12*u)/12|0)-(3*((d+100)/100|0)/4|0)+t-32075;o=o-12,o<0&&(o+=24);let l=r+(o*ce.SECONDS_PER_HOUR+i*ce.SECONDS_PER_MINUTE+a*ce.SECONDS_PER_MILLISECOND);return l>=43200&&(m-=1),[m,l]}var Jo=/^(\d{4})$/,Go=/^(\d{4})-(\d{2})$/,Ko=/^(\d{4})-?(\d{3})$/,er=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,nr=/^(\d{4})-?(\d{2})-?(\d{2})$/,Kn=/([Z+\-])?(\d{2})?:?(\d{2})?$/,tr=/^(\d{2})(\.\d+)?/.source+Kn.source,or=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Kn.source,rr=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Kn.source,Ee="Invalid ISO 8601 date.";function U(e,n,t){this.dayNumber=void 0,this.secondsOfDay=void 0,e=O(e,0),n=O(n,0),t=O(t,H.UTC);let o=e|0;n=n+(e-o)*ce.SECONDS_PER_DAY,Ne(o,n,this),t===H.UTC&&jn(this)}U.fromGregorianDate=function(e,n){if(!(e instanceof Rn))throw new A("date must be a valid GregorianDate.");let t=Gn(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return p(n)?(Ne(t[0],t[1],n),jn(n),n):new U(t[0],t[1],H.UTC)};U.fromDate=function(e,n){if(!(e instanceof Date)||isNaN(e.getTime()))throw new A("date must be a valid JavaScript Date.");let t=Gn(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return p(n)?(Ne(t[0],t[1],n),jn(n),n):new U(t[0],t[1],H.UTC)};U.fromIso8601=function(e,n){if(typeof e!="string")throw new A(Ee);e=e.replace(",",".");let t=e.split("T"),o,i=1,r=1,a=0,u=0,d=0,m=0,l=t[0],w=t[1],T,R;if(!p(l))throw new A(Ee);let P;if(t=l.match(nr),t!==null){if(P=l.split("-").length-1,P>0&&P!==2)throw new A(Ee);o=+t[1],i=+t[2],r=+t[3]}else if(t=l.match(Go),t!==null)o=+t[1],i=+t[2];else if(t=l.match(Jo),t!==null)o=+t[1];else{let L;if(t=l.match(Ko),t!==null){if(o=+t[1],L=+t[2],R=dn(o),L<1||R&&L>366||!R&&L>365)throw new A(Ee)}else if(t=l.match(er),t!==null){o=+t[1];let F=+t[2],x=+t[3]||0;if(P=l.split("-").length-1,P>0&&(!p(t[3])&&P!==1||p(t[3])&&P!==2))throw new A(Ee);let W=new Date(Date.UTC(o,0,4));L=F*7+x-W.getUTCDay()-3}else throw new A(Ee);T=new Date(Date.UTC(o,0,1)),T.setUTCDate(L),i=T.getUTCMonth()+1,r=T.getUTCDate()}if(R=dn(o),i<1||i>12||r<1||(i!==2||!R)&&r>vn[i-1]||R&&i===2&&r>Cn)throw new A(Ee);let C;if(p(w)){if(t=w.match(rr),t!==null){if(P=w.split(":").length-1,P>0&&P!==2&&P!==3)throw new A(Ee);a=+t[1],u=+t[2],d=+t[3],m=+(t[4]||0)*1e3,C=5}else if(t=w.match(or),t!==null){if(P=w.split(":").length-1,P>2)throw new A(Ee);a=+t[1],u=+t[2],d=+(t[3]||0)*60,C=4}else if(t=w.match(tr),t!==null)a=+t[1],u=+(t[2]||0)*60,C=3;else throw new A(Ee);if(u>=60||d>=61||a>24||a===24&&(u>0||d>0||m>0))throw new A(Ee);let L=t[C],F=+t[C+1],x=+(t[C+2]||0);switch(L){case"+":a=a-F,u=u-x;break;case"-":a=a+F,u=u+x;break;case"Z":break;default:u=u+new Date(Date.UTC(o,i-1,r,a,u)).getTimezoneOffset();break}}let q=d===60;for(q&&d--;u>=60;)u-=60,a++;for(;a>=24;)a-=24,r++;for(T=R&&i===2?Cn:vn[i-1];r>T;)r-=T,i++,i>12&&(i-=12,o++),T=R&&i===2?Cn:vn[i-1];for(;u<0;)u+=60,a--;for(;a<0;)a+=24,r--;for(;r<1;)i--,i<1&&(i+=12,o--),T=R&&i===2?Cn:vn[i-1],r+=T;let k=Gn(o,i,r,a,u,d,m);return p(n)?(Ne(k[0],k[1],n),jn(n)):n=new U(k[0],k[1],H.UTC),q&&U.addSeconds(n,1,n),n};U.now=function(e){return U.fromDate(new Date,e)};var An=new U(0,0,H.TAI);U.toGregorianDate=function(e,n){if(!p(e))throw new A("julianDate is required.");let t=!1,o=At(e,An);p(o)||(U.addSeconds(e,-1,An),o=At(An,An),t=!0);let i=o.dayNumber,r=o.secondsOfDay;r>=43200&&(i+=1);let a=i+68569|0,u=4*a/146097|0;a=a-((146097*u+3)/4|0)|0;let d=4e3*(a+1)/1461001|0;a=a-(1461*d/4|0)+31|0;let m=80*a/2447|0,l=a-(2447*m/80|0)|0;a=m/11|0;let w=m+2-12*a|0,T=100*(u-49)+d+a|0,R=r/ce.SECONDS_PER_HOUR|0,P=r-R*ce.SECONDS_PER_HOUR,C=P/ce.SECONDS_PER_MINUTE|0;P=P-C*ce.SECONDS_PER_MINUTE;let q=P|0,k=(P-q)/ce.SECONDS_PER_MILLISECOND;return R+=12,R>23&&(R-=24),t&&(q+=1),p(n)?(n.year=T,n.month=w,n.day=l,n.hour=R,n.minute=C,n.second=q,n.millisecond=k,n.isLeapSecond=t,n):new Rn(T,w,l,R,C,q,k,t)};U.toDate=function(e){if(!p(e))throw new A("julianDate is required.");let n=U.toGregorianDate(e,jt),t=n.second;return n.isLeapSecond&&(t-=1),new Date(Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,t,n.millisecond))};U.toIso8601=function(e,n){if(!p(e))throw new A("julianDate is required.");let t=U.toGregorianDate(e,jt),o=t.year,i=t.month,r=t.day,a=t.hour,u=t.minute,d=t.second,m=t.millisecond;o===1e4&&i===1&&r===1&&a===0&&u===0&&d===0&&m===0&&(o=9999,i=12,r=31,a=24);let l;return!p(n)&&m!==0?(l=(m*.01).toString().replace(".",""),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}.${l}Z`):!p(n)||n===0?`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}Z`:(l=(m*.01).toFixed(n).replace(".","").slice(0,n),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}.${l}Z`)};U.clone=function(e,n){if(p(e))return p(n)?(n.dayNumber=e.dayNumber,n.secondsOfDay=e.secondsOfDay,n):new U(e.dayNumber,e.secondsOfDay,H.TAI)};U.compare=function(e,n){if(!p(e))throw new A("left is required.");if(!p(n))throw new A("right is required.");let t=e.dayNumber-n.dayNumber;return t!==0?t:e.secondsOfDay-n.secondsOfDay};U.equals=function(e,n){return e===n||p(e)&&p(n)&&e.dayNumber===n.dayNumber&&e.secondsOfDay===n.secondsOfDay};U.equalsEpsilon=function(e,n,t){return t=O(t,0),e===n||p(e)&&p(n)&&Math.abs(U.secondsDifference(e,n))<=t};U.totalDays=function(e){if(!p(e))throw new A("julianDate is required.");return e.dayNumber+e.secondsOfDay/ce.SECONDS_PER_DAY};U.secondsDifference=function(e,n){if(!p(e))throw new A("left is required.");if(!p(n))throw new A("right is required.");return(e.dayNumber-n.dayNumber)*ce.SECONDS_PER_DAY+(e.secondsOfDay-n.secondsOfDay)};U.daysDifference=function(e,n){if(!p(e))throw new A("left is required.");if(!p(n))throw new A("right is required.");let t=e.dayNumber-n.dayNumber,o=(e.secondsOfDay-n.secondsOfDay)/ce.SECONDS_PER_DAY;return t+o};U.computeTaiMinusUtc=function(e){Ke.julianDate=e;let n=U.leapSeconds,t=xe(n,Ke,Jn);return t<0&&(t=~t,--t,t<0&&(t=0)),n[t].offset};U.addSeconds=function(e,n,t){if(!p(e))throw new A("julianDate is required.");if(!p(n))throw new A("seconds is required.");if(!p(t))throw new A("result is required.");return Ne(e.dayNumber,e.secondsOfDay+n,t)};U.addMinutes=function(e,n,t){if(!p(e))throw new A("julianDate is required.");if(!p(n))throw new A("minutes is required.");if(!p(t))throw new A("result is required.");let o=e.secondsOfDay+n*ce.SECONDS_PER_MINUTE;return Ne(e.dayNumber,o,t)};U.addHours=function(e,n,t){if(!p(e))throw new A("julianDate is required.");if(!p(n))throw new A("hours is required.");if(!p(t))throw new A("result is required.");let o=e.secondsOfDay+n*ce.SECONDS_PER_HOUR;return Ne(e.dayNumber,o,t)};U.addDays=function(e,n,t){if(!p(e))throw new A("julianDate is required.");if(!p(n))throw new A("days is required.");if(!p(t))throw new A("result is required.");let o=e.dayNumber+n;return Ne(o,e.secondsOfDay,t)};U.lessThan=function(e,n){return U.compare(e,n)<0};U.lessThanOrEquals=function(e,n){return U.compare(e,n)<=0};U.greaterThan=function(e,n){return U.compare(e,n)>0};U.greaterThanOrEquals=function(e,n){return U.compare(e,n)>=0};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,n){return U.equalsEpsilon(this,e,n)};U.prototype.toString=function(){return U.toIso8601(this)};U.leapSeconds=[new te(new U(2441317,43210,H.TAI),10),new te(new U(2441499,43211,H.TAI),11),new te(new U(2441683,43212,H.TAI),12),new te(new U(2442048,43213,H.TAI),13),new te(new U(2442413,43214,H.TAI),14),new te(new U(2442778,43215,H.TAI),15),new te(new U(2443144,43216,H.TAI),16),new te(new U(2443509,43217,H.TAI),17),new te(new U(2443874,43218,H.TAI),18),new te(new U(2444239,43219,H.TAI),19),new te(new U(2444786,43220,H.TAI),20),new te(new U(2445151,43221,H.TAI),21),new te(new U(2445516,43222,H.TAI),22),new te(new U(2446247,43223,H.TAI),23),new te(new U(2447161,43224,H.TAI),24),new te(new U(2447892,43225,H.TAI),25),new te(new U(2448257,43226,H.TAI),26),new te(new U(2448804,43227,H.TAI),27),new te(new U(2449169,43228,H.TAI),28),new te(new U(2449534,43229,H.TAI),29),new te(new U(2450083,43230,H.TAI),30),new te(new U(2450630,43231,H.TAI),31),new te(new U(2451179,43232,H.TAI),32),new te(new U(2453736,43233,H.TAI),33),new te(new U(2454832,43234,H.TAI),34),new te(new U(2456109,43235,H.TAI),35),new te(new U(2457204,43236,H.TAI),36),new te(new U(2457754,43237,H.TAI),37)];var me=U;var io=Ze(We(),1);function ir(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var Dt=ir;function Nt(e,n){if(e===null||typeof e!="object")return e;n=O(n,!1);let t=new e.constructor;for(let o in e)if(e.hasOwnProperty(o)){let i=e[o];n&&(i=Nt(i,n)),t[o]=i}return t}var tn=Nt;function cr(){let e,n,t=new Promise(function(o,i){e=o,n=i});return{resolve:e,reject:n,promise:t}}var Qe=cr;var kt=Ze(We(),1);function et(e,n){let t;return typeof document<"u"&&(t=document),et._implementation(e,n,t)}et._implementation=function(e,n,t){if(!p(e))throw new A("relative uri is required.");if(!p(n)){if(typeof t>"u")return e;n=O(t.baseURI,t.location.href)}let o=new kt.default(e);return o.scheme()!==""?o.toString():o.absoluteTo(n).toString()};var mn=et;var Ft=Ze(We(),1);function sr(e,n){if(!p(e))throw new A("uri is required.");let t="",o=e.lastIndexOf("/");return o!==-1&&(t=e.substring(0,o+1)),n&&(e=new Ft.default(e),e.query().length!==0&&(t+=`?${e.query()}`),e.fragment().length!==0&&(t+=`#${e.fragment()}`)),t}var Lt=sr;var Bt=Ze(We(),1);function ar(e){if(!p(e))throw new A("uri is required.");let n=new Bt.default(e);n.normalize();let t=n.path(),o=t.lastIndexOf("/");return o!==-1&&(t=t.substr(o+1)),o=t.lastIndexOf("."),o===-1?t="":t=t.substr(o+1),t}var xt=ar;var Wt={};function fr(e,n,t){p(n)||(n=e.width),p(t)||(t=e.height);let o=Wt[n];p(o)||(o={},Wt[n]=o);let i=o[t];if(!p(i)){let r=document.createElement("canvas");r.width=n,r.height=t,i=r.getContext("2d",{willReadFrequently:!0}),i.globalCompositeOperation="copy",o[t]=i}return i.drawImage(e,0,0,n,t),i.getImageData(0,0,n,t).data}var nt=fr;var ur=/^blob:/i;function pr(e){return s.typeOf.string("uri",e),ur.test(e)}var zn=pr;var ve;function hr(e){p(ve)||(ve=document.createElement("a")),ve.href=window.location.href;let n=ve.host,t=ve.protocol;return ve.href=e,ve.href=ve.href,t!==ve.protocol||n!==ve.host}var Qt=hr;var dr=/^data:/i;function mr(e){return s.typeOf.string("uri",e),dr.test(e)}var In=mr;function yr(e){let n=document.createElement("script");return n.async=!0,n.src=e,new Promise((t,o)=>{window.crossOriginIsolated&&n.setAttribute("crossorigin","anonymous");let i=document.getElementsByTagName("head")[0];n.onload=function(){n.onload=void 0,i.removeChild(n),t()},n.onerror=function(r){o(r)},i.appendChild(n)})}var Ht=yr;function lr(e){if(!p(e))throw new A("obj is required.");let n="";for(let t in e)if(e.hasOwnProperty(t)){let o=e[t],i=`${encodeURIComponent(t)}=`;if(Array.isArray(o))for(let r=0,a=o.length;r<a;++r)n+=`${i+encodeURIComponent(o[r])}&`;else n+=`${i+encodeURIComponent(o)}&`}return n=n.slice(0,-1),n}var $t=lr;function wr(e){if(!p(e))throw new A("queryString is required.");let n={};if(e==="")return n;let t=e.replace(/\+/g,"%20").split(/[&;]/);for(let o=0,i=t.length;o<i;++o){let r=t[o].split("="),a=decodeURIComponent(r[0]),u=r[1];p(u)?u=decodeURIComponent(u):u="";let d=n[a];typeof d=="string"?n[a]=[d,u]:Array.isArray(d)?d.push(u):n[a]=u}return n}var Vt=wr;var br={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},fe=Object.freeze(br);var Or={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3},Yt=Object.freeze(Or);function qn(e){e=O(e,O.EMPTY_OBJECT);let n=O(e.throttleByServer,!1),t=O(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=O(e.priority,0),this.throttle=t,this.throttleByServer=n,this.type=O(e.type,Yt.OTHER),this.serverKey=e.serverKey,this.state=fe.UNISSUED,this.deferred=void 0,this.cancelled=!1}qn.prototype.cancel=function(){this.cancelled=!0};qn.prototype.clone=function(e){return p(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=fe.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new qn(this)};var Xt=qn;function gr(e){let n={};if(!e)return n;let t=e.split(`\r -`);for(let o=0;o<t.length;++o){let i=t[o],r=i.indexOf(": ");if(r>0){let a=i.substring(0,r),u=i.substring(r+2);n[a]=u}}return n}var Zt=gr;function Jt(e,n,t){this.statusCode=e,this.response=n,this.responseHeaders=t,typeof this.responseHeaders=="string"&&(this.responseHeaders=Zt(this.responseHeaders))}Jt.prototype.toString=function(){let e="Request has failed.";return p(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var yn=Jt;var Dn=Ze(We(),1);function ln(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}Object.defineProperties(ln.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}});ln.prototype.addEventListener=function(e,n){s.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(n);let t=this;return function(){t.removeEventListener(e,n)}};ln.prototype.removeEventListener=function(e,n){s.typeOf.func("listener",e);let t=this._listeners,o=this._scopes,i=-1;for(let r=0;r<t.length;r++)if(t[r]===e&&o[r]===n){i=r;break}return i!==-1?(this._insideRaiseEvent?(this._toRemove.push(i),t[i]=void 0,o[i]=void 0):(t.splice(i,1),o.splice(i,1)),!0):!1};function _r(e,n){return n-e}ln.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;let e,n=this._listeners,t=this._scopes,o=n.length;for(e=0;e<o;e++){let r=n[e];p(r)&&n[e].apply(t[e],arguments)}let i=this._toRemove;if(o=i.length,o>0){for(i.sort(_r),e=0;e<o;e++){let r=i[e];n.splice(r,1),t.splice(r,1)}i.length=0}this._insideRaiseEvent=!1};var Gt=ln;function He(e){s.typeOf.object("options",e),s.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(He.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){s.typeOf.number.greaterThanOrEquals("maximumLength",e,0);let n=this._length;if(e<n){let t=this._array;for(let o=e;o<n;++o)t[o]=void 0;this._length=e,t.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}});function tt(e,n,t){let o=e[n];e[n]=e[t],e[t]=o}He.prototype.reserve=function(e){e=O(e,this._length),this._array.length=e};He.prototype.heapify=function(e){e=O(e,0);let n=this._length,t=this._comparator,o=this._array,i=-1,r=!0;for(;r;){let a=2*(e+1),u=a-1;u<n&&t(o[u],o[e])<0?i=u:i=e,a<n&&t(o[a],o[i])<0&&(i=a),i!==e?(tt(o,i,e),e=i):r=!1}};He.prototype.resort=function(){let e=this._length;for(let n=Math.ceil(e/2);n>=0;--n)this.heapify(n)};He.prototype.insert=function(e){s.defined("element",e);let n=this._array,t=this._comparator,o=this._maximumLength,i=this._length++;for(i<n.length?n[i]=e:n.push(e);i!==0;){let a=Math.floor((i-1)/2);if(t(n[i],n[a])<0)tt(n,i,a),i=a;else break}let r;return p(o)&&this._length>o&&(r=n[o],this._length=o),r};He.prototype.pop=function(e){if(e=O(e,0),this._length===0)return;s.typeOf.number.lessThan("index",e,this._length);let n=this._array,t=n[e];return tt(n,e,--this._length),this.heapify(e),n[this._length]=void 0,t};var Kt=He;function Sr(e,n){return e.priority-n.priority}var K={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},on=20,we=new Kt({comparator:Sr});we.maximumLength=on;we.reserve(on);var Ce=[],Me={},Er=typeof document<"u"?new Dn.default(document.location.href):new Dn.default,Nn=new Gt;function se(){}se.maximumRequests=50;se.maximumRequestsPerServer=18;se.requestsByServer={};se.throttleRequests=!0;se.debugShowStatistics=!1;se.requestCompletedEvent=Nn;Object.defineProperties(se,{statistics:{get:function(){return K}},priorityHeapLength:{get:function(){return on},set:function(e){if(e<on)for(;we.length>e;){let n=we.pop();$e(n)}on=e,we.maximumLength=e,we.reserve(e)}}});function eo(e){p(e.priorityFunction)&&(e.priority=e.priorityFunction())}se.serverHasOpenSlots=function(e,n){n=O(n,1);let t=O(se.requestsByServer[e],se.maximumRequestsPerServer);return Me[e]+n<=t};se.heapHasOpenSlots=function(e){return we.length+e<=on};function no(e){return e.state===fe.UNISSUED&&(e.state=fe.ISSUED,e.deferred=Qe()),e.deferred.promise}function Tr(e){return function(n){if(e.state===fe.CANCELLED)return;let t=e.deferred;--K.numberOfActiveRequests,--Me[e.serverKey],Nn.raiseEvent(),e.state=fe.RECEIVED,e.deferred=void 0,t.resolve(n)}}function Rr(e){return function(n){e.state!==fe.CANCELLED&&(++K.numberOfFailedRequests,--K.numberOfActiveRequests,--Me[e.serverKey],Nn.raiseEvent(n),e.state=fe.FAILED,e.deferred.reject(n))}}function to(e){let n=no(e);return e.state=fe.ACTIVE,Ce.push(e),++K.numberOfActiveRequests,++K.numberOfActiveRequestsEver,++Me[e.serverKey],e.requestFunction().then(Tr(e)).catch(Rr(e)),n}function $e(e){let n=e.state===fe.ACTIVE;if(e.state=fe.CANCELLED,++K.numberOfCancelledRequests,p(e.deferred)){let t=e.deferred;e.deferred=void 0,t.reject()}n&&(--K.numberOfActiveRequests,--Me[e.serverKey],++K.numberOfCancelledActiveRequests),p(e.cancelFunction)&&e.cancelFunction()}se.update=function(){let e,n,t=0,o=Ce.length;for(e=0;e<o;++e){if(n=Ce[e],n.cancelled&&$e(n),n.state!==fe.ACTIVE){++t;continue}t>0&&(Ce[e-t]=n)}Ce.length-=t;let i=we.internalArray,r=we.length;for(e=0;e<r;++e)eo(i[e]);we.resort();let a=Math.max(se.maximumRequests-Ce.length,0),u=0;for(;u<a&&we.length>0;){if(n=we.pop(),n.cancelled){$e(n);continue}if(n.throttleByServer&&!se.serverHasOpenSlots(n.serverKey)){$e(n);continue}to(n),++u}vr()};se.getServerKey=function(e){s.typeOf.string("url",e);let n=new Dn.default(e);n.scheme()===""&&(n=n.absoluteTo(Er),n.normalize());let t=n.authority();/:/.test(t)||(t=`${t}:${n.scheme()==="https"?"443":"80"}`);let o=Me[t];return p(o)||(Me[t]=0),t};se.request=function(e){if(s.typeOf.object("request",e),s.typeOf.string("request.url",e.url),s.typeOf.func("request.requestFunction",e.requestFunction),In(e.url)||zn(e.url))return Nn.raiseEvent(),e.state=fe.RECEIVED,e.requestFunction();if(++K.numberOfAttemptedRequests,p(e.serverKey)||(e.serverKey=se.getServerKey(e.url)),se.throttleRequests&&e.throttleByServer&&!se.serverHasOpenSlots(e.serverKey))return;if(!se.throttleRequests||!e.throttle)return to(e);if(Ce.length>=se.maximumRequests)return;eo(e);let n=we.insert(e);if(p(n)){if(n===e)return;$e(n)}return no(e)};function vr(){se.debugShowStatistics&&(K.numberOfActiveRequests===0&&K.lastNumberOfActiveRequests>0&&(K.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${K.numberOfAttemptedRequests}`),K.numberOfAttemptedRequests=0),K.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${K.numberOfCancelledRequests}`),K.numberOfCancelledRequests=0),K.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${K.numberOfCancelledActiveRequests}`),K.numberOfCancelledActiveRequests=0),K.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${K.numberOfFailedRequests}`),K.numberOfFailedRequests=0)),K.lastNumberOfActiveRequests=K.numberOfActiveRequests)}se.clearForSpecs=function(){for(;we.length>0;){let n=we.pop();$e(n)}let e=Ce.length;for(let n=0;n<e;++n)$e(Ce[n]);Ce.length=0,Me={},K.numberOfAttemptedRequests=0,K.numberOfActiveRequests=0,K.numberOfCancelledRequests=0,K.numberOfCancelledActiveRequests=0,K.numberOfFailedRequests=0,K.numberOfActiveRequestsEver=0,K.lastNumberOfActiveRequests=0};se.numberOfActiveRequestsByServer=function(e){return Me[e]};se.requestHeap=we;var kn=se;var oo=Ze(We(),1);var wn={},rn={};wn.add=function(e,n){if(!p(e))throw new A("host is required.");if(!p(n)||n<=0)throw new A("port is required to be greater than 0.");let t=`${e.toLowerCase()}:${n}`;p(rn[t])||(rn[t]=!0)};wn.remove=function(e,n){if(!p(e))throw new A("host is required.");if(!p(n)||n<=0)throw new A("port is required to be greater than 0.");let t=`${e.toLowerCase()}:${n}`;p(rn[t])&&delete rn[t]};function Cr(e){let n=new oo.default(e);n.normalize();let t=n.authority();if(t.length!==0){if(n.authority(t),t.indexOf("@")!==-1&&(t=t.split("@")[1]),t.indexOf(":")===-1){let o=n.scheme();if(o.length===0&&(o=window.location.protocol,o=o.substring(0,o.length-1)),o==="http")t+=":80";else if(o==="https")t+=":443";else return}return t}}wn.contains=function(e){if(!p(e))throw new A("url is required.");let n=Cr(e);return!!(p(n)&&p(rn[n]))};wn.clear=function(){rn={}};var ot=wn;var co=function(){try{let e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}}();function M(e){e=O(e,O.EMPTY_OBJECT),typeof e=="string"&&(e={url:e}),s.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=Ae(e.templateValues,{}),this._queryParameters=Ae(e.queryParameters,{}),this.headers=Ae(e.headers,{}),this.request=O(e.request,new Xt),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=O(e.retryAttempts,0),this._retryCount=0,O(e.parseUrl,!0)?this.parseUrl(e.url,!0,!0):this._url=e.url,this._credits=e.credits}function Ae(e,n){return p(e)?tn(e):n}M.createIfNeeded=function(e){return e instanceof M?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new M({url:e})};var cn;M.supportsImageBitmapOptions=function(){return p(cn)?cn:typeof createImageBitmap!="function"?(cn=Promise.resolve(!1),cn):(cn=M.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(n){let t={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(n,t),createImageBitmap(n)])}).then(function(n){let t=nt(n[0]),o=nt(n[1]);return t[1]!==o[1]}).catch(function(){return!1}),cn)};Object.defineProperties(M,{isBlobSupported:{get:function(){return co}}});Object.defineProperties(M.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){this.parseUrl(e,!1,!1)}},extension:{get:function(){return xt(this._url)}},isDataUri:{get:function(){return In(this._url)}},isBlobUri:{get:function(){return zn(this._url)}},isCrossOriginUrl:{get:function(){return Qt(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}});M.prototype.toString=function(){return this.getUrlComponent(!0,!0)};M.prototype.parseUrl=function(e,n,t,o){let i=new io.default(e),r=Ar(i.query());this._queryParameters=n?Ln(r,this.queryParameters,t):r,i.search(""),i.fragment(""),p(o)&&i.scheme()===""&&(i=i.absoluteTo(mn(o))),this._url=i.toString()};function Ar(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:Vt(e)}function Ln(e,n,t){if(!t)return De(e,n);let o=tn(e,!0);for(let i in n)if(n.hasOwnProperty(i)){let r=o[i],a=n[i];p(r)?(Array.isArray(r)||(r=o[i]=[r]),o[i]=r.concat(a)):o[i]=Array.isArray(a)?a.slice():a}return o}M.prototype.getUrlComponent=function(e,n){if(this.isDataUri)return this._url;let t=this._url;e&&(t=`${t}${jr(this.queryParameters)}`),t=t.replace(/%7B/g,"{").replace(/%7D/g,"}");let o=this._templateValues;return Object.keys(o).length>0&&(t=t.replace(/{(.*?)}/g,function(i,r){let a=o[r];return p(a)?encodeURIComponent(a):i})),n&&p(this.proxy)&&(t=this.proxy.getURL(t)),t};function jr(e){let n=Object.keys(e);return n.length===0?"":n.length===1&&!p(e[n[0]])?`?${n[0]}`:`?${$t(e)}`}M.prototype.setQueryParameters=function(e,n){n?this._queryParameters=Ln(this._queryParameters,e,!1):this._queryParameters=Ln(e,this._queryParameters,!1)};M.prototype.appendQueryParameters=function(e){this._queryParameters=Ln(e,this._queryParameters,!0)};M.prototype.setTemplateValues=function(e,n){n?this._templateValues=De(this._templateValues,e):this._templateValues=De(e,this._templateValues)};M.prototype.getDerivedResource=function(e){let n=this.clone();if(n._retryCount=0,p(e.url)){let t=O(e.preserveQueryParameters,!1);n.parseUrl(e.url,!0,t,this._url)}return p(e.queryParameters)&&(n._queryParameters=De(e.queryParameters,n.queryParameters)),p(e.templateValues)&&(n._templateValues=De(e.templateValues,n.templateValues)),p(e.headers)&&(n.headers=De(e.headers,n.headers)),p(e.proxy)&&(n.proxy=e.proxy),p(e.request)&&(n.request=e.request),p(e.retryCallback)&&(n.retryCallback=e.retryCallback),p(e.retryAttempts)&&(n.retryAttempts=e.retryAttempts),n};M.prototype.retryOnError=function(e){let n=this.retryCallback;if(typeof n!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let t=this;return Promise.resolve(n(this,e)).then(function(o){return++t._retryCount,o})};M.prototype.clone=function(e){return p(e)?(e._url=this._url,e._queryParameters=tn(this._queryParameters),e._templateValues=tn(this._templateValues),e.headers=tn(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new M({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:p(this.credits)?this.credits.slice():void 0})};M.prototype.getBaseUri=function(e){return Lt(this.getUrlComponent(e),e)};M.prototype.appendForwardSlash=function(){this._url=Dt(this._url)};M.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};M.fetchArrayBuffer=function(e){return new M(e).fetchArrayBuffer()};M.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};M.fetchBlob=function(e){return new M(e).fetchBlob()};M.prototype.fetchImage=function(e){e=O(e,O.EMPTY_OBJECT);let n=O(e.preferImageBitmap,!1),t=O(e.preferBlob,!1),o=O(e.flipY,!1),i=O(e.skipColorSpaceConversion,!1);if(it(this.request),!co||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!t)return rt({resource:this,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:n});let r=this.fetchBlob();if(!p(r))return;let a,u,d,m;return M.supportsImageBitmapOptions().then(function(l){return a=l,u=a&&n,r}).then(function(l){if(!p(l))return;if(m=l,u)return M.createImageBitmapFromBlob(l,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:i});let w=window.URL.createObjectURL(l);return d=new M({url:w}),rt({resource:d,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:!1})}).then(function(l){if(p(l))return l.blob=m,u||window.URL.revokeObjectURL(d.url),l}).catch(function(l){return p(d)&&window.URL.revokeObjectURL(d.url),l.blob=m,Promise.reject(l)})};function rt(e){let n=e.resource,t=e.flipY,o=e.skipColorSpaceConversion,i=e.preferImageBitmap,r=n.request;r.url=n.url,r.requestFunction=function(){let u=!1;!n.isDataUri&&!n.isBlobUri&&(u=n.isCrossOriginUrl);let d=Qe();return M._Implementations.createImage(r,u,d,t,o,i),d.promise};let a=kn.request(r);if(p(a))return a.catch(function(u){return r.state!==fe.FAILED?Promise.reject(u):n.retryOnError(u).then(function(d){return d?(r.state=fe.UNISSUED,r.deferred=void 0,rt({resource:n,flipY:t,skipColorSpaceConversion:o,preferImageBitmap:i})):Promise.reject(u)})})}M.fetchImage=function(e){return new M(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};M.prototype.fetchText=function(){return this.fetch({responseType:"text"})};M.fetchText=function(e){return new M(e).fetchText()};M.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(p(e))return e.then(function(n){if(p(n))return JSON.parse(n)})};M.fetchJson=function(e){return new M(e).fetchJson()};M.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};M.fetchXML=function(e){return new M(e).fetchXML()};M.prototype.fetchJsonp=function(e){e=O(e,"callback"),it(this.request);let n;do n=`loadJsonp${I.nextRandomNumber().toString().substring(2,8)}`;while(p(window[n]));return so(this,e,n)};function so(e,n,t){let o={};o[n]=t,e.setQueryParameters(o);let i=e.request,r=e.url;i.url=r,i.requestFunction=function(){let u=Qe();return window[t]=function(d){u.resolve(d);try{delete window[t]}catch{window[t]=void 0}},M._Implementations.loadAndExecuteScript(r,t,u),u.promise};let a=kn.request(i);if(p(a))return a.catch(function(u){return i.state!==fe.FAILED?Promise.reject(u):e.retryOnError(u).then(function(d){return d?(i.state=fe.UNISSUED,i.deferred=void 0,so(e,n,t)):Promise.reject(u)})})}M.fetchJsonp=function(e){return new M(e).fetchJsonp(e.callbackParameterName)};M.prototype._makeRequest=function(e){let n=this;it(n.request);let t=n.request,o=n.url;t.url=o,t.requestFunction=function(){let r=e.responseType,a=De(e.headers,n.headers),u=e.overrideMimeType,d=e.method,m=e.data,l=Qe(),w=M._Implementations.loadWithXhr(o,r,d,m,a,l,u);return p(w)&&p(w.abort)&&(t.cancelFunction=function(){w.abort()}),l.promise};let i=kn.request(t);if(p(i))return i.then(function(r){return t.cancelFunction=void 0,r}).catch(function(r){return t.cancelFunction=void 0,t.state!==fe.FAILED?Promise.reject(r):n.retryOnError(r).then(function(a){return a?(t.state=fe.UNISSUED,t.deferred=void 0,n.fetch(e)):Promise.reject(r)})})};function it(e){if(e.state===fe.ISSUED||e.state===fe.ACTIVE)throw new Se("The Resource is already being fetched.");e.state=fe.UNISSUED,e.deferred=void 0}var Pr=/^data:(.*?)(;base64)?,(.*)$/;function Fn(e,n){let t=decodeURIComponent(n);return e?atob(t):t}function ro(e,n){let t=Fn(e,n),o=new ArrayBuffer(t.length),i=new Uint8Array(o);for(let r=0;r<t.length;r++)i[r]=t.charCodeAt(r);return o}function Mr(e,n){n=O(n,"");let t=e[1],o=!!e[2],i=e[3],r,a;switch(n){case"":case"text":return Fn(o,i);case"arraybuffer":return ro(o,i);case"blob":return r=ro(o,i),new Blob([r],{type:t});case"document":return a=new DOMParser,a.parseFromString(Fn(o,i),t);case"json":return JSON.parse(Fn(o,i));default:throw new A(`Unhandled responseType: ${n}`)}}M.prototype.fetch=function(e){return e=Ae(e,{}),e.method="GET",this._makeRequest(e)};M.fetch=function(e){return new M(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M.prototype.delete=function(e){return e=Ae(e,{}),e.method="DELETE",this._makeRequest(e)};M.delete=function(e){return new M(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};M.prototype.head=function(e){return e=Ae(e,{}),e.method="HEAD",this._makeRequest(e)};M.head=function(e){return new M(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M.prototype.options=function(e){return e=Ae(e,{}),e.method="OPTIONS",this._makeRequest(e)};M.options=function(e){return new M(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M.prototype.post=function(e,n){return s.defined("data",e),n=Ae(n,{}),n.method="POST",n.data=e,this._makeRequest(n)};M.post=function(e){return new M(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M.prototype.put=function(e,n){return s.defined("data",e),n=Ae(n,{}),n.method="PUT",n.data=e,this._makeRequest(n)};M.put=function(e){return new M(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M.prototype.patch=function(e,n){return s.defined("data",e),n=Ae(n,{}),n.method="PATCH",n.data=e,this._makeRequest(n)};M.patch=function(e){return new M(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M._Implementations={};M._Implementations.loadImageElement=function(e,n,t){let o=new Image;o.onload=function(){o.naturalWidth===0&&o.naturalHeight===0&&o.width===0&&o.height===0&&(o.width=300,o.height=150),t.resolve(o)},o.onerror=function(i){t.reject(i)},n&&(ot.contains(e)?o.crossOrigin="use-credentials":o.crossOrigin=""),o.src=e};M._Implementations.createImage=function(e,n,t,o,i,r){let a=e.url;M.supportsImageBitmapOptions().then(function(u){if(!(u&&r)){M._Implementations.loadImageElement(a,n,t);return}let d="blob",m="GET",l=Qe(),w=M._Implementations.loadWithXhr(a,d,m,void 0,void 0,l,void 0,void 0,void 0);return p(w)&&p(w.abort)&&(e.cancelFunction=function(){w.abort()}),l.promise.then(function(T){if(!p(T)){t.reject(new Se(`Successfully retrieved ${a} but it contained no content.`));return}return M.createImageBitmapFromBlob(T,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:i})}).then(function(T){t.resolve(T)})}).catch(function(u){t.reject(u)})};M.createImageBitmapFromBlob=function(e,n){return s.defined("options",n),s.typeOf.bool("options.flipY",n.flipY),s.typeOf.bool("options.premultiplyAlpha",n.premultiplyAlpha),s.typeOf.bool("options.skipColorSpaceConversion",n.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:n.flipY?"flipY":"none",premultiplyAlpha:n.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:n.skipColorSpaceConversion?"none":"default"})};function Ur(e,n,t,o,i,r,a){fetch(e,{method:t,headers:i}).then(async u=>{if(!u.ok){let d={};u.headers.forEach((m,l)=>{d[l]=m}),r.reject(new yn(u.status,u,d));return}switch(n){case"text":r.resolve(u.text());break;case"json":r.resolve(u.json());break;default:r.resolve(new Uint8Array(await u.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(new yn)})}var zr=typeof XMLHttpRequest>"u";M._Implementations.loadWithXhr=function(e,n,t,o,i,r,a){let u=Pr.exec(e);if(u!==null){r.resolve(Mr(u,n));return}if(zr){Ur(e,n,t,o,i,r,a);return}let d=new XMLHttpRequest;if(ot.contains(e)&&(d.withCredentials=!0),d.open(t,e,!0),p(a)&&p(d.overrideMimeType)&&d.overrideMimeType(a),p(i))for(let l in i)i.hasOwnProperty(l)&&d.setRequestHeader(l,i[l]);p(n)&&(d.responseType=n);let m=!1;return typeof e=="string"&&(m=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),d.onload=function(){if((d.status<200||d.status>=300)&&!(m&&d.status===0)){r.reject(new yn(d.status,d.response,d.getAllResponseHeaders()));return}let l=d.response,w=d.responseType;if(t==="HEAD"||t==="OPTIONS"){let R=d.getAllResponseHeaders().trim().split(/[\r\n]+/),P={};R.forEach(function(C){let q=C.split(": "),k=q.shift();P[k]=q.join(": ")}),r.resolve(P);return}if(d.status===204)r.resolve(void 0);else if(p(l)&&(!p(n)||w===n))r.resolve(l);else if(n==="json"&&typeof l=="string")try{r.resolve(JSON.parse(l))}catch(T){r.reject(T)}else(w===""||w==="document")&&p(d.responseXML)&&d.responseXML.hasChildNodes()?r.resolve(d.responseXML):(w===""||w==="text")&&p(d.responseText)?r.resolve(d.responseText):r.reject(new Se("Invalid XMLHttpRequest response type."))},d.onerror=function(l){r.reject(new yn)},d.send(o),d};M._Implementations.loadAndExecuteScript=function(e,n,t){return Ht(e,n).catch(function(o){t.reject(o)})};M._DefaultImplementations={};M._DefaultImplementations.createImage=M._Implementations.createImage;M._DefaultImplementations.loadWithXhr=M._Implementations.loadWithXhr;M._DefaultImplementations.loadAndExecuteScript=M._Implementations.loadAndExecuteScript;M.DEFAULT=Object.freeze(new M({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var ke=M;function On(e){e=O(e,O.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._addNewLeapSeconds=O(e.addNewLeapSeconds,!0),p(e.data)?ao(this,e.data):ao(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}On.fromUrl=async function(e,n){s.defined("url",e),n=O(n,O.EMPTY_OBJECT);let t=ke.createIfNeeded(e),o;try{o=await t.fetchJson()}catch{throw new Se(`An error occurred while retrieving the EOP data from the URL ${t.url}.`)}return new On({addNewLeapSeconds:n.addNewLeapSeconds,data:o})};On.NONE=Object.freeze({compute:function(e,n){return p(n)?(n.xPoleWander=0,n.yPoleWander=0,n.xPoleOffset=0,n.yPoleOffset=0,n.ut1MinusUtc=0):n=new hn(0,0,0,0,0),n}});On.prototype.compute=function(e,n){if(!p(this._samples))return;if(p(n)||(n=new hn(0,0,0,0,0)),this._samples.length===0)return n.xPoleWander=0,n.yPoleWander=0,n.xPoleOffset=0,n.yPoleOffset=0,n.ut1MinusUtc=0,n;let t=this._dates,o=this._lastIndex,i=0,r=0;if(p(o)){let u=t[o],d=t[o+1],m=me.lessThanOrEquals(u,e),l=!p(d),w=l||me.greaterThanOrEquals(d,e);if(m&&w)return i=o,!l&&d.equals(e)&&++i,r=i+1,uo(this,t,this._samples,e,i,r,n),n}let a=xe(t,e,me.compare,this._dateColumn);return a>=0?(a<t.length-1&&t[a+1].equals(e)&&++a,i=a,r=a):(r=~a,i=r-1,i<0&&(i=0)),this._lastIndex=i,uo(this,t,this._samples,e,i,r,n),n};function Ir(e,n){return me.compare(e.julianDate,n)}function ao(e,n){if(!p(n.columnNames))throw new Se("Error in loaded EOP data: The columnNames property is required.");if(!p(n.samples))throw new Se("Error in loaded EOP data: The samples property is required.");let t=n.columnNames.indexOf("modifiedJulianDateUtc"),o=n.columnNames.indexOf("xPoleWanderRadians"),i=n.columnNames.indexOf("yPoleWanderRadians"),r=n.columnNames.indexOf("ut1MinusUtcSeconds"),a=n.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=n.columnNames.indexOf("yCelestialPoleOffsetRadians"),d=n.columnNames.indexOf("taiMinusUtcSeconds");if(t<0||o<0||i<0||r<0||a<0||u<0||d<0)throw new Se("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");let m=e._samples=n.samples,l=e._dates=[];e._dateColumn=t,e._xPoleWanderRadiansColumn=o,e._yPoleWanderRadiansColumn=i,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=d,e._columnCount=n.columnNames.length,e._lastIndex=void 0;let w,T=e._addNewLeapSeconds;for(let R=0,P=m.length;R<P;R+=e._columnCount){let C=m[R+t],q=m[R+d],k=C+ce.MODIFIED_JULIAN_DATE_DIFFERENCE,L=new me(k,q,H.TAI);if(l.push(L),T){if(q!==w&&p(w)){let F=me.leapSeconds,x=xe(F,L,Ir);if(x<0){let W=new te(L,q);F.splice(~x,0,W)}}w=q}}}function fo(e,n,t,o,i){let r=t*o;i.xPoleWander=n[r+e._xPoleWanderRadiansColumn],i.yPoleWander=n[r+e._yPoleWanderRadiansColumn],i.xPoleOffset=n[r+e._xCelestialPoleOffsetRadiansColumn],i.yPoleOffset=n[r+e._yCelestialPoleOffsetRadiansColumn],i.ut1MinusUtc=n[r+e._ut1MinusUtcSecondsColumn]}function bn(e,n,t){return n+e*(t-n)}function uo(e,n,t,o,i,r,a){let u=e._columnCount;if(r>n.length-1)return a.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;let d=n[i],m=n[r];if(d.equals(m)||o.equals(d))return fo(e,t,i,u,a),a;if(o.equals(m))return fo(e,t,r,u,a),a;let l=me.secondsDifference(o,d)/me.secondsDifference(m,d),w=i*u,T=r*u,R=t[w+e._ut1MinusUtcSecondsColumn],P=t[T+e._ut1MinusUtcSecondsColumn],C=P-R;if(C>.5||C<-.5){let q=t[w+e._taiMinusUtcSecondsColumn],k=t[T+e._taiMinusUtcSecondsColumn];q!==k&&(m.equals(o)?R=P:P-=k-q)}return a.xPoleWander=bn(l,t[w+e._xPoleWanderRadiansColumn],t[T+e._xPoleWanderRadiansColumn]),a.yPoleWander=bn(l,t[w+e._yPoleWanderRadiansColumn],t[T+e._yPoleWanderRadiansColumn]),a.xPoleOffset=bn(l,t[w+e._xCelestialPoleOffsetRadiansColumn],t[T+e._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=bn(l,t[w+e._yCelestialPoleOffsetRadiansColumn],t[T+e._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=bn(l,R,P),a}var po=On;function be(e,n,t){this.heading=O(e,0),this.pitch=O(n,0),this.roll=O(t,0)}be.fromQuaternion=function(e,n){if(!p(e))throw new A("quaternion is required");p(n)||(n=new be);let t=2*(e.w*e.y-e.z*e.x),o=1-2*(e.x*e.x+e.y*e.y),i=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),a=2*(e.w*e.z+e.x*e.y);return n.heading=-Math.atan2(a,r),n.roll=Math.atan2(i,o),n.pitch=-I.asinClamped(t),n};be.fromDegrees=function(e,n,t,o){if(!p(e))throw new A("heading is required");if(!p(n))throw new A("pitch is required");if(!p(t))throw new A("roll is required");return p(o)||(o=new be),o.heading=e*I.RADIANS_PER_DEGREE,o.pitch=n*I.RADIANS_PER_DEGREE,o.roll=t*I.RADIANS_PER_DEGREE,o};be.clone=function(e,n){if(p(e))return p(n)?(n.heading=e.heading,n.pitch=e.pitch,n.roll=e.roll,n):new be(e.heading,e.pitch,e.roll)};be.equals=function(e,n){return e===n||p(e)&&p(n)&&e.heading===n.heading&&e.pitch===n.pitch&&e.roll===n.roll};be.equalsEpsilon=function(e,n,t,o){return e===n||p(e)&&p(n)&&I.equalsEpsilon(e.heading,n.heading,t,o)&&I.equalsEpsilon(e.pitch,n.pitch,t,o)&&I.equalsEpsilon(e.roll,n.roll,t,o)};be.prototype.clone=function(e){return be.clone(this,e)};be.prototype.equals=function(e){return be.equals(this,e)};be.prototype.equalsEpsilon=function(e,n,t){return be.equalsEpsilon(this,e,n,t)};be.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var ct=be;var ho=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function qr(){let e=document.getElementsByTagName("script");for(let n=0,t=e.length;n<t;++n){let o=e[n].getAttribute("src"),i=ho.exec(o);if(i!==null)return i[1]}}var Bn;function mo(e){return typeof document>"u"?e:(p(Bn)||(Bn=document.createElement("a")),Bn.href=e,Bn.href)}var Ve;function yo(){if(p(Ve))return Ve;let e;if(typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:p(import.meta?.url)?e=mn(".",import.meta.url):typeof define=="object"&&p(define.amd)&&!define.amd.toUrlUndefined&&p(Sn.toUrl)?e=mn("..",Ye("Core/buildModuleUrl.js")):e=qr(),!p(e))throw new A("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return Ve=new ke({url:mo(e)}),Ve.appendForwardSlash(),Ve}function Dr(e){return mo(Sn.toUrl(`../${e}`))}function lo(e){return yo().getDerivedResource({url:e}).url}var xn;function Ye(e){return p(xn)||(typeof define=="object"&&p(define.amd)&&!define.amd.toUrlUndefined&&p(Sn.toUrl)?xn=Dr:xn=lo),xn(e)}Ye._cesiumScriptRegex=ho;Ye._buildModuleUrlFromBaseUrl=lo;Ye._clearBaseResource=function(){Ve=void 0};Ye.setBaseUrl=function(e){Ve=ke.DEFAULT.getDerivedResource({url:e})};Ye.getCesiumBaseUrl=yo;var wo=Ye;function Nr(e,n,t){this.x=e,this.y=n,this.s=t}var Wn=Nr;function ft(e){e=O(e,O.EMPTY_OBJECT),this._xysFileUrlTemplate=ke.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=O(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=O(e.sampleZeroJulianEphemerisDate,24423965e-1),this._sampleZeroDateTT=new me(this._sampleZeroJulianEphemerisDate,0,H.TAI),this._stepSizeDays=O(e.stepSizeDays,1),this._samplesPerXysFile=O(e.samplesPerXysFile,1e3),this._totalSamples=O(e.totalSamples,27426),this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let n=this._interpolationOrder,t=this._denominators=new Array(n+1),o=this._xTable=new Array(n+1),i=Math.pow(this._stepSizeDays,n);for(let r=0;r<=n;++r){t[r]=i,o[r]=r*this._stepSizeDays;for(let a=0;a<=n;++a)a!==r&&(t[r]*=r-a);t[r]=1/t[r]}this._work=new Array(n+1),this._coef=new Array(n+1)}var kr=new me(0,0,H.TAI);function st(e,n,t){let o=kr;return o.dayNumber=n,o.secondsOfDay=t,me.daysDifference(o,e._sampleZeroDateTT)}ft.prototype.preload=function(e,n,t,o){let i=st(this,e,n),r=st(this,t,o),a=i/this._stepSizeDays-this._interpolationOrder/2|0;a<0&&(a=0);let u=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;u>=this._totalSamples&&(u=this._totalSamples-1);let d=a/this._samplesPerXysFile|0,m=u/this._samplesPerXysFile|0,l=[];for(let w=d;w<=m;++w)l.push(at(this,w));return Promise.all(l)};ft.prototype.computeXysRadians=function(e,n,t){let o=st(this,e,n);if(o<0)return;let i=o/this._stepSizeDays|0;if(i>=this._totalSamples)return;let r=this._interpolationOrder,a=i-(r/2|0);a<0&&(a=0);let u=a+r;u>=this._totalSamples&&(u=this._totalSamples-1,a=u-r,a<0&&(a=0));let d=!1,m=this._samples;if(p(m[a*3])||(at(this,a/this._samplesPerXysFile|0),d=!0),p(m[u*3])||(at(this,u/this._samplesPerXysFile|0),d=!0),d)return;p(t)?(t.x=0,t.y=0,t.s=0):t=new Wn(0,0,0);let l=o-a*this._stepSizeDays,w=this._work,T=this._denominators,R=this._coef,P=this._xTable,C,q;for(C=0;C<=r;++C)w[C]=l-P[C];for(C=0;C<=r;++C){for(R[C]=1,q=0;q<=r;++q)q!==C&&(R[C]*=w[q]);R[C]*=T[C];let k=(a+C)*3;t.x+=R[C]*m[k++],t.y+=R[C]*m[k++],t.s+=R[C]*m[k]}return t};function at(e,n){if(e._chunkDownloadsInProgress[n])return e._chunkDownloadsInProgress[n];let t,o=e._xysFileUrlTemplate;p(o)?t=o.getDerivedResource({templateValues:{0:n}}):t=new ke({url:wo(`Assets/IAU2006_XYS/IAU2006_XYS_${n}.json`)});let i=t.fetchJson().then(function(r){e._chunkDownloadsInProgress[n]=!1;let a=e._samples,u=r.samples,d=n*e._samplesPerXysFile*3;for(let m=0,l=u.length;m<l;++m)a[d+m]=u[m]});return e._chunkDownloadsInProgress[n]=i,i}var bo=ft;function E(e,n,t,o){this.x=O(e,0),this.y=O(n,0),this.z=O(t,0),this.w=O(o,0)}var gn=new _;E.fromAxisAngle=function(e,n,t){s.typeOf.object("axis",e),s.typeOf.number("angle",n);let o=n/2,i=Math.sin(o);gn=_.normalize(e,gn);let r=gn.x*i,a=gn.y*i,u=gn.z*i,d=Math.cos(o);return p(t)?(t.x=r,t.y=a,t.z=u,t.w=d,t):new E(r,a,u,d)};var Fr=[1,2,0],Lr=new Array(3);E.fromRotationMatrix=function(e,n){s.typeOf.object("matrix",e);let t,o,i,r,a,u=e[$.COLUMN0ROW0],d=e[$.COLUMN1ROW1],m=e[$.COLUMN2ROW2],l=u+d+m;if(l>0)t=Math.sqrt(l+1),a=.5*t,t=.5/t,o=(e[$.COLUMN1ROW2]-e[$.COLUMN2ROW1])*t,i=(e[$.COLUMN2ROW0]-e[$.COLUMN0ROW2])*t,r=(e[$.COLUMN0ROW1]-e[$.COLUMN1ROW0])*t;else{let w=Fr,T=0;d>u&&(T=1),m>u&&m>d&&(T=2);let R=w[T],P=w[R];t=Math.sqrt(e[$.getElementIndex(T,T)]-e[$.getElementIndex(R,R)]-e[$.getElementIndex(P,P)]+1);let C=Lr;C[T]=.5*t,t=.5/t,a=(e[$.getElementIndex(P,R)]-e[$.getElementIndex(R,P)])*t,C[R]=(e[$.getElementIndex(R,T)]+e[$.getElementIndex(T,R)])*t,C[P]=(e[$.getElementIndex(P,T)]+e[$.getElementIndex(T,P)])*t,o=-C[0],i=-C[1],r=-C[2]}return p(n)?(n.x=o,n.y=i,n.z=r,n.w=a,n):new E(o,i,r,a)};var Oo=new E,go=new E,ut=new E,_o=new E;E.fromHeadingPitchRoll=function(e,n){return s.typeOf.object("headingPitchRoll",e),_o=E.fromAxisAngle(_.UNIT_X,e.roll,Oo),ut=E.fromAxisAngle(_.UNIT_Y,-e.pitch,n),n=E.multiply(ut,_o,ut),go=E.fromAxisAngle(_.UNIT_Z,-e.heading,Oo),E.multiply(go,n,n)};var Qn=new _,pt=new _,Te=new E,So=new E,Hn=new E;E.packedLength=4;E.pack=function(e,n,t){return s.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e.x,n[t++]=e.y,n[t++]=e.z,n[t]=e.w,n};E.unpack=function(e,n,t){return s.defined("array",e),n=O(n,0),p(t)||(t=new E),t.x=e[n],t.y=e[n+1],t.z=e[n+2],t.w=e[n+3],t};E.packedInterpolationLength=3;E.convertPackedArrayForInterpolation=function(e,n,t,o){E.unpack(e,t*4,Hn),E.conjugate(Hn,Hn);for(let i=0,r=t-n+1;i<r;i++){let a=i*3;E.unpack(e,(n+i)*4,Te),E.multiply(Te,Hn,Te),Te.w<0&&E.negate(Te,Te),E.computeAxis(Te,Qn);let u=E.computeAngle(Te);p(o)||(o=[]),o[a]=Qn.x*u,o[a+1]=Qn.y*u,o[a+2]=Qn.z*u}};E.unpackInterpolationResult=function(e,n,t,o,i){p(i)||(i=new E),_.fromArray(e,0,pt);let r=_.magnitude(pt);return E.unpack(n,o*4,So),r===0?E.clone(E.IDENTITY,Te):E.fromAxisAngle(pt,r,Te),E.multiply(Te,So,i)};E.clone=function(e,n){if(p(e))return p(n)?(n.x=e.x,n.y=e.y,n.z=e.z,n.w=e.w,n):new E(e.x,e.y,e.z,e.w)};E.conjugate=function(e,n){return s.typeOf.object("quaternion",e),s.typeOf.object("result",n),n.x=-e.x,n.y=-e.y,n.z=-e.z,n.w=e.w,n};E.magnitudeSquared=function(e){return s.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};E.magnitude=function(e){return Math.sqrt(E.magnitudeSquared(e))};E.normalize=function(e,n){s.typeOf.object("result",n);let t=1/E.magnitude(e),o=e.x*t,i=e.y*t,r=e.z*t,a=e.w*t;return n.x=o,n.y=i,n.z=r,n.w=a,n};E.inverse=function(e,n){s.typeOf.object("result",n);let t=E.magnitudeSquared(e);return n=E.conjugate(e,n),E.multiplyByScalar(n,1/t,n)};E.add=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x+n.x,t.y=e.y+n.y,t.z=e.z+n.z,t.w=e.w+n.w,t};E.subtract=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x-n.x,t.y=e.y-n.y,t.z=e.z-n.z,t.w=e.w-n.w,t};E.negate=function(e,n){return s.typeOf.object("quaternion",e),s.typeOf.object("result",n),n.x=-e.x,n.y=-e.y,n.z=-e.z,n.w=-e.w,n};E.dot=function(e,n){return s.typeOf.object("left",e),s.typeOf.object("right",n),e.x*n.x+e.y*n.y+e.z*n.z+e.w*n.w};E.multiply=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);let o=e.x,i=e.y,r=e.z,a=e.w,u=n.x,d=n.y,m=n.z,l=n.w,w=a*u+o*l+i*m-r*d,T=a*d-o*m+i*l+r*u,R=a*m+o*d-i*u+r*l,P=a*l-o*u-i*d-r*m;return t.x=w,t.y=T,t.z=R,t.w=P,t};E.multiplyByScalar=function(e,n,t){return s.typeOf.object("quaternion",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t.w=e.w*n,t};E.divideByScalar=function(e,n,t){return s.typeOf.object("quaternion",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,t};E.computeAxis=function(e,n){s.typeOf.object("quaternion",e),s.typeOf.object("result",n);let t=e.w;if(Math.abs(t-1)<I.EPSILON6||Math.abs(t+1)<I.EPSILON6)return n.x=1,n.y=n.z=0,n;let o=1/Math.sqrt(1-t*t);return n.x=e.x*o,n.y=e.y*o,n.z=e.z*o,n};E.computeAngle=function(e){return s.typeOf.object("quaternion",e),Math.abs(e.w-1)<I.EPSILON6?0:2*Math.acos(e.w)};var ht=new E;E.lerp=function(e,n,t,o){return s.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o),ht=E.multiplyByScalar(n,t,ht),o=E.multiplyByScalar(e,1-t,o),E.add(ht,o,o)};var Eo=new E,dt=new E,mt=new E;E.slerp=function(e,n,t,o){s.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o);let i=E.dot(e,n),r=n;if(i<0&&(i=-i,r=Eo=E.negate(n,Eo)),1-i<I.EPSILON6)return E.lerp(e,r,t,o);let a=Math.acos(i);return dt=E.multiplyByScalar(e,Math.sin((1-t)*a),dt),mt=E.multiplyByScalar(r,Math.sin(t*a),mt),o=E.add(dt,mt,o),E.multiplyByScalar(o,1/Math.sin(a),o)};E.log=function(e,n){s.typeOf.object("quaternion",e),s.typeOf.object("result",n);let t=I.acosClamped(e.w),o=0;return t!==0&&(o=t/Math.sin(t)),_.multiplyByScalar(e,o,n)};E.exp=function(e,n){s.typeOf.object("cartesian",e),s.typeOf.object("result",n);let t=_.magnitude(e),o=0;return t!==0&&(o=Math.sin(t)/t),n.x=e.x*o,n.y=e.y*o,n.z=e.z*o,n.w=Math.cos(t),n};var Br=new _,xr=new _,_n=new E,sn=new E;E.computeInnerQuadrangle=function(e,n,t,o){s.typeOf.object("q0",e),s.typeOf.object("q1",n),s.typeOf.object("q2",t),s.typeOf.object("result",o);let i=E.conjugate(n,_n);E.multiply(i,t,sn);let r=E.log(sn,Br);E.multiply(i,e,sn);let a=E.log(sn,xr);return _.add(r,a,r),_.multiplyByScalar(r,.25,r),_.negate(r,r),E.exp(r,_n),E.multiply(n,_n,o)};E.squad=function(e,n,t,o,i,r){s.typeOf.object("q0",e),s.typeOf.object("q1",n),s.typeOf.object("s0",t),s.typeOf.object("s1",o),s.typeOf.number("t",i),s.typeOf.object("result",r);let a=E.slerp(e,n,i,_n),u=E.slerp(t,o,i,sn);return E.slerp(a,u,2*i*(1-i),r)};var Wr=new E,To=1.9011074535173003,$n=un.supportsTypedArrays()?new Float32Array(8):[],Vn=un.supportsTypedArrays()?new Float32Array(8):[],Ue=un.supportsTypedArrays()?new Float32Array(8):[],ze=un.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let n=e+1,t=2*n+1;$n[e]=1/(n*t),Vn[e]=n/t}$n[7]=To/(8*17);Vn[7]=To*8/17;E.fastSlerp=function(e,n,t,o){s.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o);let i=E.dot(e,n),r;i>=0?r=1:(r=-1,i=-i);let a=i-1,u=1-t,d=t*t,m=u*u;for(let R=7;R>=0;--R)Ue[R]=($n[R]*d-Vn[R])*a,ze[R]=($n[R]*m-Vn[R])*a;let l=r*t*(1+Ue[0]*(1+Ue[1]*(1+Ue[2]*(1+Ue[3]*(1+Ue[4]*(1+Ue[5]*(1+Ue[6]*(1+Ue[7])))))))),w=u*(1+ze[0]*(1+ze[1]*(1+ze[2]*(1+ze[3]*(1+ze[4]*(1+ze[5]*(1+ze[6]*(1+ze[7])))))))),T=E.multiplyByScalar(e,w,Wr);return E.multiplyByScalar(n,l,o),E.add(T,o,o)};E.fastSquad=function(e,n,t,o,i,r){s.typeOf.object("q0",e),s.typeOf.object("q1",n),s.typeOf.object("s0",t),s.typeOf.object("s1",o),s.typeOf.number("t",i),s.typeOf.object("result",r);let a=E.fastSlerp(e,n,i,_n),u=E.fastSlerp(t,o,i,sn);return E.fastSlerp(a,u,2*i*(1-i),r)};E.equals=function(e,n){return e===n||p(e)&&p(n)&&e.x===n.x&&e.y===n.y&&e.z===n.z&&e.w===n.w};E.equalsEpsilon=function(e,n,t){return t=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e.x-n.x)<=t&&Math.abs(e.y-n.y)<=t&&Math.abs(e.z-n.z)<=t&&Math.abs(e.w-n.w)<=t};E.ZERO=Object.freeze(new E(0,0,0,0));E.IDENTITY=Object.freeze(new E(0,0,0,1));E.prototype.clone=function(e){return E.clone(this,e)};E.prototype.equals=function(e){return E.equals(this,e)};E.prototype.equalsEpsilon=function(e,n){return E.equalsEpsilon(this,e,n)};E.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Xe=E;var X={},yt={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},an={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},lt={},ge={east:new _,north:new _,up:new _,west:new _,south:new _,down:new _},Fe=new _,Le=new _,Be=new _;X.localFrameToFixedFrameGenerator=function(e,n){if(!yt.hasOwnProperty(e)||!yt[e].hasOwnProperty(n))throw new A("firstAxis and secondAxis must be east, north, up, west, south or down.");let t=yt[e][n],o,i=e+n;return p(lt[i])?o=lt[i]:(o=function(r,a,u){if(!p(r))throw new A("origin is required.");if(isNaN(r.x)||isNaN(r.y)||isNaN(r.z))throw new A("origin has a NaN component");if(p(u)||(u=new G),_.equalsEpsilon(r,_.ZERO,I.EPSILON14))_.unpack(an[e],0,Fe),_.unpack(an[n],0,Le),_.unpack(an[t],0,Be);else if(I.equalsEpsilon(r.x,0,I.EPSILON14)&&I.equalsEpsilon(r.y,0,I.EPSILON14)){let d=I.sign(r.z);_.unpack(an[e],0,Fe),e!=="east"&&e!=="west"&&_.multiplyByScalar(Fe,d,Fe),_.unpack(an[n],0,Le),n!=="east"&&n!=="west"&&_.multiplyByScalar(Le,d,Le),_.unpack(an[t],0,Be),t!=="east"&&t!=="west"&&_.multiplyByScalar(Be,d,Be)}else{a=O(a,Ie.WGS84),a.geodeticSurfaceNormal(r,ge.up);let d=ge.up,m=ge.east;m.x=-r.y,m.y=r.x,m.z=0,_.normalize(m,ge.east),_.cross(d,m,ge.north),_.multiplyByScalar(ge.up,-1,ge.down),_.multiplyByScalar(ge.east,-1,ge.west),_.multiplyByScalar(ge.north,-1,ge.south),Fe=ge[e],Le=ge[n],Be=ge[t]}return u[0]=Fe.x,u[1]=Fe.y,u[2]=Fe.z,u[3]=0,u[4]=Le.x,u[5]=Le.y,u[6]=Le.z,u[7]=0,u[8]=Be.x,u[9]=Be.y,u[10]=Be.z,u[11]=0,u[12]=r.x,u[13]=r.y,u[14]=r.z,u[15]=1,u},lt[i]=o),o};X.eastNorthUpToFixedFrame=X.localFrameToFixedFrameGenerator("east","north");X.northEastDownToFixedFrame=X.localFrameToFixedFrameGenerator("north","east");X.northUpEastToFixedFrame=X.localFrameToFixedFrameGenerator("north","up");X.northWestUpToFixedFrame=X.localFrameToFixedFrameGenerator("north","west");var Qr=new Xe,Hr=new _(1,1,1),$r=new G;X.headingPitchRollToFixedFrame=function(e,n,t,o,i){s.typeOf.object("HeadingPitchRoll",n),o=O(o,X.eastNorthUpToFixedFrame);let r=Xe.fromHeadingPitchRoll(n,Qr),a=G.fromTranslationQuaternionRotationScale(_.ZERO,r,Hr,$r);return i=o(e,t,i),G.multiply(i,a,i)};var Vr=new G,Yr=new $;X.headingPitchRollQuaternion=function(e,n,t,o,i){s.typeOf.object("HeadingPitchRoll",n);let r=X.headingPitchRollToFixedFrame(e,n,t,o,Vr),a=G.getMatrix3(r,Yr);return Xe.fromRotationMatrix(a,i)};var Xr=new _(1,1,1),Zr=new _,Ro=new G,Jr=new G,Gr=new $,Kr=new Xe;X.fixedFrameToHeadingPitchRoll=function(e,n,t,o){s.defined("transform",e),n=O(n,Ie.WGS84),t=O(t,X.eastNorthUpToFixedFrame),p(o)||(o=new ct);let i=G.getTranslation(e,Zr);if(_.equals(i,_.ZERO))return o.heading=0,o.pitch=0,o.roll=0,o;let r=G.inverseTransformation(t(i,n,Ro),Ro),a=G.setScale(e,Xr,Jr);a=G.setTranslation(a,_.ZERO,a),r=G.multiply(r,a,r);let u=Xe.fromRotationMatrix(G.getMatrix3(r,Gr),Kr);return u=Xe.normalize(u,u),ct.fromQuaternion(u,o)};var ei=6*3600+41*60+50.54841,ni=8640184812866e-6,ti=.093104,oi=-62e-7,ri=11772758384668e-32,ii=72921158553e-15,ci=I.TWO_PI/86400,Yn=new me;X.computeTemeToPseudoFixedMatrix=function(e,n){if(!p(e))throw new A("date is required.");Yn=me.addSeconds(e,-me.computeTaiMinusUtc(e),Yn);let t=Yn.dayNumber,o=Yn.secondsOfDay,i,r=t-2451545;o>=43200?i=(r+.5)/ce.DAYS_PER_JULIAN_CENTURY:i=(r-.5)/ce.DAYS_PER_JULIAN_CENTURY;let u=(ei+i*(ni+i*(ti+i*oi)))*ci%I.TWO_PI,d=ii+ri*(t-24515455e-1),m=(o+ce.SECONDS_PER_DAY*.5)%ce.SECONDS_PER_DAY,l=u+d*m,w=Math.cos(l),T=Math.sin(l);return p(n)?(n[0]=w,n[1]=-T,n[2]=0,n[3]=T,n[4]=w,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new $(w,T,0,-T,w,0,0,0,1)};X.iau2006XysData=new bo;X.earthOrientationParameters=po.NONE;var Ot=32.184,si=2451545;X.preloadIcrfFixed=function(e){let n=e.start.dayNumber,t=e.start.secondsOfDay+Ot,o=e.stop.dayNumber,i=e.stop.secondsOfDay+Ot;return X.iau2006XysData.preload(n,t,o,i)};X.computeIcrfToFixedMatrix=function(e,n){if(!p(e))throw new A("date is required.");p(n)||(n=new $);let t=X.computeFixedToIcrfMatrix(e,n);if(p(t))return $.transpose(t,n)};var ai=new Wn(0,0,0),fi=new hn(0,0,0,0,0,0),wt=new $,bt=new $;X.computeFixedToIcrfMatrix=function(e,n){if(!p(e))throw new A("date is required.");p(n)||(n=new $);let t=X.earthOrientationParameters.compute(e,fi);if(!p(t))return;let o=e.dayNumber,i=e.secondsOfDay+Ot,r=X.iau2006XysData.computeXysRadians(o,i,ai);if(!p(r))return;let a=r.x+t.xPoleOffset,u=r.y+t.yPoleOffset,d=1/(1+Math.sqrt(1-a*a-u*u)),m=wt;m[0]=1-d*a*a,m[3]=-d*a*u,m[6]=a,m[1]=-d*a*u,m[4]=1-d*u*u,m[7]=u,m[2]=-a,m[5]=-u,m[8]=1-d*(a*a+u*u);let l=$.fromRotationZ(-r.s,bt),w=$.multiply(m,l,wt),T=e.dayNumber,R=e.secondsOfDay-me.computeTaiMinusUtc(e)+t.ut1MinusUtc,P=T-2451545,C=R/ce.SECONDS_PER_DAY,q=.779057273264+C+.00273781191135448*(P+C);q=q%1*I.TWO_PI;let k=$.fromRotationZ(q,bt),L=$.multiply(w,k,wt),F=Math.cos(t.xPoleWander),x=Math.cos(t.yPoleWander),W=Math.sin(t.xPoleWander),Q=Math.sin(t.yPoleWander),ee=o-si+i/ce.SECONDS_PER_DAY;ee/=36525;let re=-47e-6*ee*I.RADIANS_PER_DEGREE/3600,Z=Math.cos(re),oe=Math.sin(re),J=bt;return J[0]=F*Z,J[1]=F*oe,J[2]=W,J[3]=-x*oe+Q*W*Z,J[4]=x*Z+Q*W*oe,J[5]=-Q*F,J[6]=-Q*oe-x*W*Z,J[7]=Q*Z-x*W*oe,J[8]=x*F,$.multiply(L,J,n)};var ui=new qe;X.pointToWindowCoordinates=function(e,n,t,o){return o=X.pointToGLWindowCoordinates(e,n,t,o),o.y=2*n[5]-o.y,o};X.pointToGLWindowCoordinates=function(e,n,t,o){if(!p(e))throw new A("modelViewProjectionMatrix is required.");if(!p(n))throw new A("viewportTransformation is required.");if(!p(t))throw new A("point is required.");p(o)||(o=new Oe);let i=ui;return G.multiplyByVector(e,qe.fromElements(t.x,t.y,t.z,1,i),i),qe.multiplyByScalar(i,1/i.w,i),G.multiplyByVector(n,i,i),Oe.fromCartesian4(i,o)};var pi=new _,hi=new _,di=new _;X.rotationMatrixFromPositionVelocity=function(e,n,t,o){if(!p(e))throw new A("position is required.");if(!p(n))throw new A("velocity is required.");let i=O(t,Ie.WGS84).geodeticSurfaceNormal(e,pi),r=_.cross(n,i,hi);_.equalsEpsilon(r,_.ZERO,I.EPSILON6)&&(r=_.clone(_.UNIT_X,r));let a=_.cross(r,n,di);return _.normalize(a,a),_.cross(n,a,r),_.negate(r,r),_.normalize(r,r),p(o)||(o=new $),o[0]=n.x,o[1]=n.y,o[2]=n.z,o[3]=r.x,o[4]=r.y,o[5]=r.z,o[6]=a.x,o[7]=a.y,o[8]=a.z,o};var vo=new G(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Co=new Pe,gt=new _,mi=new _,yi=new $,_t=new G,Ao=new G;X.basisTo2D=function(e,n,t){if(!p(e))throw new A("projection is required.");if(!p(n))throw new A("matrix is required.");if(!p(t))throw new A("result is required.");let o=G.getTranslation(n,mi),i=e.ellipsoid,r;if(_.equals(o,_.ZERO))r=_.clone(_.ZERO,gt);else{let l=i.cartesianToCartographic(o,Co);r=e.project(l,gt),_.fromElements(r.z,r.x,r.y,r)}let a=X.eastNorthUpToFixedFrame(o,i,_t),u=G.inverseTransformation(a,Ao),d=G.getMatrix3(n,yi),m=G.multiplyByMatrix3(u,d,t);return G.multiply(vo,m,t),G.setTranslation(t,r,t),t};X.wgs84To2DModelMatrix=function(e,n,t){if(!p(e))throw new A("projection is required.");if(!p(n))throw new A("center is required.");if(!p(t))throw new A("result is required.");let o=e.ellipsoid,i=X.eastNorthUpToFixedFrame(n,o,_t),r=G.inverseTransformation(i,Ao),a=o.cartesianToCartographic(n,Co),u=e.project(a,gt);_.fromElements(u.z,u.x,u.y,u);let d=G.fromTranslation(u,_t);return G.multiply(vo,r,t),G.multiply(d,t,t),t};var jo=X;function B(e,n,t,o){this.west=O(e,0),this.south=O(n,0),this.east=O(t,0),this.north=O(o,0)}Object.defineProperties(B.prototype,{width:{get:function(){return B.computeWidth(this)}},height:{get:function(){return B.computeHeight(this)}}});B.packedLength=4;B.pack=function(e,n,t){return s.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e.west,n[t++]=e.south,n[t++]=e.east,n[t]=e.north,n};B.unpack=function(e,n,t){return s.defined("array",e),n=O(n,0),p(t)||(t=new B),t.west=e[n++],t.south=e[n++],t.east=e[n++],t.north=e[n],t};B.computeWidth=function(e){s.typeOf.object("rectangle",e);let n=e.east,t=e.west;return n<t&&(n+=I.TWO_PI),n-t};B.computeHeight=function(e){return s.typeOf.object("rectangle",e),e.north-e.south};B.fromDegrees=function(e,n,t,o,i){return e=I.toRadians(O(e,0)),n=I.toRadians(O(n,0)),t=I.toRadians(O(t,0)),o=I.toRadians(O(o,0)),p(i)?(i.west=e,i.south=n,i.east=t,i.north=o,i):new B(e,n,t,o)};B.fromRadians=function(e,n,t,o,i){return p(i)?(i.west=O(e,0),i.south=O(n,0),i.east=O(t,0),i.north=O(o,0),i):new B(e,n,t,o)};B.fromCartographicArray=function(e,n){s.defined("cartographics",e);let t=Number.MAX_VALUE,o=-Number.MAX_VALUE,i=Number.MAX_VALUE,r=-Number.MAX_VALUE,a=Number.MAX_VALUE,u=-Number.MAX_VALUE;for(let d=0,m=e.length;d<m;d++){let l=e[d];t=Math.min(t,l.longitude),o=Math.max(o,l.longitude),a=Math.min(a,l.latitude),u=Math.max(u,l.latitude);let w=l.longitude>=0?l.longitude:l.longitude+I.TWO_PI;i=Math.min(i,w),r=Math.max(r,w)}return o-t>r-i&&(t=i,o=r,o>I.PI&&(o=o-I.TWO_PI),t>I.PI&&(t=t-I.TWO_PI)),p(n)?(n.west=t,n.south=a,n.east=o,n.north=u,n):new B(t,a,o,u)};B.fromCartesianArray=function(e,n,t){s.defined("cartesians",e),n=O(n,Ie.WGS84);let o=Number.MAX_VALUE,i=-Number.MAX_VALUE,r=Number.MAX_VALUE,a=-Number.MAX_VALUE,u=Number.MAX_VALUE,d=-Number.MAX_VALUE;for(let m=0,l=e.length;m<l;m++){let w=n.cartesianToCartographic(e[m]);o=Math.min(o,w.longitude),i=Math.max(i,w.longitude),u=Math.min(u,w.latitude),d=Math.max(d,w.latitude);let T=w.longitude>=0?w.longitude:w.longitude+I.TWO_PI;r=Math.min(r,T),a=Math.max(a,T)}return i-o>a-r&&(o=r,i=a,i>I.PI&&(i=i-I.TWO_PI),o>I.PI&&(o=o-I.TWO_PI)),p(t)?(t.west=o,t.south=u,t.east=i,t.north=d,t):new B(o,u,i,d)};var li=new _,wi=new _,bi=new _,Oi=new _,gi=new _,St=new Array(5);for(let e=0;e<St.length;++e)St[e]=new _;B.fromBoundingSphere=function(e,n,t){s.typeOf.object("boundingSphere",e);let o=e.center,i=e.radius;if(p(n)||(n=Ie.WGS84),p(t)||(t=new B),_.equals(o,_.ZERO))return B.clone(B.MAX_VALUE,t),t;let r=jo.eastNorthUpToFixedFrame(o,n,li),a=G.multiplyByPointAsVector(r,_.UNIT_X,wi);_.normalize(a,a);let u=G.multiplyByPointAsVector(r,_.UNIT_Y,bi);_.normalize(u,u),_.multiplyByScalar(u,i,u),_.multiplyByScalar(a,i,a);let d=_.negate(u,gi),m=_.negate(a,Oi),l=St,w=l[0];return _.add(o,u,w),w=l[1],_.add(o,m,w),w=l[2],_.add(o,d,w),w=l[3],_.add(o,a,w),l[4]=o,B.fromCartesianArray(l,n,t)};B.clone=function(e,n){if(p(e))return p(n)?(n.west=e.west,n.south=e.south,n.east=e.east,n.north=e.north,n):new B(e.west,e.south,e.east,e.north)};B.equalsEpsilon=function(e,n,t){return t=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e.west-n.west)<=t&&Math.abs(e.south-n.south)<=t&&Math.abs(e.east-n.east)<=t&&Math.abs(e.north-n.north)<=t};B.prototype.clone=function(e){return B.clone(this,e)};B.prototype.equals=function(e){return B.equals(this,e)};B.equals=function(e,n){return e===n||p(e)&&p(n)&&e.west===n.west&&e.south===n.south&&e.east===n.east&&e.north===n.north};B.prototype.equalsEpsilon=function(e,n){return B.equalsEpsilon(this,e,n)};B.validate=function(e){s.typeOf.object("rectangle",e);let n=e.north;s.typeOf.number.greaterThanOrEquals("north",n,-I.PI_OVER_TWO),s.typeOf.number.lessThanOrEquals("north",n,I.PI_OVER_TWO);let t=e.south;s.typeOf.number.greaterThanOrEquals("south",t,-I.PI_OVER_TWO),s.typeOf.number.lessThanOrEquals("south",t,I.PI_OVER_TWO);let o=e.west;s.typeOf.number.greaterThanOrEquals("west",o,-Math.PI),s.typeOf.number.lessThanOrEquals("west",o,Math.PI);let i=e.east;s.typeOf.number.greaterThanOrEquals("east",i,-Math.PI),s.typeOf.number.lessThanOrEquals("east",i,Math.PI)};B.southwest=function(e,n){return s.typeOf.object("rectangle",e),p(n)?(n.longitude=e.west,n.latitude=e.south,n.height=0,n):new Pe(e.west,e.south)};B.northwest=function(e,n){return s.typeOf.object("rectangle",e),p(n)?(n.longitude=e.west,n.latitude=e.north,n.height=0,n):new Pe(e.west,e.north)};B.northeast=function(e,n){return s.typeOf.object("rectangle",e),p(n)?(n.longitude=e.east,n.latitude=e.north,n.height=0,n):new Pe(e.east,e.north)};B.southeast=function(e,n){return s.typeOf.object("rectangle",e),p(n)?(n.longitude=e.east,n.latitude=e.south,n.height=0,n):new Pe(e.east,e.south)};B.center=function(e,n){s.typeOf.object("rectangle",e);let t=e.east,o=e.west;t<o&&(t+=I.TWO_PI);let i=I.negativePiToPi((o+t)*.5),r=(e.south+e.north)*.5;return p(n)?(n.longitude=i,n.latitude=r,n.height=0,n):new Pe(i,r)};B.intersection=function(e,n,t){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",n);let o=e.east,i=e.west,r=n.east,a=n.west;o<i&&r>0?o+=I.TWO_PI:r<a&&o>0&&(r+=I.TWO_PI),o<i&&a<0?a+=I.TWO_PI:r<a&&i<0&&(i+=I.TWO_PI);let u=I.negativePiToPi(Math.max(i,a)),d=I.negativePiToPi(Math.min(o,r));if((e.west<e.east||n.west<n.east)&&d<=u)return;let m=Math.max(e.south,n.south),l=Math.min(e.north,n.north);if(!(m>=l))return p(t)?(t.west=u,t.south=m,t.east=d,t.north=l,t):new B(u,m,d,l)};B.simpleIntersection=function(e,n,t){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",n);let o=Math.max(e.west,n.west),i=Math.max(e.south,n.south),r=Math.min(e.east,n.east),a=Math.min(e.north,n.north);if(!(i>=a||o>=r))return p(t)?(t.west=o,t.south=i,t.east=r,t.north=a,t):new B(o,i,r,a)};B.union=function(e,n,t){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",n),p(t)||(t=new B);let o=e.east,i=e.west,r=n.east,a=n.west;o<i&&r>0?o+=I.TWO_PI:r<a&&o>0&&(r+=I.TWO_PI),o<i&&a<0?a+=I.TWO_PI:r<a&&i<0&&(i+=I.TWO_PI);let u=I.negativePiToPi(Math.min(i,a)),d=I.negativePiToPi(Math.max(o,r));return t.west=u,t.south=Math.min(e.south,n.south),t.east=d,t.north=Math.max(e.north,n.north),t};B.expand=function(e,n,t){return s.typeOf.object("rectangle",e),s.typeOf.object("cartographic",n),p(t)||(t=new B),t.west=Math.min(e.west,n.longitude),t.south=Math.min(e.south,n.latitude),t.east=Math.max(e.east,n.longitude),t.north=Math.max(e.north,n.latitude),t};B.contains=function(e,n){s.typeOf.object("rectangle",e),s.typeOf.object("cartographic",n);let t=n.longitude,o=n.latitude,i=e.west,r=e.east;return r<i&&(r+=I.TWO_PI,t<0&&(t+=I.TWO_PI)),(t>i||I.equalsEpsilon(t,i,I.EPSILON14))&&(t<r||I.equalsEpsilon(t,r,I.EPSILON14))&&o>=e.south&&o<=e.north};var _i=new Pe;B.subsample=function(e,n,t,o){s.typeOf.object("rectangle",e),n=O(n,Ie.WGS84),t=O(t,0),p(o)||(o=[]);let i=0,r=e.north,a=e.south,u=e.east,d=e.west,m=_i;m.height=t,m.longitude=d,m.latitude=r,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.longitude=u,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.latitude=a,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.longitude=d,o[i]=n.cartographicToCartesian(m,o[i]),i++,r<0?m.latitude=r:a>0?m.latitude=a:m.latitude=0;for(let l=1;l<8;++l)m.longitude=-Math.PI+l*I.PI_OVER_TWO,B.contains(e,m)&&(o[i]=n.cartographicToCartesian(m,o[i]),i++);return m.latitude===0&&(m.longitude=d,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.longitude=u,o[i]=n.cartographicToCartesian(m,o[i]),i++),o.length=i,o};B.subsection=function(e,n,t,o,i,r){if(s.typeOf.object("rectangle",e),s.typeOf.number.greaterThanOrEquals("westLerp",n,0),s.typeOf.number.lessThanOrEquals("westLerp",n,1),s.typeOf.number.greaterThanOrEquals("southLerp",t,0),s.typeOf.number.lessThanOrEquals("southLerp",t,1),s.typeOf.number.greaterThanOrEquals("eastLerp",o,0),s.typeOf.number.lessThanOrEquals("eastLerp",o,1),s.typeOf.number.greaterThanOrEquals("northLerp",i,0),s.typeOf.number.lessThanOrEquals("northLerp",i,1),s.typeOf.number.lessThanOrEquals("westLerp",n,o),s.typeOf.number.lessThanOrEquals("southLerp",t,i),p(r)||(r=new B),e.west<=e.east){let u=e.east-e.west;r.west=e.west+n*u,r.east=e.west+o*u}else{let u=I.TWO_PI+e.east-e.west;r.west=I.negativePiToPi(e.west+n*u),r.east=I.negativePiToPi(e.west+o*u)}let a=e.north-e.south;return r.south=e.south+t*a,r.north=e.south+i*a,n===1&&(r.west=e.east),o===1&&(r.east=e.east),t===1&&(r.south=e.north),i===1&&(r.north=e.north),r};B.MAX_VALUE=Object.freeze(new B(-Math.PI,-I.PI_OVER_TWO,Math.PI,I.PI_OVER_TWO));var ff=B;function D(e,n,t,o){this[0]=O(e,0),this[1]=O(t,0),this[2]=O(n,0),this[3]=O(o,0)}D.packedLength=4;D.pack=function(e,n,t){return s.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n[t++]=e[3],n};D.unpack=function(e,n,t){return s.defined("array",e),n=O(n,0),p(t)||(t=new D),t[0]=e[n++],t[1]=e[n++],t[2]=e[n++],t[3]=e[n++],t};D.packArray=function(e,n){s.defined("array",e);let t=e.length,o=t*4;if(!p(n))n=new Array(o);else{if(!Array.isArray(n)&&n.length!==o)throw new A("If result is a typed array, it must have exactly array.length * 4 elements");n.length!==o&&(n.length=o)}for(let i=0;i<t;++i)D.pack(e[i],n,i*4);return n};D.unpackArray=function(e,n){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!==0)throw new A("array length must be a multiple of 4.");let t=e.length;p(n)?n.length=t/4:n=new Array(t/4);for(let o=0;o<t;o+=4){let i=o/4;n[i]=D.unpack(e,o,n[i])}return n};D.clone=function(e,n){if(p(e))return p(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n):new D(e[0],e[2],e[1],e[3])};D.fromArray=D.unpack;D.fromColumnMajorArray=function(e,n){return s.defined("values",e),D.clone(e,n)};D.fromRowMajorArray=function(e,n){return s.defined("values",e),p(n)?(n[0]=e[0],n[1]=e[2],n[2]=e[1],n[3]=e[3],n):new D(e[0],e[1],e[2],e[3])};D.fromScale=function(e,n){return s.typeOf.object("scale",e),p(n)?(n[0]=e.x,n[1]=0,n[2]=0,n[3]=e.y,n):new D(e.x,0,0,e.y)};D.fromUniformScale=function(e,n){return s.typeOf.number("scale",e),p(n)?(n[0]=e,n[1]=0,n[2]=0,n[3]=e,n):new D(e,0,0,e)};D.fromRotation=function(e,n){s.typeOf.number("angle",e);let t=Math.cos(e),o=Math.sin(e);return p(n)?(n[0]=t,n[1]=o,n[2]=-o,n[3]=t,n):new D(t,-o,o,t)};D.toArray=function(e,n){return s.typeOf.object("matrix",e),p(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n):[e[0],e[1],e[2],e[3]]};D.getElementIndex=function(e,n){return s.typeOf.number.greaterThanOrEquals("row",n,0),s.typeOf.number.lessThanOrEquals("row",n,1),s.typeOf.number.greaterThanOrEquals("column",e,0),s.typeOf.number.lessThanOrEquals("column",e,1),e*2+n};D.getColumn=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("result",t);let o=n*2,i=e[o],r=e[o+1];return t.x=i,t.y=r,t};D.setColumn=function(e,n,t,o){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=D.clone(e,o);let i=n*2;return o[i]=t.x,o[i+1]=t.y,o};D.getRow=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("result",t);let o=e[n],i=e[n+2];return t.x=o,t.y=i,t};D.setRow=function(e,n,t,o){return s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=D.clone(e,o),o[n]=t.x,o[n+2]=t.y,o};var Si=new Oe;D.setScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t);let o=D.getScale(e,Si),i=n.x/o.x,r=n.y/o.y;return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*r,t};var Ei=new Oe;D.setUniformScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t);let o=D.getScale(e,Ei),i=n/o.x,r=n/o.y;return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*r,t};var Po=new Oe;D.getScale=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n.x=Oe.magnitude(Oe.fromElements(e[0],e[1],Po)),n.y=Oe.magnitude(Oe.fromElements(e[2],e[3],Po)),n};var Mo=new Oe;D.getMaximumScale=function(e){return D.getScale(e,Mo),Oe.maximumComponent(Mo)};var Ti=new Oe;D.setRotation=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);let o=D.getScale(e,Ti);return t[0]=n[0]*o.x,t[1]=n[1]*o.x,t[2]=n[2]*o.y,t[3]=n[3]*o.y,t};var Ri=new Oe;D.getRotation=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=D.getScale(e,Ri);return n[0]=e[0]/t.x,n[1]=e[1]/t.x,n[2]=e[2]/t.y,n[3]=e[3]/t.y,n};D.multiply=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);let o=e[0]*n[0]+e[2]*n[1],i=e[0]*n[2]+e[2]*n[3],r=e[1]*n[0]+e[3]*n[1],a=e[1]*n[2]+e[3]*n[3];return t[0]=o,t[1]=r,t[2]=i,t[3]=a,t};D.add=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t};D.subtract=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t};D.multiplyByVector=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);let o=e[0]*n.x+e[2]*n.y,i=e[1]*n.x+e[3]*n.y;return t.x=o,t.y=i,t};D.multiplyByScalar=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t};D.multiplyByScale=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t),t[0]=e[0]*n.x,t[1]=e[1]*n.x,t[2]=e[2]*n.y,t[3]=e[3]*n.y,t};D.multiplyByUniformScale=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t};D.negate=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=-e[0],n[1]=-e[1],n[2]=-e[2],n[3]=-e[3],n};D.transpose=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=e[0],o=e[2],i=e[1],r=e[3];return n[0]=t,n[1]=o,n[2]=i,n[3]=r,n};D.abs=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=Math.abs(e[0]),n[1]=Math.abs(e[1]),n[2]=Math.abs(e[2]),n[3]=Math.abs(e[3]),n};D.equals=function(e,n){return e===n||p(e)&&p(n)&&e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]&&e[3]===n[3]};D.equalsArray=function(e,n,t){return e[0]===n[t]&&e[1]===n[t+1]&&e[2]===n[t+2]&&e[3]===n[t+3]};D.equalsEpsilon=function(e,n,t){return t=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e[0]-n[0])<=t&&Math.abs(e[1]-n[1])<=t&&Math.abs(e[2]-n[2])<=t&&Math.abs(e[3]-n[3])<=t};D.IDENTITY=Object.freeze(new D(1,0,0,1));D.ZERO=Object.freeze(new D(0,0,0,0));D.COLUMN0ROW0=0;D.COLUMN0ROW1=1;D.COLUMN1ROW0=2;D.COLUMN1ROW1=3;Object.defineProperties(D.prototype,{length:{get:function(){return D.packedLength}}});D.prototype.clone=function(e){return D.clone(this,e)};D.prototype.equals=function(e){return D.equals(this,e)};D.prototype.equalsEpsilon=function(e,n){return D.equalsEpsilon(this,e,n)};D.prototype.toString=function(){return`(${this[0]}, ${this[2]}) +(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var G=S;function vt(e,n,t){t=O(t,!1);let o={},i=p(e),r=p(n),a,u,d;if(i)for(a in e)e.hasOwnProperty(a)&&(u=e[a],r&&t&&typeof u=="object"&&n.hasOwnProperty(a)?(d=n[a],typeof d=="object"?o[a]=vt(u,d,t):o[a]=u):o[a]=u);if(r)for(a in n)n.hasOwnProperty(a)&&!o.hasOwnProperty(a)&&(d=n[a],o[a]=d);return o}var De=vt;function Wo(e,n,t){s.defined("array",e),s.defined("itemToFind",n),s.defined("comparator",t);let o=0,i=e.length-1,r,a;for(;o<=i;){if(r=~~((o+i)/2),a=t(e[r],n),a<0){o=r+1;continue}if(a>0){i=r-1;continue}return r}return~(i+1)}var xe=Wo;function Ho(e,n,t,o,i){this.xPoleWander=e,this.yPoleWander=n,this.xPoleOffset=t,this.yPoleOffset=o,this.ut1MinusUtc=i}var hn=Ho;function $o(e){if(e===null||isNaN(e))throw new A("year is required and must be a number.");return e%4===0&&e%100!==0||e%400===0}var dn=$o;var Ct=[31,28,31,30,31,30,31,31,30,31,30,31];function Vo(e,n,t,o,i,r,a,u){e=O(e,1),n=O(n,1),t=O(t,1),o=O(o,0),i=O(i,0),r=O(r,0),a=O(a,0),u=O(u,!1),C(),q(),this.year=e,this.month=n,this.day=t,this.hour=o,this.minute=i,this.second=r,this.millisecond=a,this.isLeapSecond=u;function C(){s.typeOf.number.greaterThanOrEquals("Year",e,1),s.typeOf.number.lessThanOrEquals("Year",e,9999),s.typeOf.number.greaterThanOrEquals("Month",n,1),s.typeOf.number.lessThanOrEquals("Month",n,12),s.typeOf.number.greaterThanOrEquals("Day",t,1),s.typeOf.number.lessThanOrEquals("Day",t,31),s.typeOf.number.greaterThanOrEquals("Hour",o,0),s.typeOf.number.lessThanOrEquals("Hour",o,23),s.typeOf.number.greaterThanOrEquals("Minute",i,0),s.typeOf.number.lessThanOrEquals("Minute",i,59),s.typeOf.bool("IsLeapSecond",u),s.typeOf.number.greaterThanOrEquals("Second",r,0),s.typeOf.number.lessThanOrEquals("Second",r,u?60:59),s.typeOf.number.greaterThanOrEquals("Millisecond",a,0),s.typeOf.number.lessThan("Millisecond",a,1e3)}function q(){let k=n===2&&dn(e)?Ct[n-1]+1:Ct[n-1];if(t>k)throw new A("Month and Day represents invalid date")}}var Rn=Vo;function Yo(e,n){this.julianDate=e,this.offset=n}var te=Yo;var Xo={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1},ce=Object.freeze(Xo);var Zo={UTC:0,TAI:1},H=Object.freeze(Zo);var jt=new Rn,vn=[31,28,31,30,31,30,31,31,30,31,30,31],Cn=29;function Jn(e,n){return U.compare(e.julianDate,n.julianDate)}var Ke=new te;function jn(e){Ke.julianDate=e;let n=U.leapSeconds,t=xe(n,Ke,Jn);t<0&&(t=~t),t>=n.length&&(t=n.length-1);let o=n[t].offset;t>0&&U.secondsDifference(n[t].julianDate,e)>o&&(t--,o=n[t].offset),U.addSeconds(e,o,e)}function At(e,n){Ke.julianDate=e;let t=U.leapSeconds,o=xe(t,Ke,Jn);if(o<0&&(o=~o),o===0)return U.addSeconds(e,-t[0].offset,n);if(o>=t.length)return U.addSeconds(e,-t[o-1].offset,n);let i=U.secondsDifference(t[o].julianDate,e);if(i===0)return U.addSeconds(e,-t[o].offset,n);if(!(i<=1))return U.addSeconds(e,-t[--o].offset,n)}function Ne(e,n,t){let o=n/ce.SECONDS_PER_DAY|0;return e+=o,n-=ce.SECONDS_PER_DAY*o,n<0&&(e--,n+=ce.SECONDS_PER_DAY),t.dayNumber=e,t.secondsOfDay=n,t}function Gn(e,n,t,o,i,r,a){let u=(n-14)/12|0,d=e+4800+u,m=(1461*d/4|0)+(367*(n-2-12*u)/12|0)-(3*((d+100)/100|0)/4|0)+t-32075;o=o-12,o<0&&(o+=24);let l=r+(o*ce.SECONDS_PER_HOUR+i*ce.SECONDS_PER_MINUTE+a*ce.SECONDS_PER_MILLISECOND);return l>=43200&&(m-=1),[m,l]}var Jo=/^(\d{4})$/,Go=/^(\d{4})-(\d{2})$/,Ko=/^(\d{4})-?(\d{3})$/,er=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,nr=/^(\d{4})-?(\d{2})-?(\d{2})$/,Kn=/([Z+\-])?(\d{2})?:?(\d{2})?$/,tr=/^(\d{2})(\.\d+)?/.source+Kn.source,or=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Kn.source,rr=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Kn.source,Ee="Invalid ISO 8601 date.";function U(e,n,t){this.dayNumber=void 0,this.secondsOfDay=void 0,e=O(e,0),n=O(n,0),t=O(t,H.UTC);let o=e|0;n=n+(e-o)*ce.SECONDS_PER_DAY,Ne(o,n,this),t===H.UTC&&jn(this)}U.fromGregorianDate=function(e,n){if(!(e instanceof Rn))throw new A("date must be a valid GregorianDate.");let t=Gn(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return p(n)?(Ne(t[0],t[1],n),jn(n),n):new U(t[0],t[1],H.UTC)};U.fromDate=function(e,n){if(!(e instanceof Date)||isNaN(e.getTime()))throw new A("date must be a valid JavaScript Date.");let t=Gn(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return p(n)?(Ne(t[0],t[1],n),jn(n),n):new U(t[0],t[1],H.UTC)};U.fromIso8601=function(e,n){if(typeof e!="string")throw new A(Ee);e=e.replace(",",".");let t=e.split("T"),o,i=1,r=1,a=0,u=0,d=0,m=0,l=t[0],w=t[1],T,R;if(!p(l))throw new A(Ee);let P;if(t=l.match(nr),t!==null){if(P=l.split("-").length-1,P>0&&P!==2)throw new A(Ee);o=+t[1],i=+t[2],r=+t[3]}else if(t=l.match(Go),t!==null)o=+t[1],i=+t[2];else if(t=l.match(Jo),t!==null)o=+t[1];else{let L;if(t=l.match(Ko),t!==null){if(o=+t[1],L=+t[2],R=dn(o),L<1||R&&L>366||!R&&L>365)throw new A(Ee)}else if(t=l.match(er),t!==null){o=+t[1];let F=+t[2],x=+t[3]||0;if(P=l.split("-").length-1,P>0&&(!p(t[3])&&P!==1||p(t[3])&&P!==2))throw new A(Ee);let Q=new Date(Date.UTC(o,0,4));L=F*7+x-Q.getUTCDay()-3}else throw new A(Ee);T=new Date(Date.UTC(o,0,1)),T.setUTCDate(L),i=T.getUTCMonth()+1,r=T.getUTCDate()}if(R=dn(o),i<1||i>12||r<1||(i!==2||!R)&&r>vn[i-1]||R&&i===2&&r>Cn)throw new A(Ee);let C;if(p(w)){if(t=w.match(rr),t!==null){if(P=w.split(":").length-1,P>0&&P!==2&&P!==3)throw new A(Ee);a=+t[1],u=+t[2],d=+t[3],m=+(t[4]||0)*1e3,C=5}else if(t=w.match(or),t!==null){if(P=w.split(":").length-1,P>2)throw new A(Ee);a=+t[1],u=+t[2],d=+(t[3]||0)*60,C=4}else if(t=w.match(tr),t!==null)a=+t[1],u=+(t[2]||0)*60,C=3;else throw new A(Ee);if(u>=60||d>=61||a>24||a===24&&(u>0||d>0||m>0))throw new A(Ee);let L=t[C],F=+t[C+1],x=+(t[C+2]||0);switch(L){case"+":a=a-F,u=u-x;break;case"-":a=a+F,u=u+x;break;case"Z":break;default:u=u+new Date(Date.UTC(o,i-1,r,a,u)).getTimezoneOffset();break}}let q=d===60;for(q&&d--;u>=60;)u-=60,a++;for(;a>=24;)a-=24,r++;for(T=R&&i===2?Cn:vn[i-1];r>T;)r-=T,i++,i>12&&(i-=12,o++),T=R&&i===2?Cn:vn[i-1];for(;u<0;)u+=60,a--;for(;a<0;)a+=24,r--;for(;r<1;)i--,i<1&&(i+=12,o--),T=R&&i===2?Cn:vn[i-1],r+=T;let k=Gn(o,i,r,a,u,d,m);return p(n)?(Ne(k[0],k[1],n),jn(n)):n=new U(k[0],k[1],H.UTC),q&&U.addSeconds(n,1,n),n};U.now=function(e){return U.fromDate(new Date,e)};var An=new U(0,0,H.TAI);U.toGregorianDate=function(e,n){if(!p(e))throw new A("julianDate is required.");let t=!1,o=At(e,An);p(o)||(U.addSeconds(e,-1,An),o=At(An,An),t=!0);let i=o.dayNumber,r=o.secondsOfDay;r>=43200&&(i+=1);let a=i+68569|0,u=4*a/146097|0;a=a-((146097*u+3)/4|0)|0;let d=4e3*(a+1)/1461001|0;a=a-(1461*d/4|0)+31|0;let m=80*a/2447|0,l=a-(2447*m/80|0)|0;a=m/11|0;let w=m+2-12*a|0,T=100*(u-49)+d+a|0,R=r/ce.SECONDS_PER_HOUR|0,P=r-R*ce.SECONDS_PER_HOUR,C=P/ce.SECONDS_PER_MINUTE|0;P=P-C*ce.SECONDS_PER_MINUTE;let q=P|0,k=(P-q)/ce.SECONDS_PER_MILLISECOND;return R+=12,R>23&&(R-=24),t&&(q+=1),p(n)?(n.year=T,n.month=w,n.day=l,n.hour=R,n.minute=C,n.second=q,n.millisecond=k,n.isLeapSecond=t,n):new Rn(T,w,l,R,C,q,k,t)};U.toDate=function(e){if(!p(e))throw new A("julianDate is required.");let n=U.toGregorianDate(e,jt),t=n.second;return n.isLeapSecond&&(t-=1),new Date(Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,t,n.millisecond))};U.toIso8601=function(e,n){if(!p(e))throw new A("julianDate is required.");let t=U.toGregorianDate(e,jt),o=t.year,i=t.month,r=t.day,a=t.hour,u=t.minute,d=t.second,m=t.millisecond;o===1e4&&i===1&&r===1&&a===0&&u===0&&d===0&&m===0&&(o=9999,i=12,r=31,a=24);let l;return!p(n)&&m!==0?(l=(m*.01).toString().replace(".",""),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}.${l}Z`):!p(n)||n===0?`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}Z`:(l=(m*.01).toFixed(n).replace(".","").slice(0,n),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}.${l}Z`)};U.clone=function(e,n){if(p(e))return p(n)?(n.dayNumber=e.dayNumber,n.secondsOfDay=e.secondsOfDay,n):new U(e.dayNumber,e.secondsOfDay,H.TAI)};U.compare=function(e,n){if(!p(e))throw new A("left is required.");if(!p(n))throw new A("right is required.");let t=e.dayNumber-n.dayNumber;return t!==0?t:e.secondsOfDay-n.secondsOfDay};U.equals=function(e,n){return e===n||p(e)&&p(n)&&e.dayNumber===n.dayNumber&&e.secondsOfDay===n.secondsOfDay};U.equalsEpsilon=function(e,n,t){return t=O(t,0),e===n||p(e)&&p(n)&&Math.abs(U.secondsDifference(e,n))<=t};U.totalDays=function(e){if(!p(e))throw new A("julianDate is required.");return e.dayNumber+e.secondsOfDay/ce.SECONDS_PER_DAY};U.secondsDifference=function(e,n){if(!p(e))throw new A("left is required.");if(!p(n))throw new A("right is required.");return(e.dayNumber-n.dayNumber)*ce.SECONDS_PER_DAY+(e.secondsOfDay-n.secondsOfDay)};U.daysDifference=function(e,n){if(!p(e))throw new A("left is required.");if(!p(n))throw new A("right is required.");let t=e.dayNumber-n.dayNumber,o=(e.secondsOfDay-n.secondsOfDay)/ce.SECONDS_PER_DAY;return t+o};U.computeTaiMinusUtc=function(e){Ke.julianDate=e;let n=U.leapSeconds,t=xe(n,Ke,Jn);return t<0&&(t=~t,--t,t<0&&(t=0)),n[t].offset};U.addSeconds=function(e,n,t){if(!p(e))throw new A("julianDate is required.");if(!p(n))throw new A("seconds is required.");if(!p(t))throw new A("result is required.");return Ne(e.dayNumber,e.secondsOfDay+n,t)};U.addMinutes=function(e,n,t){if(!p(e))throw new A("julianDate is required.");if(!p(n))throw new A("minutes is required.");if(!p(t))throw new A("result is required.");let o=e.secondsOfDay+n*ce.SECONDS_PER_MINUTE;return Ne(e.dayNumber,o,t)};U.addHours=function(e,n,t){if(!p(e))throw new A("julianDate is required.");if(!p(n))throw new A("hours is required.");if(!p(t))throw new A("result is required.");let o=e.secondsOfDay+n*ce.SECONDS_PER_HOUR;return Ne(e.dayNumber,o,t)};U.addDays=function(e,n,t){if(!p(e))throw new A("julianDate is required.");if(!p(n))throw new A("days is required.");if(!p(t))throw new A("result is required.");let o=e.dayNumber+n;return Ne(o,e.secondsOfDay,t)};U.lessThan=function(e,n){return U.compare(e,n)<0};U.lessThanOrEquals=function(e,n){return U.compare(e,n)<=0};U.greaterThan=function(e,n){return U.compare(e,n)>0};U.greaterThanOrEquals=function(e,n){return U.compare(e,n)>=0};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,n){return U.equalsEpsilon(this,e,n)};U.prototype.toString=function(){return U.toIso8601(this)};U.leapSeconds=[new te(new U(2441317,43210,H.TAI),10),new te(new U(2441499,43211,H.TAI),11),new te(new U(2441683,43212,H.TAI),12),new te(new U(2442048,43213,H.TAI),13),new te(new U(2442413,43214,H.TAI),14),new te(new U(2442778,43215,H.TAI),15),new te(new U(2443144,43216,H.TAI),16),new te(new U(2443509,43217,H.TAI),17),new te(new U(2443874,43218,H.TAI),18),new te(new U(2444239,43219,H.TAI),19),new te(new U(2444786,43220,H.TAI),20),new te(new U(2445151,43221,H.TAI),21),new te(new U(2445516,43222,H.TAI),22),new te(new U(2446247,43223,H.TAI),23),new te(new U(2447161,43224,H.TAI),24),new te(new U(2447892,43225,H.TAI),25),new te(new U(2448257,43226,H.TAI),26),new te(new U(2448804,43227,H.TAI),27),new te(new U(2449169,43228,H.TAI),28),new te(new U(2449534,43229,H.TAI),29),new te(new U(2450083,43230,H.TAI),30),new te(new U(2450630,43231,H.TAI),31),new te(new U(2451179,43232,H.TAI),32),new te(new U(2453736,43233,H.TAI),33),new te(new U(2454832,43234,H.TAI),34),new te(new U(2456109,43235,H.TAI),35),new te(new U(2457204,43236,H.TAI),36),new te(new U(2457754,43237,H.TAI),37)];var me=U;var io=Ze(Qe(),1);function ir(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var Dt=ir;function Nt(e,n){if(e===null||typeof e!="object")return e;n=O(n,!1);let t=new e.constructor;for(let o in e)if(e.hasOwnProperty(o)){let i=e[o];n&&(i=Nt(i,n)),t[o]=i}return t}var tn=Nt;function cr(){let e,n,t=new Promise(function(o,i){e=o,n=i});return{resolve:e,reject:n,promise:t}}var We=cr;var kt=Ze(Qe(),1);function et(e,n){let t;return typeof document<"u"&&(t=document),et._implementation(e,n,t)}et._implementation=function(e,n,t){if(!p(e))throw new A("relative uri is required.");if(!p(n)){if(typeof t>"u")return e;n=O(t.baseURI,t.location.href)}let o=new kt.default(e);return o.scheme()!==""?o.toString():o.absoluteTo(n).toString()};var mn=et;var Ft=Ze(Qe(),1);function sr(e,n){if(!p(e))throw new A("uri is required.");let t="",o=e.lastIndexOf("/");return o!==-1&&(t=e.substring(0,o+1)),n&&(e=new Ft.default(e),e.query().length!==0&&(t+=`?${e.query()}`),e.fragment().length!==0&&(t+=`#${e.fragment()}`)),t}var Lt=sr;var Bt=Ze(Qe(),1);function ar(e){if(!p(e))throw new A("uri is required.");let n=new Bt.default(e);n.normalize();let t=n.path(),o=t.lastIndexOf("/");return o!==-1&&(t=t.substr(o+1)),o=t.lastIndexOf("."),o===-1?t="":t=t.substr(o+1),t}var xt=ar;var Qt={};function fr(e,n,t){p(n)||(n=e.width),p(t)||(t=e.height);let o=Qt[n];p(o)||(o={},Qt[n]=o);let i=o[t];if(!p(i)){let r=document.createElement("canvas");r.width=n,r.height=t,i=r.getContext("2d",{willReadFrequently:!0}),i.globalCompositeOperation="copy",o[t]=i}return i.drawImage(e,0,0,n,t),i.getImageData(0,0,n,t).data}var nt=fr;var ur=/^blob:/i;function pr(e){return s.typeOf.string("uri",e),ur.test(e)}var zn=pr;var ve;function hr(e){p(ve)||(ve=document.createElement("a")),ve.href=window.location.href;let n=ve.host,t=ve.protocol;return ve.href=e,ve.href=ve.href,t!==ve.protocol||n!==ve.host}var Wt=hr;var dr=/^data:/i;function mr(e){return s.typeOf.string("uri",e),dr.test(e)}var In=mr;function yr(e){let n=document.createElement("script");return n.async=!0,n.src=e,new Promise((t,o)=>{window.crossOriginIsolated&&n.setAttribute("crossorigin","anonymous");let i=document.getElementsByTagName("head")[0];n.onload=function(){n.onload=void 0,i.removeChild(n),t()},n.onerror=function(r){o(r)},i.appendChild(n)})}var Ht=yr;function lr(e){if(!p(e))throw new A("obj is required.");let n="";for(let t in e)if(e.hasOwnProperty(t)){let o=e[t],i=`${encodeURIComponent(t)}=`;if(Array.isArray(o))for(let r=0,a=o.length;r<a;++r)n+=`${i+encodeURIComponent(o[r])}&`;else n+=`${i+encodeURIComponent(o)}&`}return n=n.slice(0,-1),n}var $t=lr;function wr(e){if(!p(e))throw new A("queryString is required.");let n={};if(e==="")return n;let t=e.replace(/\+/g,"%20").split(/[&;]/);for(let o=0,i=t.length;o<i;++o){let r=t[o].split("="),a=decodeURIComponent(r[0]),u=r[1];p(u)?u=decodeURIComponent(u):u="";let d=n[a];typeof d=="string"?n[a]=[d,u]:Array.isArray(d)?d.push(u):n[a]=u}return n}var Vt=wr;var br={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},fe=Object.freeze(br);var Or={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3},Yt=Object.freeze(Or);function qn(e){e=O(e,O.EMPTY_OBJECT);let n=O(e.throttleByServer,!1),t=O(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=O(e.priority,0),this.throttle=t,this.throttleByServer=n,this.type=O(e.type,Yt.OTHER),this.serverKey=e.serverKey,this.state=fe.UNISSUED,this.deferred=void 0,this.cancelled=!1}qn.prototype.cancel=function(){this.cancelled=!0};qn.prototype.clone=function(e){return p(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=fe.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new qn(this)};var Xt=qn;function gr(e){let n={};if(!e)return n;let t=e.split(`\r +`);for(let o=0;o<t.length;++o){let i=t[o],r=i.indexOf(": ");if(r>0){let a=i.substring(0,r),u=i.substring(r+2);n[a]=u}}return n}var Zt=gr;function Jt(e,n,t){this.statusCode=e,this.response=n,this.responseHeaders=t,typeof this.responseHeaders=="string"&&(this.responseHeaders=Zt(this.responseHeaders))}Jt.prototype.toString=function(){let e="Request has failed.";return p(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var yn=Jt;var Dn=Ze(Qe(),1);function ln(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}Object.defineProperties(ln.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}});ln.prototype.addEventListener=function(e,n){s.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(n);let t=this;return function(){t.removeEventListener(e,n)}};ln.prototype.removeEventListener=function(e,n){s.typeOf.func("listener",e);let t=this._listeners,o=this._scopes,i=-1;for(let r=0;r<t.length;r++)if(t[r]===e&&o[r]===n){i=r;break}return i!==-1?(this._insideRaiseEvent?(this._toRemove.push(i),t[i]=void 0,o[i]=void 0):(t.splice(i,1),o.splice(i,1)),!0):!1};function _r(e,n){return n-e}ln.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;let e,n=this._listeners,t=this._scopes,o=n.length;for(e=0;e<o;e++){let r=n[e];p(r)&&n[e].apply(t[e],arguments)}let i=this._toRemove;if(o=i.length,o>0){for(i.sort(_r),e=0;e<o;e++){let r=i[e];n.splice(r,1),t.splice(r,1)}i.length=0}this._insideRaiseEvent=!1};var Gt=ln;function He(e){s.typeOf.object("options",e),s.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(He.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){s.typeOf.number.greaterThanOrEquals("maximumLength",e,0);let n=this._length;if(e<n){let t=this._array;for(let o=e;o<n;++o)t[o]=void 0;this._length=e,t.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}});function tt(e,n,t){let o=e[n];e[n]=e[t],e[t]=o}He.prototype.reserve=function(e){e=O(e,this._length),this._array.length=e};He.prototype.heapify=function(e){e=O(e,0);let n=this._length,t=this._comparator,o=this._array,i=-1,r=!0;for(;r;){let a=2*(e+1),u=a-1;u<n&&t(o[u],o[e])<0?i=u:i=e,a<n&&t(o[a],o[i])<0&&(i=a),i!==e?(tt(o,i,e),e=i):r=!1}};He.prototype.resort=function(){let e=this._length;for(let n=Math.ceil(e/2);n>=0;--n)this.heapify(n)};He.prototype.insert=function(e){s.defined("element",e);let n=this._array,t=this._comparator,o=this._maximumLength,i=this._length++;for(i<n.length?n[i]=e:n.push(e);i!==0;){let a=Math.floor((i-1)/2);if(t(n[i],n[a])<0)tt(n,i,a),i=a;else break}let r;return p(o)&&this._length>o&&(r=n[o],this._length=o),r};He.prototype.pop=function(e){if(e=O(e,0),this._length===0)return;s.typeOf.number.lessThan("index",e,this._length);let n=this._array,t=n[e];return tt(n,e,--this._length),this.heapify(e),n[this._length]=void 0,t};var Kt=He;function Sr(e,n){return e.priority-n.priority}var K={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},on=20,we=new Kt({comparator:Sr});we.maximumLength=on;we.reserve(on);var Ce=[],Me={},Er=typeof document<"u"?new Dn.default(document.location.href):new Dn.default,Nn=new Gt;function se(){}se.maximumRequests=50;se.maximumRequestsPerServer=18;se.requestsByServer={};se.throttleRequests=!0;se.debugShowStatistics=!1;se.requestCompletedEvent=Nn;Object.defineProperties(se,{statistics:{get:function(){return K}},priorityHeapLength:{get:function(){return on},set:function(e){if(e<on)for(;we.length>e;){let n=we.pop();$e(n)}on=e,we.maximumLength=e,we.reserve(e)}}});function eo(e){p(e.priorityFunction)&&(e.priority=e.priorityFunction())}se.serverHasOpenSlots=function(e,n){n=O(n,1);let t=O(se.requestsByServer[e],se.maximumRequestsPerServer);return Me[e]+n<=t};se.heapHasOpenSlots=function(e){return we.length+e<=on};function no(e){return e.state===fe.UNISSUED&&(e.state=fe.ISSUED,e.deferred=We()),e.deferred.promise}function Tr(e){return function(n){if(e.state===fe.CANCELLED)return;let t=e.deferred;--K.numberOfActiveRequests,--Me[e.serverKey],Nn.raiseEvent(),e.state=fe.RECEIVED,e.deferred=void 0,t.resolve(n)}}function Rr(e){return function(n){e.state!==fe.CANCELLED&&(++K.numberOfFailedRequests,--K.numberOfActiveRequests,--Me[e.serverKey],Nn.raiseEvent(n),e.state=fe.FAILED,e.deferred.reject(n))}}function to(e){let n=no(e);return e.state=fe.ACTIVE,Ce.push(e),++K.numberOfActiveRequests,++K.numberOfActiveRequestsEver,++Me[e.serverKey],e.requestFunction().then(Tr(e)).catch(Rr(e)),n}function $e(e){let n=e.state===fe.ACTIVE;if(e.state=fe.CANCELLED,++K.numberOfCancelledRequests,p(e.deferred)){let t=e.deferred;e.deferred=void 0,t.reject()}n&&(--K.numberOfActiveRequests,--Me[e.serverKey],++K.numberOfCancelledActiveRequests),p(e.cancelFunction)&&e.cancelFunction()}se.update=function(){let e,n,t=0,o=Ce.length;for(e=0;e<o;++e){if(n=Ce[e],n.cancelled&&$e(n),n.state!==fe.ACTIVE){++t;continue}t>0&&(Ce[e-t]=n)}Ce.length-=t;let i=we.internalArray,r=we.length;for(e=0;e<r;++e)eo(i[e]);we.resort();let a=Math.max(se.maximumRequests-Ce.length,0),u=0;for(;u<a&&we.length>0;){if(n=we.pop(),n.cancelled){$e(n);continue}if(n.throttleByServer&&!se.serverHasOpenSlots(n.serverKey)){$e(n);continue}to(n),++u}vr()};se.getServerKey=function(e){s.typeOf.string("url",e);let n=new Dn.default(e);n.scheme()===""&&(n=n.absoluteTo(Er),n.normalize());let t=n.authority();/:/.test(t)||(t=`${t}:${n.scheme()==="https"?"443":"80"}`);let o=Me[t];return p(o)||(Me[t]=0),t};se.request=function(e){if(s.typeOf.object("request",e),s.typeOf.string("request.url",e.url),s.typeOf.func("request.requestFunction",e.requestFunction),In(e.url)||zn(e.url))return Nn.raiseEvent(),e.state=fe.RECEIVED,e.requestFunction();if(++K.numberOfAttemptedRequests,p(e.serverKey)||(e.serverKey=se.getServerKey(e.url)),se.throttleRequests&&e.throttleByServer&&!se.serverHasOpenSlots(e.serverKey))return;if(!se.throttleRequests||!e.throttle)return to(e);if(Ce.length>=se.maximumRequests)return;eo(e);let n=we.insert(e);if(p(n)){if(n===e)return;$e(n)}return no(e)};function vr(){se.debugShowStatistics&&(K.numberOfActiveRequests===0&&K.lastNumberOfActiveRequests>0&&(K.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${K.numberOfAttemptedRequests}`),K.numberOfAttemptedRequests=0),K.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${K.numberOfCancelledRequests}`),K.numberOfCancelledRequests=0),K.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${K.numberOfCancelledActiveRequests}`),K.numberOfCancelledActiveRequests=0),K.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${K.numberOfFailedRequests}`),K.numberOfFailedRequests=0)),K.lastNumberOfActiveRequests=K.numberOfActiveRequests)}se.clearForSpecs=function(){for(;we.length>0;){let n=we.pop();$e(n)}let e=Ce.length;for(let n=0;n<e;++n)$e(Ce[n]);Ce.length=0,Me={},K.numberOfAttemptedRequests=0,K.numberOfActiveRequests=0,K.numberOfCancelledRequests=0,K.numberOfCancelledActiveRequests=0,K.numberOfFailedRequests=0,K.numberOfActiveRequestsEver=0,K.lastNumberOfActiveRequests=0};se.numberOfActiveRequestsByServer=function(e){return Me[e]};se.requestHeap=we;var kn=se;var oo=Ze(Qe(),1);var wn={},rn={};wn.add=function(e,n){if(!p(e))throw new A("host is required.");if(!p(n)||n<=0)throw new A("port is required to be greater than 0.");let t=`${e.toLowerCase()}:${n}`;p(rn[t])||(rn[t]=!0)};wn.remove=function(e,n){if(!p(e))throw new A("host is required.");if(!p(n)||n<=0)throw new A("port is required to be greater than 0.");let t=`${e.toLowerCase()}:${n}`;p(rn[t])&&delete rn[t]};function Cr(e){let n=new oo.default(e);n.normalize();let t=n.authority();if(t.length!==0){if(n.authority(t),t.indexOf("@")!==-1&&(t=t.split("@")[1]),t.indexOf(":")===-1){let o=n.scheme();if(o.length===0&&(o=window.location.protocol,o=o.substring(0,o.length-1)),o==="http")t+=":80";else if(o==="https")t+=":443";else return}return t}}wn.contains=function(e){if(!p(e))throw new A("url is required.");let n=Cr(e);return!!(p(n)&&p(rn[n]))};wn.clear=function(){rn={}};var ot=wn;var co=function(){try{let e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}}();function M(e){e=O(e,O.EMPTY_OBJECT),typeof e=="string"&&(e={url:e}),s.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=Ae(e.templateValues,{}),this._queryParameters=Ae(e.queryParameters,{}),this.headers=Ae(e.headers,{}),this.request=O(e.request,new Xt),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=O(e.retryAttempts,0),this._retryCount=0,O(e.parseUrl,!0)?this.parseUrl(e.url,!0,!0):this._url=e.url,this._credits=e.credits}function Ae(e,n){return p(e)?tn(e):n}M.createIfNeeded=function(e){return e instanceof M?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new M({url:e})};var cn;M.supportsImageBitmapOptions=function(){return p(cn)?cn:typeof createImageBitmap!="function"?(cn=Promise.resolve(!1),cn):(cn=M.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(n){let t={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(n,t),createImageBitmap(n)])}).then(function(n){let t=nt(n[0]),o=nt(n[1]);return t[1]!==o[1]}).catch(function(){return!1}),cn)};Object.defineProperties(M,{isBlobSupported:{get:function(){return co}}});Object.defineProperties(M.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){this.parseUrl(e,!1,!1)}},extension:{get:function(){return xt(this._url)}},isDataUri:{get:function(){return In(this._url)}},isBlobUri:{get:function(){return zn(this._url)}},isCrossOriginUrl:{get:function(){return Wt(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}});M.prototype.toString=function(){return this.getUrlComponent(!0,!0)};M.prototype.parseUrl=function(e,n,t,o){let i=new io.default(e),r=Ar(i.query());this._queryParameters=n?Ln(r,this.queryParameters,t):r,i.search(""),i.fragment(""),p(o)&&i.scheme()===""&&(i=i.absoluteTo(mn(o))),this._url=i.toString()};function Ar(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:Vt(e)}function Ln(e,n,t){if(!t)return De(e,n);let o=tn(e,!0);for(let i in n)if(n.hasOwnProperty(i)){let r=o[i],a=n[i];p(r)?(Array.isArray(r)||(r=o[i]=[r]),o[i]=r.concat(a)):o[i]=Array.isArray(a)?a.slice():a}return o}M.prototype.getUrlComponent=function(e,n){if(this.isDataUri)return this._url;let t=this._url;e&&(t=`${t}${jr(this.queryParameters)}`),t=t.replace(/%7B/g,"{").replace(/%7D/g,"}");let o=this._templateValues;return Object.keys(o).length>0&&(t=t.replace(/{(.*?)}/g,function(i,r){let a=o[r];return p(a)?encodeURIComponent(a):i})),n&&p(this.proxy)&&(t=this.proxy.getURL(t)),t};function jr(e){let n=Object.keys(e);return n.length===0?"":n.length===1&&!p(e[n[0]])?`?${n[0]}`:`?${$t(e)}`}M.prototype.setQueryParameters=function(e,n){n?this._queryParameters=Ln(this._queryParameters,e,!1):this._queryParameters=Ln(e,this._queryParameters,!1)};M.prototype.appendQueryParameters=function(e){this._queryParameters=Ln(e,this._queryParameters,!0)};M.prototype.setTemplateValues=function(e,n){n?this._templateValues=De(this._templateValues,e):this._templateValues=De(e,this._templateValues)};M.prototype.getDerivedResource=function(e){let n=this.clone();if(n._retryCount=0,p(e.url)){let t=O(e.preserveQueryParameters,!1);n.parseUrl(e.url,!0,t,this._url)}return p(e.queryParameters)&&(n._queryParameters=De(e.queryParameters,n.queryParameters)),p(e.templateValues)&&(n._templateValues=De(e.templateValues,n.templateValues)),p(e.headers)&&(n.headers=De(e.headers,n.headers)),p(e.proxy)&&(n.proxy=e.proxy),p(e.request)&&(n.request=e.request),p(e.retryCallback)&&(n.retryCallback=e.retryCallback),p(e.retryAttempts)&&(n.retryAttempts=e.retryAttempts),n};M.prototype.retryOnError=function(e){let n=this.retryCallback;if(typeof n!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let t=this;return Promise.resolve(n(this,e)).then(function(o){return++t._retryCount,o})};M.prototype.clone=function(e){return p(e)?(e._url=this._url,e._queryParameters=tn(this._queryParameters),e._templateValues=tn(this._templateValues),e.headers=tn(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new M({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:p(this.credits)?this.credits.slice():void 0})};M.prototype.getBaseUri=function(e){return Lt(this.getUrlComponent(e),e)};M.prototype.appendForwardSlash=function(){this._url=Dt(this._url)};M.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};M.fetchArrayBuffer=function(e){return new M(e).fetchArrayBuffer()};M.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};M.fetchBlob=function(e){return new M(e).fetchBlob()};M.prototype.fetchImage=function(e){e=O(e,O.EMPTY_OBJECT);let n=O(e.preferImageBitmap,!1),t=O(e.preferBlob,!1),o=O(e.flipY,!1),i=O(e.skipColorSpaceConversion,!1);if(it(this.request),!co||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!t)return rt({resource:this,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:n});let r=this.fetchBlob();if(!p(r))return;let a,u,d,m;return M.supportsImageBitmapOptions().then(function(l){return a=l,u=a&&n,r}).then(function(l){if(!p(l))return;if(m=l,u)return M.createImageBitmapFromBlob(l,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:i});let w=window.URL.createObjectURL(l);return d=new M({url:w}),rt({resource:d,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:!1})}).then(function(l){if(p(l))return l.blob=m,u||window.URL.revokeObjectURL(d.url),l}).catch(function(l){return p(d)&&window.URL.revokeObjectURL(d.url),l.blob=m,Promise.reject(l)})};function rt(e){let n=e.resource,t=e.flipY,o=e.skipColorSpaceConversion,i=e.preferImageBitmap,r=n.request;r.url=n.url,r.requestFunction=function(){let u=!1;!n.isDataUri&&!n.isBlobUri&&(u=n.isCrossOriginUrl);let d=We();return M._Implementations.createImage(r,u,d,t,o,i),d.promise};let a=kn.request(r);if(p(a))return a.catch(function(u){return r.state!==fe.FAILED?Promise.reject(u):n.retryOnError(u).then(function(d){return d?(r.state=fe.UNISSUED,r.deferred=void 0,rt({resource:n,flipY:t,skipColorSpaceConversion:o,preferImageBitmap:i})):Promise.reject(u)})})}M.fetchImage=function(e){return new M(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};M.prototype.fetchText=function(){return this.fetch({responseType:"text"})};M.fetchText=function(e){return new M(e).fetchText()};M.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(p(e))return e.then(function(n){if(p(n))return JSON.parse(n)})};M.fetchJson=function(e){return new M(e).fetchJson()};M.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};M.fetchXML=function(e){return new M(e).fetchXML()};M.prototype.fetchJsonp=function(e){e=O(e,"callback"),it(this.request);let n;do n=`loadJsonp${I.nextRandomNumber().toString().substring(2,8)}`;while(p(window[n]));return so(this,e,n)};function so(e,n,t){let o={};o[n]=t,e.setQueryParameters(o);let i=e.request,r=e.url;i.url=r,i.requestFunction=function(){let u=We();return window[t]=function(d){u.resolve(d);try{delete window[t]}catch{window[t]=void 0}},M._Implementations.loadAndExecuteScript(r,t,u),u.promise};let a=kn.request(i);if(p(a))return a.catch(function(u){return i.state!==fe.FAILED?Promise.reject(u):e.retryOnError(u).then(function(d){return d?(i.state=fe.UNISSUED,i.deferred=void 0,so(e,n,t)):Promise.reject(u)})})}M.fetchJsonp=function(e){return new M(e).fetchJsonp(e.callbackParameterName)};M.prototype._makeRequest=function(e){let n=this;it(n.request);let t=n.request,o=n.url;t.url=o,t.requestFunction=function(){let r=e.responseType,a=De(e.headers,n.headers),u=e.overrideMimeType,d=e.method,m=e.data,l=We(),w=M._Implementations.loadWithXhr(o,r,d,m,a,l,u);return p(w)&&p(w.abort)&&(t.cancelFunction=function(){w.abort()}),l.promise};let i=kn.request(t);if(p(i))return i.then(function(r){return t.cancelFunction=void 0,r}).catch(function(r){return t.cancelFunction=void 0,t.state!==fe.FAILED?Promise.reject(r):n.retryOnError(r).then(function(a){return a?(t.state=fe.UNISSUED,t.deferred=void 0,n.fetch(e)):Promise.reject(r)})})};function it(e){if(e.state===fe.ISSUED||e.state===fe.ACTIVE)throw new Se("The Resource is already being fetched.");e.state=fe.UNISSUED,e.deferred=void 0}var Pr=/^data:(.*?)(;base64)?,(.*)$/;function Fn(e,n){let t=decodeURIComponent(n);return e?atob(t):t}function ro(e,n){let t=Fn(e,n),o=new ArrayBuffer(t.length),i=new Uint8Array(o);for(let r=0;r<t.length;r++)i[r]=t.charCodeAt(r);return o}function Mr(e,n){n=O(n,"");let t=e[1],o=!!e[2],i=e[3],r,a;switch(n){case"":case"text":return Fn(o,i);case"arraybuffer":return ro(o,i);case"blob":return r=ro(o,i),new Blob([r],{type:t});case"document":return a=new DOMParser,a.parseFromString(Fn(o,i),t);case"json":return JSON.parse(Fn(o,i));default:throw new A(`Unhandled responseType: ${n}`)}}M.prototype.fetch=function(e){return e=Ae(e,{}),e.method="GET",this._makeRequest(e)};M.fetch=function(e){return new M(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M.prototype.delete=function(e){return e=Ae(e,{}),e.method="DELETE",this._makeRequest(e)};M.delete=function(e){return new M(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};M.prototype.head=function(e){return e=Ae(e,{}),e.method="HEAD",this._makeRequest(e)};M.head=function(e){return new M(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M.prototype.options=function(e){return e=Ae(e,{}),e.method="OPTIONS",this._makeRequest(e)};M.options=function(e){return new M(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M.prototype.post=function(e,n){return s.defined("data",e),n=Ae(n,{}),n.method="POST",n.data=e,this._makeRequest(n)};M.post=function(e){return new M(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M.prototype.put=function(e,n){return s.defined("data",e),n=Ae(n,{}),n.method="PUT",n.data=e,this._makeRequest(n)};M.put=function(e){return new M(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M.prototype.patch=function(e,n){return s.defined("data",e),n=Ae(n,{}),n.method="PATCH",n.data=e,this._makeRequest(n)};M.patch=function(e){return new M(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};M._Implementations={};M._Implementations.loadImageElement=function(e,n,t){let o=new Image;o.onload=function(){o.naturalWidth===0&&o.naturalHeight===0&&o.width===0&&o.height===0&&(o.width=300,o.height=150),t.resolve(o)},o.onerror=function(i){t.reject(i)},n&&(ot.contains(e)?o.crossOrigin="use-credentials":o.crossOrigin=""),o.src=e};M._Implementations.createImage=function(e,n,t,o,i,r){let a=e.url;M.supportsImageBitmapOptions().then(function(u){if(!(u&&r)){M._Implementations.loadImageElement(a,n,t);return}let d="blob",m="GET",l=We(),w=M._Implementations.loadWithXhr(a,d,m,void 0,void 0,l,void 0,void 0,void 0);return p(w)&&p(w.abort)&&(e.cancelFunction=function(){w.abort()}),l.promise.then(function(T){if(!p(T)){t.reject(new Se(`Successfully retrieved ${a} but it contained no content.`));return}return M.createImageBitmapFromBlob(T,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:i})}).then(function(T){t.resolve(T)})}).catch(function(u){t.reject(u)})};M.createImageBitmapFromBlob=function(e,n){return s.defined("options",n),s.typeOf.bool("options.flipY",n.flipY),s.typeOf.bool("options.premultiplyAlpha",n.premultiplyAlpha),s.typeOf.bool("options.skipColorSpaceConversion",n.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:n.flipY?"flipY":"none",premultiplyAlpha:n.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:n.skipColorSpaceConversion?"none":"default"})};function Ur(e,n,t,o,i,r,a){fetch(e,{method:t,headers:i}).then(async u=>{if(!u.ok){let d={};u.headers.forEach((m,l)=>{d[l]=m}),r.reject(new yn(u.status,u,d));return}switch(n){case"text":r.resolve(u.text());break;case"json":r.resolve(u.json());break;default:r.resolve(new Uint8Array(await u.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(new yn)})}var zr=typeof XMLHttpRequest>"u";M._Implementations.loadWithXhr=function(e,n,t,o,i,r,a){let u=Pr.exec(e);if(u!==null){r.resolve(Mr(u,n));return}if(zr){Ur(e,n,t,o,i,r,a);return}let d=new XMLHttpRequest;if(ot.contains(e)&&(d.withCredentials=!0),d.open(t,e,!0),p(a)&&p(d.overrideMimeType)&&d.overrideMimeType(a),p(i))for(let l in i)i.hasOwnProperty(l)&&d.setRequestHeader(l,i[l]);p(n)&&(d.responseType=n);let m=!1;return typeof e=="string"&&(m=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),d.onload=function(){if((d.status<200||d.status>=300)&&!(m&&d.status===0)){r.reject(new yn(d.status,d.response,d.getAllResponseHeaders()));return}let l=d.response,w=d.responseType;if(t==="HEAD"||t==="OPTIONS"){let R=d.getAllResponseHeaders().trim().split(/[\r\n]+/),P={};R.forEach(function(C){let q=C.split(": "),k=q.shift();P[k]=q.join(": ")}),r.resolve(P);return}if(d.status===204)r.resolve(void 0);else if(p(l)&&(!p(n)||w===n))r.resolve(l);else if(n==="json"&&typeof l=="string")try{r.resolve(JSON.parse(l))}catch(T){r.reject(T)}else(w===""||w==="document")&&p(d.responseXML)&&d.responseXML.hasChildNodes()?r.resolve(d.responseXML):(w===""||w==="text")&&p(d.responseText)?r.resolve(d.responseText):r.reject(new Se("Invalid XMLHttpRequest response type."))},d.onerror=function(l){r.reject(new yn)},d.send(o),d};M._Implementations.loadAndExecuteScript=function(e,n,t){return Ht(e,n).catch(function(o){t.reject(o)})};M._DefaultImplementations={};M._DefaultImplementations.createImage=M._Implementations.createImage;M._DefaultImplementations.loadWithXhr=M._Implementations.loadWithXhr;M._DefaultImplementations.loadAndExecuteScript=M._Implementations.loadAndExecuteScript;M.DEFAULT=Object.freeze(new M({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var ke=M;function On(e){e=O(e,O.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._addNewLeapSeconds=O(e.addNewLeapSeconds,!0),p(e.data)?ao(this,e.data):ao(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}On.fromUrl=async function(e,n){s.defined("url",e),n=O(n,O.EMPTY_OBJECT);let t=ke.createIfNeeded(e),o;try{o=await t.fetchJson()}catch{throw new Se(`An error occurred while retrieving the EOP data from the URL ${t.url}.`)}return new On({addNewLeapSeconds:n.addNewLeapSeconds,data:o})};On.NONE=Object.freeze({compute:function(e,n){return p(n)?(n.xPoleWander=0,n.yPoleWander=0,n.xPoleOffset=0,n.yPoleOffset=0,n.ut1MinusUtc=0):n=new hn(0,0,0,0,0),n}});On.prototype.compute=function(e,n){if(!p(this._samples))return;if(p(n)||(n=new hn(0,0,0,0,0)),this._samples.length===0)return n.xPoleWander=0,n.yPoleWander=0,n.xPoleOffset=0,n.yPoleOffset=0,n.ut1MinusUtc=0,n;let t=this._dates,o=this._lastIndex,i=0,r=0;if(p(o)){let u=t[o],d=t[o+1],m=me.lessThanOrEquals(u,e),l=!p(d),w=l||me.greaterThanOrEquals(d,e);if(m&&w)return i=o,!l&&d.equals(e)&&++i,r=i+1,uo(this,t,this._samples,e,i,r,n),n}let a=xe(t,e,me.compare,this._dateColumn);return a>=0?(a<t.length-1&&t[a+1].equals(e)&&++a,i=a,r=a):(r=~a,i=r-1,i<0&&(i=0)),this._lastIndex=i,uo(this,t,this._samples,e,i,r,n),n};function Ir(e,n){return me.compare(e.julianDate,n)}function ao(e,n){if(!p(n.columnNames))throw new Se("Error in loaded EOP data: The columnNames property is required.");if(!p(n.samples))throw new Se("Error in loaded EOP data: The samples property is required.");let t=n.columnNames.indexOf("modifiedJulianDateUtc"),o=n.columnNames.indexOf("xPoleWanderRadians"),i=n.columnNames.indexOf("yPoleWanderRadians"),r=n.columnNames.indexOf("ut1MinusUtcSeconds"),a=n.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=n.columnNames.indexOf("yCelestialPoleOffsetRadians"),d=n.columnNames.indexOf("taiMinusUtcSeconds");if(t<0||o<0||i<0||r<0||a<0||u<0||d<0)throw new Se("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");let m=e._samples=n.samples,l=e._dates=[];e._dateColumn=t,e._xPoleWanderRadiansColumn=o,e._yPoleWanderRadiansColumn=i,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=d,e._columnCount=n.columnNames.length,e._lastIndex=void 0;let w,T=e._addNewLeapSeconds;for(let R=0,P=m.length;R<P;R+=e._columnCount){let C=m[R+t],q=m[R+d],k=C+ce.MODIFIED_JULIAN_DATE_DIFFERENCE,L=new me(k,q,H.TAI);if(l.push(L),T){if(q!==w&&p(w)){let F=me.leapSeconds,x=xe(F,L,Ir);if(x<0){let Q=new te(L,q);F.splice(~x,0,Q)}}w=q}}}function fo(e,n,t,o,i){let r=t*o;i.xPoleWander=n[r+e._xPoleWanderRadiansColumn],i.yPoleWander=n[r+e._yPoleWanderRadiansColumn],i.xPoleOffset=n[r+e._xCelestialPoleOffsetRadiansColumn],i.yPoleOffset=n[r+e._yCelestialPoleOffsetRadiansColumn],i.ut1MinusUtc=n[r+e._ut1MinusUtcSecondsColumn]}function bn(e,n,t){return n+e*(t-n)}function uo(e,n,t,o,i,r,a){let u=e._columnCount;if(r>n.length-1)return a.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;let d=n[i],m=n[r];if(d.equals(m)||o.equals(d))return fo(e,t,i,u,a),a;if(o.equals(m))return fo(e,t,r,u,a),a;let l=me.secondsDifference(o,d)/me.secondsDifference(m,d),w=i*u,T=r*u,R=t[w+e._ut1MinusUtcSecondsColumn],P=t[T+e._ut1MinusUtcSecondsColumn],C=P-R;if(C>.5||C<-.5){let q=t[w+e._taiMinusUtcSecondsColumn],k=t[T+e._taiMinusUtcSecondsColumn];q!==k&&(m.equals(o)?R=P:P-=k-q)}return a.xPoleWander=bn(l,t[w+e._xPoleWanderRadiansColumn],t[T+e._xPoleWanderRadiansColumn]),a.yPoleWander=bn(l,t[w+e._yPoleWanderRadiansColumn],t[T+e._yPoleWanderRadiansColumn]),a.xPoleOffset=bn(l,t[w+e._xCelestialPoleOffsetRadiansColumn],t[T+e._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=bn(l,t[w+e._yCelestialPoleOffsetRadiansColumn],t[T+e._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=bn(l,R,P),a}var po=On;function be(e,n,t){this.heading=O(e,0),this.pitch=O(n,0),this.roll=O(t,0)}be.fromQuaternion=function(e,n){if(!p(e))throw new A("quaternion is required");p(n)||(n=new be);let t=2*(e.w*e.y-e.z*e.x),o=1-2*(e.x*e.x+e.y*e.y),i=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),a=2*(e.w*e.z+e.x*e.y);return n.heading=-Math.atan2(a,r),n.roll=Math.atan2(i,o),n.pitch=-I.asinClamped(t),n};be.fromDegrees=function(e,n,t,o){if(!p(e))throw new A("heading is required");if(!p(n))throw new A("pitch is required");if(!p(t))throw new A("roll is required");return p(o)||(o=new be),o.heading=e*I.RADIANS_PER_DEGREE,o.pitch=n*I.RADIANS_PER_DEGREE,o.roll=t*I.RADIANS_PER_DEGREE,o};be.clone=function(e,n){if(p(e))return p(n)?(n.heading=e.heading,n.pitch=e.pitch,n.roll=e.roll,n):new be(e.heading,e.pitch,e.roll)};be.equals=function(e,n){return e===n||p(e)&&p(n)&&e.heading===n.heading&&e.pitch===n.pitch&&e.roll===n.roll};be.equalsEpsilon=function(e,n,t,o){return e===n||p(e)&&p(n)&&I.equalsEpsilon(e.heading,n.heading,t,o)&&I.equalsEpsilon(e.pitch,n.pitch,t,o)&&I.equalsEpsilon(e.roll,n.roll,t,o)};be.prototype.clone=function(e){return be.clone(this,e)};be.prototype.equals=function(e){return be.equals(this,e)};be.prototype.equalsEpsilon=function(e,n,t){return be.equalsEpsilon(this,e,n,t)};be.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var ct=be;var ho=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function qr(){let e=document.getElementsByTagName("script");for(let n=0,t=e.length;n<t;++n){let o=e[n].getAttribute("src"),i=ho.exec(o);if(i!==null)return i[1]}}var Bn;function mo(e){return typeof document>"u"?e:(p(Bn)||(Bn=document.createElement("a")),Bn.href=e,Bn.href)}var Ve;function yo(){if(p(Ve))return Ve;let e;if(typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:p(import.meta?.url)?e=mn(".",import.meta.url):typeof define=="object"&&p(define.amd)&&!define.amd.toUrlUndefined&&p(Sn.toUrl)?e=mn("..",Ye("Core/buildModuleUrl.js")):e=qr(),!p(e))throw new A("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return Ve=new ke({url:mo(e)}),Ve.appendForwardSlash(),Ve}function Dr(e){return mo(Sn.toUrl(`../${e}`))}function lo(e){return yo().getDerivedResource({url:e}).url}var xn;function Ye(e){return p(xn)||(typeof define=="object"&&p(define.amd)&&!define.amd.toUrlUndefined&&p(Sn.toUrl)?xn=Dr:xn=lo),xn(e)}Ye._cesiumScriptRegex=ho;Ye._buildModuleUrlFromBaseUrl=lo;Ye._clearBaseResource=function(){Ve=void 0};Ye.setBaseUrl=function(e){Ve=ke.DEFAULT.getDerivedResource({url:e})};Ye.getCesiumBaseUrl=yo;var wo=Ye;function Nr(e,n,t){this.x=e,this.y=n,this.s=t}var Qn=Nr;function ft(e){e=O(e,O.EMPTY_OBJECT),this._xysFileUrlTemplate=ke.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=O(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=O(e.sampleZeroJulianEphemerisDate,24423965e-1),this._sampleZeroDateTT=new me(this._sampleZeroJulianEphemerisDate,0,H.TAI),this._stepSizeDays=O(e.stepSizeDays,1),this._samplesPerXysFile=O(e.samplesPerXysFile,1e3),this._totalSamples=O(e.totalSamples,27426),this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let n=this._interpolationOrder,t=this._denominators=new Array(n+1),o=this._xTable=new Array(n+1),i=Math.pow(this._stepSizeDays,n);for(let r=0;r<=n;++r){t[r]=i,o[r]=r*this._stepSizeDays;for(let a=0;a<=n;++a)a!==r&&(t[r]*=r-a);t[r]=1/t[r]}this._work=new Array(n+1),this._coef=new Array(n+1)}var kr=new me(0,0,H.TAI);function st(e,n,t){let o=kr;return o.dayNumber=n,o.secondsOfDay=t,me.daysDifference(o,e._sampleZeroDateTT)}ft.prototype.preload=function(e,n,t,o){let i=st(this,e,n),r=st(this,t,o),a=i/this._stepSizeDays-this._interpolationOrder/2|0;a<0&&(a=0);let u=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;u>=this._totalSamples&&(u=this._totalSamples-1);let d=a/this._samplesPerXysFile|0,m=u/this._samplesPerXysFile|0,l=[];for(let w=d;w<=m;++w)l.push(at(this,w));return Promise.all(l)};ft.prototype.computeXysRadians=function(e,n,t){let o=st(this,e,n);if(o<0)return;let i=o/this._stepSizeDays|0;if(i>=this._totalSamples)return;let r=this._interpolationOrder,a=i-(r/2|0);a<0&&(a=0);let u=a+r;u>=this._totalSamples&&(u=this._totalSamples-1,a=u-r,a<0&&(a=0));let d=!1,m=this._samples;if(p(m[a*3])||(at(this,a/this._samplesPerXysFile|0),d=!0),p(m[u*3])||(at(this,u/this._samplesPerXysFile|0),d=!0),d)return;p(t)?(t.x=0,t.y=0,t.s=0):t=new Qn(0,0,0);let l=o-a*this._stepSizeDays,w=this._work,T=this._denominators,R=this._coef,P=this._xTable,C,q;for(C=0;C<=r;++C)w[C]=l-P[C];for(C=0;C<=r;++C){for(R[C]=1,q=0;q<=r;++q)q!==C&&(R[C]*=w[q]);R[C]*=T[C];let k=(a+C)*3;t.x+=R[C]*m[k++],t.y+=R[C]*m[k++],t.s+=R[C]*m[k]}return t};function at(e,n){if(e._chunkDownloadsInProgress[n])return e._chunkDownloadsInProgress[n];let t,o=e._xysFileUrlTemplate;p(o)?t=o.getDerivedResource({templateValues:{0:n}}):t=new ke({url:wo(`Assets/IAU2006_XYS/IAU2006_XYS_${n}.json`)});let i=t.fetchJson().then(function(r){e._chunkDownloadsInProgress[n]=!1;let a=e._samples,u=r.samples,d=n*e._samplesPerXysFile*3;for(let m=0,l=u.length;m<l;++m)a[d+m]=u[m]});return e._chunkDownloadsInProgress[n]=i,i}var bo=ft;function E(e,n,t,o){this.x=O(e,0),this.y=O(n,0),this.z=O(t,0),this.w=O(o,0)}var gn=new _;E.fromAxisAngle=function(e,n,t){s.typeOf.object("axis",e),s.typeOf.number("angle",n);let o=n/2,i=Math.sin(o);gn=_.normalize(e,gn);let r=gn.x*i,a=gn.y*i,u=gn.z*i,d=Math.cos(o);return p(t)?(t.x=r,t.y=a,t.z=u,t.w=d,t):new E(r,a,u,d)};var Fr=[1,2,0],Lr=new Array(3);E.fromRotationMatrix=function(e,n){s.typeOf.object("matrix",e);let t,o,i,r,a,u=e[$.COLUMN0ROW0],d=e[$.COLUMN1ROW1],m=e[$.COLUMN2ROW2],l=u+d+m;if(l>0)t=Math.sqrt(l+1),a=.5*t,t=.5/t,o=(e[$.COLUMN1ROW2]-e[$.COLUMN2ROW1])*t,i=(e[$.COLUMN2ROW0]-e[$.COLUMN0ROW2])*t,r=(e[$.COLUMN0ROW1]-e[$.COLUMN1ROW0])*t;else{let w=Fr,T=0;d>u&&(T=1),m>u&&m>d&&(T=2);let R=w[T],P=w[R];t=Math.sqrt(e[$.getElementIndex(T,T)]-e[$.getElementIndex(R,R)]-e[$.getElementIndex(P,P)]+1);let C=Lr;C[T]=.5*t,t=.5/t,a=(e[$.getElementIndex(P,R)]-e[$.getElementIndex(R,P)])*t,C[R]=(e[$.getElementIndex(R,T)]+e[$.getElementIndex(T,R)])*t,C[P]=(e[$.getElementIndex(P,T)]+e[$.getElementIndex(T,P)])*t,o=-C[0],i=-C[1],r=-C[2]}return p(n)?(n.x=o,n.y=i,n.z=r,n.w=a,n):new E(o,i,r,a)};var Oo=new E,go=new E,ut=new E,_o=new E;E.fromHeadingPitchRoll=function(e,n){return s.typeOf.object("headingPitchRoll",e),_o=E.fromAxisAngle(_.UNIT_X,e.roll,Oo),ut=E.fromAxisAngle(_.UNIT_Y,-e.pitch,n),n=E.multiply(ut,_o,ut),go=E.fromAxisAngle(_.UNIT_Z,-e.heading,Oo),E.multiply(go,n,n)};var Wn=new _,pt=new _,Te=new E,So=new E,Hn=new E;E.packedLength=4;E.pack=function(e,n,t){return s.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e.x,n[t++]=e.y,n[t++]=e.z,n[t]=e.w,n};E.unpack=function(e,n,t){return s.defined("array",e),n=O(n,0),p(t)||(t=new E),t.x=e[n],t.y=e[n+1],t.z=e[n+2],t.w=e[n+3],t};E.packedInterpolationLength=3;E.convertPackedArrayForInterpolation=function(e,n,t,o){E.unpack(e,t*4,Hn),E.conjugate(Hn,Hn);for(let i=0,r=t-n+1;i<r;i++){let a=i*3;E.unpack(e,(n+i)*4,Te),E.multiply(Te,Hn,Te),Te.w<0&&E.negate(Te,Te),E.computeAxis(Te,Wn);let u=E.computeAngle(Te);p(o)||(o=[]),o[a]=Wn.x*u,o[a+1]=Wn.y*u,o[a+2]=Wn.z*u}};E.unpackInterpolationResult=function(e,n,t,o,i){p(i)||(i=new E),_.fromArray(e,0,pt);let r=_.magnitude(pt);return E.unpack(n,o*4,So),r===0?E.clone(E.IDENTITY,Te):E.fromAxisAngle(pt,r,Te),E.multiply(Te,So,i)};E.clone=function(e,n){if(p(e))return p(n)?(n.x=e.x,n.y=e.y,n.z=e.z,n.w=e.w,n):new E(e.x,e.y,e.z,e.w)};E.conjugate=function(e,n){return s.typeOf.object("quaternion",e),s.typeOf.object("result",n),n.x=-e.x,n.y=-e.y,n.z=-e.z,n.w=e.w,n};E.magnitudeSquared=function(e){return s.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};E.magnitude=function(e){return Math.sqrt(E.magnitudeSquared(e))};E.normalize=function(e,n){s.typeOf.object("result",n);let t=1/E.magnitude(e),o=e.x*t,i=e.y*t,r=e.z*t,a=e.w*t;return n.x=o,n.y=i,n.z=r,n.w=a,n};E.inverse=function(e,n){s.typeOf.object("result",n);let t=E.magnitudeSquared(e);return n=E.conjugate(e,n),E.multiplyByScalar(n,1/t,n)};E.add=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x+n.x,t.y=e.y+n.y,t.z=e.z+n.z,t.w=e.w+n.w,t};E.subtract=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x-n.x,t.y=e.y-n.y,t.z=e.z-n.z,t.w=e.w-n.w,t};E.negate=function(e,n){return s.typeOf.object("quaternion",e),s.typeOf.object("result",n),n.x=-e.x,n.y=-e.y,n.z=-e.z,n.w=-e.w,n};E.dot=function(e,n){return s.typeOf.object("left",e),s.typeOf.object("right",n),e.x*n.x+e.y*n.y+e.z*n.z+e.w*n.w};E.multiply=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);let o=e.x,i=e.y,r=e.z,a=e.w,u=n.x,d=n.y,m=n.z,l=n.w,w=a*u+o*l+i*m-r*d,T=a*d-o*m+i*l+r*u,R=a*m+o*d-i*u+r*l,P=a*l-o*u-i*d-r*m;return t.x=w,t.y=T,t.z=R,t.w=P,t};E.multiplyByScalar=function(e,n,t){return s.typeOf.object("quaternion",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t.w=e.w*n,t};E.divideByScalar=function(e,n,t){return s.typeOf.object("quaternion",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,t};E.computeAxis=function(e,n){s.typeOf.object("quaternion",e),s.typeOf.object("result",n);let t=e.w;if(Math.abs(t-1)<I.EPSILON6||Math.abs(t+1)<I.EPSILON6)return n.x=1,n.y=n.z=0,n;let o=1/Math.sqrt(1-t*t);return n.x=e.x*o,n.y=e.y*o,n.z=e.z*o,n};E.computeAngle=function(e){return s.typeOf.object("quaternion",e),Math.abs(e.w-1)<I.EPSILON6?0:2*Math.acos(e.w)};var ht=new E;E.lerp=function(e,n,t,o){return s.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o),ht=E.multiplyByScalar(n,t,ht),o=E.multiplyByScalar(e,1-t,o),E.add(ht,o,o)};var Eo=new E,dt=new E,mt=new E;E.slerp=function(e,n,t,o){s.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o);let i=E.dot(e,n),r=n;if(i<0&&(i=-i,r=Eo=E.negate(n,Eo)),1-i<I.EPSILON6)return E.lerp(e,r,t,o);let a=Math.acos(i);return dt=E.multiplyByScalar(e,Math.sin((1-t)*a),dt),mt=E.multiplyByScalar(r,Math.sin(t*a),mt),o=E.add(dt,mt,o),E.multiplyByScalar(o,1/Math.sin(a),o)};E.log=function(e,n){s.typeOf.object("quaternion",e),s.typeOf.object("result",n);let t=I.acosClamped(e.w),o=0;return t!==0&&(o=t/Math.sin(t)),_.multiplyByScalar(e,o,n)};E.exp=function(e,n){s.typeOf.object("cartesian",e),s.typeOf.object("result",n);let t=_.magnitude(e),o=0;return t!==0&&(o=Math.sin(t)/t),n.x=e.x*o,n.y=e.y*o,n.z=e.z*o,n.w=Math.cos(t),n};var Br=new _,xr=new _,_n=new E,sn=new E;E.computeInnerQuadrangle=function(e,n,t,o){s.typeOf.object("q0",e),s.typeOf.object("q1",n),s.typeOf.object("q2",t),s.typeOf.object("result",o);let i=E.conjugate(n,_n);E.multiply(i,t,sn);let r=E.log(sn,Br);E.multiply(i,e,sn);let a=E.log(sn,xr);return _.add(r,a,r),_.multiplyByScalar(r,.25,r),_.negate(r,r),E.exp(r,_n),E.multiply(n,_n,o)};E.squad=function(e,n,t,o,i,r){s.typeOf.object("q0",e),s.typeOf.object("q1",n),s.typeOf.object("s0",t),s.typeOf.object("s1",o),s.typeOf.number("t",i),s.typeOf.object("result",r);let a=E.slerp(e,n,i,_n),u=E.slerp(t,o,i,sn);return E.slerp(a,u,2*i*(1-i),r)};var Qr=new E,To=1.9011074535173003,$n=un.supportsTypedArrays()?new Float32Array(8):[],Vn=un.supportsTypedArrays()?new Float32Array(8):[],Ue=un.supportsTypedArrays()?new Float32Array(8):[],ze=un.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let n=e+1,t=2*n+1;$n[e]=1/(n*t),Vn[e]=n/t}$n[7]=To/(8*17);Vn[7]=To*8/17;E.fastSlerp=function(e,n,t,o){s.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o);let i=E.dot(e,n),r;i>=0?r=1:(r=-1,i=-i);let a=i-1,u=1-t,d=t*t,m=u*u;for(let R=7;R>=0;--R)Ue[R]=($n[R]*d-Vn[R])*a,ze[R]=($n[R]*m-Vn[R])*a;let l=r*t*(1+Ue[0]*(1+Ue[1]*(1+Ue[2]*(1+Ue[3]*(1+Ue[4]*(1+Ue[5]*(1+Ue[6]*(1+Ue[7])))))))),w=u*(1+ze[0]*(1+ze[1]*(1+ze[2]*(1+ze[3]*(1+ze[4]*(1+ze[5]*(1+ze[6]*(1+ze[7])))))))),T=E.multiplyByScalar(e,w,Qr);return E.multiplyByScalar(n,l,o),E.add(T,o,o)};E.fastSquad=function(e,n,t,o,i,r){s.typeOf.object("q0",e),s.typeOf.object("q1",n),s.typeOf.object("s0",t),s.typeOf.object("s1",o),s.typeOf.number("t",i),s.typeOf.object("result",r);let a=E.fastSlerp(e,n,i,_n),u=E.fastSlerp(t,o,i,sn);return E.fastSlerp(a,u,2*i*(1-i),r)};E.equals=function(e,n){return e===n||p(e)&&p(n)&&e.x===n.x&&e.y===n.y&&e.z===n.z&&e.w===n.w};E.equalsEpsilon=function(e,n,t){return t=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e.x-n.x)<=t&&Math.abs(e.y-n.y)<=t&&Math.abs(e.z-n.z)<=t&&Math.abs(e.w-n.w)<=t};E.ZERO=Object.freeze(new E(0,0,0,0));E.IDENTITY=Object.freeze(new E(0,0,0,1));E.prototype.clone=function(e){return E.clone(this,e)};E.prototype.equals=function(e){return E.equals(this,e)};E.prototype.equalsEpsilon=function(e,n){return E.equalsEpsilon(this,e,n)};E.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Xe=E;var X={},yt={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},an={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},lt={},ge={east:new _,north:new _,up:new _,west:new _,south:new _,down:new _},Fe=new _,Le=new _,Be=new _;X.localFrameToFixedFrameGenerator=function(e,n){if(!yt.hasOwnProperty(e)||!yt[e].hasOwnProperty(n))throw new A("firstAxis and secondAxis must be east, north, up, west, south or down.");let t=yt[e][n],o,i=e+n;return p(lt[i])?o=lt[i]:(o=function(r,a,u){if(!p(r))throw new A("origin is required.");if(isNaN(r.x)||isNaN(r.y)||isNaN(r.z))throw new A("origin has a NaN component");if(p(u)||(u=new G),_.equalsEpsilon(r,_.ZERO,I.EPSILON14))_.unpack(an[e],0,Fe),_.unpack(an[n],0,Le),_.unpack(an[t],0,Be);else if(I.equalsEpsilon(r.x,0,I.EPSILON14)&&I.equalsEpsilon(r.y,0,I.EPSILON14)){let d=I.sign(r.z);_.unpack(an[e],0,Fe),e!=="east"&&e!=="west"&&_.multiplyByScalar(Fe,d,Fe),_.unpack(an[n],0,Le),n!=="east"&&n!=="west"&&_.multiplyByScalar(Le,d,Le),_.unpack(an[t],0,Be),t!=="east"&&t!=="west"&&_.multiplyByScalar(Be,d,Be)}else{a=O(a,Ie.default),a.geodeticSurfaceNormal(r,ge.up);let d=ge.up,m=ge.east;m.x=-r.y,m.y=r.x,m.z=0,_.normalize(m,ge.east),_.cross(d,m,ge.north),_.multiplyByScalar(ge.up,-1,ge.down),_.multiplyByScalar(ge.east,-1,ge.west),_.multiplyByScalar(ge.north,-1,ge.south),Fe=ge[e],Le=ge[n],Be=ge[t]}return u[0]=Fe.x,u[1]=Fe.y,u[2]=Fe.z,u[3]=0,u[4]=Le.x,u[5]=Le.y,u[6]=Le.z,u[7]=0,u[8]=Be.x,u[9]=Be.y,u[10]=Be.z,u[11]=0,u[12]=r.x,u[13]=r.y,u[14]=r.z,u[15]=1,u},lt[i]=o),o};X.eastNorthUpToFixedFrame=X.localFrameToFixedFrameGenerator("east","north");X.northEastDownToFixedFrame=X.localFrameToFixedFrameGenerator("north","east");X.northUpEastToFixedFrame=X.localFrameToFixedFrameGenerator("north","up");X.northWestUpToFixedFrame=X.localFrameToFixedFrameGenerator("north","west");var Wr=new Xe,Hr=new _(1,1,1),$r=new G;X.headingPitchRollToFixedFrame=function(e,n,t,o,i){s.typeOf.object("HeadingPitchRoll",n),o=O(o,X.eastNorthUpToFixedFrame);let r=Xe.fromHeadingPitchRoll(n,Wr),a=G.fromTranslationQuaternionRotationScale(_.ZERO,r,Hr,$r);return i=o(e,t,i),G.multiply(i,a,i)};var Vr=new G,Yr=new $;X.headingPitchRollQuaternion=function(e,n,t,o,i){s.typeOf.object("HeadingPitchRoll",n);let r=X.headingPitchRollToFixedFrame(e,n,t,o,Vr),a=G.getMatrix3(r,Yr);return Xe.fromRotationMatrix(a,i)};var Xr=new _(1,1,1),Zr=new _,Ro=new G,Jr=new G,Gr=new $,Kr=new Xe;X.fixedFrameToHeadingPitchRoll=function(e,n,t,o){s.defined("transform",e),n=O(n,Ie.default),t=O(t,X.eastNorthUpToFixedFrame),p(o)||(o=new ct);let i=G.getTranslation(e,Zr);if(_.equals(i,_.ZERO))return o.heading=0,o.pitch=0,o.roll=0,o;let r=G.inverseTransformation(t(i,n,Ro),Ro),a=G.setScale(e,Xr,Jr);a=G.setTranslation(a,_.ZERO,a),r=G.multiply(r,a,r);let u=Xe.fromRotationMatrix(G.getMatrix3(r,Gr),Kr);return u=Xe.normalize(u,u),ct.fromQuaternion(u,o)};var ei=6*3600+41*60+50.54841,ni=8640184812866e-6,ti=.093104,oi=-62e-7,ri=11772758384668e-32,ii=72921158553e-15,ci=I.TWO_PI/86400,Yn=new me;X.computeTemeToPseudoFixedMatrix=function(e,n){if(!p(e))throw new A("date is required.");Yn=me.addSeconds(e,-me.computeTaiMinusUtc(e),Yn);let t=Yn.dayNumber,o=Yn.secondsOfDay,i,r=t-2451545;o>=43200?i=(r+.5)/ce.DAYS_PER_JULIAN_CENTURY:i=(r-.5)/ce.DAYS_PER_JULIAN_CENTURY;let u=(ei+i*(ni+i*(ti+i*oi)))*ci%I.TWO_PI,d=ii+ri*(t-24515455e-1),m=(o+ce.SECONDS_PER_DAY*.5)%ce.SECONDS_PER_DAY,l=u+d*m,w=Math.cos(l),T=Math.sin(l);return p(n)?(n[0]=w,n[1]=-T,n[2]=0,n[3]=T,n[4]=w,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new $(w,T,0,-T,w,0,0,0,1)};X.iau2006XysData=new bo;X.earthOrientationParameters=po.NONE;var Ot=32.184,si=2451545;X.preloadIcrfFixed=function(e){let n=e.start.dayNumber,t=e.start.secondsOfDay+Ot,o=e.stop.dayNumber,i=e.stop.secondsOfDay+Ot;return X.iau2006XysData.preload(n,t,o,i)};X.computeIcrfToFixedMatrix=function(e,n){if(!p(e))throw new A("date is required.");p(n)||(n=new $);let t=X.computeFixedToIcrfMatrix(e,n);if(p(t))return $.transpose(t,n)};var ai=new Qn(0,0,0),fi=new hn(0,0,0,0,0,0),wt=new $,bt=new $;X.computeFixedToIcrfMatrix=function(e,n){if(!p(e))throw new A("date is required.");p(n)||(n=new $);let t=X.earthOrientationParameters.compute(e,fi);if(!p(t))return;let o=e.dayNumber,i=e.secondsOfDay+Ot,r=X.iau2006XysData.computeXysRadians(o,i,ai);if(!p(r))return;let a=r.x+t.xPoleOffset,u=r.y+t.yPoleOffset,d=1/(1+Math.sqrt(1-a*a-u*u)),m=wt;m[0]=1-d*a*a,m[3]=-d*a*u,m[6]=a,m[1]=-d*a*u,m[4]=1-d*u*u,m[7]=u,m[2]=-a,m[5]=-u,m[8]=1-d*(a*a+u*u);let l=$.fromRotationZ(-r.s,bt),w=$.multiply(m,l,wt),T=e.dayNumber,R=e.secondsOfDay-me.computeTaiMinusUtc(e)+t.ut1MinusUtc,P=T-2451545,C=R/ce.SECONDS_PER_DAY,q=.779057273264+C+.00273781191135448*(P+C);q=q%1*I.TWO_PI;let k=$.fromRotationZ(q,bt),L=$.multiply(w,k,wt),F=Math.cos(t.xPoleWander),x=Math.cos(t.yPoleWander),Q=Math.sin(t.xPoleWander),W=Math.sin(t.yPoleWander),ee=o-si+i/ce.SECONDS_PER_DAY;ee/=36525;let re=-47e-6*ee*I.RADIANS_PER_DEGREE/3600,Z=Math.cos(re),oe=Math.sin(re),J=bt;return J[0]=F*Z,J[1]=F*oe,J[2]=Q,J[3]=-x*oe+W*Q*Z,J[4]=x*Z+W*Q*oe,J[5]=-W*F,J[6]=-W*oe-x*Q*Z,J[7]=W*Z-x*Q*oe,J[8]=x*F,$.multiply(L,J,n)};var ui=new qe;X.pointToWindowCoordinates=function(e,n,t,o){return o=X.pointToGLWindowCoordinates(e,n,t,o),o.y=2*n[5]-o.y,o};X.pointToGLWindowCoordinates=function(e,n,t,o){if(!p(e))throw new A("modelViewProjectionMatrix is required.");if(!p(n))throw new A("viewportTransformation is required.");if(!p(t))throw new A("point is required.");p(o)||(o=new Oe);let i=ui;return G.multiplyByVector(e,qe.fromElements(t.x,t.y,t.z,1,i),i),qe.multiplyByScalar(i,1/i.w,i),G.multiplyByVector(n,i,i),Oe.fromCartesian4(i,o)};var pi=new _,hi=new _,di=new _;X.rotationMatrixFromPositionVelocity=function(e,n,t,o){if(!p(e))throw new A("position is required.");if(!p(n))throw new A("velocity is required.");let i=O(t,Ie.default).geodeticSurfaceNormal(e,pi),r=_.cross(n,i,hi);_.equalsEpsilon(r,_.ZERO,I.EPSILON6)&&(r=_.clone(_.UNIT_X,r));let a=_.cross(r,n,di);return _.normalize(a,a),_.cross(n,a,r),_.negate(r,r),_.normalize(r,r),p(o)||(o=new $),o[0]=n.x,o[1]=n.y,o[2]=n.z,o[3]=r.x,o[4]=r.y,o[5]=r.z,o[6]=a.x,o[7]=a.y,o[8]=a.z,o};var vo=new G(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Co=new Pe,gt=new _,mi=new _,yi=new $,_t=new G,Ao=new G;X.basisTo2D=function(e,n,t){if(!p(e))throw new A("projection is required.");if(!p(n))throw new A("matrix is required.");if(!p(t))throw new A("result is required.");let o=G.getTranslation(n,mi),i=e.ellipsoid,r;if(_.equals(o,_.ZERO))r=_.clone(_.ZERO,gt);else{let l=i.cartesianToCartographic(o,Co);r=e.project(l,gt),_.fromElements(r.z,r.x,r.y,r)}let a=X.eastNorthUpToFixedFrame(o,i,_t),u=G.inverseTransformation(a,Ao),d=G.getMatrix3(n,yi),m=G.multiplyByMatrix3(u,d,t);return G.multiply(vo,m,t),G.setTranslation(t,r,t),t};X.ellipsoidTo2DModelMatrix=function(e,n,t){if(!p(e))throw new A("projection is required.");if(!p(n))throw new A("center is required.");if(!p(t))throw new A("result is required.");let o=e.ellipsoid,i=X.eastNorthUpToFixedFrame(n,o,_t),r=G.inverseTransformation(i,Ao),a=o.cartesianToCartographic(n,Co),u=e.project(a,gt);_.fromElements(u.z,u.x,u.y,u);let d=G.fromTranslation(u,_t);return G.multiply(vo,r,t),G.multiply(d,t,t),t};var jo=X;function B(e,n,t,o){this.west=O(e,0),this.south=O(n,0),this.east=O(t,0),this.north=O(o,0)}Object.defineProperties(B.prototype,{width:{get:function(){return B.computeWidth(this)}},height:{get:function(){return B.computeHeight(this)}}});B.packedLength=4;B.pack=function(e,n,t){return s.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e.west,n[t++]=e.south,n[t++]=e.east,n[t]=e.north,n};B.unpack=function(e,n,t){return s.defined("array",e),n=O(n,0),p(t)||(t=new B),t.west=e[n++],t.south=e[n++],t.east=e[n++],t.north=e[n],t};B.computeWidth=function(e){s.typeOf.object("rectangle",e);let n=e.east,t=e.west;return n<t&&(n+=I.TWO_PI),n-t};B.computeHeight=function(e){return s.typeOf.object("rectangle",e),e.north-e.south};B.fromDegrees=function(e,n,t,o,i){return e=I.toRadians(O(e,0)),n=I.toRadians(O(n,0)),t=I.toRadians(O(t,0)),o=I.toRadians(O(o,0)),p(i)?(i.west=e,i.south=n,i.east=t,i.north=o,i):new B(e,n,t,o)};B.fromRadians=function(e,n,t,o,i){return p(i)?(i.west=O(e,0),i.south=O(n,0),i.east=O(t,0),i.north=O(o,0),i):new B(e,n,t,o)};B.fromCartographicArray=function(e,n){s.defined("cartographics",e);let t=Number.MAX_VALUE,o=-Number.MAX_VALUE,i=Number.MAX_VALUE,r=-Number.MAX_VALUE,a=Number.MAX_VALUE,u=-Number.MAX_VALUE;for(let d=0,m=e.length;d<m;d++){let l=e[d];t=Math.min(t,l.longitude),o=Math.max(o,l.longitude),a=Math.min(a,l.latitude),u=Math.max(u,l.latitude);let w=l.longitude>=0?l.longitude:l.longitude+I.TWO_PI;i=Math.min(i,w),r=Math.max(r,w)}return o-t>r-i&&(t=i,o=r,o>I.PI&&(o=o-I.TWO_PI),t>I.PI&&(t=t-I.TWO_PI)),p(n)?(n.west=t,n.south=a,n.east=o,n.north=u,n):new B(t,a,o,u)};B.fromCartesianArray=function(e,n,t){s.defined("cartesians",e),n=O(n,Ie.default);let o=Number.MAX_VALUE,i=-Number.MAX_VALUE,r=Number.MAX_VALUE,a=-Number.MAX_VALUE,u=Number.MAX_VALUE,d=-Number.MAX_VALUE;for(let m=0,l=e.length;m<l;m++){let w=n.cartesianToCartographic(e[m]);o=Math.min(o,w.longitude),i=Math.max(i,w.longitude),u=Math.min(u,w.latitude),d=Math.max(d,w.latitude);let T=w.longitude>=0?w.longitude:w.longitude+I.TWO_PI;r=Math.min(r,T),a=Math.max(a,T)}return i-o>a-r&&(o=r,i=a,i>I.PI&&(i=i-I.TWO_PI),o>I.PI&&(o=o-I.TWO_PI)),p(t)?(t.west=o,t.south=u,t.east=i,t.north=d,t):new B(o,u,i,d)};var li=new _,wi=new _,bi=new _,Oi=new _,gi=new _,St=new Array(5);for(let e=0;e<St.length;++e)St[e]=new _;B.fromBoundingSphere=function(e,n,t){s.typeOf.object("boundingSphere",e);let o=e.center,i=e.radius;if(p(n)||(n=Ie.default),p(t)||(t=new B),_.equals(o,_.ZERO))return B.clone(B.MAX_VALUE,t),t;let r=jo.eastNorthUpToFixedFrame(o,n,li),a=G.multiplyByPointAsVector(r,_.UNIT_X,wi);_.normalize(a,a);let u=G.multiplyByPointAsVector(r,_.UNIT_Y,bi);_.normalize(u,u),_.multiplyByScalar(u,i,u),_.multiplyByScalar(a,i,a);let d=_.negate(u,gi),m=_.negate(a,Oi),l=St,w=l[0];return _.add(o,u,w),w=l[1],_.add(o,m,w),w=l[2],_.add(o,d,w),w=l[3],_.add(o,a,w),l[4]=o,B.fromCartesianArray(l,n,t)};B.clone=function(e,n){if(p(e))return p(n)?(n.west=e.west,n.south=e.south,n.east=e.east,n.north=e.north,n):new B(e.west,e.south,e.east,e.north)};B.equalsEpsilon=function(e,n,t){return t=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e.west-n.west)<=t&&Math.abs(e.south-n.south)<=t&&Math.abs(e.east-n.east)<=t&&Math.abs(e.north-n.north)<=t};B.prototype.clone=function(e){return B.clone(this,e)};B.prototype.equals=function(e){return B.equals(this,e)};B.equals=function(e,n){return e===n||p(e)&&p(n)&&e.west===n.west&&e.south===n.south&&e.east===n.east&&e.north===n.north};B.prototype.equalsEpsilon=function(e,n){return B.equalsEpsilon(this,e,n)};B.validate=function(e){s.typeOf.object("rectangle",e);let n=e.north;s.typeOf.number.greaterThanOrEquals("north",n,-I.PI_OVER_TWO),s.typeOf.number.lessThanOrEquals("north",n,I.PI_OVER_TWO);let t=e.south;s.typeOf.number.greaterThanOrEquals("south",t,-I.PI_OVER_TWO),s.typeOf.number.lessThanOrEquals("south",t,I.PI_OVER_TWO);let o=e.west;s.typeOf.number.greaterThanOrEquals("west",o,-Math.PI),s.typeOf.number.lessThanOrEquals("west",o,Math.PI);let i=e.east;s.typeOf.number.greaterThanOrEquals("east",i,-Math.PI),s.typeOf.number.lessThanOrEquals("east",i,Math.PI)};B.southwest=function(e,n){return s.typeOf.object("rectangle",e),p(n)?(n.longitude=e.west,n.latitude=e.south,n.height=0,n):new Pe(e.west,e.south)};B.northwest=function(e,n){return s.typeOf.object("rectangle",e),p(n)?(n.longitude=e.west,n.latitude=e.north,n.height=0,n):new Pe(e.west,e.north)};B.northeast=function(e,n){return s.typeOf.object("rectangle",e),p(n)?(n.longitude=e.east,n.latitude=e.north,n.height=0,n):new Pe(e.east,e.north)};B.southeast=function(e,n){return s.typeOf.object("rectangle",e),p(n)?(n.longitude=e.east,n.latitude=e.south,n.height=0,n):new Pe(e.east,e.south)};B.center=function(e,n){s.typeOf.object("rectangle",e);let t=e.east,o=e.west;t<o&&(t+=I.TWO_PI);let i=I.negativePiToPi((o+t)*.5),r=(e.south+e.north)*.5;return p(n)?(n.longitude=i,n.latitude=r,n.height=0,n):new Pe(i,r)};B.intersection=function(e,n,t){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",n);let o=e.east,i=e.west,r=n.east,a=n.west;o<i&&r>0?o+=I.TWO_PI:r<a&&o>0&&(r+=I.TWO_PI),o<i&&a<0?a+=I.TWO_PI:r<a&&i<0&&(i+=I.TWO_PI);let u=I.negativePiToPi(Math.max(i,a)),d=I.negativePiToPi(Math.min(o,r));if((e.west<e.east||n.west<n.east)&&d<=u)return;let m=Math.max(e.south,n.south),l=Math.min(e.north,n.north);if(!(m>=l))return p(t)?(t.west=u,t.south=m,t.east=d,t.north=l,t):new B(u,m,d,l)};B.simpleIntersection=function(e,n,t){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",n);let o=Math.max(e.west,n.west),i=Math.max(e.south,n.south),r=Math.min(e.east,n.east),a=Math.min(e.north,n.north);if(!(i>=a||o>=r))return p(t)?(t.west=o,t.south=i,t.east=r,t.north=a,t):new B(o,i,r,a)};B.union=function(e,n,t){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",n),p(t)||(t=new B);let o=e.east,i=e.west,r=n.east,a=n.west;o<i&&r>0?o+=I.TWO_PI:r<a&&o>0&&(r+=I.TWO_PI),o<i&&a<0?a+=I.TWO_PI:r<a&&i<0&&(i+=I.TWO_PI);let u=I.negativePiToPi(Math.min(i,a)),d=I.negativePiToPi(Math.max(o,r));return t.west=u,t.south=Math.min(e.south,n.south),t.east=d,t.north=Math.max(e.north,n.north),t};B.expand=function(e,n,t){return s.typeOf.object("rectangle",e),s.typeOf.object("cartographic",n),p(t)||(t=new B),t.west=Math.min(e.west,n.longitude),t.south=Math.min(e.south,n.latitude),t.east=Math.max(e.east,n.longitude),t.north=Math.max(e.north,n.latitude),t};B.contains=function(e,n){s.typeOf.object("rectangle",e),s.typeOf.object("cartographic",n);let t=n.longitude,o=n.latitude,i=e.west,r=e.east;return r<i&&(r+=I.TWO_PI,t<0&&(t+=I.TWO_PI)),(t>i||I.equalsEpsilon(t,i,I.EPSILON14))&&(t<r||I.equalsEpsilon(t,r,I.EPSILON14))&&o>=e.south&&o<=e.north};var _i=new Pe;B.subsample=function(e,n,t,o){s.typeOf.object("rectangle",e),n=O(n,Ie.default),t=O(t,0),p(o)||(o=[]);let i=0,r=e.north,a=e.south,u=e.east,d=e.west,m=_i;m.height=t,m.longitude=d,m.latitude=r,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.longitude=u,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.latitude=a,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.longitude=d,o[i]=n.cartographicToCartesian(m,o[i]),i++,r<0?m.latitude=r:a>0?m.latitude=a:m.latitude=0;for(let l=1;l<8;++l)m.longitude=-Math.PI+l*I.PI_OVER_TWO,B.contains(e,m)&&(o[i]=n.cartographicToCartesian(m,o[i]),i++);return m.latitude===0&&(m.longitude=d,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.longitude=u,o[i]=n.cartographicToCartesian(m,o[i]),i++),o.length=i,o};B.subsection=function(e,n,t,o,i,r){if(s.typeOf.object("rectangle",e),s.typeOf.number.greaterThanOrEquals("westLerp",n,0),s.typeOf.number.lessThanOrEquals("westLerp",n,1),s.typeOf.number.greaterThanOrEquals("southLerp",t,0),s.typeOf.number.lessThanOrEquals("southLerp",t,1),s.typeOf.number.greaterThanOrEquals("eastLerp",o,0),s.typeOf.number.lessThanOrEquals("eastLerp",o,1),s.typeOf.number.greaterThanOrEquals("northLerp",i,0),s.typeOf.number.lessThanOrEquals("northLerp",i,1),s.typeOf.number.lessThanOrEquals("westLerp",n,o),s.typeOf.number.lessThanOrEquals("southLerp",t,i),p(r)||(r=new B),e.west<=e.east){let u=e.east-e.west;r.west=e.west+n*u,r.east=e.west+o*u}else{let u=I.TWO_PI+e.east-e.west;r.west=I.negativePiToPi(e.west+n*u),r.east=I.negativePiToPi(e.west+o*u)}let a=e.north-e.south;return r.south=e.south+t*a,r.north=e.south+i*a,n===1&&(r.west=e.east),o===1&&(r.east=e.east),t===1&&(r.south=e.north),i===1&&(r.north=e.north),r};B.MAX_VALUE=Object.freeze(new B(-Math.PI,-I.PI_OVER_TWO,Math.PI,I.PI_OVER_TWO));var ff=B;function D(e,n,t,o){this[0]=O(e,0),this[1]=O(t,0),this[2]=O(n,0),this[3]=O(o,0)}D.packedLength=4;D.pack=function(e,n,t){return s.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n[t++]=e[3],n};D.unpack=function(e,n,t){return s.defined("array",e),n=O(n,0),p(t)||(t=new D),t[0]=e[n++],t[1]=e[n++],t[2]=e[n++],t[3]=e[n++],t};D.packArray=function(e,n){s.defined("array",e);let t=e.length,o=t*4;if(!p(n))n=new Array(o);else{if(!Array.isArray(n)&&n.length!==o)throw new A("If result is a typed array, it must have exactly array.length * 4 elements");n.length!==o&&(n.length=o)}for(let i=0;i<t;++i)D.pack(e[i],n,i*4);return n};D.unpackArray=function(e,n){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!==0)throw new A("array length must be a multiple of 4.");let t=e.length;p(n)?n.length=t/4:n=new Array(t/4);for(let o=0;o<t;o+=4){let i=o/4;n[i]=D.unpack(e,o,n[i])}return n};D.clone=function(e,n){if(p(e))return p(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n):new D(e[0],e[2],e[1],e[3])};D.fromArray=D.unpack;D.fromColumnMajorArray=function(e,n){return s.defined("values",e),D.clone(e,n)};D.fromRowMajorArray=function(e,n){return s.defined("values",e),p(n)?(n[0]=e[0],n[1]=e[2],n[2]=e[1],n[3]=e[3],n):new D(e[0],e[1],e[2],e[3])};D.fromScale=function(e,n){return s.typeOf.object("scale",e),p(n)?(n[0]=e.x,n[1]=0,n[2]=0,n[3]=e.y,n):new D(e.x,0,0,e.y)};D.fromUniformScale=function(e,n){return s.typeOf.number("scale",e),p(n)?(n[0]=e,n[1]=0,n[2]=0,n[3]=e,n):new D(e,0,0,e)};D.fromRotation=function(e,n){s.typeOf.number("angle",e);let t=Math.cos(e),o=Math.sin(e);return p(n)?(n[0]=t,n[1]=o,n[2]=-o,n[3]=t,n):new D(t,-o,o,t)};D.toArray=function(e,n){return s.typeOf.object("matrix",e),p(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n):[e[0],e[1],e[2],e[3]]};D.getElementIndex=function(e,n){return s.typeOf.number.greaterThanOrEquals("row",n,0),s.typeOf.number.lessThanOrEquals("row",n,1),s.typeOf.number.greaterThanOrEquals("column",e,0),s.typeOf.number.lessThanOrEquals("column",e,1),e*2+n};D.getColumn=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("result",t);let o=n*2,i=e[o],r=e[o+1];return t.x=i,t.y=r,t};D.setColumn=function(e,n,t,o){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=D.clone(e,o);let i=n*2;return o[i]=t.x,o[i+1]=t.y,o};D.getRow=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("result",t);let o=e[n],i=e[n+2];return t.x=o,t.y=i,t};D.setRow=function(e,n,t,o){return s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=D.clone(e,o),o[n]=t.x,o[n+2]=t.y,o};var Si=new Oe;D.setScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t);let o=D.getScale(e,Si),i=n.x/o.x,r=n.y/o.y;return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*r,t};var Ei=new Oe;D.setUniformScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t);let o=D.getScale(e,Ei),i=n/o.x,r=n/o.y;return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*r,t};var Po=new Oe;D.getScale=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n.x=Oe.magnitude(Oe.fromElements(e[0],e[1],Po)),n.y=Oe.magnitude(Oe.fromElements(e[2],e[3],Po)),n};var Mo=new Oe;D.getMaximumScale=function(e){return D.getScale(e,Mo),Oe.maximumComponent(Mo)};var Ti=new Oe;D.setRotation=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);let o=D.getScale(e,Ti);return t[0]=n[0]*o.x,t[1]=n[1]*o.x,t[2]=n[2]*o.y,t[3]=n[3]*o.y,t};var Ri=new Oe;D.getRotation=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=D.getScale(e,Ri);return n[0]=e[0]/t.x,n[1]=e[1]/t.x,n[2]=e[2]/t.y,n[3]=e[3]/t.y,n};D.multiply=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);let o=e[0]*n[0]+e[2]*n[1],i=e[0]*n[2]+e[2]*n[3],r=e[1]*n[0]+e[3]*n[1],a=e[1]*n[2]+e[3]*n[3];return t[0]=o,t[1]=r,t[2]=i,t[3]=a,t};D.add=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t};D.subtract=function(e,n,t){return s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t};D.multiplyByVector=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);let o=e[0]*n.x+e[2]*n.y,i=e[1]*n.x+e[3]*n.y;return t.x=o,t.y=i,t};D.multiplyByScalar=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t};D.multiplyByScale=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t),t[0]=e[0]*n.x,t[1]=e[1]*n.x,t[2]=e[2]*n.y,t[3]=e[3]*n.y,t};D.multiplyByUniformScale=function(e,n,t){return s.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t};D.negate=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=-e[0],n[1]=-e[1],n[2]=-e[2],n[3]=-e[3],n};D.transpose=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let t=e[0],o=e[2],i=e[1],r=e[3];return n[0]=t,n[1]=o,n[2]=i,n[3]=r,n};D.abs=function(e,n){return s.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=Math.abs(e[0]),n[1]=Math.abs(e[1]),n[2]=Math.abs(e[2]),n[3]=Math.abs(e[3]),n};D.equals=function(e,n){return e===n||p(e)&&p(n)&&e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]&&e[3]===n[3]};D.equalsArray=function(e,n,t){return e[0]===n[t]&&e[1]===n[t+1]&&e[2]===n[t+2]&&e[3]===n[t+3]};D.equalsEpsilon=function(e,n,t){return t=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e[0]-n[0])<=t&&Math.abs(e[1]-n[1])<=t&&Math.abs(e[2]-n[2])<=t&&Math.abs(e[3]-n[3])<=t};D.IDENTITY=Object.freeze(new D(1,0,0,1));D.ZERO=Object.freeze(new D(0,0,0,0));D.COLUMN0ROW0=0;D.COLUMN0ROW1=1;D.COLUMN1ROW0=2;D.COLUMN1ROW1=3;Object.defineProperties(D.prototype,{length:{get:function(){return D.packedLength}}});D.prototype.clone=function(e){return D.clone(this,e)};D.prototype.equals=function(e){return D.equals(this,e)};D.prototype.equalsEpsilon=function(e,n){return D.equalsEpsilon(this,e,n)};D.prototype.toString=function(){return`(${this[0]}, ${this[2]}) (${this[1]}, ${this[3]})`};var lf=D;export{qe as a,G as b,De as c,ke as d,wo as e,Xe as f,jo as g,ff as h,lf as i}; diff --git a/cesium/Workers/chunk-ED2EM7ZX.js b/cesium/Workers/chunk-ABGXSJNX.js similarity index 94% rename from cesium/Workers/chunk-ED2EM7ZX.js rename to cesium/Workers/chunk-ABGXSJNX.js index 84c8931..47a20cf 100644 --- a/cesium/Workers/chunk-ED2EM7ZX.js +++ b/cesium/Workers/chunk-ABGXSJNX.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as w,b as z,i as S}from"./chunk-CMXCDAKR.js";import{a as y}from"./chunk-77ESX6BV.js";import{a as C,c as T,e as x}from"./chunk-LJCGAQ64.js";import{a as h}from"./chunk-JFG572S7.js";import{a as u,b as a}from"./chunk-5YVCOCPP.js";import{e as b}from"./chunk-U73D6PDD.js";var c={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};c.getMathType=function(e){switch(e){case c.SCALAR:return Number;case c.VEC2:return T;case c.VEC3:return C;case c.VEC4:return w;case c.MAT2:return S;case c.MAT3:return x;case c.MAT4:return z;default:throw new u("attributeType is not a valid value.")}};c.getNumberOfComponents=function(e){switch(e){case c.SCALAR:return 1;case c.VEC2:return 2;case c.VEC3:return 3;case c.VEC4:case c.MAT2:return 4;case c.MAT3:return 9;case c.MAT4:return 16;default:throw new u("attributeType is not a valid value.")}};c.getAttributeLocationCount=function(e){switch(e){case c.SCALAR:case c.VEC2:case c.VEC3:case c.VEC4:return 1;case c.MAT2:return 2;case c.MAT3:return 3;case c.MAT4:return 4;default:throw new u("attributeType is not a valid value.")}};c.getGlslType=function(e){switch(a.typeOf.string("attributeType",e),e){case c.SCALAR:return"float";case c.VEC2:return"vec2";case c.VEC3:return"vec3";case c.VEC4:return"vec4";case c.MAT2:return"mat2";case c.MAT3:return"mat3";case c.MAT4:return"mat4";default:throw new u("attributeType is not a valid value.")}};var N=Object.freeze(c);var V=1/256,D=256,r={};r.octEncodeInRange=function(e,t,n){a.defined("vector",e),a.defined("result",n);let o=C.magnitudeSquared(e);if(Math.abs(o-1)>h.EPSILON6)throw new u("vector must be normalized.");if(n.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),n.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){let i=n.x,d=n.y;n.x=(1-Math.abs(d))*h.signNotZero(i),n.y=(1-Math.abs(i))*h.signNotZero(d)}return n.x=h.toSNorm(n.x,t),n.y=h.toSNorm(n.y,t),n};r.octEncode=function(e,t){return r.octEncodeInRange(e,255,t)};var A=new T,F=new Uint8Array(1);function E(e){return F[0]=e,F[0]}r.octEncodeToCartesian4=function(e,t){return r.octEncodeInRange(e,65535,A),t.x=E(A.x*V),t.y=E(A.x),t.z=E(A.y*V),t.w=E(A.y),t};r.octDecodeInRange=function(e,t,n,o){if(a.defined("result",o),e<0||e>n||t<0||t>n)throw new u(`x and y must be unsigned normalized integers between 0 and ${n}`);if(o.x=h.fromSNorm(e,n),o.y=h.fromSNorm(t,n),o.z=1-(Math.abs(o.x)+Math.abs(o.y)),o.z<0){let i=o.x;o.x=(1-Math.abs(o.y))*h.signNotZero(i),o.y=(1-Math.abs(i))*h.signNotZero(o.y)}return C.normalize(o,o)};r.octDecode=function(e,t,n){return r.octDecodeInRange(e,t,255,n)};r.octDecodeFromCartesian4=function(e,t){a.typeOf.object("encoded",e),a.typeOf.object("result",t);let n=e.x,o=e.y,i=e.z,d=e.w;if(n<0||n>255||o<0||o>255||i<0||i>255||d<0||d>255)throw new u("x, y, z, and w must be unsigned normalized integers between 0 and 255");let f=n*D+o,s=i*D+d;return r.octDecodeInRange(f,s,65535,t)};r.octPackFloat=function(e){return a.defined("encoded",e),256*e.x+e.y};var l=new T;r.octEncodeFloat=function(e){return r.octEncode(e,l),r.octPackFloat(l)};r.octDecodeFloat=function(e,t){a.defined("value",e);let n=e/256,o=Math.floor(n),i=(n-o)*256;return r.octDecode(o,i,t)};r.octPack=function(e,t,n,o){a.defined("v1",e),a.defined("v2",t),a.defined("v3",n),a.defined("result",o);let i=r.octEncodeFloat(e),d=r.octEncodeFloat(t),f=r.octEncode(n,l);return o.x=65536*f.x+i,o.y=65536*f.y+d,o};r.octUnpack=function(e,t,n,o){a.defined("packed",e),a.defined("v1",t),a.defined("v2",n),a.defined("v3",o);let i=e.x/65536,d=Math.floor(i),f=(i-d)*65536;i=e.y/65536;let s=Math.floor(i),m=(i-s)*65536;r.octDecodeFloat(f,t),r.octDecodeFloat(m,n),r.octDecode(d,s,o)};r.compressTextureCoordinates=function(e){a.defined("textureCoordinates",e);let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};r.decompressTextureCoordinates=function(e,t){a.defined("compressed",e),a.defined("result",t);let n=e/4096,o=Math.floor(n);return t.x=o/4095,t.y=(e-o*4096)/4095,t};function g(e){return e>>1^-(e&1)}r.zigZagDeltaDecode=function(e,t,n){a.defined("uBuffer",e),a.defined("vBuffer",t),a.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),b(n)&&a.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,n.length);let o=e.length,i=0,d=0,f=0;for(let s=0;s<o;++s)i+=g(e[s]),d+=g(t[s]),e[s]=i,t[s]=d,b(n)&&(f+=g(n[s]),n[s]=f)};r.dequantize=function(e,t,n,o){a.defined("typedArray",e),a.defined("componentDatatype",t),a.defined("type",n),a.defined("count",o);let i=N.getNumberOfComponents(n),d;switch(t){case y.BYTE:d=127;break;case y.UNSIGNED_BYTE:d=255;break;case y.SHORT:d=32767;break;case y.UNSIGNED_SHORT:d=65535;break;case y.INT:d=2147483647;break;case y.UNSIGNED_INT:d=4294967295;break;default:throw new u(`Cannot dequantize component datatype: ${t}`)}let f=new Float32Array(o*i);for(let s=0;s<o;s++)for(let m=0;m<i;m++){let p=s*i+m;f[p]=Math.max(e[p]/d,-1)}return f};r.decodeRGB565=function(e,t){a.defined("typedArray",e);let n=e.length*3;b(t)&&a.typeOf.number.equals("result.length","typedArray.length * 3",t.length,n);let o=e.length;b(t)||(t=new Float32Array(o*3));let i=31,d=63,f=1/31,s=1/63;for(let m=0;m<o;m++){let p=e[m],R=p>>11,I=p>>5&d,O=p&i,M=3*m;t[M]=R*f,t[M+1]=I*s,t[M+2]=O*f}return t};var W=r;export{W as a}; +import{a as w,b as z,i as S}from"./chunk-7Z5IIKOJ.js";import{a as y}from"./chunk-KZNJOCYU.js";import{a as C,c as T,e as x}from"./chunk-POASMU2N.js";import{a as h}from"./chunk-R6KGAEF6.js";import{a as u,b as a}from"./chunk-UH2WFNTA.js";import{e as b}from"./chunk-PEYJTJPE.js";var c={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};c.getMathType=function(e){switch(e){case c.SCALAR:return Number;case c.VEC2:return T;case c.VEC3:return C;case c.VEC4:return w;case c.MAT2:return S;case c.MAT3:return x;case c.MAT4:return z;default:throw new u("attributeType is not a valid value.")}};c.getNumberOfComponents=function(e){switch(e){case c.SCALAR:return 1;case c.VEC2:return 2;case c.VEC3:return 3;case c.VEC4:case c.MAT2:return 4;case c.MAT3:return 9;case c.MAT4:return 16;default:throw new u("attributeType is not a valid value.")}};c.getAttributeLocationCount=function(e){switch(e){case c.SCALAR:case c.VEC2:case c.VEC3:case c.VEC4:return 1;case c.MAT2:return 2;case c.MAT3:return 3;case c.MAT4:return 4;default:throw new u("attributeType is not a valid value.")}};c.getGlslType=function(e){switch(a.typeOf.string("attributeType",e),e){case c.SCALAR:return"float";case c.VEC2:return"vec2";case c.VEC3:return"vec3";case c.VEC4:return"vec4";case c.MAT2:return"mat2";case c.MAT3:return"mat3";case c.MAT4:return"mat4";default:throw new u("attributeType is not a valid value.")}};var N=Object.freeze(c);var V=1/256,D=256,r={};r.octEncodeInRange=function(e,t,n){a.defined("vector",e),a.defined("result",n);let o=C.magnitudeSquared(e);if(Math.abs(o-1)>h.EPSILON6)throw new u("vector must be normalized.");if(n.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),n.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){let i=n.x,d=n.y;n.x=(1-Math.abs(d))*h.signNotZero(i),n.y=(1-Math.abs(i))*h.signNotZero(d)}return n.x=h.toSNorm(n.x,t),n.y=h.toSNorm(n.y,t),n};r.octEncode=function(e,t){return r.octEncodeInRange(e,255,t)};var A=new T,F=new Uint8Array(1);function E(e){return F[0]=e,F[0]}r.octEncodeToCartesian4=function(e,t){return r.octEncodeInRange(e,65535,A),t.x=E(A.x*V),t.y=E(A.x),t.z=E(A.y*V),t.w=E(A.y),t};r.octDecodeInRange=function(e,t,n,o){if(a.defined("result",o),e<0||e>n||t<0||t>n)throw new u(`x and y must be unsigned normalized integers between 0 and ${n}`);if(o.x=h.fromSNorm(e,n),o.y=h.fromSNorm(t,n),o.z=1-(Math.abs(o.x)+Math.abs(o.y)),o.z<0){let i=o.x;o.x=(1-Math.abs(o.y))*h.signNotZero(i),o.y=(1-Math.abs(i))*h.signNotZero(o.y)}return C.normalize(o,o)};r.octDecode=function(e,t,n){return r.octDecodeInRange(e,t,255,n)};r.octDecodeFromCartesian4=function(e,t){a.typeOf.object("encoded",e),a.typeOf.object("result",t);let n=e.x,o=e.y,i=e.z,d=e.w;if(n<0||n>255||o<0||o>255||i<0||i>255||d<0||d>255)throw new u("x, y, z, and w must be unsigned normalized integers between 0 and 255");let f=n*D+o,s=i*D+d;return r.octDecodeInRange(f,s,65535,t)};r.octPackFloat=function(e){return a.defined("encoded",e),256*e.x+e.y};var l=new T;r.octEncodeFloat=function(e){return r.octEncode(e,l),r.octPackFloat(l)};r.octDecodeFloat=function(e,t){a.defined("value",e);let n=e/256,o=Math.floor(n),i=(n-o)*256;return r.octDecode(o,i,t)};r.octPack=function(e,t,n,o){a.defined("v1",e),a.defined("v2",t),a.defined("v3",n),a.defined("result",o);let i=r.octEncodeFloat(e),d=r.octEncodeFloat(t),f=r.octEncode(n,l);return o.x=65536*f.x+i,o.y=65536*f.y+d,o};r.octUnpack=function(e,t,n,o){a.defined("packed",e),a.defined("v1",t),a.defined("v2",n),a.defined("v3",o);let i=e.x/65536,d=Math.floor(i),f=(i-d)*65536;i=e.y/65536;let s=Math.floor(i),m=(i-s)*65536;r.octDecodeFloat(f,t),r.octDecodeFloat(m,n),r.octDecode(d,s,o)};r.compressTextureCoordinates=function(e){a.defined("textureCoordinates",e);let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};r.decompressTextureCoordinates=function(e,t){a.defined("compressed",e),a.defined("result",t);let n=e/4096,o=Math.floor(n);return t.x=o/4095,t.y=(e-o*4096)/4095,t};function g(e){return e>>1^-(e&1)}r.zigZagDeltaDecode=function(e,t,n){a.defined("uBuffer",e),a.defined("vBuffer",t),a.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),b(n)&&a.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,n.length);let o=e.length,i=0,d=0,f=0;for(let s=0;s<o;++s)i+=g(e[s]),d+=g(t[s]),e[s]=i,t[s]=d,b(n)&&(f+=g(n[s]),n[s]=f)};r.dequantize=function(e,t,n,o){a.defined("typedArray",e),a.defined("componentDatatype",t),a.defined("type",n),a.defined("count",o);let i=N.getNumberOfComponents(n),d;switch(t){case y.BYTE:d=127;break;case y.UNSIGNED_BYTE:d=255;break;case y.SHORT:d=32767;break;case y.UNSIGNED_SHORT:d=65535;break;case y.INT:d=2147483647;break;case y.UNSIGNED_INT:d=4294967295;break;default:throw new u(`Cannot dequantize component datatype: ${t}`)}let f=new Float32Array(o*i);for(let s=0;s<o;s++)for(let m=0;m<i;m++){let p=s*i+m;f[p]=Math.max(e[p]/d,-1)}return f};r.decodeRGB565=function(e,t){a.defined("typedArray",e);let n=e.length*3;b(t)&&a.typeOf.number.equals("result.length","typedArray.length * 3",t.length,n);let o=e.length;b(t)||(t=new Float32Array(o*3));let i=31,d=63,f=1/31,s=1/63;for(let m=0;m<o;m++){let p=e[m],R=p>>11,I=p>>5&d,O=p&i,M=3*m;t[M]=R*f,t[M+1]=I*s,t[M+2]=O*f}return t};var W=r;export{W as a}; diff --git a/cesium/Workers/chunk-AMQUWUD4.js b/cesium/Workers/chunk-AMQUWUD4.js new file mode 100644 index 0000000..d288881 --- /dev/null +++ b/cesium/Workers/chunk-AMQUWUD4.js @@ -0,0 +1,26 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.119 + * + * Copyright 2011-2022 Cesium Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Columbus View (Pat. Pend.) + * + * Portions licensed separately. + * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. + */ + +import{a as _}from"./chunk-W23CU777.js";import{a as M}from"./chunk-FYOYUPXG.js";import{b as G}from"./chunk-TAMCUKAR.js";import{a as b}from"./chunk-PDMQLSBL.js";import{b as R}from"./chunk-7Z5IIKOJ.js";import{a,b as L,d as z}from"./chunk-POASMU2N.js";import{a as E}from"./chunk-R6KGAEF6.js";import{a as C}from"./chunk-IUA6FAOZ.js";import{a as I}from"./chunk-UH2WFNTA.js";import{e as T}from"./chunk-PEYJTJPE.js";var p={};p.numberOfPoints=function(r,n,o){let e=a.distance(r,n);return Math.ceil(e/o)};p.numberOfPointsRhumbLine=function(r,n,o){let e=Math.pow(r.longitude-n.longitude,2)+Math.pow(r.latitude-n.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(e/(o*o))))};var V=new L;p.extractHeights=function(r,n){let o=r.length,e=new Array(o);for(let t=0;t<o;t++){let l=r[t];e[t]=n.cartesianToCartographic(l,V).height}return e};var Y=new R,F=new a,v=new a,j=new b(a.UNIT_X,0),H=new a,J=new b(a.UNIT_X,0),K=new a,Q=new a,k=[];function q(r,n,o){let e=k;e.length=r;let t;if(n===o){for(t=0;t<r;t++)e[t]=n;return e}let u=(o-n)/r;for(t=0;t<r;t++){let d=n+t*u;e[t]=d}return e}var x=new L,N=new L,D=new a,B=new a,W=new a,O=new _,S=new M;function $(r,n,o,e,t,l,u,d){let i=e.scaleToGeodeticSurface(r,B),w=e.scaleToGeodeticSurface(n,W),h=p.numberOfPoints(r,n,o),f=e.cartesianToCartographic(i,x),y=e.cartesianToCartographic(w,N),g=q(h,t,l);O.setEndPoints(f,y);let P=O.surfaceDistance/h,c=d;f.height=t;let s=e.cartographicToCartesian(f,D);a.pack(s,u,c),c+=3;for(let m=1;m<h;m++){let A=O.interpolateUsingSurfaceDistance(m*P,N);A.height=g[m],s=e.cartographicToCartesian(A,D),a.pack(s,u,c),c+=3}return c}function tt(r,n,o,e,t,l,u,d){let i=e.cartesianToCartographic(r,x),w=e.cartesianToCartographic(n,N),h=p.numberOfPointsRhumbLine(i,w,o);i.height=0,w.height=0;let f=q(h,t,l);S.ellipsoid.equals(e)||(S=new M(void 0,void 0,e)),S.setEndPoints(i,w);let y=S.surfaceDistance/h,g=d;i.height=t;let P=e.cartographicToCartesian(i,D);a.pack(P,u,g),g+=3;for(let c=1;c<h;c++){let s=S.interpolateUsingSurfaceDistance(c*y,N);s.height=f[c],P=e.cartographicToCartesian(s,D),a.pack(P,u,g),g+=3}return g}p.wrapLongitude=function(r,n){let o=[],e=[];if(T(r)&&r.length>0){n=C(n,R.IDENTITY);let t=R.inverseTransformation(n,Y),l=R.multiplyByPoint(t,a.ZERO,F),u=a.normalize(R.multiplyByPointAsVector(t,a.UNIT_Y,v),v),d=b.fromPointNormal(l,u,j),i=a.normalize(R.multiplyByPointAsVector(t,a.UNIT_X,H),H),w=b.fromPointNormal(l,i,J),h=1;o.push(a.clone(r[0]));let f=o[0],y=r.length;for(let g=1;g<y;++g){let P=r[g];if(b.getPointDistance(w,f)<0||b.getPointDistance(w,P)<0){let c=G.lineSegmentPlane(f,P,d,K);if(T(c)){let s=a.multiplyByScalar(u,5e-9,Q);b.getPointDistance(d,f)<0&&a.negate(s,s),o.push(a.add(c,s,new a)),e.push(h+1),a.negate(s,s),o.push(a.add(c,s,new a)),h=1}}o.push(a.clone(r[g])),h++,f=P}e.push(h)}return{positions:o,lengths:e}};p.generateArc=function(r){T(r)||(r={});let n=r.positions;if(!T(n))throw new I("options.positions is required.");let o=n.length,e=C(r.ellipsoid,z.default),t=C(r.height,0),l=Array.isArray(t);if(o<1)return[];if(o===1){let c=e.scaleToGeodeticSurface(n[0],B);if(t=l?t[0]:t,t!==0){let s=e.geodeticSurfaceNormal(c,D);a.multiplyByScalar(s,t,s),a.add(c,s,c)}return[c.x,c.y,c.z]}let u=r.minDistance;if(!T(u)){let c=C(r.granularity,E.RADIANS_PER_DEGREE);u=E.chordLength(c,e.maximumRadius)}let d=0,i;for(i=0;i<o-1;i++)d+=p.numberOfPoints(n[i],n[i+1],u);let w=(d+1)*3,h=new Array(w),f=0;for(i=0;i<o-1;i++){let c=n[i],s=n[i+1],m=l?t[i]:t,A=l?t[i+1]:t;f=$(c,s,u,e,m,A,h,f)}k.length=0;let y=n[o-1],g=e.cartesianToCartographic(y,x);g.height=l?t[o-1]:t;let P=e.cartographicToCartesian(g,D);return a.pack(P,h,w-3),h};var U=new L,et=new L;p.generateRhumbArc=function(r){T(r)||(r={});let n=r.positions;if(!T(n))throw new I("options.positions is required.");let o=n.length,e=C(r.ellipsoid,z.default),t=C(r.height,0),l=Array.isArray(t);if(o<1)return[];if(o===1){let m=e.scaleToGeodeticSurface(n[0],B);if(t=l?t[0]:t,t!==0){let A=e.geodeticSurfaceNormal(m,D);a.multiplyByScalar(A,t,A),a.add(m,A,m)}return[m.x,m.y,m.z]}let u=C(r.granularity,E.RADIANS_PER_DEGREE),d=0,i,w=e.cartesianToCartographic(n[0],U),h;for(i=0;i<o-1;i++)h=e.cartesianToCartographic(n[i+1],et),d+=p.numberOfPointsRhumbLine(w,h,u),w=L.clone(h,U);let f=(d+1)*3,y=new Array(f),g=0;for(i=0;i<o-1;i++){let m=n[i],A=n[i+1],X=l?t[i]:t,Z=l?t[i+1]:t;g=tt(m,A,u,e,X,Z,y,g)}k.length=0;let P=n[o-1],c=e.cartesianToCartographic(P,x);c.height=l?t[o-1]:t;let s=e.cartographicToCartesian(c,D);return a.pack(s,y,f-3),y};p.generateCartesianArc=function(r){let n=p.generateArc(r),o=n.length/3,e=new Array(o);for(let t=0;t<o;t++)e[t]=a.unpack(n,t*3);return e};p.generateCartesianRhumbArc=function(r){let n=p.generateRhumbArc(r),o=n.length/3,e=new Array(o);for(let t=0;t<o;t++)e[t]=a.unpack(n,t*3);return e};var mt=p;export{mt as a}; diff --git a/cesium/Workers/chunk-EQCQ5LRI.js b/cesium/Workers/chunk-ATPDRNKI.js similarity index 97% rename from cesium/Workers/chunk-EQCQ5LRI.js rename to cesium/Workers/chunk-ATPDRNKI.js index 0953487..3433188 100644 --- a/cesium/Workers/chunk-EQCQ5LRI.js +++ b/cesium/Workers/chunk-ATPDRNKI.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * diff --git a/cesium/Workers/chunk-Y5ISG54S.js b/cesium/Workers/chunk-BMHPVZ4H.js similarity index 95% rename from cesium/Workers/chunk-Y5ISG54S.js rename to cesium/Workers/chunk-BMHPVZ4H.js index 55dd5d9..67a8ee8 100644 --- a/cesium/Workers/chunk-Y5ISG54S.js +++ b/cesium/Workers/chunk-BMHPVZ4H.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{f as C}from"./chunk-CMXCDAKR.js";import{a as n,e as b}from"./chunk-LJCGAQ64.js";import{a as w}from"./chunk-JFG572S7.js";var j={},q=new n,L=new n,Q=new C,G=new b;function W(m,O,p,S,g,_,d,f,M,s){let a=m+O;n.multiplyByScalar(S,Math.cos(a),q),n.multiplyByScalar(p,Math.sin(a),L),n.add(q,L,q);let u=Math.cos(m);u=u*u;let l=Math.sin(m);l=l*l;let h=_/Math.sqrt(d*u+g*l)/f;return C.fromAxisAngle(q,h,Q),b.fromQuaternion(Q,G),b.multiplyByVector(G,M,s),n.normalize(s,s),n.multiplyByScalar(s,f,s),s}var U=new n,Z=new n,N=new n,v=new n;j.raisePositionsToHeight=function(m,O,p){let S=O.ellipsoid,g=O.height,_=O.extrudedHeight,d=p?m.length/3*2:m.length/3,f=new Float64Array(d*3),M=m.length,s=p?M:0;for(let a=0;a<M;a+=3){let u=a+1,l=a+2,r=n.fromArray(m,a,U);S.scaleToGeodeticSurface(r,r);let h=n.clone(r,Z),x=S.geodeticSurfaceNormal(r,v),P=n.multiplyByScalar(x,g,N);n.add(r,P,r),p&&(n.multiplyByScalar(x,_,P),n.add(h,P,h),f[a+s]=h.x,f[u+s]=h.y,f[l+s]=h.z),f[a]=r.x,f[u]=r.y,f[l]=r.z}return f};var D=new n,J=new n,K=new n;j.computeEllipsePositions=function(m,O,p){let S=m.semiMinorAxis,g=m.semiMajorAxis,_=m.rotation,d=m.center,f=m.granularity*8,M=S*S,s=g*g,a=g*S,u=n.magnitude(d),l=n.normalize(d,D),r=n.cross(n.UNIT_Z,d,J);r=n.normalize(r,r);let h=n.cross(l,r,K),x=1+Math.ceil(w.PI_OVER_TWO/f),P=w.PI_OVER_TWO/(x-1),y=w.PI_OVER_TWO-x*P;y<0&&(x-=Math.ceil(Math.abs(y)/P));let k=2*(x*(x+2)),e=O?new Array(k*3):void 0,o=0,t=U,i=Z,H=x*4*3,z=H-1,A=0,c=p?new Array(H):void 0,I,T,R,E,V;for(y=w.PI_OVER_TWO,t=W(y,_,h,r,M,a,s,u,l,t),O&&(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z),p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x),y=w.PI_OVER_TWO-P,I=1;I<x+1;++I){if(t=W(y,_,h,r,M,a,s,u,l,t),i=W(Math.PI-y,_,h,r,M,a,s,u,l,i),O){for(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,R=2*I+2,T=1;T<R-1;++T)E=T/(R-1),V=n.lerp(t,i,E,N),e[o++]=V.x,e[o++]=V.y,e[o++]=V.z;e[o++]=i.x,e[o++]=i.y,e[o++]=i.z}p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x,c[A++]=i.x,c[A++]=i.y,c[A++]=i.z),y=w.PI_OVER_TWO-(I+1)*P}for(I=x;I>1;--I){if(y=w.PI_OVER_TWO-(I-1)*P,t=W(-y,_,h,r,M,a,s,u,l,t),i=W(y+Math.PI,_,h,r,M,a,s,u,l,i),O){for(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,R=2*(I-1)+2,T=1;T<R-1;++T)E=T/(R-1),V=n.lerp(t,i,E,N),e[o++]=V.x,e[o++]=V.y,e[o++]=V.z;e[o++]=i.x,e[o++]=i.y,e[o++]=i.z}p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x,c[A++]=i.x,c[A++]=i.y,c[A++]=i.z)}y=w.PI_OVER_TWO,t=W(-y,_,h,r,M,a,s,u,l,t);let B={};return O&&(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,B.positions=e,B.numPts=x),p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x,B.outerPositions=c),B};var tt=j;export{tt as a}; +import{f as C}from"./chunk-7Z5IIKOJ.js";import{a as n,e as b}from"./chunk-POASMU2N.js";import{a as w}from"./chunk-R6KGAEF6.js";var j={},q=new n,L=new n,Q=new C,G=new b;function W(m,O,p,S,g,_,d,f,M,s){let a=m+O;n.multiplyByScalar(S,Math.cos(a),q),n.multiplyByScalar(p,Math.sin(a),L),n.add(q,L,q);let u=Math.cos(m);u=u*u;let l=Math.sin(m);l=l*l;let h=_/Math.sqrt(d*u+g*l)/f;return C.fromAxisAngle(q,h,Q),b.fromQuaternion(Q,G),b.multiplyByVector(G,M,s),n.normalize(s,s),n.multiplyByScalar(s,f,s),s}var U=new n,Z=new n,N=new n,v=new n;j.raisePositionsToHeight=function(m,O,p){let S=O.ellipsoid,g=O.height,_=O.extrudedHeight,d=p?m.length/3*2:m.length/3,f=new Float64Array(d*3),M=m.length,s=p?M:0;for(let a=0;a<M;a+=3){let u=a+1,l=a+2,r=n.fromArray(m,a,U);S.scaleToGeodeticSurface(r,r);let h=n.clone(r,Z),x=S.geodeticSurfaceNormal(r,v),P=n.multiplyByScalar(x,g,N);n.add(r,P,r),p&&(n.multiplyByScalar(x,_,P),n.add(h,P,h),f[a+s]=h.x,f[u+s]=h.y,f[l+s]=h.z),f[a]=r.x,f[u]=r.y,f[l]=r.z}return f};var D=new n,J=new n,K=new n;j.computeEllipsePositions=function(m,O,p){let S=m.semiMinorAxis,g=m.semiMajorAxis,_=m.rotation,d=m.center,f=m.granularity*8,M=S*S,s=g*g,a=g*S,u=n.magnitude(d),l=n.normalize(d,D),r=n.cross(n.UNIT_Z,d,J);r=n.normalize(r,r);let h=n.cross(l,r,K),x=1+Math.ceil(w.PI_OVER_TWO/f),P=w.PI_OVER_TWO/(x-1),y=w.PI_OVER_TWO-x*P;y<0&&(x-=Math.ceil(Math.abs(y)/P));let k=2*(x*(x+2)),e=O?new Array(k*3):void 0,o=0,t=U,i=Z,H=x*4*3,z=H-1,A=0,c=p?new Array(H):void 0,I,T,R,E,V;for(y=w.PI_OVER_TWO,t=W(y,_,h,r,M,a,s,u,l,t),O&&(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z),p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x),y=w.PI_OVER_TWO-P,I=1;I<x+1;++I){if(t=W(y,_,h,r,M,a,s,u,l,t),i=W(Math.PI-y,_,h,r,M,a,s,u,l,i),O){for(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,R=2*I+2,T=1;T<R-1;++T)E=T/(R-1),V=n.lerp(t,i,E,N),e[o++]=V.x,e[o++]=V.y,e[o++]=V.z;e[o++]=i.x,e[o++]=i.y,e[o++]=i.z}p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x,c[A++]=i.x,c[A++]=i.y,c[A++]=i.z),y=w.PI_OVER_TWO-(I+1)*P}for(I=x;I>1;--I){if(y=w.PI_OVER_TWO-(I-1)*P,t=W(-y,_,h,r,M,a,s,u,l,t),i=W(y+Math.PI,_,h,r,M,a,s,u,l,i),O){for(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,R=2*(I-1)+2,T=1;T<R-1;++T)E=T/(R-1),V=n.lerp(t,i,E,N),e[o++]=V.x,e[o++]=V.y,e[o++]=V.z;e[o++]=i.x,e[o++]=i.y,e[o++]=i.z}p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x,c[A++]=i.x,c[A++]=i.y,c[A++]=i.z)}y=w.PI_OVER_TWO,t=W(-y,_,h,r,M,a,s,u,l,t);let B={};return O&&(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,B.positions=e,B.numPts=x),p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x,B.outerPositions=c),B};var tt=j;export{tt as a}; diff --git a/cesium/Workers/chunk-VHVBHB4H.js b/cesium/Workers/chunk-CBEO3SHS.js similarity index 97% rename from cesium/Workers/chunk-VHVBHB4H.js rename to cesium/Workers/chunk-CBEO3SHS.js index d5f6810..374b779 100644 --- a/cesium/Workers/chunk-VHVBHB4H.js +++ b/cesium/Workers/chunk-CBEO3SHS.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as A}from"./chunk-DUVNED7U.js";import{a as Q}from"./chunk-REUYHR24.js";import{a as ae}from"./chunk-MPVEZNKB.js";import{b as oe,c as re,d as J}from"./chunk-FATK2EQ2.js";import{b as V,d as ie}from"./chunk-3FEM743H.js";import{a as b,b as O,f as N}from"./chunk-CMXCDAKR.js";import{a as H}from"./chunk-77ESX6BV.js";import{a as r,e as u}from"./chunk-LJCGAQ64.js";import{a as P}from"./chunk-JFG572S7.js";import{a as m}from"./chunk-42NIXFVW.js";import{a as w,b as F}from"./chunk-5YVCOCPP.js";import{e as a}from"./chunk-U73D6PDD.js";function q(e){this.planes=m(e,[])}var X=[new r,new r,new r];r.clone(r.UNIT_X,X[0]);r.clone(r.UNIT_Y,X[1]);r.clone(r.UNIT_Z,X[2]);var E=new r,de=new r,fe=new Q(new r(1,0,0),0);q.fromBoundingSphere=function(e,t){if(!a(e))throw new w("boundingSphere is required.");a(t)||(t=new q);let n=X.length,f=t.planes;f.length=2*n;let p=e.center,_=e.radius,s=0;for(let y=0;y<n;++y){let i=X[y],c=f[s],d=f[s+1];a(c)||(c=f[s]=new b),a(d)||(d=f[s+1]=new b),r.multiplyByScalar(i,-_,E),r.add(p,E,E),c.x=i.x,c.y=i.y,c.z=i.z,c.w=-r.dot(i,E),r.multiplyByScalar(i,_,E),r.add(p,E,E),d.x=-i.x,d.y=-i.y,d.z=-i.z,d.w=-r.dot(r.negate(i,de),E),s+=2}return t};q.prototype.computeVisibility=function(e){if(!a(e))throw new w("boundingVolume is required.");let t=this.planes,n=!1;for(let f=0,p=t.length;f<p;++f){let _=e.intersectPlane(Q.fromCartesian4(t[f],fe));if(_===V.OUTSIDE)return V.OUTSIDE;_===V.INTERSECTING&&(n=!0)}return n?V.INTERSECTING:V.INSIDE};q.prototype.computeVisibilityWithPlaneMask=function(e,t){if(!a(e))throw new w("boundingVolume is required.");if(!a(t))throw new w("parentPlaneMask is required.");if(t===q.MASK_OUTSIDE||t===q.MASK_INSIDE)return t;let n=q.MASK_INSIDE,f=this.planes;for(let p=0,_=f.length;p<_;++p){let s=p<31?1<<p:0;if(p<31&&!(t&s))continue;let y=e.intersectPlane(Q.fromCartesian4(f[p],fe));if(y===V.OUTSIDE)return q.MASK_OUTSIDE;y===V.INTERSECTING&&(n|=s)}return n};q.MASK_OUTSIDE=4294967295;q.MASK_INSIDE=0;q.MASK_INDETERMINATE=2147483647;var $=q;function k(e){e=m(e,m.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=m(e.near,1),this._near=this.near,this.far=m(e.far,5e8),this._far=this.far,this._cullingVolume=new $,this._orthographicMatrix=new O}function ce(e){if(!a(e.right)||!a(e.left)||!a(e.top)||!a(e.bottom)||!a(e.near)||!a(e.far))throw new w("right, left, top, bottom, near, or far parameters are not set.");if(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far){if(e.left>e.right)throw new w("right must be greater than left.");if(e.bottom>e.top)throw new w("top must be greater than bottom.");if(e.near<=0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=O.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}Object.defineProperties(k.prototype,{projectionMatrix:{get:function(){return ce(this),this._orthographicMatrix}}});var me=new r,ye=new r,ge=new r,ee=new r;k.prototype.computeCullingVolume=function(e,t,n){if(!a(e))throw new w("position is required.");if(!a(t))throw new w("direction is required.");if(!a(n))throw new w("up is required.");let f=this._cullingVolume.planes,p=this.top,_=this.bottom,s=this.right,y=this.left,i=this.near,c=this.far,d=r.cross(t,n,me);r.normalize(d,d);let g=ye;r.multiplyByScalar(t,i,g),r.add(e,g,g);let l=ge;r.multiplyByScalar(d,y,l),r.add(g,l,l);let o=f[0];return a(o)||(o=f[0]=new b),o.x=d.x,o.y=d.y,o.z=d.z,o.w=-r.dot(d,l),r.multiplyByScalar(d,s,l),r.add(g,l,l),o=f[1],a(o)||(o=f[1]=new b),o.x=-d.x,o.y=-d.y,o.z=-d.z,o.w=-r.dot(r.negate(d,ee),l),r.multiplyByScalar(n,_,l),r.add(g,l,l),o=f[2],a(o)||(o=f[2]=new b),o.x=n.x,o.y=n.y,o.z=n.z,o.w=-r.dot(n,l),r.multiplyByScalar(n,p,l),r.add(g,l,l),o=f[3],a(o)||(o=f[3]=new b),o.x=-n.x,o.y=-n.y,o.z=-n.z,o.w=-r.dot(r.negate(n,ee),l),o=f[4],a(o)||(o=f[4]=new b),o.x=t.x,o.y=t.y,o.z=t.z,o.w=-r.dot(t,g),r.multiplyByScalar(t,c,l),r.add(e,l,l),o=f[5],a(o)||(o=f[5]=new b),o.x=-t.x,o.y=-t.y,o.z=-t.z,o.w=-r.dot(r.negate(t,ee),l),this._cullingVolume};k.prototype.getPixelDimensions=function(e,t,n,f,p){if(ce(this),!a(e)||!a(t))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new w("drawingBufferWidth must be greater than zero.");if(t<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!a(n))throw new w("distance is required.");if(!a(f))throw new w("pixelRatio is required.");if(f<=0)throw new w("pixelRatio must be greater than zero.");if(!a(p))throw new w("A result object is required.");let _=this.right-this.left,s=this.top-this.bottom,y=f*_/e,i=f*s/t;return p.x=y,p.y=i,p};k.prototype.clone=function(e){return a(e)||(e=new k),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};k.prototype.equals=function(e){return a(e)&&e instanceof k&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};k.prototype.equalsEpsilon=function(e,t,n){return e===this||a(e)&&e instanceof k&&P.equalsEpsilon(this.right,e.right,t,n)&&P.equalsEpsilon(this.left,e.left,t,n)&&P.equalsEpsilon(this.top,e.top,t,n)&&P.equalsEpsilon(this.bottom,e.bottom,t,n)&&P.equalsEpsilon(this.near,e.near,t,n)&&P.equalsEpsilon(this.far,e.far,t,n)};var he=k;function v(e){e=m(e,m.EMPTY_OBJECT),this._offCenterFrustum=new he,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=m(e.near,1),this._near=this.near,this.far=m(e.far,5e8),this._far=this.far}v.packedLength=4;v.pack=function(e,t,n){return F.typeOf.object("value",e),F.defined("array",t),n=m(n,0),t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t};v.unpack=function(e,t,n){return F.defined("array",e),t=m(t,0),a(n)||(n=new v),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n};function j(e){if(!a(e.width)||!a(e.aspectRatio)||!a(e.near)||!a(e.far))throw new w("width, aspectRatio, near, or far parameters are not set.");let t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){if(e.aspectRatio<0)throw new w("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;let n=1/e.aspectRatio;t.right=e.width*.5,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}Object.defineProperties(v.prototype,{projectionMatrix:{get:function(){return j(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return j(this),this._offCenterFrustum}}});v.prototype.computeCullingVolume=function(e,t,n){return j(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};v.prototype.getPixelDimensions=function(e,t,n,f,p){return j(this),this._offCenterFrustum.getPixelDimensions(e,t,n,f,p)};v.prototype.clone=function(e){return a(e)||(e=new v),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};v.prototype.equals=function(e){return!a(e)||!(e instanceof v)?!1:(j(this),j(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};v.prototype.equalsEpsilon=function(e,t,n){return!a(e)||!(e instanceof v)?!1:(j(this),j(e),P.equalsEpsilon(this.width,e.width,t,n)&&P.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var B=v;function S(e){e=m(e,m.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=m(e.near,1),this._near=this.near,this.far=m(e.far,5e8),this._far=this.far,this._cullingVolume=new $,this._perspectiveMatrix=new O,this._infinitePerspective=new O}function te(e){if(!a(e.right)||!a(e.left)||!a(e.top)||!a(e.bottom)||!a(e.near)||!a(e.far))throw new w("right, left, top, bottom, near, or far parameters are not set.");let t=e.top,n=e.bottom,f=e.right,p=e.left,_=e.near,s=e.far;if(t!==e._top||n!==e._bottom||p!==e._left||f!==e._right||_!==e._near||s!==e._far){if(e.near<=0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._left=p,e._right=f,e._top=t,e._bottom=n,e._near=_,e._far=s,e._perspectiveMatrix=O.computePerspectiveOffCenter(p,f,n,t,_,s,e._perspectiveMatrix),e._infinitePerspective=O.computeInfinitePerspectiveOffCenter(p,f,n,t,_,e._infinitePerspective)}}Object.defineProperties(S.prototype,{projectionMatrix:{get:function(){return te(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return te(this),this._infinitePerspective}}});var Ce=new r,be=new r,Pe=new r,Oe=new r;S.prototype.computeCullingVolume=function(e,t,n){if(!a(e))throw new w("position is required.");if(!a(t))throw new w("direction is required.");if(!a(n))throw new w("up is required.");let f=this._cullingVolume.planes,p=this.top,_=this.bottom,s=this.right,y=this.left,i=this.near,c=this.far,d=r.cross(t,n,Ce),g=be;r.multiplyByScalar(t,i,g),r.add(e,g,g);let l=Pe;r.multiplyByScalar(t,c,l),r.add(e,l,l);let o=Oe;r.multiplyByScalar(d,y,o),r.add(g,o,o),r.subtract(o,e,o),r.normalize(o,o),r.cross(o,n,o),r.normalize(o,o);let h=f[0];return a(h)||(h=f[0]=new b),h.x=o.x,h.y=o.y,h.z=o.z,h.w=-r.dot(o,e),r.multiplyByScalar(d,s,o),r.add(g,o,o),r.subtract(o,e,o),r.cross(n,o,o),r.normalize(o,o),h=f[1],a(h)||(h=f[1]=new b),h.x=o.x,h.y=o.y,h.z=o.z,h.w=-r.dot(o,e),r.multiplyByScalar(n,_,o),r.add(g,o,o),r.subtract(o,e,o),r.cross(d,o,o),r.normalize(o,o),h=f[2],a(h)||(h=f[2]=new b),h.x=o.x,h.y=o.y,h.z=o.z,h.w=-r.dot(o,e),r.multiplyByScalar(n,p,o),r.add(g,o,o),r.subtract(o,e,o),r.cross(o,d,o),r.normalize(o,o),h=f[3],a(h)||(h=f[3]=new b),h.x=o.x,h.y=o.y,h.z=o.z,h.w=-r.dot(o,e),h=f[4],a(h)||(h=f[4]=new b),h.x=t.x,h.y=t.y,h.z=t.z,h.w=-r.dot(t,g),r.negate(t,o),h=f[5],a(h)||(h=f[5]=new b),h.x=o.x,h.y=o.y,h.z=o.z,h.w=-r.dot(o,l),this._cullingVolume};S.prototype.getPixelDimensions=function(e,t,n,f,p){if(te(this),!a(e)||!a(t))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new w("drawingBufferWidth must be greater than zero.");if(t<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!a(n))throw new w("distance is required.");if(!a(f))throw new w("pixelRatio is required");if(f<=0)throw new w("pixelRatio must be greater than zero.");if(!a(p))throw new w("A result object is required.");let _=1/this.near,s=this.top*_,y=2*f*n*s/t;s=this.right*_;let i=2*f*n*s/e;return p.x=i,p.y=y,p};S.prototype.clone=function(e){return a(e)||(e=new S),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};S.prototype.equals=function(e){return a(e)&&e instanceof S&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};S.prototype.equalsEpsilon=function(e,t,n){return e===this||a(e)&&e instanceof S&&P.equalsEpsilon(this.right,e.right,t,n)&&P.equalsEpsilon(this.left,e.left,t,n)&&P.equalsEpsilon(this.top,e.top,t,n)&&P.equalsEpsilon(this.bottom,e.bottom,t,n)&&P.equalsEpsilon(this.near,e.near,t,n)&&P.equalsEpsilon(this.far,e.far,t,n)};var pe=S;function R(e){e=m(e,m.EMPTY_OBJECT),this._offCenterFrustum=new pe,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=m(e.near,1),this._near=this.near,this.far=m(e.far,5e8),this._far=this.far,this.xOffset=m(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=m(e.yOffset,0),this._yOffset=this.yOffset}R.packedLength=6;R.pack=function(e,t,n){return F.typeOf.object("value",e),F.defined("array",t),n=m(n,0),t[n++]=e.fov,t[n++]=e.aspectRatio,t[n++]=e.near,t[n++]=e.far,t[n++]=e.xOffset,t[n]=e.yOffset,t};R.unpack=function(e,t,n){return F.defined("array",e),t=m(t,0),a(n)||(n=new R),n.fov=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t++],n.xOffset=e[t++],n.yOffset=e[t],n};function T(e){if(!a(e.fov)||!a(e.aspectRatio)||!a(e.near)||!a(e.far))throw new w("fov, aspectRatio, near, or far parameters are not set.");let t=e._offCenterFrustum;if(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset){if(e.fov<0||e.fov>=Math.PI)throw new w("fov must be in the range [0, PI).");if(e.aspectRatio<0)throw new w("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:Math.atan(Math.tan(e.fov*.5)/e.aspectRatio)*2,e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset}}Object.defineProperties(R.prototype,{projectionMatrix:{get:function(){return T(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return T(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return T(this),this._fovy}},sseDenominator:{get:function(){return T(this),this._sseDenominator}},offCenterFrustum:{get:function(){return T(this),this._offCenterFrustum}}});R.prototype.computeCullingVolume=function(e,t,n){return T(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};R.prototype.getPixelDimensions=function(e,t,n,f,p){return T(this),this._offCenterFrustum.getPixelDimensions(e,t,n,f,p)};R.prototype.clone=function(e){return a(e)||(e=new R),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};R.prototype.equals=function(e){return!a(e)||!(e instanceof R)?!1:(T(this),T(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};R.prototype.equalsEpsilon=function(e,t,n){return!a(e)||!(e instanceof R)?!1:(T(this),T(e),P.equalsEpsilon(this.fov,e.fov,t,n)&&P.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var L=R;var I=0,Fe=1;function Y(e){F.typeOf.object("options",e),F.typeOf.object("options.frustum",e.frustum),F.typeOf.object("options.origin",e.origin),F.typeOf.object("options.orientation",e.orientation);let t=e.frustum,n=e.orientation,f=e.origin,p=m(e.vertexFormat,A.DEFAULT),_=m(e._drawNearPlane,!0),s,y;t instanceof L?(s=I,y=L.packedLength):t instanceof B&&(s=Fe,y=B.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=r.clone(f),this._orientation=N.clone(n),this._drawNearPlane=_,this._vertexFormat=p,this._workerName="createFrustumGeometry",this.packedLength=2+y+r.packedLength+N.packedLength+A.packedLength}Y.pack=function(e,t,n){F.typeOf.object("value",e),F.defined("array",t),n=m(n,0);let f=e._frustumType,p=e._frustum;return t[n++]=f,f===I?(L.pack(p,t,n),n+=L.packedLength):(B.pack(p,t,n),n+=B.packedLength),r.pack(e._origin,t,n),n+=r.packedLength,N.pack(e._orientation,t,n),n+=N.packedLength,A.pack(e._vertexFormat,t,n),n+=A.packedLength,t[n]=e._drawNearPlane?1:0,t};var xe=new L,ze=new B,ve=new N,Re=new r,qe=new A;Y.unpack=function(e,t,n){F.defined("array",e),t=m(t,0);let f=e[t++],p;f===I?(p=L.unpack(e,t,xe),t+=L.packedLength):(p=B.unpack(e,t,ze),t+=B.packedLength);let _=r.unpack(e,t,Re);t+=r.packedLength;let s=N.unpack(e,t,ve);t+=N.packedLength;let y=A.unpack(e,t,qe);t+=A.packedLength;let i=e[t]===1;if(!a(n))return new Y({frustum:p,origin:_,orientation:s,vertexFormat:y,_drawNearPlane:i});let c=f===n._frustumType?n._frustum:void 0;return n._frustum=p.clone(c),n._frustumType=f,n._origin=r.clone(_,n._origin),n._orientation=N.clone(s,n._orientation),n._vertexFormat=A.clone(y,n._vertexFormat),n._drawNearPlane=i,n};function W(e,t,n,f,p,_,s,y){let i=e/3*2;for(let c=0;c<4;++c)a(t)&&(t[e]=_.x,t[e+1]=_.y,t[e+2]=_.z),a(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),a(f)&&(f[e]=y.x,f[e+1]=y.y,f[e+2]=y.z),e+=3;p[i]=0,p[i+1]=0,p[i+2]=1,p[i+3]=0,p[i+4]=1,p[i+5]=1,p[i+6]=0,p[i+7]=1}var Te=new u,Me=new O,ne=new O,se=new r,le=new r,we=new r,ke=new r,Se=new r,De=new r,U=new Array(3),Z=new Array(4);Z[0]=new b(-1,-1,1,1);Z[1]=new b(1,-1,1,1);Z[2]=new b(1,1,1,1);Z[3]=new b(-1,1,1,1);var _e=new Array(4);for(let e=0;e<4;++e)_e[e]=new b;Y._computeNearFarPlanes=function(e,t,n,f,p,_,s,y){let i=u.fromQuaternion(t,Te),c=m(_,se),d=m(s,le),g=m(y,we);c=u.getColumn(i,0,c),d=u.getColumn(i,1,d),g=u.getColumn(i,2,g),r.normalize(c,c),r.normalize(d,d),r.normalize(g,g),r.negate(c,c);let l=O.computeView(e,g,d,c,Me),o,h,M=f.projectionMatrix;if(n===I){let x=O.multiply(M,l,ne);h=O.inverse(x,ne)}else o=O.inverseTransformation(l,ne);a(h)?(U[0]=f.near,U[1]=f.far):(U[0]=0,U[1]=f.near,U[2]=f.far);for(let x=0;x<2;++x)for(let z=0;z<4;++z){let C=b.clone(Z[z],_e[z]);if(a(h)){C=O.multiplyByVector(h,C,C);let D=1/C.w;r.multiplyByScalar(C,D,C),r.subtract(C,e,C),r.normalize(C,C);let K=r.dot(g,C);r.multiplyByScalar(C,U[x]/K,C),r.add(C,e,C)}else{let D=f.offCenterFrustum;a(D)&&(f=D);let K=U[x],G=U[x+1];C.x=(C.x*(f.right-f.left)+f.left+f.right)*.5,C.y=(C.y*(f.top-f.bottom)+f.bottom+f.top)*.5,C.z=(C.z*(K-G)-K-G)*.5,C.w=1,O.multiplyByVector(o,C,C)}p[12*x+z*3]=C.x,p[12*x+z*3+1]=C.y,p[12*x+z*3+2]=C.z}};Y.createGeometry=function(e){let t=e._frustumType,n=e._frustum,f=e._origin,p=e._orientation,_=e._drawNearPlane,s=e._vertexFormat,y=_?6:5,i=new Float64Array(3*4*6);Y._computeNearFarPlanes(f,p,t,n,i);let c=3*4*2;i[c]=i[3*4],i[c+1]=i[3*4+1],i[c+2]=i[3*4+2],i[c+3]=i[0],i[c+4]=i[1],i[c+5]=i[2],i[c+6]=i[3*3],i[c+7]=i[3*3+1],i[c+8]=i[3*3+2],i[c+9]=i[3*7],i[c+10]=i[3*7+1],i[c+11]=i[3*7+2],c+=3*4,i[c]=i[3*5],i[c+1]=i[3*5+1],i[c+2]=i[3*5+2],i[c+3]=i[3],i[c+4]=i[4],i[c+5]=i[5],i[c+6]=i[0],i[c+7]=i[1],i[c+8]=i[2],i[c+9]=i[3*4],i[c+10]=i[3*4+1],i[c+11]=i[3*4+2],c+=3*4,i[c]=i[3],i[c+1]=i[4],i[c+2]=i[5],i[c+3]=i[3*5],i[c+4]=i[3*5+1],i[c+5]=i[3*5+2],i[c+6]=i[3*6],i[c+7]=i[3*6+1],i[c+8]=i[3*6+2],i[c+9]=i[3*2],i[c+10]=i[3*2+1],i[c+11]=i[3*2+2],c+=3*4,i[c]=i[3*2],i[c+1]=i[3*2+1],i[c+2]=i[3*2+2],i[c+3]=i[3*6],i[c+4]=i[3*6+1],i[c+5]=i[3*6+2],i[c+6]=i[3*7],i[c+7]=i[3*7+1],i[c+8]=i[3*7+2],i[c+9]=i[3*3],i[c+10]=i[3*3+1],i[c+11]=i[3*3+2],_||(i=i.subarray(3*4));let d=new ae({position:new J({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:i})});if(a(s.normal)||a(s.tangent)||a(s.bitangent)||a(s.st)){let l=a(s.normal)?new Float32Array(12*y):void 0,o=a(s.tangent)?new Float32Array(3*4*y):void 0,h=a(s.bitangent)?new Float32Array(3*4*y):void 0,M=a(s.st)?new Float32Array(2*4*y):void 0,x=se,z=le,C=we,D=r.negate(x,ke),K=r.negate(z,Se),G=r.negate(C,De);c=0,_&&(W(c,l,o,h,M,G,x,z),c+=3*4),W(c,l,o,h,M,C,D,z),c+=3*4,W(c,l,o,h,M,D,G,z),c+=3*4,W(c,l,o,h,M,K,G,D),c+=3*4,W(c,l,o,h,M,x,C,z),c+=3*4,W(c,l,o,h,M,z,C,D),a(l)&&(d.normal=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:l})),a(o)&&(d.tangent=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:o})),a(h)&&(d.bitangent=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:h})),a(M)&&(d.st=new J({componentDatatype:H.FLOAT,componentsPerAttribute:2,values:M}))}let g=new Uint16Array(6*y);for(let l=0;l<y;++l){let o=l*6,h=l*4;g[o]=h,g[o+1]=h+1,g[o+2]=h+2,g[o+3]=h,g[o+4]=h+2,g[o+5]=h+3}return new re({attributes:d,indices:g,primitiveType:oe.TRIANGLES,boundingSphere:ie.fromVertices(i)})};var Et=Y;export{B as a,L as b,Et as c}; +import{a as A}from"./chunk-HEEMUCG6.js";import{a as Q}from"./chunk-PDMQLSBL.js";import{a as ae}from"./chunk-T6BE4RZK.js";import{b as oe,c as re,d as J}from"./chunk-X5IHHI6X.js";import{b as V,d as ie}from"./chunk-TMSETF7M.js";import{a as b,b as O,f as N}from"./chunk-7Z5IIKOJ.js";import{a as H}from"./chunk-KZNJOCYU.js";import{a as r,e as u}from"./chunk-POASMU2N.js";import{a as P}from"./chunk-R6KGAEF6.js";import{a as m}from"./chunk-IUA6FAOZ.js";import{a as w,b as F}from"./chunk-UH2WFNTA.js";import{e as a}from"./chunk-PEYJTJPE.js";function q(e){this.planes=m(e,[])}var X=[new r,new r,new r];r.clone(r.UNIT_X,X[0]);r.clone(r.UNIT_Y,X[1]);r.clone(r.UNIT_Z,X[2]);var E=new r,de=new r,fe=new Q(new r(1,0,0),0);q.fromBoundingSphere=function(e,t){if(!a(e))throw new w("boundingSphere is required.");a(t)||(t=new q);let n=X.length,f=t.planes;f.length=2*n;let p=e.center,_=e.radius,s=0;for(let y=0;y<n;++y){let i=X[y],c=f[s],d=f[s+1];a(c)||(c=f[s]=new b),a(d)||(d=f[s+1]=new b),r.multiplyByScalar(i,-_,E),r.add(p,E,E),c.x=i.x,c.y=i.y,c.z=i.z,c.w=-r.dot(i,E),r.multiplyByScalar(i,_,E),r.add(p,E,E),d.x=-i.x,d.y=-i.y,d.z=-i.z,d.w=-r.dot(r.negate(i,de),E),s+=2}return t};q.prototype.computeVisibility=function(e){if(!a(e))throw new w("boundingVolume is required.");let t=this.planes,n=!1;for(let f=0,p=t.length;f<p;++f){let _=e.intersectPlane(Q.fromCartesian4(t[f],fe));if(_===V.OUTSIDE)return V.OUTSIDE;_===V.INTERSECTING&&(n=!0)}return n?V.INTERSECTING:V.INSIDE};q.prototype.computeVisibilityWithPlaneMask=function(e,t){if(!a(e))throw new w("boundingVolume is required.");if(!a(t))throw new w("parentPlaneMask is required.");if(t===q.MASK_OUTSIDE||t===q.MASK_INSIDE)return t;let n=q.MASK_INSIDE,f=this.planes;for(let p=0,_=f.length;p<_;++p){let s=p<31?1<<p:0;if(p<31&&!(t&s))continue;let y=e.intersectPlane(Q.fromCartesian4(f[p],fe));if(y===V.OUTSIDE)return q.MASK_OUTSIDE;y===V.INTERSECTING&&(n|=s)}return n};q.MASK_OUTSIDE=4294967295;q.MASK_INSIDE=0;q.MASK_INDETERMINATE=2147483647;var $=q;function k(e){e=m(e,m.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=m(e.near,1),this._near=this.near,this.far=m(e.far,5e8),this._far=this.far,this._cullingVolume=new $,this._orthographicMatrix=new O}function ce(e){if(!a(e.right)||!a(e.left)||!a(e.top)||!a(e.bottom)||!a(e.near)||!a(e.far))throw new w("right, left, top, bottom, near, or far parameters are not set.");if(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far){if(e.left>e.right)throw new w("right must be greater than left.");if(e.bottom>e.top)throw new w("top must be greater than bottom.");if(e.near<=0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=O.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}Object.defineProperties(k.prototype,{projectionMatrix:{get:function(){return ce(this),this._orthographicMatrix}}});var me=new r,ye=new r,ge=new r,ee=new r;k.prototype.computeCullingVolume=function(e,t,n){if(!a(e))throw new w("position is required.");if(!a(t))throw new w("direction is required.");if(!a(n))throw new w("up is required.");let f=this._cullingVolume.planes,p=this.top,_=this.bottom,s=this.right,y=this.left,i=this.near,c=this.far,d=r.cross(t,n,me);r.normalize(d,d);let g=ye;r.multiplyByScalar(t,i,g),r.add(e,g,g);let l=ge;r.multiplyByScalar(d,y,l),r.add(g,l,l);let o=f[0];return a(o)||(o=f[0]=new b),o.x=d.x,o.y=d.y,o.z=d.z,o.w=-r.dot(d,l),r.multiplyByScalar(d,s,l),r.add(g,l,l),o=f[1],a(o)||(o=f[1]=new b),o.x=-d.x,o.y=-d.y,o.z=-d.z,o.w=-r.dot(r.negate(d,ee),l),r.multiplyByScalar(n,_,l),r.add(g,l,l),o=f[2],a(o)||(o=f[2]=new b),o.x=n.x,o.y=n.y,o.z=n.z,o.w=-r.dot(n,l),r.multiplyByScalar(n,p,l),r.add(g,l,l),o=f[3],a(o)||(o=f[3]=new b),o.x=-n.x,o.y=-n.y,o.z=-n.z,o.w=-r.dot(r.negate(n,ee),l),o=f[4],a(o)||(o=f[4]=new b),o.x=t.x,o.y=t.y,o.z=t.z,o.w=-r.dot(t,g),r.multiplyByScalar(t,c,l),r.add(e,l,l),o=f[5],a(o)||(o=f[5]=new b),o.x=-t.x,o.y=-t.y,o.z=-t.z,o.w=-r.dot(r.negate(t,ee),l),this._cullingVolume};k.prototype.getPixelDimensions=function(e,t,n,f,p){if(ce(this),!a(e)||!a(t))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new w("drawingBufferWidth must be greater than zero.");if(t<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!a(n))throw new w("distance is required.");if(!a(f))throw new w("pixelRatio is required.");if(f<=0)throw new w("pixelRatio must be greater than zero.");if(!a(p))throw new w("A result object is required.");let _=this.right-this.left,s=this.top-this.bottom,y=f*_/e,i=f*s/t;return p.x=y,p.y=i,p};k.prototype.clone=function(e){return a(e)||(e=new k),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};k.prototype.equals=function(e){return a(e)&&e instanceof k&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};k.prototype.equalsEpsilon=function(e,t,n){return e===this||a(e)&&e instanceof k&&P.equalsEpsilon(this.right,e.right,t,n)&&P.equalsEpsilon(this.left,e.left,t,n)&&P.equalsEpsilon(this.top,e.top,t,n)&&P.equalsEpsilon(this.bottom,e.bottom,t,n)&&P.equalsEpsilon(this.near,e.near,t,n)&&P.equalsEpsilon(this.far,e.far,t,n)};var he=k;function v(e){e=m(e,m.EMPTY_OBJECT),this._offCenterFrustum=new he,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=m(e.near,1),this._near=this.near,this.far=m(e.far,5e8),this._far=this.far}v.packedLength=4;v.pack=function(e,t,n){return F.typeOf.object("value",e),F.defined("array",t),n=m(n,0),t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t};v.unpack=function(e,t,n){return F.defined("array",e),t=m(t,0),a(n)||(n=new v),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n};function j(e){if(!a(e.width)||!a(e.aspectRatio)||!a(e.near)||!a(e.far))throw new w("width, aspectRatio, near, or far parameters are not set.");let t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){if(e.aspectRatio<0)throw new w("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;let n=1/e.aspectRatio;t.right=e.width*.5,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}Object.defineProperties(v.prototype,{projectionMatrix:{get:function(){return j(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return j(this),this._offCenterFrustum}}});v.prototype.computeCullingVolume=function(e,t,n){return j(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};v.prototype.getPixelDimensions=function(e,t,n,f,p){return j(this),this._offCenterFrustum.getPixelDimensions(e,t,n,f,p)};v.prototype.clone=function(e){return a(e)||(e=new v),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};v.prototype.equals=function(e){return!a(e)||!(e instanceof v)?!1:(j(this),j(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};v.prototype.equalsEpsilon=function(e,t,n){return!a(e)||!(e instanceof v)?!1:(j(this),j(e),P.equalsEpsilon(this.width,e.width,t,n)&&P.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var B=v;function S(e){e=m(e,m.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=m(e.near,1),this._near=this.near,this.far=m(e.far,5e8),this._far=this.far,this._cullingVolume=new $,this._perspectiveMatrix=new O,this._infinitePerspective=new O}function te(e){if(!a(e.right)||!a(e.left)||!a(e.top)||!a(e.bottom)||!a(e.near)||!a(e.far))throw new w("right, left, top, bottom, near, or far parameters are not set.");let t=e.top,n=e.bottom,f=e.right,p=e.left,_=e.near,s=e.far;if(t!==e._top||n!==e._bottom||p!==e._left||f!==e._right||_!==e._near||s!==e._far){if(e.near<=0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._left=p,e._right=f,e._top=t,e._bottom=n,e._near=_,e._far=s,e._perspectiveMatrix=O.computePerspectiveOffCenter(p,f,n,t,_,s,e._perspectiveMatrix),e._infinitePerspective=O.computeInfinitePerspectiveOffCenter(p,f,n,t,_,e._infinitePerspective)}}Object.defineProperties(S.prototype,{projectionMatrix:{get:function(){return te(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return te(this),this._infinitePerspective}}});var Ce=new r,be=new r,Pe=new r,Oe=new r;S.prototype.computeCullingVolume=function(e,t,n){if(!a(e))throw new w("position is required.");if(!a(t))throw new w("direction is required.");if(!a(n))throw new w("up is required.");let f=this._cullingVolume.planes,p=this.top,_=this.bottom,s=this.right,y=this.left,i=this.near,c=this.far,d=r.cross(t,n,Ce),g=be;r.multiplyByScalar(t,i,g),r.add(e,g,g);let l=Pe;r.multiplyByScalar(t,c,l),r.add(e,l,l);let o=Oe;r.multiplyByScalar(d,y,o),r.add(g,o,o),r.subtract(o,e,o),r.normalize(o,o),r.cross(o,n,o),r.normalize(o,o);let h=f[0];return a(h)||(h=f[0]=new b),h.x=o.x,h.y=o.y,h.z=o.z,h.w=-r.dot(o,e),r.multiplyByScalar(d,s,o),r.add(g,o,o),r.subtract(o,e,o),r.cross(n,o,o),r.normalize(o,o),h=f[1],a(h)||(h=f[1]=new b),h.x=o.x,h.y=o.y,h.z=o.z,h.w=-r.dot(o,e),r.multiplyByScalar(n,_,o),r.add(g,o,o),r.subtract(o,e,o),r.cross(d,o,o),r.normalize(o,o),h=f[2],a(h)||(h=f[2]=new b),h.x=o.x,h.y=o.y,h.z=o.z,h.w=-r.dot(o,e),r.multiplyByScalar(n,p,o),r.add(g,o,o),r.subtract(o,e,o),r.cross(o,d,o),r.normalize(o,o),h=f[3],a(h)||(h=f[3]=new b),h.x=o.x,h.y=o.y,h.z=o.z,h.w=-r.dot(o,e),h=f[4],a(h)||(h=f[4]=new b),h.x=t.x,h.y=t.y,h.z=t.z,h.w=-r.dot(t,g),r.negate(t,o),h=f[5],a(h)||(h=f[5]=new b),h.x=o.x,h.y=o.y,h.z=o.z,h.w=-r.dot(o,l),this._cullingVolume};S.prototype.getPixelDimensions=function(e,t,n,f,p){if(te(this),!a(e)||!a(t))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new w("drawingBufferWidth must be greater than zero.");if(t<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!a(n))throw new w("distance is required.");if(!a(f))throw new w("pixelRatio is required");if(f<=0)throw new w("pixelRatio must be greater than zero.");if(!a(p))throw new w("A result object is required.");let _=1/this.near,s=this.top*_,y=2*f*n*s/t;s=this.right*_;let i=2*f*n*s/e;return p.x=i,p.y=y,p};S.prototype.clone=function(e){return a(e)||(e=new S),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};S.prototype.equals=function(e){return a(e)&&e instanceof S&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};S.prototype.equalsEpsilon=function(e,t,n){return e===this||a(e)&&e instanceof S&&P.equalsEpsilon(this.right,e.right,t,n)&&P.equalsEpsilon(this.left,e.left,t,n)&&P.equalsEpsilon(this.top,e.top,t,n)&&P.equalsEpsilon(this.bottom,e.bottom,t,n)&&P.equalsEpsilon(this.near,e.near,t,n)&&P.equalsEpsilon(this.far,e.far,t,n)};var pe=S;function R(e){e=m(e,m.EMPTY_OBJECT),this._offCenterFrustum=new pe,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=m(e.near,1),this._near=this.near,this.far=m(e.far,5e8),this._far=this.far,this.xOffset=m(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=m(e.yOffset,0),this._yOffset=this.yOffset}R.packedLength=6;R.pack=function(e,t,n){return F.typeOf.object("value",e),F.defined("array",t),n=m(n,0),t[n++]=e.fov,t[n++]=e.aspectRatio,t[n++]=e.near,t[n++]=e.far,t[n++]=e.xOffset,t[n]=e.yOffset,t};R.unpack=function(e,t,n){return F.defined("array",e),t=m(t,0),a(n)||(n=new R),n.fov=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t++],n.xOffset=e[t++],n.yOffset=e[t],n};function T(e){if(!a(e.fov)||!a(e.aspectRatio)||!a(e.near)||!a(e.far))throw new w("fov, aspectRatio, near, or far parameters are not set.");let t=e._offCenterFrustum;if(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset){if(e.fov<0||e.fov>=Math.PI)throw new w("fov must be in the range [0, PI).");if(e.aspectRatio<0)throw new w("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:Math.atan(Math.tan(e.fov*.5)/e.aspectRatio)*2,e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset}}Object.defineProperties(R.prototype,{projectionMatrix:{get:function(){return T(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return T(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return T(this),this._fovy}},sseDenominator:{get:function(){return T(this),this._sseDenominator}},offCenterFrustum:{get:function(){return T(this),this._offCenterFrustum}}});R.prototype.computeCullingVolume=function(e,t,n){return T(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};R.prototype.getPixelDimensions=function(e,t,n,f,p){return T(this),this._offCenterFrustum.getPixelDimensions(e,t,n,f,p)};R.prototype.clone=function(e){return a(e)||(e=new R),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};R.prototype.equals=function(e){return!a(e)||!(e instanceof R)?!1:(T(this),T(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};R.prototype.equalsEpsilon=function(e,t,n){return!a(e)||!(e instanceof R)?!1:(T(this),T(e),P.equalsEpsilon(this.fov,e.fov,t,n)&&P.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var L=R;var I=0,Fe=1;function Y(e){F.typeOf.object("options",e),F.typeOf.object("options.frustum",e.frustum),F.typeOf.object("options.origin",e.origin),F.typeOf.object("options.orientation",e.orientation);let t=e.frustum,n=e.orientation,f=e.origin,p=m(e.vertexFormat,A.DEFAULT),_=m(e._drawNearPlane,!0),s,y;t instanceof L?(s=I,y=L.packedLength):t instanceof B&&(s=Fe,y=B.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=r.clone(f),this._orientation=N.clone(n),this._drawNearPlane=_,this._vertexFormat=p,this._workerName="createFrustumGeometry",this.packedLength=2+y+r.packedLength+N.packedLength+A.packedLength}Y.pack=function(e,t,n){F.typeOf.object("value",e),F.defined("array",t),n=m(n,0);let f=e._frustumType,p=e._frustum;return t[n++]=f,f===I?(L.pack(p,t,n),n+=L.packedLength):(B.pack(p,t,n),n+=B.packedLength),r.pack(e._origin,t,n),n+=r.packedLength,N.pack(e._orientation,t,n),n+=N.packedLength,A.pack(e._vertexFormat,t,n),n+=A.packedLength,t[n]=e._drawNearPlane?1:0,t};var xe=new L,ze=new B,ve=new N,Re=new r,qe=new A;Y.unpack=function(e,t,n){F.defined("array",e),t=m(t,0);let f=e[t++],p;f===I?(p=L.unpack(e,t,xe),t+=L.packedLength):(p=B.unpack(e,t,ze),t+=B.packedLength);let _=r.unpack(e,t,Re);t+=r.packedLength;let s=N.unpack(e,t,ve);t+=N.packedLength;let y=A.unpack(e,t,qe);t+=A.packedLength;let i=e[t]===1;if(!a(n))return new Y({frustum:p,origin:_,orientation:s,vertexFormat:y,_drawNearPlane:i});let c=f===n._frustumType?n._frustum:void 0;return n._frustum=p.clone(c),n._frustumType=f,n._origin=r.clone(_,n._origin),n._orientation=N.clone(s,n._orientation),n._vertexFormat=A.clone(y,n._vertexFormat),n._drawNearPlane=i,n};function W(e,t,n,f,p,_,s,y){let i=e/3*2;for(let c=0;c<4;++c)a(t)&&(t[e]=_.x,t[e+1]=_.y,t[e+2]=_.z),a(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),a(f)&&(f[e]=y.x,f[e+1]=y.y,f[e+2]=y.z),e+=3;p[i]=0,p[i+1]=0,p[i+2]=1,p[i+3]=0,p[i+4]=1,p[i+5]=1,p[i+6]=0,p[i+7]=1}var Te=new u,Me=new O,ne=new O,se=new r,le=new r,we=new r,ke=new r,Se=new r,De=new r,U=new Array(3),Z=new Array(4);Z[0]=new b(-1,-1,1,1);Z[1]=new b(1,-1,1,1);Z[2]=new b(1,1,1,1);Z[3]=new b(-1,1,1,1);var _e=new Array(4);for(let e=0;e<4;++e)_e[e]=new b;Y._computeNearFarPlanes=function(e,t,n,f,p,_,s,y){let i=u.fromQuaternion(t,Te),c=m(_,se),d=m(s,le),g=m(y,we);c=u.getColumn(i,0,c),d=u.getColumn(i,1,d),g=u.getColumn(i,2,g),r.normalize(c,c),r.normalize(d,d),r.normalize(g,g),r.negate(c,c);let l=O.computeView(e,g,d,c,Me),o,h,M=f.projectionMatrix;if(n===I){let x=O.multiply(M,l,ne);h=O.inverse(x,ne)}else o=O.inverseTransformation(l,ne);a(h)?(U[0]=f.near,U[1]=f.far):(U[0]=0,U[1]=f.near,U[2]=f.far);for(let x=0;x<2;++x)for(let z=0;z<4;++z){let C=b.clone(Z[z],_e[z]);if(a(h)){C=O.multiplyByVector(h,C,C);let D=1/C.w;r.multiplyByScalar(C,D,C),r.subtract(C,e,C),r.normalize(C,C);let K=r.dot(g,C);r.multiplyByScalar(C,U[x]/K,C),r.add(C,e,C)}else{let D=f.offCenterFrustum;a(D)&&(f=D);let K=U[x],G=U[x+1];C.x=(C.x*(f.right-f.left)+f.left+f.right)*.5,C.y=(C.y*(f.top-f.bottom)+f.bottom+f.top)*.5,C.z=(C.z*(K-G)-K-G)*.5,C.w=1,O.multiplyByVector(o,C,C)}p[12*x+z*3]=C.x,p[12*x+z*3+1]=C.y,p[12*x+z*3+2]=C.z}};Y.createGeometry=function(e){let t=e._frustumType,n=e._frustum,f=e._origin,p=e._orientation,_=e._drawNearPlane,s=e._vertexFormat,y=_?6:5,i=new Float64Array(3*4*6);Y._computeNearFarPlanes(f,p,t,n,i);let c=3*4*2;i[c]=i[3*4],i[c+1]=i[3*4+1],i[c+2]=i[3*4+2],i[c+3]=i[0],i[c+4]=i[1],i[c+5]=i[2],i[c+6]=i[3*3],i[c+7]=i[3*3+1],i[c+8]=i[3*3+2],i[c+9]=i[3*7],i[c+10]=i[3*7+1],i[c+11]=i[3*7+2],c+=3*4,i[c]=i[3*5],i[c+1]=i[3*5+1],i[c+2]=i[3*5+2],i[c+3]=i[3],i[c+4]=i[4],i[c+5]=i[5],i[c+6]=i[0],i[c+7]=i[1],i[c+8]=i[2],i[c+9]=i[3*4],i[c+10]=i[3*4+1],i[c+11]=i[3*4+2],c+=3*4,i[c]=i[3],i[c+1]=i[4],i[c+2]=i[5],i[c+3]=i[3*5],i[c+4]=i[3*5+1],i[c+5]=i[3*5+2],i[c+6]=i[3*6],i[c+7]=i[3*6+1],i[c+8]=i[3*6+2],i[c+9]=i[3*2],i[c+10]=i[3*2+1],i[c+11]=i[3*2+2],c+=3*4,i[c]=i[3*2],i[c+1]=i[3*2+1],i[c+2]=i[3*2+2],i[c+3]=i[3*6],i[c+4]=i[3*6+1],i[c+5]=i[3*6+2],i[c+6]=i[3*7],i[c+7]=i[3*7+1],i[c+8]=i[3*7+2],i[c+9]=i[3*3],i[c+10]=i[3*3+1],i[c+11]=i[3*3+2],_||(i=i.subarray(3*4));let d=new ae({position:new J({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:i})});if(a(s.normal)||a(s.tangent)||a(s.bitangent)||a(s.st)){let l=a(s.normal)?new Float32Array(12*y):void 0,o=a(s.tangent)?new Float32Array(3*4*y):void 0,h=a(s.bitangent)?new Float32Array(3*4*y):void 0,M=a(s.st)?new Float32Array(2*4*y):void 0,x=se,z=le,C=we,D=r.negate(x,ke),K=r.negate(z,Se),G=r.negate(C,De);c=0,_&&(W(c,l,o,h,M,G,x,z),c+=3*4),W(c,l,o,h,M,C,D,z),c+=3*4,W(c,l,o,h,M,D,G,z),c+=3*4,W(c,l,o,h,M,K,G,D),c+=3*4,W(c,l,o,h,M,x,C,z),c+=3*4,W(c,l,o,h,M,z,C,D),a(l)&&(d.normal=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:l})),a(o)&&(d.tangent=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:o})),a(h)&&(d.bitangent=new J({componentDatatype:H.FLOAT,componentsPerAttribute:3,values:h})),a(M)&&(d.st=new J({componentDatatype:H.FLOAT,componentsPerAttribute:2,values:M}))}let g=new Uint16Array(6*y);for(let l=0;l<y;++l){let o=l*6,h=l*4;g[o]=h,g[o+1]=h+1,g[o+2]=h+2,g[o+3]=h,g[o+4]=h+2,g[o+5]=h+3}return new re({attributes:d,indices:g,primitiveType:oe.TRIANGLES,boundingSphere:ie.fromVertices(i)})};var Et=Y;export{B as a,L as b,Et as c}; diff --git a/cesium/Workers/chunk-XXATY55N.js b/cesium/Workers/chunk-CV7DLCWG.js similarity index 95% rename from cesium/Workers/chunk-XXATY55N.js rename to cesium/Workers/chunk-CV7DLCWG.js index bc7134d..f7c8659 100644 --- a/cesium/Workers/chunk-XXATY55N.js +++ b/cesium/Workers/chunk-CV7DLCWG.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as y}from"./chunk-ED2EM7ZX.js";import{d as j}from"./chunk-3FEM743H.js";import{b as d,h as L}from"./chunk-CMXCDAKR.js";import{a as R}from"./chunk-77ESX6BV.js";import{a as s,b as W,c as T,d as q}from"./chunk-LJCGAQ64.js";import{a as w}from"./chunk-JFG572S7.js";import{a as P}from"./chunk-42NIXFVW.js";import{a as A,b as z}from"./chunk-5YVCOCPP.js";import{e as l}from"./chunk-U73D6PDD.js";function x(o,t){z.typeOf.object("ellipsoid",o),this._ellipsoid=o,this._cameraPosition=new s,this._cameraPositionInScaledSpace=new s,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(x.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,this._cameraPositionInScaledSpace),a=s.magnitudeSquared(e)-1;s.clone(o,this._cameraPosition),this._cameraPositionInScaledSpace=e,this._distanceToLimbInScaledSpaceSquared=a}}});var U=new s;x.prototype.isPointVisible=function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,U);return F(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};x.prototype.isScaledSpacePointVisible=function(o){return F(o,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var at=new s;x.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(o,t){let e=this._ellipsoid,a,i;return l(t)&&t<0&&e.minimumRadius>-t?(i=at,i.x=this._cameraPosition.x/(e.radii.x+t),i.y=this._cameraPosition.y/(e.radii.y+t),i.z=this._cameraPosition.z/(e.radii.z+t),a=i.x*i.x+i.y*i.y+i.z*i.z-1):(i=this._cameraPositionInScaledSpace,a=this._distanceToLimbInScaledSpaceSquared),F(o,i,a)};x.prototype.computeHorizonCullingPoint=function(o,t,e){return Q(this._ellipsoid,o,t,e)};var v=q.clone(q.UNIT_SPHERE);x.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(o,t,e,a){let i=Z(this._ellipsoid,e,v);return Q(i,o,t,a)};x.prototype.computeHorizonCullingPointFromVertices=function(o,t,e,a,i){return J(this._ellipsoid,o,t,e,a,i)};x.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(o,t,e,a,i,c){let n=Z(this._ellipsoid,i,v);return J(n,o,t,e,a,c)};var nt=[];x.prototype.computeHorizonCullingPointFromRectangle=function(o,t,e){z.typeOf.object("rectangle",o);let a=L.subsample(o,t,0,nt),i=j.fromPoints(a);if(!(s.magnitude(i.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(i.center,a,e)};var st=new s;function Z(o,t,e){if(l(t)&&t<0&&o.minimumRadius>-t){let a=s.fromElements(o.radii.x+t,o.radii.y+t,o.radii.z+t,st);o=q.fromCartesian3(a,e)}return o}function Q(o,t,e,a){z.typeOf.object("directionToPoint",t),z.defined("positions",e),l(a)||(a=new s);let i=Y(o,t),c=0;for(let n=0,r=e.length;n<r;++n){let m=e[n],h=K(o,m,i);if(h<0)return;c=Math.max(c,h)}return X(i,c,a)}var M=new s;function J(o,t,e,a,i,c){z.typeOf.object("directionToPoint",t),z.defined("vertices",e),z.typeOf.number("stride",a),l(c)||(c=new s),a=P(a,3),i=P(i,s.ZERO);let n=Y(o,t),r=0;for(let m=0,h=e.length;m<h;m+=a){M.x=e[m]+i.x,M.y=e[m+1]+i.y,M.z=e[m+2]+i.z;let u=K(o,M,n);if(u<0)return;r=Math.max(r,u)}return X(n,r,c)}function F(o,t,e){let a=t,i=e,c=s.subtract(o,a,U),n=-s.dot(c,a);return!(i<0?n>0:n>i&&n*n/s.magnitudeSquared(c)>i)}var ct=new s,rt=new s;function K(o,t,e){let a=o.transformPositionToScaledSpace(t,ct),i=s.magnitudeSquared(a),c=Math.sqrt(i),n=s.divideByScalar(a,c,rt);i=Math.max(1,i),c=Math.max(1,c);let r=s.dot(n,e),m=s.magnitude(s.cross(n,e,n)),h=1/c,u=Math.sqrt(i-1)*h;return 1/(r*h-m*u)}function X(o,t,e){if(!(t<=0||t===1/0||t!==t))return s.multiplyByScalar(o,t,e)}var D=new s;function Y(o,t){return s.equals(t,s.ZERO)?t:(o.transformPositionToScaledSpace(t,D),s.normalize(D,D))}var Pt=x;var O={};O.getHeight=function(o,t,e){if(!Number.isFinite(t))throw new A("scale must be a finite number.");if(!Number.isFinite(e))throw new A("relativeHeight must be a finite number.");return(o-e)*t+e};var mt=new W;O.getPosition=function(o,t,e,a,i){let c=t.cartesianToCartographic(o,mt);if(!l(c))return s.clone(o,i);let n=O.getHeight(c.height,e,a);return s.fromRadians(c.longitude,c.latitude,n,t,i)};var $=O;var dt={NONE:0,BITS12:1},S=Object.freeze(dt);var C=new s,lt=new s,f=new T,V=new d,ht=new d,pt=Math.pow(2,12);function p(o,t,e,a,i,c,n,r,m,h){let u=S.NONE,g,N;if(l(t)&&l(e)&&l(a)&&l(i)){let E=t.minimum,I=t.maximum,_=s.subtract(I,E,lt),tt=a-e;Math.max(s.maximumComponent(_),tt)<pt-1?u=S.BITS12:u=S.NONE,g=d.inverseTransformation(i,new d);let ot=s.negate(E,C);d.multiply(d.fromTranslation(ot,V),g,g);let b=C;b.x=1/_.x,b.y=1/_.y,b.z=1/_.z,d.multiply(d.fromScale(b,V),g,g),N=d.clone(i),d.setTranslation(N,s.ZERO,N),i=d.clone(i,new d);let et=d.fromTranslation(E,V),it=d.fromScale(_,ht),k=d.multiply(et,it,V);d.multiply(i,k,i),d.multiply(N,k,N)}this.quantization=u,this.minimumHeight=e,this.maximumHeight=a,this.center=s.clone(o),this.toScaledENU=g,this.fromScaledENU=i,this.matrix=N,this.hasVertexNormals=c,this.hasWebMercatorT=P(n,!1),this.hasGeodeticSurfaceNormals=P(r,!1),this.exaggeration=P(m,1),this.exaggerationRelativeHeight=P(h,0),this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}p.prototype.encode=function(o,t,e,a,i,c,n,r){let m=a.x,h=a.y;if(this.quantization===S.BITS12){e=d.multiplyByPoint(this.toScaledENU,e,C),e.x=w.clamp(e.x,0,1),e.y=w.clamp(e.y,0,1),e.z=w.clamp(e.z,0,1);let u=this.maximumHeight-this.minimumHeight,g=w.clamp((i-this.minimumHeight)/u,0,1);T.fromElements(e.x,e.y,f);let N=y.compressTextureCoordinates(f);T.fromElements(e.z,g,f);let E=y.compressTextureCoordinates(f);T.fromElements(m,h,f);let I=y.compressTextureCoordinates(f);if(o[t++]=N,o[t++]=E,o[t++]=I,this.hasWebMercatorT){T.fromElements(n,0,f);let _=y.compressTextureCoordinates(f);o[t++]=_}}else s.subtract(e,this.center,C),o[t++]=C.x,o[t++]=C.y,o[t++]=C.z,o[t++]=i,o[t++]=m,o[t++]=h,this.hasWebMercatorT&&(o[t++]=n);return this.hasVertexNormals&&(o[t++]=y.octPackFloat(c)),this.hasGeodeticSurfaceNormals&&(o[t++]=r.x,o[t++]=r.y,o[t++]=r.z),t};var ut=new s,B=new s;p.prototype.addGeodeticSurfaceNormals=function(o,t,e){if(this.hasGeodeticSurfaceNormals)return;let a=this.stride,i=o.length/a;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let c=this.stride;for(let n=0;n<i;n++){for(let u=0;u<a;u++){let g=n*a+u,N=n*c+u;t[N]=o[g]}let r=this.decodePosition(t,n,ut),m=e.geodeticSurfaceNormal(r,B),h=n*c+this._offsetGeodeticSurfaceNormal;t[h]=m.x,t[h+1]=m.y,t[h+2]=m.z}};p.prototype.removeGeodeticSurfaceNormals=function(o,t){if(!this.hasGeodeticSurfaceNormals)return;let e=this.stride,a=o.length/e;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let i=this.stride;for(let c=0;c<a;c++)for(let n=0;n<i;n++){let r=c*e+n,m=c*i+n;t[m]=o[r]}};p.prototype.decodePosition=function(o,t,e){if(l(e)||(e=new s),t*=this.stride,this.quantization===S.BITS12){let a=y.decompressTextureCoordinates(o[t],f);e.x=a.x,e.y=a.y;let i=y.decompressTextureCoordinates(o[t+1],f);return e.z=i.x,d.multiplyByPoint(this.fromScaledENU,e,e)}return e.x=o[t],e.y=o[t+1],e.z=o[t+2],s.add(e,this.center,e)};p.prototype.getExaggeratedPosition=function(o,t,e){e=this.decodePosition(o,t,e);let a=this.exaggeration,i=this.exaggerationRelativeHeight;if(a!==1&&this.hasGeodeticSurfaceNormals){let n=this.decodeGeodeticSurfaceNormal(o,t,B),r=this.decodeHeight(o,t),m=$.getHeight(r,a,i)-r;e.x+=n.x*m,e.y+=n.y*m,e.z+=n.z*m}return e};p.prototype.decodeTextureCoordinates=function(o,t,e){return l(e)||(e=new T),t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+2],e):T.fromElements(o[t+4],o[t+5],e)};p.prototype.decodeHeight=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+1],f).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:o[t+3]};p.prototype.decodeWebMercatorT=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+3],f).x:o[t+6]};p.prototype.getOctEncodedNormal=function(o,t,e){t=t*this.stride+this._offsetVertexNormal;let a=o[t]/256,i=Math.floor(a),c=(a-i)*256;return T.fromElements(i,c,e)};p.prototype.decodeGeodeticSurfaceNormal=function(o,t,e){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,e.x=o[t],e.y=o[t+1],e.z=o[t+2],e};p.prototype._calculateStrideAndOffsets=function(){let o=0;switch(this.quantization){case S.BITS12:o+=3;break;default:o+=6}this.hasWebMercatorT&&(o+=1),this.hasVertexNormals&&(this._offsetVertexNormal=o,o+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=o,o+=3),this.stride=o};var G={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},H={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};p.prototype.getAttributes=function(o){let t=R.FLOAT,e=R.getSizeInBytes(t),a=this.stride*e,i=0,c=[];function n(r,m){c.push({index:r,vertexBuffer:o,componentDatatype:t,componentsPerAttribute:m,offsetInBytes:i,strideInBytes:a}),i+=m*e}if(this.quantization===S.NONE){n(G.position3DAndHeight,4);let r=2;r+=this.hasWebMercatorT?1:0,r+=this.hasVertexNormals?1:0,n(G.textureCoordAndEncodedNormals,r),this.hasGeodeticSurfaceNormals&&n(G.geodeticSurfaceNormal,3)}else{let r=this.hasWebMercatorT||this.hasVertexNormals,m=this.hasWebMercatorT&&this.hasVertexNormals;n(H.compressed0,r?4:3),m&&n(H.compressed1,1),this.hasGeodeticSurfaceNormals&&n(H.geodeticSurfaceNormal,3)}return c};p.prototype.getAttributeLocations=function(){return this.quantization===S.NONE?G:H};p.clone=function(o,t){if(l(o))return l(t)||(t=new p),t.quantization=o.quantization,t.minimumHeight=o.minimumHeight,t.maximumHeight=o.maximumHeight,t.center=s.clone(o.center),t.toScaledENU=d.clone(o.toScaledENU),t.fromScaledENU=d.clone(o.fromScaledENU),t.matrix=d.clone(o.matrix),t.hasVertexNormals=o.hasVertexNormals,t.hasWebMercatorT=o.hasWebMercatorT,t.hasGeodeticSurfaceNormals=o.hasGeodeticSurfaceNormals,t.exaggeration=o.exaggeration,t.exaggerationRelativeHeight=o.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var Wt=p;export{Pt as a,Wt as b}; +import{a as y}from"./chunk-ABGXSJNX.js";import{d as j}from"./chunk-TMSETF7M.js";import{b as d,h as L}from"./chunk-7Z5IIKOJ.js";import{a as R}from"./chunk-KZNJOCYU.js";import{a as s,b as W,c as T,d as q}from"./chunk-POASMU2N.js";import{a as w}from"./chunk-R6KGAEF6.js";import{a as P}from"./chunk-IUA6FAOZ.js";import{a as A,b as z}from"./chunk-UH2WFNTA.js";import{e as l}from"./chunk-PEYJTJPE.js";function x(o,t){z.typeOf.object("ellipsoid",o),this._ellipsoid=o,this._cameraPosition=new s,this._cameraPositionInScaledSpace=new s,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(x.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,this._cameraPositionInScaledSpace),a=s.magnitudeSquared(e)-1;s.clone(o,this._cameraPosition),this._cameraPositionInScaledSpace=e,this._distanceToLimbInScaledSpaceSquared=a}}});var U=new s;x.prototype.isPointVisible=function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,U);return F(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};x.prototype.isScaledSpacePointVisible=function(o){return F(o,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var at=new s;x.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(o,t){let e=this._ellipsoid,a,i;return l(t)&&t<0&&e.minimumRadius>-t?(i=at,i.x=this._cameraPosition.x/(e.radii.x+t),i.y=this._cameraPosition.y/(e.radii.y+t),i.z=this._cameraPosition.z/(e.radii.z+t),a=i.x*i.x+i.y*i.y+i.z*i.z-1):(i=this._cameraPositionInScaledSpace,a=this._distanceToLimbInScaledSpaceSquared),F(o,i,a)};x.prototype.computeHorizonCullingPoint=function(o,t,e){return Q(this._ellipsoid,o,t,e)};var v=q.clone(q.UNIT_SPHERE);x.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(o,t,e,a){let i=Z(this._ellipsoid,e,v);return Q(i,o,t,a)};x.prototype.computeHorizonCullingPointFromVertices=function(o,t,e,a,i){return J(this._ellipsoid,o,t,e,a,i)};x.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(o,t,e,a,i,c){let n=Z(this._ellipsoid,i,v);return J(n,o,t,e,a,c)};var nt=[];x.prototype.computeHorizonCullingPointFromRectangle=function(o,t,e){z.typeOf.object("rectangle",o);let a=L.subsample(o,t,0,nt),i=j.fromPoints(a);if(!(s.magnitude(i.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(i.center,a,e)};var st=new s;function Z(o,t,e){if(l(t)&&t<0&&o.minimumRadius>-t){let a=s.fromElements(o.radii.x+t,o.radii.y+t,o.radii.z+t,st);o=q.fromCartesian3(a,e)}return o}function Q(o,t,e,a){z.typeOf.object("directionToPoint",t),z.defined("positions",e),l(a)||(a=new s);let i=Y(o,t),c=0;for(let n=0,r=e.length;n<r;++n){let m=e[n],h=K(o,m,i);if(h<0)return;c=Math.max(c,h)}return X(i,c,a)}var M=new s;function J(o,t,e,a,i,c){z.typeOf.object("directionToPoint",t),z.defined("vertices",e),z.typeOf.number("stride",a),l(c)||(c=new s),a=P(a,3),i=P(i,s.ZERO);let n=Y(o,t),r=0;for(let m=0,h=e.length;m<h;m+=a){M.x=e[m]+i.x,M.y=e[m+1]+i.y,M.z=e[m+2]+i.z;let u=K(o,M,n);if(u<0)return;r=Math.max(r,u)}return X(n,r,c)}function F(o,t,e){let a=t,i=e,c=s.subtract(o,a,U),n=-s.dot(c,a);return!(i<0?n>0:n>i&&n*n/s.magnitudeSquared(c)>i)}var ct=new s,rt=new s;function K(o,t,e){let a=o.transformPositionToScaledSpace(t,ct),i=s.magnitudeSquared(a),c=Math.sqrt(i),n=s.divideByScalar(a,c,rt);i=Math.max(1,i),c=Math.max(1,c);let r=s.dot(n,e),m=s.magnitude(s.cross(n,e,n)),h=1/c,u=Math.sqrt(i-1)*h;return 1/(r*h-m*u)}function X(o,t,e){if(!(t<=0||t===1/0||t!==t))return s.multiplyByScalar(o,t,e)}var D=new s;function Y(o,t){return s.equals(t,s.ZERO)?t:(o.transformPositionToScaledSpace(t,D),s.normalize(D,D))}var Pt=x;var O={};O.getHeight=function(o,t,e){if(!Number.isFinite(t))throw new A("scale must be a finite number.");if(!Number.isFinite(e))throw new A("relativeHeight must be a finite number.");return(o-e)*t+e};var mt=new W;O.getPosition=function(o,t,e,a,i){let c=t.cartesianToCartographic(o,mt);if(!l(c))return s.clone(o,i);let n=O.getHeight(c.height,e,a);return s.fromRadians(c.longitude,c.latitude,n,t,i)};var $=O;var dt={NONE:0,BITS12:1},S=Object.freeze(dt);var C=new s,lt=new s,f=new T,V=new d,ht=new d,pt=Math.pow(2,12);function p(o,t,e,a,i,c,n,r,m,h){let u=S.NONE,g,N;if(l(t)&&l(e)&&l(a)&&l(i)){let E=t.minimum,I=t.maximum,_=s.subtract(I,E,lt),tt=a-e;Math.max(s.maximumComponent(_),tt)<pt-1?u=S.BITS12:u=S.NONE,g=d.inverseTransformation(i,new d);let ot=s.negate(E,C);d.multiply(d.fromTranslation(ot,V),g,g);let b=C;b.x=1/_.x,b.y=1/_.y,b.z=1/_.z,d.multiply(d.fromScale(b,V),g,g),N=d.clone(i),d.setTranslation(N,s.ZERO,N),i=d.clone(i,new d);let et=d.fromTranslation(E,V),it=d.fromScale(_,ht),k=d.multiply(et,it,V);d.multiply(i,k,i),d.multiply(N,k,N)}this.quantization=u,this.minimumHeight=e,this.maximumHeight=a,this.center=s.clone(o),this.toScaledENU=g,this.fromScaledENU=i,this.matrix=N,this.hasVertexNormals=c,this.hasWebMercatorT=P(n,!1),this.hasGeodeticSurfaceNormals=P(r,!1),this.exaggeration=P(m,1),this.exaggerationRelativeHeight=P(h,0),this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}p.prototype.encode=function(o,t,e,a,i,c,n,r){let m=a.x,h=a.y;if(this.quantization===S.BITS12){e=d.multiplyByPoint(this.toScaledENU,e,C),e.x=w.clamp(e.x,0,1),e.y=w.clamp(e.y,0,1),e.z=w.clamp(e.z,0,1);let u=this.maximumHeight-this.minimumHeight,g=w.clamp((i-this.minimumHeight)/u,0,1);T.fromElements(e.x,e.y,f);let N=y.compressTextureCoordinates(f);T.fromElements(e.z,g,f);let E=y.compressTextureCoordinates(f);T.fromElements(m,h,f);let I=y.compressTextureCoordinates(f);if(o[t++]=N,o[t++]=E,o[t++]=I,this.hasWebMercatorT){T.fromElements(n,0,f);let _=y.compressTextureCoordinates(f);o[t++]=_}}else s.subtract(e,this.center,C),o[t++]=C.x,o[t++]=C.y,o[t++]=C.z,o[t++]=i,o[t++]=m,o[t++]=h,this.hasWebMercatorT&&(o[t++]=n);return this.hasVertexNormals&&(o[t++]=y.octPackFloat(c)),this.hasGeodeticSurfaceNormals&&(o[t++]=r.x,o[t++]=r.y,o[t++]=r.z),t};var ut=new s,B=new s;p.prototype.addGeodeticSurfaceNormals=function(o,t,e){if(this.hasGeodeticSurfaceNormals)return;let a=this.stride,i=o.length/a;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let c=this.stride;for(let n=0;n<i;n++){for(let u=0;u<a;u++){let g=n*a+u,N=n*c+u;t[N]=o[g]}let r=this.decodePosition(t,n,ut),m=e.geodeticSurfaceNormal(r,B),h=n*c+this._offsetGeodeticSurfaceNormal;t[h]=m.x,t[h+1]=m.y,t[h+2]=m.z}};p.prototype.removeGeodeticSurfaceNormals=function(o,t){if(!this.hasGeodeticSurfaceNormals)return;let e=this.stride,a=o.length/e;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let i=this.stride;for(let c=0;c<a;c++)for(let n=0;n<i;n++){let r=c*e+n,m=c*i+n;t[m]=o[r]}};p.prototype.decodePosition=function(o,t,e){if(l(e)||(e=new s),t*=this.stride,this.quantization===S.BITS12){let a=y.decompressTextureCoordinates(o[t],f);e.x=a.x,e.y=a.y;let i=y.decompressTextureCoordinates(o[t+1],f);return e.z=i.x,d.multiplyByPoint(this.fromScaledENU,e,e)}return e.x=o[t],e.y=o[t+1],e.z=o[t+2],s.add(e,this.center,e)};p.prototype.getExaggeratedPosition=function(o,t,e){e=this.decodePosition(o,t,e);let a=this.exaggeration,i=this.exaggerationRelativeHeight;if(a!==1&&this.hasGeodeticSurfaceNormals){let n=this.decodeGeodeticSurfaceNormal(o,t,B),r=this.decodeHeight(o,t),m=$.getHeight(r,a,i)-r;e.x+=n.x*m,e.y+=n.y*m,e.z+=n.z*m}return e};p.prototype.decodeTextureCoordinates=function(o,t,e){return l(e)||(e=new T),t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+2],e):T.fromElements(o[t+4],o[t+5],e)};p.prototype.decodeHeight=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+1],f).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:o[t+3]};p.prototype.decodeWebMercatorT=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+3],f).x:o[t+6]};p.prototype.getOctEncodedNormal=function(o,t,e){t=t*this.stride+this._offsetVertexNormal;let a=o[t]/256,i=Math.floor(a),c=(a-i)*256;return T.fromElements(i,c,e)};p.prototype.decodeGeodeticSurfaceNormal=function(o,t,e){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,e.x=o[t],e.y=o[t+1],e.z=o[t+2],e};p.prototype._calculateStrideAndOffsets=function(){let o=0;switch(this.quantization){case S.BITS12:o+=3;break;default:o+=6}this.hasWebMercatorT&&(o+=1),this.hasVertexNormals&&(this._offsetVertexNormal=o,o+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=o,o+=3),this.stride=o};var G={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},H={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};p.prototype.getAttributes=function(o){let t=R.FLOAT,e=R.getSizeInBytes(t),a=this.stride*e,i=0,c=[];function n(r,m){c.push({index:r,vertexBuffer:o,componentDatatype:t,componentsPerAttribute:m,offsetInBytes:i,strideInBytes:a}),i+=m*e}if(this.quantization===S.NONE){n(G.position3DAndHeight,4);let r=2;r+=this.hasWebMercatorT?1:0,r+=this.hasVertexNormals?1:0,n(G.textureCoordAndEncodedNormals,r),this.hasGeodeticSurfaceNormals&&n(G.geodeticSurfaceNormal,3)}else{let r=this.hasWebMercatorT||this.hasVertexNormals,m=this.hasWebMercatorT&&this.hasVertexNormals;n(H.compressed0,r?4:3),m&&n(H.compressed1,1),this.hasGeodeticSurfaceNormals&&n(H.geodeticSurfaceNormal,3)}return c};p.prototype.getAttributeLocations=function(){return this.quantization===S.NONE?G:H};p.clone=function(o,t){if(l(o))return l(t)||(t=new p),t.quantization=o.quantization,t.minimumHeight=o.minimumHeight,t.maximumHeight=o.maximumHeight,t.center=s.clone(o.center),t.toScaledENU=d.clone(o.toScaledENU),t.fromScaledENU=d.clone(o.fromScaledENU),t.matrix=d.clone(o.matrix),t.hasVertexNormals=o.hasVertexNormals,t.hasWebMercatorT=o.hasWebMercatorT,t.hasGeodeticSurfaceNormals=o.hasGeodeticSurfaceNormals,t.exaggeration=o.exaggeration,t.exaggerationRelativeHeight=o.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var Wt=p;export{Pt as a,Wt as b}; diff --git a/cesium/Workers/chunk-YZP3DYN3.js b/cesium/Workers/chunk-DQO6B4EQ.js similarity index 91% rename from cesium/Workers/chunk-YZP3DYN3.js rename to cesium/Workers/chunk-DQO6B4EQ.js index c995369..3da0c0a 100644 --- a/cesium/Workers/chunk-YZP3DYN3.js +++ b/cesium/Workers/chunk-DQO6B4EQ.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as c}from"./chunk-LJCGAQ64.js";import{b as t}from"./chunk-5YVCOCPP.js";import{e as g}from"./chunk-U73D6PDD.js";function f(){this.high=c.clone(c.ZERO),this.low=c.clone(c.ZERO)}f.encode=function(n,o){t.typeOf.number("value",n),g(o)||(o={high:0,low:0});let h;return n>=0?(h=Math.floor(n/65536)*65536,o.high=h,o.low=n-h):(h=Math.floor(-n/65536)*65536,o.high=-h,o.low=n+h),o};var e={high:0,low:0};f.fromCartesian=function(n,o){t.typeOf.object("cartesian",n),g(o)||(o=new f);let h=o.high,i=o.low;return f.encode(n.x,e),h.x=e.high,i.x=e.low,f.encode(n.y,e),h.y=e.high,i.y=e.low,f.encode(n.z,e),h.z=e.high,i.z=e.low,o};var m=new f;f.writeElements=function(n,o,h){t.defined("cartesianArray",o),t.typeOf.number("index",h),t.typeOf.number.greaterThanOrEquals("index",h,0),f.fromCartesian(n,m);let i=m.high,w=m.low;o[h]=i.x,o[h+1]=i.y,o[h+2]=i.z,o[h+3]=w.x,o[h+4]=w.y,o[h+5]=w.z};var O=f;export{O as a}; +import{a as c}from"./chunk-POASMU2N.js";import{b as t}from"./chunk-UH2WFNTA.js";import{e as g}from"./chunk-PEYJTJPE.js";function f(){this.high=c.clone(c.ZERO),this.low=c.clone(c.ZERO)}f.encode=function(n,o){t.typeOf.number("value",n),g(o)||(o={high:0,low:0});let h;return n>=0?(h=Math.floor(n/65536)*65536,o.high=h,o.low=n-h):(h=Math.floor(-n/65536)*65536,o.high=-h,o.low=n+h),o};var e={high:0,low:0};f.fromCartesian=function(n,o){t.typeOf.object("cartesian",n),g(o)||(o=new f);let h=o.high,i=o.low;return f.encode(n.x,e),h.x=e.high,i.x=e.low,f.encode(n.y,e),h.y=e.high,i.y=e.low,f.encode(n.z,e),h.z=e.high,i.z=e.low,o};var m=new f;f.writeElements=function(n,o,h){t.defined("cartesianArray",o),t.typeOf.number("index",h),t.typeOf.number.greaterThanOrEquals("index",h,0),f.fromCartesian(n,m);let i=m.high,w=m.low;o[h]=i.x,o[h+1]=i.y,o[h+2]=i.z,o[h+3]=w.x,o[h+4]=w.y,o[h+5]=w.z};var O=f;export{O as a}; diff --git a/cesium/Workers/chunk-7KKODWB2.js b/cesium/Workers/chunk-ED3TLP6D.js similarity index 90% rename from cesium/Workers/chunk-7KKODWB2.js rename to cesium/Workers/chunk-ED3TLP6D.js index 0173c74..55f86a5 100644 --- a/cesium/Workers/chunk-7KKODWB2.js +++ b/cesium/Workers/chunk-ED3TLP6D.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as h}from"./chunk-K62YE2WO.js";import{a as n,c as y,e as a}from"./chunk-LJCGAQ64.js";import{b as f}from"./chunk-5YVCOCPP.js";var x={},b=new n,P=new n,B=new n,M=new n,w=new h;x.validOutline=function(i){f.defined("positions",i);let o=h.fromPoints(i,w).halfAxes,e=a.getColumn(o,0,P),r=a.getColumn(o,1,B),t=a.getColumn(o,2,M),u=n.magnitude(e),s=n.magnitude(r),l=n.magnitude(t);return!(u===0&&(s===0||l===0)||s===0&&l===0)};x.computeProjectTo2DArguments=function(i,c,o,e){f.defined("positions",i),f.defined("centerResult",c),f.defined("planeAxis1Result",o),f.defined("planeAxis2Result",e);let r=h.fromPoints(i,w),t=r.halfAxes,u=a.getColumn(t,0,P),s=a.getColumn(t,1,B),l=a.getColumn(t,2,M),A=n.magnitude(u),d=n.magnitude(s),g=n.magnitude(l),m=Math.min(A,d,g);if(A===0&&(d===0||g===0)||d===0&&g===0)return!1;let p,C;return(m===d||m===g)&&(p=u),m===A?p=s:m===g&&(C=s),(m===A||m===d)&&(C=l),n.normalize(p,o),n.normalize(C,e),n.clone(r.center,c),!0};function z(i,c,o,e,r){let t=n.subtract(i,c,b),u=n.dot(o,t),s=n.dot(e,t);return y.fromElements(u,s,r)}x.createProjectPointsTo2DFunction=function(i,c,o){return function(e){let r=new Array(e.length);for(let t=0;t<e.length;t++)r[t]=z(e[t],i,c,o);return r}};x.createProjectPointTo2DFunction=function(i,c,o){return function(e,r){return z(e,i,c,o,r)}};var O=x;export{O as a}; +import{a as h}from"./chunk-Q6L7X3LP.js";import{a as n,c as y,e as a}from"./chunk-POASMU2N.js";import{b as f}from"./chunk-UH2WFNTA.js";var x={},b=new n,P=new n,B=new n,M=new n,w=new h;x.validOutline=function(i){f.defined("positions",i);let o=h.fromPoints(i,w).halfAxes,e=a.getColumn(o,0,P),r=a.getColumn(o,1,B),t=a.getColumn(o,2,M),u=n.magnitude(e),s=n.magnitude(r),l=n.magnitude(t);return!(u===0&&(s===0||l===0)||s===0&&l===0)};x.computeProjectTo2DArguments=function(i,c,o,e){f.defined("positions",i),f.defined("centerResult",c),f.defined("planeAxis1Result",o),f.defined("planeAxis2Result",e);let r=h.fromPoints(i,w),t=r.halfAxes,u=a.getColumn(t,0,P),s=a.getColumn(t,1,B),l=a.getColumn(t,2,M),A=n.magnitude(u),d=n.magnitude(s),g=n.magnitude(l),m=Math.min(A,d,g);if(A===0&&(d===0||g===0)||d===0&&g===0)return!1;let p,C;return(m===d||m===g)&&(p=u),m===A?p=s:m===g&&(C=s),(m===A||m===d)&&(C=l),n.normalize(p,o),n.normalize(C,e),n.clone(r.center,c),!0};function z(i,c,o,e,r){let t=n.subtract(i,c,b),u=n.dot(o,t),s=n.dot(e,t);return y.fromElements(u,s,r)}x.createProjectPointsTo2DFunction=function(i,c,o){return function(e){let r=new Array(e.length);for(let t=0;t<e.length;t++)r[t]=z(e[t],i,c,o);return r}};x.createProjectPointTo2DFunction=function(i,c,o){return function(e,r){return z(e,i,c,o,r)}};var O=x;export{O as a}; diff --git a/cesium/Workers/chunk-CRFMECNE.js b/cesium/Workers/chunk-EFZKO5RU.js similarity index 84% rename from cesium/Workers/chunk-CRFMECNE.js rename to cesium/Workers/chunk-EFZKO5RU.js index b49d0f7..29ad2a6 100644 --- a/cesium/Workers/chunk-CRFMECNE.js +++ b/cesium/Workers/chunk-EFZKO5RU.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{b as t}from"./chunk-CMXCDAKR.js";import{a as r}from"./chunk-42NIXFVW.js";import{a as m}from"./chunk-5YVCOCPP.js";import{e as i}from"./chunk-U73D6PDD.js";function d(e){if(e=r(e,r.EMPTY_OBJECT),!i(e.geometry))throw new m("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=t.clone(r(e.modelMatrix,t.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=r(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var s=d;export{s as a}; +import{b as t}from"./chunk-7Z5IIKOJ.js";import{a as r}from"./chunk-IUA6FAOZ.js";import{a as m}from"./chunk-UH2WFNTA.js";import{e as i}from"./chunk-PEYJTJPE.js";function d(e){if(e=r(e,r.EMPTY_OBJECT),!i(e.geometry))throw new m("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=t.clone(r(e.modelMatrix,t.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=r(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var s=d;export{s as a}; diff --git a/cesium/Workers/chunk-5DM27XHE.js b/cesium/Workers/chunk-F5IHREXR.js similarity index 99% rename from cesium/Workers/chunk-5DM27XHE.js rename to cesium/Workers/chunk-F5IHREXR.js index b3ccf99..e04d3f2 100644 --- a/cesium/Workers/chunk-5DM27XHE.js +++ b/cesium/Workers/chunk-F5IHREXR.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as fn,c as Tn}from"./chunk-U73D6PDD.js";var Dn=Tn((nt,bt)=>{var _=_||{};_.scope={};_.arrayIteratorImpl=function(p){var c=0;return function(){return c<p.length?{done:!1,value:p[c++]}:{done:!0}}};_.arrayIterator=function(p){return{next:_.arrayIteratorImpl(p)}};_.makeIterator=function(p){var c=typeof Symbol<"u"&&Symbol.iterator&&p[Symbol.iterator];return c?c.call(p):_.arrayIterator(p)};_.ASSUME_ES5=!1;_.ASSUME_NO_NATIVE_MAP=!1;_.ASSUME_NO_NATIVE_SET=!1;_.SIMPLE_FROUND_POLYFILL=!1;_.ISOLATE_POLYFILLS=!1;_.FORCE_POLYFILL_PROMISE=!1;_.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;_.getGlobal=function(p){p=[typeof globalThis=="object"&&globalThis,p,typeof window=="object"&&window,typeof self=="object"&&self,typeof global=="object"&&global];for(var c=0;c<p.length;++c){var s=p[c];if(s&&s.Math==Math)return s}throw Error("Cannot find global object")};_.global=_.getGlobal(nt);_.defineProperty=_.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(p,c,s){return p==Array.prototype||p==Object.prototype||(p[c]=s.value),p};_.IS_SYMBOL_NATIVE=typeof Symbol=="function"&&typeof Symbol("x")=="symbol";_.TRUST_ES6_POLYFILLS=!_.ISOLATE_POLYFILLS||_.IS_SYMBOL_NATIVE;_.polyfills={};_.propertyToPolyfillSymbol={};_.POLYFILL_PREFIX="$jscp$";_.polyfill=function(p,c,s,y){c&&(_.ISOLATE_POLYFILLS?_.polyfillIsolated(p,c,s,y):_.polyfillUnisolated(p,c,s,y))};_.polyfillUnisolated=function(p,c,s,y){for(s=_.global,p=p.split("."),y=0;y<p.length-1;y++){var a=p[y];if(!(a in s))return;s=s[a]}p=p[p.length-1],y=s[p],c=c(y),c!=y&&c!=null&&_.defineProperty(s,p,{configurable:!0,writable:!0,value:c})};_.polyfillIsolated=function(p,c,s,y){var a=p.split(".");p=a.length===1,y=a[0],y=!p&&y in _.polyfills?_.polyfills:_.global;for(var g=0;g<a.length-1;g++){var i=a[g];if(!(i in y))return;y=y[i]}a=a[a.length-1],s=_.IS_SYMBOL_NATIVE&&s==="es6"?y[a]:null,c=c(s),c!=null&&(p?_.defineProperty(_.polyfills,a,{configurable:!0,writable:!0,value:c}):c!==s&&(_.propertyToPolyfillSymbol[a]===void 0&&(s=1e9*Math.random()>>>0,_.propertyToPolyfillSymbol[a]=_.IS_SYMBOL_NATIVE?_.global.Symbol(a):_.POLYFILL_PREFIX+s+"$"+a),_.defineProperty(y,_.propertyToPolyfillSymbol[a],{configurable:!0,writable:!0,value:c})))};_.polyfill("Promise",function(p){function c(){this.batch_=null}function s(i){return i instanceof a?i:new a(function(l,h){l(i)})}if(p&&(!(_.FORCE_POLYFILL_PROMISE||_.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&typeof _.global.PromiseRejectionEvent>"u")||!_.global.Promise||_.global.Promise.toString().indexOf("[native code]")===-1))return p;c.prototype.asyncExecute=function(i){if(this.batch_==null){this.batch_=[];var l=this;this.asyncExecuteFunction(function(){l.executeBatch_()})}this.batch_.push(i)};var y=_.global.setTimeout;c.prototype.asyncExecuteFunction=function(i){y(i,0)},c.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var i=this.batch_;this.batch_=[];for(var l=0;l<i.length;++l){var h=i[l];i[l]=null;try{h()}catch(I){this.asyncThrow_(I)}}}this.batch_=null},c.prototype.asyncThrow_=function(i){this.asyncExecuteFunction(function(){throw i})};var a=function(i){this.state_=0,this.result_=void 0,this.onSettledCallbacks_=[],this.isRejectionHandled_=!1;var l=this.createResolveAndReject_();try{i(l.resolve,l.reject)}catch(h){l.reject(h)}};a.prototype.createResolveAndReject_=function(){function i(I){return function(C){h||(h=!0,I.call(l,C))}}var l=this,h=!1;return{resolve:i(this.resolveTo_),reject:i(this.reject_)}},a.prototype.resolveTo_=function(i){if(i===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(i instanceof a)this.settleSameAsPromise_(i);else{t:switch(typeof i){case"object":var l=i!=null;break t;case"function":l=!0;break t;default:l=!1}l?this.resolveToNonPromiseObj_(i):this.fulfill_(i)}},a.prototype.resolveToNonPromiseObj_=function(i){var l=void 0;try{l=i.then}catch(h){this.reject_(h);return}typeof l=="function"?this.settleSameAsThenable_(l,i):this.fulfill_(i)},a.prototype.reject_=function(i){this.settle_(2,i)},a.prototype.fulfill_=function(i){this.settle_(1,i)},a.prototype.settle_=function(i,l){if(this.state_!=0)throw Error("Cannot settle("+i+", "+l+"): Promise already settled in state"+this.state_);this.state_=i,this.result_=l,this.state_===2&&this.scheduleUnhandledRejectionCheck_(),this.executeOnSettledCallbacks_()},a.prototype.scheduleUnhandledRejectionCheck_=function(){var i=this;y(function(){if(i.notifyUnhandledRejection_()){var l=_.global.console;typeof l<"u"&&l.error(i.result_)}},1)},a.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var i=_.global.CustomEvent,l=_.global.Event,h=_.global.dispatchEvent;return typeof h>"u"?!0:(typeof i=="function"?i=new i("unhandledrejection",{cancelable:!0}):typeof l=="function"?i=new l("unhandledrejection",{cancelable:!0}):(i=_.global.document.createEvent("CustomEvent"),i.initCustomEvent("unhandledrejection",!1,!0,i)),i.promise=this,i.reason=this.result_,h(i))},a.prototype.executeOnSettledCallbacks_=function(){if(this.onSettledCallbacks_!=null){for(var i=0;i<this.onSettledCallbacks_.length;++i)g.asyncExecute(this.onSettledCallbacks_[i]);this.onSettledCallbacks_=null}};var g=new c;return a.prototype.settleSameAsPromise_=function(i){var l=this.createResolveAndReject_();i.callWhenSettled_(l.resolve,l.reject)},a.prototype.settleSameAsThenable_=function(i,l){var h=this.createResolveAndReject_();try{i.call(l,h.resolve,h.reject)}catch(I){h.reject(I)}},a.prototype.then=function(i,l){function h(f,T){return typeof f=="function"?function(G){try{I(f(G))}catch(V){C(V)}}:T}var I,C,K=new a(function(f,T){I=f,C=T});return this.callWhenSettled_(h(i,I),h(l,C)),K},a.prototype.catch=function(i){return this.then(void 0,i)},a.prototype.callWhenSettled_=function(i,l){function h(){switch(I.state_){case 1:i(I.result_);break;case 2:l(I.result_);break;default:throw Error("Unexpected state: "+I.state_)}}var I=this;this.onSettledCallbacks_==null?g.asyncExecute(h):this.onSettledCallbacks_.push(h),this.isRejectionHandled_=!0},a.resolve=s,a.reject=function(i){return new a(function(l,h){h(i)})},a.race=function(i){return new a(function(l,h){for(var I=_.makeIterator(i),C=I.next();!C.done;C=I.next())s(C.value).callWhenSettled_(l,h)})},a.all=function(i){var l=_.makeIterator(i),h=l.next();return h.done?s([]):new a(function(I,C){function K(G){return function(V){f[G]=V,T--,T==0&&I(f)}}var f=[],T=0;do f.push(void 0),T++,s(h.value).callWhenSettled_(K(f.length-1),C),h=l.next();while(!h.done)})},a},"es6","es3");_.owns=function(p,c){return Object.prototype.hasOwnProperty.call(p,c)};_.assign=_.TRUST_ES6_POLYFILLS&&typeof Object.assign=="function"?Object.assign:function(p,c){for(var s=1;s<arguments.length;s++){var y=arguments[s];if(y)for(var a in y)_.owns(y,a)&&(p[a]=y[a])}return p};_.polyfill("Object.assign",function(p){return p||_.assign},"es6","es3");_.checkStringArgs=function(p,c,s){if(p==null)throw new TypeError("The 'this' value for String.prototype."+s+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+s+" must not be a regular expression");return p+""};_.polyfill("String.prototype.startsWith",function(p){return p||function(c,s){var y=_.checkStringArgs(this,c,"startsWith");c+="";var a=y.length,g=c.length;s=Math.max(0,Math.min(s|0,y.length));for(var i=0;i<g&&s<a;)if(y[s++]!=c[i++])return!1;return i>=g}},"es6","es3");_.polyfill("Array.prototype.copyWithin",function(p){function c(s){return s=Number(s),s===1/0||s===-1/0?s:s|0}return p||function(s,y,a){var g=this.length;if(s=c(s),y=c(y),a=a===void 0?g:c(a),s=0>s?Math.max(g+s,0):Math.min(s,g),y=0>y?Math.max(g+y,0):Math.min(y,g),a=0>a?Math.max(g+a,0):Math.min(a,g),s<y)for(;y<a;)y in this?this[s++]=this[y++]:(delete this[s++],y++);else for(a=Math.min(a,g+y-s),s+=a-y;a>y;)--a in this?this[--s]=this[a]:delete this[--s];return this}},"es6","es3");_.typedArrayCopyWithin=function(p){return p||Array.prototype.copyWithin};_.polyfill("Int8Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint8Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint8ClampedArray.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Int16Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint16Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Int32Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint32Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Float32Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Float64Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");var dt=function(){var p=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(p=p||__filename),function(c){function s(e){return t.locateFile?t.locateFile(e,Q):Q+e}function y(e,r,n){var o=r+n;for(n=r;e[n]&&!(n>=o);)++n;if(16<n-r&&e.buffer&&Ot)return Ot.decode(e.subarray(r,n));for(o="";r<n;){var m=e[r++];if(m&128){var b=e[r++]&63;if((m&224)==192)o+=String.fromCharCode((m&31)<<6|b);else{var X=e[r++]&63;m=(m&240)==224?(m&15)<<12|b<<6|X:(m&7)<<18|b<<12|X<<6|e[r++]&63,65536>m?o+=String.fromCharCode(m):(m-=65536,o+=String.fromCharCode(55296|m>>10,56320|m&1023))}}else o+=String.fromCharCode(m)}return o}function a(e,r){return e?y(tt,e,r):""}function g(){var e=_t.buffer;t.HEAP8=q=new Int8Array(e),t.HEAP16=new Int16Array(e),t.HEAP32=et=new Int32Array(e),t.HEAPU8=tt=new Uint8Array(e),t.HEAPU16=new Uint16Array(e),t.HEAPU32=x=new Uint32Array(e),t.HEAPF32=new Float32Array(e),t.HEAPF64=new Float64Array(e)}function i(e){throw t.onAbort&&t.onAbort(e),e="Aborted("+e+")",J(e),Gt=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),ot(e),e}function l(e){try{if(e==z&&Z)return new Uint8Array(Z);if(ut)return ut(e);throw"both async and sync fetching of the wasm failed"}catch(r){i(r)}}function h(){if(!Z&&(It||$)){if(typeof fetch=="function"&&!z.startsWith("file://"))return fetch(z,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+z+"'";return e.arrayBuffer()}).catch(function(){return l(z)});if(st)return new Promise(function(e,r){st(z,function(n){e(new Uint8Array(n))},r)})}return Promise.resolve().then(function(){return l(z)})}function I(e){for(;0<e.length;)e.shift()(t)}function C(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(r){x[this.ptr+4>>2]=r},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(r){x[this.ptr+8>>2]=r},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(r){et[this.ptr>>2]=r},this.set_caught=function(r){q[this.ptr+12>>0]=r?1:0},this.get_caught=function(){return q[this.ptr+12>>0]!=0},this.set_rethrown=function(r){q[this.ptr+13>>0]=r?1:0},this.get_rethrown=function(){return q[this.ptr+13>>0]!=0},this.init=function(r,n){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(n),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){et[this.ptr>>2]+=1},this.release_ref=function(){var r=et[this.ptr>>2];return et[this.ptr>>2]=r-1,r===1},this.set_adjusted_ptr=function(r){x[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){if(ln(this.get_type()))return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function K(){function e(){if(!it&&(it=!0,t.calledRun=!0,!Gt)){if(Rt=!0,I(ct),ht(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Pt.unshift(t.postRun.shift());I(Pt)}}if(!(0<k)){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)jt.unshift(t.preRun.shift());I(jt),0<k||(t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),e()},1)):e())}}function f(){}function T(e){return(e||f).__cache__}function G(e,r){var n=T(r),o=n[e];return o||(o=Object.create((r||f).prototype),o.ptr=e,n[e]=o)}function V(e){if(typeof e=="string"){for(var r=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);127>=o?r++:2047>=o?r+=2:55296<=o&&57343>=o?(r+=4,++n):r+=3}if(r=Array(r+1),n=0,o=r.length,0<o){o=n+o-1;for(var m=0;m<e.length;++m){var b=e.charCodeAt(m);if(55296<=b&&57343>=b){var X=e.charCodeAt(++m);b=65536+((b&1023)<<10)|X&1023}if(127>=b){if(n>=o)break;r[n++]=b}else{if(2047>=b){if(n+1>=o)break;r[n++]=192|b>>6}else{if(65535>=b){if(n+2>=o)break;r[n++]=224|b>>12}else{if(n+3>=o)break;r[n++]=240|b>>18,r[n++]=128|b>>12&63}r[n++]=128|b>>6&63}r[n++]=128|b&63}}r[n]=0}return e=d.alloc(r,q),d.copy(r,q,e),e}return e}function at(e){if(typeof e=="object"){var r=d.alloc(e,q);return d.copy(e,q,r),r}return e}function H(){throw"cannot construct a VoidPtr, no constructor in IDL"}function B(){this.ptr=Mt(),T(B)[this.ptr]=this}function w(){this.ptr=Ft(),T(w)[this.ptr]=this}function Y(){this.ptr=wt(),T(Y)[this.ptr]=this}function A(){this.ptr=Vt(),T(A)[this.ptr]=this}function E(){this.ptr=Jt(),T(E)[this.ptr]=this}function j(){this.ptr=ne(),T(j)[this.ptr]=this}function P(){this.ptr=ae(),T(P)[this.ptr]=this}function O(){this.ptr=ce(),T(O)[this.ptr]=this}function W(){this.ptr=de(),T(W)[this.ptr]=this}function v(){throw"cannot construct a Status, no constructor in IDL"}function R(){this.ptr=Ie(),T(R)[this.ptr]=this}function S(){this.ptr=Ge(),T(S)[this.ptr]=this}function M(){this.ptr=Re(),T(M)[this.ptr]=this}function N(){this.ptr=Ue(),T(N)[this.ptr]=this}function U(){this.ptr=we(),T(U)[this.ptr]=this}function F(){this.ptr=We(),T(F)[this.ptr]=this}function L(){this.ptr=He(),T(L)[this.ptr]=this}function D(){this.ptr=Ke(),T(D)[this.ptr]=this}function u(){this.ptr=_r(),T(u)[this.ptr]=this}c=c===void 0?{}:c;var t=typeof c<"u"?c:{},ht,ot;t.ready=new Promise(function(e,r){ht=e,ot=r});var At=!1,Tt=!1;t.onRuntimeInitialized=function(){At=!0,Tt&&typeof t.onModuleLoaded=="function"&&t.onModuleLoaded(t)},t.onModuleParsed=function(){Tt=!0,At&&typeof t.onModuleLoaded=="function"&&t.onModuleLoaded(t)},t.isVersionSupported=function(e){return typeof e!="string"?!1:(e=e.split("."),2>e.length||3<e.length?!1:e[0]==1&&0<=e[1]&&5>=e[1]?!0:!(e[0]!=0||10<e[1]))};var Dt=Object.assign({},t),It=typeof window=="object",$=typeof importScripts=="function",gt=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Q="";if(gt){var vt=fn("fs"),pt=fn("path");Q=$?pt.dirname(Q)+"/":__dirname+"/";var Et=function(e,r){return e=e.startsWith("file://")?new URL(e):pt.normalize(e),vt.readFileSync(e,r?void 0:"utf8")},ut=function(e){return e=Et(e,!0),e.buffer||(e=new Uint8Array(e)),e},st=function(e,r,n){e=e.startsWith("file://")?new URL(e):pt.normalize(e),vt.readFile(e,function(o,m){o?n(o):r(m.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),t.inspect=function(){return"[Emscripten Module object]"}}else(It||$)&&($?Q=self.location.href:typeof document<"u"&&document.currentScript&&(Q=document.currentScript.src),p&&(Q=p),Q=Q.indexOf("blob:")!==0?Q.substr(0,Q.replace(/[?#].*/,"").lastIndexOf("/")+1):"",Et=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},$&&(ut=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),st=function(e,r,n){var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="arraybuffer",o.onload=function(){o.status==200||o.status==0&&o.response?r(o.response):n()},o.onerror=n,o.send(null)});var dn=t.print||console.log.bind(console),J=t.printErr||console.warn.bind(console);Object.assign(t,Dt),Dt=null;var Z;t.wasmBinary&&(Z=t.wasmBinary),typeof WebAssembly!="object"&&i("no native wasm support detected");var _t,Gt=!1,Ot=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,q,tt,et,x,jt=[],ct=[],Pt=[],Rt=!1,k=0,yt=null,rt=null,z="draco_decoder.wasm";z.startsWith("data:application/octet-stream;base64,")||(z=s(z));var bn=0,hn=[null,[],[]],An={b:function(e,r,n){throw new C(e).init(r,n),bn++,e},a:function(){i("")},g:function(e,r,n){tt.copyWithin(e,r,r+n)},e:function(e){var r=tt.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var o=r*(1+.2/n);o=Math.min(o,e+100663296);var m=Math;o=Math.max(e,o),m=m.min.call(m,2147483648,o+(65536-o%65536)%65536);t:{o=_t.buffer;try{_t.grow(m-o.byteLength+65535>>>16),g();var b=1;break t}catch{}b=void 0}if(b)return!0}return!1},f:function(e){return 52},d:function(e,r,n,o,m){return 70},c:function(e,r,n,o){for(var m=0,b=0;b<n;b++){var X=x[r>>2],mn=x[r+4>>2];r+=8;for(var lt=0;lt<mn;lt++){var mt=tt[X+lt],ft=hn[e];mt===0||mt===10?((e===1?dn:J)(y(ft,0)),ft.length=0):ft.push(mt)}m+=mn}return x[o>>2]=m,0}};(function(){function e(m,b){t.asm=m.exports,_t=t.asm.h,g(),ct.unshift(t.asm.i),k--,t.monitorRunDependencies&&t.monitorRunDependencies(k),k==0&&(yt!==null&&(clearInterval(yt),yt=null),rt&&(m=rt,rt=null,m()))}function r(m){e(m.instance)}function n(m){return h().then(function(b){return WebAssembly.instantiate(b,o)}).then(function(b){return b}).then(m,function(b){J("failed to asynchronously prepare wasm: "+b),i(b)})}var o={a:An};if(k++,t.monitorRunDependencies&&t.monitorRunDependencies(k),t.instantiateWasm)try{return t.instantiateWasm(o,e)}catch(m){J("Module.instantiateWasm callback failed with error: "+m),ot(m)}return function(){return Z||typeof WebAssembly.instantiateStreaming!="function"||z.startsWith("data:application/octet-stream;base64,")||z.startsWith("file://")||gt||typeof fetch!="function"?n(r):fetch(z,{credentials:"same-origin"}).then(function(m){return WebAssembly.instantiateStreaming(m,o).then(r,function(b){return J("wasm streaming compile failed: "+b),J("falling back to ArrayBuffer instantiation"),n(r)})})}().catch(ot),{}})();var St=t._emscripten_bind_VoidPtr___destroy___0=function(){return(St=t._emscripten_bind_VoidPtr___destroy___0=t.asm.k).apply(null,arguments)},Mt=t._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(Mt=t._emscripten_bind_DecoderBuffer_DecoderBuffer_0=t.asm.l).apply(null,arguments)},Nt=t._emscripten_bind_DecoderBuffer_Init_2=function(){return(Nt=t._emscripten_bind_DecoderBuffer_Init_2=t.asm.m).apply(null,arguments)},Ut=t._emscripten_bind_DecoderBuffer___destroy___0=function(){return(Ut=t._emscripten_bind_DecoderBuffer___destroy___0=t.asm.n).apply(null,arguments)},Ft=t._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Ft=t._emscripten_bind_AttributeTransformData_AttributeTransformData_0=t.asm.o).apply(null,arguments)},Lt=t._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(Lt=t._emscripten_bind_AttributeTransformData_transform_type_0=t.asm.p).apply(null,arguments)},Ct=t._emscripten_bind_AttributeTransformData___destroy___0=function(){return(Ct=t._emscripten_bind_AttributeTransformData___destroy___0=t.asm.q).apply(null,arguments)},wt=t._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(wt=t._emscripten_bind_GeometryAttribute_GeometryAttribute_0=t.asm.r).apply(null,arguments)},zt=t._emscripten_bind_GeometryAttribute___destroy___0=function(){return(zt=t._emscripten_bind_GeometryAttribute___destroy___0=t.asm.s).apply(null,arguments)},Vt=t._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Vt=t._emscripten_bind_PointAttribute_PointAttribute_0=t.asm.t).apply(null,arguments)},Bt=t._emscripten_bind_PointAttribute_size_0=function(){return(Bt=t._emscripten_bind_PointAttribute_size_0=t.asm.u).apply(null,arguments)},Wt=t._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(Wt=t._emscripten_bind_PointAttribute_GetAttributeTransformData_0=t.asm.v).apply(null,arguments)},Qt=t._emscripten_bind_PointAttribute_attribute_type_0=function(){return(Qt=t._emscripten_bind_PointAttribute_attribute_type_0=t.asm.w).apply(null,arguments)},xt=t._emscripten_bind_PointAttribute_data_type_0=function(){return(xt=t._emscripten_bind_PointAttribute_data_type_0=t.asm.x).apply(null,arguments)},Yt=t._emscripten_bind_PointAttribute_num_components_0=function(){return(Yt=t._emscripten_bind_PointAttribute_num_components_0=t.asm.y).apply(null,arguments)},Ht=t._emscripten_bind_PointAttribute_normalized_0=function(){return(Ht=t._emscripten_bind_PointAttribute_normalized_0=t.asm.z).apply(null,arguments)},qt=t._emscripten_bind_PointAttribute_byte_stride_0=function(){return(qt=t._emscripten_bind_PointAttribute_byte_stride_0=t.asm.A).apply(null,arguments)},kt=t._emscripten_bind_PointAttribute_byte_offset_0=function(){return(kt=t._emscripten_bind_PointAttribute_byte_offset_0=t.asm.B).apply(null,arguments)},Xt=t._emscripten_bind_PointAttribute_unique_id_0=function(){return(Xt=t._emscripten_bind_PointAttribute_unique_id_0=t.asm.C).apply(null,arguments)},Kt=t._emscripten_bind_PointAttribute___destroy___0=function(){return(Kt=t._emscripten_bind_PointAttribute___destroy___0=t.asm.D).apply(null,arguments)},Jt=t._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Jt=t._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=t.asm.E).apply(null,arguments)},$t=t._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return($t=t._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=t.asm.F).apply(null,arguments)},Zt=t._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(Zt=t._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=t.asm.G).apply(null,arguments)},te=t._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(te=t._emscripten_bind_AttributeQuantizationTransform_min_value_1=t.asm.H).apply(null,arguments)},ee=t._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(ee=t._emscripten_bind_AttributeQuantizationTransform_range_0=t.asm.I).apply(null,arguments)},re=t._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(re=t._emscripten_bind_AttributeQuantizationTransform___destroy___0=t.asm.J).apply(null,arguments)},ne=t._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(ne=t._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=t.asm.K).apply(null,arguments)},oe=t._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(oe=t._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=t.asm.L).apply(null,arguments)},_e=t._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(_e=t._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=t.asm.M).apply(null,arguments)},ie=t._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(ie=t._emscripten_bind_AttributeOctahedronTransform___destroy___0=t.asm.N).apply(null,arguments)},ae=t._emscripten_bind_PointCloud_PointCloud_0=function(){return(ae=t._emscripten_bind_PointCloud_PointCloud_0=t.asm.O).apply(null,arguments)},pe=t._emscripten_bind_PointCloud_num_attributes_0=function(){return(pe=t._emscripten_bind_PointCloud_num_attributes_0=t.asm.P).apply(null,arguments)},ue=t._emscripten_bind_PointCloud_num_points_0=function(){return(ue=t._emscripten_bind_PointCloud_num_points_0=t.asm.Q).apply(null,arguments)},se=t._emscripten_bind_PointCloud___destroy___0=function(){return(se=t._emscripten_bind_PointCloud___destroy___0=t.asm.R).apply(null,arguments)},ce=t._emscripten_bind_Mesh_Mesh_0=function(){return(ce=t._emscripten_bind_Mesh_Mesh_0=t.asm.S).apply(null,arguments)},ye=t._emscripten_bind_Mesh_num_faces_0=function(){return(ye=t._emscripten_bind_Mesh_num_faces_0=t.asm.T).apply(null,arguments)},le=t._emscripten_bind_Mesh_num_attributes_0=function(){return(le=t._emscripten_bind_Mesh_num_attributes_0=t.asm.U).apply(null,arguments)},me=t._emscripten_bind_Mesh_num_points_0=function(){return(me=t._emscripten_bind_Mesh_num_points_0=t.asm.V).apply(null,arguments)},fe=t._emscripten_bind_Mesh___destroy___0=function(){return(fe=t._emscripten_bind_Mesh___destroy___0=t.asm.W).apply(null,arguments)},de=t._emscripten_bind_Metadata_Metadata_0=function(){return(de=t._emscripten_bind_Metadata_Metadata_0=t.asm.X).apply(null,arguments)},be=t._emscripten_bind_Metadata___destroy___0=function(){return(be=t._emscripten_bind_Metadata___destroy___0=t.asm.Y).apply(null,arguments)},he=t._emscripten_bind_Status_code_0=function(){return(he=t._emscripten_bind_Status_code_0=t.asm.Z).apply(null,arguments)},Ae=t._emscripten_bind_Status_ok_0=function(){return(Ae=t._emscripten_bind_Status_ok_0=t.asm._).apply(null,arguments)},Te=t._emscripten_bind_Status_error_msg_0=function(){return(Te=t._emscripten_bind_Status_error_msg_0=t.asm.$).apply(null,arguments)},De=t._emscripten_bind_Status___destroy___0=function(){return(De=t._emscripten_bind_Status___destroy___0=t.asm.aa).apply(null,arguments)},Ie=t._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ie=t._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=t.asm.ba).apply(null,arguments)},ge=t._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(ge=t._emscripten_bind_DracoFloat32Array_GetValue_1=t.asm.ca).apply(null,arguments)},ve=t._emscripten_bind_DracoFloat32Array_size_0=function(){return(ve=t._emscripten_bind_DracoFloat32Array_size_0=t.asm.da).apply(null,arguments)},Ee=t._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Ee=t._emscripten_bind_DracoFloat32Array___destroy___0=t.asm.ea).apply(null,arguments)},Ge=t._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ge=t._emscripten_bind_DracoInt8Array_DracoInt8Array_0=t.asm.fa).apply(null,arguments)},Oe=t._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Oe=t._emscripten_bind_DracoInt8Array_GetValue_1=t.asm.ga).apply(null,arguments)},je=t._emscripten_bind_DracoInt8Array_size_0=function(){return(je=t._emscripten_bind_DracoInt8Array_size_0=t.asm.ha).apply(null,arguments)},Pe=t._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Pe=t._emscripten_bind_DracoInt8Array___destroy___0=t.asm.ia).apply(null,arguments)},Re=t._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Re=t._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=t.asm.ja).apply(null,arguments)},Se=t._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Se=t._emscripten_bind_DracoUInt8Array_GetValue_1=t.asm.ka).apply(null,arguments)},Me=t._emscripten_bind_DracoUInt8Array_size_0=function(){return(Me=t._emscripten_bind_DracoUInt8Array_size_0=t.asm.la).apply(null,arguments)},Ne=t._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Ne=t._emscripten_bind_DracoUInt8Array___destroy___0=t.asm.ma).apply(null,arguments)},Ue=t._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Ue=t._emscripten_bind_DracoInt16Array_DracoInt16Array_0=t.asm.na).apply(null,arguments)},Fe=t._emscripten_bind_DracoInt16Array_GetValue_1=function(){return(Fe=t._emscripten_bind_DracoInt16Array_GetValue_1=t.asm.oa).apply(null,arguments)},Le=t._emscripten_bind_DracoInt16Array_size_0=function(){return(Le=t._emscripten_bind_DracoInt16Array_size_0=t.asm.pa).apply(null,arguments)},Ce=t._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Ce=t._emscripten_bind_DracoInt16Array___destroy___0=t.asm.qa).apply(null,arguments)},we=t._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(we=t._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=t.asm.ra).apply(null,arguments)},ze=t._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(ze=t._emscripten_bind_DracoUInt16Array_GetValue_1=t.asm.sa).apply(null,arguments)},Ve=t._emscripten_bind_DracoUInt16Array_size_0=function(){return(Ve=t._emscripten_bind_DracoUInt16Array_size_0=t.asm.ta).apply(null,arguments)},Be=t._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Be=t._emscripten_bind_DracoUInt16Array___destroy___0=t.asm.ua).apply(null,arguments)},We=t._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(We=t._emscripten_bind_DracoInt32Array_DracoInt32Array_0=t.asm.va).apply(null,arguments)},Qe=t._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(Qe=t._emscripten_bind_DracoInt32Array_GetValue_1=t.asm.wa).apply(null,arguments)},xe=t._emscripten_bind_DracoInt32Array_size_0=function(){return(xe=t._emscripten_bind_DracoInt32Array_size_0=t.asm.xa).apply(null,arguments)},Ye=t._emscripten_bind_DracoInt32Array___destroy___0=function(){return(Ye=t._emscripten_bind_DracoInt32Array___destroy___0=t.asm.ya).apply(null,arguments)},He=t._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(He=t._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=t.asm.za).apply(null,arguments)},qe=t._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(qe=t._emscripten_bind_DracoUInt32Array_GetValue_1=t.asm.Aa).apply(null,arguments)},ke=t._emscripten_bind_DracoUInt32Array_size_0=function(){return(ke=t._emscripten_bind_DracoUInt32Array_size_0=t.asm.Ba).apply(null,arguments)},Xe=t._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(Xe=t._emscripten_bind_DracoUInt32Array___destroy___0=t.asm.Ca).apply(null,arguments)},Ke=t._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Ke=t._emscripten_bind_MetadataQuerier_MetadataQuerier_0=t.asm.Da).apply(null,arguments)},Je=t._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(Je=t._emscripten_bind_MetadataQuerier_HasEntry_2=t.asm.Ea).apply(null,arguments)},$e=t._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return($e=t._emscripten_bind_MetadataQuerier_GetIntEntry_2=t.asm.Fa).apply(null,arguments)},Ze=t._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(Ze=t._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=t.asm.Ga).apply(null,arguments)},tr=t._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(tr=t._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=t.asm.Ha).apply(null,arguments)},er=t._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(er=t._emscripten_bind_MetadataQuerier_GetStringEntry_2=t.asm.Ia).apply(null,arguments)},rr=t._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(rr=t._emscripten_bind_MetadataQuerier_NumEntries_1=t.asm.Ja).apply(null,arguments)},nr=t._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(nr=t._emscripten_bind_MetadataQuerier_GetEntryName_2=t.asm.Ka).apply(null,arguments)},or=t._emscripten_bind_MetadataQuerier___destroy___0=function(){return(or=t._emscripten_bind_MetadataQuerier___destroy___0=t.asm.La).apply(null,arguments)},_r=t._emscripten_bind_Decoder_Decoder_0=function(){return(_r=t._emscripten_bind_Decoder_Decoder_0=t.asm.Ma).apply(null,arguments)},ir=t._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(ir=t._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=t.asm.Na).apply(null,arguments)},ar=t._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(ar=t._emscripten_bind_Decoder_DecodeArrayToMesh_3=t.asm.Oa).apply(null,arguments)},pr=t._emscripten_bind_Decoder_GetAttributeId_2=function(){return(pr=t._emscripten_bind_Decoder_GetAttributeId_2=t.asm.Pa).apply(null,arguments)},ur=t._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(ur=t._emscripten_bind_Decoder_GetAttributeIdByName_2=t.asm.Qa).apply(null,arguments)},sr=t._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(sr=t._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=t.asm.Ra).apply(null,arguments)},cr=t._emscripten_bind_Decoder_GetAttribute_2=function(){return(cr=t._emscripten_bind_Decoder_GetAttribute_2=t.asm.Sa).apply(null,arguments)},yr=t._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(yr=t._emscripten_bind_Decoder_GetAttributeByUniqueId_2=t.asm.Ta).apply(null,arguments)},lr=t._emscripten_bind_Decoder_GetMetadata_1=function(){return(lr=t._emscripten_bind_Decoder_GetMetadata_1=t.asm.Ua).apply(null,arguments)},mr=t._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(mr=t._emscripten_bind_Decoder_GetAttributeMetadata_2=t.asm.Va).apply(null,arguments)},fr=t._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(fr=t._emscripten_bind_Decoder_GetFaceFromMesh_3=t.asm.Wa).apply(null,arguments)},dr=t._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(dr=t._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=t.asm.Xa).apply(null,arguments)},br=t._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(br=t._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=t.asm.Ya).apply(null,arguments)},hr=t._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(hr=t._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=t.asm.Za).apply(null,arguments)},Ar=t._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(Ar=t._emscripten_bind_Decoder_GetAttributeFloat_3=t.asm._a).apply(null,arguments)},Tr=t._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(Tr=t._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=t.asm.$a).apply(null,arguments)},Dr=t._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(Dr=t._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=t.asm.ab).apply(null,arguments)},Ir=t._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(Ir=t._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=t.asm.bb).apply(null,arguments)},gr=t._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(gr=t._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=t.asm.cb).apply(null,arguments)},vr=t._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(vr=t._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=t.asm.db).apply(null,arguments)},Er=t._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Er=t._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=t.asm.eb).apply(null,arguments)},Gr=t._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Gr=t._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=t.asm.fb).apply(null,arguments)},Or=t._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Or=t._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=t.asm.gb).apply(null,arguments)},jr=t._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(jr=t._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=t.asm.hb).apply(null,arguments)},Pr=t._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Pr=t._emscripten_bind_Decoder_SkipAttributeTransform_1=t.asm.ib).apply(null,arguments)},Rr=t._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Rr=t._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=t.asm.jb).apply(null,arguments)},Sr=t._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Sr=t._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=t.asm.kb).apply(null,arguments)},Mr=t._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Mr=t._emscripten_bind_Decoder_DecodeBufferToMesh_2=t.asm.lb).apply(null,arguments)},Nr=t._emscripten_bind_Decoder___destroy___0=function(){return(Nr=t._emscripten_bind_Decoder___destroy___0=t.asm.mb).apply(null,arguments)},Ur=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Ur=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=t.asm.nb).apply(null,arguments)},Fr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Fr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=t.asm.ob).apply(null,arguments)},Lr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Lr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=t.asm.pb).apply(null,arguments)},Cr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Cr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=t.asm.qb).apply(null,arguments)},wr=t._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(wr=t._emscripten_enum_draco_GeometryAttribute_Type_INVALID=t.asm.rb).apply(null,arguments)},zr=t._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(zr=t._emscripten_enum_draco_GeometryAttribute_Type_POSITION=t.asm.sb).apply(null,arguments)},Vr=t._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(Vr=t._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=t.asm.tb).apply(null,arguments)},Br=t._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Br=t._emscripten_enum_draco_GeometryAttribute_Type_COLOR=t.asm.ub).apply(null,arguments)},Wr=t._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Wr=t._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=t.asm.vb).apply(null,arguments)},Qr=t._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(Qr=t._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=t.asm.wb).apply(null,arguments)},xr=t._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(xr=t._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=t.asm.xb).apply(null,arguments)},Yr=t._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(Yr=t._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=t.asm.yb).apply(null,arguments)},Hr=t._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(Hr=t._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=t.asm.zb).apply(null,arguments)},qr=t._emscripten_enum_draco_DataType_DT_INVALID=function(){return(qr=t._emscripten_enum_draco_DataType_DT_INVALID=t.asm.Ab).apply(null,arguments)},kr=t._emscripten_enum_draco_DataType_DT_INT8=function(){return(kr=t._emscripten_enum_draco_DataType_DT_INT8=t.asm.Bb).apply(null,arguments)},Xr=t._emscripten_enum_draco_DataType_DT_UINT8=function(){return(Xr=t._emscripten_enum_draco_DataType_DT_UINT8=t.asm.Cb).apply(null,arguments)},Kr=t._emscripten_enum_draco_DataType_DT_INT16=function(){return(Kr=t._emscripten_enum_draco_DataType_DT_INT16=t.asm.Db).apply(null,arguments)},Jr=t._emscripten_enum_draco_DataType_DT_UINT16=function(){return(Jr=t._emscripten_enum_draco_DataType_DT_UINT16=t.asm.Eb).apply(null,arguments)},$r=t._emscripten_enum_draco_DataType_DT_INT32=function(){return($r=t._emscripten_enum_draco_DataType_DT_INT32=t.asm.Fb).apply(null,arguments)},Zr=t._emscripten_enum_draco_DataType_DT_UINT32=function(){return(Zr=t._emscripten_enum_draco_DataType_DT_UINT32=t.asm.Gb).apply(null,arguments)},tn=t._emscripten_enum_draco_DataType_DT_INT64=function(){return(tn=t._emscripten_enum_draco_DataType_DT_INT64=t.asm.Hb).apply(null,arguments)},en=t._emscripten_enum_draco_DataType_DT_UINT64=function(){return(en=t._emscripten_enum_draco_DataType_DT_UINT64=t.asm.Ib).apply(null,arguments)},rn=t._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(rn=t._emscripten_enum_draco_DataType_DT_FLOAT32=t.asm.Jb).apply(null,arguments)},nn=t._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(nn=t._emscripten_enum_draco_DataType_DT_FLOAT64=t.asm.Kb).apply(null,arguments)},on=t._emscripten_enum_draco_DataType_DT_BOOL=function(){return(on=t._emscripten_enum_draco_DataType_DT_BOOL=t.asm.Lb).apply(null,arguments)},_n=t._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(_n=t._emscripten_enum_draco_DataType_DT_TYPES_COUNT=t.asm.Mb).apply(null,arguments)},an=t._emscripten_enum_draco_StatusCode_OK=function(){return(an=t._emscripten_enum_draco_StatusCode_OK=t.asm.Nb).apply(null,arguments)},pn=t._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(pn=t._emscripten_enum_draco_StatusCode_DRACO_ERROR=t.asm.Ob).apply(null,arguments)},un=t._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(un=t._emscripten_enum_draco_StatusCode_IO_ERROR=t.asm.Pb).apply(null,arguments)},sn=t._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(sn=t._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=t.asm.Qb).apply(null,arguments)},cn=t._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(cn=t._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=t.asm.Rb).apply(null,arguments)},yn=t._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(yn=t._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=t.asm.Sb).apply(null,arguments)};t._malloc=function(){return(t._malloc=t.asm.Tb).apply(null,arguments)},t._free=function(){return(t._free=t.asm.Ub).apply(null,arguments)};var ln=function(){return(ln=t.asm.Vb).apply(null,arguments)};t.___start_em_js=15856,t.___stop_em_js=15954;var it;if(rt=function e(){it||K(),it||(rt=e)},t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);0<t.preInit.length;)t.preInit.pop()();K(),f.prototype=Object.create(f.prototype),f.prototype.constructor=f,f.prototype.__class__=f,f.__cache__={},t.WrapperObject=f,t.getCache=T,t.wrapPointer=G,t.castObject=function(e,r){return G(e.ptr,r)},t.NULL=G(0),t.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete T(e.__class__)[e.ptr]},t.compare=function(e,r){return e.ptr===r.ptr},t.getPointer=function(e){return e.ptr},t.getClass=function(e){return e.__class__};var d={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(d.needed){for(var e=0;e<d.temps.length;e++)t._free(d.temps[e]);d.temps.length=0,t._free(d.buffer),d.buffer=0,d.size+=d.needed,d.needed=0}d.buffer||(d.size+=128,d.buffer=t._malloc(d.size),d.buffer||i(void 0)),d.pos=0},alloc:function(e,r){return d.buffer||i(void 0),e=e.length*r.BYTES_PER_ELEMENT,e=e+7&-8,d.pos+e>=d.size?(0<e||i(void 0),d.needed+=e,r=t._malloc(e),d.temps.push(r)):(r=d.buffer+d.pos,d.pos+=e),r},copy:function(e,r,n){switch(n>>>=0,r.BYTES_PER_ELEMENT){case 2:n>>>=1;break;case 4:n>>>=2;break;case 8:n>>>=3}for(var o=0;o<e.length;o++)r[n+o]=e[o]}};return H.prototype=Object.create(f.prototype),H.prototype.constructor=H,H.prototype.__class__=H,H.__cache__={},t.VoidPtr=H,H.prototype.__destroy__=H.prototype.__destroy__=function(){St(this.ptr)},B.prototype=Object.create(f.prototype),B.prototype.constructor=B,B.prototype.__class__=B,B.__cache__={},t.DecoderBuffer=B,B.prototype.Init=B.prototype.Init=function(e,r){var n=this.ptr;d.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),Nt(n,e,r)},B.prototype.__destroy__=B.prototype.__destroy__=function(){Ut(this.ptr)},w.prototype=Object.create(f.prototype),w.prototype.constructor=w,w.prototype.__class__=w,w.__cache__={},t.AttributeTransformData=w,w.prototype.transform_type=w.prototype.transform_type=function(){return Lt(this.ptr)},w.prototype.__destroy__=w.prototype.__destroy__=function(){Ct(this.ptr)},Y.prototype=Object.create(f.prototype),Y.prototype.constructor=Y,Y.prototype.__class__=Y,Y.__cache__={},t.GeometryAttribute=Y,Y.prototype.__destroy__=Y.prototype.__destroy__=function(){zt(this.ptr)},A.prototype=Object.create(f.prototype),A.prototype.constructor=A,A.prototype.__class__=A,A.__cache__={},t.PointAttribute=A,A.prototype.size=A.prototype.size=function(){return Bt(this.ptr)},A.prototype.GetAttributeTransformData=A.prototype.GetAttributeTransformData=function(){return G(Wt(this.ptr),w)},A.prototype.attribute_type=A.prototype.attribute_type=function(){return Qt(this.ptr)},A.prototype.data_type=A.prototype.data_type=function(){return xt(this.ptr)},A.prototype.num_components=A.prototype.num_components=function(){return Yt(this.ptr)},A.prototype.normalized=A.prototype.normalized=function(){return!!Ht(this.ptr)},A.prototype.byte_stride=A.prototype.byte_stride=function(){return qt(this.ptr)},A.prototype.byte_offset=A.prototype.byte_offset=function(){return kt(this.ptr)},A.prototype.unique_id=A.prototype.unique_id=function(){return Xt(this.ptr)},A.prototype.__destroy__=A.prototype.__destroy__=function(){Kt(this.ptr)},E.prototype=Object.create(f.prototype),E.prototype.constructor=E,E.prototype.__class__=E,E.__cache__={},t.AttributeQuantizationTransform=E,E.prototype.InitFromAttribute=E.prototype.InitFromAttribute=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),!!$t(r,e)},E.prototype.quantization_bits=E.prototype.quantization_bits=function(){return Zt(this.ptr)},E.prototype.min_value=E.prototype.min_value=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),te(r,e)},E.prototype.range=E.prototype.range=function(){return ee(this.ptr)},E.prototype.__destroy__=E.prototype.__destroy__=function(){re(this.ptr)},j.prototype=Object.create(f.prototype),j.prototype.constructor=j,j.prototype.__class__=j,j.__cache__={},t.AttributeOctahedronTransform=j,j.prototype.InitFromAttribute=j.prototype.InitFromAttribute=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),!!oe(r,e)},j.prototype.quantization_bits=j.prototype.quantization_bits=function(){return _e(this.ptr)},j.prototype.__destroy__=j.prototype.__destroy__=function(){ie(this.ptr)},P.prototype=Object.create(f.prototype),P.prototype.constructor=P,P.prototype.__class__=P,P.__cache__={},t.PointCloud=P,P.prototype.num_attributes=P.prototype.num_attributes=function(){return pe(this.ptr)},P.prototype.num_points=P.prototype.num_points=function(){return ue(this.ptr)},P.prototype.__destroy__=P.prototype.__destroy__=function(){se(this.ptr)},O.prototype=Object.create(f.prototype),O.prototype.constructor=O,O.prototype.__class__=O,O.__cache__={},t.Mesh=O,O.prototype.num_faces=O.prototype.num_faces=function(){return ye(this.ptr)},O.prototype.num_attributes=O.prototype.num_attributes=function(){return le(this.ptr)},O.prototype.num_points=O.prototype.num_points=function(){return me(this.ptr)},O.prototype.__destroy__=O.prototype.__destroy__=function(){fe(this.ptr)},W.prototype=Object.create(f.prototype),W.prototype.constructor=W,W.prototype.__class__=W,W.__cache__={},t.Metadata=W,W.prototype.__destroy__=W.prototype.__destroy__=function(){be(this.ptr)},v.prototype=Object.create(f.prototype),v.prototype.constructor=v,v.prototype.__class__=v,v.__cache__={},t.Status=v,v.prototype.code=v.prototype.code=function(){return he(this.ptr)},v.prototype.ok=v.prototype.ok=function(){return!!Ae(this.ptr)},v.prototype.error_msg=v.prototype.error_msg=function(){return a(Te(this.ptr))},v.prototype.__destroy__=v.prototype.__destroy__=function(){De(this.ptr)},R.prototype=Object.create(f.prototype),R.prototype.constructor=R,R.prototype.__class__=R,R.__cache__={},t.DracoFloat32Array=R,R.prototype.GetValue=R.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),ge(r,e)},R.prototype.size=R.prototype.size=function(){return ve(this.ptr)},R.prototype.__destroy__=R.prototype.__destroy__=function(){Ee(this.ptr)},S.prototype=Object.create(f.prototype),S.prototype.constructor=S,S.prototype.__class__=S,S.__cache__={},t.DracoInt8Array=S,S.prototype.GetValue=S.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Oe(r,e)},S.prototype.size=S.prototype.size=function(){return je(this.ptr)},S.prototype.__destroy__=S.prototype.__destroy__=function(){Pe(this.ptr)},M.prototype=Object.create(f.prototype),M.prototype.constructor=M,M.prototype.__class__=M,M.__cache__={},t.DracoUInt8Array=M,M.prototype.GetValue=M.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Se(r,e)},M.prototype.size=M.prototype.size=function(){return Me(this.ptr)},M.prototype.__destroy__=M.prototype.__destroy__=function(){Ne(this.ptr)},N.prototype=Object.create(f.prototype),N.prototype.constructor=N,N.prototype.__class__=N,N.__cache__={},t.DracoInt16Array=N,N.prototype.GetValue=N.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Fe(r,e)},N.prototype.size=N.prototype.size=function(){return Le(this.ptr)},N.prototype.__destroy__=N.prototype.__destroy__=function(){Ce(this.ptr)},U.prototype=Object.create(f.prototype),U.prototype.constructor=U,U.prototype.__class__=U,U.__cache__={},t.DracoUInt16Array=U,U.prototype.GetValue=U.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),ze(r,e)},U.prototype.size=U.prototype.size=function(){return Ve(this.ptr)},U.prototype.__destroy__=U.prototype.__destroy__=function(){Be(this.ptr)},F.prototype=Object.create(f.prototype),F.prototype.constructor=F,F.prototype.__class__=F,F.__cache__={},t.DracoInt32Array=F,F.prototype.GetValue=F.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Qe(r,e)},F.prototype.size=F.prototype.size=function(){return xe(this.ptr)},F.prototype.__destroy__=F.prototype.__destroy__=function(){Ye(this.ptr)},L.prototype=Object.create(f.prototype),L.prototype.constructor=L,L.prototype.__class__=L,L.__cache__={},t.DracoUInt32Array=L,L.prototype.GetValue=L.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),qe(r,e)},L.prototype.size=L.prototype.size=function(){return ke(this.ptr)},L.prototype.__destroy__=L.prototype.__destroy__=function(){Xe(this.ptr)},D.prototype=Object.create(f.prototype),D.prototype.constructor=D,D.prototype.__class__=D,D.__cache__={},t.MetadataQuerier=D,D.prototype.HasEntry=D.prototype.HasEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),!!Je(n,e,r)},D.prototype.GetIntEntry=D.prototype.GetIntEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),$e(n,e,r)},D.prototype.GetIntEntryArray=D.prototype.GetIntEntryArray=function(e,r,n){var o=this.ptr;d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),n&&typeof n=="object"&&(n=n.ptr),Ze(o,e,r,n)},D.prototype.GetDoubleEntry=D.prototype.GetDoubleEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),tr(n,e,r)},D.prototype.GetStringEntry=D.prototype.GetStringEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),a(er(n,e,r))},D.prototype.NumEntries=D.prototype.NumEntries=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),rr(r,e)},D.prototype.GetEntryName=D.prototype.GetEntryName=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),a(nr(n,e,r))},D.prototype.__destroy__=D.prototype.__destroy__=function(){or(this.ptr)},u.prototype=Object.create(f.prototype),u.prototype.constructor=u,u.prototype.__class__=u,u.__cache__={},t.Decoder=u,u.prototype.DecodeArrayToPointCloud=u.prototype.DecodeArrayToPointCloud=function(e,r,n){var o=this.ptr;return d.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),G(ir(o,e,r,n),v)},u.prototype.DecodeArrayToMesh=u.prototype.DecodeArrayToMesh=function(e,r,n){var o=this.ptr;return d.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),G(ar(o,e,r,n),v)},u.prototype.GetAttributeId=u.prototype.GetAttributeId=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),pr(n,e,r)},u.prototype.GetAttributeIdByName=u.prototype.GetAttributeIdByName=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),ur(n,e,r)},u.prototype.GetAttributeIdByMetadataEntry=u.prototype.GetAttributeIdByMetadataEntry=function(e,r,n){var o=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),n=n&&typeof n=="object"?n.ptr:V(n),sr(o,e,r,n)},u.prototype.GetAttribute=u.prototype.GetAttribute=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(cr(n,e,r),A)},u.prototype.GetAttributeByUniqueId=u.prototype.GetAttributeByUniqueId=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(yr(n,e,r),A)},u.prototype.GetMetadata=u.prototype.GetMetadata=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),G(lr(r,e),W)},u.prototype.GetAttributeMetadata=u.prototype.GetAttributeMetadata=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(mr(n,e,r),W)},u.prototype.GetFaceFromMesh=u.prototype.GetFaceFromMesh=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!fr(o,e,r,n)},u.prototype.GetTriangleStripsFromMesh=u.prototype.GetTriangleStripsFromMesh=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),dr(n,e,r)},u.prototype.GetTrianglesUInt16Array=u.prototype.GetTrianglesUInt16Array=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!br(o,e,r,n)},u.prototype.GetTrianglesUInt32Array=u.prototype.GetTrianglesUInt32Array=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!hr(o,e,r,n)},u.prototype.GetAttributeFloat=u.prototype.GetAttributeFloat=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Ar(o,e,r,n)},u.prototype.GetAttributeFloatForAllPoints=u.prototype.GetAttributeFloatForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Tr(o,e,r,n)},u.prototype.GetAttributeIntForAllPoints=u.prototype.GetAttributeIntForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Dr(o,e,r,n)},u.prototype.GetAttributeInt8ForAllPoints=u.prototype.GetAttributeInt8ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Ir(o,e,r,n)},u.prototype.GetAttributeUInt8ForAllPoints=u.prototype.GetAttributeUInt8ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!gr(o,e,r,n)},u.prototype.GetAttributeInt16ForAllPoints=u.prototype.GetAttributeInt16ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!vr(o,e,r,n)},u.prototype.GetAttributeUInt16ForAllPoints=u.prototype.GetAttributeUInt16ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Er(o,e,r,n)},u.prototype.GetAttributeInt32ForAllPoints=u.prototype.GetAttributeInt32ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Gr(o,e,r,n)},u.prototype.GetAttributeUInt32ForAllPoints=u.prototype.GetAttributeUInt32ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Or(o,e,r,n)},u.prototype.GetAttributeDataArrayForAllPoints=u.prototype.GetAttributeDataArrayForAllPoints=function(e,r,n,o,m){var b=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),o&&typeof o=="object"&&(o=o.ptr),m&&typeof m=="object"&&(m=m.ptr),!!jr(b,e,r,n,o,m)},u.prototype.SkipAttributeTransform=u.prototype.SkipAttributeTransform=function(e){var r=this.ptr;e&&typeof e=="object"&&(e=e.ptr),Pr(r,e)},u.prototype.GetEncodedGeometryType_Deprecated=u.prototype.GetEncodedGeometryType_Deprecated=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Rr(r,e)},u.prototype.DecodeBufferToPointCloud=u.prototype.DecodeBufferToPointCloud=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(Sr(n,e,r),v)},u.prototype.DecodeBufferToMesh=u.prototype.DecodeBufferToMesh=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(Mr(n,e,r),v)},u.prototype.__destroy__=u.prototype.__destroy__=function(){Nr(this.ptr)},function(){function e(){t.ATTRIBUTE_INVALID_TRANSFORM=Ur(),t.ATTRIBUTE_NO_TRANSFORM=Fr(),t.ATTRIBUTE_QUANTIZATION_TRANSFORM=Lr(),t.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Cr(),t.INVALID=wr(),t.POSITION=zr(),t.NORMAL=Vr(),t.COLOR=Br(),t.TEX_COORD=Wr(),t.GENERIC=Qr(),t.INVALID_GEOMETRY_TYPE=xr(),t.POINT_CLOUD=Yr(),t.TRIANGULAR_MESH=Hr(),t.DT_INVALID=qr(),t.DT_INT8=kr(),t.DT_UINT8=Xr(),t.DT_INT16=Kr(),t.DT_UINT16=Jr(),t.DT_INT32=$r(),t.DT_UINT32=Zr(),t.DT_INT64=tn(),t.DT_UINT64=en(),t.DT_FLOAT32=rn(),t.DT_FLOAT64=nn(),t.DT_BOOL=on(),t.DT_TYPES_COUNT=_n(),t.OK=an(),t.DRACO_ERROR=pn(),t.IO_ERROR=un(),t.INVALID_PARAMETER=sn(),t.UNSUPPORTED_VERSION=cn(),t.UNKNOWN_VERSION=yn()}Rt?e():ct.unshift(e)}(),typeof t.onModuleParsed=="function"&&t.onModuleParsed(),t.Decoder.prototype.GetEncodedGeometryType=function(e){if(e.__class__&&e.__class__===t.DecoderBuffer)return t.Decoder.prototype.GetEncodedGeometryType_Deprecated(e);if(8>e.byteLength)return t.INVALID_GEOMETRY_TYPE;switch(e[7]){case 0:return t.POINT_CLOUD;case 1:return t.TRIANGULAR_MESH;default:return t.INVALID_GEOMETRY_TYPE}},c.ready}}();typeof nt=="object"&&typeof bt=="object"?bt.exports=dt:typeof define=="function"&&define.amd?define([],function(){return dt}):typeof nt=="object"&&(nt.DracoDecoderModule=dt)});export{Dn as a}; +import{a as fn,c as Tn}from"./chunk-PEYJTJPE.js";var Dn=Tn((nt,bt)=>{var _=_||{};_.scope={};_.arrayIteratorImpl=function(p){var c=0;return function(){return c<p.length?{done:!1,value:p[c++]}:{done:!0}}};_.arrayIterator=function(p){return{next:_.arrayIteratorImpl(p)}};_.makeIterator=function(p){var c=typeof Symbol<"u"&&Symbol.iterator&&p[Symbol.iterator];return c?c.call(p):_.arrayIterator(p)};_.ASSUME_ES5=!1;_.ASSUME_NO_NATIVE_MAP=!1;_.ASSUME_NO_NATIVE_SET=!1;_.SIMPLE_FROUND_POLYFILL=!1;_.ISOLATE_POLYFILLS=!1;_.FORCE_POLYFILL_PROMISE=!1;_.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;_.getGlobal=function(p){p=[typeof globalThis=="object"&&globalThis,p,typeof window=="object"&&window,typeof self=="object"&&self,typeof global=="object"&&global];for(var c=0;c<p.length;++c){var s=p[c];if(s&&s.Math==Math)return s}throw Error("Cannot find global object")};_.global=_.getGlobal(nt);_.defineProperty=_.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(p,c,s){return p==Array.prototype||p==Object.prototype||(p[c]=s.value),p};_.IS_SYMBOL_NATIVE=typeof Symbol=="function"&&typeof Symbol("x")=="symbol";_.TRUST_ES6_POLYFILLS=!_.ISOLATE_POLYFILLS||_.IS_SYMBOL_NATIVE;_.polyfills={};_.propertyToPolyfillSymbol={};_.POLYFILL_PREFIX="$jscp$";_.polyfill=function(p,c,s,y){c&&(_.ISOLATE_POLYFILLS?_.polyfillIsolated(p,c,s,y):_.polyfillUnisolated(p,c,s,y))};_.polyfillUnisolated=function(p,c,s,y){for(s=_.global,p=p.split("."),y=0;y<p.length-1;y++){var a=p[y];if(!(a in s))return;s=s[a]}p=p[p.length-1],y=s[p],c=c(y),c!=y&&c!=null&&_.defineProperty(s,p,{configurable:!0,writable:!0,value:c})};_.polyfillIsolated=function(p,c,s,y){var a=p.split(".");p=a.length===1,y=a[0],y=!p&&y in _.polyfills?_.polyfills:_.global;for(var g=0;g<a.length-1;g++){var i=a[g];if(!(i in y))return;y=y[i]}a=a[a.length-1],s=_.IS_SYMBOL_NATIVE&&s==="es6"?y[a]:null,c=c(s),c!=null&&(p?_.defineProperty(_.polyfills,a,{configurable:!0,writable:!0,value:c}):c!==s&&(_.propertyToPolyfillSymbol[a]===void 0&&(s=1e9*Math.random()>>>0,_.propertyToPolyfillSymbol[a]=_.IS_SYMBOL_NATIVE?_.global.Symbol(a):_.POLYFILL_PREFIX+s+"$"+a),_.defineProperty(y,_.propertyToPolyfillSymbol[a],{configurable:!0,writable:!0,value:c})))};_.polyfill("Promise",function(p){function c(){this.batch_=null}function s(i){return i instanceof a?i:new a(function(l,h){l(i)})}if(p&&(!(_.FORCE_POLYFILL_PROMISE||_.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&typeof _.global.PromiseRejectionEvent>"u")||!_.global.Promise||_.global.Promise.toString().indexOf("[native code]")===-1))return p;c.prototype.asyncExecute=function(i){if(this.batch_==null){this.batch_=[];var l=this;this.asyncExecuteFunction(function(){l.executeBatch_()})}this.batch_.push(i)};var y=_.global.setTimeout;c.prototype.asyncExecuteFunction=function(i){y(i,0)},c.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var i=this.batch_;this.batch_=[];for(var l=0;l<i.length;++l){var h=i[l];i[l]=null;try{h()}catch(I){this.asyncThrow_(I)}}}this.batch_=null},c.prototype.asyncThrow_=function(i){this.asyncExecuteFunction(function(){throw i})};var a=function(i){this.state_=0,this.result_=void 0,this.onSettledCallbacks_=[],this.isRejectionHandled_=!1;var l=this.createResolveAndReject_();try{i(l.resolve,l.reject)}catch(h){l.reject(h)}};a.prototype.createResolveAndReject_=function(){function i(I){return function(C){h||(h=!0,I.call(l,C))}}var l=this,h=!1;return{resolve:i(this.resolveTo_),reject:i(this.reject_)}},a.prototype.resolveTo_=function(i){if(i===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(i instanceof a)this.settleSameAsPromise_(i);else{t:switch(typeof i){case"object":var l=i!=null;break t;case"function":l=!0;break t;default:l=!1}l?this.resolveToNonPromiseObj_(i):this.fulfill_(i)}},a.prototype.resolveToNonPromiseObj_=function(i){var l=void 0;try{l=i.then}catch(h){this.reject_(h);return}typeof l=="function"?this.settleSameAsThenable_(l,i):this.fulfill_(i)},a.prototype.reject_=function(i){this.settle_(2,i)},a.prototype.fulfill_=function(i){this.settle_(1,i)},a.prototype.settle_=function(i,l){if(this.state_!=0)throw Error("Cannot settle("+i+", "+l+"): Promise already settled in state"+this.state_);this.state_=i,this.result_=l,this.state_===2&&this.scheduleUnhandledRejectionCheck_(),this.executeOnSettledCallbacks_()},a.prototype.scheduleUnhandledRejectionCheck_=function(){var i=this;y(function(){if(i.notifyUnhandledRejection_()){var l=_.global.console;typeof l<"u"&&l.error(i.result_)}},1)},a.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var i=_.global.CustomEvent,l=_.global.Event,h=_.global.dispatchEvent;return typeof h>"u"?!0:(typeof i=="function"?i=new i("unhandledrejection",{cancelable:!0}):typeof l=="function"?i=new l("unhandledrejection",{cancelable:!0}):(i=_.global.document.createEvent("CustomEvent"),i.initCustomEvent("unhandledrejection",!1,!0,i)),i.promise=this,i.reason=this.result_,h(i))},a.prototype.executeOnSettledCallbacks_=function(){if(this.onSettledCallbacks_!=null){for(var i=0;i<this.onSettledCallbacks_.length;++i)g.asyncExecute(this.onSettledCallbacks_[i]);this.onSettledCallbacks_=null}};var g=new c;return a.prototype.settleSameAsPromise_=function(i){var l=this.createResolveAndReject_();i.callWhenSettled_(l.resolve,l.reject)},a.prototype.settleSameAsThenable_=function(i,l){var h=this.createResolveAndReject_();try{i.call(l,h.resolve,h.reject)}catch(I){h.reject(I)}},a.prototype.then=function(i,l){function h(f,T){return typeof f=="function"?function(G){try{I(f(G))}catch(V){C(V)}}:T}var I,C,K=new a(function(f,T){I=f,C=T});return this.callWhenSettled_(h(i,I),h(l,C)),K},a.prototype.catch=function(i){return this.then(void 0,i)},a.prototype.callWhenSettled_=function(i,l){function h(){switch(I.state_){case 1:i(I.result_);break;case 2:l(I.result_);break;default:throw Error("Unexpected state: "+I.state_)}}var I=this;this.onSettledCallbacks_==null?g.asyncExecute(h):this.onSettledCallbacks_.push(h),this.isRejectionHandled_=!0},a.resolve=s,a.reject=function(i){return new a(function(l,h){h(i)})},a.race=function(i){return new a(function(l,h){for(var I=_.makeIterator(i),C=I.next();!C.done;C=I.next())s(C.value).callWhenSettled_(l,h)})},a.all=function(i){var l=_.makeIterator(i),h=l.next();return h.done?s([]):new a(function(I,C){function K(G){return function(V){f[G]=V,T--,T==0&&I(f)}}var f=[],T=0;do f.push(void 0),T++,s(h.value).callWhenSettled_(K(f.length-1),C),h=l.next();while(!h.done)})},a},"es6","es3");_.owns=function(p,c){return Object.prototype.hasOwnProperty.call(p,c)};_.assign=_.TRUST_ES6_POLYFILLS&&typeof Object.assign=="function"?Object.assign:function(p,c){for(var s=1;s<arguments.length;s++){var y=arguments[s];if(y)for(var a in y)_.owns(y,a)&&(p[a]=y[a])}return p};_.polyfill("Object.assign",function(p){return p||_.assign},"es6","es3");_.checkStringArgs=function(p,c,s){if(p==null)throw new TypeError("The 'this' value for String.prototype."+s+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+s+" must not be a regular expression");return p+""};_.polyfill("String.prototype.startsWith",function(p){return p||function(c,s){var y=_.checkStringArgs(this,c,"startsWith");c+="";var a=y.length,g=c.length;s=Math.max(0,Math.min(s|0,y.length));for(var i=0;i<g&&s<a;)if(y[s++]!=c[i++])return!1;return i>=g}},"es6","es3");_.polyfill("Array.prototype.copyWithin",function(p){function c(s){return s=Number(s),s===1/0||s===-1/0?s:s|0}return p||function(s,y,a){var g=this.length;if(s=c(s),y=c(y),a=a===void 0?g:c(a),s=0>s?Math.max(g+s,0):Math.min(s,g),y=0>y?Math.max(g+y,0):Math.min(y,g),a=0>a?Math.max(g+a,0):Math.min(a,g),s<y)for(;y<a;)y in this?this[s++]=this[y++]:(delete this[s++],y++);else for(a=Math.min(a,g+y-s),s+=a-y;a>y;)--a in this?this[--s]=this[a]:delete this[--s];return this}},"es6","es3");_.typedArrayCopyWithin=function(p){return p||Array.prototype.copyWithin};_.polyfill("Int8Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint8Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint8ClampedArray.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Int16Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint16Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Int32Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint32Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Float32Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Float64Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");var dt=function(){var p=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(p=p||__filename),function(c){function s(e){return t.locateFile?t.locateFile(e,Q):Q+e}function y(e,r,n){var o=r+n;for(n=r;e[n]&&!(n>=o);)++n;if(16<n-r&&e.buffer&&Ot)return Ot.decode(e.subarray(r,n));for(o="";r<n;){var m=e[r++];if(m&128){var b=e[r++]&63;if((m&224)==192)o+=String.fromCharCode((m&31)<<6|b);else{var X=e[r++]&63;m=(m&240)==224?(m&15)<<12|b<<6|X:(m&7)<<18|b<<12|X<<6|e[r++]&63,65536>m?o+=String.fromCharCode(m):(m-=65536,o+=String.fromCharCode(55296|m>>10,56320|m&1023))}}else o+=String.fromCharCode(m)}return o}function a(e,r){return e?y(tt,e,r):""}function g(){var e=_t.buffer;t.HEAP8=q=new Int8Array(e),t.HEAP16=new Int16Array(e),t.HEAP32=et=new Int32Array(e),t.HEAPU8=tt=new Uint8Array(e),t.HEAPU16=new Uint16Array(e),t.HEAPU32=x=new Uint32Array(e),t.HEAPF32=new Float32Array(e),t.HEAPF64=new Float64Array(e)}function i(e){throw t.onAbort&&t.onAbort(e),e="Aborted("+e+")",J(e),Gt=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),ot(e),e}function l(e){try{if(e==z&&Z)return new Uint8Array(Z);if(ut)return ut(e);throw"both async and sync fetching of the wasm failed"}catch(r){i(r)}}function h(){if(!Z&&(It||$)){if(typeof fetch=="function"&&!z.startsWith("file://"))return fetch(z,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+z+"'";return e.arrayBuffer()}).catch(function(){return l(z)});if(st)return new Promise(function(e,r){st(z,function(n){e(new Uint8Array(n))},r)})}return Promise.resolve().then(function(){return l(z)})}function I(e){for(;0<e.length;)e.shift()(t)}function C(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(r){x[this.ptr+4>>2]=r},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(r){x[this.ptr+8>>2]=r},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(r){et[this.ptr>>2]=r},this.set_caught=function(r){q[this.ptr+12>>0]=r?1:0},this.get_caught=function(){return q[this.ptr+12>>0]!=0},this.set_rethrown=function(r){q[this.ptr+13>>0]=r?1:0},this.get_rethrown=function(){return q[this.ptr+13>>0]!=0},this.init=function(r,n){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(n),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){et[this.ptr>>2]+=1},this.release_ref=function(){var r=et[this.ptr>>2];return et[this.ptr>>2]=r-1,r===1},this.set_adjusted_ptr=function(r){x[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){if(ln(this.get_type()))return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function K(){function e(){if(!it&&(it=!0,t.calledRun=!0,!Gt)){if(Rt=!0,I(ct),ht(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Pt.unshift(t.postRun.shift());I(Pt)}}if(!(0<k)){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)jt.unshift(t.preRun.shift());I(jt),0<k||(t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),e()},1)):e())}}function f(){}function T(e){return(e||f).__cache__}function G(e,r){var n=T(r),o=n[e];return o||(o=Object.create((r||f).prototype),o.ptr=e,n[e]=o)}function V(e){if(typeof e=="string"){for(var r=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);127>=o?r++:2047>=o?r+=2:55296<=o&&57343>=o?(r+=4,++n):r+=3}if(r=Array(r+1),n=0,o=r.length,0<o){o=n+o-1;for(var m=0;m<e.length;++m){var b=e.charCodeAt(m);if(55296<=b&&57343>=b){var X=e.charCodeAt(++m);b=65536+((b&1023)<<10)|X&1023}if(127>=b){if(n>=o)break;r[n++]=b}else{if(2047>=b){if(n+1>=o)break;r[n++]=192|b>>6}else{if(65535>=b){if(n+2>=o)break;r[n++]=224|b>>12}else{if(n+3>=o)break;r[n++]=240|b>>18,r[n++]=128|b>>12&63}r[n++]=128|b>>6&63}r[n++]=128|b&63}}r[n]=0}return e=d.alloc(r,q),d.copy(r,q,e),e}return e}function at(e){if(typeof e=="object"){var r=d.alloc(e,q);return d.copy(e,q,r),r}return e}function H(){throw"cannot construct a VoidPtr, no constructor in IDL"}function B(){this.ptr=Mt(),T(B)[this.ptr]=this}function w(){this.ptr=Ft(),T(w)[this.ptr]=this}function Y(){this.ptr=wt(),T(Y)[this.ptr]=this}function A(){this.ptr=Vt(),T(A)[this.ptr]=this}function E(){this.ptr=Jt(),T(E)[this.ptr]=this}function j(){this.ptr=ne(),T(j)[this.ptr]=this}function P(){this.ptr=ae(),T(P)[this.ptr]=this}function O(){this.ptr=ce(),T(O)[this.ptr]=this}function W(){this.ptr=de(),T(W)[this.ptr]=this}function v(){throw"cannot construct a Status, no constructor in IDL"}function R(){this.ptr=Ie(),T(R)[this.ptr]=this}function S(){this.ptr=Ge(),T(S)[this.ptr]=this}function M(){this.ptr=Re(),T(M)[this.ptr]=this}function N(){this.ptr=Ue(),T(N)[this.ptr]=this}function U(){this.ptr=we(),T(U)[this.ptr]=this}function F(){this.ptr=We(),T(F)[this.ptr]=this}function L(){this.ptr=He(),T(L)[this.ptr]=this}function D(){this.ptr=Ke(),T(D)[this.ptr]=this}function u(){this.ptr=_r(),T(u)[this.ptr]=this}c=c===void 0?{}:c;var t=typeof c<"u"?c:{},ht,ot;t.ready=new Promise(function(e,r){ht=e,ot=r});var At=!1,Tt=!1;t.onRuntimeInitialized=function(){At=!0,Tt&&typeof t.onModuleLoaded=="function"&&t.onModuleLoaded(t)},t.onModuleParsed=function(){Tt=!0,At&&typeof t.onModuleLoaded=="function"&&t.onModuleLoaded(t)},t.isVersionSupported=function(e){return typeof e!="string"?!1:(e=e.split("."),2>e.length||3<e.length?!1:e[0]==1&&0<=e[1]&&5>=e[1]?!0:!(e[0]!=0||10<e[1]))};var Dt=Object.assign({},t),It=typeof window=="object",$=typeof importScripts=="function",gt=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Q="";if(gt){var vt=fn("fs"),pt=fn("path");Q=$?pt.dirname(Q)+"/":__dirname+"/";var Et=function(e,r){return e=e.startsWith("file://")?new URL(e):pt.normalize(e),vt.readFileSync(e,r?void 0:"utf8")},ut=function(e){return e=Et(e,!0),e.buffer||(e=new Uint8Array(e)),e},st=function(e,r,n){e=e.startsWith("file://")?new URL(e):pt.normalize(e),vt.readFile(e,function(o,m){o?n(o):r(m.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),t.inspect=function(){return"[Emscripten Module object]"}}else(It||$)&&($?Q=self.location.href:typeof document<"u"&&document.currentScript&&(Q=document.currentScript.src),p&&(Q=p),Q=Q.indexOf("blob:")!==0?Q.substr(0,Q.replace(/[?#].*/,"").lastIndexOf("/")+1):"",Et=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},$&&(ut=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),st=function(e,r,n){var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="arraybuffer",o.onload=function(){o.status==200||o.status==0&&o.response?r(o.response):n()},o.onerror=n,o.send(null)});var dn=t.print||console.log.bind(console),J=t.printErr||console.warn.bind(console);Object.assign(t,Dt),Dt=null;var Z;t.wasmBinary&&(Z=t.wasmBinary),typeof WebAssembly!="object"&&i("no native wasm support detected");var _t,Gt=!1,Ot=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,q,tt,et,x,jt=[],ct=[],Pt=[],Rt=!1,k=0,yt=null,rt=null,z="draco_decoder.wasm";z.startsWith("data:application/octet-stream;base64,")||(z=s(z));var bn=0,hn=[null,[],[]],An={b:function(e,r,n){throw new C(e).init(r,n),bn++,e},a:function(){i("")},g:function(e,r,n){tt.copyWithin(e,r,r+n)},e:function(e){var r=tt.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var o=r*(1+.2/n);o=Math.min(o,e+100663296);var m=Math;o=Math.max(e,o),m=m.min.call(m,2147483648,o+(65536-o%65536)%65536);t:{o=_t.buffer;try{_t.grow(m-o.byteLength+65535>>>16),g();var b=1;break t}catch{}b=void 0}if(b)return!0}return!1},f:function(e){return 52},d:function(e,r,n,o,m){return 70},c:function(e,r,n,o){for(var m=0,b=0;b<n;b++){var X=x[r>>2],mn=x[r+4>>2];r+=8;for(var lt=0;lt<mn;lt++){var mt=tt[X+lt],ft=hn[e];mt===0||mt===10?((e===1?dn:J)(y(ft,0)),ft.length=0):ft.push(mt)}m+=mn}return x[o>>2]=m,0}};(function(){function e(m,b){t.asm=m.exports,_t=t.asm.h,g(),ct.unshift(t.asm.i),k--,t.monitorRunDependencies&&t.monitorRunDependencies(k),k==0&&(yt!==null&&(clearInterval(yt),yt=null),rt&&(m=rt,rt=null,m()))}function r(m){e(m.instance)}function n(m){return h().then(function(b){return WebAssembly.instantiate(b,o)}).then(function(b){return b}).then(m,function(b){J("failed to asynchronously prepare wasm: "+b),i(b)})}var o={a:An};if(k++,t.monitorRunDependencies&&t.monitorRunDependencies(k),t.instantiateWasm)try{return t.instantiateWasm(o,e)}catch(m){J("Module.instantiateWasm callback failed with error: "+m),ot(m)}return function(){return Z||typeof WebAssembly.instantiateStreaming!="function"||z.startsWith("data:application/octet-stream;base64,")||z.startsWith("file://")||gt||typeof fetch!="function"?n(r):fetch(z,{credentials:"same-origin"}).then(function(m){return WebAssembly.instantiateStreaming(m,o).then(r,function(b){return J("wasm streaming compile failed: "+b),J("falling back to ArrayBuffer instantiation"),n(r)})})}().catch(ot),{}})();var St=t._emscripten_bind_VoidPtr___destroy___0=function(){return(St=t._emscripten_bind_VoidPtr___destroy___0=t.asm.k).apply(null,arguments)},Mt=t._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(Mt=t._emscripten_bind_DecoderBuffer_DecoderBuffer_0=t.asm.l).apply(null,arguments)},Nt=t._emscripten_bind_DecoderBuffer_Init_2=function(){return(Nt=t._emscripten_bind_DecoderBuffer_Init_2=t.asm.m).apply(null,arguments)},Ut=t._emscripten_bind_DecoderBuffer___destroy___0=function(){return(Ut=t._emscripten_bind_DecoderBuffer___destroy___0=t.asm.n).apply(null,arguments)},Ft=t._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Ft=t._emscripten_bind_AttributeTransformData_AttributeTransformData_0=t.asm.o).apply(null,arguments)},Lt=t._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(Lt=t._emscripten_bind_AttributeTransformData_transform_type_0=t.asm.p).apply(null,arguments)},Ct=t._emscripten_bind_AttributeTransformData___destroy___0=function(){return(Ct=t._emscripten_bind_AttributeTransformData___destroy___0=t.asm.q).apply(null,arguments)},wt=t._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(wt=t._emscripten_bind_GeometryAttribute_GeometryAttribute_0=t.asm.r).apply(null,arguments)},zt=t._emscripten_bind_GeometryAttribute___destroy___0=function(){return(zt=t._emscripten_bind_GeometryAttribute___destroy___0=t.asm.s).apply(null,arguments)},Vt=t._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Vt=t._emscripten_bind_PointAttribute_PointAttribute_0=t.asm.t).apply(null,arguments)},Bt=t._emscripten_bind_PointAttribute_size_0=function(){return(Bt=t._emscripten_bind_PointAttribute_size_0=t.asm.u).apply(null,arguments)},Wt=t._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(Wt=t._emscripten_bind_PointAttribute_GetAttributeTransformData_0=t.asm.v).apply(null,arguments)},Qt=t._emscripten_bind_PointAttribute_attribute_type_0=function(){return(Qt=t._emscripten_bind_PointAttribute_attribute_type_0=t.asm.w).apply(null,arguments)},xt=t._emscripten_bind_PointAttribute_data_type_0=function(){return(xt=t._emscripten_bind_PointAttribute_data_type_0=t.asm.x).apply(null,arguments)},Yt=t._emscripten_bind_PointAttribute_num_components_0=function(){return(Yt=t._emscripten_bind_PointAttribute_num_components_0=t.asm.y).apply(null,arguments)},Ht=t._emscripten_bind_PointAttribute_normalized_0=function(){return(Ht=t._emscripten_bind_PointAttribute_normalized_0=t.asm.z).apply(null,arguments)},qt=t._emscripten_bind_PointAttribute_byte_stride_0=function(){return(qt=t._emscripten_bind_PointAttribute_byte_stride_0=t.asm.A).apply(null,arguments)},kt=t._emscripten_bind_PointAttribute_byte_offset_0=function(){return(kt=t._emscripten_bind_PointAttribute_byte_offset_0=t.asm.B).apply(null,arguments)},Xt=t._emscripten_bind_PointAttribute_unique_id_0=function(){return(Xt=t._emscripten_bind_PointAttribute_unique_id_0=t.asm.C).apply(null,arguments)},Kt=t._emscripten_bind_PointAttribute___destroy___0=function(){return(Kt=t._emscripten_bind_PointAttribute___destroy___0=t.asm.D).apply(null,arguments)},Jt=t._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Jt=t._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=t.asm.E).apply(null,arguments)},$t=t._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return($t=t._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=t.asm.F).apply(null,arguments)},Zt=t._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(Zt=t._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=t.asm.G).apply(null,arguments)},te=t._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(te=t._emscripten_bind_AttributeQuantizationTransform_min_value_1=t.asm.H).apply(null,arguments)},ee=t._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(ee=t._emscripten_bind_AttributeQuantizationTransform_range_0=t.asm.I).apply(null,arguments)},re=t._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(re=t._emscripten_bind_AttributeQuantizationTransform___destroy___0=t.asm.J).apply(null,arguments)},ne=t._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(ne=t._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=t.asm.K).apply(null,arguments)},oe=t._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(oe=t._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=t.asm.L).apply(null,arguments)},_e=t._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(_e=t._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=t.asm.M).apply(null,arguments)},ie=t._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(ie=t._emscripten_bind_AttributeOctahedronTransform___destroy___0=t.asm.N).apply(null,arguments)},ae=t._emscripten_bind_PointCloud_PointCloud_0=function(){return(ae=t._emscripten_bind_PointCloud_PointCloud_0=t.asm.O).apply(null,arguments)},pe=t._emscripten_bind_PointCloud_num_attributes_0=function(){return(pe=t._emscripten_bind_PointCloud_num_attributes_0=t.asm.P).apply(null,arguments)},ue=t._emscripten_bind_PointCloud_num_points_0=function(){return(ue=t._emscripten_bind_PointCloud_num_points_0=t.asm.Q).apply(null,arguments)},se=t._emscripten_bind_PointCloud___destroy___0=function(){return(se=t._emscripten_bind_PointCloud___destroy___0=t.asm.R).apply(null,arguments)},ce=t._emscripten_bind_Mesh_Mesh_0=function(){return(ce=t._emscripten_bind_Mesh_Mesh_0=t.asm.S).apply(null,arguments)},ye=t._emscripten_bind_Mesh_num_faces_0=function(){return(ye=t._emscripten_bind_Mesh_num_faces_0=t.asm.T).apply(null,arguments)},le=t._emscripten_bind_Mesh_num_attributes_0=function(){return(le=t._emscripten_bind_Mesh_num_attributes_0=t.asm.U).apply(null,arguments)},me=t._emscripten_bind_Mesh_num_points_0=function(){return(me=t._emscripten_bind_Mesh_num_points_0=t.asm.V).apply(null,arguments)},fe=t._emscripten_bind_Mesh___destroy___0=function(){return(fe=t._emscripten_bind_Mesh___destroy___0=t.asm.W).apply(null,arguments)},de=t._emscripten_bind_Metadata_Metadata_0=function(){return(de=t._emscripten_bind_Metadata_Metadata_0=t.asm.X).apply(null,arguments)},be=t._emscripten_bind_Metadata___destroy___0=function(){return(be=t._emscripten_bind_Metadata___destroy___0=t.asm.Y).apply(null,arguments)},he=t._emscripten_bind_Status_code_0=function(){return(he=t._emscripten_bind_Status_code_0=t.asm.Z).apply(null,arguments)},Ae=t._emscripten_bind_Status_ok_0=function(){return(Ae=t._emscripten_bind_Status_ok_0=t.asm._).apply(null,arguments)},Te=t._emscripten_bind_Status_error_msg_0=function(){return(Te=t._emscripten_bind_Status_error_msg_0=t.asm.$).apply(null,arguments)},De=t._emscripten_bind_Status___destroy___0=function(){return(De=t._emscripten_bind_Status___destroy___0=t.asm.aa).apply(null,arguments)},Ie=t._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ie=t._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=t.asm.ba).apply(null,arguments)},ge=t._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(ge=t._emscripten_bind_DracoFloat32Array_GetValue_1=t.asm.ca).apply(null,arguments)},ve=t._emscripten_bind_DracoFloat32Array_size_0=function(){return(ve=t._emscripten_bind_DracoFloat32Array_size_0=t.asm.da).apply(null,arguments)},Ee=t._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Ee=t._emscripten_bind_DracoFloat32Array___destroy___0=t.asm.ea).apply(null,arguments)},Ge=t._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ge=t._emscripten_bind_DracoInt8Array_DracoInt8Array_0=t.asm.fa).apply(null,arguments)},Oe=t._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Oe=t._emscripten_bind_DracoInt8Array_GetValue_1=t.asm.ga).apply(null,arguments)},je=t._emscripten_bind_DracoInt8Array_size_0=function(){return(je=t._emscripten_bind_DracoInt8Array_size_0=t.asm.ha).apply(null,arguments)},Pe=t._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Pe=t._emscripten_bind_DracoInt8Array___destroy___0=t.asm.ia).apply(null,arguments)},Re=t._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Re=t._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=t.asm.ja).apply(null,arguments)},Se=t._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Se=t._emscripten_bind_DracoUInt8Array_GetValue_1=t.asm.ka).apply(null,arguments)},Me=t._emscripten_bind_DracoUInt8Array_size_0=function(){return(Me=t._emscripten_bind_DracoUInt8Array_size_0=t.asm.la).apply(null,arguments)},Ne=t._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Ne=t._emscripten_bind_DracoUInt8Array___destroy___0=t.asm.ma).apply(null,arguments)},Ue=t._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Ue=t._emscripten_bind_DracoInt16Array_DracoInt16Array_0=t.asm.na).apply(null,arguments)},Fe=t._emscripten_bind_DracoInt16Array_GetValue_1=function(){return(Fe=t._emscripten_bind_DracoInt16Array_GetValue_1=t.asm.oa).apply(null,arguments)},Le=t._emscripten_bind_DracoInt16Array_size_0=function(){return(Le=t._emscripten_bind_DracoInt16Array_size_0=t.asm.pa).apply(null,arguments)},Ce=t._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Ce=t._emscripten_bind_DracoInt16Array___destroy___0=t.asm.qa).apply(null,arguments)},we=t._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(we=t._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=t.asm.ra).apply(null,arguments)},ze=t._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(ze=t._emscripten_bind_DracoUInt16Array_GetValue_1=t.asm.sa).apply(null,arguments)},Ve=t._emscripten_bind_DracoUInt16Array_size_0=function(){return(Ve=t._emscripten_bind_DracoUInt16Array_size_0=t.asm.ta).apply(null,arguments)},Be=t._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Be=t._emscripten_bind_DracoUInt16Array___destroy___0=t.asm.ua).apply(null,arguments)},We=t._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(We=t._emscripten_bind_DracoInt32Array_DracoInt32Array_0=t.asm.va).apply(null,arguments)},Qe=t._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(Qe=t._emscripten_bind_DracoInt32Array_GetValue_1=t.asm.wa).apply(null,arguments)},xe=t._emscripten_bind_DracoInt32Array_size_0=function(){return(xe=t._emscripten_bind_DracoInt32Array_size_0=t.asm.xa).apply(null,arguments)},Ye=t._emscripten_bind_DracoInt32Array___destroy___0=function(){return(Ye=t._emscripten_bind_DracoInt32Array___destroy___0=t.asm.ya).apply(null,arguments)},He=t._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(He=t._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=t.asm.za).apply(null,arguments)},qe=t._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(qe=t._emscripten_bind_DracoUInt32Array_GetValue_1=t.asm.Aa).apply(null,arguments)},ke=t._emscripten_bind_DracoUInt32Array_size_0=function(){return(ke=t._emscripten_bind_DracoUInt32Array_size_0=t.asm.Ba).apply(null,arguments)},Xe=t._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(Xe=t._emscripten_bind_DracoUInt32Array___destroy___0=t.asm.Ca).apply(null,arguments)},Ke=t._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Ke=t._emscripten_bind_MetadataQuerier_MetadataQuerier_0=t.asm.Da).apply(null,arguments)},Je=t._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(Je=t._emscripten_bind_MetadataQuerier_HasEntry_2=t.asm.Ea).apply(null,arguments)},$e=t._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return($e=t._emscripten_bind_MetadataQuerier_GetIntEntry_2=t.asm.Fa).apply(null,arguments)},Ze=t._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(Ze=t._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=t.asm.Ga).apply(null,arguments)},tr=t._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(tr=t._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=t.asm.Ha).apply(null,arguments)},er=t._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(er=t._emscripten_bind_MetadataQuerier_GetStringEntry_2=t.asm.Ia).apply(null,arguments)},rr=t._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(rr=t._emscripten_bind_MetadataQuerier_NumEntries_1=t.asm.Ja).apply(null,arguments)},nr=t._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(nr=t._emscripten_bind_MetadataQuerier_GetEntryName_2=t.asm.Ka).apply(null,arguments)},or=t._emscripten_bind_MetadataQuerier___destroy___0=function(){return(or=t._emscripten_bind_MetadataQuerier___destroy___0=t.asm.La).apply(null,arguments)},_r=t._emscripten_bind_Decoder_Decoder_0=function(){return(_r=t._emscripten_bind_Decoder_Decoder_0=t.asm.Ma).apply(null,arguments)},ir=t._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(ir=t._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=t.asm.Na).apply(null,arguments)},ar=t._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(ar=t._emscripten_bind_Decoder_DecodeArrayToMesh_3=t.asm.Oa).apply(null,arguments)},pr=t._emscripten_bind_Decoder_GetAttributeId_2=function(){return(pr=t._emscripten_bind_Decoder_GetAttributeId_2=t.asm.Pa).apply(null,arguments)},ur=t._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(ur=t._emscripten_bind_Decoder_GetAttributeIdByName_2=t.asm.Qa).apply(null,arguments)},sr=t._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(sr=t._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=t.asm.Ra).apply(null,arguments)},cr=t._emscripten_bind_Decoder_GetAttribute_2=function(){return(cr=t._emscripten_bind_Decoder_GetAttribute_2=t.asm.Sa).apply(null,arguments)},yr=t._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(yr=t._emscripten_bind_Decoder_GetAttributeByUniqueId_2=t.asm.Ta).apply(null,arguments)},lr=t._emscripten_bind_Decoder_GetMetadata_1=function(){return(lr=t._emscripten_bind_Decoder_GetMetadata_1=t.asm.Ua).apply(null,arguments)},mr=t._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(mr=t._emscripten_bind_Decoder_GetAttributeMetadata_2=t.asm.Va).apply(null,arguments)},fr=t._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(fr=t._emscripten_bind_Decoder_GetFaceFromMesh_3=t.asm.Wa).apply(null,arguments)},dr=t._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(dr=t._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=t.asm.Xa).apply(null,arguments)},br=t._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(br=t._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=t.asm.Ya).apply(null,arguments)},hr=t._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(hr=t._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=t.asm.Za).apply(null,arguments)},Ar=t._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(Ar=t._emscripten_bind_Decoder_GetAttributeFloat_3=t.asm._a).apply(null,arguments)},Tr=t._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(Tr=t._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=t.asm.$a).apply(null,arguments)},Dr=t._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(Dr=t._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=t.asm.ab).apply(null,arguments)},Ir=t._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(Ir=t._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=t.asm.bb).apply(null,arguments)},gr=t._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(gr=t._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=t.asm.cb).apply(null,arguments)},vr=t._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(vr=t._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=t.asm.db).apply(null,arguments)},Er=t._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Er=t._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=t.asm.eb).apply(null,arguments)},Gr=t._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Gr=t._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=t.asm.fb).apply(null,arguments)},Or=t._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Or=t._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=t.asm.gb).apply(null,arguments)},jr=t._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(jr=t._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=t.asm.hb).apply(null,arguments)},Pr=t._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Pr=t._emscripten_bind_Decoder_SkipAttributeTransform_1=t.asm.ib).apply(null,arguments)},Rr=t._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Rr=t._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=t.asm.jb).apply(null,arguments)},Sr=t._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Sr=t._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=t.asm.kb).apply(null,arguments)},Mr=t._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Mr=t._emscripten_bind_Decoder_DecodeBufferToMesh_2=t.asm.lb).apply(null,arguments)},Nr=t._emscripten_bind_Decoder___destroy___0=function(){return(Nr=t._emscripten_bind_Decoder___destroy___0=t.asm.mb).apply(null,arguments)},Ur=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Ur=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=t.asm.nb).apply(null,arguments)},Fr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Fr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=t.asm.ob).apply(null,arguments)},Lr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Lr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=t.asm.pb).apply(null,arguments)},Cr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Cr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=t.asm.qb).apply(null,arguments)},wr=t._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(wr=t._emscripten_enum_draco_GeometryAttribute_Type_INVALID=t.asm.rb).apply(null,arguments)},zr=t._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(zr=t._emscripten_enum_draco_GeometryAttribute_Type_POSITION=t.asm.sb).apply(null,arguments)},Vr=t._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(Vr=t._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=t.asm.tb).apply(null,arguments)},Br=t._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Br=t._emscripten_enum_draco_GeometryAttribute_Type_COLOR=t.asm.ub).apply(null,arguments)},Wr=t._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Wr=t._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=t.asm.vb).apply(null,arguments)},Qr=t._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(Qr=t._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=t.asm.wb).apply(null,arguments)},xr=t._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(xr=t._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=t.asm.xb).apply(null,arguments)},Yr=t._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(Yr=t._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=t.asm.yb).apply(null,arguments)},Hr=t._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(Hr=t._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=t.asm.zb).apply(null,arguments)},qr=t._emscripten_enum_draco_DataType_DT_INVALID=function(){return(qr=t._emscripten_enum_draco_DataType_DT_INVALID=t.asm.Ab).apply(null,arguments)},kr=t._emscripten_enum_draco_DataType_DT_INT8=function(){return(kr=t._emscripten_enum_draco_DataType_DT_INT8=t.asm.Bb).apply(null,arguments)},Xr=t._emscripten_enum_draco_DataType_DT_UINT8=function(){return(Xr=t._emscripten_enum_draco_DataType_DT_UINT8=t.asm.Cb).apply(null,arguments)},Kr=t._emscripten_enum_draco_DataType_DT_INT16=function(){return(Kr=t._emscripten_enum_draco_DataType_DT_INT16=t.asm.Db).apply(null,arguments)},Jr=t._emscripten_enum_draco_DataType_DT_UINT16=function(){return(Jr=t._emscripten_enum_draco_DataType_DT_UINT16=t.asm.Eb).apply(null,arguments)},$r=t._emscripten_enum_draco_DataType_DT_INT32=function(){return($r=t._emscripten_enum_draco_DataType_DT_INT32=t.asm.Fb).apply(null,arguments)},Zr=t._emscripten_enum_draco_DataType_DT_UINT32=function(){return(Zr=t._emscripten_enum_draco_DataType_DT_UINT32=t.asm.Gb).apply(null,arguments)},tn=t._emscripten_enum_draco_DataType_DT_INT64=function(){return(tn=t._emscripten_enum_draco_DataType_DT_INT64=t.asm.Hb).apply(null,arguments)},en=t._emscripten_enum_draco_DataType_DT_UINT64=function(){return(en=t._emscripten_enum_draco_DataType_DT_UINT64=t.asm.Ib).apply(null,arguments)},rn=t._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(rn=t._emscripten_enum_draco_DataType_DT_FLOAT32=t.asm.Jb).apply(null,arguments)},nn=t._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(nn=t._emscripten_enum_draco_DataType_DT_FLOAT64=t.asm.Kb).apply(null,arguments)},on=t._emscripten_enum_draco_DataType_DT_BOOL=function(){return(on=t._emscripten_enum_draco_DataType_DT_BOOL=t.asm.Lb).apply(null,arguments)},_n=t._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(_n=t._emscripten_enum_draco_DataType_DT_TYPES_COUNT=t.asm.Mb).apply(null,arguments)},an=t._emscripten_enum_draco_StatusCode_OK=function(){return(an=t._emscripten_enum_draco_StatusCode_OK=t.asm.Nb).apply(null,arguments)},pn=t._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(pn=t._emscripten_enum_draco_StatusCode_DRACO_ERROR=t.asm.Ob).apply(null,arguments)},un=t._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(un=t._emscripten_enum_draco_StatusCode_IO_ERROR=t.asm.Pb).apply(null,arguments)},sn=t._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(sn=t._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=t.asm.Qb).apply(null,arguments)},cn=t._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(cn=t._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=t.asm.Rb).apply(null,arguments)},yn=t._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(yn=t._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=t.asm.Sb).apply(null,arguments)};t._malloc=function(){return(t._malloc=t.asm.Tb).apply(null,arguments)},t._free=function(){return(t._free=t.asm.Ub).apply(null,arguments)};var ln=function(){return(ln=t.asm.Vb).apply(null,arguments)};t.___start_em_js=15856,t.___stop_em_js=15954;var it;if(rt=function e(){it||K(),it||(rt=e)},t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);0<t.preInit.length;)t.preInit.pop()();K(),f.prototype=Object.create(f.prototype),f.prototype.constructor=f,f.prototype.__class__=f,f.__cache__={},t.WrapperObject=f,t.getCache=T,t.wrapPointer=G,t.castObject=function(e,r){return G(e.ptr,r)},t.NULL=G(0),t.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete T(e.__class__)[e.ptr]},t.compare=function(e,r){return e.ptr===r.ptr},t.getPointer=function(e){return e.ptr},t.getClass=function(e){return e.__class__};var d={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(d.needed){for(var e=0;e<d.temps.length;e++)t._free(d.temps[e]);d.temps.length=0,t._free(d.buffer),d.buffer=0,d.size+=d.needed,d.needed=0}d.buffer||(d.size+=128,d.buffer=t._malloc(d.size),d.buffer||i(void 0)),d.pos=0},alloc:function(e,r){return d.buffer||i(void 0),e=e.length*r.BYTES_PER_ELEMENT,e=e+7&-8,d.pos+e>=d.size?(0<e||i(void 0),d.needed+=e,r=t._malloc(e),d.temps.push(r)):(r=d.buffer+d.pos,d.pos+=e),r},copy:function(e,r,n){switch(n>>>=0,r.BYTES_PER_ELEMENT){case 2:n>>>=1;break;case 4:n>>>=2;break;case 8:n>>>=3}for(var o=0;o<e.length;o++)r[n+o]=e[o]}};return H.prototype=Object.create(f.prototype),H.prototype.constructor=H,H.prototype.__class__=H,H.__cache__={},t.VoidPtr=H,H.prototype.__destroy__=H.prototype.__destroy__=function(){St(this.ptr)},B.prototype=Object.create(f.prototype),B.prototype.constructor=B,B.prototype.__class__=B,B.__cache__={},t.DecoderBuffer=B,B.prototype.Init=B.prototype.Init=function(e,r){var n=this.ptr;d.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),Nt(n,e,r)},B.prototype.__destroy__=B.prototype.__destroy__=function(){Ut(this.ptr)},w.prototype=Object.create(f.prototype),w.prototype.constructor=w,w.prototype.__class__=w,w.__cache__={},t.AttributeTransformData=w,w.prototype.transform_type=w.prototype.transform_type=function(){return Lt(this.ptr)},w.prototype.__destroy__=w.prototype.__destroy__=function(){Ct(this.ptr)},Y.prototype=Object.create(f.prototype),Y.prototype.constructor=Y,Y.prototype.__class__=Y,Y.__cache__={},t.GeometryAttribute=Y,Y.prototype.__destroy__=Y.prototype.__destroy__=function(){zt(this.ptr)},A.prototype=Object.create(f.prototype),A.prototype.constructor=A,A.prototype.__class__=A,A.__cache__={},t.PointAttribute=A,A.prototype.size=A.prototype.size=function(){return Bt(this.ptr)},A.prototype.GetAttributeTransformData=A.prototype.GetAttributeTransformData=function(){return G(Wt(this.ptr),w)},A.prototype.attribute_type=A.prototype.attribute_type=function(){return Qt(this.ptr)},A.prototype.data_type=A.prototype.data_type=function(){return xt(this.ptr)},A.prototype.num_components=A.prototype.num_components=function(){return Yt(this.ptr)},A.prototype.normalized=A.prototype.normalized=function(){return!!Ht(this.ptr)},A.prototype.byte_stride=A.prototype.byte_stride=function(){return qt(this.ptr)},A.prototype.byte_offset=A.prototype.byte_offset=function(){return kt(this.ptr)},A.prototype.unique_id=A.prototype.unique_id=function(){return Xt(this.ptr)},A.prototype.__destroy__=A.prototype.__destroy__=function(){Kt(this.ptr)},E.prototype=Object.create(f.prototype),E.prototype.constructor=E,E.prototype.__class__=E,E.__cache__={},t.AttributeQuantizationTransform=E,E.prototype.InitFromAttribute=E.prototype.InitFromAttribute=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),!!$t(r,e)},E.prototype.quantization_bits=E.prototype.quantization_bits=function(){return Zt(this.ptr)},E.prototype.min_value=E.prototype.min_value=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),te(r,e)},E.prototype.range=E.prototype.range=function(){return ee(this.ptr)},E.prototype.__destroy__=E.prototype.__destroy__=function(){re(this.ptr)},j.prototype=Object.create(f.prototype),j.prototype.constructor=j,j.prototype.__class__=j,j.__cache__={},t.AttributeOctahedronTransform=j,j.prototype.InitFromAttribute=j.prototype.InitFromAttribute=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),!!oe(r,e)},j.prototype.quantization_bits=j.prototype.quantization_bits=function(){return _e(this.ptr)},j.prototype.__destroy__=j.prototype.__destroy__=function(){ie(this.ptr)},P.prototype=Object.create(f.prototype),P.prototype.constructor=P,P.prototype.__class__=P,P.__cache__={},t.PointCloud=P,P.prototype.num_attributes=P.prototype.num_attributes=function(){return pe(this.ptr)},P.prototype.num_points=P.prototype.num_points=function(){return ue(this.ptr)},P.prototype.__destroy__=P.prototype.__destroy__=function(){se(this.ptr)},O.prototype=Object.create(f.prototype),O.prototype.constructor=O,O.prototype.__class__=O,O.__cache__={},t.Mesh=O,O.prototype.num_faces=O.prototype.num_faces=function(){return ye(this.ptr)},O.prototype.num_attributes=O.prototype.num_attributes=function(){return le(this.ptr)},O.prototype.num_points=O.prototype.num_points=function(){return me(this.ptr)},O.prototype.__destroy__=O.prototype.__destroy__=function(){fe(this.ptr)},W.prototype=Object.create(f.prototype),W.prototype.constructor=W,W.prototype.__class__=W,W.__cache__={},t.Metadata=W,W.prototype.__destroy__=W.prototype.__destroy__=function(){be(this.ptr)},v.prototype=Object.create(f.prototype),v.prototype.constructor=v,v.prototype.__class__=v,v.__cache__={},t.Status=v,v.prototype.code=v.prototype.code=function(){return he(this.ptr)},v.prototype.ok=v.prototype.ok=function(){return!!Ae(this.ptr)},v.prototype.error_msg=v.prototype.error_msg=function(){return a(Te(this.ptr))},v.prototype.__destroy__=v.prototype.__destroy__=function(){De(this.ptr)},R.prototype=Object.create(f.prototype),R.prototype.constructor=R,R.prototype.__class__=R,R.__cache__={},t.DracoFloat32Array=R,R.prototype.GetValue=R.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),ge(r,e)},R.prototype.size=R.prototype.size=function(){return ve(this.ptr)},R.prototype.__destroy__=R.prototype.__destroy__=function(){Ee(this.ptr)},S.prototype=Object.create(f.prototype),S.prototype.constructor=S,S.prototype.__class__=S,S.__cache__={},t.DracoInt8Array=S,S.prototype.GetValue=S.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Oe(r,e)},S.prototype.size=S.prototype.size=function(){return je(this.ptr)},S.prototype.__destroy__=S.prototype.__destroy__=function(){Pe(this.ptr)},M.prototype=Object.create(f.prototype),M.prototype.constructor=M,M.prototype.__class__=M,M.__cache__={},t.DracoUInt8Array=M,M.prototype.GetValue=M.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Se(r,e)},M.prototype.size=M.prototype.size=function(){return Me(this.ptr)},M.prototype.__destroy__=M.prototype.__destroy__=function(){Ne(this.ptr)},N.prototype=Object.create(f.prototype),N.prototype.constructor=N,N.prototype.__class__=N,N.__cache__={},t.DracoInt16Array=N,N.prototype.GetValue=N.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Fe(r,e)},N.prototype.size=N.prototype.size=function(){return Le(this.ptr)},N.prototype.__destroy__=N.prototype.__destroy__=function(){Ce(this.ptr)},U.prototype=Object.create(f.prototype),U.prototype.constructor=U,U.prototype.__class__=U,U.__cache__={},t.DracoUInt16Array=U,U.prototype.GetValue=U.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),ze(r,e)},U.prototype.size=U.prototype.size=function(){return Ve(this.ptr)},U.prototype.__destroy__=U.prototype.__destroy__=function(){Be(this.ptr)},F.prototype=Object.create(f.prototype),F.prototype.constructor=F,F.prototype.__class__=F,F.__cache__={},t.DracoInt32Array=F,F.prototype.GetValue=F.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Qe(r,e)},F.prototype.size=F.prototype.size=function(){return xe(this.ptr)},F.prototype.__destroy__=F.prototype.__destroy__=function(){Ye(this.ptr)},L.prototype=Object.create(f.prototype),L.prototype.constructor=L,L.prototype.__class__=L,L.__cache__={},t.DracoUInt32Array=L,L.prototype.GetValue=L.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),qe(r,e)},L.prototype.size=L.prototype.size=function(){return ke(this.ptr)},L.prototype.__destroy__=L.prototype.__destroy__=function(){Xe(this.ptr)},D.prototype=Object.create(f.prototype),D.prototype.constructor=D,D.prototype.__class__=D,D.__cache__={},t.MetadataQuerier=D,D.prototype.HasEntry=D.prototype.HasEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),!!Je(n,e,r)},D.prototype.GetIntEntry=D.prototype.GetIntEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),$e(n,e,r)},D.prototype.GetIntEntryArray=D.prototype.GetIntEntryArray=function(e,r,n){var o=this.ptr;d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),n&&typeof n=="object"&&(n=n.ptr),Ze(o,e,r,n)},D.prototype.GetDoubleEntry=D.prototype.GetDoubleEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),tr(n,e,r)},D.prototype.GetStringEntry=D.prototype.GetStringEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),a(er(n,e,r))},D.prototype.NumEntries=D.prototype.NumEntries=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),rr(r,e)},D.prototype.GetEntryName=D.prototype.GetEntryName=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),a(nr(n,e,r))},D.prototype.__destroy__=D.prototype.__destroy__=function(){or(this.ptr)},u.prototype=Object.create(f.prototype),u.prototype.constructor=u,u.prototype.__class__=u,u.__cache__={},t.Decoder=u,u.prototype.DecodeArrayToPointCloud=u.prototype.DecodeArrayToPointCloud=function(e,r,n){var o=this.ptr;return d.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),G(ir(o,e,r,n),v)},u.prototype.DecodeArrayToMesh=u.prototype.DecodeArrayToMesh=function(e,r,n){var o=this.ptr;return d.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),G(ar(o,e,r,n),v)},u.prototype.GetAttributeId=u.prototype.GetAttributeId=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),pr(n,e,r)},u.prototype.GetAttributeIdByName=u.prototype.GetAttributeIdByName=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),ur(n,e,r)},u.prototype.GetAttributeIdByMetadataEntry=u.prototype.GetAttributeIdByMetadataEntry=function(e,r,n){var o=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),n=n&&typeof n=="object"?n.ptr:V(n),sr(o,e,r,n)},u.prototype.GetAttribute=u.prototype.GetAttribute=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(cr(n,e,r),A)},u.prototype.GetAttributeByUniqueId=u.prototype.GetAttributeByUniqueId=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(yr(n,e,r),A)},u.prototype.GetMetadata=u.prototype.GetMetadata=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),G(lr(r,e),W)},u.prototype.GetAttributeMetadata=u.prototype.GetAttributeMetadata=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(mr(n,e,r),W)},u.prototype.GetFaceFromMesh=u.prototype.GetFaceFromMesh=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!fr(o,e,r,n)},u.prototype.GetTriangleStripsFromMesh=u.prototype.GetTriangleStripsFromMesh=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),dr(n,e,r)},u.prototype.GetTrianglesUInt16Array=u.prototype.GetTrianglesUInt16Array=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!br(o,e,r,n)},u.prototype.GetTrianglesUInt32Array=u.prototype.GetTrianglesUInt32Array=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!hr(o,e,r,n)},u.prototype.GetAttributeFloat=u.prototype.GetAttributeFloat=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Ar(o,e,r,n)},u.prototype.GetAttributeFloatForAllPoints=u.prototype.GetAttributeFloatForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Tr(o,e,r,n)},u.prototype.GetAttributeIntForAllPoints=u.prototype.GetAttributeIntForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Dr(o,e,r,n)},u.prototype.GetAttributeInt8ForAllPoints=u.prototype.GetAttributeInt8ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Ir(o,e,r,n)},u.prototype.GetAttributeUInt8ForAllPoints=u.prototype.GetAttributeUInt8ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!gr(o,e,r,n)},u.prototype.GetAttributeInt16ForAllPoints=u.prototype.GetAttributeInt16ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!vr(o,e,r,n)},u.prototype.GetAttributeUInt16ForAllPoints=u.prototype.GetAttributeUInt16ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Er(o,e,r,n)},u.prototype.GetAttributeInt32ForAllPoints=u.prototype.GetAttributeInt32ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Gr(o,e,r,n)},u.prototype.GetAttributeUInt32ForAllPoints=u.prototype.GetAttributeUInt32ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Or(o,e,r,n)},u.prototype.GetAttributeDataArrayForAllPoints=u.prototype.GetAttributeDataArrayForAllPoints=function(e,r,n,o,m){var b=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),o&&typeof o=="object"&&(o=o.ptr),m&&typeof m=="object"&&(m=m.ptr),!!jr(b,e,r,n,o,m)},u.prototype.SkipAttributeTransform=u.prototype.SkipAttributeTransform=function(e){var r=this.ptr;e&&typeof e=="object"&&(e=e.ptr),Pr(r,e)},u.prototype.GetEncodedGeometryType_Deprecated=u.prototype.GetEncodedGeometryType_Deprecated=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Rr(r,e)},u.prototype.DecodeBufferToPointCloud=u.prototype.DecodeBufferToPointCloud=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(Sr(n,e,r),v)},u.prototype.DecodeBufferToMesh=u.prototype.DecodeBufferToMesh=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(Mr(n,e,r),v)},u.prototype.__destroy__=u.prototype.__destroy__=function(){Nr(this.ptr)},function(){function e(){t.ATTRIBUTE_INVALID_TRANSFORM=Ur(),t.ATTRIBUTE_NO_TRANSFORM=Fr(),t.ATTRIBUTE_QUANTIZATION_TRANSFORM=Lr(),t.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Cr(),t.INVALID=wr(),t.POSITION=zr(),t.NORMAL=Vr(),t.COLOR=Br(),t.TEX_COORD=Wr(),t.GENERIC=Qr(),t.INVALID_GEOMETRY_TYPE=xr(),t.POINT_CLOUD=Yr(),t.TRIANGULAR_MESH=Hr(),t.DT_INVALID=qr(),t.DT_INT8=kr(),t.DT_UINT8=Xr(),t.DT_INT16=Kr(),t.DT_UINT16=Jr(),t.DT_INT32=$r(),t.DT_UINT32=Zr(),t.DT_INT64=tn(),t.DT_UINT64=en(),t.DT_FLOAT32=rn(),t.DT_FLOAT64=nn(),t.DT_BOOL=on(),t.DT_TYPES_COUNT=_n(),t.OK=an(),t.DRACO_ERROR=pn(),t.IO_ERROR=un(),t.INVALID_PARAMETER=sn(),t.UNSUPPORTED_VERSION=cn(),t.UNKNOWN_VERSION=yn()}Rt?e():ct.unshift(e)}(),typeof t.onModuleParsed=="function"&&t.onModuleParsed(),t.Decoder.prototype.GetEncodedGeometryType=function(e){if(e.__class__&&e.__class__===t.DecoderBuffer)return t.Decoder.prototype.GetEncodedGeometryType_Deprecated(e);if(8>e.byteLength)return t.INVALID_GEOMETRY_TYPE;switch(e[7]){case 0:return t.POINT_CLOUD;case 1:return t.TRIANGULAR_MESH;default:return t.INVALID_GEOMETRY_TYPE}},c.ready}}();typeof nt=="object"&&typeof bt=="object"?bt.exports=dt:typeof define=="function"&&define.amd?define([],function(){return dt}):typeof nt=="object"&&(nt.DracoDecoderModule=dt)});export{Dn as a}; diff --git a/cesium/Workers/chunk-ACE4ZHPK.js b/cesium/Workers/chunk-FKRG4HDY.js similarity index 94% rename from cesium/Workers/chunk-ACE4ZHPK.js rename to cesium/Workers/chunk-FKRG4HDY.js index 45eae98..68c6395 100644 --- a/cesium/Workers/chunk-ACE4ZHPK.js +++ b/cesium/Workers/chunk-FKRG4HDY.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as $}from"./chunk-7RBDS4IP.js";import{a as b}from"./chunk-7JCIFY66.js";import{a as U}from"./chunk-RQXB4B4V.js";import{a as E}from"./chunk-MPVEZNKB.js";import{c as z,d as L}from"./chunk-FATK2EQ2.js";import{a as D,d as y}from"./chunk-3FEM743H.js";import{b as G}from"./chunk-CMXCDAKR.js";import{a as k}from"./chunk-77ESX6BV.js";import{d as B}from"./chunk-LJCGAQ64.js";import{a as v}from"./chunk-42NIXFVW.js";import{a as F,b as I}from"./chunk-5YVCOCPP.js";import{e as a}from"./chunk-U73D6PDD.js";function w(e,n,t){e=v(e,0),n=v(n,0),t=v(t,0),this.value=new Float32Array([e,n,t])}Object.defineProperties(w.prototype,{componentDatatype:{get:function(){return k.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});w.fromCartesian3=function(e){return I.defined("offset",e),new w(e.x,e.y,e.z)};w.toValue=function(e,n){return I.defined("offset",e),a(n)||(n=new Float32Array([e.x,e.y,e.z])),n[0]=e.x,n[1]=e.y,n[2]=e.z,n};var j=w;function K(e,n,t){let i=!t,r=e.length,c;if(!i&&r>1){let o=e[0].modelMatrix;for(c=1;c<r;++c)if(!G.equals(o,e[c].modelMatrix)){i=!0;break}}if(i)for(c=0;c<r;++c)a(e[c].geometry)&&b.transformToWorldCoordinates(e[c]);else G.multiplyTransformation(n,e[0].modelMatrix,n)}function P(e,n){let t=e.attributes,i=t.position,r=i.values.length/i.componentsPerAttribute;t.batchId=new L({componentDatatype:k.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});let c=t.batchId.values;for(let o=0;o<r;++o)c[o]=n}function N(e){let n=e.length;for(let t=0;t<n;++t){let i=e[t];a(i.geometry)?P(i.geometry,t):a(i.westHemisphereGeometry)&&a(i.eastHemisphereGeometry)&&(P(i.westHemisphereGeometry,t),P(i.eastHemisphereGeometry,t))}}function Q(e){let n=e.instances,t=e.projection,i=e.elementIndexUintSupported,r=e.scene3DOnly,c=e.vertexCacheOptimize,o=e.compressVertices,g=e.modelMatrix,s,u,m,p=n.length;for(s=0;s<p;++s)if(a(n[s].geometry)){m=n[s].geometry.primitiveType;break}for(s=1;s<p;++s)if(a(n[s].geometry)&&n[s].geometry.primitiveType!==m)throw new F("All instance geometries must have the same primitiveType.");if(K(n,g,r),!r)for(s=0;s<p;++s)a(n[s].geometry)&&b.splitLongitude(n[s]);if(N(n),c)for(s=0;s<p;++s){let f=n[s];a(f.geometry)?(b.reorderForPostVertexCache(f.geometry),b.reorderForPreVertexCache(f.geometry)):a(f.westHemisphereGeometry)&&a(f.eastHemisphereGeometry)&&(b.reorderForPostVertexCache(f.westHemisphereGeometry),b.reorderForPreVertexCache(f.westHemisphereGeometry),b.reorderForPostVertexCache(f.eastHemisphereGeometry),b.reorderForPreVertexCache(f.eastHemisphereGeometry))}let l=b.combineInstances(n);for(p=l.length,s=0;s<p;++s){u=l[s];let f=u.attributes;if(r)for(let d in f)f.hasOwnProperty(d)&&f[d].componentDatatype===k.DOUBLE&&b.encodeAttribute(u,d,`${d}3DHigh`,`${d}3DLow`);else for(let d in f)if(f.hasOwnProperty(d)&&f[d].componentDatatype===k.DOUBLE){let h=`${d}3D`,x=`${d}2D`;b.projectTo2D(u,d,h,x,t),a(u.boundingSphere)&&d==="position"&&(u.boundingSphereCV=y.fromVertices(u.attributes.position2D.values)),b.encodeAttribute(u,h,`${h}High`,`${h}Low`),b.encodeAttribute(u,x,`${x}High`,`${x}Low`)}o&&b.compressVertices(u)}if(!i){let f=[];for(p=l.length,s=0;s<p;++s)u=l[s],f=f.concat(b.fitToUnsignedShortIndices(u));l=f}return l}function T(e,n,t,i){let r,c,o,g=i.length-1;if(g>=0){let u=i[g];r=u.offset+u.count,o=u.index,c=t[o].indices.length}else r=0,o=0,c=t[o].indices.length;let s=e.length;for(let u=0;u<s;++u){let p=e[u][n];if(!a(p))continue;let l=p.indices.length;r+l>c&&(r=0,c=t[++o].indices.length),i.push({index:o,offset:r,count:l}),r+=l}}function X(e,n){let t=[];return T(e,"geometry",n,t),T(e,"westHemisphereGeometry",n,t),T(e,"eastHemisphereGeometry",n,t),t}var S={};S.combineGeometry=function(e){let n,t,i=e.instances,r=i.length,c,o,g=!1;r>0&&(n=Q(e),n.length>0&&(t=b.createAttributeLocations(n[0]),e.createPickOffsets&&(c=X(i,n))),a(i[0].attributes)&&a(i[0].attributes.offset)&&(o=new Array(r),g=!0));let s=new Array(r),u=new Array(r);for(let m=0;m<r;++m){let p=i[m],l=p.geometry;a(l)&&(s[m]=l.boundingSphere,u[m]=l.boundingSphereCV,g&&(o[m]=p.geometry.offsetAttribute));let f=p.eastHemisphereGeometry,d=p.westHemisphereGeometry;a(f)&&a(d)&&(a(f.boundingSphere)&&a(d.boundingSphere)&&(s[m]=y.union(f.boundingSphere,d.boundingSphere)),a(f.boundingSphereCV)&&a(d.boundingSphereCV)&&(u[m]=y.union(f.boundingSphereCV,d.boundingSphereCV)))}return{geometries:n,modelMatrix:e.modelMatrix,attributeLocations:t,pickOffsets:c,offsetInstanceExtend:o,boundingSpheres:s,boundingSpheresCV:u}};function Y(e,n){let t=e.attributes;for(let i in t)if(t.hasOwnProperty(i)){let r=t[i];a(r)&&a(r.values)&&n.push(r.values.buffer)}a(e.indices)&&n.push(e.indices.buffer)}function Z(e,n){let t=e.length;for(let i=0;i<t;++i)Y(e[i],n)}function _(e){let n=1,t=e.length;for(let i=0;i<t;i++){let r=e[i];if(++n,!a(r))continue;let c=r.attributes;n+=7+2*y.packedLength+(a(r.indices)?r.indices.length:0);for(let o in c)if(c.hasOwnProperty(o)&&a(c[o])){let g=c[o];n+=5+g.values.length}}return n}S.packCreateGeometryResults=function(e,n){let t=new Float64Array(_(e)),i=[],r={},c=e.length,o=0;t[o++]=c;for(let g=0;g<c;g++){let s=e[g],u=a(s);if(t[o++]=u?1:0,!u)continue;t[o++]=s.primitiveType,t[o++]=s.geometryType,t[o++]=v(s.offsetAttribute,-1);let m=a(s.boundingSphere)?1:0;t[o++]=m,m&&y.pack(s.boundingSphere,t,o),o+=y.packedLength;let p=a(s.boundingSphereCV)?1:0;t[o++]=p,p&&y.pack(s.boundingSphereCV,t,o),o+=y.packedLength;let l=s.attributes,f=[];for(let h in l)l.hasOwnProperty(h)&&a(l[h])&&(f.push(h),a(r[h])||(r[h]=i.length,i.push(h)));t[o++]=f.length;for(let h=0;h<f.length;h++){let x=f[h],C=l[x];t[o++]=r[x],t[o++]=C.componentDatatype,t[o++]=C.componentsPerAttribute,t[o++]=C.normalize?1:0,t[o++]=C.values.length,t.set(C.values,o),o+=C.values.length}let d=a(s.indices)?s.indices.length:0;t[o++]=d,d>0&&(t.set(s.indices,o),o+=d)}return n.push(t.buffer),{stringTable:i,packedData:t}};S.unpackCreateGeometryResults=function(e){let n=e.stringTable,t=e.packedData,i,r=new Array(t[0]),c=0,o=1;for(;o<t.length;){if(!(t[o++]===1)){r[c++]=void 0;continue}let s=t[o++],u=t[o++],m=t[o++];m===-1&&(m=void 0);let p,l;t[o++]===1&&(p=y.unpack(t,o)),o+=y.packedLength,t[o++]===1&&(l=y.unpack(t,o)),o+=y.packedLength;let h,x,C,H=new E,q=t[o++];for(i=0;i<q;i++){let A=n[t[o++]],M=t[o++];C=t[o++];let J=t[o++]!==0;h=t[o++],x=k.createTypedArray(M,h);for(let O=0;O<h;O++)x[O]=t[o++];H[A]=new L({componentDatatype:M,componentsPerAttribute:C,normalize:J,values:x})}let V;if(h=t[o++],h>0){let A=x.length/C;for(V=U.createTypedArray(A,h),i=0;i<h;i++)V[i]=t[o++]}r[c++]=new z({primitiveType:s,geometryType:u,boundingSphere:p,boundingSphereCV:l,indices:V,attributes:H,offsetAttribute:m})}return r};function ee(e,n){let t=e.length,i=new Float64Array(1+t*19),r=0;i[r++]=t;for(let c=0;c<t;c++){let o=e[c];if(G.pack(o.modelMatrix,i,r),r+=G.packedLength,a(o.attributes)&&a(o.attributes.offset)){let g=o.attributes.offset.value;i[r]=g[0],i[r+1]=g[1],i[r+2]=g[2]}r+=3}return n.push(i.buffer),i}function te(e){let n=e,t=new Array(n[0]),i=0,r=1;for(;r<n.length;){let c=G.unpack(n,r),o;r+=G.packedLength,a(n[r])&&(o={offset:new j(n[r],n[r+1],n[r+2])}),r+=3,t[i++]={modelMatrix:c,attributes:o}}return t}S.packCombineGeometryParameters=function(e,n){let t=e.createGeometryResults,i=t.length;for(let r=0;r<i;r++)n.push(t[r].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:ee(e.instances,n),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof D,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}};S.unpackCombineGeometryParameters=function(e){let n=te(e.packedInstances),t=e.createGeometryResults,i=t.length,r=0;for(let g=0;g<i;g++){let s=S.unpackCreateGeometryResults(t[g]),u=s.length;for(let m=0;m<u;m++){let p=s[m],l=n[r];l.geometry=p,++r}}let c=B.clone(e.ellipsoid),o=e.isGeographic?new D(c):new $(c);return{instances:n,ellipsoid:c,projection:o,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:G.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}};function R(e){let n=e.length,t=1+(y.packedLength+1)*n,i=new Float32Array(t),r=0;i[r++]=n;for(let c=0;c<n;++c){let o=e[c];a(o)?(i[r++]=1,y.pack(e[c],i,r)):i[r++]=0,r+=y.packedLength}return i}function W(e){let n=new Array(e[0]),t=0,i=1;for(;i<e.length;)e[i++]===1&&(n[t]=y.unpack(e,i)),++t,i+=y.packedLength;return n}S.packCombineGeometryResults=function(e,n){a(e.geometries)&&Z(e.geometries,n);let t=R(e.boundingSpheres),i=R(e.boundingSpheresCV);return n.push(t.buffer,i.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:t,boundingSpheresCV:i}};S.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:W(e.boundingSpheres),boundingSpheresCV:W(e.boundingSpheresCV)}};var Ge=S;export{Ge as a}; +import{a as $}from"./chunk-SB224QGV.js";import{a as b}from"./chunk-QB3MDM4J.js";import{a as U}from"./chunk-P37AI2DW.js";import{a as E}from"./chunk-T6BE4RZK.js";import{c as z,d as L}from"./chunk-X5IHHI6X.js";import{a as D,d as y}from"./chunk-TMSETF7M.js";import{b as G}from"./chunk-7Z5IIKOJ.js";import{a as k}from"./chunk-KZNJOCYU.js";import{d as B}from"./chunk-POASMU2N.js";import{a as v}from"./chunk-IUA6FAOZ.js";import{a as F,b as I}from"./chunk-UH2WFNTA.js";import{e as a}from"./chunk-PEYJTJPE.js";function w(e,n,t){e=v(e,0),n=v(n,0),t=v(t,0),this.value=new Float32Array([e,n,t])}Object.defineProperties(w.prototype,{componentDatatype:{get:function(){return k.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});w.fromCartesian3=function(e){return I.defined("offset",e),new w(e.x,e.y,e.z)};w.toValue=function(e,n){return I.defined("offset",e),a(n)||(n=new Float32Array([e.x,e.y,e.z])),n[0]=e.x,n[1]=e.y,n[2]=e.z,n};var j=w;function K(e,n,t){let i=!t,r=e.length,c;if(!i&&r>1){let o=e[0].modelMatrix;for(c=1;c<r;++c)if(!G.equals(o,e[c].modelMatrix)){i=!0;break}}if(i)for(c=0;c<r;++c)a(e[c].geometry)&&b.transformToWorldCoordinates(e[c]);else G.multiplyTransformation(n,e[0].modelMatrix,n)}function P(e,n){let t=e.attributes,i=t.position,r=i.values.length/i.componentsPerAttribute;t.batchId=new L({componentDatatype:k.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});let c=t.batchId.values;for(let o=0;o<r;++o)c[o]=n}function N(e){let n=e.length;for(let t=0;t<n;++t){let i=e[t];a(i.geometry)?P(i.geometry,t):a(i.westHemisphereGeometry)&&a(i.eastHemisphereGeometry)&&(P(i.westHemisphereGeometry,t),P(i.eastHemisphereGeometry,t))}}function Q(e){let n=e.instances,t=e.projection,i=e.elementIndexUintSupported,r=e.scene3DOnly,c=e.vertexCacheOptimize,o=e.compressVertices,g=e.modelMatrix,s,u,m,p=n.length;for(s=0;s<p;++s)if(a(n[s].geometry)){m=n[s].geometry.primitiveType;break}for(s=1;s<p;++s)if(a(n[s].geometry)&&n[s].geometry.primitiveType!==m)throw new F("All instance geometries must have the same primitiveType.");if(K(n,g,r),!r)for(s=0;s<p;++s)a(n[s].geometry)&&b.splitLongitude(n[s]);if(N(n),c)for(s=0;s<p;++s){let f=n[s];a(f.geometry)?(b.reorderForPostVertexCache(f.geometry),b.reorderForPreVertexCache(f.geometry)):a(f.westHemisphereGeometry)&&a(f.eastHemisphereGeometry)&&(b.reorderForPostVertexCache(f.westHemisphereGeometry),b.reorderForPreVertexCache(f.westHemisphereGeometry),b.reorderForPostVertexCache(f.eastHemisphereGeometry),b.reorderForPreVertexCache(f.eastHemisphereGeometry))}let l=b.combineInstances(n);for(p=l.length,s=0;s<p;++s){u=l[s];let f=u.attributes;if(r)for(let d in f)f.hasOwnProperty(d)&&f[d].componentDatatype===k.DOUBLE&&b.encodeAttribute(u,d,`${d}3DHigh`,`${d}3DLow`);else for(let d in f)if(f.hasOwnProperty(d)&&f[d].componentDatatype===k.DOUBLE){let h=`${d}3D`,x=`${d}2D`;b.projectTo2D(u,d,h,x,t),a(u.boundingSphere)&&d==="position"&&(u.boundingSphereCV=y.fromVertices(u.attributes.position2D.values)),b.encodeAttribute(u,h,`${h}High`,`${h}Low`),b.encodeAttribute(u,x,`${x}High`,`${x}Low`)}o&&b.compressVertices(u)}if(!i){let f=[];for(p=l.length,s=0;s<p;++s)u=l[s],f=f.concat(b.fitToUnsignedShortIndices(u));l=f}return l}function T(e,n,t,i){let r,c,o,g=i.length-1;if(g>=0){let u=i[g];r=u.offset+u.count,o=u.index,c=t[o].indices.length}else r=0,o=0,c=t[o].indices.length;let s=e.length;for(let u=0;u<s;++u){let p=e[u][n];if(!a(p))continue;let l=p.indices.length;r+l>c&&(r=0,c=t[++o].indices.length),i.push({index:o,offset:r,count:l}),r+=l}}function X(e,n){let t=[];return T(e,"geometry",n,t),T(e,"westHemisphereGeometry",n,t),T(e,"eastHemisphereGeometry",n,t),t}var S={};S.combineGeometry=function(e){let n,t,i=e.instances,r=i.length,c,o,g=!1;r>0&&(n=Q(e),n.length>0&&(t=b.createAttributeLocations(n[0]),e.createPickOffsets&&(c=X(i,n))),a(i[0].attributes)&&a(i[0].attributes.offset)&&(o=new Array(r),g=!0));let s=new Array(r),u=new Array(r);for(let m=0;m<r;++m){let p=i[m],l=p.geometry;a(l)&&(s[m]=l.boundingSphere,u[m]=l.boundingSphereCV,g&&(o[m]=p.geometry.offsetAttribute));let f=p.eastHemisphereGeometry,d=p.westHemisphereGeometry;a(f)&&a(d)&&(a(f.boundingSphere)&&a(d.boundingSphere)&&(s[m]=y.union(f.boundingSphere,d.boundingSphere)),a(f.boundingSphereCV)&&a(d.boundingSphereCV)&&(u[m]=y.union(f.boundingSphereCV,d.boundingSphereCV)))}return{geometries:n,modelMatrix:e.modelMatrix,attributeLocations:t,pickOffsets:c,offsetInstanceExtend:o,boundingSpheres:s,boundingSpheresCV:u}};function Y(e,n){let t=e.attributes;for(let i in t)if(t.hasOwnProperty(i)){let r=t[i];a(r)&&a(r.values)&&n.push(r.values.buffer)}a(e.indices)&&n.push(e.indices.buffer)}function Z(e,n){let t=e.length;for(let i=0;i<t;++i)Y(e[i],n)}function _(e){let n=1,t=e.length;for(let i=0;i<t;i++){let r=e[i];if(++n,!a(r))continue;let c=r.attributes;n+=7+2*y.packedLength+(a(r.indices)?r.indices.length:0);for(let o in c)if(c.hasOwnProperty(o)&&a(c[o])){let g=c[o];n+=5+g.values.length}}return n}S.packCreateGeometryResults=function(e,n){let t=new Float64Array(_(e)),i=[],r={},c=e.length,o=0;t[o++]=c;for(let g=0;g<c;g++){let s=e[g],u=a(s);if(t[o++]=u?1:0,!u)continue;t[o++]=s.primitiveType,t[o++]=s.geometryType,t[o++]=v(s.offsetAttribute,-1);let m=a(s.boundingSphere)?1:0;t[o++]=m,m&&y.pack(s.boundingSphere,t,o),o+=y.packedLength;let p=a(s.boundingSphereCV)?1:0;t[o++]=p,p&&y.pack(s.boundingSphereCV,t,o),o+=y.packedLength;let l=s.attributes,f=[];for(let h in l)l.hasOwnProperty(h)&&a(l[h])&&(f.push(h),a(r[h])||(r[h]=i.length,i.push(h)));t[o++]=f.length;for(let h=0;h<f.length;h++){let x=f[h],C=l[x];t[o++]=r[x],t[o++]=C.componentDatatype,t[o++]=C.componentsPerAttribute,t[o++]=C.normalize?1:0,t[o++]=C.values.length,t.set(C.values,o),o+=C.values.length}let d=a(s.indices)?s.indices.length:0;t[o++]=d,d>0&&(t.set(s.indices,o),o+=d)}return n.push(t.buffer),{stringTable:i,packedData:t}};S.unpackCreateGeometryResults=function(e){let n=e.stringTable,t=e.packedData,i,r=new Array(t[0]),c=0,o=1;for(;o<t.length;){if(!(t[o++]===1)){r[c++]=void 0;continue}let s=t[o++],u=t[o++],m=t[o++];m===-1&&(m=void 0);let p,l;t[o++]===1&&(p=y.unpack(t,o)),o+=y.packedLength,t[o++]===1&&(l=y.unpack(t,o)),o+=y.packedLength;let h,x,C,H=new E,q=t[o++];for(i=0;i<q;i++){let A=n[t[o++]],M=t[o++];C=t[o++];let J=t[o++]!==0;h=t[o++],x=k.createTypedArray(M,h);for(let O=0;O<h;O++)x[O]=t[o++];H[A]=new L({componentDatatype:M,componentsPerAttribute:C,normalize:J,values:x})}let V;if(h=t[o++],h>0){let A=x.length/C;for(V=U.createTypedArray(A,h),i=0;i<h;i++)V[i]=t[o++]}r[c++]=new z({primitiveType:s,geometryType:u,boundingSphere:p,boundingSphereCV:l,indices:V,attributes:H,offsetAttribute:m})}return r};function ee(e,n){let t=e.length,i=new Float64Array(1+t*19),r=0;i[r++]=t;for(let c=0;c<t;c++){let o=e[c];if(G.pack(o.modelMatrix,i,r),r+=G.packedLength,a(o.attributes)&&a(o.attributes.offset)){let g=o.attributes.offset.value;i[r]=g[0],i[r+1]=g[1],i[r+2]=g[2]}r+=3}return n.push(i.buffer),i}function te(e){let n=e,t=new Array(n[0]),i=0,r=1;for(;r<n.length;){let c=G.unpack(n,r),o;r+=G.packedLength,a(n[r])&&(o={offset:new j(n[r],n[r+1],n[r+2])}),r+=3,t[i++]={modelMatrix:c,attributes:o}}return t}S.packCombineGeometryParameters=function(e,n){let t=e.createGeometryResults,i=t.length;for(let r=0;r<i;r++)n.push(t[r].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:ee(e.instances,n),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof D,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}};S.unpackCombineGeometryParameters=function(e){let n=te(e.packedInstances),t=e.createGeometryResults,i=t.length,r=0;for(let g=0;g<i;g++){let s=S.unpackCreateGeometryResults(t[g]),u=s.length;for(let m=0;m<u;m++){let p=s[m],l=n[r];l.geometry=p,++r}}let c=B.clone(e.ellipsoid),o=e.isGeographic?new D(c):new $(c);return{instances:n,ellipsoid:c,projection:o,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:G.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}};function R(e){let n=e.length,t=1+(y.packedLength+1)*n,i=new Float32Array(t),r=0;i[r++]=n;for(let c=0;c<n;++c){let o=e[c];a(o)?(i[r++]=1,y.pack(e[c],i,r)):i[r++]=0,r+=y.packedLength}return i}function W(e){let n=new Array(e[0]),t=0,i=1;for(;i<e.length;)e[i++]===1&&(n[t]=y.unpack(e,i)),++t,i+=y.packedLength;return n}S.packCombineGeometryResults=function(e,n){a(e.geometries)&&Z(e.geometries,n);let t=R(e.boundingSpheres),i=R(e.boundingSpheresCV);return n.push(t.buffer,i.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:t,boundingSpheresCV:i}};S.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:W(e.boundingSpheres),boundingSpheresCV:W(e.boundingSpheresCV)}};var Ge=S;export{Ge as a}; diff --git a/cesium/Workers/chunk-FPY4GPIL.js b/cesium/Workers/chunk-FPY4GPIL.js deleted file mode 100644 index 6ab6d32..0000000 --- a/cesium/Workers/chunk-FPY4GPIL.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 - * - * Copyright 2011-2022 Cesium Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Columbus View (Pat. Pend.) - * - * Portions licensed separately. - * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. - */ - -import{a as O}from"./chunk-3FEM743H.js";import{h as I,i as V}from"./chunk-CMXCDAKR.js";import{a as W,b as v}from"./chunk-LJCGAQ64.js";import{a as R}from"./chunk-JFG572S7.js";import{a as k}from"./chunk-5YVCOCPP.js";import{e as N}from"./chunk-U73D6PDD.js";var z=Math.cos,Z=Math.sin,D=Math.sqrt,L={};L.computePosition=function(t,_,l,h,G,u,a){let e=_.radiiSquared,i=t.nwCorner,r=t.boundingRectangle,n=i.latitude-t.granYCos*h+G*t.granXSin,X=z(n),Y=Z(n),d=e.z*Y,s=i.longitude+h*t.granYSin+G*t.granXCos,S=X*z(s),f=X*Z(s),w=e.x*S,m=e.y*f,M=D(w*S+m*f+d*Y);if(u.x=w/M,u.y=m/M,u.z=d/M,l){let o=t.stNwCorner;N(o)?(n=o.latitude-t.stGranYCos*h+G*t.stGranXSin,s=o.longitude+h*t.stGranYSin+G*t.stGranXCos,a.x=(s-t.stWest)*t.lonScalar,a.y=(n-t.stSouth)*t.latScalar):(a.x=(s-r.west)*t.lonScalar,a.y=(n-r.south)*t.latScalar)}};var A=new V,g=new W,F=new v,b=new W,q=new O;function B(t,_,l,h,G,u,a){let e=Math.cos(_),i=h*e,r=l*e,n=Math.sin(_),X=h*n,Y=l*n;g=q.project(t,g),g=W.subtract(g,b,g);let d=V.fromRotation(_,A);g=V.multiplyByVector(d,g,g),g=W.add(g,b,g),t=q.unproject(g,t),u-=1,a-=1;let s=t.latitude,S=s+u*Y,f=s-i*a,w=s-i*a+u*Y,m=Math.max(s,S,f,w),M=Math.min(s,S,f,w),o=t.longitude,y=o+u*r,T=o+a*X,E=o+a*X+u*r,j=Math.max(o,y,T,E),x=Math.min(o,y,T,E);return{north:m,south:M,east:j,west:x,granYCos:i,granYSin:X,granXCos:r,granXSin:Y,nwCorner:t}}L.computeOptions=function(t,_,l,h,G,u,a){let e=t.east,i=t.west,r=t.north,n=t.south,X=!1,Y=!1;r===R.PI_OVER_TWO&&(X=!0),n===-R.PI_OVER_TWO&&(Y=!0);let d,s=r-n;i>e?d=R.TWO_PI-i+e:d=e-i;let S=Math.ceil(d/_)+1,f=Math.ceil(s/_)+1,w=d/(S-1),m=s/(f-1),M=I.northwest(t,u),o=I.center(t,F);(l!==0||h!==0)&&(o.longitude<M.longitude&&(o.longitude+=R.TWO_PI),b=q.project(o,b));let y=m,T=w,E=0,j=0,x=I.clone(t,G),c={granYCos:y,granYSin:E,granXCos:T,granXSin:j,nwCorner:M,boundingRectangle:x,width:S,height:f,northCap:X,southCap:Y};if(l!==0){let C=B(M,l,w,m,o,S,f);if(r=C.north,n=C.south,e=C.east,i=C.west,r<-R.PI_OVER_TWO||r>R.PI_OVER_TWO||n<-R.PI_OVER_TWO||n>R.PI_OVER_TWO)throw new k("Rotated rectangle is invalid. It crosses over either the north or south pole.");c.granYCos=C.granYCos,c.granYSin=C.granYSin,c.granXCos=C.granXCos,c.granXSin=C.granXSin,x.north=r,x.south=n,x.east=e,x.west=i}if(h!==0){l=l-h;let C=I.northwest(x,a),P=B(C,l,w,m,o,S,f);c.stGranYCos=P.granYCos,c.stGranXCos=P.granXCos,c.stGranYSin=P.granYSin,c.stGranXSin=P.granXSin,c.stNwCorner=C,c.stWest=P.west,c.stSouth=P.south}return c};var nt=L;export{nt as a}; diff --git a/cesium/Workers/chunk-FYOYUPXG.js b/cesium/Workers/chunk-FYOYUPXG.js new file mode 100644 index 0000000..735310c --- /dev/null +++ b/cesium/Workers/chunk-FYOYUPXG.js @@ -0,0 +1,26 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.119 + * + * Copyright 2011-2022 Cesium Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Columbus View (Pat. Pend.) + * + * Portions licensed separately. + * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. + */ + +import{a as p,b as P,d as q}from"./chunk-POASMU2N.js";import{a}from"./chunk-R6KGAEF6.js";import{a as T}from"./chunk-IUA6FAOZ.js";import{a as I,b as g}from"./chunk-UH2WFNTA.js";import{e as l}from"./chunk-PEYJTJPE.js";function y(n,i,o){if(n===0)return i*o;let t=n*n,e=t*t,c=e*t,r=c*t,h=r*t,s=h*t,d=o,u=Math.sin(2*d),f=Math.sin(4*d),M=Math.sin(6*d),_=Math.sin(8*d),E=Math.sin(10*d),S=Math.sin(12*d);return i*((1-t/4-3*e/64-5*c/256-175*r/16384-441*h/65536-4851*s/1048576)*d-(3*t/8+3*e/32+45*c/1024+105*r/4096+2205*h/131072+6237*s/524288)*u+(15*e/256+45*c/1024+525*r/16384+1575*h/65536+155925*s/8388608)*f-(35*c/3072+175*r/12288+3675*h/262144+13475*s/1048576)*M+(315*r/131072+2205*h/524288+43659*s/8388608)*_-(693*h/1310720+6237*s/5242880)*E+1001*s/8388608*S)}function z(n,i,o){let t=n/o;if(i===0)return t;let e=t*t,c=e*t,r=c*t,h=i,s=h*h,d=s*s,u=d*s,f=u*s,M=f*s,_=M*s,E=Math.sin(2*t),S=Math.cos(2*t),W=Math.sin(4*t),V=Math.cos(4*t),C=Math.sin(6*t),N=Math.cos(6*t),R=Math.sin(8*t),b=Math.cos(8*t),x=Math.sin(10*t),U=Math.cos(10*t),H=Math.sin(12*t);return t+t*s/4+7*t*d/64+15*t*u/256+579*t*f/16384+1515*t*M/65536+16837*t*_/1048576+(3*t*d/16+45*t*u/256-t*(32*e-561)*f/4096-t*(232*e-1677)*M/16384+t*(399985-90560*e+512*r)*_/5242880)*S+(21*t*u/256+483*t*f/4096-t*(224*e-1969)*M/16384-t*(33152*e-112599)*_/1048576)*V+(151*t*f/4096+4681*t*M/65536+1479*t*_/16384-453*c*_/32768)*N+(1097*t*M/65536+42783*t*_/1048576)*b+8011*t*_/1048576*U+(3*s/8+3*d/16+213*u/2048-3*e*u/64+255*f/4096-33*e*f/512+20861*M/524288-33*e*M/512+r*M/1024+28273*_/1048576-471*e*_/8192+9*r*_/4096)*E+(21*d/256+21*u/256+533*f/8192-21*e*f/512+197*M/4096-315*e*M/4096+584039*_/16777216-12517*e*_/131072+7*r*_/2048)*W+(151*u/6144+151*f/4096+5019*M/131072-453*e*M/16384+26965*_/786432-8607*e*_/131072)*C+(1097*f/131072+1097*M/65536+225797*_/10485760-1097*e*_/65536)*R+(8011*M/2621440+8011*_/1048576)*x+293393*_/251658240*H}function O(n,i){if(n===0)return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)));let o=n*Math.sin(i);return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)))-n/2*Math.log((1+o)/(1-o))}function k(n,i,o,t,e){let c=O(n._ellipticity,o),r=O(n._ellipticity,e);return Math.atan2(a.negativePiToPi(t-i),r-c)}function A(n,i,o,t,e,c,r){let h=n._heading,s=c-t,d=0;if(a.equalsEpsilon(Math.abs(h),a.PI_OVER_TWO,a.EPSILON8))if(i===o)d=i*Math.cos(e)*a.negativePiToPi(s);else{let u=Math.sin(e);d=i*Math.cos(e)*a.negativePiToPi(s)/Math.sqrt(1-n._ellipticitySquared*u*u)}else{let u=y(n._ellipticity,i,e);d=(y(n._ellipticity,i,r)-u)/Math.cos(h)}return Math.abs(d)}var B=new p,w=new p;function D(n,i,o,t){let e=p.normalize(t.cartographicToCartesian(i,w),B),c=p.normalize(t.cartographicToCartesian(o,w),w);g.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(p.angleBetween(e,c))-Math.PI),.0125);let r=t.maximumRadius,h=t.minimumRadius,s=r*r,d=h*h;n._ellipticitySquared=(s-d)/s,n._ellipticity=Math.sqrt(n._ellipticitySquared),n._start=P.clone(i,n._start),n._start.height=0,n._end=P.clone(o,n._end),n._end.height=0,n._heading=k(n,i.longitude,i.latitude,o.longitude,o.latitude),n._distance=A(n,t.maximumRadius,t.minimumRadius,i.longitude,i.latitude,o.longitude,o.latitude)}function v(n,i,o,t,e,c){if(o===0)return P.clone(n,c);let r=e*e,h,s,d;if(Math.abs(a.PI_OVER_TWO-Math.abs(i))>a.EPSILON8){let u=y(e,t,n.latitude),f=o*Math.cos(i),M=u+f;if(s=z(M,e,t),Math.abs(i)<a.EPSILON10)h=a.negativePiToPi(n.longitude);else{let _=O(e,n.latitude),E=O(e,s);d=Math.tan(i)*(E-_),h=a.negativePiToPi(n.longitude+d)}}else{s=n.latitude;let u;if(e===0)u=t*Math.cos(n.latitude);else{let f=Math.sin(n.latitude);u=t*Math.cos(n.latitude)/Math.sqrt(1-r*f*f)}d=o/u,i>0?h=a.negativePiToPi(n.longitude+d):h=a.negativePiToPi(n.longitude-d)}return l(c)?(c.longitude=h,c.latitude=s,c.height=0,c):new P(h,s,0)}function m(n,i,o){let t=T(o,q.default);this._ellipsoid=t,this._start=new P,this._end=new P,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(n)&&l(i)&&D(this,n,i,t)}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return g.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return g.defined("distance",this._distance),this._heading}}});m.fromStartHeadingDistance=function(n,i,o,t,e){g.defined("start",n),g.defined("heading",i),g.defined("distance",o),g.typeOf.number.greaterThan("distance",o,0);let c=T(t,q.default),r=c.maximumRadius,h=c.minimumRadius,s=r*r,d=h*h,u=Math.sqrt((s-d)/s);i=a.negativePiToPi(i);let f=v(n,i,o,c.maximumRadius,u);return!l(e)||l(t)&&!t.equals(e.ellipsoid)?new m(n,f,c):(e.setEndPoints(n,f),e)};m.prototype.setEndPoints=function(n,i){g.defined("start",n),g.defined("end",i),D(this,n,i,this._ellipsoid)};m.prototype.interpolateUsingFraction=function(n,i){return this.interpolateUsingSurfaceDistance(n*this._distance,i)};m.prototype.interpolateUsingSurfaceDistance=function(n,i){if(g.typeOf.number("distance",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");return v(this._start,this._heading,n,this._ellipsoid.maximumRadius,this._ellipticity,i)};m.prototype.findIntersectionWithLongitude=function(n,i){if(g.typeOf.number("intersectionLongitude",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");let o=this._ellipticity,t=this._heading,e=Math.abs(t),c=this._start;if(n=a.negativePiToPi(n),a.equalsEpsilon(Math.abs(n),Math.PI,a.EPSILON14)&&(n=a.sign(c.longitude)*Math.PI),l(i)||(i=new P),Math.abs(a.PI_OVER_TWO-e)<=a.EPSILON8)return i.longitude=n,i.latitude=c.latitude,i.height=0,i;if(a.equalsEpsilon(Math.abs(a.PI_OVER_TWO-e),a.PI_OVER_TWO,a.EPSILON8))return a.equalsEpsilon(n,c.longitude,a.EPSILON12)?void 0:(i.longitude=n,i.latitude=a.PI_OVER_TWO*a.sign(a.PI_OVER_TWO-t),i.height=0,i);let r=c.latitude,h=o*Math.sin(r),s=Math.tan(.5*(a.PI_OVER_TWO+r))*Math.exp((n-c.longitude)/Math.tan(t)),d=(1+h)/(1-h),u=c.latitude,f;do{f=u;let M=o*Math.sin(f),_=(1+M)/(1-M);u=2*Math.atan(s*Math.pow(_/d,o/2))-a.PI_OVER_TWO}while(!a.equalsEpsilon(u,f,a.EPSILON12));return i.longitude=n,i.latitude=u,i.height=0,i};m.prototype.findIntersectionWithLatitude=function(n,i){if(g.typeOf.number("intersectionLatitude",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");let o=this._ellipticity,t=this._heading,e=this._start;if(a.equalsEpsilon(Math.abs(t),a.PI_OVER_TWO,a.EPSILON8))return;let c=O(o,e.latitude),r=O(o,n),h=Math.tan(t)*(r-c),s=a.negativePiToPi(e.longitude+h);return l(i)?(i.longitude=s,i.latitude=n,i.height=0,i):new P(s,n,0)};var $=m;export{$ as a}; diff --git a/cesium/Workers/chunk-2TLJ26OO.js b/cesium/Workers/chunk-GFN7NNSJ.js similarity index 93% rename from cesium/Workers/chunk-2TLJ26OO.js rename to cesium/Workers/chunk-GFN7NNSJ.js index a185203..0310d5f 100644 --- a/cesium/Workers/chunk-2TLJ26OO.js +++ b/cesium/Workers/chunk-GFN7NNSJ.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as w}from"./chunk-JFG572S7.js";var C={};C.computePositions=function(I,f,b,n,e){let m=I*.5,i=-m,s=n+n,P=e?2*s:s,t=new Float64Array(P*3),r,c=0,o=0,p=e?s*3:0,a=e?(s+n)*3:n*3;for(r=0;r<n;r++){let y=r/n*w.TWO_PI,x=Math.cos(y),h=Math.sin(y),u=x*b,M=h*b,O=x*f,d=h*f;t[o+p]=u,t[o+p+1]=M,t[o+p+2]=i,t[o+a]=O,t[o+a+1]=d,t[o+a+2]=m,o+=3,e&&(t[c++]=u,t[c++]=M,t[c++]=i,t[c++]=O,t[c++]=d,t[c++]=m)}return t};var Y=C;export{Y as a}; +import{a as w}from"./chunk-R6KGAEF6.js";var C={};C.computePositions=function(I,f,b,n,e){let m=I*.5,i=-m,s=n+n,P=e?2*s:s,t=new Float64Array(P*3),r,c=0,o=0,p=e?s*3:0,a=e?(s+n)*3:n*3;for(r=0;r<n;r++){let y=r/n*w.TWO_PI,x=Math.cos(y),h=Math.sin(y),u=x*b,M=h*b,O=x*f,d=h*f;t[o+p]=u,t[o+p+1]=M,t[o+p+2]=i,t[o+a]=O,t[o+a+1]=d,t[o+a+2]=m,o+=3,e&&(t[c++]=u,t[c++]=M,t[c++]=i,t[c++]=O,t[c++]=d,t[c++]=m)}return t};var Y=C;export{Y as a}; diff --git a/cesium/Workers/chunk-DUVNED7U.js b/cesium/Workers/chunk-HEEMUCG6.js similarity index 93% rename from cesium/Workers/chunk-DUVNED7U.js rename to cesium/Workers/chunk-HEEMUCG6.js index 710ca15..1b49881 100644 --- a/cesium/Workers/chunk-DUVNED7U.js +++ b/cesium/Workers/chunk-HEEMUCG6.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as t}from"./chunk-42NIXFVW.js";import{a as O}from"./chunk-5YVCOCPP.js";import{e as f}from"./chunk-U73D6PDD.js";function n(e){e=t(e,t.EMPTY_OBJECT),this.position=t(e.position,!1),this.normal=t(e.normal,!1),this.st=t(e.st,!1),this.bitangent=t(e.bitangent,!1),this.tangent=t(e.tangent,!1),this.color=t(e.color,!1)}n.POSITION_ONLY=Object.freeze(new n({position:!0}));n.POSITION_AND_NORMAL=Object.freeze(new n({position:!0,normal:!0}));n.POSITION_NORMAL_AND_ST=Object.freeze(new n({position:!0,normal:!0,st:!0}));n.POSITION_AND_ST=Object.freeze(new n({position:!0,st:!0}));n.POSITION_AND_COLOR=Object.freeze(new n({position:!0,color:!0}));n.ALL=Object.freeze(new n({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));n.DEFAULT=n.POSITION_NORMAL_AND_ST;n.packedLength=6;n.pack=function(e,o,i){if(!f(e))throw new O("value is required");if(!f(o))throw new O("array is required");return i=t(i,0),o[i++]=e.position?1:0,o[i++]=e.normal?1:0,o[i++]=e.st?1:0,o[i++]=e.tangent?1:0,o[i++]=e.bitangent?1:0,o[i]=e.color?1:0,o};n.unpack=function(e,o,i){if(!f(e))throw new O("array is required");return o=t(o,0),f(i)||(i=new n),i.position=e[o++]===1,i.normal=e[o++]===1,i.st=e[o++]===1,i.tangent=e[o++]===1,i.bitangent=e[o++]===1,i.color=e[o]===1,i};n.clone=function(e,o){if(f(e))return f(o)||(o=new n),o.position=e.position,o.normal=e.normal,o.st=e.st,o.tangent=e.tangent,o.bitangent=e.bitangent,o.color=e.color,o};var _=n;export{_ as a}; +import{a as t}from"./chunk-IUA6FAOZ.js";import{a as O}from"./chunk-UH2WFNTA.js";import{e as f}from"./chunk-PEYJTJPE.js";function n(e){e=t(e,t.EMPTY_OBJECT),this.position=t(e.position,!1),this.normal=t(e.normal,!1),this.st=t(e.st,!1),this.bitangent=t(e.bitangent,!1),this.tangent=t(e.tangent,!1),this.color=t(e.color,!1)}n.POSITION_ONLY=Object.freeze(new n({position:!0}));n.POSITION_AND_NORMAL=Object.freeze(new n({position:!0,normal:!0}));n.POSITION_NORMAL_AND_ST=Object.freeze(new n({position:!0,normal:!0,st:!0}));n.POSITION_AND_ST=Object.freeze(new n({position:!0,st:!0}));n.POSITION_AND_COLOR=Object.freeze(new n({position:!0,color:!0}));n.ALL=Object.freeze(new n({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));n.DEFAULT=n.POSITION_NORMAL_AND_ST;n.packedLength=6;n.pack=function(e,o,i){if(!f(e))throw new O("value is required");if(!f(o))throw new O("array is required");return i=t(i,0),o[i++]=e.position?1:0,o[i++]=e.normal?1:0,o[i++]=e.st?1:0,o[i++]=e.tangent?1:0,o[i++]=e.bitangent?1:0,o[i]=e.color?1:0,o};n.unpack=function(e,o,i){if(!f(e))throw new O("array is required");return o=t(o,0),f(i)||(i=new n),i.position=e[o++]===1,i.normal=e[o++]===1,i.st=e[o++]===1,i.tangent=e[o++]===1,i.bitangent=e[o++]===1,i.color=e[o]===1,i};n.clone=function(e,o){if(f(e))return f(o)||(o=new n),o.position=e.position,o.normal=e.normal,o.st=e.st,o.tangent=e.tangent,o.bitangent=e.bitangent,o.color=e.color,o};var _=n;export{_ as a}; diff --git a/cesium/Workers/chunk-HSWA4OEL.js b/cesium/Workers/chunk-HSWA4OEL.js new file mode 100644 index 0000000..22bdad9 --- /dev/null +++ b/cesium/Workers/chunk-HSWA4OEL.js @@ -0,0 +1,26 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.119 + * + * Copyright 2011-2022 Cesium Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Columbus View (Pat. Pend.) + * + * Portions licensed separately. + * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. + */ + +import{a as R}from"./chunk-ATPDRNKI.js";import{a as st}from"./chunk-QB3MDM4J.js";import{a as Z,b as H}from"./chunk-O5IJ3OGP.js";import{a as V}from"./chunk-RXTBM4OI.js";import{a as U}from"./chunk-FYOYUPXG.js";import{b as it}from"./chunk-TAMCUKAR.js";import{a as ct}from"./chunk-PDMQLSBL.js";import{a as ot}from"./chunk-P37AI2DW.js";import{a as nt}from"./chunk-T6BE4RZK.js";import{b as J,c as X,d as z}from"./chunk-X5IHHI6X.js";import{f as K}from"./chunk-7Z5IIKOJ.js";import{a as k}from"./chunk-KZNJOCYU.js";import{a as w,b as q,c as M,d as et,e as F}from"./chunk-POASMU2N.js";import{a as I}from"./chunk-R6KGAEF6.js";import{a as tt}from"./chunk-IUA6FAOZ.js";import{e as x}from"./chunk-PEYJTJPE.js";function dt(n,i){this.positions=x(n)?n:[],this.holes=x(i)?i:[]}var rt=dt;function S(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(S.prototype,{length:{get:function(){return this._length}}});S.prototype.enqueue=function(n){this._array.push(n),this._length++};S.prototype.dequeue=function(){if(this._length===0)return;let n=this._array,i=this._offset,u=n[i];return n[i]=void 0,i++,i>10&&i*2>n.length&&(this._array=n.slice(i),i=0),this._offset=i,this._length--,u};S.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};S.prototype.contains=function(n){return this._array.indexOf(n)!==-1};S.prototype.clear=function(){this._array.length=this._offset=this._length=0};S.prototype.sort=function(n){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(n)};var $=S;var b={};b.computeHierarchyPackedLength=function(n,i){let u=0,c=[n];for(;c.length>0;){let r=c.pop();if(!x(r))continue;u+=2;let a=r.positions,t=r.holes;if(x(a)&&a.length>0&&(u+=a.length*i.packedLength),x(t)){let o=t.length;for(let e=0;e<o;++e)c.push(t[e])}}return u};b.packPolygonHierarchy=function(n,i,u,c){let r=[n];for(;r.length>0;){let a=r.pop();if(!x(a))continue;let t=a.positions,o=a.holes;if(i[u++]=x(t)?t.length:0,i[u++]=x(o)?o.length:0,x(t)){let e=t.length;for(let s=0;s<e;++s,u+=c.packedLength)c.pack(t[s],i,u)}if(x(o)){let e=o.length;for(let s=0;s<e;++s)r.push(o[s])}}return u};b.unpackPolygonHierarchy=function(n,i,u){let c=n[i++],r=n[i++],a=new Array(c),t=r>0?new Array(r):void 0;for(let o=0;o<c;++o,i+=u.packedLength)a[o]=u.unpack(n,i);for(let o=0;o<r;++o)t[o]=b.unpackPolygonHierarchy(n,i,u),i=t[o].startingIndex,delete t[o].startingIndex;return{positions:a,holes:t,startingIndex:i}};var O=new M;function ht(n,i,u,c){return M.subtract(i,n,O),M.multiplyByScalar(O,u/c,O),M.add(n,O,O),[O.x,O.y]}var G=new w;function gt(n,i,u,c){return w.subtract(i,n,G),w.multiplyByScalar(G,u/c,G),w.add(n,G,G),[G.x,G.y,G.z]}b.subdivideLineCount=function(n,i,u){let r=w.distance(n,i)/u,a=Math.max(0,Math.ceil(I.log2(r)));return Math.pow(2,a)};var j=new q,Q=new q,pt=new q,mt=new w,Y=new U;b.subdivideRhumbLineCount=function(n,i,u,c){let r=n.cartesianToCartographic(i,j),a=n.cartesianToCartographic(u,Q),o=new U(r,a,n).surfaceDistance/c,e=Math.max(0,Math.ceil(I.log2(o)));return Math.pow(2,e)};b.subdivideTexcoordLine=function(n,i,u,c,r,a){let t=b.subdivideLineCount(u,c,r),o=M.distance(n,i),e=o/t,s=a;s.length=t*2;let l=0;for(let h=0;h<t;h++){let f=ht(n,i,h*e,o);s[l++]=f[0],s[l++]=f[1]}return s};b.subdivideLine=function(n,i,u,c){let r=b.subdivideLineCount(n,i,u),a=w.distance(n,i),t=a/r;x(c)||(c=[]);let o=c;o.length=r*3;let e=0;for(let s=0;s<r;s++){let l=gt(n,i,s*t,a);o[e++]=l[0],o[e++]=l[1],o[e++]=l[2]}return o};b.subdivideTexcoordRhumbLine=function(n,i,u,c,r,a,t){let o=u.cartesianToCartographic(c,j),e=u.cartesianToCartographic(r,Q);Y.setEndPoints(o,e);let s=Y.surfaceDistance/a,l=Math.max(0,Math.ceil(I.log2(s))),h=Math.pow(2,l),f=M.distance(n,i),g=f/h,m=t;m.length=h*2;let p=0;for(let d=0;d<h;d++){let y=ht(n,i,d*g,f);m[p++]=y[0],m[p++]=y[1]}return m};b.subdivideRhumbLine=function(n,i,u,c,r){let a=n.cartesianToCartographic(i,j),t=n.cartesianToCartographic(u,Q),o=new U(a,t,n),e=o.surfaceDistance/c,s=Math.max(0,Math.ceil(I.log2(e))),l=Math.pow(2,s),h=o.surfaceDistance/l;x(r)||(r=[]);let f=r;f.length=l*3;let g=0;for(let m=0;m<l;m++){let p=o.interpolateUsingSurfaceDistance(m*h,pt),d=n.cartographicToCartesian(p,mt);f[g++]=d.x,f[g++]=d.y,f[g++]=d.z}return f};var yt=new w,xt=new w,wt=new w,bt=new w;b.scaleToGeodeticHeightExtruded=function(n,i,u,c,r){c=tt(c,et.default);let a=yt,t=xt,o=wt,e=bt;if(x(n)&&x(n.attributes)&&x(n.attributes.position)){let s=n.attributes.position.values,l=s.length/2;for(let h=0;h<l;h+=3)w.fromArray(s,h,o),c.geodeticSurfaceNormal(o,a),e=c.scaleToGeodeticSurface(o,e),t=w.multiplyByScalar(a,u,t),t=w.add(e,t,t),s[h+l]=t.x,s[h+1+l]=t.y,s[h+2+l]=t.z,r&&(e=w.clone(o,e)),t=w.multiplyByScalar(a,i,t),t=w.add(e,t,t),s[h]=t.x,s[h+1]=t.y,s[h+2]=t.z}return n};b.polygonOutlinesFromHierarchy=function(n,i,u){let c=[],r=new $;r.enqueue(n);let a,t,o;for(;r.length!==0;){let e=r.dequeue(),s=e.positions;if(i)for(o=s.length,a=0;a<o;a++)u.scaleToGeodeticSurface(s[a],s[a]);if(s=V(s,w.equalsEpsilon,!0),s.length<3)continue;let l=e.holes?e.holes.length:0;for(a=0;a<l;a++){let h=e.holes[a],f=h.positions;if(i)for(o=f.length,t=0;t<o;++t)u.scaleToGeodeticSurface(f[t],f[t]);if(f=V(f,w.equalsEpsilon,!0),f.length<3)continue;c.push(f);let g=0;for(x(h.holes)&&(g=h.holes.length),t=0;t<g;t++)r.enqueue(h.holes[t])}c.push(s)}return c};var Lt=new q;function Tt(n,i,u){let c=u.cartesianToCartographic(n,j),r=u.cartesianToCartographic(i,Q);if(Math.sign(c.latitude)===Math.sign(r.latitude))return;Y.setEndPoints(c,r);let a=Y.findIntersectionWithLatitude(0,Lt);if(!x(a))return;let t=Math.min(c.longitude,r.longitude),o=Math.max(c.longitude,r.longitude);if(Math.abs(o-t)>I.PI){let e=t;t=o,o=e}if(!(a.longitude<t||a.longitude>o))return u.cartographicToCartesian(a)}function Et(n,i,u,c){if(c===R.RHUMB)return Tt(n,i,u);let r=it.lineSegmentPlane(n,i,ct.ORIGIN_XY_PLANE);if(x(r))return u.scaleToGeodeticSurface(r,r)}var vt=new q;function Ct(n,i,u){let c=[],r,a,t,o,e,s=0;for(;s<n.length;){r=n[s],a=n[(s+1)%n.length],t=I.sign(r.z),o=I.sign(a.z);let l=h=>i.cartesianToCartographic(h,vt).longitude;if(t===0)c.push({position:s,type:t,visited:!1,next:o,theta:l(r)});else if(o!==0){if(e=Et(r,a,i,u),++s,!x(e))continue;n.splice(s,0,e),c.push({position:s,type:t,visited:!1,next:o,theta:l(e)})}++s}return c}function lt(n,i,u,c,r,a,t){let o=[],e=a,s=h=>f=>f.position===h,l=[];do{let h=u[e];o.push(h);let f=c.findIndex(s(e)),g=c[f];if(!x(g)){++e;continue}let{visited:m,type:p,next:d}=g;if(g.visited=!0,p===0){if(d===0){let C=c[f-(t?1:-1)];if(C?.position===e+1)C.visited=!0;else{++e;continue}}if(!m&&t&&d>0||a===e&&!t&&d<0){++e;continue}}if(!(t?p>=0:p<=0)){++e;continue}m||l.push(e);let L=f+(t?1:-1),_=c[L];if(!x(_)){++e;continue}e=_.position}while(e<u.length&&e>=0&&e!==a&&o.length<u.length);n.splice(i,r,o);for(let h of l)i=lt(n,++i,u,c,0,h,!t);return i}b.splitPolygonsOnEquator=function(n,i,u,c){x(c)||(c=[]),c.splice(0,0,...n),c.length=n.length;let r=0;for(;r<c.length;){let a=c[r],t=a.slice();if(a.length<3){c[r]=t,++r;continue}let o=Ct(t,i,u);if(t.length===a.length||o.length<=1){c[r]=t,++r;continue}o.sort((s,l)=>s.theta-l.theta);let e=t[0].z>=0;r=lt(c,r,t,o,1,0,e)}return c};b.polygonsFromHierarchy=function(n,i,u,c,r,a){let t=[],o=[],e=new $;e.enqueue(n);let s=x(a);for(;e.length!==0;){let l=e.dequeue(),h=l.positions,f=l.holes,g,m;if(c)for(m=h.length,g=0;g<m;g++)r.scaleToGeodeticSurface(h[g],h[g]);if(i||(h=V(h,w.equalsEpsilon,!0)),h.length<3)continue;let p=u(h);if(!x(p))continue;let d=[],y=H.computeWindingOrder2D(p);if(y===Z.CLOCKWISE&&(p.reverse(),h=h.slice().reverse()),s){s=!1;let P=[h];if(P=a(P,P),P.length>1){for(let v of P)e.enqueue(new rt(v,f));continue}}let L=h.slice(),_=x(f)?f.length:0,C=[],T;for(g=0;g<_;g++){let P=f[g],v=P.positions;if(c)for(m=v.length,T=0;T<m;++T)r.scaleToGeodeticSurface(v[T],v[T]);if(i||(v=V(v,w.equalsEpsilon,!0)),v.length<3)continue;let E=u(v);if(!x(E))continue;y=H.computeWindingOrder2D(E),y===Z.CLOCKWISE&&(E.reverse(),v=v.slice().reverse()),C.push(v),d.push(L.length),L=L.concat(v),p=p.concat(E);let D=0;for(x(P.holes)&&(D=P.holes.length),T=0;T<D;T++)e.enqueue(P.holes[T])}t.push({outerRing:h,holes:C}),o.push({positions:L,positions2D:p,holes:d})}return{hierarchy:t,polygons:o}};var Pt=new M,Dt=new w,It=new K,_t=new F;b.computeBoundingRectangle=function(n,i,u,c,r){let a=K.fromAxisAngle(n,c,It),t=F.fromQuaternion(a,_t),o=Number.POSITIVE_INFINITY,e=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,h=u.length;for(let f=0;f<h;++f){let g=w.clone(u[f],Dt);F.multiplyByVector(t,g,g);let m=i(g,Pt);x(m)&&(o=Math.min(o,m.x),e=Math.max(e,m.x),s=Math.min(s,m.y),l=Math.max(l,m.y))}return r.x=o,r.y=s,r.width=e-o,r.height=l-s,r};b.createGeometryFromPositions=function(n,i,u,c,r,a,t){let o=H.triangulate(i.positions2D,i.holes);o.length<3&&(o=[0,1,2]);let e=i.positions,s=x(u),l=s?u.positions:void 0;if(r){let h=e.length,f=new Array(h*3),g=0;for(let d=0;d<h;d++){let y=e[d];f[g++]=y.x,f[g++]=y.y,f[g++]=y.z}let m={attributes:{position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:f})},indices:o,primitiveType:J.TRIANGLES};s&&(m.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:M.packArray(l)}));let p=new X(m);return a.normal?st.computeNormal(p):p}if(t===R.GEODESIC)return H.computeSubdivision(n,e,o,l,c);if(t===R.RHUMB)return H.computeRhumbLineSubdivision(n,e,o,l,c)};var ut=[],at=[],At=new w,Mt=new w;b.computeWallGeometry=function(n,i,u,c,r,a){let t,o,e,s,l,h,f,g,m,p=n.length,d=0,y=0,L=x(i),_=L?i.positions:void 0;if(r)for(o=p*3*2,t=new Array(o*2),L&&(m=p*2*2,g=new Array(m*2)),e=0;e<p;e++)s=n[e],l=n[(e+1)%p],t[d]=t[d+o]=s.x,++d,t[d]=t[d+o]=s.y,++d,t[d]=t[d+o]=s.z,++d,t[d]=t[d+o]=l.x,++d,t[d]=t[d+o]=l.y,++d,t[d]=t[d+o]=l.z,++d,L&&(h=_[e],f=_[(e+1)%p],g[y]=g[y+m]=h.x,++y,g[y]=g[y+m]=h.y,++y,g[y]=g[y+m]=f.x,++y,g[y]=g[y+m]=f.y,++y);else{let E=I.chordLength(c,u.maximumRadius),D=0;if(a===R.GEODESIC)for(e=0;e<p;e++)D+=b.subdivideLineCount(n[e],n[(e+1)%p],E);else if(a===R.RHUMB)for(e=0;e<p;e++)D+=b.subdivideRhumbLineCount(u,n[e],n[(e+1)%p],E);for(o=(D+p)*3,t=new Array(o*2),L&&(m=(D+p)*2,g=new Array(m*2)),e=0;e<p;e++){s=n[e],l=n[(e+1)%p];let A,N;L&&(h=_[e],f=_[(e+1)%p]),a===R.GEODESIC?(A=b.subdivideLine(s,l,E,at),L&&(N=b.subdivideTexcoordLine(h,f,s,l,E,ut))):a===R.RHUMB&&(A=b.subdivideRhumbLine(u,s,l,E,at),L&&(N=b.subdivideTexcoordRhumbLine(h,f,u,s,l,E,ut)));let ft=A.length;for(let B=0;B<ft;++B,++d)t[d]=A[B],t[d+o]=A[B];if(t[d]=l.x,t[d+o]=l.x,++d,t[d]=l.y,t[d+o]=l.y,++d,t[d]=l.z,t[d+o]=l.z,++d,L){let B=N.length;for(let W=0;W<B;++W,++y)g[y]=N[W],g[y+m]=N[W];g[y]=f.x,g[y+m]=f.x,++y,g[y]=f.y,g[y+m]=f.y,++y}}}p=t.length;let C=ot.createTypedArray(p/3,p-n.length*6),T=0;for(p/=6,e=0;e<p;e++){let E=e,D=E+1,A=E+p,N=A+1;s=w.fromArray(t,E*3,At),l=w.fromArray(t,D*3,Mt),!w.equalsEpsilon(s,l,I.EPSILON10,I.EPSILON10)&&(C[T++]=E,C[T++]=A,C[T++]=D,C[T++]=D,C[T++]=A,C[T++]=N)}let P={attributes:new nt({position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:t})}),indices:C,primitiveType:J.TRIANGLES};return L&&(P.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:g})),new X(P)};var se=b;export{se as a}; diff --git a/cesium/Workers/chunk-VVVZBARZ.js b/cesium/Workers/chunk-IAC5XVZV.js similarity index 89% rename from cesium/Workers/chunk-VVVZBARZ.js rename to cesium/Workers/chunk-IAC5XVZV.js index e86234e..0328eba 100644 --- a/cesium/Workers/chunk-VVVZBARZ.js +++ b/cesium/Workers/chunk-IAC5XVZV.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as Q}from"./chunk-2TLJ26OO.js";import{a as z}from"./chunk-WLRVP2UA.js";import{a as _}from"./chunk-DUVNED7U.js";import{a as K}from"./chunk-RQXB4B4V.js";import{a as H}from"./chunk-MPVEZNKB.js";import{b as J,c as W,d as P}from"./chunk-FATK2EQ2.js";import{d as j}from"./chunk-3FEM743H.js";import{a as L}from"./chunk-77ESX6BV.js";import{a as b,c as k}from"./chunk-LJCGAQ64.js";import{a as Z}from"./chunk-JFG572S7.js";import{a as x}from"./chunk-42NIXFVW.js";import{a as F}from"./chunk-5YVCOCPP.js";import{e as g}from"./chunk-U73D6PDD.js";var M=new k,ot=new b,nt=new b,it=new b,st=new b;function O(t){t=x(t,x.EMPTY_OBJECT);let n=t.length,e=t.topRadius,h=t.bottomRadius,o=x(t.vertexFormat,_.DEFAULT),r=x(t.slices,128);if(!g(n))throw new F("options.length must be defined.");if(!g(e))throw new F("options.topRadius must be defined.");if(!g(h))throw new F("options.bottomRadius must be defined.");if(r<3)throw new F("options.slices must be greater than or equal to 3.");if(g(t.offsetAttribute)&&t.offsetAttribute===z.TOP)throw new F("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=n,this._topRadius=e,this._bottomRadius=h,this._vertexFormat=_.clone(o),this._slices=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}O.packedLength=_.packedLength+5;O.pack=function(t,n,e){if(!g(t))throw new F("value is required");if(!g(n))throw new F("array is required");return e=x(e,0),_.pack(t._vertexFormat,n,e),e+=_.packedLength,n[e++]=t._length,n[e++]=t._topRadius,n[e++]=t._bottomRadius,n[e++]=t._slices,n[e]=x(t._offsetAttribute,-1),n};var X=new _,C={vertexFormat:X,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};O.unpack=function(t,n,e){if(!g(t))throw new F("array is required");n=x(n,0);let h=_.unpack(t,n,X);n+=_.packedLength;let o=t[n++],r=t[n++],p=t[n++],D=t[n++],w=t[n];return g(e)?(e._vertexFormat=_.clone(h,e._vertexFormat),e._length=o,e._topRadius=r,e._bottomRadius=p,e._slices=D,e._offsetAttribute=w===-1?void 0:w,e):(C.length=o,C.topRadius=r,C.bottomRadius=p,C.slices=D,C.offsetAttribute=w===-1?void 0:w,new O(C))};O.createGeometry=function(t){let n=t._length,e=t._topRadius,h=t._bottomRadius,o=t._vertexFormat,r=t._slices;if(n<=0||e<0||h<0||e===0&&h===0)return;let p=r+r,D=r+p,w=p+p,E=Q.computePositions(n,e,h,r,!0),N=o.st?new Float32Array(w*2):void 0,c=o.normal?new Float32Array(w*3):void 0,m=o.tangent?new Float32Array(w*3):void 0,u=o.bitangent?new Float32Array(w*3):void 0,i,U=o.normal||o.tangent||o.bitangent;if(U){let T=o.tangent||o.bitangent,f=0,d=0,l=0,q=Math.atan2(h-e,n),A=ot;A.z=Math.sin(q);let B=Math.cos(q),R=it,y=nt;for(i=0;i<r;i++){let Y=i/r*Z.TWO_PI,tt=B*Math.cos(Y),et=B*Math.sin(Y);U&&(A.x=tt,A.y=et,T&&(R=b.normalize(b.cross(b.UNIT_Z,A,R),R)),o.normal&&(c[f++]=A.x,c[f++]=A.y,c[f++]=A.z,c[f++]=A.x,c[f++]=A.y,c[f++]=A.z),o.tangent&&(m[d++]=R.x,m[d++]=R.y,m[d++]=R.z,m[d++]=R.x,m[d++]=R.y,m[d++]=R.z),o.bitangent&&(y=b.normalize(b.cross(A,R,y),y),u[l++]=y.x,u[l++]=y.y,u[l++]=y.z,u[l++]=y.x,u[l++]=y.y,u[l++]=y.z))}for(i=0;i<r;i++)o.normal&&(c[f++]=0,c[f++]=0,c[f++]=-1),o.tangent&&(m[d++]=1,m[d++]=0,m[d++]=0),o.bitangent&&(u[l++]=0,u[l++]=-1,u[l++]=0);for(i=0;i<r;i++)o.normal&&(c[f++]=0,c[f++]=0,c[f++]=1),o.tangent&&(m[d++]=1,m[d++]=0,m[d++]=0),o.bitangent&&(u[l++]=0,u[l++]=1,u[l++]=0)}let $=12*r-12,s=K.createTypedArray(w,$),a=0,v=0;for(i=0;i<r-1;i++)s[a++]=v,s[a++]=v+2,s[a++]=v+3,s[a++]=v,s[a++]=v+3,s[a++]=v+1,v+=2;for(s[a++]=p-2,s[a++]=0,s[a++]=1,s[a++]=p-2,s[a++]=1,s[a++]=p-1,i=1;i<r-1;i++)s[a++]=p+i+1,s[a++]=p+i,s[a++]=p;for(i=1;i<r-1;i++)s[a++]=D,s[a++]=D+i,s[a++]=D+i+1;let V=0;if(o.st){let T=Math.max(e,h);for(i=0;i<w;i++){let f=b.fromArray(E,i*3,st);N[V++]=(f.x+T)/(2*T),N[V++]=(f.y+T)/(2*T)}}let S=new H;o.position&&(S.position=new P({componentDatatype:L.DOUBLE,componentsPerAttribute:3,values:E})),o.normal&&(S.normal=new P({componentDatatype:L.FLOAT,componentsPerAttribute:3,values:c})),o.tangent&&(S.tangent=new P({componentDatatype:L.FLOAT,componentsPerAttribute:3,values:m})),o.bitangent&&(S.bitangent=new P({componentDatatype:L.FLOAT,componentsPerAttribute:3,values:u})),o.st&&(S.st=new P({componentDatatype:L.FLOAT,componentsPerAttribute:2,values:N})),M.x=n*.5,M.y=Math.max(h,e);let I=new j(b.ZERO,k.magnitude(M));if(g(t._offsetAttribute)){n=E.length;let T=t._offsetAttribute===z.NONE?0:1,f=new Uint8Array(n/3).fill(T);S.applyOffset=new P({componentDatatype:L.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}return new W({attributes:S,indices:s,primitiveType:J.TRIANGLES,boundingSphere:I,offsetAttribute:t._offsetAttribute})};var G;O.getUnitCylinder=function(){return g(G)||(G=O.createGeometry(new O({topRadius:1,bottomRadius:1,length:1,vertexFormat:_.POSITION_ONLY}))),G};var yt=O;export{yt as a}; +import{a as Q}from"./chunk-GFN7NNSJ.js";import{a as z}from"./chunk-ILGBPNP6.js";import{a as _}from"./chunk-HEEMUCG6.js";import{a as K}from"./chunk-P37AI2DW.js";import{a as H}from"./chunk-T6BE4RZK.js";import{b as J,c as W,d as P}from"./chunk-X5IHHI6X.js";import{d as j}from"./chunk-TMSETF7M.js";import{a as L}from"./chunk-KZNJOCYU.js";import{a as b,c as k}from"./chunk-POASMU2N.js";import{a as Z}from"./chunk-R6KGAEF6.js";import{a as x}from"./chunk-IUA6FAOZ.js";import{a as F}from"./chunk-UH2WFNTA.js";import{e as g}from"./chunk-PEYJTJPE.js";var M=new k,ot=new b,nt=new b,it=new b,st=new b;function O(t){t=x(t,x.EMPTY_OBJECT);let n=t.length,e=t.topRadius,h=t.bottomRadius,o=x(t.vertexFormat,_.DEFAULT),r=x(t.slices,128);if(!g(n))throw new F("options.length must be defined.");if(!g(e))throw new F("options.topRadius must be defined.");if(!g(h))throw new F("options.bottomRadius must be defined.");if(r<3)throw new F("options.slices must be greater than or equal to 3.");if(g(t.offsetAttribute)&&t.offsetAttribute===z.TOP)throw new F("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=n,this._topRadius=e,this._bottomRadius=h,this._vertexFormat=_.clone(o),this._slices=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}O.packedLength=_.packedLength+5;O.pack=function(t,n,e){if(!g(t))throw new F("value is required");if(!g(n))throw new F("array is required");return e=x(e,0),_.pack(t._vertexFormat,n,e),e+=_.packedLength,n[e++]=t._length,n[e++]=t._topRadius,n[e++]=t._bottomRadius,n[e++]=t._slices,n[e]=x(t._offsetAttribute,-1),n};var X=new _,C={vertexFormat:X,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};O.unpack=function(t,n,e){if(!g(t))throw new F("array is required");n=x(n,0);let h=_.unpack(t,n,X);n+=_.packedLength;let o=t[n++],r=t[n++],p=t[n++],D=t[n++],w=t[n];return g(e)?(e._vertexFormat=_.clone(h,e._vertexFormat),e._length=o,e._topRadius=r,e._bottomRadius=p,e._slices=D,e._offsetAttribute=w===-1?void 0:w,e):(C.length=o,C.topRadius=r,C.bottomRadius=p,C.slices=D,C.offsetAttribute=w===-1?void 0:w,new O(C))};O.createGeometry=function(t){let n=t._length,e=t._topRadius,h=t._bottomRadius,o=t._vertexFormat,r=t._slices;if(n<=0||e<0||h<0||e===0&&h===0)return;let p=r+r,D=r+p,w=p+p,E=Q.computePositions(n,e,h,r,!0),N=o.st?new Float32Array(w*2):void 0,c=o.normal?new Float32Array(w*3):void 0,m=o.tangent?new Float32Array(w*3):void 0,u=o.bitangent?new Float32Array(w*3):void 0,i,U=o.normal||o.tangent||o.bitangent;if(U){let T=o.tangent||o.bitangent,f=0,d=0,l=0,q=Math.atan2(h-e,n),A=ot;A.z=Math.sin(q);let B=Math.cos(q),R=it,y=nt;for(i=0;i<r;i++){let Y=i/r*Z.TWO_PI,tt=B*Math.cos(Y),et=B*Math.sin(Y);U&&(A.x=tt,A.y=et,T&&(R=b.normalize(b.cross(b.UNIT_Z,A,R),R)),o.normal&&(c[f++]=A.x,c[f++]=A.y,c[f++]=A.z,c[f++]=A.x,c[f++]=A.y,c[f++]=A.z),o.tangent&&(m[d++]=R.x,m[d++]=R.y,m[d++]=R.z,m[d++]=R.x,m[d++]=R.y,m[d++]=R.z),o.bitangent&&(y=b.normalize(b.cross(A,R,y),y),u[l++]=y.x,u[l++]=y.y,u[l++]=y.z,u[l++]=y.x,u[l++]=y.y,u[l++]=y.z))}for(i=0;i<r;i++)o.normal&&(c[f++]=0,c[f++]=0,c[f++]=-1),o.tangent&&(m[d++]=1,m[d++]=0,m[d++]=0),o.bitangent&&(u[l++]=0,u[l++]=-1,u[l++]=0);for(i=0;i<r;i++)o.normal&&(c[f++]=0,c[f++]=0,c[f++]=1),o.tangent&&(m[d++]=1,m[d++]=0,m[d++]=0),o.bitangent&&(u[l++]=0,u[l++]=1,u[l++]=0)}let $=12*r-12,s=K.createTypedArray(w,$),a=0,v=0;for(i=0;i<r-1;i++)s[a++]=v,s[a++]=v+2,s[a++]=v+3,s[a++]=v,s[a++]=v+3,s[a++]=v+1,v+=2;for(s[a++]=p-2,s[a++]=0,s[a++]=1,s[a++]=p-2,s[a++]=1,s[a++]=p-1,i=1;i<r-1;i++)s[a++]=p+i+1,s[a++]=p+i,s[a++]=p;for(i=1;i<r-1;i++)s[a++]=D,s[a++]=D+i,s[a++]=D+i+1;let V=0;if(o.st){let T=Math.max(e,h);for(i=0;i<w;i++){let f=b.fromArray(E,i*3,st);N[V++]=(f.x+T)/(2*T),N[V++]=(f.y+T)/(2*T)}}let S=new H;o.position&&(S.position=new P({componentDatatype:L.DOUBLE,componentsPerAttribute:3,values:E})),o.normal&&(S.normal=new P({componentDatatype:L.FLOAT,componentsPerAttribute:3,values:c})),o.tangent&&(S.tangent=new P({componentDatatype:L.FLOAT,componentsPerAttribute:3,values:m})),o.bitangent&&(S.bitangent=new P({componentDatatype:L.FLOAT,componentsPerAttribute:3,values:u})),o.st&&(S.st=new P({componentDatatype:L.FLOAT,componentsPerAttribute:2,values:N})),M.x=n*.5,M.y=Math.max(h,e);let I=new j(b.ZERO,k.magnitude(M));if(g(t._offsetAttribute)){n=E.length;let T=t._offsetAttribute===z.NONE?0:1,f=new Uint8Array(n/3).fill(T);S.applyOffset=new P({componentDatatype:L.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}return new W({attributes:S,indices:s,primitiveType:J.TRIANGLES,boundingSphere:I,offsetAttribute:t._offsetAttribute})};var G;O.getUnitCylinder=function(){return g(G)||(G=O.createGeometry(new O({topRadius:1,bottomRadius:1,length:1,vertexFormat:_.POSITION_ONLY}))),G};var yt=O;export{yt as a}; diff --git a/cesium/Workers/chunk-IRDBGNMC.js b/cesium/Workers/chunk-II4VNKYR.js similarity index 93% rename from cesium/Workers/chunk-IRDBGNMC.js rename to cesium/Workers/chunk-II4VNKYR.js index c7192ef..28d70b0 100644 --- a/cesium/Workers/chunk-IRDBGNMC.js +++ b/cesium/Workers/chunk-II4VNKYR.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,5 +23,5 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{e}from"./chunk-U73D6PDD.js";function t(r){this.name="RuntimeError",this.message=r;let o;try{throw new Error}catch(s){o=s.stack}this.stack=o}e(Object.create)&&(t.prototype=Object.create(Error.prototype),t.prototype.constructor=t);t.prototype.toString=function(){let r=`${this.name}: ${this.message}`;return e(this.stack)&&(r+=` +import{e}from"./chunk-PEYJTJPE.js";function t(r){this.name="RuntimeError",this.message=r;let o;try{throw new Error}catch(s){o=s.stack}this.stack=o}e(Object.create)&&(t.prototype=Object.create(Error.prototype),t.prototype.constructor=t);t.prototype.toString=function(){let r=`${this.name}: ${this.message}`;return e(this.stack)&&(r+=` ${this.stack.toString()}`),r};var c=t;export{c as a}; diff --git a/cesium/Workers/chunk-WLRVP2UA.js b/cesium/Workers/chunk-ILGBPNP6.js similarity index 97% rename from cesium/Workers/chunk-WLRVP2UA.js rename to cesium/Workers/chunk-ILGBPNP6.js index 5b29f62..4697daa 100644 --- a/cesium/Workers/chunk-WLRVP2UA.js +++ b/cesium/Workers/chunk-ILGBPNP6.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * diff --git a/cesium/Workers/chunk-4C7K4BFS.js b/cesium/Workers/chunk-IRH46BDL.js similarity index 89% rename from cesium/Workers/chunk-4C7K4BFS.js rename to cesium/Workers/chunk-IRH46BDL.js index 6aed35a..b86c028 100644 --- a/cesium/Workers/chunk-4C7K4BFS.js +++ b/cesium/Workers/chunk-IRH46BDL.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as C}from"./chunk-WIE5YNSS.js";import{a as P}from"./chunk-CIEXTRKV.js";import{a as O,b as L}from"./chunk-LJCGAQ64.js";import{a as y}from"./chunk-JFG572S7.js";import{e as S}from"./chunk-U73D6PDD.js";var T={};function b(a,e){return y.equalsEpsilon(a.latitude,e.latitude,y.EPSILON10)&&y.equalsEpsilon(a.longitude,e.longitude,y.EPSILON10)}var q=new L,v=new L;function w(a,e,i,h){e=P(e,O.equalsEpsilon);let p=e.length;if(p<2)return;let E=S(h),u=S(i),l=new Array(p),g=new Array(p),r=new Array(p),d=e[0];l[0]=d;let f=a.cartesianToCartographic(d,q);u&&(f.height=i[0]),g[0]=f.height,E?r[0]=h[0]:r[0]=0;let o=g[0],m=r[0],t=o===m,n=1;for(let c=1;c<p;++c){let A=e[c],s=a.cartesianToCartographic(A,v);u&&(s.height=i[c]),t=t&&s.height===0,b(f,s)?f.height<s.height&&(g[n-1]=s.height):(l[n]=A,g[n]=s.height,E?r[n]=h[c]:r[n]=0,t=t&&g[n]===r[n],L.clone(s,f),++n)}if(!(t||n<2))return l.length=n,g.length=n,r.length=n,{positions:l,topHeights:g,bottomHeights:r}}var D=new Array(2),F=new Array(2),B={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};T.computePositions=function(a,e,i,h,p,E){let u=w(a,e,i,h);if(!S(u))return;e=u.positions,i=u.topHeights,h=u.bottomHeights;let l=e.length,g=l-2,r,d,f=y.chordLength(p,a.maximumRadius),o=B;if(o.minDistance=f,o.ellipsoid=a,E){let m=0,t;for(t=0;t<l-1;t++)m+=C.numberOfPoints(e[t],e[t+1],f)+1;r=new Float64Array(m*3),d=new Float64Array(m*3);let n=D,c=F;o.positions=n,o.height=c;let A=0;for(t=0;t<l-1;t++){n[0]=e[t],n[1]=e[t+1],c[0]=i[t],c[1]=i[t+1];let s=C.generateArc(o);r.set(s,A),c[0]=h[t],c[1]=h[t+1],d.set(C.generateArc(o),A),A+=s.length}}else o.positions=e,o.height=i,r=new Float64Array(C.generateArc(o)),o.height=h,d=new Float64Array(C.generateArc(o));return{bottomPositions:d,topPositions:r,numCorners:g}};var j=T;export{j as a}; +import{a as C}from"./chunk-AMQUWUD4.js";import{a as P}from"./chunk-RXTBM4OI.js";import{a as O,b as L}from"./chunk-POASMU2N.js";import{a as y}from"./chunk-R6KGAEF6.js";import{e as S}from"./chunk-PEYJTJPE.js";var T={};function b(a,e){return y.equalsEpsilon(a.latitude,e.latitude,y.EPSILON10)&&y.equalsEpsilon(a.longitude,e.longitude,y.EPSILON10)}var q=new L,v=new L;function w(a,e,i,h){e=P(e,O.equalsEpsilon);let p=e.length;if(p<2)return;let E=S(h),u=S(i),l=new Array(p),g=new Array(p),r=new Array(p),d=e[0];l[0]=d;let f=a.cartesianToCartographic(d,q);u&&(f.height=i[0]),g[0]=f.height,E?r[0]=h[0]:r[0]=0;let o=g[0],m=r[0],t=o===m,n=1;for(let c=1;c<p;++c){let A=e[c],s=a.cartesianToCartographic(A,v);u&&(s.height=i[c]),t=t&&s.height===0,b(f,s)?f.height<s.height&&(g[n-1]=s.height):(l[n]=A,g[n]=s.height,E?r[n]=h[c]:r[n]=0,t=t&&g[n]===r[n],L.clone(s,f),++n)}if(!(t||n<2))return l.length=n,g.length=n,r.length=n,{positions:l,topHeights:g,bottomHeights:r}}var D=new Array(2),F=new Array(2),B={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};T.computePositions=function(a,e,i,h,p,E){let u=w(a,e,i,h);if(!S(u))return;e=u.positions,i=u.topHeights,h=u.bottomHeights;let l=e.length,g=l-2,r,d,f=y.chordLength(p,a.maximumRadius),o=B;if(o.minDistance=f,o.ellipsoid=a,E){let m=0,t;for(t=0;t<l-1;t++)m+=C.numberOfPoints(e[t],e[t+1],f)+1;r=new Float64Array(m*3),d=new Float64Array(m*3);let n=D,c=F;o.positions=n,o.height=c;let A=0;for(t=0;t<l-1;t++){n[0]=e[t],n[1]=e[t+1],c[0]=i[t],c[1]=i[t+1];let s=C.generateArc(o);r.set(s,A),c[0]=h[t],c[1]=h[t+1],d.set(C.generateArc(o),A),A+=s.length}}else o.positions=e,o.height=i,r=new Float64Array(C.generateArc(o)),o.height=h,d=new Float64Array(C.generateArc(o));return{bottomPositions:d,topPositions:r,numCorners:g}};var j=T;export{j as a}; diff --git a/cesium/Workers/chunk-42NIXFVW.js b/cesium/Workers/chunk-IUA6FAOZ.js similarity index 97% rename from cesium/Workers/chunk-42NIXFVW.js rename to cesium/Workers/chunk-IUA6FAOZ.js index 5f3d175..acfa5b1 100644 --- a/cesium/Workers/chunk-42NIXFVW.js +++ b/cesium/Workers/chunk-IUA6FAOZ.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * diff --git a/cesium/Workers/chunk-JE5KQ6H6.js b/cesium/Workers/chunk-JE5KQ6H6.js deleted file mode 100644 index af6b9c8..0000000 --- a/cesium/Workers/chunk-JE5KQ6H6.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 - * - * Copyright 2011-2022 Cesium Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Columbus View (Pat. Pend.) - * - * Portions licensed separately. - * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. - */ - -import{a as L}from"./chunk-Y5ISG54S.js";import{a as j}from"./chunk-WLRVP2UA.js";import{a as D}from"./chunk-RQXB4B4V.js";import{a as V}from"./chunk-MPVEZNKB.js";import{b as T,c as B,d as x}from"./chunk-FATK2EQ2.js";import{d as O}from"./chunk-3FEM743H.js";import{a as S}from"./chunk-77ESX6BV.js";import{a as c,d as l}from"./chunk-LJCGAQ64.js";import{a as E}from"./chunk-JFG572S7.js";import{a as m}from"./chunk-42NIXFVW.js";import{a as _}from"./chunk-5YVCOCPP.js";import{e as d}from"./chunk-U73D6PDD.js";var q=new c,M=new c;function U(e){let t=e.center;M=c.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,M),e.height,M),M=c.add(t,M,M);let i=new O(M,e.semiMajorAxis),f=L.computeEllipsePositions(e,!1,!0).outerPositions,o=new V({position:new x({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:L.raisePositionsToHeight(f,e,!1)})}),r=f.length/3,u=D.createTypedArray(r,r*2),h=0;for(let n=0;n<r;++n)u[h++]=n,u[h++]=(n+1)%r;return{boundingSphere:i,attributes:o,indices:u}}var N=new O,P=new O;function R(e){let t=e.center,i=e.ellipsoid,f=e.semiMajorAxis,o=c.multiplyByScalar(i.geodeticSurfaceNormal(t,q),e.height,q);N.center=c.add(t,o,N.center),N.radius=f,o=c.multiplyByScalar(i.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),P.center=c.add(t,o,P.center),P.radius=f;let r=L.computeEllipsePositions(e,!1,!0).outerPositions,u=new V({position:new x({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:L.raisePositionsToHeight(r,e,!0)})});r=u.position.values;let h=O.union(N,P),n=r.length/3;if(d(e.offsetAttribute)){let g=new Uint8Array(n);if(e.offsetAttribute===j.TOP)g=g.fill(1,0,n/2);else{let H=e.offsetAttribute===j.NONE?0:1;g=g.fill(H)}u.applyOffset=new x({componentDatatype:S.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}let p=m(e.numberOfVerticalLines,16);p=E.clamp(p,0,n/2);let a=D.createTypedArray(n,n*2+p*2);n/=2;let A=0,s;for(s=0;s<n;++s)a[A++]=s,a[A++]=(s+1)%n,a[A++]=s+n,a[A++]=(s+1)%n+n;let k;if(p>0){let g=Math.min(p,n);k=Math.round(n/g);let H=Math.min(k*p,n);for(s=0;s<H;s+=k)a[A++]=s,a[A++]=s+n}return{boundingSphere:h,attributes:u,indices:a}}function w(e){e=m(e,m.EMPTY_OBJECT);let t=e.center,i=m(e.ellipsoid,l.WGS84),f=e.semiMajorAxis,o=e.semiMinorAxis,r=m(e.granularity,E.RADIANS_PER_DEGREE);if(!d(t))throw new _("center is required.");if(!d(f))throw new _("semiMajorAxis is required.");if(!d(o))throw new _("semiMinorAxis is required.");if(f<o)throw new _("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new _("granularity must be greater than zero.");let u=m(e.height,0),h=m(e.extrudedHeight,u);this._center=c.clone(t),this._semiMajorAxis=f,this._semiMinorAxis=o,this._ellipsoid=l.clone(i),this._rotation=m(e.rotation,0),this._height=Math.max(h,u),this._granularity=r,this._extrudedHeight=Math.min(h,u),this._numberOfVerticalLines=Math.max(m(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}w.packedLength=c.packedLength+l.packedLength+8;w.pack=function(e,t,i){if(!d(e))throw new _("value is required");if(!d(t))throw new _("array is required");return i=m(i,0),c.pack(e._center,t,i),i+=c.packedLength,l.pack(e._ellipsoid,t,i),i+=l.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i]=m(e._offsetAttribute,-1),t};var y=new c,C=new l,b={center:y,ellipsoid:C,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};w.unpack=function(e,t,i){if(!d(e))throw new _("array is required");t=m(t,0);let f=c.unpack(e,t,y);t+=c.packedLength;let o=l.unpack(e,t,C);t+=l.packedLength;let r=e[t++],u=e[t++],h=e[t++],n=e[t++],p=e[t++],a=e[t++],A=e[t++],s=e[t];return d(i)?(i._center=c.clone(f,i._center),i._ellipsoid=l.clone(o,i._ellipsoid),i._semiMajorAxis=r,i._semiMinorAxis=u,i._rotation=h,i._height=n,i._granularity=p,i._extrudedHeight=a,i._numberOfVerticalLines=A,i._offsetAttribute=s===-1?void 0:s,i):(b.height=n,b.extrudedHeight=a,b.granularity=p,b.rotation=h,b.semiMajorAxis=r,b.semiMinorAxis=u,b.numberOfVerticalLines=A,b.offsetAttribute=s===-1?void 0:s,new w(b))};w.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,i=e._extrudedHeight,f=!E.equalsEpsilon(t,i,0,E.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},r;if(f)o.extrudedHeight=i,o.offsetAttribute=e._offsetAttribute,r=R(o);else if(r=U(o),d(e._offsetAttribute)){let u=r.attributes.position.values.length,h=e._offsetAttribute===j.NONE?0:1,n=new Uint8Array(u/3).fill(h);r.attributes.applyOffset=new x({componentDatatype:S.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}return new B({attributes:r.attributes,indices:r.indices,primitiveType:T.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var ie=w;export{ie as a}; diff --git a/cesium/Workers/chunk-JFTXHZ2O.js b/cesium/Workers/chunk-JFTXHZ2O.js deleted file mode 100644 index d8379ee..0000000 --- a/cesium/Workers/chunk-JFTXHZ2O.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 - * - * Copyright 2011-2022 Cesium Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Columbus View (Pat. Pend.) - * - * Portions licensed separately. - * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. - */ - -import{a as g,b as d}from"./chunk-3FEM743H.js";import{h as R}from"./chunk-CMXCDAKR.js";import{b as p,c as O}from"./chunk-LJCGAQ64.js";import{a as w}from"./chunk-42NIXFVW.js";import{b as m}from"./chunk-5YVCOCPP.js";import{e as f}from"./chunk-U73D6PDD.js";function o(i,h,n,t){this.x=w(i,0),this.y=w(h,0),this.width=w(n,0),this.height=w(t,0)}o.packedLength=4;o.pack=function(i,h,n){return m.typeOf.object("value",i),m.defined("array",h),n=w(n,0),h[n++]=i.x,h[n++]=i.y,h[n++]=i.width,h[n]=i.height,h};o.unpack=function(i,h,n){return m.defined("array",i),h=w(h,0),f(n)||(n=new o),n.x=i[h++],n.y=i[h++],n.width=i[h++],n.height=i[h],n};o.fromPoints=function(i,h){if(f(h)||(h=new o),!f(i)||i.length===0)return h.x=0,h.y=0,h.width=0,h.height=0,h;let n=i.length,t=i[0].x,c=i[0].y,e=i[0].x,y=i[0].y;for(let x=1;x<n;x++){let b=i[x],j=b.x,M=b.y;t=Math.min(j,t),e=Math.max(j,e),c=Math.min(M,c),y=Math.max(M,y)}return h.x=t,h.y=c,h.width=e-t,h.height=y-c,h};var L=new g,X=new p,Y=new p;o.fromRectangle=function(i,h,n){if(f(n)||(n=new o),!f(i))return n.x=0,n.y=0,n.width=0,n.height=0,n;h=w(h,L);let t=h.project(R.southwest(i,X)),c=h.project(R.northeast(i,Y));return O.subtract(c,t,c),n.x=t.x,n.y=t.y,n.width=c.x,n.height=c.y,n};o.clone=function(i,h){if(f(i))return f(h)?(h.x=i.x,h.y=i.y,h.width=i.width,h.height=i.height,h):new o(i.x,i.y,i.width,i.height)};o.union=function(i,h,n){m.typeOf.object("left",i),m.typeOf.object("right",h),f(n)||(n=new o);let t=Math.min(i.x,h.x),c=Math.min(i.y,h.y),e=Math.max(i.x+i.width,h.x+h.width),y=Math.max(i.y+i.height,h.y+h.height);return n.x=t,n.y=c,n.width=e-t,n.height=y-c,n};o.expand=function(i,h,n){m.typeOf.object("rectangle",i),m.typeOf.object("point",h),n=o.clone(i,n);let t=h.x-n.x,c=h.y-n.y;return t>n.width?n.width=t:t<0&&(n.width-=t,n.x=h.x),c>n.height?n.height=c:c<0&&(n.height-=c,n.y=h.y),n};o.intersect=function(i,h){m.typeOf.object("left",i),m.typeOf.object("right",h);let n=i.x,t=i.y,c=h.x,e=h.y;return n>c+h.width||n+i.width<c||t+i.height<e||t>e+h.height?d.OUTSIDE:d.INTERSECTING};o.equals=function(i,h){return i===h||f(i)&&f(h)&&i.x===h.x&&i.y===h.y&&i.width===h.width&&i.height===h.height};o.prototype.clone=function(i){return o.clone(this,i)};o.prototype.intersect=function(i){return o.intersect(this,i)};o.prototype.equals=function(i){return o.equals(this,i)};var S=o;export{S as a}; diff --git a/cesium/Workers/chunk-DVG6ROYF.js b/cesium/Workers/chunk-K4ASOM65.js similarity index 94% rename from cesium/Workers/chunk-DVG6ROYF.js rename to cesium/Workers/chunk-K4ASOM65.js index 0dd2ba7..727acb3 100644 --- a/cesium/Workers/chunk-DVG6ROYF.js +++ b/cesium/Workers/chunk-K4ASOM65.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as _}from"./chunk-WIE5YNSS.js";import{a as te}from"./chunk-TLL4Q2KI.js";import{a as fe,b as j,f as Z,g as me}from"./chunk-CMXCDAKR.js";import{a as e,b as ie,c as ee,e as O}from"./chunk-LJCGAQ64.js";import{a as Q}from"./chunk-JFG572S7.js";import{a as se}from"./chunk-42NIXFVW.js";import{a as le}from"./chunk-5YVCOCPP.js";import{e as $}from"./chunk-U73D6PDD.js";var Se={ROUNDED:0,MITERED:1,BEVELED:2},G=Object.freeze(Se);var ue={};function P(r,n){if(!$(r))throw new le("identifier is required.");$(ue[r])||(ue[r]=!0,console.warn(se(n,r)))}P.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";P.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";P.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";P.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var he=P;var w=[new e,new e],Te=new e,Be=new e,Ce=new e,ze=new e,Ae=new e,be=new e,Oe=new e,ve=new e,De=new e,I=new e,W=new e,R={},re=new ie;function je(r,n){let a=new Array(r.length);for(let o=0;o<r.length;o++){let t=r[o];re=n.cartesianToCartographic(t,re),a[o]=re.height,r[o]=n.scaleToGeodeticSurface(t,t)}return a}function ne(r,n,a,o){let t=r[0],c=r[1],f=e.angleBetween(t,c),l=Math.ceil(f/o),m=new Array(l),s;if(n===a){for(s=0;s<l;s++)m[s]=n;return m.push(a),m}let d=(a-n)/l;for(s=1;s<l;s++){let x=n+s*d;m[s]=x}return m[0]=n,m.push(a),m}var X=new e,Y=new e;function He(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y),l=ee.angleBetween(c,f);return f.x*c.y-f.y*c.x>=0?-l:l}var Me=new e(-1,0,0),H=new j,Ve=new j,oe=new O,Ne=O.IDENTITY.clone(),Fe=new e,Ge=new fe,de=new e;function v(r,n,a,o,t,c,f,l){let m=Fe,s=Ge;H=me.eastNorthUpToFixedFrame(r,t,H),m=j.multiplyByPointAsVector(H,Me,m),m=e.normalize(m,m);let S=He(m,n,r,t);oe=O.fromRotationZ(S,oe),de.z=c,H=j.multiplyTransformation(H,j.fromRotationTranslation(oe,de,Ve),H);let d=Ne;d[0]=f;for(let x=0;x<l;x++)for(let i=0;i<a.length;i+=3)s=e.fromArray(a,i,s),s=O.multiplyByVector(d,s,s),s=j.multiplyByPoint(H,s,s),o.push(s.x,s.y,s.z);return o}var Ie=new e;function ce(r,n,a,o,t,c,f){for(let l=0;l<r.length;l+=3){let m=e.fromArray(r,l,Ie);o=v(m,n,a,o,t,c[l/3],f,1)}return o}function Le(r,n){let a=r.length,o=new Array(a*6),t=0,c=n.x+n.width/2,f=n.y+n.height/2,l=r[0];o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f;for(let m=1;m<a;m++){l=r[m];let s=l.x-c,S=l.y-f;o[t++]=s,o[t++]=0,o[t++]=S,o[t++]=s,o[t++]=0,o[t++]=S}return l=r[0],o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f,o}function ge(r,n){let a=r.length,o=new Array(a*3),t=0,c=n.x+n.width/2,f=n.y+n.height/2;for(let l=0;l<a;l++)o[t++]=r[l].x-c,o[t++]=0,o[t++]=r[l].y-f;return o}var ye=new Z,we=new e,pe=new O;function xe(r,n,a,o,t,c,f,l,m,s){let S=e.angleBetween(e.subtract(n,r,I),e.subtract(a,r,W)),d=o===G.BEVELED?0:Math.ceil(S/Q.toRadians(5)),x;t?x=O.fromQuaternion(Z.fromAxisAngle(e.negate(r,I),S/(d+1),ye),pe):x=O.fromQuaternion(Z.fromAxisAngle(r,S/(d+1),ye),pe);let i,g;if(n=e.clone(n,we),d>0){let D=s?2:1;for(let y=0;y<d;y++)n=O.multiplyByVector(x,n,n),i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,D)}else i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,1),a=e.clone(a,we),i=e.subtract(a,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(a,W),f=v(g,i,l,f,c,m,1,1);return f}R.removeDuplicatesFromShape=function(r){let n=r.length,a=[];for(let o=n-1,t=0;t<n;o=t++){let c=r[o],f=r[t];ee.equals(c,f)||a.push(f)}return a};R.angleIsGreaterThanPi=function(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y);return f.x*c.y-f.y*c.x>=0};var qe=new e,Pe=new e;R.computePositions=function(r,n,a,o,t){let c=o._ellipsoid,f=je(r,c),l=o._granularity,m=o._cornerType,s=t?Le(n,a):ge(n,a),S=t?ge(n,a):void 0,d=a.height/2,x=a.width/2,i=r.length,g=[],D=t?[]:void 0,y=Te,b=Be,h=Ce,E=ze,B=Ae,C=be,z=Oe,u=ve,T=De,p=r[0],M=r[1];E=c.geodeticSurfaceNormal(p,E),y=e.subtract(M,p,y),y=e.normalize(y,y),u=e.cross(E,y,u),u=e.normalize(u,u);let V=f[0],A=f[1];t&&(D=v(p,u,S,D,c,V+d,1,1)),T=e.clone(p,T),p=M,b=e.negate(y,b);let N,F;for(let U=1;U<i-1;U++){let ae=t?2:1;if(M=r[U+1],p.equals(M)){he("Positions are too close and are considered equivalent with rounding error.");continue}y=e.subtract(M,p,y),y=e.normalize(y,y),h=e.add(y,b,h),h=e.normalize(h,h),E=c.geodeticSurfaceNormal(p,E);let L=e.multiplyByScalar(E,e.dot(y,E),qe);e.subtract(y,L,L),e.normalize(L,L);let q=e.multiplyByScalar(E,e.dot(b,E),Pe);if(e.subtract(b,q,q),e.normalize(q,q),!Q.equalsEpsilon(Math.abs(e.dot(L,q)),1,Q.EPSILON7)){h=e.cross(h,E,h),h=e.cross(E,h,h),h=e.normalize(h,h);let k=1/Math.max(.25,e.magnitude(e.cross(h,b,I))),K=R.angleIsGreaterThanPi(y,b,p,c);K?(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),N=ne(w,V+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,N,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,x,z),z),m===G.ROUNDED||m===G.BEVELED?xe(B,C,z,m,K,c,g,s,A+d,t):(h=e.negate(h,h),g=v(p,h,s,g,c,A+d,k,ae)),T=e.clone(z,T)):(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,-x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),N=ne(w,V+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,N,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,-x,z),z),m===G.ROUNDED||m===G.BEVELED?xe(B,C,z,m,K,c,g,s,A+d,t):g=v(p,h,s,g,c,A+d,k,ae),T=e.clone(z,T)),b=e.negate(y,b)}else g=v(T,u,s,g,c,V+d,1,1),T=p;V=A,A=f[U+1],p=M}w[0]=e.clone(T,w[0]),w[1]=e.clone(p,w[1]),N=ne(w,V+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,N,1),t&&(D=v(p,u,S,D,c,A+d,1,1)),i=g.length;let Ee=t?i+D.length:i,J=new Float64Array(Ee);return J.set(g),t&&J.set(D,i),J};var lt=R;export{G as a,he as b,lt as c}; +import{a as _}from"./chunk-AMQUWUD4.js";import{a as te}from"./chunk-KF5NF354.js";import{a as fe,b as j,f as Z,g as me}from"./chunk-7Z5IIKOJ.js";import{a as e,b as ie,c as ee,e as O}from"./chunk-POASMU2N.js";import{a as Q}from"./chunk-R6KGAEF6.js";import{a as se}from"./chunk-IUA6FAOZ.js";import{a as le}from"./chunk-UH2WFNTA.js";import{e as $}from"./chunk-PEYJTJPE.js";var Se={ROUNDED:0,MITERED:1,BEVELED:2},G=Object.freeze(Se);var ue={};function P(r,n){if(!$(r))throw new le("identifier is required.");$(ue[r])||(ue[r]=!0,console.warn(se(n,r)))}P.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";P.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";P.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";P.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var he=P;var w=[new e,new e],Te=new e,Be=new e,Ce=new e,ze=new e,Ae=new e,be=new e,Oe=new e,ve=new e,De=new e,I=new e,W=new e,R={},re=new ie;function je(r,n){let a=new Array(r.length);for(let o=0;o<r.length;o++){let t=r[o];re=n.cartesianToCartographic(t,re),a[o]=re.height,r[o]=n.scaleToGeodeticSurface(t,t)}return a}function ne(r,n,a,o){let t=r[0],c=r[1],f=e.angleBetween(t,c),l=Math.ceil(f/o),m=new Array(l),s;if(n===a){for(s=0;s<l;s++)m[s]=n;return m.push(a),m}let d=(a-n)/l;for(s=1;s<l;s++){let x=n+s*d;m[s]=x}return m[0]=n,m.push(a),m}var X=new e,Y=new e;function He(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y),l=ee.angleBetween(c,f);return f.x*c.y-f.y*c.x>=0?-l:l}var Me=new e(-1,0,0),H=new j,Ve=new j,oe=new O,Ne=O.IDENTITY.clone(),Fe=new e,Ge=new fe,de=new e;function v(r,n,a,o,t,c,f,l){let m=Fe,s=Ge;H=me.eastNorthUpToFixedFrame(r,t,H),m=j.multiplyByPointAsVector(H,Me,m),m=e.normalize(m,m);let S=He(m,n,r,t);oe=O.fromRotationZ(S,oe),de.z=c,H=j.multiplyTransformation(H,j.fromRotationTranslation(oe,de,Ve),H);let d=Ne;d[0]=f;for(let x=0;x<l;x++)for(let i=0;i<a.length;i+=3)s=e.fromArray(a,i,s),s=O.multiplyByVector(d,s,s),s=j.multiplyByPoint(H,s,s),o.push(s.x,s.y,s.z);return o}var Ie=new e;function ce(r,n,a,o,t,c,f){for(let l=0;l<r.length;l+=3){let m=e.fromArray(r,l,Ie);o=v(m,n,a,o,t,c[l/3],f,1)}return o}function Le(r,n){let a=r.length,o=new Array(a*6),t=0,c=n.x+n.width/2,f=n.y+n.height/2,l=r[0];o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f;for(let m=1;m<a;m++){l=r[m];let s=l.x-c,S=l.y-f;o[t++]=s,o[t++]=0,o[t++]=S,o[t++]=s,o[t++]=0,o[t++]=S}return l=r[0],o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f,o}function ge(r,n){let a=r.length,o=new Array(a*3),t=0,c=n.x+n.width/2,f=n.y+n.height/2;for(let l=0;l<a;l++)o[t++]=r[l].x-c,o[t++]=0,o[t++]=r[l].y-f;return o}var ye=new Z,we=new e,pe=new O;function xe(r,n,a,o,t,c,f,l,m,s){let S=e.angleBetween(e.subtract(n,r,I),e.subtract(a,r,W)),d=o===G.BEVELED?0:Math.ceil(S/Q.toRadians(5)),x;t?x=O.fromQuaternion(Z.fromAxisAngle(e.negate(r,I),S/(d+1),ye),pe):x=O.fromQuaternion(Z.fromAxisAngle(r,S/(d+1),ye),pe);let i,g;if(n=e.clone(n,we),d>0){let D=s?2:1;for(let y=0;y<d;y++)n=O.multiplyByVector(x,n,n),i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,D)}else i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,1),a=e.clone(a,we),i=e.subtract(a,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(a,W),f=v(g,i,l,f,c,m,1,1);return f}R.removeDuplicatesFromShape=function(r){let n=r.length,a=[];for(let o=n-1,t=0;t<n;o=t++){let c=r[o],f=r[t];ee.equals(c,f)||a.push(f)}return a};R.angleIsGreaterThanPi=function(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y);return f.x*c.y-f.y*c.x>=0};var qe=new e,Pe=new e;R.computePositions=function(r,n,a,o,t){let c=o._ellipsoid,f=je(r,c),l=o._granularity,m=o._cornerType,s=t?Le(n,a):ge(n,a),S=t?ge(n,a):void 0,d=a.height/2,x=a.width/2,i=r.length,g=[],D=t?[]:void 0,y=Te,b=Be,h=Ce,E=ze,B=Ae,C=be,z=Oe,u=ve,T=De,p=r[0],M=r[1];E=c.geodeticSurfaceNormal(p,E),y=e.subtract(M,p,y),y=e.normalize(y,y),u=e.cross(E,y,u),u=e.normalize(u,u);let V=f[0],A=f[1];t&&(D=v(p,u,S,D,c,V+d,1,1)),T=e.clone(p,T),p=M,b=e.negate(y,b);let N,F;for(let U=1;U<i-1;U++){let ae=t?2:1;if(M=r[U+1],p.equals(M)){he("Positions are too close and are considered equivalent with rounding error.");continue}y=e.subtract(M,p,y),y=e.normalize(y,y),h=e.add(y,b,h),h=e.normalize(h,h),E=c.geodeticSurfaceNormal(p,E);let L=e.multiplyByScalar(E,e.dot(y,E),qe);e.subtract(y,L,L),e.normalize(L,L);let q=e.multiplyByScalar(E,e.dot(b,E),Pe);if(e.subtract(b,q,q),e.normalize(q,q),!Q.equalsEpsilon(Math.abs(e.dot(L,q)),1,Q.EPSILON7)){h=e.cross(h,E,h),h=e.cross(E,h,h),h=e.normalize(h,h);let k=1/Math.max(.25,e.magnitude(e.cross(h,b,I))),K=R.angleIsGreaterThanPi(y,b,p,c);K?(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),N=ne(w,V+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,N,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,x,z),z),m===G.ROUNDED||m===G.BEVELED?xe(B,C,z,m,K,c,g,s,A+d,t):(h=e.negate(h,h),g=v(p,h,s,g,c,A+d,k,ae)),T=e.clone(z,T)):(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,-x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),N=ne(w,V+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,N,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,-x,z),z),m===G.ROUNDED||m===G.BEVELED?xe(B,C,z,m,K,c,g,s,A+d,t):g=v(p,h,s,g,c,A+d,k,ae),T=e.clone(z,T)),b=e.negate(y,b)}else g=v(T,u,s,g,c,V+d,1,1),T=p;V=A,A=f[U+1],p=M}w[0]=e.clone(T,w[0]),w[1]=e.clone(p,w[1]),N=ne(w,V+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,N,1),t&&(D=v(p,u,S,D,c,A+d,1,1)),i=g.length;let Ee=t?i+D.length:i,J=new Float64Array(Ee);return J.set(g),t&&J.set(D,i),J};var lt=R;export{G as a,he as b,lt as c}; diff --git a/cesium/Workers/chunk-K62YE2WO.js b/cesium/Workers/chunk-K62YE2WO.js deleted file mode 100644 index 56eba36..0000000 --- a/cesium/Workers/chunk-K62YE2WO.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 - * - * Copyright 2011-2022 Cesium Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Columbus View (Pat. Pend.) - * - * Portions licensed separately. - * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. - */ - -import{a as K}from"./chunk-TLL4Q2KI.js";import{a as L}from"./chunk-REUYHR24.js";import{b as v,c as J,d as Z}from"./chunk-3FEM743H.js";import{b as B,h as k}from"./chunk-CMXCDAKR.js";import{a as t,b as T,c as I,d as F,e as d}from"./chunk-LJCGAQ64.js";import{a as g}from"./chunk-JFG572S7.js";import{a as W}from"./chunk-42NIXFVW.js";import{a as b,b as z}from"./chunk-5YVCOCPP.js";import{e as p}from"./chunk-U73D6PDD.js";function m(n,e){this.center=t.clone(W(n,t.ZERO)),this.halfAxes=d.clone(W(e,d.ZERO))}m.packedLength=t.packedLength+d.packedLength;m.pack=function(n,e,c){return z.typeOf.object("value",n),z.defined("array",e),c=W(c,0),t.pack(n.center,e,c),d.pack(n.halfAxes,e,c+t.packedLength),e};m.unpack=function(n,e,c){return z.defined("array",n),e=W(e,0),p(c)||(c=new m),t.unpack(n,e,c.center),d.unpack(n,e+t.packedLength,c.halfAxes),c};var Ct=new t,ut=new t,Pt=new t,xt=new t,yt=new t,At=new t,Nt=new d,Mt={unitary:new d,diagonal:new d};m.fromPoints=function(n,e){if(p(e)||(e=new m),!p(n)||n.length===0)return e.halfAxes=d.ZERO,e.center=t.ZERO,e;let c,h=n.length,r=t.clone(n[0],Ct);for(c=1;c<h;c++)t.add(r,n[c],r);let o=1/h;t.multiplyByScalar(r,o,r);let i=0,C=0,w=0,l=0,u=0,a=0,s;for(c=0;c<h;c++)s=t.subtract(n[c],r,ut),i+=s.x*s.x,C+=s.x*s.y,w+=s.x*s.z,l+=s.y*s.y,u+=s.y*s.z,a+=s.z*s.z;i*=o,C*=o,w*=o,l*=o,u*=o,a*=o;let f=Nt;f[0]=i,f[1]=C,f[2]=w,f[3]=C,f[4]=l,f[5]=u,f[6]=w,f[7]=u,f[8]=a;let A=d.computeEigenDecomposition(f,Mt),M=d.clone(A.unitary,e.halfAxes),x=d.getColumn(M,0,xt),y=d.getColumn(M,1,yt),N=d.getColumn(M,2,At),P=-Number.MAX_VALUE,O=-Number.MAX_VALUE,U=-Number.MAX_VALUE,q=Number.MAX_VALUE,R=Number.MAX_VALUE,j=Number.MAX_VALUE;for(c=0;c<h;c++)s=n[c],P=Math.max(t.dot(x,s),P),O=Math.max(t.dot(y,s),O),U=Math.max(t.dot(N,s),U),q=Math.min(t.dot(x,s),q),R=Math.min(t.dot(y,s),R),j=Math.min(t.dot(N,s),j);x=t.multiplyByScalar(x,.5*(q+P),x),y=t.multiplyByScalar(y,.5*(R+O),y),N=t.multiplyByScalar(N,.5*(j+U),N);let S=t.add(x,y,e.center);t.add(S,N,S);let E=Pt;return E.x=P-q,E.y=O-R,E.z=U-j,t.multiplyByScalar(E,.5,E),d.multiplyByScale(e.halfAxes,E,e.halfAxes),e};var nt=new t,Ot=new t;function Q(n,e,c,h,r,o,i,C,w,l,u){if(!p(r)||!p(o)||!p(i)||!p(C)||!p(w)||!p(l))throw new b("all extents (minimum/maximum X/Y/Z) are required.");p(u)||(u=new m);let a=u.halfAxes;d.setColumn(a,0,e,a),d.setColumn(a,1,c,a),d.setColumn(a,2,h,a);let s=nt;s.x=(r+o)/2,s.y=(i+C)/2,s.z=(w+l)/2;let f=Ot;f.x=(o-r)/2,f.y=(C-i)/2,f.z=(l-w)/2;let A=u.center;return s=d.multiplyByVector(a,s,s),t.add(n,s,A),d.multiplyByScale(a,f,a),u}var $=new T,bt=new t,St=new T,Tt=new T,gt=new T,Et=new T,Rt=new T,Wt=new t,H=new t,zt=new t,tt=new t,It=new t,Lt=new I,Ut=new I,qt=new I,jt=new I,Bt=new I,vt=new t,Vt=new t,_t=new t,Dt=new t,Xt=new I,kt=new t,Zt=new t,Yt=new t,Gt=new L(t.UNIT_X,0);m.fromRectangle=function(n,e,c,h,r){if(!p(n))throw new b("rectangle is required");if(n.width<0||n.width>g.TWO_PI)throw new b("Rectangle width must be between 0 and 2 * pi");if(n.height<0||n.height>g.PI)throw new b("Rectangle height must be between 0 and pi");if(p(h)&&!g.equalsEpsilon(h.radii.x,h.radii.y,g.EPSILON15))throw new b("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");e=W(e,0),c=W(c,0),h=W(h,F.WGS84);let o,i,C,w,l,u,a;if(n.width<=g.PI){let R=k.center(n,$),j=h.cartographicToCartesian(R,bt),S=new K(j,h);a=S.plane;let E=R.longitude,ot=n.south<0&&n.north>0?0:R.latitude,st=T.fromRadians(E,n.north,c,St),V=T.fromRadians(n.west,n.north,c,Tt),it=T.fromRadians(n.west,ot,c,gt),_=T.fromRadians(n.west,n.south,c,Et),ht=T.fromRadians(E,n.south,c,Rt),ft=h.cartographicToCartesian(st,Wt),D=h.cartographicToCartesian(V,H),dt=h.cartographicToCartesian(it,zt),X=h.cartographicToCartesian(_,tt),mt=h.cartographicToCartesian(ht,It),wt=S.projectPointToNearestOnPlane(ft,Lt),Y=S.projectPointToNearestOnPlane(D,Ut),lt=S.projectPointToNearestOnPlane(dt,qt),G=S.projectPointToNearestOnPlane(X,jt),pt=S.projectPointToNearestOnPlane(mt,Bt);return o=Math.min(Y.x,lt.x,G.x),i=-o,w=Math.max(Y.y,wt.y),C=Math.min(G.y,pt.y),V.height=_.height=e,D=h.cartographicToCartesian(V,H),X=h.cartographicToCartesian(_,tt),l=Math.min(L.getPointDistance(a,D),L.getPointDistance(a,X)),u=c,Q(S.origin,S.xAxis,S.yAxis,S.zAxis,o,i,C,w,l,u,r)}let s=n.south>0,f=n.north<0,A=s?n.south:f?n.north:0,M=k.center(n,$).longitude,x=t.fromRadians(M,A,c,h,vt);x.z=0;let N=Math.abs(x.x)<g.EPSILON10&&Math.abs(x.y)<g.EPSILON10?t.UNIT_X:t.normalize(x,Vt),P=t.UNIT_Z,O=t.cross(N,P,_t);a=L.fromPointNormal(x,N,Gt);let U=t.fromRadians(M+g.PI_OVER_TWO,A,c,h,Dt);i=t.dot(L.projectPointOntoPlane(a,U,Xt),O),o=-i,w=t.fromRadians(0,n.north,f?e:c,h,kt).z,C=t.fromRadians(0,n.south,s?e:c,h,Zt).z;let q=t.fromRadians(n.east,A,c,h,Yt);return l=L.getPointDistance(a,q),u=0,Q(x,O,P,N,o,i,C,w,l,u,r)};m.fromTransformation=function(n,e){return z.typeOf.object("transformation",n),p(e)||(e=new m),e.center=B.getTranslation(n,e.center),e.halfAxes=B.getMatrix3(n,e.halfAxes),e.halfAxes=d.multiplyByScalar(e.halfAxes,.5,e.halfAxes),e};m.clone=function(n,e){if(p(n))return p(e)?(t.clone(n.center,e.center),d.clone(n.halfAxes,e.halfAxes),e):new m(n.center,n.halfAxes)};m.intersectPlane=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("plane is required.");let c=n.center,h=e.normal,r=n.halfAxes,o=h.x,i=h.y,C=h.z,w=Math.abs(o*r[d.COLUMN0ROW0]+i*r[d.COLUMN0ROW1]+C*r[d.COLUMN0ROW2])+Math.abs(o*r[d.COLUMN1ROW0]+i*r[d.COLUMN1ROW1]+C*r[d.COLUMN1ROW2])+Math.abs(o*r[d.COLUMN2ROW0]+i*r[d.COLUMN2ROW1]+C*r[d.COLUMN2ROW2]),l=t.dot(h,c)+e.distance;return l<=-w?v.OUTSIDE:l>=w?v.INSIDE:v.INTERSECTING};var at=new t,ct=new t,rt=new t,Ft=new t,et=new t,Jt=new t;m.distanceSquaredTo=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("cartesian is required.");let c=t.subtract(e,n.center,nt),h=n.halfAxes,r=d.getColumn(h,0,at),o=d.getColumn(h,1,ct),i=d.getColumn(h,2,rt),C=t.magnitude(r),w=t.magnitude(o),l=t.magnitude(i),u=!0,a=!0,s=!0;C>0?t.divideByScalar(r,C,r):u=!1,w>0?t.divideByScalar(o,w,o):a=!1,l>0?t.divideByScalar(i,l,i):s=!1;let f=!u+!a+!s,A,M,x;if(f===1){let O=r;A=o,M=i,a?s||(O=i,M=r):(O=o,A=r),x=t.cross(A,M,et),O===r?r=x:O===o?o=x:O===i&&(i=x)}else if(f===2){A=r,a?A=o:s&&(A=i);let O=t.UNIT_Y;O.equalsEpsilon(A,g.EPSILON3)&&(O=t.UNIT_X),M=t.cross(A,O,Ft),t.normalize(M,M),x=t.cross(A,M,et),t.normalize(x,x),A===r?(o=M,i=x):A===o?(i=M,r=x):A===i&&(r=M,o=x)}else f===3&&(r=t.UNIT_X,o=t.UNIT_Y,i=t.UNIT_Z);let y=Jt;y.x=t.dot(c,r),y.y=t.dot(c,o),y.z=t.dot(c,i);let N=0,P;return y.x<-C?(P=y.x+C,N+=P*P):y.x>C&&(P=y.x-C,N+=P*P),y.y<-w?(P=y.y+w,N+=P*P):y.y>w&&(P=y.y-w,N+=P*P),y.z<-l?(P=y.z+l,N+=P*P):y.z>l&&(P=y.z-l,N+=P*P),N};var Kt=new t,Qt=new t;m.computePlaneDistances=function(n,e,c,h){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("position is required.");if(!p(c))throw new b("direction is required.");p(h)||(h=new J);let r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=n.center,C=n.halfAxes,w=d.getColumn(C,0,at),l=d.getColumn(C,1,ct),u=d.getColumn(C,2,rt),a=t.add(w,l,Kt);t.add(a,u,a),t.add(a,i,a);let s=t.subtract(a,e,Qt),f=t.dot(c,s);return r=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.add(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.subtract(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.subtract(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.add(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.add(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.subtract(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.subtract(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),h.start=r,h.stop=o,h};var $t=new t,Ht=new t,te=new t;m.computeCorners=function(n,e){z.typeOf.object("box",n),p(e)||(e=[new t,new t,new t,new t,new t,new t,new t,new t]);let c=n.center,h=n.halfAxes,r=d.getColumn(h,0,$t),o=d.getColumn(h,1,Ht),i=d.getColumn(h,2,te);return t.clone(c,e[0]),t.subtract(e[0],r,e[0]),t.subtract(e[0],o,e[0]),t.subtract(e[0],i,e[0]),t.clone(c,e[1]),t.subtract(e[1],r,e[1]),t.subtract(e[1],o,e[1]),t.add(e[1],i,e[1]),t.clone(c,e[2]),t.subtract(e[2],r,e[2]),t.add(e[2],o,e[2]),t.subtract(e[2],i,e[2]),t.clone(c,e[3]),t.subtract(e[3],r,e[3]),t.add(e[3],o,e[3]),t.add(e[3],i,e[3]),t.clone(c,e[4]),t.add(e[4],r,e[4]),t.subtract(e[4],o,e[4]),t.subtract(e[4],i,e[4]),t.clone(c,e[5]),t.add(e[5],r,e[5]),t.subtract(e[5],o,e[5]),t.add(e[5],i,e[5]),t.clone(c,e[6]),t.add(e[6],r,e[6]),t.add(e[6],o,e[6]),t.subtract(e[6],i,e[6]),t.clone(c,e[7]),t.add(e[7],r,e[7]),t.add(e[7],o,e[7]),t.add(e[7],i,e[7]),e};var ee=new d;m.computeTransformation=function(n,e){z.typeOf.object("box",n),p(e)||(e=new B);let c=n.center,h=d.multiplyByUniformScale(n.halfAxes,2,ee);return B.fromRotationTranslation(h,c,e)};var ne=new Z;m.isOccluded=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("occluder is required.");let c=Z.fromOrientedBoundingBox(n,ne);return!e.isBoundingSphereVisible(c)};m.prototype.intersectPlane=function(n){return m.intersectPlane(this,n)};m.prototype.distanceSquaredTo=function(n){return m.distanceSquaredTo(this,n)};m.prototype.computePlaneDistances=function(n,e,c){return m.computePlaneDistances(this,n,e,c)};m.prototype.computeCorners=function(n){return m.computeCorners(this,n)};m.prototype.computeTransformation=function(n){return m.computeTransformation(this,n)};m.prototype.isOccluded=function(n){return m.isOccluded(this,n)};m.equals=function(n,e){return n===e||p(n)&&p(e)&&t.equals(n.center,e.center)&&d.equals(n.halfAxes,e.halfAxes)};m.prototype.clone=function(n){return m.clone(this,n)};m.prototype.equals=function(n){return m.equals(this,n)};var ye=m;export{ye as a}; diff --git a/cesium/Workers/chunk-TRGIYWHT.js b/cesium/Workers/chunk-KCIZBVXL.js similarity index 90% rename from cesium/Workers/chunk-TRGIYWHT.js rename to cesium/Workers/chunk-KCIZBVXL.js index 64d9c86..4c7e2d4 100644 --- a/cesium/Workers/chunk-TRGIYWHT.js +++ b/cesium/Workers/chunk-KCIZBVXL.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as W}from"./chunk-WLRVP2UA.js";import{a as Z}from"./chunk-RQXB4B4V.js";import{a as X}from"./chunk-MPVEZNKB.js";import{b as K,c as Q,d as V}from"./chunk-FATK2EQ2.js";import{d as H}from"./chunk-3FEM743H.js";import{a as U}from"./chunk-77ESX6BV.js";import{a as r,d as J}from"./chunk-LJCGAQ64.js";import{a as B}from"./chunk-JFG572S7.js";import{a as u}from"./chunk-42NIXFVW.js";import{a as P}from"./chunk-5YVCOCPP.js";import{e as T}from"./chunk-U73D6PDD.js";var ii=new r(1,1,1),S=Math.cos,q=Math.sin;function x(t){t=u(t,u.EMPTY_OBJECT);let o=u(t.radii,ii),n=u(t.innerRadii,o),k=u(t.minimumClock,0),w=u(t.maximumClock,B.TWO_PI),d=u(t.minimumCone,0),l=u(t.maximumCone,B.PI),s=Math.round(u(t.stackPartitions,10)),A=Math.round(u(t.slicePartitions,8)),m=Math.round(u(t.subdivisions,128));if(s<1)throw new P("options.stackPartitions cannot be less than 1");if(A<0)throw new P("options.slicePartitions cannot be less than 0");if(m<0)throw new P("options.subdivisions must be greater than or equal to zero.");if(T(t.offsetAttribute)&&t.offsetAttribute===W.TOP)throw new P("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=r.clone(o),this._innerRadii=r.clone(n),this._minimumClock=k,this._maximumClock=w,this._minimumCone=d,this._maximumCone=l,this._stackPartitions=s,this._slicePartitions=A,this._subdivisions=m,this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}x.packedLength=2*r.packedLength+8;x.pack=function(t,o,n){if(!T(t))throw new P("value is required");if(!T(o))throw new P("array is required");return n=u(n,0),r.pack(t._radii,o,n),n+=r.packedLength,r.pack(t._innerRadii,o,n),n+=r.packedLength,o[n++]=t._minimumClock,o[n++]=t._maximumClock,o[n++]=t._minimumCone,o[n++]=t._maximumCone,o[n++]=t._stackPartitions,o[n++]=t._slicePartitions,o[n++]=t._subdivisions,o[n]=u(t._offsetAttribute,-1),o};var $=new r,G=new r,b={radii:$,innerRadii:G,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};x.unpack=function(t,o,n){if(!T(t))throw new P("array is required");o=u(o,0);let k=r.unpack(t,o,$);o+=r.packedLength;let w=r.unpack(t,o,G);o+=r.packedLength;let d=t[o++],l=t[o++],s=t[o++],A=t[o++],m=t[o++],f=t[o++],E=t[o++],h=t[o];return T(n)?(n._radii=r.clone(k,n._radii),n._innerRadii=r.clone(w,n._innerRadii),n._minimumClock=d,n._maximumClock=l,n._minimumCone=s,n._maximumCone=A,n._stackPartitions=m,n._slicePartitions=f,n._subdivisions=E,n._offsetAttribute=h===-1?void 0:h,n):(b.minimumClock=d,b.maximumClock=l,b.minimumCone=s,b.maximumCone=A,b.stackPartitions=m,b.slicePartitions=f,b.subdivisions=E,b.offsetAttribute=h===-1?void 0:h,new x(b))};x.createGeometry=function(t){let o=t._radii;if(o.x<=0||o.y<=0||o.z<=0)return;let n=t._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let k=t._minimumClock,w=t._maximumClock,d=t._minimumCone,l=t._maximumCone,s=t._subdivisions,A=J.fromCartesian3(o),m=t._slicePartitions+1,f=t._stackPartitions+1;m=Math.round(m*Math.abs(w-k)/B.TWO_PI),f=Math.round(f*Math.abs(l-d)/B.PI),m<2&&(m=2),f<2&&(f=2);let E=0,h=1,L=n.x!==o.x||n.y!==o.y||n.z!==o.z,Y=!1,j=!1;L&&(h=2,d>0&&(Y=!0,E+=m),l<Math.PI&&(j=!0,E+=m));let y=s*h*(f+m),a=new Float64Array(y*3),g=2*(y+E-(m+f)*h),_=Z.createTypedArray(y,g),i,e,v,z,c=0,C=new Array(f),O=new Array(f);for(i=0;i<f;i++)z=d+i*(l-d)/(f-1),C[i]=q(z),O[i]=S(z);let M=new Array(s),R=new Array(s);for(i=0;i<s;i++)v=k+i*(w-k)/(s-1),M[i]=q(v),R[i]=S(v);for(i=0;i<f;i++)for(e=0;e<s;e++)a[c++]=o.x*C[i]*R[e],a[c++]=o.y*C[i]*M[e],a[c++]=o.z*O[i];if(L)for(i=0;i<f;i++)for(e=0;e<s;e++)a[c++]=n.x*C[i]*R[e],a[c++]=n.y*C[i]*M[e],a[c++]=n.z*O[i];for(C.length=s,O.length=s,i=0;i<s;i++)z=d+i*(l-d)/(s-1),C[i]=q(z),O[i]=S(z);for(M.length=m,R.length=m,i=0;i<m;i++)v=k+i*(w-k)/(m-1),M[i]=q(v),R[i]=S(v);for(i=0;i<s;i++)for(e=0;e<m;e++)a[c++]=o.x*C[i]*R[e],a[c++]=o.y*C[i]*M[e],a[c++]=o.z*O[i];if(L)for(i=0;i<s;i++)for(e=0;e<m;e++)a[c++]=n.x*C[i]*R[e],a[c++]=n.y*C[i]*M[e],a[c++]=n.z*O[i];for(c=0,i=0;i<f*h;i++){let p=i*s;for(e=0;e<s-1;e++)_[c++]=p+e,_[c++]=p+e+1}let D=f*s*h;for(i=0;i<m;i++)for(e=0;e<s-1;e++)_[c++]=D+i+e*m,_[c++]=D+i+(e+1)*m;if(L)for(D=f*s*h+m*s,i=0;i<m;i++)for(e=0;e<s-1;e++)_[c++]=D+i+e*m,_[c++]=D+i+(e+1)*m;if(L){let p=f*s*h,N=p+s*m;if(Y)for(i=0;i<m;i++)_[c++]=p+i,_[c++]=N+i;if(j)for(p+=s*m-m,N+=s*m-m,i=0;i<m;i++)_[c++]=p+i,_[c++]=N+i}let F=new X({position:new V({componentDatatype:U.DOUBLE,componentsPerAttribute:3,values:a})});if(T(t._offsetAttribute)){let p=a.length,N=t._offsetAttribute===W.NONE?0:1,I=new Uint8Array(p/3).fill(N);F.applyOffset=new V({componentDatatype:U.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new Q({attributes:F,indices:_,primitiveType:K.LINES,boundingSphere:H.fromEllipsoid(A),offsetAttribute:t._offsetAttribute})};var Ci=x;export{Ci as a}; +import{a as W}from"./chunk-ILGBPNP6.js";import{a as Z}from"./chunk-P37AI2DW.js";import{a as X}from"./chunk-T6BE4RZK.js";import{b as K,c as Q,d as V}from"./chunk-X5IHHI6X.js";import{d as H}from"./chunk-TMSETF7M.js";import{a as U}from"./chunk-KZNJOCYU.js";import{a as r,d as J}from"./chunk-POASMU2N.js";import{a as B}from"./chunk-R6KGAEF6.js";import{a as u}from"./chunk-IUA6FAOZ.js";import{a as P}from"./chunk-UH2WFNTA.js";import{e as T}from"./chunk-PEYJTJPE.js";var ii=new r(1,1,1),S=Math.cos,q=Math.sin;function x(t){t=u(t,u.EMPTY_OBJECT);let o=u(t.radii,ii),n=u(t.innerRadii,o),k=u(t.minimumClock,0),w=u(t.maximumClock,B.TWO_PI),d=u(t.minimumCone,0),l=u(t.maximumCone,B.PI),s=Math.round(u(t.stackPartitions,10)),A=Math.round(u(t.slicePartitions,8)),m=Math.round(u(t.subdivisions,128));if(s<1)throw new P("options.stackPartitions cannot be less than 1");if(A<0)throw new P("options.slicePartitions cannot be less than 0");if(m<0)throw new P("options.subdivisions must be greater than or equal to zero.");if(T(t.offsetAttribute)&&t.offsetAttribute===W.TOP)throw new P("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=r.clone(o),this._innerRadii=r.clone(n),this._minimumClock=k,this._maximumClock=w,this._minimumCone=d,this._maximumCone=l,this._stackPartitions=s,this._slicePartitions=A,this._subdivisions=m,this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}x.packedLength=2*r.packedLength+8;x.pack=function(t,o,n){if(!T(t))throw new P("value is required");if(!T(o))throw new P("array is required");return n=u(n,0),r.pack(t._radii,o,n),n+=r.packedLength,r.pack(t._innerRadii,o,n),n+=r.packedLength,o[n++]=t._minimumClock,o[n++]=t._maximumClock,o[n++]=t._minimumCone,o[n++]=t._maximumCone,o[n++]=t._stackPartitions,o[n++]=t._slicePartitions,o[n++]=t._subdivisions,o[n]=u(t._offsetAttribute,-1),o};var $=new r,G=new r,b={radii:$,innerRadii:G,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};x.unpack=function(t,o,n){if(!T(t))throw new P("array is required");o=u(o,0);let k=r.unpack(t,o,$);o+=r.packedLength;let w=r.unpack(t,o,G);o+=r.packedLength;let d=t[o++],l=t[o++],s=t[o++],A=t[o++],m=t[o++],f=t[o++],E=t[o++],h=t[o];return T(n)?(n._radii=r.clone(k,n._radii),n._innerRadii=r.clone(w,n._innerRadii),n._minimumClock=d,n._maximumClock=l,n._minimumCone=s,n._maximumCone=A,n._stackPartitions=m,n._slicePartitions=f,n._subdivisions=E,n._offsetAttribute=h===-1?void 0:h,n):(b.minimumClock=d,b.maximumClock=l,b.minimumCone=s,b.maximumCone=A,b.stackPartitions=m,b.slicePartitions=f,b.subdivisions=E,b.offsetAttribute=h===-1?void 0:h,new x(b))};x.createGeometry=function(t){let o=t._radii;if(o.x<=0||o.y<=0||o.z<=0)return;let n=t._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let k=t._minimumClock,w=t._maximumClock,d=t._minimumCone,l=t._maximumCone,s=t._subdivisions,A=J.fromCartesian3(o),m=t._slicePartitions+1,f=t._stackPartitions+1;m=Math.round(m*Math.abs(w-k)/B.TWO_PI),f=Math.round(f*Math.abs(l-d)/B.PI),m<2&&(m=2),f<2&&(f=2);let E=0,h=1,L=n.x!==o.x||n.y!==o.y||n.z!==o.z,Y=!1,j=!1;L&&(h=2,d>0&&(Y=!0,E+=m),l<Math.PI&&(j=!0,E+=m));let y=s*h*(f+m),a=new Float64Array(y*3),g=2*(y+E-(m+f)*h),_=Z.createTypedArray(y,g),i,e,v,z,c=0,C=new Array(f),O=new Array(f);for(i=0;i<f;i++)z=d+i*(l-d)/(f-1),C[i]=q(z),O[i]=S(z);let M=new Array(s),R=new Array(s);for(i=0;i<s;i++)v=k+i*(w-k)/(s-1),M[i]=q(v),R[i]=S(v);for(i=0;i<f;i++)for(e=0;e<s;e++)a[c++]=o.x*C[i]*R[e],a[c++]=o.y*C[i]*M[e],a[c++]=o.z*O[i];if(L)for(i=0;i<f;i++)for(e=0;e<s;e++)a[c++]=n.x*C[i]*R[e],a[c++]=n.y*C[i]*M[e],a[c++]=n.z*O[i];for(C.length=s,O.length=s,i=0;i<s;i++)z=d+i*(l-d)/(s-1),C[i]=q(z),O[i]=S(z);for(M.length=m,R.length=m,i=0;i<m;i++)v=k+i*(w-k)/(m-1),M[i]=q(v),R[i]=S(v);for(i=0;i<s;i++)for(e=0;e<m;e++)a[c++]=o.x*C[i]*R[e],a[c++]=o.y*C[i]*M[e],a[c++]=o.z*O[i];if(L)for(i=0;i<s;i++)for(e=0;e<m;e++)a[c++]=n.x*C[i]*R[e],a[c++]=n.y*C[i]*M[e],a[c++]=n.z*O[i];for(c=0,i=0;i<f*h;i++){let p=i*s;for(e=0;e<s-1;e++)_[c++]=p+e,_[c++]=p+e+1}let D=f*s*h;for(i=0;i<m;i++)for(e=0;e<s-1;e++)_[c++]=D+i+e*m,_[c++]=D+i+(e+1)*m;if(L)for(D=f*s*h+m*s,i=0;i<m;i++)for(e=0;e<s-1;e++)_[c++]=D+i+e*m,_[c++]=D+i+(e+1)*m;if(L){let p=f*s*h,N=p+s*m;if(Y)for(i=0;i<m;i++)_[c++]=p+i,_[c++]=N+i;if(j)for(p+=s*m-m,N+=s*m-m,i=0;i<m;i++)_[c++]=p+i,_[c++]=N+i}let F=new X({position:new V({componentDatatype:U.DOUBLE,componentsPerAttribute:3,values:a})});if(T(t._offsetAttribute)){let p=a.length,N=t._offsetAttribute===W.NONE?0:1,I=new Uint8Array(p/3).fill(N);F.applyOffset=new V({componentDatatype:U.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new Q({attributes:F,indices:_,primitiveType:K.LINES,boundingSphere:H.fromEllipsoid(A),offsetAttribute:t._offsetAttribute})};var Ci=x;export{Ci as a}; diff --git a/cesium/Workers/chunk-KF5NF354.js b/cesium/Workers/chunk-KF5NF354.js new file mode 100644 index 0000000..2eaedb3 --- /dev/null +++ b/cesium/Workers/chunk-KF5NF354.js @@ -0,0 +1,26 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.119 + * + * Copyright 2011-2022 Cesium Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Columbus View (Pat. Pend.) + * + * Portions licensed separately. + * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. + */ + +import{a as P}from"./chunk-4WRMLZA7.js";import{a as j,b as d}from"./chunk-TAMCUKAR.js";import{a as O}from"./chunk-PDMQLSBL.js";import{a as A,b as m,g as u}from"./chunk-7Z5IIKOJ.js";import{a as e,c as l,d as _}from"./chunk-POASMU2N.js";import{a as g}from"./chunk-IUA6FAOZ.js";import{a as y,b as p}from"./chunk-UH2WFNTA.js";import{e as r}from"./chunk-PEYJTJPE.js";var x=new A;function s(n,t){if(p.defined("origin",n),t=g(t,_.default),n=t.scaleToGeodeticSurface(n),!r(n))throw new y("origin must not be at the center of the ellipsoid.");let o=u.eastNorthUpToFixedFrame(n,t);this._ellipsoid=t,this._origin=n,this._xAxis=e.fromCartesian4(m.getColumn(o,0,x)),this._yAxis=e.fromCartesian4(m.getColumn(o,1,x));let i=e.fromCartesian4(m.getColumn(o,2,x));this._plane=O.fromPointNormal(n,i)}Object.defineProperties(s.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var C=new P;s.fromPoints=function(n,t){p.defined("cartesians",n);let o=P.fromPoints(n,C);return new s(o.center,t)};var w=new j,h=new e;s.prototype.projectPointOntoPlane=function(n,t){p.defined("cartesian",n);let o=w;o.origin=n,e.normalize(n,o.direction);let i=d.rayPlane(o,this._plane,h);if(r(i)||(e.negate(o.direction,o.direction),i=d.rayPlane(o,this._plane,h)),r(i)){let c=e.subtract(i,this._origin,i),a=e.dot(this._xAxis,c),f=e.dot(this._yAxis,c);return r(t)?(t.x=a,t.y=f,t):new l(a,f)}};s.prototype.projectPointsOntoPlane=function(n,t){p.defined("cartesians",n),r(t)||(t=[]);let o=0,i=n.length;for(let c=0;c<i;c++){let a=this.projectPointOntoPlane(n[c],t[o]);r(a)&&(t[o]=a,o++)}return t.length=o,t};s.prototype.projectPointToNearestOnPlane=function(n,t){p.defined("cartesian",n),r(t)||(t=new l);let o=w;o.origin=n,e.clone(this._plane.normal,o.direction);let i=d.rayPlane(o,this._plane,h);r(i)||(e.negate(o.direction,o.direction),i=d.rayPlane(o,this._plane,h));let c=e.subtract(i,this._origin,i),a=e.dot(this._xAxis,c),f=e.dot(this._yAxis,c);return t.x=a,t.y=f,t};s.prototype.projectPointsToNearestOnPlane=function(n,t){p.defined("cartesians",n),r(t)||(t=[]);let o=n.length;t.length=o;for(let i=0;i<o;i++)t[i]=this.projectPointToNearestOnPlane(n[i],t[i]);return t};var T=new e;s.prototype.projectPointOntoEllipsoid=function(n,t){p.defined("cartesian",n),r(t)||(t=new e);let o=this._ellipsoid,i=this._origin,c=this._xAxis,a=this._yAxis,f=T;return e.multiplyByScalar(c,n.x,f),t=e.add(i,f,t),e.multiplyByScalar(a,n.y,f),e.add(t,f,t),o.scaleToGeocentricSurface(t,t),t};s.prototype.projectPointsOntoEllipsoid=function(n,t){p.defined("cartesians",n);let o=n.length;r(t)?t.length=o:t=new Array(o);for(let i=0;i<o;++i)t[i]=this.projectPointOntoEllipsoid(n[i],t[i]);return t};var M=s;export{M as a}; diff --git a/cesium/Workers/chunk-KRKI6AAO.js b/cesium/Workers/chunk-KRKI6AAO.js new file mode 100644 index 0000000..79c84db --- /dev/null +++ b/cesium/Workers/chunk-KRKI6AAO.js @@ -0,0 +1,26 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.119 + * + * Copyright 2011-2022 Cesium Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Columbus View (Pat. Pend.) + * + * Portions licensed separately. + * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. + */ + +import{a as tt}from"./chunk-BMHPVZ4H.js";import{a as At}from"./chunk-EFZKO5RU.js";import{a as yt}from"./chunk-QB3MDM4J.js";import{a as G}from"./chunk-ILGBPNP6.js";import{a as z}from"./chunk-HEEMUCG6.js";import{a as at}from"./chunk-P37AI2DW.js";import{a as ht}from"./chunk-T6BE4RZK.js";import{b as mt,c as st,d as S}from"./chunk-X5IHHI6X.js";import{a as dt,d as rt}from"./chunk-TMSETF7M.js";import{f as it,h as bt}from"./chunk-7Z5IIKOJ.js";import{a as F}from"./chunk-KZNJOCYU.js";import{a,b as _t,c as W,d as v,e as R}from"./chunk-POASMU2N.js";import{a as I}from"./chunk-R6KGAEF6.js";import{a as T}from"./chunk-IUA6FAOZ.js";import{a as nt,b as H}from"./chunk-UH2WFNTA.js";import{e as K}from"./chunk-PEYJTJPE.js";var et=new a,pt=new a,xt=new a,wt=new a,w=new W,Mt=new R,Vt=new R,gt=new it,Tt=new a,Nt=new a,Et=new a,lt=new _t,Pt=new a,Ft=new W,St=new W;function Ot(o,e,t){let n=e.vertexFormat,s=e.center,i=e.semiMajorAxis,r=e.semiMinorAxis,f=e.ellipsoid,h=e.stRotation,E=t?o.length/3*2:o.length/3,g=e.shadowVolume,c=n.st?new Float32Array(E*2):void 0,l=n.normal?new Float32Array(E*3):void 0,A=n.tangent?new Float32Array(E*3):void 0,x=n.bitangent?new Float32Array(E*3):void 0,O=g?new Float32Array(E*3):void 0,B=0,b=Tt,M=Nt,d=Et,_=new dt(f),L=_.project(f.cartesianToCartographic(s,lt),Pt),J=f.scaleToGeodeticSurface(s,et);f.geodeticSurfaceNormal(J,J);let Z=Mt,q=Vt;if(h!==0){let m=it.fromAxisAngle(J,h,gt);Z=R.fromQuaternion(m,Z),m=it.fromAxisAngle(J,-h,gt),q=R.fromQuaternion(m,q)}else Z=R.clone(R.IDENTITY,Z),q=R.clone(R.IDENTITY,q);let k=W.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ft),Q=W.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,St),j=o.length,y=t?j:0,p=y/3*2;for(let m=0;m<j;m+=3){let u=m+1,N=m+2,D=a.fromArray(o,m,et);if(n.st){let P=R.multiplyByVector(Z,D,pt),C=_.project(f.cartesianToCartographic(P,lt),xt);a.subtract(C,L,C),w.x=(C.x+i)/(2*i),w.y=(C.y+r)/(2*r),k.x=Math.min(w.x,k.x),k.y=Math.min(w.y,k.y),Q.x=Math.max(w.x,Q.x),Q.y=Math.max(w.y,Q.y),t&&(c[B+p]=w.x,c[B+1+p]=w.y),c[B++]=w.x,c[B++]=w.y}(n.normal||n.tangent||n.bitangent||g)&&(b=f.geodeticSurfaceNormal(D,b),g&&(O[m+y]=-b.x,O[u+y]=-b.y,O[N+y]=-b.z),(n.normal||n.tangent||n.bitangent)&&((n.tangent||n.bitangent)&&(M=a.normalize(a.cross(a.UNIT_Z,b,M),M),R.multiplyByVector(q,M,M)),n.normal&&(l[m]=b.x,l[u]=b.y,l[N]=b.z,t&&(l[m+y]=-b.x,l[u+y]=-b.y,l[N+y]=-b.z)),n.tangent&&(A[m]=M.x,A[u]=M.y,A[N]=M.z,t&&(A[m+y]=-M.x,A[u+y]=-M.y,A[N+y]=-M.z)),n.bitangent&&(d=a.normalize(a.cross(b,M,d),d),x[m]=d.x,x[u]=d.y,x[N]=d.z,t&&(x[m+y]=d.x,x[u+y]=d.y,x[N+y]=d.z))))}if(n.st){j=c.length;for(let m=0;m<j;m+=2)c[m]=(c[m]-k.x)/(Q.x-k.x),c[m+1]=(c[m+1]-k.y)/(Q.y-k.y)}let V=new ht;if(n.position){let m=tt.raisePositionsToHeight(o,e,t);V.position=new S({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:m})}if(n.st&&(V.st=new S({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:c})),n.normal&&(V.normal=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:l})),n.tangent&&(V.tangent=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:A})),n.bitangent&&(V.bitangent=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:x})),g&&(V.extrudeDirection=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:O})),t&&K(e.offsetAttribute)){let m=new Uint8Array(E);if(e.offsetAttribute===G.TOP)m=m.fill(1,0,E/2);else{let u=e.offsetAttribute===G.NONE?0:1;m=m.fill(u)}V.applyOffset=new S({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return V}function jt(o){let e=new Array(12*(o*(o+1))-6),t=0,n,s,i,r,f;for(n=0,i=1,r=0;r<3;r++)e[t++]=i++,e[t++]=n,e[t++]=i;for(r=2;r<o+1;++r){for(i=r*(r+1)-1,n=(r-1)*r-1,e[t++]=i++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;e[t++]=i++,e[t++]=n,e[t++]=i}for(s=o*2,++i,++n,r=0;r<s-1;++r)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;for(e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n++,e[t++]=n,++n,r=o-1;r>1;--r){for(e[t++]=n++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;e[t++]=n++,e[t++]=n++,e[t++]=i++}for(r=0;r<3;r++)e[t++]=n++,e[t++]=n,e[t++]=i;return e}var X=new a;function Dt(o){let e=o.center;X=a.multiplyByScalar(o.ellipsoid.geodeticSurfaceNormal(e,X),o.height,X),X=a.add(e,X,X);let t=new rt(X,o.semiMajorAxis),n=tt.computeEllipsePositions(o,!0,!1),s=n.positions,i=n.numPts,r=Ot(s,o,!1),f=jt(i);return f=at.createTypedArray(s.length/3,f),{boundingSphere:t,attributes:r,indices:f}}function vt(o,e){let t=e.vertexFormat,n=e.center,s=e.semiMajorAxis,i=e.semiMinorAxis,r=e.ellipsoid,f=e.height,h=e.extrudedHeight,E=e.stRotation,g=o.length/3*2,c=new Float64Array(g*3),l=t.st?new Float32Array(g*2):void 0,A=t.normal?new Float32Array(g*3):void 0,x=t.tangent?new Float32Array(g*3):void 0,O=t.bitangent?new Float32Array(g*3):void 0,B=e.shadowVolume,b=B?new Float32Array(g*3):void 0,M=0,d=Tt,_=Nt,L=Et,J=new dt(r),Z=J.project(r.cartesianToCartographic(n,lt),Pt),q=r.scaleToGeodeticSurface(n,et);r.geodeticSurfaceNormal(q,q);let k=it.fromAxisAngle(q,E,gt),Q=R.fromQuaternion(k,Mt),j=W.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ft),y=W.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,St),p=o.length,V=p/3*2;for(let u=0;u<p;u+=3){let N=u+1,D=u+2,P=a.fromArray(o,u,et),C;if(t.st){let ot=R.multiplyByVector(Q,P,pt),$=J.project(r.cartesianToCartographic(ot,lt),xt);a.subtract($,Z,$),w.x=($.x+s)/(2*s),w.y=($.y+i)/(2*i),j.x=Math.min(w.x,j.x),j.y=Math.min(w.y,j.y),y.x=Math.max(w.x,y.x),y.y=Math.max(w.y,y.y),l[M+V]=w.x,l[M+1+V]=w.y,l[M++]=w.x,l[M++]=w.y}P=r.scaleToGeodeticSurface(P,P),C=a.clone(P,pt),d=r.geodeticSurfaceNormal(P,d),B&&(b[u+p]=-d.x,b[N+p]=-d.y,b[D+p]=-d.z);let ct=a.multiplyByScalar(d,f,wt);if(P=a.add(P,ct,P),ct=a.multiplyByScalar(d,h,ct),C=a.add(C,ct,C),t.position&&(c[u+p]=C.x,c[N+p]=C.y,c[D+p]=C.z,c[u]=P.x,c[N]=P.y,c[D]=P.z),t.normal||t.tangent||t.bitangent){L=a.clone(d,L);let ot=a.fromArray(o,(u+3)%p,wt);a.subtract(ot,P,ot);let $=a.subtract(C,P,xt);d=a.normalize(a.cross($,ot,d),d),t.normal&&(A[u]=d.x,A[N]=d.y,A[D]=d.z,A[u+p]=d.x,A[N+p]=d.y,A[D+p]=d.z),t.tangent&&(_=a.normalize(a.cross(L,d,_),_),x[u]=_.x,x[N]=_.y,x[D]=_.z,x[u+p]=_.x,x[u+1+p]=_.y,x[u+2+p]=_.z),t.bitangent&&(O[u]=L.x,O[N]=L.y,O[D]=L.z,O[u+p]=L.x,O[N+p]=L.y,O[D+p]=L.z)}}if(t.st){p=l.length;for(let u=0;u<p;u+=2)l[u]=(l[u]-j.x)/(y.x-j.x),l[u+1]=(l[u+1]-j.y)/(y.y-j.y)}let m=new ht;if(t.position&&(m.position=new S({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:c})),t.st&&(m.st=new S({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:l})),t.normal&&(m.normal=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(m.tangent=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:x})),t.bitangent&&(m.bitangent=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:O})),B&&(m.extrudeDirection=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:b})),K(e.offsetAttribute)){let u=new Uint8Array(g);if(e.offsetAttribute===G.TOP)u=u.fill(1,0,g/2);else{let N=e.offsetAttribute===G.NONE?0:1;u=u.fill(N)}m.applyOffset=new S({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return m}function zt(o){let e=o.length/3,t=at.createTypedArray(e,e*6),n=0;for(let s=0;s<e;s++){let i=s,r=s+e,f=(i+1)%e,h=f+e;t[n++]=i,t[n++]=r,t[n++]=f,t[n++]=f,t[n++]=r,t[n++]=h}return t}var ut=new rt,ft=new rt;function Bt(o){let e=o.center,t=o.ellipsoid,n=o.semiMajorAxis,s=a.multiplyByScalar(t.geodeticSurfaceNormal(e,et),o.height,et);ut.center=a.add(e,s,ut.center),ut.radius=n,s=a.multiplyByScalar(t.geodeticSurfaceNormal(e,s),o.extrudedHeight,s),ft.center=a.add(e,s,ft.center),ft.radius=n;let i=tt.computeEllipsePositions(o,!0,!0),r=i.positions,f=i.numPts,h=i.outerPositions,E=rt.union(ut,ft),g=Ot(r,o,!0),c=jt(f),l=c.length;c.length=l*2;let A=r.length/3;for(let _=0;_<l;_+=3)c[_+l]=c[_+2]+A,c[_+1+l]=c[_+1]+A,c[_+2+l]=c[_]+A;let x=at.createTypedArray(A*2/3,c),O=new st({attributes:g,indices:x,primitiveType:mt.TRIANGLES}),B=vt(h,o);c=zt(h);let b=at.createTypedArray(h.length*2/3,c),M=new st({attributes:B,indices:b,primitiveType:mt.TRIANGLES}),d=yt.combineInstances([new At({geometry:O}),new At({geometry:M})]);return{boundingSphere:E,attributes:d[0].attributes,indices:d[0].indices}}function Ct(o,e,t,n,s,i,r){let h=tt.computeEllipsePositions({center:o,semiMajorAxis:e,semiMinorAxis:t,rotation:n,granularity:s},!1,!0).outerPositions,E=h.length/3,g=new Array(E);for(let l=0;l<E;++l)g[l]=a.fromArray(h,l*3);let c=bt.fromCartesianArray(g,i,r);return c.width>I.PI&&(c.north=c.north>0?I.PI_OVER_TWO-I.EPSILON7:c.north,c.south=c.south<0?I.EPSILON7-I.PI_OVER_TWO:c.south,c.east=I.PI,c.west=-I.PI),c}function U(o){o=T(o,T.EMPTY_OBJECT);let e=o.center,t=T(o.ellipsoid,v.default),n=o.semiMajorAxis,s=o.semiMinorAxis,i=T(o.granularity,I.RADIANS_PER_DEGREE),r=T(o.vertexFormat,z.DEFAULT);if(H.defined("options.center",e),H.typeOf.number("options.semiMajorAxis",n),H.typeOf.number("options.semiMinorAxis",s),n<s)throw new nt("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(i<=0)throw new nt("granularity must be greater than zero.");let f=T(o.height,0),h=T(o.extrudedHeight,f);this._center=a.clone(e),this._semiMajorAxis=n,this._semiMinorAxis=s,this._ellipsoid=v.clone(t),this._rotation=T(o.rotation,0),this._stRotation=T(o.stRotation,0),this._height=Math.max(h,f),this._granularity=i,this._vertexFormat=z.clone(r),this._extrudedHeight=Math.min(h,f),this._shadowVolume=T(o.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=o.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}U.packedLength=a.packedLength+v.packedLength+z.packedLength+9;U.pack=function(o,e,t){return H.defined("value",o),H.defined("array",e),t=T(t,0),a.pack(o._center,e,t),t+=a.packedLength,v.pack(o._ellipsoid,e,t),t+=v.packedLength,z.pack(o._vertexFormat,e,t),t+=z.packedLength,e[t++]=o._semiMajorAxis,e[t++]=o._semiMinorAxis,e[t++]=o._rotation,e[t++]=o._stRotation,e[t++]=o._height,e[t++]=o._granularity,e[t++]=o._extrudedHeight,e[t++]=o._shadowVolume?1:0,e[t]=T(o._offsetAttribute,-1),e};var Rt=new a,It=new v,Lt=new z,Y={center:Rt,ellipsoid:It,vertexFormat:Lt,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};U.unpack=function(o,e,t){H.defined("array",o),e=T(e,0);let n=a.unpack(o,e,Rt);e+=a.packedLength;let s=v.unpack(o,e,It);e+=v.packedLength;let i=z.unpack(o,e,Lt);e+=z.packedLength;let r=o[e++],f=o[e++],h=o[e++],E=o[e++],g=o[e++],c=o[e++],l=o[e++],A=o[e++]===1,x=o[e];return K(t)?(t._center=a.clone(n,t._center),t._ellipsoid=v.clone(s,t._ellipsoid),t._vertexFormat=z.clone(i,t._vertexFormat),t._semiMajorAxis=r,t._semiMinorAxis=f,t._rotation=h,t._stRotation=E,t._height=g,t._granularity=c,t._extrudedHeight=l,t._shadowVolume=A,t._offsetAttribute=x===-1?void 0:x,t):(Y.height=g,Y.extrudedHeight=l,Y.granularity=c,Y.stRotation=E,Y.rotation=h,Y.semiMajorAxis=r,Y.semiMinorAxis=f,Y.shadowVolume=A,Y.offsetAttribute=x===-1?void 0:x,new U(Y))};U.computeRectangle=function(o,e){o=T(o,T.EMPTY_OBJECT);let t=o.center,n=T(o.ellipsoid,v.default),s=o.semiMajorAxis,i=o.semiMinorAxis,r=T(o.granularity,I.RADIANS_PER_DEGREE),f=T(o.rotation,0);if(H.defined("options.center",t),H.typeOf.number("options.semiMajorAxis",s),H.typeOf.number("options.semiMinorAxis",i),s<i)throw new nt("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new nt("granularity must be greater than zero.");return Ct(t,s,i,f,r,n,e)};U.createGeometry=function(o){if(o._semiMajorAxis<=0||o._semiMinorAxis<=0)return;let e=o._height,t=o._extrudedHeight,n=!I.equalsEpsilon(e,t,0,I.EPSILON2);o._center=o._ellipsoid.scaleToGeodeticSurface(o._center,o._center);let s={center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,ellipsoid:o._ellipsoid,rotation:o._rotation,height:e,granularity:o._granularity,vertexFormat:o._vertexFormat,stRotation:o._stRotation},i;if(n)s.extrudedHeight=t,s.shadowVolume=o._shadowVolume,s.offsetAttribute=o._offsetAttribute,i=Bt(s);else if(i=Dt(s),K(o._offsetAttribute)){let r=i.attributes.position.values.length,f=o._offsetAttribute===G.NONE?0:1,h=new Uint8Array(r/3).fill(f);i.attributes.applyOffset=new S({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new st({attributes:i.attributes,indices:i.indices,primitiveType:mt.TRIANGLES,boundingSphere:i.boundingSphere,offsetAttribute:o._offsetAttribute})};U.createShadowVolume=function(o,e,t){let n=o._granularity,s=o._ellipsoid,i=e(n,s),r=t(n,s);return new U({center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,ellipsoid:s,rotation:o._rotation,stRotation:o._stRotation,granularity:n,extrudedHeight:i,height:r,vertexFormat:z.POSITION_ONLY,shadowVolume:!0})};function kt(o){let e=-o._stRotation;if(e===0)return[0,0,0,1,1,0];let n=tt.computeEllipsePositions({center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,rotation:o._rotation,granularity:o._granularity},!1,!0).outerPositions,s=n.length/3,i=new Array(s);for(let h=0;h<s;++h)i[h]=a.fromArray(n,h*3);let r=o._ellipsoid,f=o.rectangle;return st._textureCoordinateRotationPoints(i,e,r,f)}Object.defineProperties(U.prototype,{rectangle:{get:function(){return K(this._rectangle)||(this._rectangle=Ct(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return K(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=kt(this)),this._textureCoordinateRotationPoints}}});var de=U;export{de as a}; diff --git a/cesium/Workers/chunk-77ESX6BV.js b/cesium/Workers/chunk-KZNJOCYU.js similarity index 94% rename from cesium/Workers/chunk-77ESX6BV.js rename to cesium/Workers/chunk-KZNJOCYU.js index 7e906d1..baf44a4 100644 --- a/cesium/Workers/chunk-77ESX6BV.js +++ b/cesium/Workers/chunk-KZNJOCYU.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as N}from"./chunk-JZYZ7RT4.js";import{a as i}from"./chunk-42NIXFVW.js";import{a}from"./chunk-5YVCOCPP.js";import{e as T}from"./chunk-U73D6PDD.js";var r={BYTE:N.BYTE,UNSIGNED_BYTE:N.UNSIGNED_BYTE,SHORT:N.SHORT,UNSIGNED_SHORT:N.UNSIGNED_SHORT,INT:N.INT,UNSIGNED_INT:N.UNSIGNED_INT,FLOAT:N.FLOAT,DOUBLE:N.DOUBLE};r.getSizeInBytes=function(n){if(!T(n))throw new a("value is required.");switch(n){case r.BYTE:return Int8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.SHORT:return Int16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.INT:return Int32Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case r.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case r.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new a("componentDatatype is not a valid value.")}};r.fromTypedArray=function(n){if(n instanceof Int8Array)return r.BYTE;if(n instanceof Uint8Array)return r.UNSIGNED_BYTE;if(n instanceof Int16Array)return r.SHORT;if(n instanceof Uint16Array)return r.UNSIGNED_SHORT;if(n instanceof Int32Array)return r.INT;if(n instanceof Uint32Array)return r.UNSIGNED_INT;if(n instanceof Float32Array)return r.FLOAT;if(n instanceof Float64Array)return r.DOUBLE;throw new a("array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array.")};r.validate=function(n){return T(n)&&(n===r.BYTE||n===r.UNSIGNED_BYTE||n===r.SHORT||n===r.UNSIGNED_SHORT||n===r.INT||n===r.UNSIGNED_INT||n===r.FLOAT||n===r.DOUBLE)};r.createTypedArray=function(n,e){if(!T(n))throw new a("componentDatatype is required.");if(!T(e))throw new a("valuesOrLength is required.");switch(n){case r.BYTE:return new Int8Array(e);case r.UNSIGNED_BYTE:return new Uint8Array(e);case r.SHORT:return new Int16Array(e);case r.UNSIGNED_SHORT:return new Uint16Array(e);case r.INT:return new Int32Array(e);case r.UNSIGNED_INT:return new Uint32Array(e);case r.FLOAT:return new Float32Array(e);case r.DOUBLE:return new Float64Array(e);default:throw new a("componentDatatype is not a valid value.")}};r.createArrayBufferView=function(n,e,E,t){if(!T(n))throw new a("componentDatatype is required.");if(!T(e))throw new a("buffer is required.");switch(E=i(E,0),t=i(t,(e.byteLength-E)/r.getSizeInBytes(n)),n){case r.BYTE:return new Int8Array(e,E,t);case r.UNSIGNED_BYTE:return new Uint8Array(e,E,t);case r.SHORT:return new Int16Array(e,E,t);case r.UNSIGNED_SHORT:return new Uint16Array(e,E,t);case r.INT:return new Int32Array(e,E,t);case r.UNSIGNED_INT:return new Uint32Array(e,E,t);case r.FLOAT:return new Float32Array(e,E,t);case r.DOUBLE:return new Float64Array(e,E,t);default:throw new a("componentDatatype is not a valid value.")}};r.fromName=function(n){switch(n){case"BYTE":return r.BYTE;case"UNSIGNED_BYTE":return r.UNSIGNED_BYTE;case"SHORT":return r.SHORT;case"UNSIGNED_SHORT":return r.UNSIGNED_SHORT;case"INT":return r.INT;case"UNSIGNED_INT":return r.UNSIGNED_INT;case"FLOAT":return r.FLOAT;case"DOUBLE":return r.DOUBLE;default:throw new a("name is not a valid value.")}};var U=Object.freeze(r);export{U as a}; +import{a as N}from"./chunk-3C7WC463.js";import{a as i}from"./chunk-IUA6FAOZ.js";import{a}from"./chunk-UH2WFNTA.js";import{e as T}from"./chunk-PEYJTJPE.js";var r={BYTE:N.BYTE,UNSIGNED_BYTE:N.UNSIGNED_BYTE,SHORT:N.SHORT,UNSIGNED_SHORT:N.UNSIGNED_SHORT,INT:N.INT,UNSIGNED_INT:N.UNSIGNED_INT,FLOAT:N.FLOAT,DOUBLE:N.DOUBLE};r.getSizeInBytes=function(n){if(!T(n))throw new a("value is required.");switch(n){case r.BYTE:return Int8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.SHORT:return Int16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.INT:return Int32Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case r.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case r.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new a("componentDatatype is not a valid value.")}};r.fromTypedArray=function(n){if(n instanceof Int8Array)return r.BYTE;if(n instanceof Uint8Array)return r.UNSIGNED_BYTE;if(n instanceof Int16Array)return r.SHORT;if(n instanceof Uint16Array)return r.UNSIGNED_SHORT;if(n instanceof Int32Array)return r.INT;if(n instanceof Uint32Array)return r.UNSIGNED_INT;if(n instanceof Float32Array)return r.FLOAT;if(n instanceof Float64Array)return r.DOUBLE;throw new a("array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array.")};r.validate=function(n){return T(n)&&(n===r.BYTE||n===r.UNSIGNED_BYTE||n===r.SHORT||n===r.UNSIGNED_SHORT||n===r.INT||n===r.UNSIGNED_INT||n===r.FLOAT||n===r.DOUBLE)};r.createTypedArray=function(n,e){if(!T(n))throw new a("componentDatatype is required.");if(!T(e))throw new a("valuesOrLength is required.");switch(n){case r.BYTE:return new Int8Array(e);case r.UNSIGNED_BYTE:return new Uint8Array(e);case r.SHORT:return new Int16Array(e);case r.UNSIGNED_SHORT:return new Uint16Array(e);case r.INT:return new Int32Array(e);case r.UNSIGNED_INT:return new Uint32Array(e);case r.FLOAT:return new Float32Array(e);case r.DOUBLE:return new Float64Array(e);default:throw new a("componentDatatype is not a valid value.")}};r.createArrayBufferView=function(n,e,E,t){if(!T(n))throw new a("componentDatatype is required.");if(!T(e))throw new a("buffer is required.");switch(E=i(E,0),t=i(t,(e.byteLength-E)/r.getSizeInBytes(n)),n){case r.BYTE:return new Int8Array(e,E,t);case r.UNSIGNED_BYTE:return new Uint8Array(e,E,t);case r.SHORT:return new Int16Array(e,E,t);case r.UNSIGNED_SHORT:return new Uint16Array(e,E,t);case r.INT:return new Int32Array(e,E,t);case r.UNSIGNED_INT:return new Uint32Array(e,E,t);case r.FLOAT:return new Float32Array(e,E,t);case r.DOUBLE:return new Float64Array(e,E,t);default:throw new a("componentDatatype is not a valid value.")}};r.fromName=function(n){switch(n){case"BYTE":return r.BYTE;case"UNSIGNED_BYTE":return r.UNSIGNED_BYTE;case"SHORT":return r.SHORT;case"UNSIGNED_SHORT":return r.UNSIGNED_SHORT;case"INT":return r.INT;case"UNSIGNED_INT":return r.UNSIGNED_INT;case"FLOAT":return r.FLOAT;case"DOUBLE":return r.DOUBLE;default:throw new a("name is not a valid value.")}};var U=Object.freeze(r);export{U as a}; diff --git a/cesium/Workers/chunk-LJCGAQ64.js b/cesium/Workers/chunk-LJCGAQ64.js deleted file mode 100644 index 79e171e..0000000 --- a/cesium/Workers/chunk-LJCGAQ64.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 - * - * Copyright 2011-2022 Cesium Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Columbus View (Pat. Pend.) - * - * Portions licensed separately. - * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. - */ - -import{a as O}from"./chunk-JFG572S7.js";import{a as b}from"./chunk-42NIXFVW.js";import{a as g,b as c}from"./chunk-5YVCOCPP.js";import{e as u}from"./chunk-U73D6PDD.js";function f(n,e,o){this.x=b(n,0),this.y=b(e,0),this.z=b(o,0)}f.fromSpherical=function(n,e){c.typeOf.object("spherical",n),u(e)||(e=new f);let o=n.clock,t=n.cone,i=b(n.magnitude,1),p=i*Math.sin(t);return e.x=p*Math.cos(o),e.y=p*Math.sin(o),e.z=i*Math.cos(t),e};f.fromElements=function(n,e,o,t){return u(t)?(t.x=n,t.y=e,t.z=o,t):new f(n,e,o)};f.clone=function(n,e){if(u(n))return u(e)?(e.x=n.x,e.y=n.y,e.z=n.z,e):new f(n.x,n.y,n.z)};f.fromCartesian4=f.clone;f.packedLength=3;f.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=b(o,0),e[o++]=n.x,e[o++]=n.y,e[o]=n.z,e};f.unpack=function(n,e,o){return c.defined("array",n),e=b(e,0),u(o)||(o=new f),o.x=n[e++],o.y=n[e++],o.z=n[e],o};f.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*3;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new g("If result is a typed array, it must have exactly array.length * 3 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)f.pack(n[i],e,i*3);return e};f.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,3),n.length%3!==0)throw new g("array length must be a multiple of 3.");let o=n.length;u(e)?e.length=o/3:e=new Array(o/3);for(let t=0;t<o;t+=3){let i=t/3;e[i]=f.unpack(n,t,e[i])}return e};f.fromArray=f.unpack;f.maximumComponent=function(n){return c.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z)};f.minimumComponent=function(n){return c.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z)};f.minimumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o.z=Math.min(n.z,e.z),o};f.maximumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o.z=Math.max(n.z,e.z),o};f.clamp=function(n,e,o,t){c.typeOf.object("value",n),c.typeOf.object("min",e),c.typeOf.object("max",o),c.typeOf.object("result",t);let i=O.clamp(n.x,e.x,o.x),p=O.clamp(n.y,e.y,o.y),y=O.clamp(n.z,e.z,o.z);return t.x=i,t.y=p,t.z=y,t};f.magnitudeSquared=function(n){return c.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z};f.magnitude=function(n){return Math.sqrt(f.magnitudeSquared(n))};var Y=new f;f.distance=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),f.subtract(n,e,Y),f.magnitude(Y)};f.distanceSquared=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),f.subtract(n,e,Y),f.magnitudeSquared(Y)};f.normalize=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=f.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,e.z=n.z/o,isNaN(e.x)||isNaN(e.y)||isNaN(e.z))throw new g("normalized result is not a number");return e};f.dot=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.x+n.y*e.y+n.z*e.z};f.multiplyComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o.z=n.z*e.z,o};f.divideComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o.z=n.z/e.z,o};f.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o.z=n.z+e.z,o};f.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o.z=n.z-e.z,o};f.multiplyByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o.z=n.z*e,o};f.divideByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o.z=n.z/e,o};f.negate=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e.z=-n.z,e};f.abs=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e.z=Math.abs(n.z),e};var _n=new f;f.lerp=function(n,e,o,t){return c.typeOf.object("start",n),c.typeOf.object("end",e),c.typeOf.number("t",o),c.typeOf.object("result",t),f.multiplyByScalar(e,o,_n),t=f.multiplyByScalar(n,1-o,t),f.add(_n,t,t)};var X=new f,yn=new f;f.angleBetween=function(n,e){c.typeOf.object("left",n),c.typeOf.object("right",e),f.normalize(n,X),f.normalize(e,yn);let o=f.dot(X,yn),t=f.magnitude(f.cross(X,yn,X));return Math.atan2(t,o)};var Xn=new f;f.mostOrthogonalAxis=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=f.normalize(n,Xn);return f.abs(o,o),o.x<=o.y?o.x<=o.z?e=f.clone(f.UNIT_X,e):e=f.clone(f.UNIT_Z,e):o.y<=o.z?e=f.clone(f.UNIT_Y,e):e=f.clone(f.UNIT_Z,e),e};f.projectVector=function(n,e,o){c.defined("a",n),c.defined("b",e),c.defined("result",o);let t=f.dot(n,e)/f.dot(e,e);return f.multiplyByScalar(e,t,o)};f.equals=function(n,e){return n===e||u(n)&&u(e)&&n.x===e.x&&n.y===e.y&&n.z===e.z};f.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]&&n.z===e[o+2]};f.equalsEpsilon=function(n,e,o,t){return n===e||u(n)&&u(e)&&O.equalsEpsilon(n.x,e.x,o,t)&&O.equalsEpsilon(n.y,e.y,o,t)&&O.equalsEpsilon(n.z,e.z,o,t)};f.cross=function(n,e,o){c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o);let t=n.x,i=n.y,p=n.z,y=e.x,m=e.y,s=e.z,h=i*s-p*m,j=p*y-t*s,S=t*m-i*y;return o.x=h,o.y=j,o.z=S,o};f.midpoint=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=(n.x+e.x)*.5,o.y=(n.y+e.y)*.5,o.z=(n.z+e.z)*.5,o};f.fromDegrees=function(n,e,o,t,i){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),n=O.toRadians(n),e=O.toRadians(e),f.fromRadians(n,e,o,t,i)};var T=new f,$=new f,Yn=new f(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);f.fromRadians=function(n,e,o,t,i){c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),o=b(o,0);let p=u(t)?t.radiiSquared:Yn,y=Math.cos(e);T.x=y*Math.cos(n),T.y=y*Math.sin(n),T.z=Math.sin(e),T=f.normalize(T,T),f.multiplyComponents(p,T,$);let m=Math.sqrt(f.dot(T,$));return $=f.divideByScalar($,m,$),T=f.multiplyByScalar(T,o,T),u(i)||(i=new f),f.add($,T,i)};f.fromDegreesArray=function(n,e,o){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new g("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;u(o)?o.length=t/2:o=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],y=n[i+1],m=i/2;o[m]=f.fromDegrees(p,y,0,e,o[m])}return o};f.fromRadiansArray=function(n,e,o){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new g("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;u(o)?o.length=t/2:o=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],y=n[i+1],m=i/2;o[m]=f.fromRadians(p,y,0,e,o[m])}return o};f.fromDegreesArrayHeights=function(n,e,o){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new g("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;u(o)?o.length=t/3:o=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],y=n[i+1],m=n[i+2],s=i/3;o[s]=f.fromDegrees(p,y,m,e,o[s])}return o};f.fromRadiansArrayHeights=function(n,e,o){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new g("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;u(o)?o.length=t/3:o=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],y=n[i+1],m=n[i+2],s=i/3;o[s]=f.fromRadians(p,y,m,e,o[s])}return o};f.ZERO=Object.freeze(new f(0,0,0));f.ONE=Object.freeze(new f(1,1,1));f.UNIT_X=Object.freeze(new f(1,0,0));f.UNIT_Y=Object.freeze(new f(0,1,0));f.UNIT_Z=Object.freeze(new f(0,0,1));f.prototype.clone=function(n){return f.clone(this,n)};f.prototype.equals=function(n){return f.equals(this,n)};f.prototype.equalsEpsilon=function(n,e,o){return f.equalsEpsilon(this,n,e,o)};f.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var d=f;var Gn=new d,Hn=new d;function Qn(n,e,o,t,i){if(!u(n))throw new g("cartesian is required.");if(!u(e))throw new g("oneOverRadii is required.");if(!u(o))throw new g("oneOverRadiiSquared is required.");if(!u(t))throw new g("centerToleranceSquared is required.");let p=n.x,y=n.y,m=n.z,s=e.x,h=e.y,j=e.z,S=p*p*s*s,R=y*y*h*h,E=m*m*j*j,N=S+R+E,C=Math.sqrt(1/N),x=d.multiplyByScalar(n,C,Gn);if(N<t)return isFinite(C)?d.clone(x,i):void 0;let U=o.x,I=o.y,P=o.z,k=Hn;k.x=x.x*U*2,k.y=x.y*I*2,k.z=x.z*P*2;let Z=(1-C)*d.magnitude(n)/(.5*d.magnitude(k)),Rn=0,rn,Mn,L,V,W,pn,un,an,En,An,qn;do{Z-=Rn,L=1/(1+Z*U),V=1/(1+Z*I),W=1/(1+Z*P),pn=L*L,un=V*V,an=W*W,En=pn*L,An=un*V,qn=an*W,rn=S*pn+R*un+E*an-1,Mn=S*En*U+R*An*I+E*qn*P;let Zn=-2*Mn;Rn=rn/Zn}while(Math.abs(rn)>O.EPSILON12);return u(i)?(i.x=p*L,i.y=y*V,i.z=m*W,i):new d(p*L,y*V,m*W)}var G=Qn;function M(n,e,o){this.longitude=b(n,0),this.latitude=b(e,0),this.height=b(o,0)}M.fromRadians=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),o=b(o,0),u(t)?(t.longitude=n,t.latitude=e,t.height=o,t):new M(n,e,o)};M.fromDegrees=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),n=O.toRadians(n),e=O.toRadians(e),M.fromRadians(n,e,o,t)};var Kn=new d,Jn=new d,ne=new d,ee=new d(1/6378137,1/6378137,1/6356752314245179e-9),oe=new d(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9)),te=O.EPSILON1;M.fromCartesian=function(n,e,o){let t=u(e)?e.oneOverRadii:ee,i=u(e)?e.oneOverRadiiSquared:oe,p=u(e)?e._centerToleranceSquared:te,y=G(n,t,i,p,Jn);if(!u(y))return;let m=d.multiplyComponents(y,i,Kn);m=d.normalize(m,m);let s=d.subtract(n,y,ne),h=Math.atan2(m.y,m.x),j=Math.asin(m.z),S=O.sign(d.dot(s,n))*d.magnitude(s);return u(o)?(o.longitude=h,o.latitude=j,o.height=S,o):new M(h,j,S)};M.toCartesian=function(n,e,o){return c.defined("cartographic",n),d.fromRadians(n.longitude,n.latitude,n.height,e,o)};M.clone=function(n,e){if(u(n))return u(e)?(e.longitude=n.longitude,e.latitude=n.latitude,e.height=n.height,e):new M(n.longitude,n.latitude,n.height)};M.equals=function(n,e){return n===e||u(n)&&u(e)&&n.longitude===e.longitude&&n.latitude===e.latitude&&n.height===e.height};M.equalsEpsilon=function(n,e,o){return o=b(o,0),n===e||u(n)&&u(e)&&Math.abs(n.longitude-e.longitude)<=o&&Math.abs(n.latitude-e.latitude)<=o&&Math.abs(n.height-e.height)<=o};M.ZERO=Object.freeze(new M(0,0,0));M.prototype.clone=function(n){return M.clone(this,n)};M.prototype.equals=function(n){return M.equals(this,n)};M.prototype.equalsEpsilon=function(n,e){return M.equalsEpsilon(this,n,e)};M.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var Cn=M;function a(n,e){this.x=b(n,0),this.y=b(e,0)}a.fromElements=function(n,e,o){return u(o)?(o.x=n,o.y=e,o):new a(n,e)};a.clone=function(n,e){if(u(n))return u(e)?(e.x=n.x,e.y=n.y,e):new a(n.x,n.y)};a.fromCartesian3=a.clone;a.fromCartesian4=a.clone;a.packedLength=2;a.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=b(o,0),e[o++]=n.x,e[o]=n.y,e};a.unpack=function(n,e,o){return c.defined("array",n),e=b(e,0),u(o)||(o=new a),o.x=n[e++],o.y=n[e],o};a.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*2;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new g("If result is a typed array, it must have exactly array.length * 2 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)a.pack(n[i],e,i*2);return e};a.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,2),n.length%2!==0)throw new g("array length must be a multiple of 2.");let o=n.length;u(e)?e.length=o/2:e=new Array(o/2);for(let t=0;t<o;t+=2){let i=t/2;e[i]=a.unpack(n,t,e[i])}return e};a.fromArray=a.unpack;a.maximumComponent=function(n){return c.typeOf.object("cartesian",n),Math.max(n.x,n.y)};a.minimumComponent=function(n){return c.typeOf.object("cartesian",n),Math.min(n.x,n.y)};a.minimumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o};a.maximumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o};a.clamp=function(n,e,o,t){c.typeOf.object("value",n),c.typeOf.object("min",e),c.typeOf.object("max",o),c.typeOf.object("result",t);let i=O.clamp(n.x,e.x,o.x),p=O.clamp(n.y,e.y,o.y);return t.x=i,t.y=p,t};a.magnitudeSquared=function(n){return c.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y};a.magnitude=function(n){return Math.sqrt(a.magnitudeSquared(n))};var H=new a;a.distance=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.subtract(n,e,H),a.magnitude(H)};a.distanceSquared=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.subtract(n,e,H),a.magnitudeSquared(H)};a.normalize=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=a.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,isNaN(e.x)||isNaN(e.y))throw new g("normalized result is not a number");return e};a.dot=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.x+n.y*e.y};a.cross=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.y-n.y*e.x};a.multiplyComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o};a.divideComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o};a.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o};a.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o};a.multiplyByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o};a.divideByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o};a.negate=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e};a.abs=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e};var Tn=new a;a.lerp=function(n,e,o,t){return c.typeOf.object("start",n),c.typeOf.object("end",e),c.typeOf.number("t",o),c.typeOf.object("result",t),a.multiplyByScalar(e,o,Tn),t=a.multiplyByScalar(n,1-o,t),a.add(Tn,t,t)};var ln=new a,Nn=new a;a.angleBetween=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.normalize(n,ln),a.normalize(e,Nn),O.acosClamped(a.dot(ln,Nn))};var ce=new a;a.mostOrthogonalAxis=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=a.normalize(n,ce);return a.abs(o,o),o.x<=o.y?e=a.clone(a.UNIT_X,e):e=a.clone(a.UNIT_Y,e),e};a.equals=function(n,e){return n===e||u(n)&&u(e)&&n.x===e.x&&n.y===e.y};a.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]};a.equalsEpsilon=function(n,e,o,t){return n===e||u(n)&&u(e)&&O.equalsEpsilon(n.x,e.x,o,t)&&O.equalsEpsilon(n.y,e.y,o,t)};a.ZERO=Object.freeze(new a(0,0));a.ONE=Object.freeze(new a(1,1));a.UNIT_X=Object.freeze(new a(1,0));a.UNIT_Y=Object.freeze(new a(0,1));a.prototype.clone=function(n){return a.clone(this,n)};a.prototype.equals=function(n){return a.equals(this,n)};a.prototype.equalsEpsilon=function(n,e,o){return a.equalsEpsilon(this,n,e,o)};a.prototype.toString=function(){return`(${this.x}, ${this.y})`};var dn=a;function Fn(n,e,o,t){e=b(e,0),o=b(o,0),t=b(t,0),c.typeOf.number.greaterThanOrEquals("x",e,0),c.typeOf.number.greaterThanOrEquals("y",o,0),c.typeOf.number.greaterThanOrEquals("z",t,0),n._radii=new d(e,o,t),n._radiiSquared=new d(e*e,o*o,t*t),n._radiiToTheFourth=new d(e*e*e*e,o*o*o*o,t*t*t*t),n._oneOverRadii=new d(e===0?0:1/e,o===0?0:1/o,t===0?0:1/t),n._oneOverRadiiSquared=new d(e===0?0:1/(e*e),o===0?0:1/(o*o),t===0?0:1/(t*t)),n._minimumRadius=Math.min(e,o,t),n._maximumRadius=Math.max(e,o,t),n._centerToleranceSquared=O.EPSILON1,n._radiiSquared.z!==0&&(n._squaredXOverSquaredZ=n._radiiSquared.x/n._radiiSquared.z)}function w(n,e,o){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,Fn(this,n,e,o)}Object.defineProperties(w.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});w.clone=function(n,e){if(!u(n))return;let o=n._radii;return u(e)?(d.clone(o,e._radii),d.clone(n._radiiSquared,e._radiiSquared),d.clone(n._radiiToTheFourth,e._radiiToTheFourth),d.clone(n._oneOverRadii,e._oneOverRadii),d.clone(n._oneOverRadiiSquared,e._oneOverRadiiSquared),e._minimumRadius=n._minimumRadius,e._maximumRadius=n._maximumRadius,e._centerToleranceSquared=n._centerToleranceSquared,e):new w(o.x,o.y,o.z)};w.fromCartesian3=function(n,e){return u(e)||(e=new w),u(n)&&Fn(e,n.x,n.y,n.z),e};w.WGS84=Object.freeze(new w(6378137,6378137,6356752314245179e-9));w.UNIT_SPHERE=Object.freeze(new w(1,1,1));w.MOON=Object.freeze(new w(O.LUNAR_RADIUS,O.LUNAR_RADIUS,O.LUNAR_RADIUS));w.prototype.clone=function(n){return w.clone(this,n)};w.packedLength=d.packedLength;w.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=b(o,0),d.pack(n._radii,e,o),e};w.unpack=function(n,e,o){c.defined("array",n),e=b(e,0);let t=d.unpack(n,e);return w.fromCartesian3(t,o)};w.prototype.geocentricSurfaceNormal=d.normalize;w.prototype.geodeticSurfaceNormalCartographic=function(n,e){c.typeOf.object("cartographic",n);let o=n.longitude,t=n.latitude,i=Math.cos(t),p=i*Math.cos(o),y=i*Math.sin(o),m=Math.sin(t);return u(e)||(e=new d),e.x=p,e.y=y,e.z=m,d.normalize(e,e)};w.prototype.geodeticSurfaceNormal=function(n,e){if(c.typeOf.object("cartesian",n),isNaN(n.x)||isNaN(n.y)||isNaN(n.z))throw new g("cartesian has a NaN component");if(!d.equalsEpsilon(n,d.ZERO,O.EPSILON14))return u(e)||(e=new d),e=d.multiplyComponents(n,this._oneOverRadiiSquared,e),d.normalize(e,e)};var ie=new d,fe=new d;w.prototype.cartographicToCartesian=function(n,e){let o=ie,t=fe;this.geodeticSurfaceNormalCartographic(n,o),d.multiplyComponents(this._radiiSquared,o,t);let i=Math.sqrt(d.dot(o,t));return d.divideByScalar(t,i,t),d.multiplyByScalar(o,n.height,o),u(e)||(e=new d),d.add(t,o,e)};w.prototype.cartographicArrayToCartesianArray=function(n,e){c.defined("cartographics",n);let o=n.length;u(e)?e.length=o:e=new Array(o);for(let t=0;t<o;t++)e[t]=this.cartographicToCartesian(n[t],e[t]);return e};var re=new d,pe=new d,ue=new d;w.prototype.cartesianToCartographic=function(n,e){let o=this.scaleToGeodeticSurface(n,pe);if(!u(o))return;let t=this.geodeticSurfaceNormal(o,re),i=d.subtract(n,o,ue),p=Math.atan2(t.y,t.x),y=Math.asin(t.z),m=O.sign(d.dot(i,n))*d.magnitude(i);return u(e)?(e.longitude=p,e.latitude=y,e.height=m,e):new Cn(p,y,m)};w.prototype.cartesianArrayToCartographicArray=function(n,e){c.defined("cartesians",n);let o=n.length;u(e)?e.length=o:e=new Array(o);for(let t=0;t<o;++t)e[t]=this.cartesianToCartographic(n[t],e[t]);return e};w.prototype.scaleToGeodeticSurface=function(n,e){return G(n,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,e)};w.prototype.scaleToGeocentricSurface=function(n,e){c.typeOf.object("cartesian",n),u(e)||(e=new d);let o=n.x,t=n.y,i=n.z,p=this._oneOverRadiiSquared,y=1/Math.sqrt(o*o*p.x+t*t*p.y+i*i*p.z);return d.multiplyByScalar(n,y,e)};w.prototype.transformPositionToScaledSpace=function(n,e){return u(e)||(e=new d),d.multiplyComponents(n,this._oneOverRadii,e)};w.prototype.transformPositionFromScaledSpace=function(n,e){return u(e)||(e=new d),d.multiplyComponents(n,this._radii,e)};w.prototype.equals=function(n){return this===n||u(n)&&d.equals(this._radii,n._radii)};w.prototype.toString=function(){return this._radii.toString()};w.prototype.getSurfaceNormalIntersectionWithZAxis=function(n,e,o){if(c.typeOf.object("position",n),!O.equalsEpsilon(this._radii.x,this._radii.y,O.EPSILON15))throw new g("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");c.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),e=b(e,0);let t=this._squaredXOverSquaredZ;if(u(o)||(o=new d),o.x=0,o.y=0,o.z=n.z*(1-t),!(Math.abs(o.z)>=this._radii.z-e))return o};var ae=new d;w.prototype.getLocalCurvature=function(n,e){c.typeOf.object("surfacePosition",n),u(e)||(e=new dn);let o=this.getSurfaceNormalIntersectionWithZAxis(n,0,ae),t=d.distance(n,o),i=this.minimumRadius*t/this.maximumRadius**2,p=t*i**2;return dn.fromElements(1/t,1/p,e)};var ye=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],de=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function xn(n,e,o){c.typeOf.number("a",n),c.typeOf.number("b",e),c.typeOf.func("func",o);let t=.5*(e+n),i=.5*(e-n),p=0;for(let y=0;y<5;y++){let m=i*ye[y];p+=de[y]*(o(t+m)+o(t-m))}return p*=i,p}w.prototype.surfaceArea=function(n){c.typeOf.object("rectangle",n);let e=n.west,o=n.east,t=n.south,i=n.north;for(;o<e;)o+=O.TWO_PI;let p=this._radiiSquared,y=p.x,m=p.y,s=p.z,h=y*m;return xn(t,i,function(j){let S=Math.cos(j),R=Math.sin(j);return Math.cos(j)*xn(e,o,function(E){let N=Math.cos(E),C=Math.sin(E);return Math.sqrt(h*R*R+s*(m*N*N+y*C*C)*S*S)})})};var ao=w;function r(n,e,o,t,i,p,y,m,s){this[0]=b(n,0),this[1]=b(t,0),this[2]=b(y,0),this[3]=b(e,0),this[4]=b(i,0),this[5]=b(m,0),this[6]=b(o,0),this[7]=b(p,0),this[8]=b(s,0)}r.packedLength=9;r.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=b(o,0),e[o++]=n[0],e[o++]=n[1],e[o++]=n[2],e[o++]=n[3],e[o++]=n[4],e[o++]=n[5],e[o++]=n[6],e[o++]=n[7],e[o++]=n[8],e};r.unpack=function(n,e,o){return c.defined("array",n),e=b(e,0),u(o)||(o=new r),o[0]=n[e++],o[1]=n[e++],o[2]=n[e++],o[3]=n[e++],o[4]=n[e++],o[5]=n[e++],o[6]=n[e++],o[7]=n[e++],o[8]=n[e++],o};r.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*9;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new g("If result is a typed array, it must have exactly array.length * 9 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)r.pack(n[i],e,i*9);return e};r.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,9),n.length%9!==0)throw new g("array length must be a multiple of 9.");let o=n.length;u(e)?e.length=o/9:e=new Array(o/9);for(let t=0;t<o;t+=9){let i=t/9;e[i]=r.unpack(n,t,e[i])}return e};r.clone=function(n,e){if(u(n))return u(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):new r(n[0],n[3],n[6],n[1],n[4],n[7],n[2],n[5],n[8])};r.fromArray=r.unpack;r.fromColumnMajorArray=function(n,e){return c.defined("values",n),r.clone(n,e)};r.fromRowMajorArray=function(n,e){return c.defined("values",n),u(e)?(e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],e):new r(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])};r.fromQuaternion=function(n,e){c.typeOf.object("quaternion",n);let o=n.x*n.x,t=n.x*n.y,i=n.x*n.z,p=n.x*n.w,y=n.y*n.y,m=n.y*n.z,s=n.y*n.w,h=n.z*n.z,j=n.z*n.w,S=n.w*n.w,R=o-y-h+S,E=2*(t-j),N=2*(i+s),C=2*(t+j),x=-o+y-h+S,U=2*(m-p),I=2*(i-s),P=2*(m+p),k=-o-y+h+S;return u(e)?(e[0]=R,e[1]=C,e[2]=I,e[3]=E,e[4]=x,e[5]=P,e[6]=N,e[7]=U,e[8]=k,e):new r(R,E,N,C,x,U,I,P,k)};r.fromHeadingPitchRoll=function(n,e){c.typeOf.object("headingPitchRoll",n);let o=Math.cos(-n.pitch),t=Math.cos(-n.heading),i=Math.cos(n.roll),p=Math.sin(-n.pitch),y=Math.sin(-n.heading),m=Math.sin(n.roll),s=o*t,h=-i*y+m*p*t,j=m*y+i*p*t,S=o*y,R=i*t+m*p*y,E=-m*t+i*p*y,N=-p,C=m*o,x=i*o;return u(e)?(e[0]=s,e[1]=S,e[2]=N,e[3]=h,e[4]=R,e[5]=C,e[6]=j,e[7]=E,e[8]=x,e):new r(s,h,j,S,R,E,N,C,x)};r.fromScale=function(n,e){return c.typeOf.object("scale",n),u(e)?(e[0]=n.x,e[1]=0,e[2]=0,e[3]=0,e[4]=n.y,e[5]=0,e[6]=0,e[7]=0,e[8]=n.z,e):new r(n.x,0,0,0,n.y,0,0,0,n.z)};r.fromUniformScale=function(n,e){return c.typeOf.number("scale",n),u(e)?(e[0]=n,e[1]=0,e[2]=0,e[3]=0,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=n,e):new r(n,0,0,0,n,0,0,0,n)};r.fromCrossProduct=function(n,e){return c.typeOf.object("vector",n),u(e)?(e[0]=0,e[1]=n.z,e[2]=-n.y,e[3]=-n.z,e[4]=0,e[5]=n.x,e[6]=n.y,e[7]=-n.x,e[8]=0,e):new r(0,-n.z,n.y,n.z,0,-n.x,-n.y,n.x,0)};r.fromRotationX=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=o,e[5]=t,e[6]=0,e[7]=-t,e[8]=o,e):new r(1,0,0,0,o,-t,0,t,o)};r.fromRotationY=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=o,e[1]=0,e[2]=-t,e[3]=0,e[4]=1,e[5]=0,e[6]=t,e[7]=0,e[8]=o,e):new r(o,0,t,0,1,0,-t,0,o)};r.fromRotationZ=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=o,e[1]=t,e[2]=0,e[3]=-t,e[4]=o,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e):new r(o,-t,0,t,o,0,0,0,1)};r.toArray=function(n,e){return c.typeOf.object("matrix",n),u(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8]]};r.getElementIndex=function(n,e){return c.typeOf.number.greaterThanOrEquals("row",e,0),c.typeOf.number.lessThanOrEquals("row",e,2),c.typeOf.number.greaterThanOrEquals("column",n,0),c.typeOf.number.lessThanOrEquals("column",n,2),n*3+e};r.getColumn=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("result",o);let t=e*3,i=n[t],p=n[t+1],y=n[t+2];return o.x=i,o.y=p,o.z=y,o};r.setColumn=function(n,e,o,t){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("cartesian",o),c.typeOf.object("result",t),t=r.clone(n,t);let i=e*3;return t[i]=o.x,t[i+1]=o.y,t[i+2]=o.z,t};r.getRow=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("result",o);let t=n[e],i=n[e+3],p=n[e+6];return o.x=t,o.y=i,o.z=p,o};r.setRow=function(n,e,o,t){return c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("cartesian",o),c.typeOf.object("result",t),t=r.clone(n,t),t[e]=o.x,t[e+3]=o.y,t[e+6]=o.z,t};var me=new d;r.setScale=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("scale",e),c.typeOf.object("result",o);let t=r.getScale(n,me),i=e.x/t.x,p=e.y/t.y,y=e.z/t.z;return o[0]=n[0]*i,o[1]=n[1]*i,o[2]=n[2]*i,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*y,o[7]=n[7]*y,o[8]=n[8]*y,o};var se=new d;r.setUniformScale=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number("scale",e),c.typeOf.object("result",o);let t=r.getScale(n,se),i=e/t.x,p=e/t.y,y=e/t.z;return o[0]=n[0]*i,o[1]=n[1]*i,o[2]=n[2]*i,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*y,o[7]=n[7]*y,o[8]=n[8]*y,o};var mn=new d;r.getScale=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e.x=d.magnitude(d.fromElements(n[0],n[1],n[2],mn)),e.y=d.magnitude(d.fromElements(n[3],n[4],n[5],mn)),e.z=d.magnitude(d.fromElements(n[6],n[7],n[8],mn)),e};var kn=new d;r.getMaximumScale=function(n){return r.getScale(n,kn),d.maximumComponent(kn)};var be=new d;r.setRotation=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("result",o);let t=r.getScale(n,be);return o[0]=e[0]*t.x,o[1]=e[1]*t.x,o[2]=e[2]*t.x,o[3]=e[3]*t.y,o[4]=e[4]*t.y,o[5]=e[5]*t.y,o[6]=e[6]*t.z,o[7]=e[7]*t.z,o[8]=e[8]*t.z,o};var he=new d;r.getRotation=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=r.getScale(n,he);return e[0]=n[0]/o.x,e[1]=n[1]/o.x,e[2]=n[2]/o.x,e[3]=n[3]/o.y,e[4]=n[4]/o.y,e[5]=n[5]/o.y,e[6]=n[6]/o.z,e[7]=n[7]/o.z,e[8]=n[8]/o.z,e};r.multiply=function(n,e,o){c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o);let t=n[0]*e[0]+n[3]*e[1]+n[6]*e[2],i=n[1]*e[0]+n[4]*e[1]+n[7]*e[2],p=n[2]*e[0]+n[5]*e[1]+n[8]*e[2],y=n[0]*e[3]+n[3]*e[4]+n[6]*e[5],m=n[1]*e[3]+n[4]*e[4]+n[7]*e[5],s=n[2]*e[3]+n[5]*e[4]+n[8]*e[5],h=n[0]*e[6]+n[3]*e[7]+n[6]*e[8],j=n[1]*e[6]+n[4]*e[7]+n[7]*e[8],S=n[2]*e[6]+n[5]*e[7]+n[8]*e[8];return o[0]=t,o[1]=i,o[2]=p,o[3]=y,o[4]=m,o[5]=s,o[6]=h,o[7]=j,o[8]=S,o};r.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o[0]=n[0]+e[0],o[1]=n[1]+e[1],o[2]=n[2]+e[2],o[3]=n[3]+e[3],o[4]=n[4]+e[4],o[5]=n[5]+e[5],o[6]=n[6]+e[6],o[7]=n[7]+e[7],o[8]=n[8]+e[8],o};r.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],o[3]=n[3]-e[3],o[4]=n[4]-e[4],o[5]=n[5]-e[5],o[6]=n[6]-e[6],o[7]=n[7]-e[7],o[8]=n[8]-e[8],o};r.multiplyByVector=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("cartesian",e),c.typeOf.object("result",o);let t=e.x,i=e.y,p=e.z,y=n[0]*t+n[3]*i+n[6]*p,m=n[1]*t+n[4]*i+n[7]*p,s=n[2]*t+n[5]*i+n[8]*p;return o.x=y,o.y=m,o.z=s,o};r.multiplyByScalar=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.multiplyByScale=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.object("scale",e),c.typeOf.object("result",o),o[0]=n[0]*e.x,o[1]=n[1]*e.x,o[2]=n[2]*e.x,o[3]=n[3]*e.y,o[4]=n[4]*e.y,o[5]=n[5]*e.y,o[6]=n[6]*e.z,o[7]=n[7]*e.z,o[8]=n[8]*e.z,o};r.multiplyByUniformScale=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.number("scale",e),c.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.negate=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e[3]=-n[3],e[4]=-n[4],e[5]=-n[5],e[6]=-n[6],e[7]=-n[7],e[8]=-n[8],e};r.transpose=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=n[0],t=n[3],i=n[6],p=n[1],y=n[4],m=n[7],s=n[2],h=n[5],j=n[8];return e[0]=o,e[1]=t,e[2]=i,e[3]=p,e[4]=y,e[5]=m,e[6]=s,e[7]=h,e[8]=j,e};function Oe(n){let e=0;for(let o=0;o<9;++o){let t=n[o];e+=t*t}return Math.sqrt(e)}var sn=[1,0,0],bn=[2,2,1];function we(n){let e=0;for(let o=0;o<3;++o){let t=n[r.getElementIndex(bn[o],sn[o])];e+=2*t*t}return Math.sqrt(e)}function je(n,e){let o=O.EPSILON15,t=0,i=1;for(let h=0;h<3;++h){let j=Math.abs(n[r.getElementIndex(bn[h],sn[h])]);j>t&&(i=h,t=j)}let p=1,y=0,m=sn[i],s=bn[i];if(Math.abs(n[r.getElementIndex(s,m)])>o){let h=n[r.getElementIndex(s,s)],j=n[r.getElementIndex(m,m)],S=n[r.getElementIndex(s,m)],R=(h-j)/2/S,E;R<0?E=-1/(-R+Math.sqrt(1+R*R)):E=1/(R+Math.sqrt(1+R*R)),p=1/Math.sqrt(1+E*E),y=E*p}return e=r.clone(r.IDENTITY,e),e[r.getElementIndex(m,m)]=e[r.getElementIndex(s,s)]=p,e[r.getElementIndex(s,m)]=y,e[r.getElementIndex(m,s)]=-y,e}var Q=new r,Bn=new r;r.computeEigenDecomposition=function(n,e){c.typeOf.object("matrix",n);let o=O.EPSILON20,t=10,i=0,p=0;u(e)||(e={});let y=e.unitary=r.clone(r.IDENTITY,e.unitary),m=e.diagonal=r.clone(n,e.diagonal),s=o*Oe(m);for(;p<t&&we(m)>s;)je(m,Q),r.transpose(Q,Bn),r.multiply(m,Q,m),r.multiply(Bn,m,m),r.multiply(y,Q,y),++i>2&&(++p,i=0);return e};r.abs=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e[0]=Math.abs(n[0]),e[1]=Math.abs(n[1]),e[2]=Math.abs(n[2]),e[3]=Math.abs(n[3]),e[4]=Math.abs(n[4]),e[5]=Math.abs(n[5]),e[6]=Math.abs(n[6]),e[7]=Math.abs(n[7]),e[8]=Math.abs(n[8]),e};r.determinant=function(n){c.typeOf.object("matrix",n);let e=n[0],o=n[3],t=n[6],i=n[1],p=n[4],y=n[7],m=n[2],s=n[5],h=n[8];return e*(p*h-s*y)+i*(s*t-o*h)+m*(o*y-p*t)};r.inverse=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=n[0],t=n[1],i=n[2],p=n[3],y=n[4],m=n[5],s=n[6],h=n[7],j=n[8],S=r.determinant(n);if(Math.abs(S)<=O.EPSILON15)throw new g("matrix is not invertible");e[0]=y*j-h*m,e[1]=h*i-t*j,e[2]=t*m-y*i,e[3]=s*m-p*j,e[4]=o*j-s*i,e[5]=p*i-o*m,e[6]=p*h-s*y,e[7]=s*t-o*h,e[8]=o*y-p*t;let R=1/S;return r.multiplyByScalar(e,R,e)};var ge=new r;r.inverseTranspose=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),r.inverse(r.transpose(n,ge),e)};r.equals=function(n,e){return n===e||u(n)&&u(e)&&n[0]===e[0]&&n[1]===e[1]&&n[2]===e[2]&&n[3]===e[3]&&n[4]===e[4]&&n[5]===e[5]&&n[6]===e[6]&&n[7]===e[7]&&n[8]===e[8]};r.equalsEpsilon=function(n,e,o){return o=b(o,0),n===e||u(n)&&u(e)&&Math.abs(n[0]-e[0])<=o&&Math.abs(n[1]-e[1])<=o&&Math.abs(n[2]-e[2])<=o&&Math.abs(n[3]-e[3])<=o&&Math.abs(n[4]-e[4])<=o&&Math.abs(n[5]-e[5])<=o&&Math.abs(n[6]-e[6])<=o&&Math.abs(n[7]-e[7])<=o&&Math.abs(n[8]-e[8])<=o};r.IDENTITY=Object.freeze(new r(1,0,0,0,1,0,0,0,1));r.ZERO=Object.freeze(new r(0,0,0,0,0,0,0,0,0));r.COLUMN0ROW0=0;r.COLUMN0ROW1=1;r.COLUMN0ROW2=2;r.COLUMN1ROW0=3;r.COLUMN1ROW1=4;r.COLUMN1ROW2=5;r.COLUMN2ROW0=6;r.COLUMN2ROW1=7;r.COLUMN2ROW2=8;Object.defineProperties(r.prototype,{length:{get:function(){return r.packedLength}}});r.prototype.clone=function(n){return r.clone(this,n)};r.prototype.equals=function(n){return r.equals(this,n)};r.equalsArray=function(n,e,o){return n[0]===e[o]&&n[1]===e[o+1]&&n[2]===e[o+2]&&n[3]===e[o+3]&&n[4]===e[o+4]&&n[5]===e[o+5]&&n[6]===e[o+6]&&n[7]===e[o+7]&&n[8]===e[o+8]};r.prototype.equalsEpsilon=function(n,e){return r.equalsEpsilon(this,n,e)};r.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]}) -(${this[1]}, ${this[4]}, ${this[7]}) -(${this[2]}, ${this[5]}, ${this[8]})`};var jo=r;var F,z={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},_={};Object.defineProperties(_,{element:{get:function(){if(_.supportsFullscreen())return document[z.fullscreenElement]}},changeEventName:{get:function(){if(_.supportsFullscreen())return z.fullscreenchange}},errorEventName:{get:function(){if(_.supportsFullscreen())return z.fullscreenerror}},enabled:{get:function(){if(_.supportsFullscreen())return document[z.fullscreenEnabled]}},fullscreen:{get:function(){if(_.supportsFullscreen())return _.element!==null}}});_.supportsFullscreen=function(){if(u(F))return F;F=!1;let n=document.body;if(typeof n.requestFullscreen=="function")return z.requestFullscreen="requestFullscreen",z.exitFullscreen="exitFullscreen",z.fullscreenEnabled="fullscreenEnabled",z.fullscreenElement="fullscreenElement",z.fullscreenchange="fullscreenchange",z.fullscreenerror="fullscreenerror",F=!0,F;let e=["webkit","moz","o","ms","khtml"],o;for(let t=0,i=e.length;t<i;++t){let p=e[t];o=`${p}RequestFullscreen`,typeof n[o]=="function"?(z.requestFullscreen=o,F=!0):(o=`${p}RequestFullScreen`,typeof n[o]=="function"&&(z.requestFullscreen=o,F=!0)),o=`${p}ExitFullscreen`,typeof document[o]=="function"?z.exitFullscreen=o:(o=`${p}CancelFullScreen`,typeof document[o]=="function"&&(z.exitFullscreen=o)),o=`${p}FullscreenEnabled`,document[o]!==void 0?z.fullscreenEnabled=o:(o=`${p}FullScreenEnabled`,document[o]!==void 0&&(z.fullscreenEnabled=o)),o=`${p}FullscreenElement`,document[o]!==void 0?z.fullscreenElement=o:(o=`${p}FullScreenElement`,document[o]!==void 0&&(z.fullscreenElement=o)),o=`${p}fullscreenchange`,document[`on${o}`]!==void 0&&(p==="ms"&&(o="MSFullscreenChange"),z.fullscreenchange=o),o=`${p}fullscreenerror`,document[`on${o}`]!==void 0&&(p==="ms"&&(o="MSFullscreenError"),z.fullscreenerror=o)}return F};_.requestFullscreen=function(n,e){_.supportsFullscreen()&&n[z.requestFullscreen]({vrDisplay:e})};_.exitFullscreen=function(){_.supportsFullscreen()&&document[z.exitFullscreen]()};_._names=z;var Un=_;var q;typeof navigator<"u"?q=navigator:q={};function B(n){let e=n.split(".");for(let o=0,t=e.length;o<t;++o)e[o]=parseInt(e[o],10);return e}var K,In;function Sn(){if(!u(K)&&(K=!1,!cn())){let n=/ Chrome\/([\.0-9]+)/.exec(q.userAgent);n!==null&&(K=!0,In=B(n[1]))}return K}function Se(){return Sn()&&In}var J,Pn;function Ln(){if(!u(J)&&(J=!1,!Sn()&&!cn()&&/ Safari\/[\.0-9]+/.test(q.userAgent))){let n=/ Version\/([\.0-9]+)/.exec(q.userAgent);n!==null&&(J=!0,Pn=B(n[1]))}return J}function ze(){return Ln()&&Pn}var nn,jn;function Vn(){if(!u(nn)){nn=!1;let n=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(q.userAgent);n!==null&&(nn=!0,jn=B(n[1]),jn.isNightly=!!n[2])}return nn}function Re(){return Vn()&&jn}var v,gn;function Wn(){if(!u(v)){v=!1;let n;q.appName==="Microsoft Internet Explorer"?(n=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(q.userAgent),n!==null&&(v=!0,gn=B(n[1]))):q.appName==="Netscape"&&(n=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(q.userAgent),n!==null&&(v=!0,gn=B(n[1])))}return v}function Me(){return Wn()&&gn}var en,$n;function cn(){if(!u(en)){en=!1;let n=/ Edg\/([\.0-9]+)/.exec(q.userAgent);n!==null&&(en=!0,$n=B(n[1]))}return en}function Ee(){return cn()&&$n}var on,zn;function fn(){if(!u(on)){on=!1;let n=/Firefox\/([\.0-9]+)/.exec(q.userAgent);n!==null&&(on=!0,zn=B(n[1]))}return on}var hn;function Ae(){return u(hn)||(hn=/Windows/i.test(q.appVersion)),hn}var On;function qe(){return u(On)||(On=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),On}function _e(){return fn()&&zn}var wn;function Ce(){return u(wn)||(wn=!fn()&&typeof PointerEvent<"u"&&(!u(q.pointerEnabled)||q.pointerEnabled)),wn}var Dn,tn;function vn(){if(!u(tn)){let n=document.createElement("canvas");n.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let e=n.style.imageRendering;tn=u(e)&&e!=="",tn&&(Dn=e)}return tn}function Te(){return vn()?Dn:void 0}function A(){if(!A.initialized)throw new g("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return A._result}A._promise=void 0;A._result=void 0;A.initialize=function(){return u(A._promise)||(A._promise=new Promise(n=>{let e=new Image;e.onload=function(){A._result=e.width>0&&e.height>0,n(A._result)},e.onerror=function(){A._result=!1,n(A._result)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),A._promise};Object.defineProperties(A,{initialized:{get:function(){return u(A._result)}}});var D=[];typeof ArrayBuffer<"u"&&(D.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&D.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&D.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&D.push(BigInt64Array),typeof BigUint64Array<"u"&&D.push(BigUint64Array));var l={isChrome:Sn,chromeVersion:Se,isSafari:Ln,safariVersion:ze,isWebkit:Vn,webkitVersion:Re,isInternetExplorer:Wn,internetExplorerVersion:Me,isEdge:cn,edgeVersion:Ee,isFirefox:fn,firefoxVersion:_e,isWindows:Ae,isIPadOrIOS:qe,hardwareConcurrency:b(q.hardwareConcurrency,3),supportsPointerEvents:Ce,supportsImageRenderingPixelated:vn,supportsWebP:A,imageRenderingValue:Te,typedArrayTypes:D};l.supportsBasis=function(n){return l.supportsWebAssembly()&&n.context.supportsBasis};l.supportsFullscreen=function(){return Un.supportsFullscreen()};l.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};l.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};l.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};l.supportsBigInt=function(){return typeof BigInt<"u"};l.supportsWebWorkers=function(){return typeof Worker<"u"};l.supportsWebAssembly=function(){return typeof WebAssembly<"u"};l.supportsWebgl2=function(n){return c.defined("scene",n),n.context.webgl2};l.supportsEsmWebWorkers=function(){return!fn()||parseInt(zn)>=114};var _o=l;export{d as a,Cn as b,dn as c,ao as d,jo as e,_o as f}; diff --git a/cesium/Workers/chunk-LKPDAB55.js b/cesium/Workers/chunk-O5IJ3OGP.js similarity index 69% rename from cesium/Workers/chunk-LKPDAB55.js rename to cesium/Workers/chunk-O5IJ3OGP.js index 8359610..a89d3aa 100644 --- a/cesium/Workers/chunk-LKPDAB55.js +++ b/cesium/Workers/chunk-O5IJ3OGP.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as ue}from"./chunk-OSVMDAN4.js";import{b as he,c as pe,d as ne}from"./chunk-FATK2EQ2.js";import{a as te}from"./chunk-77ESX6BV.js";import{a as p,b as ee,c as w,d as Se}from"./chunk-LJCGAQ64.js";import{a as Y}from"./chunk-JFG572S7.js";import{a as le}from"./chunk-JZYZ7RT4.js";import{a as K}from"./chunk-42NIXFVW.js";import{b}from"./chunk-5YVCOCPP.js";import{c as We,d as Ge,e as D}from"./chunk-U73D6PDD.js";var Oe=We((st,de)=>{"use strict";de.exports=xe;de.exports.default=xe;function xe(e,n,t){t=t||2;var u=n&&n.length,r=u?n[0]*t:e.length,i=Ce(e,0,r,t,!0),s=[];if(!i||i.next===i.prev)return s;var o,f,c,l,y,v,g;if(u&&(i=ke(e,n,i,t)),e.length>80*t){o=c=e[0],f=l=e[1];for(var h=t;h<r;h+=t)y=e[h],v=e[h+1],y<o&&(o=y),v<f&&(f=v),y>c&&(c=y),v>l&&(l=v);g=Math.max(c-o,l-f),g=g!==0?32767/g:0}return re(i,s,t,o,f,g,0),s}function Ce(e,n,t,u,r){var i,s;if(r===ge(e,n,t,u)>0)for(i=n;i<t;i+=u)s=Ae(i,e[i],e[i+1],s);else for(i=t-u;i>=n;i-=u)s=Ae(i,e[i],e[i+1],s);return s&&ae(s,s.next)&&(oe(s),s=s.next),s}function N(e,n){if(!e)return e;n||(n=e);var t=e,u;do if(u=!1,!t.steiner&&(ae(t,t.next)||A(t.prev,t,t.next)===0)){if(oe(t),t=n=t.prev,t===t.next)break;u=!0}else t=t.next;while(u||t!==n);return n}function re(e,n,t,u,r,i,s){if(e){!s&&i&&qe(e,u,r,i);for(var o=e,f,c;e.prev!==e.next;){if(f=e.prev,c=e.next,i?Ie(e,u,r,i):$e(e)){n.push(f.i/t|0),n.push(e.i/t|0),n.push(c.i/t|0),oe(e),e=c.next,o=c.next;continue}if(e=c,e===o){s?s===1?(e=He(N(e),n,t),re(e,n,t,u,r,i,2)):s===2&&Ne(e,n,t,u,r,i):re(N(e),n,t,u,r,i,1);break}}}}function $e(e){var n=e.prev,t=e,u=e.next;if(A(n,t,u)>=0)return!1;for(var r=n.x,i=t.x,s=u.x,o=n.y,f=t.y,c=u.y,l=r<i?r<s?r:s:i<s?i:s,y=o<f?o<c?o:c:f<c?f:c,v=r>i?r>s?r:s:i>s?i:s,g=o>f?o>c?o:c:f>c?f:c,h=u.next;h!==n;){if(h.x>=l&&h.x<=v&&h.y>=y&&h.y<=g&&V(r,o,i,f,s,c,h.x,h.y)&&A(h.prev,h,h.next)>=0)return!1;h=h.next}return!0}function Ie(e,n,t,u){var r=e.prev,i=e,s=e.next;if(A(r,i,s)>=0)return!1;for(var o=r.x,f=i.x,c=s.x,l=r.y,y=i.y,v=s.y,g=o<f?o<c?o:c:f<c?f:c,h=l<y?l<v?l:v:y<v?y:v,T=o>f?o>c?o:c:f>c?f:c,L=l>y?l>v?l:v:y>v?y:v,z=ye(g,h,n,t,u),F=ye(T,L,n,t,u),x=e.prevZ,a=e.nextZ;x&&x.z>=z&&a&&a.z<=F;){if(x.x>=g&&x.x<=T&&x.y>=h&&x.y<=L&&x!==r&&x!==s&&V(o,l,f,y,c,v,x.x,x.y)&&A(x.prev,x,x.next)>=0||(x=x.prevZ,a.x>=g&&a.x<=T&&a.y>=h&&a.y<=L&&a!==r&&a!==s&&V(o,l,f,y,c,v,a.x,a.y)&&A(a.prev,a,a.next)>=0))return!1;a=a.nextZ}for(;x&&x.z>=z;){if(x.x>=g&&x.x<=T&&x.y>=h&&x.y<=L&&x!==r&&x!==s&&V(o,l,f,y,c,v,x.x,x.y)&&A(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;a&&a.z<=F;){if(a.x>=g&&a.x<=T&&a.y>=h&&a.y<=L&&a!==r&&a!==s&&V(o,l,f,y,c,v,a.x,a.y)&&A(a.prev,a,a.next)>=0)return!1;a=a.nextZ}return!0}function He(e,n,t){var u=e;do{var r=u.prev,i=u.next.next;!ae(r,i)&&be(r,u,u.next,i)&&ie(r,i)&&ie(i,r)&&(n.push(r.i/t|0),n.push(u.i/t|0),n.push(i.i/t|0),oe(u),oe(u.next),u=e=i),u=u.next}while(u!==e);return N(u)}function Ne(e,n,t,u,r,i){var s=e;do{for(var o=s.next.next;o!==s.prev;){if(s.i!==o.i&&je(s,o)){var f=Ee(s,o);s=N(s,s.next),f=N(f,f.next),re(s,n,t,u,r,i,0),re(f,n,t,u,r,i,0);return}o=o.next}s=s.next}while(s!==e)}function ke(e,n,t,u){var r=[],i,s,o,f,c;for(i=0,s=n.length;i<s;i++)o=n[i]*u,f=i<s-1?n[i+1]*u:e.length,c=Ce(e,o,f,u,!1),c===c.next&&(c.steiner=!0),r.push(Qe(c));for(r.sort(Ue),i=0;i<r.length;i++)t=_e(r[i],t);return t}function Ue(e,n){return e.x-n.x}function _e(e,n){var t=Ke(e,n);if(!t)return n;var u=Ee(t,e);return N(u,u.next),N(t,t.next)}function Ke(e,n){var t=n,u=e.x,r=e.y,i=-1/0,s;do{if(r<=t.y&&r>=t.next.y&&t.next.y!==t.y){var o=t.x+(r-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=u&&o>i&&(i=o,s=t.x<t.next.x?t:t.next,o===u))return s}t=t.next}while(t!==n);if(!s)return null;var f=s,c=s.x,l=s.y,y=1/0,v;t=s;do u>=t.x&&t.x>=c&&u!==t.x&&V(r<l?u:i,r,c,l,r<l?i:u,r,t.x,t.y)&&(v=Math.abs(r-t.y)/(u-t.x),ie(t,e)&&(v<y||v===y&&(t.x>s.x||t.x===s.x&&Ve(s,t)))&&(s=t,y=v)),t=t.next;while(t!==f);return s}function Ve(e,n){return A(e.prev,e,n.prev)<0&&A(n.next,e,e.next)<0}function qe(e,n,t,u){var r=e;do r.z===0&&(r.z=ye(r.x,r.y,n,t,u)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,Je(r)}function Je(e){var n,t,u,r,i,s,o,f,c=1;do{for(t=e,e=null,i=null,s=0;t;){for(s++,u=t,o=0,n=0;n<c&&(o++,u=u.nextZ,!!u);n++);for(f=c;o>0||f>0&&u;)o!==0&&(f===0||!u||t.z<=u.z)?(r=t,t=t.nextZ,o--):(r=u,u=u.nextZ,f--),i?i.nextZ=r:e=r,r.prevZ=i,i=r;t=u}i.nextZ=null,c*=2}while(s>1);return e}function ye(e,n,t,u,r){return e=(e-t)*r|0,n=(n-u)*r|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e|n<<1}function Qe(e){var n=e,t=e;do(n.x<t.x||n.x===t.x&&n.y<t.y)&&(t=n),n=n.next;while(n!==e);return t}function V(e,n,t,u,r,i,s,o){return(r-s)*(n-o)>=(e-s)*(i-o)&&(e-s)*(u-o)>=(t-s)*(n-o)&&(t-s)*(i-o)>=(r-s)*(u-o)}function je(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!Xe(e,n)&&(ie(e,n)&&ie(n,e)&&Ye(e,n)&&(A(e.prev,e,n.prev)||A(e,n.prev,n))||ae(e,n)&&A(e.prev,e,e.next)>0&&A(n.prev,n,n.next)>0)}function A(e,n,t){return(n.y-e.y)*(t.x-n.x)-(n.x-e.x)*(t.y-n.y)}function ae(e,n){return e.x===n.x&&e.y===n.y}function be(e,n,t,u){var r=fe(A(e,n,t)),i=fe(A(e,n,u)),s=fe(A(t,u,e)),o=fe(A(t,u,n));return!!(r!==i&&s!==o||r===0&&ce(e,t,n)||i===0&&ce(e,u,n)||s===0&&ce(t,e,u)||o===0&&ce(t,n,u))}function ce(e,n,t){return n.x<=Math.max(e.x,t.x)&&n.x>=Math.min(e.x,t.x)&&n.y<=Math.max(e.y,t.y)&&n.y>=Math.min(e.y,t.y)}function fe(e){return e>0?1:e<0?-1:0}function Xe(e,n){var t=e;do{if(t.i!==e.i&&t.next.i!==e.i&&t.i!==n.i&&t.next.i!==n.i&&be(t,t.next,e,n))return!0;t=t.next}while(t!==e);return!1}function ie(e,n){return A(e.prev,e,e.next)<0?A(e,n,e.next)>=0&&A(e,e.prev,n)>=0:A(e,n,e.prev)<0||A(e,e.next,n)<0}function Ye(e,n){var t=e,u=!1,r=(e.x+n.x)/2,i=(e.y+n.y)/2;do t.y>i!=t.next.y>i&&t.next.y!==t.y&&r<(t.next.x-t.x)*(i-t.y)/(t.next.y-t.y)+t.x&&(u=!u),t=t.next;while(t!==e);return u}function Ee(e,n){var t=new me(e.i,e.x,e.y),u=new me(n.i,n.x,n.y),r=e.next,i=n.prev;return e.next=n,n.prev=e,t.next=r,r.prev=t,u.next=t,t.prev=u,i.next=u,u.prev=i,u}function Ae(e,n,t,u){var r=new me(e,n,t);return u?(r.next=u.next,r.prev=u,u.next.prev=r,u.next=r):(r.prev=r,r.next=r),r}function oe(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function me(e,n,t){this.i=e,this.x=n,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}xe.deviation=function(e,n,t,u){var r=n&&n.length,i=r?n[0]*t:e.length,s=Math.abs(ge(e,0,i,t));if(r)for(var o=0,f=n.length;o<f;o++){var c=n[o]*t,l=o<f-1?n[o+1]*t:e.length;s-=Math.abs(ge(e,c,l,t))}var y=0;for(o=0;o<u.length;o+=3){var v=u[o]*t,g=u[o+1]*t,h=u[o+2]*t;y+=Math.abs((e[v]-e[h])*(e[g+1]-e[v+1])-(e[v]-e[g])*(e[h+1]-e[v+1]))}return s===0&&y===0?0:Math.abs((y-s)/s)};function ge(e,n,t,u){for(var r=0,i=n,s=t-u;i<t;i+=u)r+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return r}xe.flatten=function(e){for(var n=e[0][0].length,t={vertices:[],holes:[],dimensions:n},u=0,r=0;r<e.length;r++){for(var i=0;i<e[r].length;i++)for(var s=0;s<n;s++)t.vertices.push(e[r][i][s]);r>0&&(u+=e[r-1].length,t.holes.push(u))}return t}});var se={CLOCKWISE:le.CW,COUNTER_CLOCKWISE:le.CCW};se.validate=function(e){return e===se.CLOCKWISE||e===se.COUNTER_CLOCKWISE};var ve=Object.freeze(se);var Le=Ge(Oe(),1);var et=new p,tt=new p,B={};B.computeArea2D=function(e){b.defined("positions",e),b.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);let n=e.length,t=0;for(let u=n-1,r=0;r<n;u=r++){let i=e[u],s=e[r];t+=i.x*s.y-s.x*i.y}return t*.5};B.computeWindingOrder2D=function(e){return B.computeArea2D(e)>0?ve.COUNTER_CLOCKWISE:ve.CLOCKWISE};B.triangulate=function(e,n){b.defined("positions",e);let t=w.packArray(e);return(0,Le.default)(t,n,2)};var De=new p,Fe=new p,Pe=new p,Te=new p,Me=new p,Ze=new p,R=new p,Re=new w,ze=new w,Be=new w,q=new w;B.computeSubdivision=function(e,n,t,u,r){r=K(r,Y.RADIANS_PER_DEGREE);let i=D(u);b.typeOf.object("ellipsoid",e),b.defined("positions",n),b.defined("indices",t),b.typeOf.number.greaterThanOrEquals("indices.length",t.length,3),b.typeOf.number.equals("indices.length % 3","0",t.length%3,0),b.typeOf.number.greaterThan("granularity",r,0);let s=t.slice(0),o,f=n.length,c=new Array(f*3),l=new Array(f*2),y=0,v=0;for(o=0;o<f;o++){let x=n[o];if(c[y++]=x.x,c[y++]=x.y,c[y++]=x.z,i){let a=u[o];l[v++]=a.x,l[v++]=a.y}}let g=[],h={},T=e.maximumRadius,L=Y.chordLength(r,T),z=L*L;for(;s.length>0;){let x=s.pop(),a=s.pop(),m=s.pop(),C=p.fromArray(c,m*3,De),E=p.fromArray(c,a*3,Fe),J=p.fromArray(c,x*3,Pe),Q,j,W;i&&(Q=w.fromArray(l,m*2,Re),j=w.fromArray(l,a*2,ze),W=w.fromArray(l,x*2,Be));let k=p.multiplyByScalar(p.normalize(C,Te),T,Te),U=p.multiplyByScalar(p.normalize(E,Me),T,Me),G=p.multiplyByScalar(p.normalize(J,Ze),T,Ze),$=p.magnitudeSquared(p.subtract(k,U,R)),I=p.magnitudeSquared(p.subtract(U,G,R)),X=p.magnitudeSquared(p.subtract(G,k,R)),H=Math.max($,I,X),M,S,d;H>z?$===H?(M=`${Math.min(m,a)} ${Math.max(m,a)}`,o=h[M],D(o)||(S=p.add(C,E,R),p.multiplyByScalar(S,.5,S),c.push(S.x,S.y,S.z),o=c.length/3-1,h[M]=o,i&&(d=w.add(Q,j,q),w.multiplyByScalar(d,.5,d),l.push(d.x,d.y))),s.push(m,o,x),s.push(o,a,x)):I===H?(M=`${Math.min(a,x)} ${Math.max(a,x)}`,o=h[M],D(o)||(S=p.add(E,J,R),p.multiplyByScalar(S,.5,S),c.push(S.x,S.y,S.z),o=c.length/3-1,h[M]=o,i&&(d=w.add(j,W,q),w.multiplyByScalar(d,.5,d),l.push(d.x,d.y))),s.push(a,o,m),s.push(o,x,m)):X===H&&(M=`${Math.min(x,m)} ${Math.max(x,m)}`,o=h[M],D(o)||(S=p.add(J,C,R),p.multiplyByScalar(S,.5,S),c.push(S.x,S.y,S.z),o=c.length/3-1,h[M]=o,i&&(d=w.add(W,Q,q),w.multiplyByScalar(d,.5,d),l.push(d.x,d.y))),s.push(x,o,a),s.push(o,m,a)):(g.push(m),g.push(a),g.push(x))}let F={attributes:{position:new ne({componentDatatype:te.DOUBLE,componentsPerAttribute:3,values:c})},indices:g,primitiveType:he.TRIANGLES};return i&&(F.attributes.st=new ne({componentDatatype:te.FLOAT,componentsPerAttribute:2,values:l})),new pe(F)};var nt=new ee,rt=new ee,it=new ee,we=new ee;B.computeRhumbLineSubdivision=function(e,n,t,u,r){r=K(r,Y.RADIANS_PER_DEGREE);let i=D(u);b.typeOf.object("ellipsoid",e),b.defined("positions",n),b.defined("indices",t),b.typeOf.number.greaterThanOrEquals("indices.length",t.length,3),b.typeOf.number.equals("indices.length % 3","0",t.length%3,0),b.typeOf.number.greaterThan("granularity",r,0);let s=t.slice(0),o,f=n.length,c=new Array(f*3),l=new Array(f*2),y=0,v=0;for(o=0;o<f;o++){let m=n[o];if(c[y++]=m.x,c[y++]=m.y,c[y++]=m.z,i){let C=u[o];l[v++]=C.x,l[v++]=C.y}}let g=[],h={},T=e.maximumRadius,L=Y.chordLength(r,T),z=new ue(void 0,void 0,e),F=new ue(void 0,void 0,e),x=new ue(void 0,void 0,e);for(;s.length>0;){let m=s.pop(),C=s.pop(),E=s.pop(),J=p.fromArray(c,E*3,De),Q=p.fromArray(c,C*3,Fe),j=p.fromArray(c,m*3,Pe),W,k,U;i&&(W=w.fromArray(l,E*2,Re),k=w.fromArray(l,C*2,ze),U=w.fromArray(l,m*2,Be));let G=e.cartesianToCartographic(J,nt),$=e.cartesianToCartographic(Q,rt),I=e.cartesianToCartographic(j,it);z.setEndPoints(G,$);let X=z.surfaceDistance;F.setEndPoints($,I);let H=F.surfaceDistance;x.setEndPoints(I,G);let M=x.surfaceDistance,S=Math.max(X,H,M),d,P,_,Z,O;S>L?X===S?(d=`${Math.min(E,C)} ${Math.max(E,C)}`,o=h[d],D(o)||(P=z.interpolateUsingFraction(.5,we),_=(G.height+$.height)*.5,Z=p.fromRadians(P.longitude,P.latitude,_,e,R),c.push(Z.x,Z.y,Z.z),o=c.length/3-1,h[d]=o,i&&(O=w.add(W,k,q),w.multiplyByScalar(O,.5,O),l.push(O.x,O.y))),s.push(E,o,m),s.push(o,C,m)):H===S?(d=`${Math.min(C,m)} ${Math.max(C,m)}`,o=h[d],D(o)||(P=F.interpolateUsingFraction(.5,we),_=($.height+I.height)*.5,Z=p.fromRadians(P.longitude,P.latitude,_,e,R),c.push(Z.x,Z.y,Z.z),o=c.length/3-1,h[d]=o,i&&(O=w.add(k,U,q),w.multiplyByScalar(O,.5,O),l.push(O.x,O.y))),s.push(C,o,E),s.push(o,m,E)):M===S&&(d=`${Math.min(m,E)} ${Math.max(m,E)}`,o=h[d],D(o)||(P=x.interpolateUsingFraction(.5,we),_=(I.height+G.height)*.5,Z=p.fromRadians(P.longitude,P.latitude,_,e,R),c.push(Z.x,Z.y,Z.z),o=c.length/3-1,h[d]=o,i&&(O=w.add(U,W,q),w.multiplyByScalar(O,.5,O),l.push(O.x,O.y))),s.push(m,o,C),s.push(o,E,C)):(g.push(E),g.push(C),g.push(m))}let a={attributes:{position:new ne({componentDatatype:te.DOUBLE,componentsPerAttribute:3,values:c})},indices:g,primitiveType:he.TRIANGLES};return i&&(a.attributes.st=new ne({componentDatatype:te.FLOAT,componentsPerAttribute:2,values:l})),new pe(a)};B.scaleToGeodeticHeight=function(e,n,t,u){t=K(t,Se.WGS84);let r=et,i=tt;if(n=K(n,0),u=K(u,!0),D(e)){let s=e.length;for(let o=0;o<s;o+=3)p.fromArray(e,o,i),u&&(i=t.scaleToGeodeticSurface(i,i)),n!==0&&(r=t.geodeticSurfaceNormal(i,r),p.multiplyByScalar(r,n,r),p.add(i,r,i)),e[o]=i.x,e[o+1]=i.y,e[o+2]=i.z}return e};var At=B;export{ve as a,At as b}; +import{a as ue}from"./chunk-FYOYUPXG.js";import{b as he,c as pe,d as ne}from"./chunk-X5IHHI6X.js";import{a as te}from"./chunk-KZNJOCYU.js";import{a as p,b as ee,c as w,d as Se}from"./chunk-POASMU2N.js";import{a as Y}from"./chunk-R6KGAEF6.js";import{a as le}from"./chunk-3C7WC463.js";import{a as K}from"./chunk-IUA6FAOZ.js";import{b}from"./chunk-UH2WFNTA.js";import{c as We,d as $e,e as D}from"./chunk-PEYJTJPE.js";var Oe=We((st,ge)=>{"use strict";ge.exports=xe;ge.exports.default=xe;function xe(e,n,t){t=t||2;var u=n&&n.length,r=u?n[0]*t:e.length,i=Ce(e,0,r,t,!0),s=[];if(!i||i.next===i.prev)return s;var o,f,c,l,y,v,d;if(u&&(i=ke(e,n,i,t)),e.length>80*t){o=c=e[0],f=l=e[1];for(var h=t;h<r;h+=t)y=e[h],v=e[h+1],y<o&&(o=y),v<f&&(f=v),y>c&&(c=y),v>l&&(l=v);d=Math.max(c-o,l-f),d=d!==0?32767/d:0}return re(i,s,t,o,f,d,0),s}function Ce(e,n,t,u,r){var i,s;if(r===de(e,n,t,u)>0)for(i=n;i<t;i+=u)s=Ae(i,e[i],e[i+1],s);else for(i=t-u;i>=n;i-=u)s=Ae(i,e[i],e[i+1],s);return s&&ae(s,s.next)&&(oe(s),s=s.next),s}function N(e,n){if(!e)return e;n||(n=e);var t=e,u;do if(u=!1,!t.steiner&&(ae(t,t.next)||A(t.prev,t,t.next)===0)){if(oe(t),t=n=t.prev,t===t.next)break;u=!0}else t=t.next;while(u||t!==n);return n}function re(e,n,t,u,r,i,s){if(e){!s&&i&&qe(e,u,r,i);for(var o=e,f,c;e.prev!==e.next;){if(f=e.prev,c=e.next,i?Ie(e,u,r,i):Ge(e)){n.push(f.i/t|0),n.push(e.i/t|0),n.push(c.i/t|0),oe(e),e=c.next,o=c.next;continue}if(e=c,e===o){s?s===1?(e=He(N(e),n,t),re(e,n,t,u,r,i,2)):s===2&&Ne(e,n,t,u,r,i):re(N(e),n,t,u,r,i,1);break}}}}function Ge(e){var n=e.prev,t=e,u=e.next;if(A(n,t,u)>=0)return!1;for(var r=n.x,i=t.x,s=u.x,o=n.y,f=t.y,c=u.y,l=r<i?r<s?r:s:i<s?i:s,y=o<f?o<c?o:c:f<c?f:c,v=r>i?r>s?r:s:i>s?i:s,d=o>f?o>c?o:c:f>c?f:c,h=u.next;h!==n;){if(h.x>=l&&h.x<=v&&h.y>=y&&h.y<=d&&V(r,o,i,f,s,c,h.x,h.y)&&A(h.prev,h,h.next)>=0)return!1;h=h.next}return!0}function Ie(e,n,t,u){var r=e.prev,i=e,s=e.next;if(A(r,i,s)>=0)return!1;for(var o=r.x,f=i.x,c=s.x,l=r.y,y=i.y,v=s.y,d=o<f?o<c?o:c:f<c?f:c,h=l<y?l<v?l:v:y<v?y:v,T=o>f?o>c?o:c:f>c?f:c,L=l>y?l>v?l:v:y>v?y:v,z=ye(d,h,n,t,u),F=ye(T,L,n,t,u),x=e.prevZ,a=e.nextZ;x&&x.z>=z&&a&&a.z<=F;){if(x.x>=d&&x.x<=T&&x.y>=h&&x.y<=L&&x!==r&&x!==s&&V(o,l,f,y,c,v,x.x,x.y)&&A(x.prev,x,x.next)>=0||(x=x.prevZ,a.x>=d&&a.x<=T&&a.y>=h&&a.y<=L&&a!==r&&a!==s&&V(o,l,f,y,c,v,a.x,a.y)&&A(a.prev,a,a.next)>=0))return!1;a=a.nextZ}for(;x&&x.z>=z;){if(x.x>=d&&x.x<=T&&x.y>=h&&x.y<=L&&x!==r&&x!==s&&V(o,l,f,y,c,v,x.x,x.y)&&A(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;a&&a.z<=F;){if(a.x>=d&&a.x<=T&&a.y>=h&&a.y<=L&&a!==r&&a!==s&&V(o,l,f,y,c,v,a.x,a.y)&&A(a.prev,a,a.next)>=0)return!1;a=a.nextZ}return!0}function He(e,n,t){var u=e;do{var r=u.prev,i=u.next.next;!ae(r,i)&&be(r,u,u.next,i)&&ie(r,i)&&ie(i,r)&&(n.push(r.i/t|0),n.push(u.i/t|0),n.push(i.i/t|0),oe(u),oe(u.next),u=e=i),u=u.next}while(u!==e);return N(u)}function Ne(e,n,t,u,r,i){var s=e;do{for(var o=s.next.next;o!==s.prev;){if(s.i!==o.i&&je(s,o)){var f=Ee(s,o);s=N(s,s.next),f=N(f,f.next),re(s,n,t,u,r,i,0),re(f,n,t,u,r,i,0);return}o=o.next}s=s.next}while(s!==e)}function ke(e,n,t,u){var r=[],i,s,o,f,c;for(i=0,s=n.length;i<s;i++)o=n[i]*u,f=i<s-1?n[i+1]*u:e.length,c=Ce(e,o,f,u,!1),c===c.next&&(c.steiner=!0),r.push(Qe(c));for(r.sort(Ue),i=0;i<r.length;i++)t=_e(r[i],t);return t}function Ue(e,n){return e.x-n.x}function _e(e,n){var t=Ke(e,n);if(!t)return n;var u=Ee(t,e);return N(u,u.next),N(t,t.next)}function Ke(e,n){var t=n,u=e.x,r=e.y,i=-1/0,s;do{if(r<=t.y&&r>=t.next.y&&t.next.y!==t.y){var o=t.x+(r-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=u&&o>i&&(i=o,s=t.x<t.next.x?t:t.next,o===u))return s}t=t.next}while(t!==n);if(!s)return null;var f=s,c=s.x,l=s.y,y=1/0,v;t=s;do u>=t.x&&t.x>=c&&u!==t.x&&V(r<l?u:i,r,c,l,r<l?i:u,r,t.x,t.y)&&(v=Math.abs(r-t.y)/(u-t.x),ie(t,e)&&(v<y||v===y&&(t.x>s.x||t.x===s.x&&Ve(s,t)))&&(s=t,y=v)),t=t.next;while(t!==f);return s}function Ve(e,n){return A(e.prev,e,n.prev)<0&&A(n.next,e,e.next)<0}function qe(e,n,t,u){var r=e;do r.z===0&&(r.z=ye(r.x,r.y,n,t,u)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,Je(r)}function Je(e){var n,t,u,r,i,s,o,f,c=1;do{for(t=e,e=null,i=null,s=0;t;){for(s++,u=t,o=0,n=0;n<c&&(o++,u=u.nextZ,!!u);n++);for(f=c;o>0||f>0&&u;)o!==0&&(f===0||!u||t.z<=u.z)?(r=t,t=t.nextZ,o--):(r=u,u=u.nextZ,f--),i?i.nextZ=r:e=r,r.prevZ=i,i=r;t=u}i.nextZ=null,c*=2}while(s>1);return e}function ye(e,n,t,u,r){return e=(e-t)*r|0,n=(n-u)*r|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e|n<<1}function Qe(e){var n=e,t=e;do(n.x<t.x||n.x===t.x&&n.y<t.y)&&(t=n),n=n.next;while(n!==e);return t}function V(e,n,t,u,r,i,s,o){return(r-s)*(n-o)>=(e-s)*(i-o)&&(e-s)*(u-o)>=(t-s)*(n-o)&&(t-s)*(i-o)>=(r-s)*(u-o)}function je(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!Xe(e,n)&&(ie(e,n)&&ie(n,e)&&Ye(e,n)&&(A(e.prev,e,n.prev)||A(e,n.prev,n))||ae(e,n)&&A(e.prev,e,e.next)>0&&A(n.prev,n,n.next)>0)}function A(e,n,t){return(n.y-e.y)*(t.x-n.x)-(n.x-e.x)*(t.y-n.y)}function ae(e,n){return e.x===n.x&&e.y===n.y}function be(e,n,t,u){var r=fe(A(e,n,t)),i=fe(A(e,n,u)),s=fe(A(t,u,e)),o=fe(A(t,u,n));return!!(r!==i&&s!==o||r===0&&ce(e,t,n)||i===0&&ce(e,u,n)||s===0&&ce(t,e,u)||o===0&&ce(t,n,u))}function ce(e,n,t){return n.x<=Math.max(e.x,t.x)&&n.x>=Math.min(e.x,t.x)&&n.y<=Math.max(e.y,t.y)&&n.y>=Math.min(e.y,t.y)}function fe(e){return e>0?1:e<0?-1:0}function Xe(e,n){var t=e;do{if(t.i!==e.i&&t.next.i!==e.i&&t.i!==n.i&&t.next.i!==n.i&&be(t,t.next,e,n))return!0;t=t.next}while(t!==e);return!1}function ie(e,n){return A(e.prev,e,e.next)<0?A(e,n,e.next)>=0&&A(e,e.prev,n)>=0:A(e,n,e.prev)<0||A(e,e.next,n)<0}function Ye(e,n){var t=e,u=!1,r=(e.x+n.x)/2,i=(e.y+n.y)/2;do t.y>i!=t.next.y>i&&t.next.y!==t.y&&r<(t.next.x-t.x)*(i-t.y)/(t.next.y-t.y)+t.x&&(u=!u),t=t.next;while(t!==e);return u}function Ee(e,n){var t=new me(e.i,e.x,e.y),u=new me(n.i,n.x,n.y),r=e.next,i=n.prev;return e.next=n,n.prev=e,t.next=r,r.prev=t,u.next=t,t.prev=u,i.next=u,u.prev=i,u}function Ae(e,n,t,u){var r=new me(e,n,t);return u?(r.next=u.next,r.prev=u,u.next.prev=r,u.next=r):(r.prev=r,r.next=r),r}function oe(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function me(e,n,t){this.i=e,this.x=n,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}xe.deviation=function(e,n,t,u){var r=n&&n.length,i=r?n[0]*t:e.length,s=Math.abs(de(e,0,i,t));if(r)for(var o=0,f=n.length;o<f;o++){var c=n[o]*t,l=o<f-1?n[o+1]*t:e.length;s-=Math.abs(de(e,c,l,t))}var y=0;for(o=0;o<u.length;o+=3){var v=u[o]*t,d=u[o+1]*t,h=u[o+2]*t;y+=Math.abs((e[v]-e[h])*(e[d+1]-e[v+1])-(e[v]-e[d])*(e[h+1]-e[v+1]))}return s===0&&y===0?0:Math.abs((y-s)/s)};function de(e,n,t,u){for(var r=0,i=n,s=t-u;i<t;i+=u)r+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return r}xe.flatten=function(e){for(var n=e[0][0].length,t={vertices:[],holes:[],dimensions:n},u=0,r=0;r<e.length;r++){for(var i=0;i<e[r].length;i++)for(var s=0;s<n;s++)t.vertices.push(e[r][i][s]);r>0&&(u+=e[r-1].length,t.holes.push(u))}return t}});var se={CLOCKWISE:le.CW,COUNTER_CLOCKWISE:le.CCW};se.validate=function(e){return e===se.CLOCKWISE||e===se.COUNTER_CLOCKWISE};var ve=Object.freeze(se);var Le=$e(Oe(),1);var et=new p,tt=new p,B={};B.computeArea2D=function(e){b.defined("positions",e),b.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);let n=e.length,t=0;for(let u=n-1,r=0;r<n;u=r++){let i=e[u],s=e[r];t+=i.x*s.y-s.x*i.y}return t*.5};B.computeWindingOrder2D=function(e){return B.computeArea2D(e)>0?ve.COUNTER_CLOCKWISE:ve.CLOCKWISE};B.triangulate=function(e,n){b.defined("positions",e);let t=w.packArray(e);return(0,Le.default)(t,n,2)};var De=new p,Fe=new p,Pe=new p,Te=new p,Me=new p,Ze=new p,R=new p,Re=new w,ze=new w,Be=new w,q=new w;B.computeSubdivision=function(e,n,t,u,r){r=K(r,Y.RADIANS_PER_DEGREE);let i=D(u);b.typeOf.object("ellipsoid",e),b.defined("positions",n),b.defined("indices",t),b.typeOf.number.greaterThanOrEquals("indices.length",t.length,3),b.typeOf.number.equals("indices.length % 3","0",t.length%3,0),b.typeOf.number.greaterThan("granularity",r,0);let s=t.slice(0),o,f=n.length,c=new Array(f*3),l=new Array(f*2),y=0,v=0;for(o=0;o<f;o++){let x=n[o];if(c[y++]=x.x,c[y++]=x.y,c[y++]=x.z,i){let a=u[o];l[v++]=a.x,l[v++]=a.y}}let d=[],h={},T=e.maximumRadius,L=Y.chordLength(r,T),z=L*L;for(;s.length>0;){let x=s.pop(),a=s.pop(),m=s.pop(),C=p.fromArray(c,m*3,De),E=p.fromArray(c,a*3,Fe),J=p.fromArray(c,x*3,Pe),Q,j,W;i&&(Q=w.fromArray(l,m*2,Re),j=w.fromArray(l,a*2,ze),W=w.fromArray(l,x*2,Be));let k=p.multiplyByScalar(p.normalize(C,Te),T,Te),U=p.multiplyByScalar(p.normalize(E,Me),T,Me),$=p.multiplyByScalar(p.normalize(J,Ze),T,Ze),G=p.magnitudeSquared(p.subtract(k,U,R)),I=p.magnitudeSquared(p.subtract(U,$,R)),X=p.magnitudeSquared(p.subtract($,k,R)),H=Math.max(G,I,X),M,S,g;H>z?G===H?(M=`${Math.min(m,a)} ${Math.max(m,a)}`,o=h[M],D(o)||(S=p.add(C,E,R),p.multiplyByScalar(S,.5,S),c.push(S.x,S.y,S.z),o=c.length/3-1,h[M]=o,i&&(g=w.add(Q,j,q),w.multiplyByScalar(g,.5,g),l.push(g.x,g.y))),s.push(m,o,x),s.push(o,a,x)):I===H?(M=`${Math.min(a,x)} ${Math.max(a,x)}`,o=h[M],D(o)||(S=p.add(E,J,R),p.multiplyByScalar(S,.5,S),c.push(S.x,S.y,S.z),o=c.length/3-1,h[M]=o,i&&(g=w.add(j,W,q),w.multiplyByScalar(g,.5,g),l.push(g.x,g.y))),s.push(a,o,m),s.push(o,x,m)):X===H&&(M=`${Math.min(x,m)} ${Math.max(x,m)}`,o=h[M],D(o)||(S=p.add(J,C,R),p.multiplyByScalar(S,.5,S),c.push(S.x,S.y,S.z),o=c.length/3-1,h[M]=o,i&&(g=w.add(W,Q,q),w.multiplyByScalar(g,.5,g),l.push(g.x,g.y))),s.push(x,o,a),s.push(o,m,a)):(d.push(m),d.push(a),d.push(x))}let F={attributes:{position:new ne({componentDatatype:te.DOUBLE,componentsPerAttribute:3,values:c})},indices:d,primitiveType:he.TRIANGLES};return i&&(F.attributes.st=new ne({componentDatatype:te.FLOAT,componentsPerAttribute:2,values:l})),new pe(F)};var nt=new ee,rt=new ee,it=new ee,we=new ee;B.computeRhumbLineSubdivision=function(e,n,t,u,r){r=K(r,Y.RADIANS_PER_DEGREE);let i=D(u);b.typeOf.object("ellipsoid",e),b.defined("positions",n),b.defined("indices",t),b.typeOf.number.greaterThanOrEquals("indices.length",t.length,3),b.typeOf.number.equals("indices.length % 3","0",t.length%3,0),b.typeOf.number.greaterThan("granularity",r,0);let s=t.slice(0),o,f=n.length,c=new Array(f*3),l=new Array(f*2),y=0,v=0;for(o=0;o<f;o++){let m=n[o];if(c[y++]=m.x,c[y++]=m.y,c[y++]=m.z,i){let C=u[o];l[v++]=C.x,l[v++]=C.y}}let d=[],h={},T=e.maximumRadius,L=Y.chordLength(r,T),z=new ue(void 0,void 0,e),F=new ue(void 0,void 0,e),x=new ue(void 0,void 0,e);for(;s.length>0;){let m=s.pop(),C=s.pop(),E=s.pop(),J=p.fromArray(c,E*3,De),Q=p.fromArray(c,C*3,Fe),j=p.fromArray(c,m*3,Pe),W,k,U;i&&(W=w.fromArray(l,E*2,Re),k=w.fromArray(l,C*2,ze),U=w.fromArray(l,m*2,Be));let $=e.cartesianToCartographic(J,nt),G=e.cartesianToCartographic(Q,rt),I=e.cartesianToCartographic(j,it);z.setEndPoints($,G);let X=z.surfaceDistance;F.setEndPoints(G,I);let H=F.surfaceDistance;x.setEndPoints(I,$);let M=x.surfaceDistance,S=Math.max(X,H,M),g,P,_,Z,O;S>L?X===S?(g=`${Math.min(E,C)} ${Math.max(E,C)}`,o=h[g],D(o)||(P=z.interpolateUsingFraction(.5,we),_=($.height+G.height)*.5,Z=p.fromRadians(P.longitude,P.latitude,_,e,R),c.push(Z.x,Z.y,Z.z),o=c.length/3-1,h[g]=o,i&&(O=w.add(W,k,q),w.multiplyByScalar(O,.5,O),l.push(O.x,O.y))),s.push(E,o,m),s.push(o,C,m)):H===S?(g=`${Math.min(C,m)} ${Math.max(C,m)}`,o=h[g],D(o)||(P=F.interpolateUsingFraction(.5,we),_=(G.height+I.height)*.5,Z=p.fromRadians(P.longitude,P.latitude,_,e,R),c.push(Z.x,Z.y,Z.z),o=c.length/3-1,h[g]=o,i&&(O=w.add(k,U,q),w.multiplyByScalar(O,.5,O),l.push(O.x,O.y))),s.push(C,o,E),s.push(o,m,E)):M===S&&(g=`${Math.min(m,E)} ${Math.max(m,E)}`,o=h[g],D(o)||(P=x.interpolateUsingFraction(.5,we),_=(I.height+$.height)*.5,Z=p.fromRadians(P.longitude,P.latitude,_,e,R),c.push(Z.x,Z.y,Z.z),o=c.length/3-1,h[g]=o,i&&(O=w.add(U,W,q),w.multiplyByScalar(O,.5,O),l.push(O.x,O.y))),s.push(m,o,C),s.push(o,E,C)):(d.push(E),d.push(C),d.push(m))}let a={attributes:{position:new ne({componentDatatype:te.DOUBLE,componentsPerAttribute:3,values:c})},indices:d,primitiveType:he.TRIANGLES};return i&&(a.attributes.st=new ne({componentDatatype:te.FLOAT,componentsPerAttribute:2,values:l})),new pe(a)};B.scaleToGeodeticHeight=function(e,n,t,u){t=K(t,Se.default);let r=et,i=tt;if(n=K(n,0),u=K(u,!0),D(e)){let s=e.length;for(let o=0;o<s;o+=3)p.fromArray(e,o,i),u&&(i=t.scaleToGeodeticSurface(i,i)),n!==0&&(r=t.geodeticSurfaceNormal(i,r),p.multiplyByScalar(r,n,r),p.add(i,r,i)),e[o]=i.x,e[o+1]=i.y,e[o+2]=i.z}return e};var At=B;export{ve as a,At as b}; diff --git a/cesium/Workers/chunk-OO23RBLX.js b/cesium/Workers/chunk-OO23RBLX.js new file mode 100644 index 0000000..1283dd8 --- /dev/null +++ b/cesium/Workers/chunk-OO23RBLX.js @@ -0,0 +1,26 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.119 + * + * Copyright 2011-2022 Cesium Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Columbus View (Pat. Pend.) + * + * Portions licensed separately. + * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. + */ + +import{a as z}from"./chunk-TMSETF7M.js";import{h as I,i as b}from"./chunk-7Z5IIKOJ.js";import{a as W,b as O,d as L}from"./chunk-POASMU2N.js";import{a as m}from"./chunk-R6KGAEF6.js";import{a as v}from"./chunk-UH2WFNTA.js";import{e as k}from"./chunk-PEYJTJPE.js";var Z=Math.cos,B=Math.sin,p=Math.sqrt,N={};N.computePosition=function(t,M,g,u,G,h,a){let e=M.radiiSquared,i=t.nwCorner,r=t.boundingRectangle,n=i.latitude-t.granYCos*u+G*t.granXSin,d=Z(n),X=B(n),Y=e.z*X,s=i.longitude+u*t.granYSin+G*t.granXCos,S=d*Z(s),f=d*B(s),w=e.x*S,R=e.y*f,_=p(w*S+R*f+Y*X);if(h.x=w/_,h.y=R/_,h.z=Y/_,g){let o=t.stNwCorner;k(o)?(n=o.latitude-t.stGranYCos*u+G*t.stGranXSin,s=o.longitude+u*t.stGranYSin+G*t.stGranXCos,a.x=(s-t.stWest)*t.lonScalar,a.y=(n-t.stSouth)*t.latScalar):(a.x=(s-r.west)*t.lonScalar,a.y=(n-r.south)*t.latScalar)}};var A=new b,l=new W,F=new O,j=new W,y=new z;function D(t,M,g,u,G,h,a){let e=Math.cos(M),i=u*e,r=g*e,n=Math.sin(M),d=u*n,X=g*n;y._ellipsoid=L.default,l=y.project(t,l),l=W.subtract(l,j,l);let Y=b.fromRotation(M,A);l=b.multiplyByVector(Y,l,l),l=W.add(l,j,l),t=y.unproject(l,t),h-=1,a-=1;let s=t.latitude,S=s+h*X,f=s-i*a,w=s-i*a+h*X,R=Math.max(s,S,f,w),_=Math.min(s,S,f,w),o=t.longitude,E=o+h*r,T=o+a*d,V=o+a*d+h*r,q=Math.max(o,E,T,V),x=Math.min(o,E,T,V);return{north:R,south:_,east:q,west:x,granYCos:i,granYSin:d,granXCos:r,granXSin:X,nwCorner:t}}N.computeOptions=function(t,M,g,u,G,h,a){let e=t.east,i=t.west,r=t.north,n=t.south,d=!1,X=!1;r===m.PI_OVER_TWO&&(d=!0),n===-m.PI_OVER_TWO&&(X=!0);let Y,s=r-n;i>e?Y=m.TWO_PI-i+e:Y=e-i;let S=Math.ceil(Y/M)+1,f=Math.ceil(s/M)+1,w=Y/(S-1),R=s/(f-1),_=I.northwest(t,h),o=I.center(t,F);(g!==0||u!==0)&&(o.longitude<_.longitude&&(o.longitude+=m.TWO_PI),y._ellipsoid=L.default,j=y.project(o,j));let E=R,T=w,V=0,q=0,x=I.clone(t,G),c={granYCos:E,granYSin:V,granXCos:T,granXSin:q,nwCorner:_,boundingRectangle:x,width:S,height:f,northCap:d,southCap:X};if(g!==0){let C=D(_,g,w,R,o,S,f);if(r=C.north,n=C.south,e=C.east,i=C.west,r<-m.PI_OVER_TWO||r>m.PI_OVER_TWO||n<-m.PI_OVER_TWO||n>m.PI_OVER_TWO)throw new v("Rotated rectangle is invalid. It crosses over either the north or south pole.");c.granYCos=C.granYCos,c.granYSin=C.granYSin,c.granXCos=C.granXCos,c.granXSin=C.granXSin,x.north=r,x.south=n,x.east=e,x.west=i}if(u!==0){g=g-u;let C=I.northwest(x,a),P=D(C,g,w,R,o,S,f);c.stGranYCos=P.granYCos,c.stGranXCos=P.granXCos,c.stGranYSin=P.granYSin,c.stGranXSin=P.granXSin,c.stNwCorner=C,c.stWest=P.west,c.stSouth=P.south}return c};var st=N;export{st as a}; diff --git a/cesium/Workers/chunk-OSVMDAN4.js b/cesium/Workers/chunk-OSVMDAN4.js deleted file mode 100644 index f25873d..0000000 --- a/cesium/Workers/chunk-OSVMDAN4.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 - * - * Copyright 2011-2022 Cesium Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Columbus View (Pat. Pend.) - * - * Portions licensed separately. - * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. - */ - -import{a as p,b as P,d as q}from"./chunk-LJCGAQ64.js";import{a}from"./chunk-JFG572S7.js";import{a as T}from"./chunk-42NIXFVW.js";import{a as S,b as g}from"./chunk-5YVCOCPP.js";import{e as l}from"./chunk-U73D6PDD.js";function y(n,i,o){if(n===0)return i*o;let t=n*n,e=t*t,c=e*t,r=c*t,h=r*t,s=h*t,d=o,u=Math.sin(2*d),f=Math.sin(4*d),M=Math.sin(6*d),_=Math.sin(8*d),E=Math.sin(10*d),I=Math.sin(12*d);return i*((1-t/4-3*e/64-5*c/256-175*r/16384-441*h/65536-4851*s/1048576)*d-(3*t/8+3*e/32+45*c/1024+105*r/4096+2205*h/131072+6237*s/524288)*u+(15*e/256+45*c/1024+525*r/16384+1575*h/65536+155925*s/8388608)*f-(35*c/3072+175*r/12288+3675*h/262144+13475*s/1048576)*M+(315*r/131072+2205*h/524288+43659*s/8388608)*_-(693*h/1310720+6237*s/5242880)*E+1001*s/8388608*I)}function z(n,i,o){let t=n/o;if(i===0)return t;let e=t*t,c=e*t,r=c*t,h=i,s=h*h,d=s*s,u=d*s,f=u*s,M=f*s,_=M*s,E=Math.sin(2*t),I=Math.cos(2*t),W=Math.sin(4*t),V=Math.cos(4*t),C=Math.sin(6*t),N=Math.cos(6*t),R=Math.sin(8*t),b=Math.cos(8*t),x=Math.sin(10*t),U=Math.cos(10*t),H=Math.sin(12*t);return t+t*s/4+7*t*d/64+15*t*u/256+579*t*f/16384+1515*t*M/65536+16837*t*_/1048576+(3*t*d/16+45*t*u/256-t*(32*e-561)*f/4096-t*(232*e-1677)*M/16384+t*(399985-90560*e+512*r)*_/5242880)*I+(21*t*u/256+483*t*f/4096-t*(224*e-1969)*M/16384-t*(33152*e-112599)*_/1048576)*V+(151*t*f/4096+4681*t*M/65536+1479*t*_/16384-453*c*_/32768)*N+(1097*t*M/65536+42783*t*_/1048576)*b+8011*t*_/1048576*U+(3*s/8+3*d/16+213*u/2048-3*e*u/64+255*f/4096-33*e*f/512+20861*M/524288-33*e*M/512+r*M/1024+28273*_/1048576-471*e*_/8192+9*r*_/4096)*E+(21*d/256+21*u/256+533*f/8192-21*e*f/512+197*M/4096-315*e*M/4096+584039*_/16777216-12517*e*_/131072+7*r*_/2048)*W+(151*u/6144+151*f/4096+5019*M/131072-453*e*M/16384+26965*_/786432-8607*e*_/131072)*C+(1097*f/131072+1097*M/65536+225797*_/10485760-1097*e*_/65536)*R+(8011*M/2621440+8011*_/1048576)*x+293393*_/251658240*H}function O(n,i){if(n===0)return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)));let o=n*Math.sin(i);return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)))-n/2*Math.log((1+o)/(1-o))}function G(n,i,o,t,e){let c=O(n._ellipticity,o),r=O(n._ellipticity,e);return Math.atan2(a.negativePiToPi(t-i),r-c)}function k(n,i,o,t,e,c,r){let h=n._heading,s=c-t,d=0;if(a.equalsEpsilon(Math.abs(h),a.PI_OVER_TWO,a.EPSILON8))if(i===o)d=i*Math.cos(e)*a.negativePiToPi(s);else{let u=Math.sin(e);d=i*Math.cos(e)*a.negativePiToPi(s)/Math.sqrt(1-n._ellipticitySquared*u*u)}else{let u=y(n._ellipticity,i,e);d=(y(n._ellipticity,i,r)-u)/Math.cos(h)}return Math.abs(d)}var A=new p,w=new p;function D(n,i,o,t){let e=p.normalize(t.cartographicToCartesian(i,w),A),c=p.normalize(t.cartographicToCartesian(o,w),w);g.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(p.angleBetween(e,c))-Math.PI),.0125);let r=t.maximumRadius,h=t.minimumRadius,s=r*r,d=h*h;n._ellipticitySquared=(s-d)/s,n._ellipticity=Math.sqrt(n._ellipticitySquared),n._start=P.clone(i,n._start),n._start.height=0,n._end=P.clone(o,n._end),n._end.height=0,n._heading=G(n,i.longitude,i.latitude,o.longitude,o.latitude),n._distance=k(n,t.maximumRadius,t.minimumRadius,i.longitude,i.latitude,o.longitude,o.latitude)}function v(n,i,o,t,e,c){if(o===0)return P.clone(n,c);let r=e*e,h,s,d;if(Math.abs(a.PI_OVER_TWO-Math.abs(i))>a.EPSILON8){let u=y(e,t,n.latitude),f=o*Math.cos(i),M=u+f;if(s=z(M,e,t),Math.abs(i)<a.EPSILON10)h=a.negativePiToPi(n.longitude);else{let _=O(e,n.latitude),E=O(e,s);d=Math.tan(i)*(E-_),h=a.negativePiToPi(n.longitude+d)}}else{s=n.latitude;let u;if(e===0)u=t*Math.cos(n.latitude);else{let f=Math.sin(n.latitude);u=t*Math.cos(n.latitude)/Math.sqrt(1-r*f*f)}d=o/u,i>0?h=a.negativePiToPi(n.longitude+d):h=a.negativePiToPi(n.longitude-d)}return l(c)?(c.longitude=h,c.latitude=s,c.height=0,c):new P(h,s,0)}function m(n,i,o){let t=T(o,q.WGS84);this._ellipsoid=t,this._start=new P,this._end=new P,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(n)&&l(i)&&D(this,n,i,t)}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return g.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return g.defined("distance",this._distance),this._heading}}});m.fromStartHeadingDistance=function(n,i,o,t,e){g.defined("start",n),g.defined("heading",i),g.defined("distance",o),g.typeOf.number.greaterThan("distance",o,0);let c=T(t,q.WGS84),r=c.maximumRadius,h=c.minimumRadius,s=r*r,d=h*h,u=Math.sqrt((s-d)/s);i=a.negativePiToPi(i);let f=v(n,i,o,c.maximumRadius,u);return!l(e)||l(t)&&!t.equals(e.ellipsoid)?new m(n,f,c):(e.setEndPoints(n,f),e)};m.prototype.setEndPoints=function(n,i){g.defined("start",n),g.defined("end",i),D(this,n,i,this._ellipsoid)};m.prototype.interpolateUsingFraction=function(n,i){return this.interpolateUsingSurfaceDistance(n*this._distance,i)};m.prototype.interpolateUsingSurfaceDistance=function(n,i){if(g.typeOf.number("distance",n),!l(this._distance)||this._distance===0)throw new S("EllipsoidRhumbLine must have distinct start and end set.");return v(this._start,this._heading,n,this._ellipsoid.maximumRadius,this._ellipticity,i)};m.prototype.findIntersectionWithLongitude=function(n,i){if(g.typeOf.number("intersectionLongitude",n),!l(this._distance)||this._distance===0)throw new S("EllipsoidRhumbLine must have distinct start and end set.");let o=this._ellipticity,t=this._heading,e=Math.abs(t),c=this._start;if(n=a.negativePiToPi(n),a.equalsEpsilon(Math.abs(n),Math.PI,a.EPSILON14)&&(n=a.sign(c.longitude)*Math.PI),l(i)||(i=new P),Math.abs(a.PI_OVER_TWO-e)<=a.EPSILON8)return i.longitude=n,i.latitude=c.latitude,i.height=0,i;if(a.equalsEpsilon(Math.abs(a.PI_OVER_TWO-e),a.PI_OVER_TWO,a.EPSILON8))return a.equalsEpsilon(n,c.longitude,a.EPSILON12)?void 0:(i.longitude=n,i.latitude=a.PI_OVER_TWO*a.sign(a.PI_OVER_TWO-t),i.height=0,i);let r=c.latitude,h=o*Math.sin(r),s=Math.tan(.5*(a.PI_OVER_TWO+r))*Math.exp((n-c.longitude)/Math.tan(t)),d=(1+h)/(1-h),u=c.latitude,f;do{f=u;let M=o*Math.sin(f),_=(1+M)/(1-M);u=2*Math.atan(s*Math.pow(_/d,o/2))-a.PI_OVER_TWO}while(!a.equalsEpsilon(u,f,a.EPSILON12));return i.longitude=n,i.latitude=u,i.height=0,i};m.prototype.findIntersectionWithLatitude=function(n,i){if(g.typeOf.number("intersectionLatitude",n),!l(this._distance)||this._distance===0)throw new S("EllipsoidRhumbLine must have distinct start and end set.");let o=this._ellipticity,t=this._heading,e=this._start;if(a.equalsEpsilon(Math.abs(t),a.PI_OVER_TWO,a.EPSILON8))return;let c=O(o,e.latitude),r=O(o,n),h=Math.tan(t)*(r-c),s=a.negativePiToPi(e.longitude+h);return l(i)?(i.longitude=s,i.latitude=n,i.height=0,i):new P(s,n,0)};var $=m;export{$ as a}; diff --git a/cesium/Workers/chunk-RQXB4B4V.js b/cesium/Workers/chunk-P37AI2DW.js similarity index 91% rename from cesium/Workers/chunk-RQXB4B4V.js rename to cesium/Workers/chunk-P37AI2DW.js index 3450df5..238d738 100644 --- a/cesium/Workers/chunk-RQXB4B4V.js +++ b/cesium/Workers/chunk-P37AI2DW.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a}from"./chunk-JFG572S7.js";import{a as N}from"./chunk-JZYZ7RT4.js";import{a as t}from"./chunk-5YVCOCPP.js";import{e as i}from"./chunk-U73D6PDD.js";var r={UNSIGNED_BYTE:N.UNSIGNED_BYTE,UNSIGNED_SHORT:N.UNSIGNED_SHORT,UNSIGNED_INT:N.UNSIGNED_INT};r.getSizeInBytes=function(e){switch(e){case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t("indexDatatype is required and must be a valid IndexDatatype constant.")};r.fromSizeInBytes=function(e){switch(e){case 2:return r.UNSIGNED_SHORT;case 4:return r.UNSIGNED_INT;case 1:return r.UNSIGNED_BYTE;default:throw new t("Size in bytes cannot be mapped to an IndexDatatype")}};r.validate=function(e){return i(e)&&(e===r.UNSIGNED_BYTE||e===r.UNSIGNED_SHORT||e===r.UNSIGNED_INT)};r.createTypedArray=function(e,n){if(!i(e))throw new t("numberOfVertices is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n):new Uint16Array(n)};r.createTypedArrayFromArrayBuffer=function(e,n,E,o){if(!i(e))throw new t("numberOfVertices is required.");if(!i(n))throw new t("sourceArray is required.");if(!i(E))throw new t("byteOffset is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n,E,o):new Uint16Array(n,E,o)};r.fromTypedArray=function(e){if(e instanceof Uint8Array)return r.UNSIGNED_BYTE;if(e instanceof Uint16Array)return r.UNSIGNED_SHORT;if(e instanceof Uint32Array)return r.UNSIGNED_INT;throw new t("array must be a Uint8Array, Uint16Array, or Uint32Array.")};var u=Object.freeze(r);export{u as a}; +import{a}from"./chunk-R6KGAEF6.js";import{a as N}from"./chunk-3C7WC463.js";import{a as t}from"./chunk-UH2WFNTA.js";import{e as i}from"./chunk-PEYJTJPE.js";var r={UNSIGNED_BYTE:N.UNSIGNED_BYTE,UNSIGNED_SHORT:N.UNSIGNED_SHORT,UNSIGNED_INT:N.UNSIGNED_INT};r.getSizeInBytes=function(e){switch(e){case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t("indexDatatype is required and must be a valid IndexDatatype constant.")};r.fromSizeInBytes=function(e){switch(e){case 2:return r.UNSIGNED_SHORT;case 4:return r.UNSIGNED_INT;case 1:return r.UNSIGNED_BYTE;default:throw new t("Size in bytes cannot be mapped to an IndexDatatype")}};r.validate=function(e){return i(e)&&(e===r.UNSIGNED_BYTE||e===r.UNSIGNED_SHORT||e===r.UNSIGNED_INT)};r.createTypedArray=function(e,n){if(!i(e))throw new t("numberOfVertices is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n):new Uint16Array(n)};r.createTypedArrayFromArrayBuffer=function(e,n,E,o){if(!i(e))throw new t("numberOfVertices is required.");if(!i(n))throw new t("sourceArray is required.");if(!i(E))throw new t("byteOffset is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n,E,o):new Uint16Array(n,E,o)};r.fromTypedArray=function(e){if(e instanceof Uint8Array)return r.UNSIGNED_BYTE;if(e instanceof Uint16Array)return r.UNSIGNED_SHORT;if(e instanceof Uint32Array)return r.UNSIGNED_INT;throw new t("array must be a Uint8Array, Uint16Array, or Uint32Array.")};var u=Object.freeze(r);export{u as a}; diff --git a/cesium/Workers/chunk-REUYHR24.js b/cesium/Workers/chunk-PDMQLSBL.js similarity index 90% rename from cesium/Workers/chunk-REUYHR24.js rename to cesium/Workers/chunk-PDMQLSBL.js index 77f624b..1e35c23 100644 --- a/cesium/Workers/chunk-REUYHR24.js +++ b/cesium/Workers/chunk-PDMQLSBL.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as l,b as d}from"./chunk-CMXCDAKR.js";import{a as t}from"./chunk-LJCGAQ64.js";import{a as s}from"./chunk-JFG572S7.js";import{a as f,b as r}from"./chunk-5YVCOCPP.js";import{e as m}from"./chunk-U73D6PDD.js";function o(e,n){if(r.typeOf.object("normal",e),!s.equalsEpsilon(t.magnitude(e),1,s.EPSILON6))throw new f("normal must be normalized.");r.typeOf.number("distance",n),this.normal=t.clone(e),this.distance=n}o.fromPointNormal=function(e,n,a){if(r.typeOf.object("point",e),r.typeOf.object("normal",n),!s.equalsEpsilon(t.magnitude(n),1,s.EPSILON6))throw new f("normal must be normalized.");let c=-t.dot(n,e);return m(a)?(t.clone(n,a.normal),a.distance=c,a):new o(n,c)};var b=new t;o.fromCartesian4=function(e,n){r.typeOf.object("coefficients",e);let a=t.fromCartesian4(e,b),c=e.w;if(!s.equalsEpsilon(t.magnitude(a),1,s.EPSILON6))throw new f("normal must be normalized.");return m(n)?(t.clone(a,n.normal),n.distance=c,n):new o(a,c)};o.getPointDistance=function(e,n){return r.typeOf.object("plane",e),r.typeOf.object("point",n),t.dot(e.normal,n)+e.distance};var y=new t;o.projectPointOntoPlane=function(e,n,a){r.typeOf.object("plane",e),r.typeOf.object("point",n),m(a)||(a=new t);let c=o.getPointDistance(e,n),p=t.multiplyByScalar(e.normal,c,y);return t.subtract(n,p,a)};var w=new d,j=new l,N=new t;o.transform=function(e,n,a){r.typeOf.object("plane",e),r.typeOf.object("transform",n);let c=e.normal,p=e.distance,u=d.inverseTranspose(n,w),i=l.fromElements(c.x,c.y,c.z,p,j);i=d.multiplyByVector(u,i,i);let O=t.fromCartesian4(i,N);return i=l.divideByScalar(i,t.magnitude(O),i),o.fromCartesian4(i,a)};o.clone=function(e,n){return r.typeOf.object("plane",e),m(n)?(t.clone(e.normal,n.normal),n.distance=e.distance,n):new o(e.normal,e.distance)};o.equals=function(e,n){return r.typeOf.object("left",e),r.typeOf.object("right",n),e.distance===n.distance&&t.equals(e.normal,n.normal)};o.ORIGIN_XY_PLANE=Object.freeze(new o(t.UNIT_Z,0));o.ORIGIN_YZ_PLANE=Object.freeze(new o(t.UNIT_X,0));o.ORIGIN_ZX_PLANE=Object.freeze(new o(t.UNIT_Y,0));var T=o;export{T as a}; +import{a as l,b as d}from"./chunk-7Z5IIKOJ.js";import{a as t}from"./chunk-POASMU2N.js";import{a as s}from"./chunk-R6KGAEF6.js";import{a as f,b as r}from"./chunk-UH2WFNTA.js";import{e as m}from"./chunk-PEYJTJPE.js";function o(e,n){if(r.typeOf.object("normal",e),!s.equalsEpsilon(t.magnitude(e),1,s.EPSILON6))throw new f("normal must be normalized.");r.typeOf.number("distance",n),this.normal=t.clone(e),this.distance=n}o.fromPointNormal=function(e,n,a){if(r.typeOf.object("point",e),r.typeOf.object("normal",n),!s.equalsEpsilon(t.magnitude(n),1,s.EPSILON6))throw new f("normal must be normalized.");let c=-t.dot(n,e);return m(a)?(t.clone(n,a.normal),a.distance=c,a):new o(n,c)};var b=new t;o.fromCartesian4=function(e,n){r.typeOf.object("coefficients",e);let a=t.fromCartesian4(e,b),c=e.w;if(!s.equalsEpsilon(t.magnitude(a),1,s.EPSILON6))throw new f("normal must be normalized.");return m(n)?(t.clone(a,n.normal),n.distance=c,n):new o(a,c)};o.getPointDistance=function(e,n){return r.typeOf.object("plane",e),r.typeOf.object("point",n),t.dot(e.normal,n)+e.distance};var y=new t;o.projectPointOntoPlane=function(e,n,a){r.typeOf.object("plane",e),r.typeOf.object("point",n),m(a)||(a=new t);let c=o.getPointDistance(e,n),p=t.multiplyByScalar(e.normal,c,y);return t.subtract(n,p,a)};var w=new d,j=new l,N=new t;o.transform=function(e,n,a){r.typeOf.object("plane",e),r.typeOf.object("transform",n);let c=e.normal,p=e.distance,u=d.inverseTranspose(n,w),i=l.fromElements(c.x,c.y,c.z,p,j);i=d.multiplyByVector(u,i,i);let O=t.fromCartesian4(i,N);return i=l.divideByScalar(i,t.magnitude(O),i),o.fromCartesian4(i,a)};o.clone=function(e,n){return r.typeOf.object("plane",e),m(n)?(t.clone(e.normal,n.normal),n.distance=e.distance,n):new o(e.normal,e.distance)};o.equals=function(e,n){return r.typeOf.object("left",e),r.typeOf.object("right",n),e.distance===n.distance&&t.equals(e.normal,n.normal)};o.ORIGIN_XY_PLANE=Object.freeze(new o(t.UNIT_Z,0));o.ORIGIN_YZ_PLANE=Object.freeze(new o(t.UNIT_X,0));o.ORIGIN_ZX_PLANE=Object.freeze(new o(t.UNIT_Y,0));var T=o;export{T as a}; diff --git a/cesium/Workers/chunk-U73D6PDD.js b/cesium/Workers/chunk-PEYJTJPE.js similarity index 98% rename from cesium/Workers/chunk-U73D6PDD.js rename to cesium/Workers/chunk-PEYJTJPE.js index e035d3b..b58af3e 100644 --- a/cesium/Workers/chunk-U73D6PDD.js +++ b/cesium/Workers/chunk-PEYJTJPE.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * diff --git a/cesium/Workers/chunk-POASMU2N.js b/cesium/Workers/chunk-POASMU2N.js new file mode 100644 index 0000000..0032f5d --- /dev/null +++ b/cesium/Workers/chunk-POASMU2N.js @@ -0,0 +1,28 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.119 + * + * Copyright 2011-2022 Cesium Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Columbus View (Pat. Pend.) + * + * Portions licensed separately. + * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. + */ + +import{a as w}from"./chunk-R6KGAEF6.js";import{a as O}from"./chunk-IUA6FAOZ.js";import{a as S,b as c}from"./chunk-UH2WFNTA.js";import{e as u}from"./chunk-PEYJTJPE.js";function f(n,e,o){this.x=O(n,0),this.y=O(e,0),this.z=O(o,0)}f.fromSpherical=function(n,e){c.typeOf.object("spherical",n),u(e)||(e=new f);let o=n.clock,t=n.cone,i=O(n.magnitude,1),p=i*Math.sin(t);return e.x=p*Math.cos(o),e.y=p*Math.sin(o),e.z=i*Math.cos(t),e};f.fromElements=function(n,e,o,t){return u(t)?(t.x=n,t.y=e,t.z=o,t):new f(n,e,o)};f.clone=function(n,e){if(u(n))return u(e)?(e.x=n.x,e.y=n.y,e.z=n.z,e):new f(n.x,n.y,n.z)};f.fromCartesian4=f.clone;f.packedLength=3;f.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=O(o,0),e[o++]=n.x,e[o++]=n.y,e[o]=n.z,e};f.unpack=function(n,e,o){return c.defined("array",n),e=O(e,0),u(o)||(o=new f),o.x=n[e++],o.y=n[e++],o.z=n[e],o};f.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*3;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new S("If result is a typed array, it must have exactly array.length * 3 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)f.pack(n[i],e,i*3);return e};f.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,3),n.length%3!==0)throw new S("array length must be a multiple of 3.");let o=n.length;u(e)?e.length=o/3:e=new Array(o/3);for(let t=0;t<o;t+=3){let i=t/3;e[i]=f.unpack(n,t,e[i])}return e};f.fromArray=f.unpack;f.maximumComponent=function(n){return c.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z)};f.minimumComponent=function(n){return c.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z)};f.minimumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o.z=Math.min(n.z,e.z),o};f.maximumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o.z=Math.max(n.z,e.z),o};f.clamp=function(n,e,o,t){c.typeOf.object("value",n),c.typeOf.object("min",e),c.typeOf.object("max",o),c.typeOf.object("result",t);let i=w.clamp(n.x,e.x,o.x),p=w.clamp(n.y,e.y,o.y),d=w.clamp(n.z,e.z,o.z);return t.x=i,t.y=p,t.z=d,t};f.magnitudeSquared=function(n){return c.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z};f.magnitude=function(n){return Math.sqrt(f.magnitudeSquared(n))};var G=new f;f.distance=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),f.subtract(n,e,G),f.magnitude(G)};f.distanceSquared=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),f.subtract(n,e,G),f.magnitudeSquared(G)};f.normalize=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=f.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,e.z=n.z/o,isNaN(e.x)||isNaN(e.y)||isNaN(e.z))throw new S("normalized result is not a number");return e};f.dot=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.x+n.y*e.y+n.z*e.z};f.multiplyComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o.z=n.z*e.z,o};f.divideComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o.z=n.z/e.z,o};f.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o.z=n.z+e.z,o};f.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o.z=n.z-e.z,o};f.multiplyByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o.z=n.z*e,o};f.divideByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o.z=n.z/e,o};f.negate=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e.z=-n.z,e};f.abs=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e.z=Math.abs(n.z),e};var ln=new f;f.lerp=function(n,e,o,t){return c.typeOf.object("start",n),c.typeOf.object("end",e),c.typeOf.number("t",o),c.typeOf.object("result",t),f.multiplyByScalar(e,o,ln),t=f.multiplyByScalar(n,1-o,t),f.add(ln,t,t)};var Y=new f,yn=new f;f.angleBetween=function(n,e){c.typeOf.object("left",n),c.typeOf.object("right",e),f.normalize(n,Y),f.normalize(e,yn);let o=f.dot(Y,yn),t=f.magnitude(f.cross(Y,yn,Y));return Math.atan2(t,o)};var Xn=new f;f.mostOrthogonalAxis=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=f.normalize(n,Xn);return f.abs(o,o),o.x<=o.y?o.x<=o.z?e=f.clone(f.UNIT_X,e):e=f.clone(f.UNIT_Z,e):o.y<=o.z?e=f.clone(f.UNIT_Y,e):e=f.clone(f.UNIT_Z,e),e};f.projectVector=function(n,e,o){c.defined("a",n),c.defined("b",e),c.defined("result",o);let t=f.dot(n,e)/f.dot(e,e);return f.multiplyByScalar(e,t,o)};f.equals=function(n,e){return n===e||u(n)&&u(e)&&n.x===e.x&&n.y===e.y&&n.z===e.z};f.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]&&n.z===e[o+2]};f.equalsEpsilon=function(n,e,o,t){return n===e||u(n)&&u(e)&&w.equalsEpsilon(n.x,e.x,o,t)&&w.equalsEpsilon(n.y,e.y,o,t)&&w.equalsEpsilon(n.z,e.z,o,t)};f.cross=function(n,e,o){c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o);let t=n.x,i=n.y,p=n.z,d=e.x,m=e.y,s=e.z,h=i*s-p*m,j=p*d-t*s,z=t*m-i*d;return o.x=h,o.y=j,o.z=z,o};f.midpoint=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=(n.x+e.x)*.5,o.y=(n.y+e.y)*.5,o.z=(n.z+e.z)*.5,o};f.fromDegrees=function(n,e,o,t,i){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),n=w.toRadians(n),e=w.toRadians(e),f.fromRadians(n,e,o,t,i)};var C=new f,v=new f;f._ellipsoidRadiiSquared=new f(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);f.fromRadians=function(n,e,o,t,i){c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),o=O(o,0);let p=u(t)?t.radiiSquared:f._ellipsoidRadiiSquared,d=Math.cos(e);C.x=d*Math.cos(n),C.y=d*Math.sin(n),C.z=Math.sin(e),C=f.normalize(C,C),f.multiplyComponents(p,C,v);let m=Math.sqrt(f.dot(C,v));return v=f.divideByScalar(v,m,v),C=f.multiplyByScalar(C,o,C),u(i)||(i=new f),f.add(v,C,i)};f.fromDegreesArray=function(n,e,o){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new S("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;u(o)?o.length=t/2:o=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],d=n[i+1],m=i/2;o[m]=f.fromDegrees(p,d,0,e,o[m])}return o};f.fromRadiansArray=function(n,e,o){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new S("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;u(o)?o.length=t/2:o=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],d=n[i+1],m=i/2;o[m]=f.fromRadians(p,d,0,e,o[m])}return o};f.fromDegreesArrayHeights=function(n,e,o){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new S("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;u(o)?o.length=t/3:o=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],d=n[i+1],m=n[i+2],s=i/3;o[s]=f.fromDegrees(p,d,m,e,o[s])}return o};f.fromRadiansArrayHeights=function(n,e,o){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new S("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;u(o)?o.length=t/3:o=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],d=n[i+1],m=n[i+2],s=i/3;o[s]=f.fromRadians(p,d,m,e,o[s])}return o};f.ZERO=Object.freeze(new f(0,0,0));f.ONE=Object.freeze(new f(1,1,1));f.UNIT_X=Object.freeze(new f(1,0,0));f.UNIT_Y=Object.freeze(new f(0,1,0));f.UNIT_Z=Object.freeze(new f(0,0,1));f.prototype.clone=function(n){return f.clone(this,n)};f.prototype.equals=function(n){return f.equals(this,n)};f.prototype.equalsEpsilon=function(n,e,o){return f.equalsEpsilon(this,n,e,o)};f.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var y=f;var Yn=new y,Gn=new y;function Hn(n,e,o,t,i){if(!u(n))throw new S("cartesian is required.");if(!u(e))throw new S("oneOverRadii is required.");if(!u(o))throw new S("oneOverRadiiSquared is required.");if(!u(t))throw new S("centerToleranceSquared is required.");let p=n.x,d=n.y,m=n.z,s=e.x,h=e.y,j=e.z,z=p*p*s*s,M=d*d*h*h,q=m*m*j*j,N=z+M+q,l=Math.sqrt(1/N),x=y.multiplyByScalar(n,l,Yn);if(N<t)return isFinite(l)?y.clone(x,i):void 0;let U=o.x,I=o.y,P=o.z,k=Gn;k.x=x.x*U*2,k.y=x.y*I*2,k.z=x.z*P*2;let X=(1-l)*y.magnitude(n)/(.5*y.magnitude(k)),Mn=0,pn,qn,L,V,W,un,an,dn,En,An,_n;do{X-=Mn,L=1/(1+X*U),V=1/(1+X*I),W=1/(1+X*P),un=L*L,an=V*V,dn=W*W,En=un*L,An=an*V,_n=dn*W,pn=z*un+M*an+q*dn-1,qn=z*En*U+M*An*I+q*_n*P;let Zn=-2*qn;Mn=pn/Zn}while(Math.abs(pn)>w.EPSILON12);return u(i)?(i.x=p*L,i.y=d*V,i.z=m*W,i):new y(p*L,d*V,m*W)}var H=Hn;function g(n,e,o){this.longitude=O(n,0),this.latitude=O(e,0),this.height=O(o,0)}g.fromRadians=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),o=O(o,0),u(t)?(t.longitude=n,t.latitude=e,t.height=o,t):new g(n,e,o)};g.fromDegrees=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),n=w.toRadians(n),e=w.toRadians(e),g.fromRadians(n,e,o,t)};var Qn=new y,Kn=new y,Jn=new y;g._ellipsoidOneOverRadii=new y(1/6378137,1/6378137,1/6356752314245179e-9);g._ellipsoidOneOverRadiiSquared=new y(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));g._ellipsoidCenterToleranceSquared=w.EPSILON1;g.fromCartesian=function(n,e,o){let t=u(e)?e.oneOverRadii:g._ellipsoidOneOverRadii,i=u(e)?e.oneOverRadiiSquared:g._ellipsoidOneOverRadiiSquared,p=u(e)?e._centerToleranceSquared:g._ellipsoidCenterToleranceSquared,d=H(n,t,i,p,Kn);if(!u(d))return;let m=y.multiplyComponents(d,i,Qn);m=y.normalize(m,m);let s=y.subtract(n,d,Jn),h=Math.atan2(m.y,m.x),j=Math.asin(m.z),z=w.sign(y.dot(s,n))*y.magnitude(s);return u(o)?(o.longitude=h,o.latitude=j,o.height=z,o):new g(h,j,z)};g.toCartesian=function(n,e,o){return c.defined("cartographic",n),y.fromRadians(n.longitude,n.latitude,n.height,e,o)};g.clone=function(n,e){if(u(n))return u(e)?(e.longitude=n.longitude,e.latitude=n.latitude,e.height=n.height,e):new g(n.longitude,n.latitude,n.height)};g.equals=function(n,e){return n===e||u(n)&&u(e)&&n.longitude===e.longitude&&n.latitude===e.latitude&&n.height===e.height};g.equalsEpsilon=function(n,e,o){return o=O(o,0),n===e||u(n)&&u(e)&&Math.abs(n.longitude-e.longitude)<=o&&Math.abs(n.latitude-e.latitude)<=o&&Math.abs(n.height-e.height)<=o};g.ZERO=Object.freeze(new g(0,0,0));g.prototype.clone=function(n){return g.clone(this,n)};g.prototype.equals=function(n){return g.equals(this,n)};g.prototype.equalsEpsilon=function(n,e){return g.equalsEpsilon(this,n,e)};g.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var D=g;function a(n,e){this.x=O(n,0),this.y=O(e,0)}a.fromElements=function(n,e,o){return u(o)?(o.x=n,o.y=e,o):new a(n,e)};a.clone=function(n,e){if(u(n))return u(e)?(e.x=n.x,e.y=n.y,e):new a(n.x,n.y)};a.fromCartesian3=a.clone;a.fromCartesian4=a.clone;a.packedLength=2;a.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=O(o,0),e[o++]=n.x,e[o]=n.y,e};a.unpack=function(n,e,o){return c.defined("array",n),e=O(e,0),u(o)||(o=new a),o.x=n[e++],o.y=n[e],o};a.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*2;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new S("If result is a typed array, it must have exactly array.length * 2 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)a.pack(n[i],e,i*2);return e};a.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,2),n.length%2!==0)throw new S("array length must be a multiple of 2.");let o=n.length;u(e)?e.length=o/2:e=new Array(o/2);for(let t=0;t<o;t+=2){let i=t/2;e[i]=a.unpack(n,t,e[i])}return e};a.fromArray=a.unpack;a.maximumComponent=function(n){return c.typeOf.object("cartesian",n),Math.max(n.x,n.y)};a.minimumComponent=function(n){return c.typeOf.object("cartesian",n),Math.min(n.x,n.y)};a.minimumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o};a.maximumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o};a.clamp=function(n,e,o,t){c.typeOf.object("value",n),c.typeOf.object("min",e),c.typeOf.object("max",o),c.typeOf.object("result",t);let i=w.clamp(n.x,e.x,o.x),p=w.clamp(n.y,e.y,o.y);return t.x=i,t.y=p,t};a.magnitudeSquared=function(n){return c.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y};a.magnitude=function(n){return Math.sqrt(a.magnitudeSquared(n))};var Q=new a;a.distance=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.subtract(n,e,Q),a.magnitude(Q)};a.distanceSquared=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.subtract(n,e,Q),a.magnitudeSquared(Q)};a.normalize=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=a.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,isNaN(e.x)||isNaN(e.y))throw new S("normalized result is not a number");return e};a.dot=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.x+n.y*e.y};a.cross=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.y-n.y*e.x};a.multiplyComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o};a.divideComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o};a.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o};a.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o};a.multiplyByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o};a.divideByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o};a.negate=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e};a.abs=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e};var Cn=new a;a.lerp=function(n,e,o,t){return c.typeOf.object("start",n),c.typeOf.object("end",e),c.typeOf.number("t",o),c.typeOf.object("result",t),a.multiplyByScalar(e,o,Cn),t=a.multiplyByScalar(n,1-o,t),a.add(Cn,t,t)};var Tn=new a,Nn=new a;a.angleBetween=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.normalize(n,Tn),a.normalize(e,Nn),w.acosClamped(a.dot(Tn,Nn))};var ne=new a;a.mostOrthogonalAxis=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=a.normalize(n,ne);return a.abs(o,o),o.x<=o.y?e=a.clone(a.UNIT_X,e):e=a.clone(a.UNIT_Y,e),e};a.equals=function(n,e){return n===e||u(n)&&u(e)&&n.x===e.x&&n.y===e.y};a.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]};a.equalsEpsilon=function(n,e,o,t){return n===e||u(n)&&u(e)&&w.equalsEpsilon(n.x,e.x,o,t)&&w.equalsEpsilon(n.y,e.y,o,t)};a.ZERO=Object.freeze(new a(0,0));a.ONE=Object.freeze(new a(1,1));a.UNIT_X=Object.freeze(new a(1,0));a.UNIT_Y=Object.freeze(new a(0,1));a.prototype.clone=function(n){return a.clone(this,n)};a.prototype.equals=function(n){return a.equals(this,n)};a.prototype.equalsEpsilon=function(n,e,o){return a.equalsEpsilon(this,n,e,o)};a.prototype.toString=function(){return`(${this.x}, ${this.y})`};var mn=a;function Fn(n,e,o,t){e=O(e,0),o=O(o,0),t=O(t,0),c.typeOf.number.greaterThanOrEquals("x",e,0),c.typeOf.number.greaterThanOrEquals("y",o,0),c.typeOf.number.greaterThanOrEquals("z",t,0),n._radii=new y(e,o,t),n._radiiSquared=new y(e*e,o*o,t*t),n._radiiToTheFourth=new y(e*e*e*e,o*o*o*o,t*t*t*t),n._oneOverRadii=new y(e===0?0:1/e,o===0?0:1/o,t===0?0:1/t),n._oneOverRadiiSquared=new y(e===0?0:1/(e*e),o===0?0:1/(o*o),t===0?0:1/(t*t)),n._minimumRadius=Math.min(e,o,t),n._maximumRadius=Math.max(e,o,t),n._centerToleranceSquared=w.EPSILON1,n._radiiSquared.z!==0&&(n._squaredXOverSquaredZ=n._radiiSquared.x/n._radiiSquared.z)}function b(n,e,o){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,Fn(this,n,e,o)}Object.defineProperties(b.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});b.clone=function(n,e){if(!u(n))return;let o=n._radii;return u(e)?(y.clone(o,e._radii),y.clone(n._radiiSquared,e._radiiSquared),y.clone(n._radiiToTheFourth,e._radiiToTheFourth),y.clone(n._oneOverRadii,e._oneOverRadii),y.clone(n._oneOverRadiiSquared,e._oneOverRadiiSquared),e._minimumRadius=n._minimumRadius,e._maximumRadius=n._maximumRadius,e._centerToleranceSquared=n._centerToleranceSquared,e):new b(o.x,o.y,o.z)};b.fromCartesian3=function(n,e){return u(e)||(e=new b),u(n)&&Fn(e,n.x,n.y,n.z),e};b.WGS84=Object.freeze(new b(6378137,6378137,6356752314245179e-9));b.UNIT_SPHERE=Object.freeze(new b(1,1,1));b.MOON=Object.freeze(new b(w.LUNAR_RADIUS,w.LUNAR_RADIUS,w.LUNAR_RADIUS));b._default=b.WGS84;Object.defineProperties(b,{default:{get:function(){return b._default},set:function(n){c.typeOf.object("value",n),b._default=n,y._ellipsoidRadiiSquared=n.radiiSquared,D._ellipsoidOneOverRadii=n.oneOverRadii,D._ellipsoidOneOverRadiiSquared=n.oneOverRadiiSquared,D._ellipsoidCenterToleranceSquared=n._centerToleranceSquared}}});b.prototype.clone=function(n){return b.clone(this,n)};b.packedLength=y.packedLength;b.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=O(o,0),y.pack(n._radii,e,o),e};b.unpack=function(n,e,o){c.defined("array",n),e=O(e,0);let t=y.unpack(n,e);return b.fromCartesian3(t,o)};b.prototype.geocentricSurfaceNormal=y.normalize;b.prototype.geodeticSurfaceNormalCartographic=function(n,e){c.typeOf.object("cartographic",n);let o=n.longitude,t=n.latitude,i=Math.cos(t),p=i*Math.cos(o),d=i*Math.sin(o),m=Math.sin(t);return u(e)||(e=new y),e.x=p,e.y=d,e.z=m,y.normalize(e,e)};b.prototype.geodeticSurfaceNormal=function(n,e){if(c.typeOf.object("cartesian",n),isNaN(n.x)||isNaN(n.y)||isNaN(n.z))throw new S("cartesian has a NaN component");if(!y.equalsEpsilon(n,y.ZERO,w.EPSILON14))return u(e)||(e=new y),e=y.multiplyComponents(n,this._oneOverRadiiSquared,e),y.normalize(e,e)};var ee=new y,oe=new y;b.prototype.cartographicToCartesian=function(n,e){let o=ee,t=oe;this.geodeticSurfaceNormalCartographic(n,o),y.multiplyComponents(this._radiiSquared,o,t);let i=Math.sqrt(y.dot(o,t));return y.divideByScalar(t,i,t),y.multiplyByScalar(o,n.height,o),u(e)||(e=new y),y.add(t,o,e)};b.prototype.cartographicArrayToCartesianArray=function(n,e){c.defined("cartographics",n);let o=n.length;u(e)?e.length=o:e=new Array(o);for(let t=0;t<o;t++)e[t]=this.cartographicToCartesian(n[t],e[t]);return e};var te=new y,ce=new y,ie=new y;b.prototype.cartesianToCartographic=function(n,e){let o=this.scaleToGeodeticSurface(n,ce);if(!u(o))return;let t=this.geodeticSurfaceNormal(o,te),i=y.subtract(n,o,ie),p=Math.atan2(t.y,t.x),d=Math.asin(t.z),m=w.sign(y.dot(i,n))*y.magnitude(i);return u(e)?(e.longitude=p,e.latitude=d,e.height=m,e):new D(p,d,m)};b.prototype.cartesianArrayToCartographicArray=function(n,e){c.defined("cartesians",n);let o=n.length;u(e)?e.length=o:e=new Array(o);for(let t=0;t<o;++t)e[t]=this.cartesianToCartographic(n[t],e[t]);return e};b.prototype.scaleToGeodeticSurface=function(n,e){return H(n,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,e)};b.prototype.scaleToGeocentricSurface=function(n,e){c.typeOf.object("cartesian",n),u(e)||(e=new y);let o=n.x,t=n.y,i=n.z,p=this._oneOverRadiiSquared,d=1/Math.sqrt(o*o*p.x+t*t*p.y+i*i*p.z);return y.multiplyByScalar(n,d,e)};b.prototype.transformPositionToScaledSpace=function(n,e){return u(e)||(e=new y),y.multiplyComponents(n,this._oneOverRadii,e)};b.prototype.transformPositionFromScaledSpace=function(n,e){return u(e)||(e=new y),y.multiplyComponents(n,this._radii,e)};b.prototype.equals=function(n){return this===n||u(n)&&y.equals(this._radii,n._radii)};b.prototype.toString=function(){return this._radii.toString()};b.prototype.getSurfaceNormalIntersectionWithZAxis=function(n,e,o){if(c.typeOf.object("position",n),!w.equalsEpsilon(this._radii.x,this._radii.y,w.EPSILON15))throw new S("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");c.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),e=O(e,0);let t=this._squaredXOverSquaredZ;if(u(o)||(o=new y),o.x=0,o.y=0,o.z=n.z*(1-t),!(Math.abs(o.z)>=this._radii.z-e))return o};var fe=new y;b.prototype.getLocalCurvature=function(n,e){c.typeOf.object("surfacePosition",n),u(e)||(e=new mn);let o=this.getSurfaceNormalIntersectionWithZAxis(n,0,fe),t=y.distance(n,o),i=this.minimumRadius*t/this.maximumRadius**2,p=t*i**2;return mn.fromElements(1/t,1/p,e)};var re=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],pe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function xn(n,e,o){c.typeOf.number("a",n),c.typeOf.number("b",e),c.typeOf.func("func",o);let t=.5*(e+n),i=.5*(e-n),p=0;for(let d=0;d<5;d++){let m=i*re[d];p+=pe[d]*(o(t+m)+o(t-m))}return p*=i,p}b.prototype.surfaceArea=function(n){c.typeOf.object("rectangle",n);let e=n.west,o=n.east,t=n.south,i=n.north;for(;o<e;)o+=w.TWO_PI;let p=this._radiiSquared,d=p.x,m=p.y,s=p.z,h=d*m;return xn(t,i,function(j){let z=Math.cos(j),M=Math.sin(j);return Math.cos(j)*xn(e,o,function(q){let N=Math.cos(q),l=Math.sin(q);return Math.sqrt(h*M*M+s*(m*N*N+d*l*l)*z*z)})})};var fo=b;function r(n,e,o,t,i,p,d,m,s){this[0]=O(n,0),this[1]=O(t,0),this[2]=O(d,0),this[3]=O(e,0),this[4]=O(i,0),this[5]=O(m,0),this[6]=O(o,0),this[7]=O(p,0),this[8]=O(s,0)}r.packedLength=9;r.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=O(o,0),e[o++]=n[0],e[o++]=n[1],e[o++]=n[2],e[o++]=n[3],e[o++]=n[4],e[o++]=n[5],e[o++]=n[6],e[o++]=n[7],e[o++]=n[8],e};r.unpack=function(n,e,o){return c.defined("array",n),e=O(e,0),u(o)||(o=new r),o[0]=n[e++],o[1]=n[e++],o[2]=n[e++],o[3]=n[e++],o[4]=n[e++],o[5]=n[e++],o[6]=n[e++],o[7]=n[e++],o[8]=n[e++],o};r.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*9;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new S("If result is a typed array, it must have exactly array.length * 9 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)r.pack(n[i],e,i*9);return e};r.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,9),n.length%9!==0)throw new S("array length must be a multiple of 9.");let o=n.length;u(e)?e.length=o/9:e=new Array(o/9);for(let t=0;t<o;t+=9){let i=t/9;e[i]=r.unpack(n,t,e[i])}return e};r.clone=function(n,e){if(u(n))return u(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):new r(n[0],n[3],n[6],n[1],n[4],n[7],n[2],n[5],n[8])};r.fromArray=r.unpack;r.fromColumnMajorArray=function(n,e){return c.defined("values",n),r.clone(n,e)};r.fromRowMajorArray=function(n,e){return c.defined("values",n),u(e)?(e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],e):new r(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])};r.fromQuaternion=function(n,e){c.typeOf.object("quaternion",n);let o=n.x*n.x,t=n.x*n.y,i=n.x*n.z,p=n.x*n.w,d=n.y*n.y,m=n.y*n.z,s=n.y*n.w,h=n.z*n.z,j=n.z*n.w,z=n.w*n.w,M=o-d-h+z,q=2*(t-j),N=2*(i+s),l=2*(t+j),x=-o+d-h+z,U=2*(m-p),I=2*(i-s),P=2*(m+p),k=-o-d+h+z;return u(e)?(e[0]=M,e[1]=l,e[2]=I,e[3]=q,e[4]=x,e[5]=P,e[6]=N,e[7]=U,e[8]=k,e):new r(M,q,N,l,x,U,I,P,k)};r.fromHeadingPitchRoll=function(n,e){c.typeOf.object("headingPitchRoll",n);let o=Math.cos(-n.pitch),t=Math.cos(-n.heading),i=Math.cos(n.roll),p=Math.sin(-n.pitch),d=Math.sin(-n.heading),m=Math.sin(n.roll),s=o*t,h=-i*d+m*p*t,j=m*d+i*p*t,z=o*d,M=i*t+m*p*d,q=-m*t+i*p*d,N=-p,l=m*o,x=i*o;return u(e)?(e[0]=s,e[1]=z,e[2]=N,e[3]=h,e[4]=M,e[5]=l,e[6]=j,e[7]=q,e[8]=x,e):new r(s,h,j,z,M,q,N,l,x)};r.fromScale=function(n,e){return c.typeOf.object("scale",n),u(e)?(e[0]=n.x,e[1]=0,e[2]=0,e[3]=0,e[4]=n.y,e[5]=0,e[6]=0,e[7]=0,e[8]=n.z,e):new r(n.x,0,0,0,n.y,0,0,0,n.z)};r.fromUniformScale=function(n,e){return c.typeOf.number("scale",n),u(e)?(e[0]=n,e[1]=0,e[2]=0,e[3]=0,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=n,e):new r(n,0,0,0,n,0,0,0,n)};r.fromCrossProduct=function(n,e){return c.typeOf.object("vector",n),u(e)?(e[0]=0,e[1]=n.z,e[2]=-n.y,e[3]=-n.z,e[4]=0,e[5]=n.x,e[6]=n.y,e[7]=-n.x,e[8]=0,e):new r(0,-n.z,n.y,n.z,0,-n.x,-n.y,n.x,0)};r.fromRotationX=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=o,e[5]=t,e[6]=0,e[7]=-t,e[8]=o,e):new r(1,0,0,0,o,-t,0,t,o)};r.fromRotationY=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=o,e[1]=0,e[2]=-t,e[3]=0,e[4]=1,e[5]=0,e[6]=t,e[7]=0,e[8]=o,e):new r(o,0,t,0,1,0,-t,0,o)};r.fromRotationZ=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=o,e[1]=t,e[2]=0,e[3]=-t,e[4]=o,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e):new r(o,-t,0,t,o,0,0,0,1)};r.toArray=function(n,e){return c.typeOf.object("matrix",n),u(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8]]};r.getElementIndex=function(n,e){return c.typeOf.number.greaterThanOrEquals("row",e,0),c.typeOf.number.lessThanOrEquals("row",e,2),c.typeOf.number.greaterThanOrEquals("column",n,0),c.typeOf.number.lessThanOrEquals("column",n,2),n*3+e};r.getColumn=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("result",o);let t=e*3,i=n[t],p=n[t+1],d=n[t+2];return o.x=i,o.y=p,o.z=d,o};r.setColumn=function(n,e,o,t){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("cartesian",o),c.typeOf.object("result",t),t=r.clone(n,t);let i=e*3;return t[i]=o.x,t[i+1]=o.y,t[i+2]=o.z,t};r.getRow=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("result",o);let t=n[e],i=n[e+3],p=n[e+6];return o.x=t,o.y=i,o.z=p,o};r.setRow=function(n,e,o,t){return c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("cartesian",o),c.typeOf.object("result",t),t=r.clone(n,t),t[e]=o.x,t[e+3]=o.y,t[e+6]=o.z,t};var ue=new y;r.setScale=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("scale",e),c.typeOf.object("result",o);let t=r.getScale(n,ue),i=e.x/t.x,p=e.y/t.y,d=e.z/t.z;return o[0]=n[0]*i,o[1]=n[1]*i,o[2]=n[2]*i,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*d,o[7]=n[7]*d,o[8]=n[8]*d,o};var ae=new y;r.setUniformScale=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number("scale",e),c.typeOf.object("result",o);let t=r.getScale(n,ae),i=e/t.x,p=e/t.y,d=e/t.z;return o[0]=n[0]*i,o[1]=n[1]*i,o[2]=n[2]*i,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*d,o[7]=n[7]*d,o[8]=n[8]*d,o};var sn=new y;r.getScale=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e.x=y.magnitude(y.fromElements(n[0],n[1],n[2],sn)),e.y=y.magnitude(y.fromElements(n[3],n[4],n[5],sn)),e.z=y.magnitude(y.fromElements(n[6],n[7],n[8],sn)),e};var kn=new y;r.getMaximumScale=function(n){return r.getScale(n,kn),y.maximumComponent(kn)};var de=new y;r.setRotation=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("result",o);let t=r.getScale(n,de);return o[0]=e[0]*t.x,o[1]=e[1]*t.x,o[2]=e[2]*t.x,o[3]=e[3]*t.y,o[4]=e[4]*t.y,o[5]=e[5]*t.y,o[6]=e[6]*t.z,o[7]=e[7]*t.z,o[8]=e[8]*t.z,o};var ye=new y;r.getRotation=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=r.getScale(n,ye);return e[0]=n[0]/o.x,e[1]=n[1]/o.x,e[2]=n[2]/o.x,e[3]=n[3]/o.y,e[4]=n[4]/o.y,e[5]=n[5]/o.y,e[6]=n[6]/o.z,e[7]=n[7]/o.z,e[8]=n[8]/o.z,e};r.multiply=function(n,e,o){c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o);let t=n[0]*e[0]+n[3]*e[1]+n[6]*e[2],i=n[1]*e[0]+n[4]*e[1]+n[7]*e[2],p=n[2]*e[0]+n[5]*e[1]+n[8]*e[2],d=n[0]*e[3]+n[3]*e[4]+n[6]*e[5],m=n[1]*e[3]+n[4]*e[4]+n[7]*e[5],s=n[2]*e[3]+n[5]*e[4]+n[8]*e[5],h=n[0]*e[6]+n[3]*e[7]+n[6]*e[8],j=n[1]*e[6]+n[4]*e[7]+n[7]*e[8],z=n[2]*e[6]+n[5]*e[7]+n[8]*e[8];return o[0]=t,o[1]=i,o[2]=p,o[3]=d,o[4]=m,o[5]=s,o[6]=h,o[7]=j,o[8]=z,o};r.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o[0]=n[0]+e[0],o[1]=n[1]+e[1],o[2]=n[2]+e[2],o[3]=n[3]+e[3],o[4]=n[4]+e[4],o[5]=n[5]+e[5],o[6]=n[6]+e[6],o[7]=n[7]+e[7],o[8]=n[8]+e[8],o};r.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],o[3]=n[3]-e[3],o[4]=n[4]-e[4],o[5]=n[5]-e[5],o[6]=n[6]-e[6],o[7]=n[7]-e[7],o[8]=n[8]-e[8],o};r.multiplyByVector=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("cartesian",e),c.typeOf.object("result",o);let t=e.x,i=e.y,p=e.z,d=n[0]*t+n[3]*i+n[6]*p,m=n[1]*t+n[4]*i+n[7]*p,s=n[2]*t+n[5]*i+n[8]*p;return o.x=d,o.y=m,o.z=s,o};r.multiplyByScalar=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.multiplyByScale=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.object("scale",e),c.typeOf.object("result",o),o[0]=n[0]*e.x,o[1]=n[1]*e.x,o[2]=n[2]*e.x,o[3]=n[3]*e.y,o[4]=n[4]*e.y,o[5]=n[5]*e.y,o[6]=n[6]*e.z,o[7]=n[7]*e.z,o[8]=n[8]*e.z,o};r.multiplyByUniformScale=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.number("scale",e),c.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.negate=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e[3]=-n[3],e[4]=-n[4],e[5]=-n[5],e[6]=-n[6],e[7]=-n[7],e[8]=-n[8],e};r.transpose=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=n[0],t=n[3],i=n[6],p=n[1],d=n[4],m=n[7],s=n[2],h=n[5],j=n[8];return e[0]=o,e[1]=t,e[2]=i,e[3]=p,e[4]=d,e[5]=m,e[6]=s,e[7]=h,e[8]=j,e};function me(n){let e=0;for(let o=0;o<9;++o){let t=n[o];e+=t*t}return Math.sqrt(e)}var On=[1,0,0],bn=[2,2,1];function se(n){let e=0;for(let o=0;o<3;++o){let t=n[r.getElementIndex(bn[o],On[o])];e+=2*t*t}return Math.sqrt(e)}function Oe(n,e){let o=w.EPSILON15,t=0,i=1;for(let h=0;h<3;++h){let j=Math.abs(n[r.getElementIndex(bn[h],On[h])]);j>t&&(i=h,t=j)}let p=1,d=0,m=On[i],s=bn[i];if(Math.abs(n[r.getElementIndex(s,m)])>o){let h=n[r.getElementIndex(s,s)],j=n[r.getElementIndex(m,m)],z=n[r.getElementIndex(s,m)],M=(h-j)/2/z,q;M<0?q=-1/(-M+Math.sqrt(1+M*M)):q=1/(M+Math.sqrt(1+M*M)),p=1/Math.sqrt(1+q*q),d=q*p}return e=r.clone(r.IDENTITY,e),e[r.getElementIndex(m,m)]=e[r.getElementIndex(s,s)]=p,e[r.getElementIndex(s,m)]=d,e[r.getElementIndex(m,s)]=-d,e}var K=new r,Bn=new r;r.computeEigenDecomposition=function(n,e){c.typeOf.object("matrix",n);let o=w.EPSILON20,t=10,i=0,p=0;u(e)||(e={});let d=e.unitary=r.clone(r.IDENTITY,e.unitary),m=e.diagonal=r.clone(n,e.diagonal),s=o*me(m);for(;p<t&&se(m)>s;)Oe(m,K),r.transpose(K,Bn),r.multiply(m,K,m),r.multiply(Bn,m,m),r.multiply(d,K,d),++i>2&&(++p,i=0);return e};r.abs=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e[0]=Math.abs(n[0]),e[1]=Math.abs(n[1]),e[2]=Math.abs(n[2]),e[3]=Math.abs(n[3]),e[4]=Math.abs(n[4]),e[5]=Math.abs(n[5]),e[6]=Math.abs(n[6]),e[7]=Math.abs(n[7]),e[8]=Math.abs(n[8]),e};r.determinant=function(n){c.typeOf.object("matrix",n);let e=n[0],o=n[3],t=n[6],i=n[1],p=n[4],d=n[7],m=n[2],s=n[5],h=n[8];return e*(p*h-s*d)+i*(s*t-o*h)+m*(o*d-p*t)};r.inverse=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=n[0],t=n[1],i=n[2],p=n[3],d=n[4],m=n[5],s=n[6],h=n[7],j=n[8],z=r.determinant(n);if(Math.abs(z)<=w.EPSILON15)throw new S("matrix is not invertible");e[0]=d*j-h*m,e[1]=h*i-t*j,e[2]=t*m-d*i,e[3]=s*m-p*j,e[4]=o*j-s*i,e[5]=p*i-o*m,e[6]=p*h-s*d,e[7]=s*t-o*h,e[8]=o*d-p*t;let M=1/z;return r.multiplyByScalar(e,M,e)};var be=new r;r.inverseTranspose=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),r.inverse(r.transpose(n,be),e)};r.equals=function(n,e){return n===e||u(n)&&u(e)&&n[0]===e[0]&&n[1]===e[1]&&n[2]===e[2]&&n[3]===e[3]&&n[4]===e[4]&&n[5]===e[5]&&n[6]===e[6]&&n[7]===e[7]&&n[8]===e[8]};r.equalsEpsilon=function(n,e,o){return o=O(o,0),n===e||u(n)&&u(e)&&Math.abs(n[0]-e[0])<=o&&Math.abs(n[1]-e[1])<=o&&Math.abs(n[2]-e[2])<=o&&Math.abs(n[3]-e[3])<=o&&Math.abs(n[4]-e[4])<=o&&Math.abs(n[5]-e[5])<=o&&Math.abs(n[6]-e[6])<=o&&Math.abs(n[7]-e[7])<=o&&Math.abs(n[8]-e[8])<=o};r.IDENTITY=Object.freeze(new r(1,0,0,0,1,0,0,0,1));r.ZERO=Object.freeze(new r(0,0,0,0,0,0,0,0,0));r.COLUMN0ROW0=0;r.COLUMN0ROW1=1;r.COLUMN0ROW2=2;r.COLUMN1ROW0=3;r.COLUMN1ROW1=4;r.COLUMN1ROW2=5;r.COLUMN2ROW0=6;r.COLUMN2ROW1=7;r.COLUMN2ROW2=8;Object.defineProperties(r.prototype,{length:{get:function(){return r.packedLength}}});r.prototype.clone=function(n){return r.clone(this,n)};r.prototype.equals=function(n){return r.equals(this,n)};r.equalsArray=function(n,e,o){return n[0]===e[o]&&n[1]===e[o+1]&&n[2]===e[o+2]&&n[3]===e[o+3]&&n[4]===e[o+4]&&n[5]===e[o+5]&&n[6]===e[o+6]&&n[7]===e[o+7]&&n[8]===e[o+8]};r.prototype.equalsEpsilon=function(n,e){return r.equalsEpsilon(this,n,e)};r.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]}) +(${this[1]}, ${this[4]}, ${this[7]}) +(${this[2]}, ${this[5]}, ${this[8]})`};var Oo=r;var F,R={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},_={};Object.defineProperties(_,{element:{get:function(){if(_.supportsFullscreen())return document[R.fullscreenElement]}},changeEventName:{get:function(){if(_.supportsFullscreen())return R.fullscreenchange}},errorEventName:{get:function(){if(_.supportsFullscreen())return R.fullscreenerror}},enabled:{get:function(){if(_.supportsFullscreen())return document[R.fullscreenEnabled]}},fullscreen:{get:function(){if(_.supportsFullscreen())return _.element!==null}}});_.supportsFullscreen=function(){if(u(F))return F;F=!1;let n=document.body;if(typeof n.requestFullscreen=="function")return R.requestFullscreen="requestFullscreen",R.exitFullscreen="exitFullscreen",R.fullscreenEnabled="fullscreenEnabled",R.fullscreenElement="fullscreenElement",R.fullscreenchange="fullscreenchange",R.fullscreenerror="fullscreenerror",F=!0,F;let e=["webkit","moz","o","ms","khtml"],o;for(let t=0,i=e.length;t<i;++t){let p=e[t];o=`${p}RequestFullscreen`,typeof n[o]=="function"?(R.requestFullscreen=o,F=!0):(o=`${p}RequestFullScreen`,typeof n[o]=="function"&&(R.requestFullscreen=o,F=!0)),o=`${p}ExitFullscreen`,typeof document[o]=="function"?R.exitFullscreen=o:(o=`${p}CancelFullScreen`,typeof document[o]=="function"&&(R.exitFullscreen=o)),o=`${p}FullscreenEnabled`,document[o]!==void 0?R.fullscreenEnabled=o:(o=`${p}FullScreenEnabled`,document[o]!==void 0&&(R.fullscreenEnabled=o)),o=`${p}FullscreenElement`,document[o]!==void 0?R.fullscreenElement=o:(o=`${p}FullScreenElement`,document[o]!==void 0&&(R.fullscreenElement=o)),o=`${p}fullscreenchange`,document[`on${o}`]!==void 0&&(p==="ms"&&(o="MSFullscreenChange"),R.fullscreenchange=o),o=`${p}fullscreenerror`,document[`on${o}`]!==void 0&&(p==="ms"&&(o="MSFullscreenError"),R.fullscreenerror=o)}return F};_.requestFullscreen=function(n,e){_.supportsFullscreen()&&n[R.requestFullscreen]({vrDisplay:e})};_.exitFullscreen=function(){_.supportsFullscreen()&&document[R.exitFullscreen]()};_._names=R;var Un=_;var A;typeof navigator<"u"?A=navigator:A={};function B(n){let e=n.split(".");for(let o=0,t=e.length;o<t;++o)e[o]=parseInt(e[o],10);return e}var J,In;function zn(){if(!u(J)&&(J=!1,!fn())){let n=/ Chrome\/([\.0-9]+)/.exec(A.userAgent);n!==null&&(J=!0,In=B(n[1]))}return J}function he(){return zn()&&In}var nn,Pn;function Ln(){if(!u(nn)&&(nn=!1,!zn()&&!fn()&&/ Safari\/[\.0-9]+/.test(A.userAgent))){let n=/ Version\/([\.0-9]+)/.exec(A.userAgent);n!==null&&(nn=!0,Pn=B(n[1]))}return nn}function we(){return Ln()&&Pn}var en,gn;function Vn(){if(!u(en)){en=!1;let n=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(A.userAgent);n!==null&&(en=!0,gn=B(n[1]),gn.isNightly=!!n[2])}return en}function je(){return Vn()&&gn}var Z,Sn;function Wn(){if(!u(Z)){Z=!1;let n;A.appName==="Microsoft Internet Explorer"?(n=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(A.userAgent),n!==null&&(Z=!0,Sn=B(n[1]))):A.appName==="Netscape"&&(n=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(A.userAgent),n!==null&&(Z=!0,Sn=B(n[1])))}return Z}function ge(){return Wn()&&Sn}var on,vn;function fn(){if(!u(on)){on=!1;let n=/ Edg\/([\.0-9]+)/.exec(A.userAgent);n!==null&&(on=!0,vn=B(n[1]))}return on}function Se(){return fn()&&vn}var tn,Rn;function rn(){if(!u(tn)){tn=!1;let n=/Firefox\/([\.0-9]+)/.exec(A.userAgent);n!==null&&(tn=!0,Rn=B(n[1]))}return tn}var hn;function ze(){return u(hn)||(hn=/Windows/i.test(A.appVersion)),hn}var wn;function Re(){return u(wn)||(wn=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),wn}function Me(){return rn()&&Rn}var jn;function qe(){return u(jn)||(jn=!rn()&&typeof PointerEvent<"u"&&(!u(A.pointerEnabled)||A.pointerEnabled)),jn}var $n,cn;function Dn(){if(!u(cn)){let n=document.createElement("canvas");n.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let e=n.style.imageRendering;cn=u(e)&&e!=="",cn&&($n=e)}return cn}function Ee(){return Dn()?$n:void 0}function E(){if(!E.initialized)throw new S("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return E._result}E._promise=void 0;E._result=void 0;E.initialize=function(){return u(E._promise)||(E._promise=new Promise(n=>{let e=new Image;e.onload=function(){E._result=e.width>0&&e.height>0,n(E._result)},e.onerror=function(){E._result=!1,n(E._result)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),E._promise};Object.defineProperties(E,{initialized:{get:function(){return u(E._result)}}});var $=[];typeof ArrayBuffer<"u"&&($.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&$.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&$.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&$.push(BigInt64Array),typeof BigUint64Array<"u"&&$.push(BigUint64Array));var T={isChrome:zn,chromeVersion:he,isSafari:Ln,safariVersion:we,isWebkit:Vn,webkitVersion:je,isInternetExplorer:Wn,internetExplorerVersion:ge,isEdge:fn,edgeVersion:Se,isFirefox:rn,firefoxVersion:Me,isWindows:ze,isIPadOrIOS:Re,hardwareConcurrency:O(A.hardwareConcurrency,3),supportsPointerEvents:qe,supportsImageRenderingPixelated:Dn,supportsWebP:E,imageRenderingValue:Ee,typedArrayTypes:$};T.supportsBasis=function(n){return T.supportsWebAssembly()&&n.context.supportsBasis};T.supportsFullscreen=function(){return Un.supportsFullscreen()};T.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};T.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};T.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};T.supportsBigInt=function(){return typeof BigInt<"u"};T.supportsWebWorkers=function(){return typeof Worker<"u"};T.supportsWebAssembly=function(){return typeof WebAssembly<"u"};T.supportsWebgl2=function(n){return c.defined("scene",n),n.context.webgl2};T.supportsEsmWebWorkers=function(){return!rn()||parseInt(Rn)>=114};var Mo=T;export{y as a,D as b,mn as c,fo as d,Oo as e,Mo as f}; diff --git a/cesium/Workers/chunk-4FSMRIBR.js b/cesium/Workers/chunk-PXCJYT2S.js similarity index 94% rename from cesium/Workers/chunk-4FSMRIBR.js rename to cesium/Workers/chunk-PXCJYT2S.js index 9bbd0a6..812ddd2 100644 --- a/cesium/Workers/chunk-4FSMRIBR.js +++ b/cesium/Workers/chunk-PXCJYT2S.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,6 +23,6 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{e as f}from"./chunk-U73D6PDD.js";function c(t){let n,a=t.name,e=t.message;f(a)&&f(e)?n=`${a}: ${e}`:n=t.toString();let o=t.stack;return f(o)&&(n+=` +import{e as f}from"./chunk-PEYJTJPE.js";function c(t){let n,a=t.name,e=t.message;f(a)&&f(e)?n=`${a}: ${e}`:n=t.toString();let o=t.stack;return f(o)&&(n+=` ${o}`),n}var i=c;function l(t){async function n({data:e}){let o=[],s={id:e.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=e.baseUrl;try{let r=await t(e.parameters,o);s.result=r}catch(r){r instanceof Error?s.error={name:r.name,message:r.message,stack:r.stack}:s.error=r}e.canTransferArrayBuffer||(o.length=0);try{postMessage(s,o)}catch(r){s.result=void 0,s.error=`postMessage failed with error: ${i(r)} with responseMessage: ${JSON.stringify(s)}`,postMessage(s)}}function a(e){postMessage({id:e.data?.id,error:`postMessage failed with error: ${JSON.stringify(e)}`})}return self.onmessage=n,self.onmessageerror=a,self}var d=l;export{d as a}; diff --git a/cesium/Workers/chunk-Q6L7X3LP.js b/cesium/Workers/chunk-Q6L7X3LP.js new file mode 100644 index 0000000..22847c8 --- /dev/null +++ b/cesium/Workers/chunk-Q6L7X3LP.js @@ -0,0 +1,26 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.119 + * + * Copyright 2011-2022 Cesium Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Columbus View (Pat. Pend.) + * + * Portions licensed separately. + * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. + */ + +import{a as K}from"./chunk-KF5NF354.js";import{a as L}from"./chunk-PDMQLSBL.js";import{b as v,c as J,d as Z}from"./chunk-TMSETF7M.js";import{b as B,h as k}from"./chunk-7Z5IIKOJ.js";import{a as t,b as S,c as I,d as G,e as d}from"./chunk-POASMU2N.js";import{a as g}from"./chunk-R6KGAEF6.js";import{a as W}from"./chunk-IUA6FAOZ.js";import{a as b,b as z}from"./chunk-UH2WFNTA.js";import{e as p}from"./chunk-PEYJTJPE.js";function m(n,e){this.center=t.clone(W(n,t.ZERO)),this.halfAxes=d.clone(W(e,d.ZERO))}m.packedLength=t.packedLength+d.packedLength;m.pack=function(n,e,c){return z.typeOf.object("value",n),z.defined("array",e),c=W(c,0),t.pack(n.center,e,c),d.pack(n.halfAxes,e,c+t.packedLength),e};m.unpack=function(n,e,c){return z.defined("array",n),e=W(e,0),p(c)||(c=new m),t.unpack(n,e,c.center),d.unpack(n,e+t.packedLength,c.halfAxes),c};var Ct=new t,ut=new t,Pt=new t,xt=new t,yt=new t,At=new t,Nt=new d,Mt={unitary:new d,diagonal:new d};m.fromPoints=function(n,e){if(p(e)||(e=new m),!p(n)||n.length===0)return e.halfAxes=d.ZERO,e.center=t.ZERO,e;let c,h=n.length,r=t.clone(n[0],Ct);for(c=1;c<h;c++)t.add(r,n[c],r);let o=1/h;t.multiplyByScalar(r,o,r);let i=0,C=0,w=0,l=0,u=0,a=0,s;for(c=0;c<h;c++)s=t.subtract(n[c],r,ut),i+=s.x*s.x,C+=s.x*s.y,w+=s.x*s.z,l+=s.y*s.y,u+=s.y*s.z,a+=s.z*s.z;i*=o,C*=o,w*=o,l*=o,u*=o,a*=o;let f=Nt;f[0]=i,f[1]=C,f[2]=w,f[3]=C,f[4]=l,f[5]=u,f[6]=w,f[7]=u,f[8]=a;let A=d.computeEigenDecomposition(f,Mt),M=d.clone(A.unitary,e.halfAxes),x=d.getColumn(M,0,xt),y=d.getColumn(M,1,yt),N=d.getColumn(M,2,At),P=-Number.MAX_VALUE,O=-Number.MAX_VALUE,U=-Number.MAX_VALUE,q=Number.MAX_VALUE,R=Number.MAX_VALUE,j=Number.MAX_VALUE;for(c=0;c<h;c++)s=n[c],P=Math.max(t.dot(x,s),P),O=Math.max(t.dot(y,s),O),U=Math.max(t.dot(N,s),U),q=Math.min(t.dot(x,s),q),R=Math.min(t.dot(y,s),R),j=Math.min(t.dot(N,s),j);x=t.multiplyByScalar(x,.5*(q+P),x),y=t.multiplyByScalar(y,.5*(R+O),y),N=t.multiplyByScalar(N,.5*(j+U),N);let T=t.add(x,y,e.center);t.add(T,N,T);let E=Pt;return E.x=P-q,E.y=O-R,E.z=U-j,t.multiplyByScalar(E,.5,E),d.multiplyByScale(e.halfAxes,E,e.halfAxes),e};var nt=new t,Ot=new t;function Q(n,e,c,h,r,o,i,C,w,l,u){if(!p(r)||!p(o)||!p(i)||!p(C)||!p(w)||!p(l))throw new b("all extents (minimum/maximum X/Y/Z) are required.");p(u)||(u=new m);let a=u.halfAxes;d.setColumn(a,0,e,a),d.setColumn(a,1,c,a),d.setColumn(a,2,h,a);let s=nt;s.x=(r+o)/2,s.y=(i+C)/2,s.z=(w+l)/2;let f=Ot;f.x=(o-r)/2,f.y=(C-i)/2,f.z=(l-w)/2;let A=u.center;return s=d.multiplyByVector(a,s,s),t.add(n,s,A),d.multiplyByScale(a,f,a),u}var $=new S,bt=new t,Tt=new S,St=new S,gt=new S,Et=new S,Rt=new S,Wt=new t,H=new t,zt=new t,tt=new t,It=new t,Lt=new I,Ut=new I,qt=new I,jt=new I,Bt=new I,vt=new t,Vt=new t,_t=new t,Dt=new t,Xt=new I,kt=new t,Zt=new t,Yt=new t,Ft=new L(t.UNIT_X,0);m.fromRectangle=function(n,e,c,h,r){if(!p(n))throw new b("rectangle is required");if(n.width<0||n.width>g.TWO_PI)throw new b("Rectangle width must be between 0 and 2 * pi");if(n.height<0||n.height>g.PI)throw new b("Rectangle height must be between 0 and pi");if(p(h)&&!g.equalsEpsilon(h.radii.x,h.radii.y,g.EPSILON15))throw new b("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");e=W(e,0),c=W(c,0),h=W(h,G.default);let o,i,C,w,l,u,a;if(n.width<=g.PI){let R=k.center(n,$),j=h.cartographicToCartesian(R,bt),T=new K(j,h);a=T.plane;let E=R.longitude,ot=n.south<0&&n.north>0?0:R.latitude,st=S.fromRadians(E,n.north,c,Tt),V=S.fromRadians(n.west,n.north,c,St),it=S.fromRadians(n.west,ot,c,gt),_=S.fromRadians(n.west,n.south,c,Et),ht=S.fromRadians(E,n.south,c,Rt),ft=h.cartographicToCartesian(st,Wt),D=h.cartographicToCartesian(V,H),dt=h.cartographicToCartesian(it,zt),X=h.cartographicToCartesian(_,tt),mt=h.cartographicToCartesian(ht,It),wt=T.projectPointToNearestOnPlane(ft,Lt),Y=T.projectPointToNearestOnPlane(D,Ut),lt=T.projectPointToNearestOnPlane(dt,qt),F=T.projectPointToNearestOnPlane(X,jt),pt=T.projectPointToNearestOnPlane(mt,Bt);return o=Math.min(Y.x,lt.x,F.x),i=-o,w=Math.max(Y.y,wt.y),C=Math.min(F.y,pt.y),V.height=_.height=e,D=h.cartographicToCartesian(V,H),X=h.cartographicToCartesian(_,tt),l=Math.min(L.getPointDistance(a,D),L.getPointDistance(a,X)),u=c,Q(T.origin,T.xAxis,T.yAxis,T.zAxis,o,i,C,w,l,u,r)}let s=n.south>0,f=n.north<0,A=s?n.south:f?n.north:0,M=k.center(n,$).longitude,x=t.fromRadians(M,A,c,h,vt);x.z=0;let N=Math.abs(x.x)<g.EPSILON10&&Math.abs(x.y)<g.EPSILON10?t.UNIT_X:t.normalize(x,Vt),P=t.UNIT_Z,O=t.cross(N,P,_t);a=L.fromPointNormal(x,N,Ft);let U=t.fromRadians(M+g.PI_OVER_TWO,A,c,h,Dt);i=t.dot(L.projectPointOntoPlane(a,U,Xt),O),o=-i,w=t.fromRadians(0,n.north,f?e:c,h,kt).z,C=t.fromRadians(0,n.south,s?e:c,h,Zt).z;let q=t.fromRadians(n.east,A,c,h,Yt);return l=L.getPointDistance(a,q),u=0,Q(x,O,P,N,o,i,C,w,l,u,r)};m.fromTransformation=function(n,e){return z.typeOf.object("transformation",n),p(e)||(e=new m),e.center=B.getTranslation(n,e.center),e.halfAxes=B.getMatrix3(n,e.halfAxes),e.halfAxes=d.multiplyByScalar(e.halfAxes,.5,e.halfAxes),e};m.clone=function(n,e){if(p(n))return p(e)?(t.clone(n.center,e.center),d.clone(n.halfAxes,e.halfAxes),e):new m(n.center,n.halfAxes)};m.intersectPlane=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("plane is required.");let c=n.center,h=e.normal,r=n.halfAxes,o=h.x,i=h.y,C=h.z,w=Math.abs(o*r[d.COLUMN0ROW0]+i*r[d.COLUMN0ROW1]+C*r[d.COLUMN0ROW2])+Math.abs(o*r[d.COLUMN1ROW0]+i*r[d.COLUMN1ROW1]+C*r[d.COLUMN1ROW2])+Math.abs(o*r[d.COLUMN2ROW0]+i*r[d.COLUMN2ROW1]+C*r[d.COLUMN2ROW2]),l=t.dot(h,c)+e.distance;return l<=-w?v.OUTSIDE:l>=w?v.INSIDE:v.INTERSECTING};var at=new t,ct=new t,rt=new t,Gt=new t,et=new t,Jt=new t;m.distanceSquaredTo=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("cartesian is required.");let c=t.subtract(e,n.center,nt),h=n.halfAxes,r=d.getColumn(h,0,at),o=d.getColumn(h,1,ct),i=d.getColumn(h,2,rt),C=t.magnitude(r),w=t.magnitude(o),l=t.magnitude(i),u=!0,a=!0,s=!0;C>0?t.divideByScalar(r,C,r):u=!1,w>0?t.divideByScalar(o,w,o):a=!1,l>0?t.divideByScalar(i,l,i):s=!1;let f=!u+!a+!s,A,M,x;if(f===1){let O=r;A=o,M=i,a?s||(O=i,M=r):(O=o,A=r),x=t.cross(A,M,et),O===r?r=x:O===o?o=x:O===i&&(i=x)}else if(f===2){A=r,a?A=o:s&&(A=i);let O=t.UNIT_Y;O.equalsEpsilon(A,g.EPSILON3)&&(O=t.UNIT_X),M=t.cross(A,O,Gt),t.normalize(M,M),x=t.cross(A,M,et),t.normalize(x,x),A===r?(o=M,i=x):A===o?(i=M,r=x):A===i&&(r=M,o=x)}else f===3&&(r=t.UNIT_X,o=t.UNIT_Y,i=t.UNIT_Z);let y=Jt;y.x=t.dot(c,r),y.y=t.dot(c,o),y.z=t.dot(c,i);let N=0,P;return y.x<-C?(P=y.x+C,N+=P*P):y.x>C&&(P=y.x-C,N+=P*P),y.y<-w?(P=y.y+w,N+=P*P):y.y>w&&(P=y.y-w,N+=P*P),y.z<-l?(P=y.z+l,N+=P*P):y.z>l&&(P=y.z-l,N+=P*P),N};var Kt=new t,Qt=new t;m.computePlaneDistances=function(n,e,c,h){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("position is required.");if(!p(c))throw new b("direction is required.");p(h)||(h=new J);let r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=n.center,C=n.halfAxes,w=d.getColumn(C,0,at),l=d.getColumn(C,1,ct),u=d.getColumn(C,2,rt),a=t.add(w,l,Kt);t.add(a,u,a),t.add(a,i,a);let s=t.subtract(a,e,Qt),f=t.dot(c,s);return r=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.add(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.subtract(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.subtract(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.add(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.add(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.subtract(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.subtract(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),h.start=r,h.stop=o,h};var $t=new t,Ht=new t,te=new t;m.computeCorners=function(n,e){z.typeOf.object("box",n),p(e)||(e=[new t,new t,new t,new t,new t,new t,new t,new t]);let c=n.center,h=n.halfAxes,r=d.getColumn(h,0,$t),o=d.getColumn(h,1,Ht),i=d.getColumn(h,2,te);return t.clone(c,e[0]),t.subtract(e[0],r,e[0]),t.subtract(e[0],o,e[0]),t.subtract(e[0],i,e[0]),t.clone(c,e[1]),t.subtract(e[1],r,e[1]),t.subtract(e[1],o,e[1]),t.add(e[1],i,e[1]),t.clone(c,e[2]),t.subtract(e[2],r,e[2]),t.add(e[2],o,e[2]),t.subtract(e[2],i,e[2]),t.clone(c,e[3]),t.subtract(e[3],r,e[3]),t.add(e[3],o,e[3]),t.add(e[3],i,e[3]),t.clone(c,e[4]),t.add(e[4],r,e[4]),t.subtract(e[4],o,e[4]),t.subtract(e[4],i,e[4]),t.clone(c,e[5]),t.add(e[5],r,e[5]),t.subtract(e[5],o,e[5]),t.add(e[5],i,e[5]),t.clone(c,e[6]),t.add(e[6],r,e[6]),t.add(e[6],o,e[6]),t.subtract(e[6],i,e[6]),t.clone(c,e[7]),t.add(e[7],r,e[7]),t.add(e[7],o,e[7]),t.add(e[7],i,e[7]),e};var ee=new d;m.computeTransformation=function(n,e){z.typeOf.object("box",n),p(e)||(e=new B);let c=n.center,h=d.multiplyByUniformScale(n.halfAxes,2,ee);return B.fromRotationTranslation(h,c,e)};var ne=new Z;m.isOccluded=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("occluder is required.");let c=Z.fromOrientedBoundingBox(n,ne);return!e.isBoundingSphereVisible(c)};m.prototype.intersectPlane=function(n){return m.intersectPlane(this,n)};m.prototype.distanceSquaredTo=function(n){return m.distanceSquaredTo(this,n)};m.prototype.computePlaneDistances=function(n,e,c){return m.computePlaneDistances(this,n,e,c)};m.prototype.computeCorners=function(n){return m.computeCorners(this,n)};m.prototype.computeTransformation=function(n){return m.computeTransformation(this,n)};m.prototype.isOccluded=function(n){return m.isOccluded(this,n)};m.equals=function(n,e){return n===e||p(n)&&p(e)&&t.equals(n.center,e.center)&&d.equals(n.halfAxes,e.halfAxes)};m.prototype.clone=function(n){return m.clone(this,n)};m.prototype.equals=function(n){return m.equals(this,n)};var ye=m;export{ye as a}; diff --git a/cesium/Workers/chunk-Q7FDDGQE.js b/cesium/Workers/chunk-Q7FDDGQE.js deleted file mode 100644 index 719fe5d..0000000 --- a/cesium/Workers/chunk-Q7FDDGQE.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 - * - * Copyright 2011-2022 Cesium Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Columbus View (Pat. Pend.) - * - * Portions licensed separately. - * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. - */ - -import{a as M}from"./chunk-EQCQ5LRI.js";import{a as st}from"./chunk-7JCIFY66.js";import{a as Z,b as H}from"./chunk-LKPDAB55.js";import{a as V}from"./chunk-CIEXTRKV.js";import{a as U}from"./chunk-OSVMDAN4.js";import{b as it}from"./chunk-PT2EMSIG.js";import{a as ct}from"./chunk-REUYHR24.js";import{a as ot}from"./chunk-RQXB4B4V.js";import{a as nt}from"./chunk-MPVEZNKB.js";import{b as J,c as X,d as z}from"./chunk-FATK2EQ2.js";import{f as K}from"./chunk-CMXCDAKR.js";import{a as k}from"./chunk-77ESX6BV.js";import{a as w,b as q,c as A,d as et,e as F}from"./chunk-LJCGAQ64.js";import{a as I}from"./chunk-JFG572S7.js";import{a as tt}from"./chunk-42NIXFVW.js";import{e as x}from"./chunk-U73D6PDD.js";function dt(n,i){this.positions=x(n)?n:[],this.holes=x(i)?i:[]}var rt=dt;function R(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(R.prototype,{length:{get:function(){return this._length}}});R.prototype.enqueue=function(n){this._array.push(n),this._length++};R.prototype.dequeue=function(){if(this._length===0)return;let n=this._array,i=this._offset,u=n[i];return n[i]=void 0,i++,i>10&&i*2>n.length&&(this._array=n.slice(i),i=0),this._offset=i,this._length--,u};R.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};R.prototype.contains=function(n){return this._array.indexOf(n)!==-1};R.prototype.clear=function(){this._array.length=this._offset=this._length=0};R.prototype.sort=function(n){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(n)};var $=R;var b={};b.computeHierarchyPackedLength=function(n,i){let u=0,c=[n];for(;c.length>0;){let r=c.pop();if(!x(r))continue;u+=2;let a=r.positions,t=r.holes;if(x(a)&&a.length>0&&(u+=a.length*i.packedLength),x(t)){let o=t.length;for(let e=0;e<o;++e)c.push(t[e])}}return u};b.packPolygonHierarchy=function(n,i,u,c){let r=[n];for(;r.length>0;){let a=r.pop();if(!x(a))continue;let t=a.positions,o=a.holes;if(i[u++]=x(t)?t.length:0,i[u++]=x(o)?o.length:0,x(t)){let e=t.length;for(let s=0;s<e;++s,u+=c.packedLength)c.pack(t[s],i,u)}if(x(o)){let e=o.length;for(let s=0;s<e;++s)r.push(o[s])}}return u};b.unpackPolygonHierarchy=function(n,i,u){let c=n[i++],r=n[i++],a=new Array(c),t=r>0?new Array(r):void 0;for(let o=0;o<c;++o,i+=u.packedLength)a[o]=u.unpack(n,i);for(let o=0;o<r;++o)t[o]=b.unpackPolygonHierarchy(n,i,u),i=t[o].startingIndex,delete t[o].startingIndex;return{positions:a,holes:t,startingIndex:i}};var O=new A;function ht(n,i,u,c){return A.subtract(i,n,O),A.multiplyByScalar(O,u/c,O),A.add(n,O,O),[O.x,O.y]}var G=new w;function gt(n,i,u,c){return w.subtract(i,n,G),w.multiplyByScalar(G,u/c,G),w.add(n,G,G),[G.x,G.y,G.z]}b.subdivideLineCount=function(n,i,u){let r=w.distance(n,i)/u,a=Math.max(0,Math.ceil(I.log2(r)));return Math.pow(2,a)};var j=new q,Q=new q,pt=new q,mt=new w,Y=new U;b.subdivideRhumbLineCount=function(n,i,u,c){let r=n.cartesianToCartographic(i,j),a=n.cartesianToCartographic(u,Q),o=new U(r,a,n).surfaceDistance/c,e=Math.max(0,Math.ceil(I.log2(o)));return Math.pow(2,e)};b.subdivideTexcoordLine=function(n,i,u,c,r,a){let t=b.subdivideLineCount(u,c,r),o=A.distance(n,i),e=o/t,s=a;s.length=t*2;let l=0;for(let h=0;h<t;h++){let f=ht(n,i,h*e,o);s[l++]=f[0],s[l++]=f[1]}return s};b.subdivideLine=function(n,i,u,c){let r=b.subdivideLineCount(n,i,u),a=w.distance(n,i),t=a/r;x(c)||(c=[]);let o=c;o.length=r*3;let e=0;for(let s=0;s<r;s++){let l=gt(n,i,s*t,a);o[e++]=l[0],o[e++]=l[1],o[e++]=l[2]}return o};b.subdivideTexcoordRhumbLine=function(n,i,u,c,r,a,t){let o=u.cartesianToCartographic(c,j),e=u.cartesianToCartographic(r,Q);Y.setEndPoints(o,e);let s=Y.surfaceDistance/a,l=Math.max(0,Math.ceil(I.log2(s))),h=Math.pow(2,l),f=A.distance(n,i),g=f/h,m=t;m.length=h*2;let p=0;for(let d=0;d<h;d++){let y=ht(n,i,d*g,f);m[p++]=y[0],m[p++]=y[1]}return m};b.subdivideRhumbLine=function(n,i,u,c,r){let a=n.cartesianToCartographic(i,j),t=n.cartesianToCartographic(u,Q),o=new U(a,t,n),e=o.surfaceDistance/c,s=Math.max(0,Math.ceil(I.log2(e))),l=Math.pow(2,s),h=o.surfaceDistance/l;x(r)||(r=[]);let f=r;f.length=l*3;let g=0;for(let m=0;m<l;m++){let p=o.interpolateUsingSurfaceDistance(m*h,pt),d=n.cartographicToCartesian(p,mt);f[g++]=d.x,f[g++]=d.y,f[g++]=d.z}return f};var yt=new w,xt=new w,wt=new w,bt=new w;b.scaleToGeodeticHeightExtruded=function(n,i,u,c,r){c=tt(c,et.WGS84);let a=yt,t=xt,o=wt,e=bt;if(x(n)&&x(n.attributes)&&x(n.attributes.position)){let s=n.attributes.position.values,l=s.length/2;for(let h=0;h<l;h+=3)w.fromArray(s,h,o),c.geodeticSurfaceNormal(o,a),e=c.scaleToGeodeticSurface(o,e),t=w.multiplyByScalar(a,u,t),t=w.add(e,t,t),s[h+l]=t.x,s[h+1+l]=t.y,s[h+2+l]=t.z,r&&(e=w.clone(o,e)),t=w.multiplyByScalar(a,i,t),t=w.add(e,t,t),s[h]=t.x,s[h+1]=t.y,s[h+2]=t.z}return n};b.polygonOutlinesFromHierarchy=function(n,i,u){let c=[],r=new $;r.enqueue(n);let a,t,o;for(;r.length!==0;){let e=r.dequeue(),s=e.positions;if(i)for(o=s.length,a=0;a<o;a++)u.scaleToGeodeticSurface(s[a],s[a]);if(s=V(s,w.equalsEpsilon,!0),s.length<3)continue;let l=e.holes?e.holes.length:0;for(a=0;a<l;a++){let h=e.holes[a],f=h.positions;if(i)for(o=f.length,t=0;t<o;++t)u.scaleToGeodeticSurface(f[t],f[t]);if(f=V(f,w.equalsEpsilon,!0),f.length<3)continue;c.push(f);let g=0;for(x(h.holes)&&(g=h.holes.length),t=0;t<g;t++)r.enqueue(h.holes[t])}c.push(s)}return c};var Lt=new q;function Tt(n,i,u){let c=u.cartesianToCartographic(n,j),r=u.cartesianToCartographic(i,Q);if(Math.sign(c.latitude)===Math.sign(r.latitude))return;Y.setEndPoints(c,r);let a=Y.findIntersectionWithLatitude(0,Lt);if(!x(a))return;let t=Math.min(c.longitude,r.longitude),o=Math.max(c.longitude,r.longitude);if(Math.abs(o-t)>I.PI){let e=t;t=o,o=e}if(!(a.longitude<t||a.longitude>o))return u.cartographicToCartesian(a)}function Et(n,i,u,c){if(c===M.RHUMB)return Tt(n,i,u);let r=it.lineSegmentPlane(n,i,ct.ORIGIN_XY_PLANE);if(x(r))return u.scaleToGeodeticSurface(r,r)}var vt=new q;function Ct(n,i,u){let c=[],r,a,t,o,e,s=0;for(;s<n.length;){r=n[s],a=n[(s+1)%n.length],t=I.sign(r.z),o=I.sign(a.z);let l=h=>i.cartesianToCartographic(h,vt).longitude;if(t===0)c.push({position:s,type:t,visited:!1,next:o,theta:l(r)});else if(o!==0){if(e=Et(r,a,i,u),++s,!x(e))continue;n.splice(s,0,e),c.push({position:s,type:t,visited:!1,next:o,theta:l(e)})}++s}return c}function lt(n,i,u,c,r,a,t){let o=[],e=a,s=h=>f=>f.position===h,l=[];do{let h=u[e];o.push(h);let f=c.findIndex(s(e)),g=c[f];if(!x(g)){++e;continue}let{visited:m,type:p,next:d}=g;if(g.visited=!0,p===0){if(d===0){let C=c[f-(t?1:-1)];if(C?.position===e+1)C.visited=!0;else{++e;continue}}if(!m&&t&&d>0||a===e&&!t&&d<0){++e;continue}}if(!(t?p>=0:p<=0)){++e;continue}m||l.push(e);let L=f+(t?1:-1),S=c[L];if(!x(S)){++e;continue}e=S.position}while(e<u.length&&e>=0&&e!==a&&o.length<u.length);n.splice(i,r,o);for(let h of l)i=lt(n,++i,u,c,0,h,!t);return i}b.splitPolygonsOnEquator=function(n,i,u,c){x(c)||(c=[]),c.splice(0,0,...n),c.length=n.length;let r=0;for(;r<c.length;){let a=c[r],t=a.slice();if(a.length<3){c[r]=t,++r;continue}let o=Ct(t,i,u);if(t.length===a.length||o.length<=1){c[r]=t,++r;continue}o.sort((s,l)=>s.theta-l.theta);let e=t[0].z>=0;r=lt(c,r,t,o,1,0,e)}return c};b.polygonsFromHierarchy=function(n,i,u,c,r,a){let t=[],o=[],e=new $;e.enqueue(n);let s=x(a);for(;e.length!==0;){let l=e.dequeue(),h=l.positions,f=l.holes,g,m;if(c)for(m=h.length,g=0;g<m;g++)r.scaleToGeodeticSurface(h[g],h[g]);if(i||(h=V(h,w.equalsEpsilon,!0)),h.length<3)continue;let p=u(h);if(!x(p))continue;let d=[],y=H.computeWindingOrder2D(p);if(y===Z.CLOCKWISE&&(p.reverse(),h=h.slice().reverse()),s){s=!1;let P=[h];if(P=a(P,P),P.length>1){for(let v of P)e.enqueue(new rt(v,f));continue}}let L=h.slice(),S=x(f)?f.length:0,C=[],T;for(g=0;g<S;g++){let P=f[g],v=P.positions;if(c)for(m=v.length,T=0;T<m;++T)r.scaleToGeodeticSurface(v[T],v[T]);if(i||(v=V(v,w.equalsEpsilon,!0)),v.length<3)continue;let E=u(v);if(!x(E))continue;y=H.computeWindingOrder2D(E),y===Z.CLOCKWISE&&(E.reverse(),v=v.slice().reverse()),C.push(v),d.push(L.length),L=L.concat(v),p=p.concat(E);let D=0;for(x(P.holes)&&(D=P.holes.length),T=0;T<D;T++)e.enqueue(P.holes[T])}t.push({outerRing:h,holes:C}),o.push({positions:L,positions2D:p,holes:d})}return{hierarchy:t,polygons:o}};var Pt=new A,Dt=new w,It=new K,St=new F;b.computeBoundingRectangle=function(n,i,u,c,r){let a=K.fromAxisAngle(n,c,It),t=F.fromQuaternion(a,St),o=Number.POSITIVE_INFINITY,e=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,h=u.length;for(let f=0;f<h;++f){let g=w.clone(u[f],Dt);F.multiplyByVector(t,g,g);let m=i(g,Pt);x(m)&&(o=Math.min(o,m.x),e=Math.max(e,m.x),s=Math.min(s,m.y),l=Math.max(l,m.y))}return r.x=o,r.y=s,r.width=e-o,r.height=l-s,r};b.createGeometryFromPositions=function(n,i,u,c,r,a,t){let o=H.triangulate(i.positions2D,i.holes);o.length<3&&(o=[0,1,2]);let e=i.positions,s=x(u),l=s?u.positions:void 0;if(r){let h=e.length,f=new Array(h*3),g=0;for(let d=0;d<h;d++){let y=e[d];f[g++]=y.x,f[g++]=y.y,f[g++]=y.z}let m={attributes:{position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:f})},indices:o,primitiveType:J.TRIANGLES};s&&(m.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:A.packArray(l)}));let p=new X(m);return a.normal?st.computeNormal(p):p}if(t===M.GEODESIC)return H.computeSubdivision(n,e,o,l,c);if(t===M.RHUMB)return H.computeRhumbLineSubdivision(n,e,o,l,c)};var ut=[],at=[],_t=new w,At=new w;b.computeWallGeometry=function(n,i,u,c,r,a){let t,o,e,s,l,h,f,g,m,p=n.length,d=0,y=0,L=x(i),S=L?i.positions:void 0;if(r)for(o=p*3*2,t=new Array(o*2),L&&(m=p*2*2,g=new Array(m*2)),e=0;e<p;e++)s=n[e],l=n[(e+1)%p],t[d]=t[d+o]=s.x,++d,t[d]=t[d+o]=s.y,++d,t[d]=t[d+o]=s.z,++d,t[d]=t[d+o]=l.x,++d,t[d]=t[d+o]=l.y,++d,t[d]=t[d+o]=l.z,++d,L&&(h=S[e],f=S[(e+1)%p],g[y]=g[y+m]=h.x,++y,g[y]=g[y+m]=h.y,++y,g[y]=g[y+m]=f.x,++y,g[y]=g[y+m]=f.y,++y);else{let E=I.chordLength(c,u.maximumRadius),D=0;if(a===M.GEODESIC)for(e=0;e<p;e++)D+=b.subdivideLineCount(n[e],n[(e+1)%p],E);else if(a===M.RHUMB)for(e=0;e<p;e++)D+=b.subdivideRhumbLineCount(u,n[e],n[(e+1)%p],E);for(o=(D+p)*3,t=new Array(o*2),L&&(m=(D+p)*2,g=new Array(m*2)),e=0;e<p;e++){s=n[e],l=n[(e+1)%p];let _,N;L&&(h=S[e],f=S[(e+1)%p]),a===M.GEODESIC?(_=b.subdivideLine(s,l,E,at),L&&(N=b.subdivideTexcoordLine(h,f,s,l,E,ut))):a===M.RHUMB&&(_=b.subdivideRhumbLine(u,s,l,E,at),L&&(N=b.subdivideTexcoordRhumbLine(h,f,u,s,l,E,ut)));let ft=_.length;for(let B=0;B<ft;++B,++d)t[d]=_[B],t[d+o]=_[B];if(t[d]=l.x,t[d+o]=l.x,++d,t[d]=l.y,t[d+o]=l.y,++d,t[d]=l.z,t[d+o]=l.z,++d,L){let B=N.length;for(let W=0;W<B;++W,++y)g[y]=N[W],g[y+m]=N[W];g[y]=f.x,g[y+m]=f.x,++y,g[y]=f.y,g[y+m]=f.y,++y}}}p=t.length;let C=ot.createTypedArray(p/3,p-n.length*6),T=0;for(p/=6,e=0;e<p;e++){let E=e,D=E+1,_=E+p,N=_+1;s=w.fromArray(t,E*3,_t),l=w.fromArray(t,D*3,At),!w.equalsEpsilon(s,l,I.EPSILON10,I.EPSILON10)&&(C[T++]=E,C[T++]=_,C[T++]=D,C[T++]=D,C[T++]=_,C[T++]=N)}let P={attributes:new nt({position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:t})}),indices:C,primitiveType:J.TRIANGLES};return L&&(P.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:g})),new X(P)};var se=b;export{se as a}; diff --git a/cesium/Workers/chunk-7JCIFY66.js b/cesium/Workers/chunk-QB3MDM4J.js similarity index 97% rename from cesium/Workers/chunk-7JCIFY66.js rename to cesium/Workers/chunk-QB3MDM4J.js index c8910bc..b117265 100644 --- a/cesium/Workers/chunk-7JCIFY66.js +++ b/cesium/Workers/chunk-QB3MDM4J.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as et}from"./chunk-ED2EM7ZX.js";import{a as jt}from"./chunk-YZP3DYN3.js";import{b as Lt}from"./chunk-PT2EMSIG.js";import{a as Et}from"./chunk-REUYHR24.js";import{a as j}from"./chunk-RQXB4B4V.js";import{a as mt,b as D,c as B,d as U}from"./chunk-FATK2EQ2.js";import{a as _t,b as Ut,d as rt}from"./chunk-3FEM743H.js";import{a as dt,b as H}from"./chunk-CMXCDAKR.js";import{a as k}from"./chunk-77ESX6BV.js";import{a as r,b as Mt,c as R,e as Ot}from"./chunk-LJCGAQ64.js";import{a as N}from"./chunk-JFG572S7.js";import{a as K}from"./chunk-42NIXFVW.js";import{a as I,b as pt}from"./chunk-5YVCOCPP.js";import{e as f}from"./chunk-U73D6PDD.js";var Yt=new r,Zt=new r,Xt=new r;function pe(t,e,n,s,i){pt.defined("point",t),pt.defined("p0",e),pt.defined("p1",n),pt.defined("p2",s),f(i)||(i=new r);let c,o,a,p,u,d,m,l;if(f(e.z)){if(r.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(r.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(r.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=r.subtract(n,e,Yt),o=r.subtract(s,e,Zt),a=r.subtract(t,e,Xt),p=r.dot(c,c),u=r.dot(c,o),d=r.dot(c,a),m=r.dot(o,o),l=r.dot(o,a)}else{if(R.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(R.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(R.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=R.subtract(n,e,Yt),o=R.subtract(s,e,Zt),a=R.subtract(t,e,Xt),p=R.dot(c,c),u=R.dot(c,o),d=R.dot(c,a),m=R.dot(o,o),l=R.dot(o,a)}i.y=m*d-u*l,i.z=p*l-u*d;let h=p*m-u*u;if(h!==0)return i.y/=h,i.z/=h,i.x=1-i.y-i.z,i}var Ht=pe;var Nt={};Nt.calculateACMR=function(t){t=K(t,K.EMPTY_OBJECT);let e=t.indices,n=t.maximumIndex,s=K(t.cacheSize,24);if(!f(e))throw new I("indices is required.");let i=e.length;if(i<3||i%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");if(!f(n)){n=0;let a=0,p=e[a];for(;a<i;)p>n&&(n=p),++a,p=e[a]}let c=[];for(let a=0;a<n+1;a++)c[a]=0;let o=s+1;for(let a=0;a<i;++a)o-c[e[a]]>s&&(c[e[a]]=o,++o);return(o-s+1)/(i/3)};Nt.tipsify=function(t){t=K(t,K.EMPTY_OBJECT);let e=t.indices,n=t.maximumIndex,s=K(t.cacheSize,24),i;function c(C,z,q,V){for(;z.length>=1;){let G=z[z.length-1];if(z.splice(z.length-1,1),C[G].numLiveTriangles>0)return G}for(;i<V;){if(C[i].numLiveTriangles>0)return++i,i-1;++i}return-1}function o(C,z,q,V,G,M,J){let Y=-1,_,Pt=-1,gt=0;for(;gt<q.length;){let ft=q[gt];V[ft].numLiveTriangles&&(_=0,G-V[ft].timeStamp+2*V[ft].numLiveTriangles<=z&&(_=G-V[ft].timeStamp),(_>Pt||Pt===-1)&&(Pt=_,Y=ft)),++gt}return Y===-1?c(V,M,C,J):Y}if(!f(e))throw new I("indices is required.");let a=e.length;if(a<3||a%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");let p=0,u=0,d=e[u],m=a;if(f(n))p=n+1;else{for(;u<m;)d>p&&(p=d),++u,d=e[u];if(p===-1)return 0;++p}let l=[],h;for(h=0;h<p;h++)l[h]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let y=0;for(;u<m;)l[e[u]].vertexTriangles.push(y),++l[e[u]].numLiveTriangles,l[e[u+1]].vertexTriangles.push(y),++l[e[u+1]].numLiveTriangles,l[e[u+2]].vertexTriangles.push(y),++l[e[u+2]].numLiveTriangles,++y,u+=3;let v=0,b=s+1;i=1;let S=[],x=[],w,A,E=0,P=[],O=a/3,L=[];for(h=0;h<O;h++)L[h]=!1;let g,T;for(;v!==-1;){S=[],A=l[v],T=A.vertexTriangles.length;for(let C=0;C<T;++C)if(y=A.vertexTriangles[C],!L[y]){L[y]=!0,u=y+y+y;for(let z=0;z<3;++z)g=e[u],S.push(g),x.push(g),P[E]=g,++E,w=l[g],--w.numLiveTriangles,b-w.timeStamp>s&&(w.timeStamp=b,++b),++u}v=o(e,s,S,l,b,x,p)}return P};var Wt=Nt;var F={};function St(t,e,n,s,i){t[e++]=n,t[e++]=s,t[e++]=s,t[e++]=i,t[e++]=i,t[e]=n}function de(t){let e=t.length,n=e/3*6,s=j.createTypedArray(e,n),i=0;for(let c=0;c<e;c+=3,i+=6)St(s,i,t[c],t[c+1],t[c+2]);return s}function me(t){let e=t.length;if(e>=3){let n=(e-2)*6,s=j.createTypedArray(e,n);St(s,0,t[0],t[1],t[2]);let i=6;for(let c=3;c<e;++c,i+=6)St(s,i,t[c-1],t[c],t[c-2]);return s}return new Uint16Array}function he(t){if(t.length>0){let e=t.length-1,n=(e-1)*6,s=j.createTypedArray(e,n),i=t[0],c=0;for(let o=1;o<e;++o,c+=6)St(s,c,i,t[o],t[o+1]);return s}return new Uint16Array}F.toWireframe=function(t){if(!f(t))throw new I("geometry is required.");let e=t.indices;if(f(e)){switch(t.primitiveType){case D.TRIANGLES:t.indices=de(e);break;case D.TRIANGLE_STRIP:t.indices=me(e);break;case D.TRIANGLE_FAN:t.indices=he(e);break;default:throw new I("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}t.primitiveType=D.LINES}return t};F.createLineSegmentsForVectors=function(t,e,n){if(e=K(e,"normal"),!f(t))throw new I("geometry is required.");if(!f(t.attributes.position))throw new I("geometry.attributes.position is required.");if(!f(t.attributes[e]))throw new I(`geometry.attributes must have an attribute with the same name as the attributeName parameter, ${e}.`);n=K(n,1e4);let s=t.attributes.position.values,i=t.attributes[e].values,c=s.length,o=new Float64Array(2*c),a=0;for(let d=0;d<c;d+=3)o[a++]=s[d],o[a++]=s[d+1],o[a++]=s[d+2],o[a++]=s[d]+i[d]*n,o[a++]=s[d+1]+i[d+1]*n,o[a++]=s[d+2]+i[d+2]*n;let p,u=t.boundingSphere;return f(u)&&(p=new rt(u.center,u.radius+n)),new B({attributes:{position:new U({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:D.LINES,boundingSphere:p})};F.createAttributeLocations=function(t){if(!f(t))throw new I("geometry is required.");let e=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=t.attributes,s={},i=0,c,o=e.length;for(c=0;c<o;++c){let a=e[c];f(n[a])&&(s[a]=i++)}for(let a in n)n.hasOwnProperty(a)&&!f(s[a])&&(s[a]=i++);return s};F.reorderForPreVertexCache=function(t){if(!f(t))throw new I("geometry is required.");let e=B.computeNumberOfVertices(t),n=t.indices;if(f(n)){let s=new Int32Array(e);for(let l=0;l<e;l++)s[l]=-1;let i=n,c=i.length,o=j.createTypedArray(e,c),a=0,p=0,u=0,d;for(;a<c;)d=s[i[a]],d!==-1?o[p]=d:(d=i[a],s[d]=u,o[p]=u,++u),++a,++p;t.indices=o;let m=t.attributes;for(let l in m)if(m.hasOwnProperty(l)&&f(m[l])&&f(m[l].values)){let h=m[l],y=h.values,v=0,b=h.componentsPerAttribute,S=k.createTypedArray(h.componentDatatype,u*b);for(;v<e;){let x=s[v];if(x!==-1)for(let w=0;w<b;w++)S[b*x+w]=y[b*v+w];++v}h.values=S}}return t};F.reorderForPostVertexCache=function(t,e){if(!f(t))throw new I("geometry is required.");let n=t.indices;if(t.primitiveType===D.TRIANGLES&&f(n)){let s=n.length,i=0;for(let c=0;c<s;c++)n[c]>i&&(i=n[c]);t.indices=Wt.tipsify({indices:n,maximumIndex:i,cacheSize:e})}return t};function $t(t){let e={};for(let n in t)if(t.hasOwnProperty(n)&&f(t[n])&&f(t[n].values)){let s=t[n];e[n]=new U({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:[]})}return e}function be(t,e,n){for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];for(let c=0;c<i.componentsPerAttribute;++c)t[s].values.push(i.values[n*i.componentsPerAttribute+c])}}F.fitToUnsignedShortIndices=function(t){if(!f(t))throw new I("geometry is required.");if(f(t.indices)&&t.primitiveType!==D.TRIANGLES&&t.primitiveType!==D.LINES&&t.primitiveType!==D.POINTS)throw new I("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");let e=[],n=B.computeNumberOfVertices(t);if(f(t.indices)&&n>=N.SIXTY_FOUR_KILOBYTES){let s=[],i=[],c=0,o=$t(t.attributes),a=t.indices,p=a.length,u;t.primitiveType===D.TRIANGLES?u=3:t.primitiveType===D.LINES?u=2:t.primitiveType===D.POINTS&&(u=1);for(let d=0;d<p;d+=u){for(let m=0;m<u;++m){let l=a[d+m],h=s[l];f(h)||(h=c++,s[l]=h,be(o,t.attributes,l)),i.push(h)}c+u>=N.SIXTY_FOUR_KILOBYTES&&(e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV})),s=[],i=[],c=0,o=$t(t.attributes))}i.length!==0&&e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV}))}else e.push(t);return e};var Jt=new r,we=new Mt;F.projectTo2D=function(t,e,n,s,i){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeName3D is required.");if(!f(s))throw new I("attributeName2D is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==k.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let c=t.attributes[e];i=f(i)?i:new _t;let o=i.ellipsoid,a=c.values,p=new Float64Array(a.length),u=0;for(let d=0;d<a.length;d+=3){let m=r.fromArray(a,d,Jt),l=o.cartesianToCartographic(m,we);if(!f(l))throw new I(`Could not project point (${m.x}, ${m.y}, ${m.z}) to 2D.`);let h=i.project(l,Jt);p[u++]=h.x,p[u++]=h.y,p[u++]=h.z}return t.attributes[n]=c,t.attributes[s]=new U({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:p}),delete t.attributes[e],t};var zt={high:0,low:0};F.encodeAttribute=function(t,e,n,s){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeHighName is required.");if(!f(s))throw new I("attributeLowName is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==k.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let i=t.attributes[e],c=i.values,o=c.length,a=new Float32Array(o),p=new Float32Array(o);for(let d=0;d<o;++d)jt.encode(c[d],zt),a[d]=zt.high,p[d]=zt.low;let u=i.componentsPerAttribute;return t.attributes[n]=new U({componentDatatype:k.FLOAT,componentsPerAttribute:u,values:a}),t.attributes[s]=new U({componentDatatype:k.FLOAT,componentsPerAttribute:u,values:p}),delete t.attributes[e],t};var $=new r;function Dt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),H.multiplyByPoint(t,$,$),r.pack($,n,i)}}function qt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),Ot.multiplyByVector(t,$,$),$=r.normalize($,$),r.pack($,n,i)}}var vt=new H,yt=new Ot;F.transformToWorldCoordinates=function(t){if(!f(t))throw new I("instance is required.");let e=t.modelMatrix;if(H.equals(e,H.IDENTITY))return t;let n=t.geometry.attributes;Dt(e,n.position),Dt(e,n.prevPosition),Dt(e,n.nextPosition),(f(n.normal)||f(n.tangent)||f(n.bitangent))&&(H.inverse(e,vt),H.transpose(vt,vt),H.getMatrix3(vt,yt),qt(yt,n.normal),qt(yt,n.tangent),qt(yt,n.bitangent));let s=t.geometry.boundingSphere;return f(s)&&(t.geometry.boundingSphere=rt.transform(s,e,s)),t.modelMatrix=H.clone(H.IDENTITY),t};function ve(t,e){let n=t.length,s={},i=t[0][e].attributes,c;for(c in i)if(i.hasOwnProperty(c)&&f(i[c])&&f(i[c].values)){let o=i[c],a=o.values.length,p=!0;for(let u=1;u<n;++u){let d=t[u][e].attributes[c];if(!f(d)||o.componentDatatype!==d.componentDatatype||o.componentsPerAttribute!==d.componentsPerAttribute||o.normalize!==d.normalize){p=!1;break}a+=d.values.length}p&&(s[c]=new U({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:k.createTypedArray(o.componentDatatype,a)}))}return s}var ye=new r;function Vt(t,e){let n=t.length,s,i,c,o,a=t[0].modelMatrix,p=f(t[0][e].indices),u=t[0][e].primitiveType;for(i=1;i<n;++i){if(!H.equals(t[i].modelMatrix,a))throw new I("All instances must have the same modelMatrix.");if(f(t[i][e].indices)!==p)throw new I("All instance geometries must have an indices or not have one.");if(t[i][e].primitiveType!==u)throw new I("All instance geometries must have the same primitiveType.")}let d=ve(t,e),m,l,h;for(s in d)if(d.hasOwnProperty(s))for(m=d[s].values,o=0,i=0;i<n;++i)for(l=t[i][e].attributes[s].values,h=l.length,c=0;c<h;++c)m[o++]=l[c];let y;if(p){let x=0;for(i=0;i<n;++i)x+=t[i][e].indices.length;let w=B.computeNumberOfVertices(new B({attributes:d,primitiveType:D.POINTS})),A=j.createTypedArray(w,x),E=0,P=0;for(i=0;i<n;++i){let O=t[i][e].indices,L=O.length;for(o=0;o<L;++o)A[E++]=P+O[o];P+=B.computeNumberOfVertices(t[i][e])}y=A}let v=new r,b=0,S;for(i=0;i<n;++i){if(S=t[i][e].boundingSphere,!f(S)){v=void 0;break}r.add(S.center,v,v)}if(f(v))for(r.divideByScalar(v,n,v),i=0;i<n;++i){S=t[i][e].boundingSphere;let x=r.magnitude(r.subtract(S.center,v,ye))+S.radius;x>b&&(b=x)}return new B({attributes:d,indices:y,primitiveType:u,boundingSphere:f(v)?new rt(v,b):void 0})}F.combineInstances=function(t){if(!f(t)||t.length<1)throw new I("instances is required and must have length greater than zero.");let e=[],n=[],s=t.length;for(let c=0;c<s;++c){let o=t[c];f(o.geometry)?e.push(o):f(o.westHemisphereGeometry)&&f(o.eastHemisphereGeometry)&&n.push(o)}let i=[];return e.length>0&&i.push(Vt(e,"geometry")),n.length>0&&(i.push(Vt(n,"westHemisphereGeometry")),i.push(Vt(n,"eastHemisphereGeometry"))),i};var Z=new r,ht=new r,ct=new r,at=new r;F.computeNormal=function(t){if(!f(t))throw new I("geometry is required.");if(!f(t.attributes.position)||!f(t.attributes.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(t.indices))throw new I("geometry.indices is required.");if(t.indices.length<2||t.indices.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let e=t.indices,n=t.attributes,s=n.position.values,i=n.position.values.length/3,c=e.length,o=new Array(i),a=new Array(c/3),p=new Array(c),u;for(u=0;u<i;u++)o[u]={indexOffset:0,count:0,currentCount:0};let d=0;for(u=0;u<c;u+=3){let y=e[u],v=e[u+1],b=e[u+2],S=y*3,x=v*3,w=b*3;ht.x=s[S],ht.y=s[S+1],ht.z=s[S+2],ct.x=s[x],ct.y=s[x+1],ct.z=s[x+2],at.x=s[w],at.y=s[w+1],at.z=s[w+2],o[y].count++,o[v].count++,o[b].count++,r.subtract(ct,ht,ct),r.subtract(at,ht,at),a[d]=r.cross(ct,at,new r),d++}let m=0;for(u=0;u<i;u++)o[u].indexOffset+=m,m+=o[u].count;d=0;let l;for(u=0;u<c;u+=3){l=o[e[u]];let y=l.indexOffset+l.currentCount;p[y]=d,l.currentCount++,l=o[e[u+1]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,l=o[e[u+2]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,d++}let h=new Float32Array(i*3);for(u=0;u<i;u++){let y=u*3;if(l=o[u],r.clone(r.ZERO,Z),l.count>0){for(d=0;d<l.count;d++)r.add(Z,a[p[l.indexOffset+d]],Z);r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&r.clone(a[p[l.indexOffset]],Z)}r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&(Z.z=1),r.normalize(Z,Z),h[y]=Z.x,h[y+1]=Z.y,h[y+2]=Z.z}return t.attributes.normal=new U({componentDatatype:k.FLOAT,componentsPerAttribute:3,values:h}),t};var xe=new r,Kt=new r,Te=new r;F.computeTangentAndBitangent=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes,n=t.indices;if(!f(e.position)||!f(e.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(e.normal)||!f(e.normal.values))throw new I("geometry.attributes.normal.values is required.");if(!f(e.st)||!f(e.st.values))throw new I("geometry.attributes.st.values is required.");if(!f(n))throw new I("geometry.indices is required.");if(n.length<2||n.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let s=t.attributes.position.values,i=t.attributes.normal.values,c=t.attributes.st.values,o=t.attributes.position.values.length/3,a=n.length,p=new Array(o*3),u;for(u=0;u<p.length;u++)p[u]=0;let d,m,l;for(u=0;u<a;u+=3){let v=n[u],b=n[u+1],S=n[u+2];d=v*3,m=b*3,l=S*3;let x=v*2,w=b*2,A=S*2,E=s[d],P=s[d+1],O=s[d+2],L=c[x],g=c[x+1],T=c[w+1]-g,C=c[A+1]-g,z=1/((c[w]-L)*C-(c[A]-L)*T),q=(C*(s[m]-E)-T*(s[l]-E))*z,V=(C*(s[m+1]-P)-T*(s[l+1]-P))*z,G=(C*(s[m+2]-O)-T*(s[l+2]-O))*z;p[d]+=q,p[d+1]+=V,p[d+2]+=G,p[m]+=q,p[m+1]+=V,p[m+2]+=G,p[l]+=q,p[l+1]+=V,p[l+2]+=G}let h=new Float32Array(o*3),y=new Float32Array(o*3);for(u=0;u<o;u++){d=u*3,m=d+1,l=d+2;let v=r.fromArray(i,d,xe),b=r.fromArray(p,d,Te),S=r.dot(v,b);r.multiplyByScalar(v,S,Kt),r.normalize(r.subtract(b,Kt,b),b),h[d]=b.x,h[m]=b.y,h[l]=b.z,r.normalize(r.cross(v,b,b),b),y[d]=b.x,y[m]=b.y,y[l]=b.z}return t.attributes.tangent=new U({componentDatatype:k.FLOAT,componentsPerAttribute:3,values:h}),t.attributes.bitangent=new U({componentDatatype:k.FLOAT,componentsPerAttribute:3,values:y}),t};var bt=new R,W=new r,Qt=new r,te=new r,xt=new R;F.compressVertices=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes.extrudeDirection,n,s;if(f(e)){let P=e.values;s=P.length/3;let O=new Float32Array(s*2),L=0;for(n=0;n<s;++n){if(r.fromArray(P,n*3,W),r.equals(W,r.ZERO)){L+=2;continue}xt=et.octEncodeInRange(W,65535,xt),O[L++]=xt.x,O[L++]=xt.y}return t.attributes.compressedAttributes=new U({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:O}),delete t.attributes.extrudeDirection,t}let i=t.attributes.normal,c=t.attributes.st,o=f(i),a=f(c);if(!o&&!a)return t;let p=t.attributes.tangent,u=t.attributes.bitangent,d=f(p),m=f(u),l,h,y,v;o&&(l=i.values),a&&(h=c.values),d&&(y=p.values),m&&(v=u.values),s=(o?l.length:h.length)/(o?3:2);let x=s,w=a&&o?2:1;w+=d||m?1:0,x*=w;let A=new Float32Array(x),E=0;for(n=0;n<s;++n){a&&(R.fromArray(h,n*2,bt),A[E++]=et.compressTextureCoordinates(bt));let P=n*3;o&&f(y)&&f(v)?(r.fromArray(l,P,W),r.fromArray(y,P,Qt),r.fromArray(v,P,te),et.octPack(W,Qt,te,bt),A[E++]=bt.x,A[E++]=bt.y):(o&&(r.fromArray(l,P,W),A[E++]=et.octEncodeFloat(W)),d&&(r.fromArray(y,P,W),A[E++]=et.octEncodeFloat(W)),m&&(r.fromArray(v,P,W),A[E++]=et.octEncodeFloat(W)))}return t.attributes.compressedAttributes=new U({componentDatatype:k.FLOAT,componentsPerAttribute:w,values:A}),o&&delete t.attributes.normal,a&&delete t.attributes.st,m&&delete t.attributes.bitangent,d&&delete t.attributes.tangent,t};function Ae(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");if(e%3!==0)throw new I("The number of vertices must be a multiple of three.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function Ie(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");let n=j.createTypedArray(e,(e-2)*3);n[0]=1,n[1]=0,n[2]=2;let s=3;for(let i=3;i<e;++i)n[s++]=i-1,n[s++]=0,n[s++]=i;return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Se(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least 3.");let n=j.createTypedArray(e,(e-2)*3);n[0]=0,n[1]=1,n[2]=2,e>3&&(n[3]=0,n[4]=2,n[5]=3);let s=6;for(let i=3;i<e-1;i+=2)n[s++]=i,n[s++]=i-1,n[s++]=i+1,i+2<e&&(n[s++]=i,n[s++]=i+1,n[s++]=i+2);return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Pe(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");if(e%2!==0)throw new I("The number of vertices must be a multiple of 2.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function ge(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,(e-1)*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return t.indices=n,t.primitiveType=D.LINES,t}function Oe(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,e*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return n[s++]=e-1,n[s]=0,t.indices=n,t.primitiveType=D.LINES,t}function Le(t){switch(t.primitiveType){case D.TRIANGLE_FAN:return Ie(t);case D.TRIANGLE_STRIP:return Se(t);case D.TRIANGLES:return Ae(t);case D.LINE_STRIP:return ge(t);case D.LINE_LOOP:return Oe(t);case D.LINES:return Pe(t)}return t}function tt(t,e){Math.abs(t.y)<N.EPSILON6&&(e?t.y=-N.EPSILON6:t.y=N.EPSILON6)}function Ee(t,e,n){if(t.y!==0&&e.y!==0&&n.y!==0){tt(t,t.y<0),tt(e,e.y<0),tt(n,n.y<0);return}let s=Math.abs(t.y),i=Math.abs(e.y),c=Math.abs(n.y),o;s>i?s>c?o=N.sign(t.y):o=N.sign(n.y):i>c?o=N.sign(e.y):o=N.sign(n.y);let a=o<0;tt(t,a),tt(e,a),tt(n,a)}var ee=new r;function X(t,e,n,s){r.add(t,r.multiplyByScalar(r.subtract(e,t,ee),t.y/(t.y-e.y),ee),n),r.clone(n,s),tt(n,!0),tt(s,!1)}var nt=new r,it=new r,st=new r,ot=new r,Rt={positions:new Array(7),indices:new Array(3*3)};function Ne(t,e,n){if(t.x>=0||e.x>=0||n.x>=0)return;Ee(t,e,n);let s=t.y<0,i=e.y<0,c=n.y<0,o=0;o+=s?1:0,o+=i?1:0,o+=c?1:0;let a=Rt.indices;o===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,s?(X(t,e,nt,st),X(t,n,it,ot),a[0]=0,a[3]=1,a[4]=2,a[6]=1):i?(X(e,n,nt,st),X(e,t,it,ot),a[0]=1,a[3]=2,a[4]=0,a[6]=2):c&&(X(n,t,nt,st),X(n,e,it,ot),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):o===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,s?i?c||(X(n,t,nt,st),X(n,e,it,ot),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(X(e,n,nt,st),X(e,t,it,ot),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(X(t,e,nt,st),X(t,n,it,ot),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let p=Rt.positions;return p[0]=t,p[1]=e,p[2]=n,p.length=3,(o===1||o===2)&&(p[3]=nt,p[4]=it,p[5]=st,p[6]=ot,p.length=7),Rt}function ne(t,e){let n=t.attributes;if(n.position.values.length===0)return;for(let i in n)if(n.hasOwnProperty(i)&&f(n[i])&&f(n[i].values)){let c=n[i];c.values=k.createTypedArray(c.componentDatatype,c.values)}let s=B.computeNumberOfVertices(t);return t.indices=j.createTypedArray(s,t.indices),e&&(t.boundingSphere=rt.fromVertices(n.position.values)),t}function lt(t){let e=t.attributes,n={};for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];n[s]=new U({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return new B({attributes:n,indices:[],primitiveType:t.primitiveType})}function kt(t,e,n){let s=f(t.geometry.boundingSphere);e=ne(e,s),n=ne(n,s),f(n)&&!f(e)?t.geometry=n:!f(n)&&f(e)?t.geometry=e:(t.westHemisphereGeometry=e,t.eastHemisphereGeometry=n,t.geometry=void 0)}function Ft(t,e){let n=new t,s=new t,i=new t;return function(c,o,a,p,u,d,m,l){let h=t.fromArray(u,c*e,n),y=t.fromArray(u,o*e,s),v=t.fromArray(u,a*e,i);t.multiplyByScalar(h,p.x,h),t.multiplyByScalar(y,p.y,y),t.multiplyByScalar(v,p.z,v);let b=t.add(h,y,h);t.add(b,v,b),l&&t.normalize(b,b),t.pack(b,d,m*e)}}var ze=Ft(dt,4),It=Ft(r,3),ae=Ft(R,2),De=function(t,e,n,s,i,c,o){let a=i[t]*s.x,p=i[e]*s.y,u=i[n]*s.z;c[o]=a+p+u>N.EPSILON6?1:0},wt=new r,Gt=new r,Ct=new r,qe=new r;function Tt(t,e,n,s,i,c,o,a,p,u,d,m,l,h,y,v){if(!f(c)&&!f(o)&&!f(a)&&!f(p)&&!f(u)&&h===0)return;let b=r.fromArray(i,t*3,wt),S=r.fromArray(i,e*3,Gt),x=r.fromArray(i,n*3,Ct),w=Ht(s,b,S,x,qe);if(f(w)){if(f(c)&&It(t,e,n,w,c,m.normal.values,v,!0),f(u)){let A=r.fromArray(u,t*3,wt),E=r.fromArray(u,e*3,Gt),P=r.fromArray(u,n*3,Ct);r.multiplyByScalar(A,w.x,A),r.multiplyByScalar(E,w.y,E),r.multiplyByScalar(P,w.z,P);let O;!r.equals(A,r.ZERO)||!r.equals(E,r.ZERO)||!r.equals(P,r.ZERO)?(O=r.add(A,E,A),r.add(O,P,O),r.normalize(O,O)):(O=wt,O.x=0,O.y=0,O.z=0),r.pack(O,m.extrudeDirection.values,v*3)}if(f(d)&&De(t,e,n,w,d,m.applyOffset.values,v),f(o)&&It(t,e,n,w,o,m.tangent.values,v,!0),f(a)&&It(t,e,n,w,a,m.bitangent.values,v,!0),f(p)&&ae(t,e,n,w,p,m.st.values,v),h>0)for(let A=0;A<h;A++){let E=l[A];Ve(t,e,n,w,v,y[E],m[E])}}}function Ve(t,e,n,s,i,c,o){let a=c.componentsPerAttribute,p=c.values,u=o.values;switch(a){case 4:ze(t,e,n,s,p,u,i,!1);break;case 3:It(t,e,n,s,p,u,i,!1);break;case 2:ae(t,e,n,s,p,u,i,!1);break;default:u[i]=p[t]*s.x+p[e]*s.y+p[n]*s.z}}function Q(t,e,n,s,i,c){let o=t.position.values.length/3;if(i!==-1){let a=s[i],p=n[a];return p===-1?(n[a]=o,t.position.values.push(c.x,c.y,c.z),e.push(o),o):(e.push(p),p)}return t.position.values.push(c.x,c.y,c.z),e.push(o),o}var Re={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function ie(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.normal)?n.normal.values:void 0,c=f(n.bitangent)?n.bitangent.values:void 0,o=f(n.tangent)?n.tangent.values:void 0,a=f(n.st)?n.st.values:void 0,p=f(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=f(n.applyOffset)?n.applyOffset.values:void 0,d=e.indices,m=[];for(let O in n)n.hasOwnProperty(O)&&!Re[O]&&f(n[O])&&m.push(O);let l=m.length,h=lt(e),y=lt(e),v,b,S,x,w,A=[];A.length=s.length/3;let E=[];for(E.length=s.length/3,w=0;w<A.length;++w)A[w]=-1,E[w]=-1;let P=d.length;for(w=0;w<P;w+=3){let O=d[w],L=d[w+1],g=d[w+2],T=r.fromArray(s,O*3),C=r.fromArray(s,L*3),z=r.fromArray(s,g*3),q=Ne(T,C,z);if(f(q)&&q.positions.length>3){let V=q.positions,G=q.indices,M=G.length;for(let J=0;J<M;++J){let Y=G[J],_=V[Y];_.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=Q(v,b,S,d,Y<3?w+Y:-1,_),Tt(O,L,g,_,s,i,o,c,a,p,u,v,m,l,n,x)}}else f(q)&&(T=q.positions[0],C=q.positions[1],z=q.positions[2]),T.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=Q(v,b,S,d,w,T),Tt(O,L,g,T,s,i,o,c,a,p,u,v,m,l,n,x),x=Q(v,b,S,d,w+1,C),Tt(O,L,g,C,s,i,o,c,a,p,u,v,m,l,n,x),x=Q(v,b,S,d,w+2,z),Tt(O,L,g,z,s,i,o,c,a,p,u,v,m,l,n,x)}kt(t,y,h)}var ue=Et.fromPointNormal(r.ZERO,r.UNIT_Y),Ge=new r,Ce=new r;function ut(t,e,n,s,i,c,o){if(!f(o))return;let a=r.fromArray(s,t*3,wt);r.equalsEpsilon(a,n,N.EPSILON10)?c.applyOffset.values[i]=o[t]:c.applyOffset.values[i]=o[e]}function se(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.applyOffset)?n.applyOffset.values:void 0,c=e.indices,o=lt(e),a=lt(e),p,u=c.length,d=[];d.length=s.length/3;let m=[];for(m.length=s.length/3,p=0;p<d.length;++p)d[p]=-1,m[p]=-1;for(p=0;p<u;p+=2){let l=c[p],h=c[p+1],y=r.fromArray(s,l*3,wt),v=r.fromArray(s,h*3,Gt),b;Math.abs(y.y)<N.EPSILON6&&(y.y<0?y.y=-N.EPSILON6:y.y=N.EPSILON6),Math.abs(v.y)<N.EPSILON6&&(v.y<0?v.y=-N.EPSILON6:v.y=N.EPSILON6);let S=o.attributes,x=o.indices,w=m,A=a.attributes,E=a.indices,P=d,O=Lt.lineSegmentPlane(y,v,ue,Ct);if(f(O)){let L=r.multiplyByScalar(r.UNIT_Y,5*N.EPSILON9,Ge);y.y<0&&(r.negate(L,L),S=a.attributes,x=a.indices,w=d,A=o.attributes,E=o.indices,P=m);let g=r.add(O,L,Ce);b=Q(S,x,w,c,p,y),ut(l,h,y,s,b,S,i),b=Q(S,x,w,c,-1,g),ut(l,h,g,s,b,S,i),r.negate(L,L),r.add(O,L,g),b=Q(A,E,P,c,-1,g),ut(l,h,g,s,b,A,i),b=Q(A,E,P,c,p+1,v),ut(l,h,v,s,b,A,i)}else{let L,g,T;y.y<0?(L=a.attributes,g=a.indices,T=d):(L=o.attributes,g=o.indices,T=m),b=Q(L,g,T,c,p,y),ut(l,h,y,s,b,L,i),b=Q(L,g,T,c,p+1,v),ut(l,h,v,s,b,L,i)}}kt(t,a,o)}var oe=new R,Be=new R,le=new r,fe=new r,Bt=new r,ke=new r,Fe=new r,Me=new r,re=new dt;function ce(t){let e=t.attributes,n=e.position.values,s=e.prevPosition.values,i=e.nextPosition.values,c=n.length;for(let o=0;o<c;o+=3){let a=r.unpack(n,o,le);if(a.x>0)continue;let p=r.unpack(s,o,fe);(a.y<0&&p.y>0||a.y>0&&p.y<0)&&(o-3>0?(s[o]=n[o-3],s[o+1]=n[o-2],s[o+2]=n[o-1]):r.pack(a,s,o));let u=r.unpack(i,o,Bt);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(o+3<c?(i[o]=n[o+3],i[o+1]=n[o+4],i[o+2]=n[o+5]):r.pack(a,i,o))}}var _e=5*N.EPSILON9,At=N.EPSILON6;function Ue(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=n.prevPosition.values,c=n.nextPosition.values,o=n.expandAndWidth.values,a=f(n.st)?n.st.values:void 0,p=f(n.color)?n.color.values:void 0,u=lt(e),d=lt(e),m,l,h,y=!1,v=s.length/3;for(m=0;m<v;m+=4){let b=m,S=m+2,x=r.fromArray(s,b*3,le),w=r.fromArray(s,S*3,fe);if(Math.abs(x.y)<At)for(x.y=At*(w.y<0?-1:1),s[m*3+1]=x.y,s[(m+1)*3+1]=x.y,l=b*3;l<b*3+4*3;l+=3)i[l]=s[m*3],i[l+1]=s[m*3+1],i[l+2]=s[m*3+2];if(Math.abs(w.y)<At)for(w.y=At*(x.y<0?-1:1),s[(m+2)*3+1]=w.y,s[(m+3)*3+1]=w.y,l=b*3;l<b*3+4*3;l+=3)c[l]=s[(m+2)*3],c[l+1]=s[(m+2)*3+1],c[l+2]=s[(m+2)*3+2];let A=u.attributes,E=u.indices,P=d.attributes,O=d.indices,L=Lt.lineSegmentPlane(x,w,ue,ke);if(f(L)){y=!0;let g=r.multiplyByScalar(r.UNIT_Y,_e,Fe);x.y<0&&(r.negate(g,g),A=d.attributes,E=d.indices,P=u.attributes,O=u.indices);let T=r.add(L,g,Me);A.position.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.position.values.push(T.x,T.y,T.z),A.position.values.push(T.x,T.y,T.z),A.prevPosition.values.push(i[b*3],i[b*3+1],i[b*3+2]),A.prevPosition.values.push(i[b*3+3],i[b*3+4],i[b*3+5]),A.prevPosition.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),r.negate(g,g),r.add(L,g,T),P.position.values.push(T.x,T.y,T.z),P.position.values.push(T.x,T.y,T.z),P.position.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.nextPosition.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.nextPosition.values.push(c[S*3],c[S*3+1],c[S*3+2]),P.nextPosition.values.push(c[S*3+3],c[S*3+4],c[S*3+5]);let C=R.fromArray(o,b*2,oe),z=Math.abs(C.y);A.expandAndWidth.values.push(-1,z,1,z),A.expandAndWidth.values.push(-1,-z,1,-z),P.expandAndWidth.values.push(-1,z,1,z),P.expandAndWidth.values.push(-1,-z,1,-z);let q=r.magnitudeSquared(r.subtract(L,x,Bt));if(q/=r.magnitudeSquared(r.subtract(w,x,Bt)),f(p)){let V=dt.fromArray(p,b*4,re),G=dt.fromArray(p,S*4,re),M=N.lerp(V.x,G.x,q),J=N.lerp(V.y,G.y,q),Y=N.lerp(V.z,G.z,q),_=N.lerp(V.w,G.w,q);for(l=b*4;l<b*4+2*4;++l)A.color.values.push(p[l]);for(A.color.values.push(M,J,Y,_),A.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),l=S*4;l<S*4+2*4;++l)P.color.values.push(p[l])}if(f(a)){let V=R.fromArray(a,b*2,oe),G=R.fromArray(a,(m+3)*2,Be),M=N.lerp(V.x,G.x,q);for(l=b*2;l<b*2+2*2;++l)A.st.values.push(a[l]);for(A.st.values.push(M,V.y),A.st.values.push(M,G.y),P.st.values.push(M,V.y),P.st.values.push(M,G.y),l=S*2;l<S*2+2*2;++l)P.st.values.push(a[l])}h=A.position.values.length/3-4,E.push(h,h+2,h+1),E.push(h+1,h+2,h+3),h=P.position.values.length/3-4,O.push(h,h+2,h+1),O.push(h+1,h+2,h+3)}else{let g,T;for(x.y<0?(g=d.attributes,T=d.indices):(g=u.attributes,T=u.indices),g.position.values.push(x.x,x.y,x.z),g.position.values.push(x.x,x.y,x.z),g.position.values.push(w.x,w.y,w.z),g.position.values.push(w.x,w.y,w.z),l=m*3;l<m*3+4*3;++l)g.prevPosition.values.push(i[l]),g.nextPosition.values.push(c[l]);for(l=m*2;l<m*2+4*2;++l)g.expandAndWidth.values.push(o[l]),f(a)&&g.st.values.push(a[l]);if(f(p))for(l=m*4;l<m*4+4*4;++l)g.color.values.push(p[l]);h=g.position.values.length/3-4,T.push(h,h+2,h+1),T.push(h+1,h+2,h+3)}}y&&(ce(d),ce(u)),kt(t,d,u)}F.splitLongitude=function(t){if(!f(t))throw new I("instance is required.");let e=t.geometry,n=e.boundingSphere;if(f(n)&&(n.center.x-n.radius>0||rt.intersectPlane(n,Et.ORIGIN_ZX_PLANE)!==Ut.INTERSECTING))return t;if(e.geometryType!==mt.NONE)switch(e.geometryType){case mt.POLYLINES:Ue(t);break;case mt.TRIANGLES:ie(t);break;case mt.LINES:se(t);break}else Le(e),e.primitiveType===D.TRIANGLES?ie(t):e.primitiveType===D.LINES&&se(t);return t};var gn=F;export{gn as a}; +import{a as et}from"./chunk-ABGXSJNX.js";import{a as jt}from"./chunk-DQO6B4EQ.js";import{b as Lt}from"./chunk-TAMCUKAR.js";import{a as Et}from"./chunk-PDMQLSBL.js";import{a as j}from"./chunk-P37AI2DW.js";import{a as mt,b as D,c as B,d as U}from"./chunk-X5IHHI6X.js";import{a as _t,b as Ut,d as rt}from"./chunk-TMSETF7M.js";import{a as dt,b as H}from"./chunk-7Z5IIKOJ.js";import{a as k}from"./chunk-KZNJOCYU.js";import{a as r,b as Mt,c as R,e as Ot}from"./chunk-POASMU2N.js";import{a as N}from"./chunk-R6KGAEF6.js";import{a as K}from"./chunk-IUA6FAOZ.js";import{a as I,b as pt}from"./chunk-UH2WFNTA.js";import{e as f}from"./chunk-PEYJTJPE.js";var Yt=new r,Zt=new r,Xt=new r;function pe(t,e,n,s,i){pt.defined("point",t),pt.defined("p0",e),pt.defined("p1",n),pt.defined("p2",s),f(i)||(i=new r);let c,o,a,p,u,d,m,l;if(f(e.z)){if(r.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(r.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(r.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=r.subtract(n,e,Yt),o=r.subtract(s,e,Zt),a=r.subtract(t,e,Xt),p=r.dot(c,c),u=r.dot(c,o),d=r.dot(c,a),m=r.dot(o,o),l=r.dot(o,a)}else{if(R.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(R.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(R.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=R.subtract(n,e,Yt),o=R.subtract(s,e,Zt),a=R.subtract(t,e,Xt),p=R.dot(c,c),u=R.dot(c,o),d=R.dot(c,a),m=R.dot(o,o),l=R.dot(o,a)}i.y=m*d-u*l,i.z=p*l-u*d;let h=p*m-u*u;if(h!==0)return i.y/=h,i.z/=h,i.x=1-i.y-i.z,i}var Ht=pe;var Nt={};Nt.calculateACMR=function(t){t=K(t,K.EMPTY_OBJECT);let e=t.indices,n=t.maximumIndex,s=K(t.cacheSize,24);if(!f(e))throw new I("indices is required.");let i=e.length;if(i<3||i%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");if(!f(n)){n=0;let a=0,p=e[a];for(;a<i;)p>n&&(n=p),++a,p=e[a]}let c=[];for(let a=0;a<n+1;a++)c[a]=0;let o=s+1;for(let a=0;a<i;++a)o-c[e[a]]>s&&(c[e[a]]=o,++o);return(o-s+1)/(i/3)};Nt.tipsify=function(t){t=K(t,K.EMPTY_OBJECT);let e=t.indices,n=t.maximumIndex,s=K(t.cacheSize,24),i;function c(C,z,q,V){for(;z.length>=1;){let G=z[z.length-1];if(z.splice(z.length-1,1),C[G].numLiveTriangles>0)return G}for(;i<V;){if(C[i].numLiveTriangles>0)return++i,i-1;++i}return-1}function o(C,z,q,V,G,M,J){let Y=-1,_,Pt=-1,gt=0;for(;gt<q.length;){let ft=q[gt];V[ft].numLiveTriangles&&(_=0,G-V[ft].timeStamp+2*V[ft].numLiveTriangles<=z&&(_=G-V[ft].timeStamp),(_>Pt||Pt===-1)&&(Pt=_,Y=ft)),++gt}return Y===-1?c(V,M,C,J):Y}if(!f(e))throw new I("indices is required.");let a=e.length;if(a<3||a%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");let p=0,u=0,d=e[u],m=a;if(f(n))p=n+1;else{for(;u<m;)d>p&&(p=d),++u,d=e[u];if(p===-1)return 0;++p}let l=[],h;for(h=0;h<p;h++)l[h]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let y=0;for(;u<m;)l[e[u]].vertexTriangles.push(y),++l[e[u]].numLiveTriangles,l[e[u+1]].vertexTriangles.push(y),++l[e[u+1]].numLiveTriangles,l[e[u+2]].vertexTriangles.push(y),++l[e[u+2]].numLiveTriangles,++y,u+=3;let v=0,b=s+1;i=1;let S=[],x=[],w,A,E=0,P=[],O=a/3,L=[];for(h=0;h<O;h++)L[h]=!1;let g,T;for(;v!==-1;){S=[],A=l[v],T=A.vertexTriangles.length;for(let C=0;C<T;++C)if(y=A.vertexTriangles[C],!L[y]){L[y]=!0,u=y+y+y;for(let z=0;z<3;++z)g=e[u],S.push(g),x.push(g),P[E]=g,++E,w=l[g],--w.numLiveTriangles,b-w.timeStamp>s&&(w.timeStamp=b,++b),++u}v=o(e,s,S,l,b,x,p)}return P};var Wt=Nt;var F={};function St(t,e,n,s,i){t[e++]=n,t[e++]=s,t[e++]=s,t[e++]=i,t[e++]=i,t[e]=n}function de(t){let e=t.length,n=e/3*6,s=j.createTypedArray(e,n),i=0;for(let c=0;c<e;c+=3,i+=6)St(s,i,t[c],t[c+1],t[c+2]);return s}function me(t){let e=t.length;if(e>=3){let n=(e-2)*6,s=j.createTypedArray(e,n);St(s,0,t[0],t[1],t[2]);let i=6;for(let c=3;c<e;++c,i+=6)St(s,i,t[c-1],t[c],t[c-2]);return s}return new Uint16Array}function he(t){if(t.length>0){let e=t.length-1,n=(e-1)*6,s=j.createTypedArray(e,n),i=t[0],c=0;for(let o=1;o<e;++o,c+=6)St(s,c,i,t[o],t[o+1]);return s}return new Uint16Array}F.toWireframe=function(t){if(!f(t))throw new I("geometry is required.");let e=t.indices;if(f(e)){switch(t.primitiveType){case D.TRIANGLES:t.indices=de(e);break;case D.TRIANGLE_STRIP:t.indices=me(e);break;case D.TRIANGLE_FAN:t.indices=he(e);break;default:throw new I("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}t.primitiveType=D.LINES}return t};F.createLineSegmentsForVectors=function(t,e,n){if(e=K(e,"normal"),!f(t))throw new I("geometry is required.");if(!f(t.attributes.position))throw new I("geometry.attributes.position is required.");if(!f(t.attributes[e]))throw new I(`geometry.attributes must have an attribute with the same name as the attributeName parameter, ${e}.`);n=K(n,1e4);let s=t.attributes.position.values,i=t.attributes[e].values,c=s.length,o=new Float64Array(2*c),a=0;for(let d=0;d<c;d+=3)o[a++]=s[d],o[a++]=s[d+1],o[a++]=s[d+2],o[a++]=s[d]+i[d]*n,o[a++]=s[d+1]+i[d+1]*n,o[a++]=s[d+2]+i[d+2]*n;let p,u=t.boundingSphere;return f(u)&&(p=new rt(u.center,u.radius+n)),new B({attributes:{position:new U({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:D.LINES,boundingSphere:p})};F.createAttributeLocations=function(t){if(!f(t))throw new I("geometry is required.");let e=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=t.attributes,s={},i=0,c,o=e.length;for(c=0;c<o;++c){let a=e[c];f(n[a])&&(s[a]=i++)}for(let a in n)n.hasOwnProperty(a)&&!f(s[a])&&(s[a]=i++);return s};F.reorderForPreVertexCache=function(t){if(!f(t))throw new I("geometry is required.");let e=B.computeNumberOfVertices(t),n=t.indices;if(f(n)){let s=new Int32Array(e);for(let l=0;l<e;l++)s[l]=-1;let i=n,c=i.length,o=j.createTypedArray(e,c),a=0,p=0,u=0,d;for(;a<c;)d=s[i[a]],d!==-1?o[p]=d:(d=i[a],s[d]=u,o[p]=u,++u),++a,++p;t.indices=o;let m=t.attributes;for(let l in m)if(m.hasOwnProperty(l)&&f(m[l])&&f(m[l].values)){let h=m[l],y=h.values,v=0,b=h.componentsPerAttribute,S=k.createTypedArray(h.componentDatatype,u*b);for(;v<e;){let x=s[v];if(x!==-1)for(let w=0;w<b;w++)S[b*x+w]=y[b*v+w];++v}h.values=S}}return t};F.reorderForPostVertexCache=function(t,e){if(!f(t))throw new I("geometry is required.");let n=t.indices;if(t.primitiveType===D.TRIANGLES&&f(n)){let s=n.length,i=0;for(let c=0;c<s;c++)n[c]>i&&(i=n[c]);t.indices=Wt.tipsify({indices:n,maximumIndex:i,cacheSize:e})}return t};function $t(t){let e={};for(let n in t)if(t.hasOwnProperty(n)&&f(t[n])&&f(t[n].values)){let s=t[n];e[n]=new U({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:[]})}return e}function be(t,e,n){for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];for(let c=0;c<i.componentsPerAttribute;++c)t[s].values.push(i.values[n*i.componentsPerAttribute+c])}}F.fitToUnsignedShortIndices=function(t){if(!f(t))throw new I("geometry is required.");if(f(t.indices)&&t.primitiveType!==D.TRIANGLES&&t.primitiveType!==D.LINES&&t.primitiveType!==D.POINTS)throw new I("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");let e=[],n=B.computeNumberOfVertices(t);if(f(t.indices)&&n>=N.SIXTY_FOUR_KILOBYTES){let s=[],i=[],c=0,o=$t(t.attributes),a=t.indices,p=a.length,u;t.primitiveType===D.TRIANGLES?u=3:t.primitiveType===D.LINES?u=2:t.primitiveType===D.POINTS&&(u=1);for(let d=0;d<p;d+=u){for(let m=0;m<u;++m){let l=a[d+m],h=s[l];f(h)||(h=c++,s[l]=h,be(o,t.attributes,l)),i.push(h)}c+u>=N.SIXTY_FOUR_KILOBYTES&&(e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV})),s=[],i=[],c=0,o=$t(t.attributes))}i.length!==0&&e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV}))}else e.push(t);return e};var Jt=new r,we=new Mt;F.projectTo2D=function(t,e,n,s,i){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeName3D is required.");if(!f(s))throw new I("attributeName2D is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==k.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let c=t.attributes[e];i=f(i)?i:new _t;let o=i.ellipsoid,a=c.values,p=new Float64Array(a.length),u=0;for(let d=0;d<a.length;d+=3){let m=r.fromArray(a,d,Jt),l=o.cartesianToCartographic(m,we);if(!f(l))throw new I(`Could not project point (${m.x}, ${m.y}, ${m.z}) to 2D.`);let h=i.project(l,Jt);p[u++]=h.x,p[u++]=h.y,p[u++]=h.z}return t.attributes[n]=c,t.attributes[s]=new U({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:p}),delete t.attributes[e],t};var zt={high:0,low:0};F.encodeAttribute=function(t,e,n,s){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeHighName is required.");if(!f(s))throw new I("attributeLowName is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==k.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let i=t.attributes[e],c=i.values,o=c.length,a=new Float32Array(o),p=new Float32Array(o);for(let d=0;d<o;++d)jt.encode(c[d],zt),a[d]=zt.high,p[d]=zt.low;let u=i.componentsPerAttribute;return t.attributes[n]=new U({componentDatatype:k.FLOAT,componentsPerAttribute:u,values:a}),t.attributes[s]=new U({componentDatatype:k.FLOAT,componentsPerAttribute:u,values:p}),delete t.attributes[e],t};var $=new r;function Dt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),H.multiplyByPoint(t,$,$),r.pack($,n,i)}}function qt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),Ot.multiplyByVector(t,$,$),$=r.normalize($,$),r.pack($,n,i)}}var vt=new H,yt=new Ot;F.transformToWorldCoordinates=function(t){if(!f(t))throw new I("instance is required.");let e=t.modelMatrix;if(H.equals(e,H.IDENTITY))return t;let n=t.geometry.attributes;Dt(e,n.position),Dt(e,n.prevPosition),Dt(e,n.nextPosition),(f(n.normal)||f(n.tangent)||f(n.bitangent))&&(H.inverse(e,vt),H.transpose(vt,vt),H.getMatrix3(vt,yt),qt(yt,n.normal),qt(yt,n.tangent),qt(yt,n.bitangent));let s=t.geometry.boundingSphere;return f(s)&&(t.geometry.boundingSphere=rt.transform(s,e,s)),t.modelMatrix=H.clone(H.IDENTITY),t};function ve(t,e){let n=t.length,s={},i=t[0][e].attributes,c;for(c in i)if(i.hasOwnProperty(c)&&f(i[c])&&f(i[c].values)){let o=i[c],a=o.values.length,p=!0;for(let u=1;u<n;++u){let d=t[u][e].attributes[c];if(!f(d)||o.componentDatatype!==d.componentDatatype||o.componentsPerAttribute!==d.componentsPerAttribute||o.normalize!==d.normalize){p=!1;break}a+=d.values.length}p&&(s[c]=new U({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:k.createTypedArray(o.componentDatatype,a)}))}return s}var ye=new r;function Vt(t,e){let n=t.length,s,i,c,o,a=t[0].modelMatrix,p=f(t[0][e].indices),u=t[0][e].primitiveType;for(i=1;i<n;++i){if(!H.equals(t[i].modelMatrix,a))throw new I("All instances must have the same modelMatrix.");if(f(t[i][e].indices)!==p)throw new I("All instance geometries must have an indices or not have one.");if(t[i][e].primitiveType!==u)throw new I("All instance geometries must have the same primitiveType.")}let d=ve(t,e),m,l,h;for(s in d)if(d.hasOwnProperty(s))for(m=d[s].values,o=0,i=0;i<n;++i)for(l=t[i][e].attributes[s].values,h=l.length,c=0;c<h;++c)m[o++]=l[c];let y;if(p){let x=0;for(i=0;i<n;++i)x+=t[i][e].indices.length;let w=B.computeNumberOfVertices(new B({attributes:d,primitiveType:D.POINTS})),A=j.createTypedArray(w,x),E=0,P=0;for(i=0;i<n;++i){let O=t[i][e].indices,L=O.length;for(o=0;o<L;++o)A[E++]=P+O[o];P+=B.computeNumberOfVertices(t[i][e])}y=A}let v=new r,b=0,S;for(i=0;i<n;++i){if(S=t[i][e].boundingSphere,!f(S)){v=void 0;break}r.add(S.center,v,v)}if(f(v))for(r.divideByScalar(v,n,v),i=0;i<n;++i){S=t[i][e].boundingSphere;let x=r.magnitude(r.subtract(S.center,v,ye))+S.radius;x>b&&(b=x)}return new B({attributes:d,indices:y,primitiveType:u,boundingSphere:f(v)?new rt(v,b):void 0})}F.combineInstances=function(t){if(!f(t)||t.length<1)throw new I("instances is required and must have length greater than zero.");let e=[],n=[],s=t.length;for(let c=0;c<s;++c){let o=t[c];f(o.geometry)?e.push(o):f(o.westHemisphereGeometry)&&f(o.eastHemisphereGeometry)&&n.push(o)}let i=[];return e.length>0&&i.push(Vt(e,"geometry")),n.length>0&&(i.push(Vt(n,"westHemisphereGeometry")),i.push(Vt(n,"eastHemisphereGeometry"))),i};var Z=new r,ht=new r,ct=new r,at=new r;F.computeNormal=function(t){if(!f(t))throw new I("geometry is required.");if(!f(t.attributes.position)||!f(t.attributes.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(t.indices))throw new I("geometry.indices is required.");if(t.indices.length<2||t.indices.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let e=t.indices,n=t.attributes,s=n.position.values,i=n.position.values.length/3,c=e.length,o=new Array(i),a=new Array(c/3),p=new Array(c),u;for(u=0;u<i;u++)o[u]={indexOffset:0,count:0,currentCount:0};let d=0;for(u=0;u<c;u+=3){let y=e[u],v=e[u+1],b=e[u+2],S=y*3,x=v*3,w=b*3;ht.x=s[S],ht.y=s[S+1],ht.z=s[S+2],ct.x=s[x],ct.y=s[x+1],ct.z=s[x+2],at.x=s[w],at.y=s[w+1],at.z=s[w+2],o[y].count++,o[v].count++,o[b].count++,r.subtract(ct,ht,ct),r.subtract(at,ht,at),a[d]=r.cross(ct,at,new r),d++}let m=0;for(u=0;u<i;u++)o[u].indexOffset+=m,m+=o[u].count;d=0;let l;for(u=0;u<c;u+=3){l=o[e[u]];let y=l.indexOffset+l.currentCount;p[y]=d,l.currentCount++,l=o[e[u+1]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,l=o[e[u+2]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,d++}let h=new Float32Array(i*3);for(u=0;u<i;u++){let y=u*3;if(l=o[u],r.clone(r.ZERO,Z),l.count>0){for(d=0;d<l.count;d++)r.add(Z,a[p[l.indexOffset+d]],Z);r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&r.clone(a[p[l.indexOffset]],Z)}r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&(Z.z=1),r.normalize(Z,Z),h[y]=Z.x,h[y+1]=Z.y,h[y+2]=Z.z}return t.attributes.normal=new U({componentDatatype:k.FLOAT,componentsPerAttribute:3,values:h}),t};var xe=new r,Kt=new r,Te=new r;F.computeTangentAndBitangent=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes,n=t.indices;if(!f(e.position)||!f(e.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(e.normal)||!f(e.normal.values))throw new I("geometry.attributes.normal.values is required.");if(!f(e.st)||!f(e.st.values))throw new I("geometry.attributes.st.values is required.");if(!f(n))throw new I("geometry.indices is required.");if(n.length<2||n.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let s=t.attributes.position.values,i=t.attributes.normal.values,c=t.attributes.st.values,o=t.attributes.position.values.length/3,a=n.length,p=new Array(o*3),u;for(u=0;u<p.length;u++)p[u]=0;let d,m,l;for(u=0;u<a;u+=3){let v=n[u],b=n[u+1],S=n[u+2];d=v*3,m=b*3,l=S*3;let x=v*2,w=b*2,A=S*2,E=s[d],P=s[d+1],O=s[d+2],L=c[x],g=c[x+1],T=c[w+1]-g,C=c[A+1]-g,z=1/((c[w]-L)*C-(c[A]-L)*T),q=(C*(s[m]-E)-T*(s[l]-E))*z,V=(C*(s[m+1]-P)-T*(s[l+1]-P))*z,G=(C*(s[m+2]-O)-T*(s[l+2]-O))*z;p[d]+=q,p[d+1]+=V,p[d+2]+=G,p[m]+=q,p[m+1]+=V,p[m+2]+=G,p[l]+=q,p[l+1]+=V,p[l+2]+=G}let h=new Float32Array(o*3),y=new Float32Array(o*3);for(u=0;u<o;u++){d=u*3,m=d+1,l=d+2;let v=r.fromArray(i,d,xe),b=r.fromArray(p,d,Te),S=r.dot(v,b);r.multiplyByScalar(v,S,Kt),r.normalize(r.subtract(b,Kt,b),b),h[d]=b.x,h[m]=b.y,h[l]=b.z,r.normalize(r.cross(v,b,b),b),y[d]=b.x,y[m]=b.y,y[l]=b.z}return t.attributes.tangent=new U({componentDatatype:k.FLOAT,componentsPerAttribute:3,values:h}),t.attributes.bitangent=new U({componentDatatype:k.FLOAT,componentsPerAttribute:3,values:y}),t};var bt=new R,W=new r,Qt=new r,te=new r,xt=new R;F.compressVertices=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes.extrudeDirection,n,s;if(f(e)){let P=e.values;s=P.length/3;let O=new Float32Array(s*2),L=0;for(n=0;n<s;++n){if(r.fromArray(P,n*3,W),r.equals(W,r.ZERO)){L+=2;continue}xt=et.octEncodeInRange(W,65535,xt),O[L++]=xt.x,O[L++]=xt.y}return t.attributes.compressedAttributes=new U({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:O}),delete t.attributes.extrudeDirection,t}let i=t.attributes.normal,c=t.attributes.st,o=f(i),a=f(c);if(!o&&!a)return t;let p=t.attributes.tangent,u=t.attributes.bitangent,d=f(p),m=f(u),l,h,y,v;o&&(l=i.values),a&&(h=c.values),d&&(y=p.values),m&&(v=u.values),s=(o?l.length:h.length)/(o?3:2);let x=s,w=a&&o?2:1;w+=d||m?1:0,x*=w;let A=new Float32Array(x),E=0;for(n=0;n<s;++n){a&&(R.fromArray(h,n*2,bt),A[E++]=et.compressTextureCoordinates(bt));let P=n*3;o&&f(y)&&f(v)?(r.fromArray(l,P,W),r.fromArray(y,P,Qt),r.fromArray(v,P,te),et.octPack(W,Qt,te,bt),A[E++]=bt.x,A[E++]=bt.y):(o&&(r.fromArray(l,P,W),A[E++]=et.octEncodeFloat(W)),d&&(r.fromArray(y,P,W),A[E++]=et.octEncodeFloat(W)),m&&(r.fromArray(v,P,W),A[E++]=et.octEncodeFloat(W)))}return t.attributes.compressedAttributes=new U({componentDatatype:k.FLOAT,componentsPerAttribute:w,values:A}),o&&delete t.attributes.normal,a&&delete t.attributes.st,m&&delete t.attributes.bitangent,d&&delete t.attributes.tangent,t};function Ae(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");if(e%3!==0)throw new I("The number of vertices must be a multiple of three.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function Ie(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");let n=j.createTypedArray(e,(e-2)*3);n[0]=1,n[1]=0,n[2]=2;let s=3;for(let i=3;i<e;++i)n[s++]=i-1,n[s++]=0,n[s++]=i;return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Se(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least 3.");let n=j.createTypedArray(e,(e-2)*3);n[0]=0,n[1]=1,n[2]=2,e>3&&(n[3]=0,n[4]=2,n[5]=3);let s=6;for(let i=3;i<e-1;i+=2)n[s++]=i,n[s++]=i-1,n[s++]=i+1,i+2<e&&(n[s++]=i,n[s++]=i+1,n[s++]=i+2);return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Pe(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");if(e%2!==0)throw new I("The number of vertices must be a multiple of 2.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function ge(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,(e-1)*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return t.indices=n,t.primitiveType=D.LINES,t}function Oe(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,e*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return n[s++]=e-1,n[s]=0,t.indices=n,t.primitiveType=D.LINES,t}function Le(t){switch(t.primitiveType){case D.TRIANGLE_FAN:return Ie(t);case D.TRIANGLE_STRIP:return Se(t);case D.TRIANGLES:return Ae(t);case D.LINE_STRIP:return ge(t);case D.LINE_LOOP:return Oe(t);case D.LINES:return Pe(t)}return t}function tt(t,e){Math.abs(t.y)<N.EPSILON6&&(e?t.y=-N.EPSILON6:t.y=N.EPSILON6)}function Ee(t,e,n){if(t.y!==0&&e.y!==0&&n.y!==0){tt(t,t.y<0),tt(e,e.y<0),tt(n,n.y<0);return}let s=Math.abs(t.y),i=Math.abs(e.y),c=Math.abs(n.y),o;s>i?s>c?o=N.sign(t.y):o=N.sign(n.y):i>c?o=N.sign(e.y):o=N.sign(n.y);let a=o<0;tt(t,a),tt(e,a),tt(n,a)}var ee=new r;function X(t,e,n,s){r.add(t,r.multiplyByScalar(r.subtract(e,t,ee),t.y/(t.y-e.y),ee),n),r.clone(n,s),tt(n,!0),tt(s,!1)}var nt=new r,it=new r,st=new r,ot=new r,Rt={positions:new Array(7),indices:new Array(3*3)};function Ne(t,e,n){if(t.x>=0||e.x>=0||n.x>=0)return;Ee(t,e,n);let s=t.y<0,i=e.y<0,c=n.y<0,o=0;o+=s?1:0,o+=i?1:0,o+=c?1:0;let a=Rt.indices;o===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,s?(X(t,e,nt,st),X(t,n,it,ot),a[0]=0,a[3]=1,a[4]=2,a[6]=1):i?(X(e,n,nt,st),X(e,t,it,ot),a[0]=1,a[3]=2,a[4]=0,a[6]=2):c&&(X(n,t,nt,st),X(n,e,it,ot),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):o===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,s?i?c||(X(n,t,nt,st),X(n,e,it,ot),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(X(e,n,nt,st),X(e,t,it,ot),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(X(t,e,nt,st),X(t,n,it,ot),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let p=Rt.positions;return p[0]=t,p[1]=e,p[2]=n,p.length=3,(o===1||o===2)&&(p[3]=nt,p[4]=it,p[5]=st,p[6]=ot,p.length=7),Rt}function ne(t,e){let n=t.attributes;if(n.position.values.length===0)return;for(let i in n)if(n.hasOwnProperty(i)&&f(n[i])&&f(n[i].values)){let c=n[i];c.values=k.createTypedArray(c.componentDatatype,c.values)}let s=B.computeNumberOfVertices(t);return t.indices=j.createTypedArray(s,t.indices),e&&(t.boundingSphere=rt.fromVertices(n.position.values)),t}function lt(t){let e=t.attributes,n={};for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];n[s]=new U({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return new B({attributes:n,indices:[],primitiveType:t.primitiveType})}function kt(t,e,n){let s=f(t.geometry.boundingSphere);e=ne(e,s),n=ne(n,s),f(n)&&!f(e)?t.geometry=n:!f(n)&&f(e)?t.geometry=e:(t.westHemisphereGeometry=e,t.eastHemisphereGeometry=n,t.geometry=void 0)}function Ft(t,e){let n=new t,s=new t,i=new t;return function(c,o,a,p,u,d,m,l){let h=t.fromArray(u,c*e,n),y=t.fromArray(u,o*e,s),v=t.fromArray(u,a*e,i);t.multiplyByScalar(h,p.x,h),t.multiplyByScalar(y,p.y,y),t.multiplyByScalar(v,p.z,v);let b=t.add(h,y,h);t.add(b,v,b),l&&t.normalize(b,b),t.pack(b,d,m*e)}}var ze=Ft(dt,4),It=Ft(r,3),ae=Ft(R,2),De=function(t,e,n,s,i,c,o){let a=i[t]*s.x,p=i[e]*s.y,u=i[n]*s.z;c[o]=a+p+u>N.EPSILON6?1:0},wt=new r,Gt=new r,Ct=new r,qe=new r;function Tt(t,e,n,s,i,c,o,a,p,u,d,m,l,h,y,v){if(!f(c)&&!f(o)&&!f(a)&&!f(p)&&!f(u)&&h===0)return;let b=r.fromArray(i,t*3,wt),S=r.fromArray(i,e*3,Gt),x=r.fromArray(i,n*3,Ct),w=Ht(s,b,S,x,qe);if(f(w)){if(f(c)&&It(t,e,n,w,c,m.normal.values,v,!0),f(u)){let A=r.fromArray(u,t*3,wt),E=r.fromArray(u,e*3,Gt),P=r.fromArray(u,n*3,Ct);r.multiplyByScalar(A,w.x,A),r.multiplyByScalar(E,w.y,E),r.multiplyByScalar(P,w.z,P);let O;!r.equals(A,r.ZERO)||!r.equals(E,r.ZERO)||!r.equals(P,r.ZERO)?(O=r.add(A,E,A),r.add(O,P,O),r.normalize(O,O)):(O=wt,O.x=0,O.y=0,O.z=0),r.pack(O,m.extrudeDirection.values,v*3)}if(f(d)&&De(t,e,n,w,d,m.applyOffset.values,v),f(o)&&It(t,e,n,w,o,m.tangent.values,v,!0),f(a)&&It(t,e,n,w,a,m.bitangent.values,v,!0),f(p)&&ae(t,e,n,w,p,m.st.values,v),h>0)for(let A=0;A<h;A++){let E=l[A];Ve(t,e,n,w,v,y[E],m[E])}}}function Ve(t,e,n,s,i,c,o){let a=c.componentsPerAttribute,p=c.values,u=o.values;switch(a){case 4:ze(t,e,n,s,p,u,i,!1);break;case 3:It(t,e,n,s,p,u,i,!1);break;case 2:ae(t,e,n,s,p,u,i,!1);break;default:u[i]=p[t]*s.x+p[e]*s.y+p[n]*s.z}}function Q(t,e,n,s,i,c){let o=t.position.values.length/3;if(i!==-1){let a=s[i],p=n[a];return p===-1?(n[a]=o,t.position.values.push(c.x,c.y,c.z),e.push(o),o):(e.push(p),p)}return t.position.values.push(c.x,c.y,c.z),e.push(o),o}var Re={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function ie(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.normal)?n.normal.values:void 0,c=f(n.bitangent)?n.bitangent.values:void 0,o=f(n.tangent)?n.tangent.values:void 0,a=f(n.st)?n.st.values:void 0,p=f(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=f(n.applyOffset)?n.applyOffset.values:void 0,d=e.indices,m=[];for(let O in n)n.hasOwnProperty(O)&&!Re[O]&&f(n[O])&&m.push(O);let l=m.length,h=lt(e),y=lt(e),v,b,S,x,w,A=[];A.length=s.length/3;let E=[];for(E.length=s.length/3,w=0;w<A.length;++w)A[w]=-1,E[w]=-1;let P=d.length;for(w=0;w<P;w+=3){let O=d[w],L=d[w+1],g=d[w+2],T=r.fromArray(s,O*3),C=r.fromArray(s,L*3),z=r.fromArray(s,g*3),q=Ne(T,C,z);if(f(q)&&q.positions.length>3){let V=q.positions,G=q.indices,M=G.length;for(let J=0;J<M;++J){let Y=G[J],_=V[Y];_.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=Q(v,b,S,d,Y<3?w+Y:-1,_),Tt(O,L,g,_,s,i,o,c,a,p,u,v,m,l,n,x)}}else f(q)&&(T=q.positions[0],C=q.positions[1],z=q.positions[2]),T.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=Q(v,b,S,d,w,T),Tt(O,L,g,T,s,i,o,c,a,p,u,v,m,l,n,x),x=Q(v,b,S,d,w+1,C),Tt(O,L,g,C,s,i,o,c,a,p,u,v,m,l,n,x),x=Q(v,b,S,d,w+2,z),Tt(O,L,g,z,s,i,o,c,a,p,u,v,m,l,n,x)}kt(t,y,h)}var ue=Et.fromPointNormal(r.ZERO,r.UNIT_Y),Ge=new r,Ce=new r;function ut(t,e,n,s,i,c,o){if(!f(o))return;let a=r.fromArray(s,t*3,wt);r.equalsEpsilon(a,n,N.EPSILON10)?c.applyOffset.values[i]=o[t]:c.applyOffset.values[i]=o[e]}function se(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.applyOffset)?n.applyOffset.values:void 0,c=e.indices,o=lt(e),a=lt(e),p,u=c.length,d=[];d.length=s.length/3;let m=[];for(m.length=s.length/3,p=0;p<d.length;++p)d[p]=-1,m[p]=-1;for(p=0;p<u;p+=2){let l=c[p],h=c[p+1],y=r.fromArray(s,l*3,wt),v=r.fromArray(s,h*3,Gt),b;Math.abs(y.y)<N.EPSILON6&&(y.y<0?y.y=-N.EPSILON6:y.y=N.EPSILON6),Math.abs(v.y)<N.EPSILON6&&(v.y<0?v.y=-N.EPSILON6:v.y=N.EPSILON6);let S=o.attributes,x=o.indices,w=m,A=a.attributes,E=a.indices,P=d,O=Lt.lineSegmentPlane(y,v,ue,Ct);if(f(O)){let L=r.multiplyByScalar(r.UNIT_Y,5*N.EPSILON9,Ge);y.y<0&&(r.negate(L,L),S=a.attributes,x=a.indices,w=d,A=o.attributes,E=o.indices,P=m);let g=r.add(O,L,Ce);b=Q(S,x,w,c,p,y),ut(l,h,y,s,b,S,i),b=Q(S,x,w,c,-1,g),ut(l,h,g,s,b,S,i),r.negate(L,L),r.add(O,L,g),b=Q(A,E,P,c,-1,g),ut(l,h,g,s,b,A,i),b=Q(A,E,P,c,p+1,v),ut(l,h,v,s,b,A,i)}else{let L,g,T;y.y<0?(L=a.attributes,g=a.indices,T=d):(L=o.attributes,g=o.indices,T=m),b=Q(L,g,T,c,p,y),ut(l,h,y,s,b,L,i),b=Q(L,g,T,c,p+1,v),ut(l,h,v,s,b,L,i)}}kt(t,a,o)}var oe=new R,Be=new R,le=new r,fe=new r,Bt=new r,ke=new r,Fe=new r,Me=new r,re=new dt;function ce(t){let e=t.attributes,n=e.position.values,s=e.prevPosition.values,i=e.nextPosition.values,c=n.length;for(let o=0;o<c;o+=3){let a=r.unpack(n,o,le);if(a.x>0)continue;let p=r.unpack(s,o,fe);(a.y<0&&p.y>0||a.y>0&&p.y<0)&&(o-3>0?(s[o]=n[o-3],s[o+1]=n[o-2],s[o+2]=n[o-1]):r.pack(a,s,o));let u=r.unpack(i,o,Bt);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(o+3<c?(i[o]=n[o+3],i[o+1]=n[o+4],i[o+2]=n[o+5]):r.pack(a,i,o))}}var _e=5*N.EPSILON9,At=N.EPSILON6;function Ue(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=n.prevPosition.values,c=n.nextPosition.values,o=n.expandAndWidth.values,a=f(n.st)?n.st.values:void 0,p=f(n.color)?n.color.values:void 0,u=lt(e),d=lt(e),m,l,h,y=!1,v=s.length/3;for(m=0;m<v;m+=4){let b=m,S=m+2,x=r.fromArray(s,b*3,le),w=r.fromArray(s,S*3,fe);if(Math.abs(x.y)<At)for(x.y=At*(w.y<0?-1:1),s[m*3+1]=x.y,s[(m+1)*3+1]=x.y,l=b*3;l<b*3+4*3;l+=3)i[l]=s[m*3],i[l+1]=s[m*3+1],i[l+2]=s[m*3+2];if(Math.abs(w.y)<At)for(w.y=At*(x.y<0?-1:1),s[(m+2)*3+1]=w.y,s[(m+3)*3+1]=w.y,l=b*3;l<b*3+4*3;l+=3)c[l]=s[(m+2)*3],c[l+1]=s[(m+2)*3+1],c[l+2]=s[(m+2)*3+2];let A=u.attributes,E=u.indices,P=d.attributes,O=d.indices,L=Lt.lineSegmentPlane(x,w,ue,ke);if(f(L)){y=!0;let g=r.multiplyByScalar(r.UNIT_Y,_e,Fe);x.y<0&&(r.negate(g,g),A=d.attributes,E=d.indices,P=u.attributes,O=u.indices);let T=r.add(L,g,Me);A.position.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.position.values.push(T.x,T.y,T.z),A.position.values.push(T.x,T.y,T.z),A.prevPosition.values.push(i[b*3],i[b*3+1],i[b*3+2]),A.prevPosition.values.push(i[b*3+3],i[b*3+4],i[b*3+5]),A.prevPosition.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),r.negate(g,g),r.add(L,g,T),P.position.values.push(T.x,T.y,T.z),P.position.values.push(T.x,T.y,T.z),P.position.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.nextPosition.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.nextPosition.values.push(c[S*3],c[S*3+1],c[S*3+2]),P.nextPosition.values.push(c[S*3+3],c[S*3+4],c[S*3+5]);let C=R.fromArray(o,b*2,oe),z=Math.abs(C.y);A.expandAndWidth.values.push(-1,z,1,z),A.expandAndWidth.values.push(-1,-z,1,-z),P.expandAndWidth.values.push(-1,z,1,z),P.expandAndWidth.values.push(-1,-z,1,-z);let q=r.magnitudeSquared(r.subtract(L,x,Bt));if(q/=r.magnitudeSquared(r.subtract(w,x,Bt)),f(p)){let V=dt.fromArray(p,b*4,re),G=dt.fromArray(p,S*4,re),M=N.lerp(V.x,G.x,q),J=N.lerp(V.y,G.y,q),Y=N.lerp(V.z,G.z,q),_=N.lerp(V.w,G.w,q);for(l=b*4;l<b*4+2*4;++l)A.color.values.push(p[l]);for(A.color.values.push(M,J,Y,_),A.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),l=S*4;l<S*4+2*4;++l)P.color.values.push(p[l])}if(f(a)){let V=R.fromArray(a,b*2,oe),G=R.fromArray(a,(m+3)*2,Be),M=N.lerp(V.x,G.x,q);for(l=b*2;l<b*2+2*2;++l)A.st.values.push(a[l]);for(A.st.values.push(M,V.y),A.st.values.push(M,G.y),P.st.values.push(M,V.y),P.st.values.push(M,G.y),l=S*2;l<S*2+2*2;++l)P.st.values.push(a[l])}h=A.position.values.length/3-4,E.push(h,h+2,h+1),E.push(h+1,h+2,h+3),h=P.position.values.length/3-4,O.push(h,h+2,h+1),O.push(h+1,h+2,h+3)}else{let g,T;for(x.y<0?(g=d.attributes,T=d.indices):(g=u.attributes,T=u.indices),g.position.values.push(x.x,x.y,x.z),g.position.values.push(x.x,x.y,x.z),g.position.values.push(w.x,w.y,w.z),g.position.values.push(w.x,w.y,w.z),l=m*3;l<m*3+4*3;++l)g.prevPosition.values.push(i[l]),g.nextPosition.values.push(c[l]);for(l=m*2;l<m*2+4*2;++l)g.expandAndWidth.values.push(o[l]),f(a)&&g.st.values.push(a[l]);if(f(p))for(l=m*4;l<m*4+4*4;++l)g.color.values.push(p[l]);h=g.position.values.length/3-4,T.push(h,h+2,h+1),T.push(h+1,h+2,h+3)}}y&&(ce(d),ce(u)),kt(t,d,u)}F.splitLongitude=function(t){if(!f(t))throw new I("instance is required.");let e=t.geometry,n=e.boundingSphere;if(f(n)&&(n.center.x-n.radius>0||rt.intersectPlane(n,Et.ORIGIN_ZX_PLANE)!==Ut.INTERSECTING))return t;if(e.geometryType!==mt.NONE)switch(e.geometryType){case mt.POLYLINES:Ue(t);break;case mt.TRIANGLES:ie(t);break;case mt.LINES:se(t);break}else Le(e),e.primitiveType===D.TRIANGLES?ie(t):e.primitiveType===D.LINES&&se(t);return t};var gn=F;export{gn as a}; diff --git a/cesium/Workers/chunk-QBLZNHRV.js b/cesium/Workers/chunk-QBLZNHRV.js deleted file mode 100644 index 576331b..0000000 --- a/cesium/Workers/chunk-QBLZNHRV.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 - * - * Copyright 2011-2022 Cesium Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Columbus View (Pat. Pend.) - * - * Portions licensed separately. - * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. - */ - -import{a as tt}from"./chunk-Y5ISG54S.js";import{a as At}from"./chunk-CRFMECNE.js";import{a as yt}from"./chunk-7JCIFY66.js";import{a as G}from"./chunk-WLRVP2UA.js";import{a as z}from"./chunk-DUVNED7U.js";import{a as at}from"./chunk-RQXB4B4V.js";import{a as ht}from"./chunk-MPVEZNKB.js";import{b as mt,c as st,d as F}from"./chunk-FATK2EQ2.js";import{a as dt,d as rt}from"./chunk-3FEM743H.js";import{f as it,h as bt}from"./chunk-CMXCDAKR.js";import{a as S}from"./chunk-77ESX6BV.js";import{a,b as _t,c as Q,d as v,e as R}from"./chunk-LJCGAQ64.js";import{a as I}from"./chunk-JFG572S7.js";import{a as T}from"./chunk-42NIXFVW.js";import{a as nt,b as H}from"./chunk-5YVCOCPP.js";import{e as K}from"./chunk-U73D6PDD.js";var et=new a,pt=new a,xt=new a,wt=new a,w=new Q,Mt=new R,Vt=new R,gt=new it,Tt=new a,Nt=new a,Et=new a,lt=new _t,Pt=new a,St=new Q,Ft=new Q;function Ot(o,e,t){let n=e.vertexFormat,s=e.center,i=e.semiMajorAxis,r=e.semiMinorAxis,f=e.ellipsoid,h=e.stRotation,E=t?o.length/3*2:o.length/3,g=e.shadowVolume,c=n.st?new Float32Array(E*2):void 0,l=n.normal?new Float32Array(E*3):void 0,A=n.tangent?new Float32Array(E*3):void 0,x=n.bitangent?new Float32Array(E*3):void 0,O=g?new Float32Array(E*3):void 0,B=0,b=Tt,M=Nt,d=Et,_=new dt(f),L=_.project(f.cartesianToCartographic(s,lt),Pt),J=f.scaleToGeodeticSurface(s,et);f.geodeticSurfaceNormal(J,J);let Z=Mt,W=Vt;if(h!==0){let m=it.fromAxisAngle(J,h,gt);Z=R.fromQuaternion(m,Z),m=it.fromAxisAngle(J,-h,gt),W=R.fromQuaternion(m,W)}else Z=R.clone(R.IDENTITY,Z),W=R.clone(R.IDENTITY,W);let k=Q.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,St),q=Q.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ft),j=o.length,y=t?j:0,p=y/3*2;for(let m=0;m<j;m+=3){let u=m+1,N=m+2,D=a.fromArray(o,m,et);if(n.st){let P=R.multiplyByVector(Z,D,pt),C=_.project(f.cartesianToCartographic(P,lt),xt);a.subtract(C,L,C),w.x=(C.x+i)/(2*i),w.y=(C.y+r)/(2*r),k.x=Math.min(w.x,k.x),k.y=Math.min(w.y,k.y),q.x=Math.max(w.x,q.x),q.y=Math.max(w.y,q.y),t&&(c[B+p]=w.x,c[B+1+p]=w.y),c[B++]=w.x,c[B++]=w.y}(n.normal||n.tangent||n.bitangent||g)&&(b=f.geodeticSurfaceNormal(D,b),g&&(O[m+y]=-b.x,O[u+y]=-b.y,O[N+y]=-b.z),(n.normal||n.tangent||n.bitangent)&&((n.tangent||n.bitangent)&&(M=a.normalize(a.cross(a.UNIT_Z,b,M),M),R.multiplyByVector(W,M,M)),n.normal&&(l[m]=b.x,l[u]=b.y,l[N]=b.z,t&&(l[m+y]=-b.x,l[u+y]=-b.y,l[N+y]=-b.z)),n.tangent&&(A[m]=M.x,A[u]=M.y,A[N]=M.z,t&&(A[m+y]=-M.x,A[u+y]=-M.y,A[N+y]=-M.z)),n.bitangent&&(d=a.normalize(a.cross(b,M,d),d),x[m]=d.x,x[u]=d.y,x[N]=d.z,t&&(x[m+y]=d.x,x[u+y]=d.y,x[N+y]=d.z))))}if(n.st){j=c.length;for(let m=0;m<j;m+=2)c[m]=(c[m]-k.x)/(q.x-k.x),c[m+1]=(c[m+1]-k.y)/(q.y-k.y)}let V=new ht;if(n.position){let m=tt.raisePositionsToHeight(o,e,t);V.position=new F({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:m})}if(n.st&&(V.st=new F({componentDatatype:S.FLOAT,componentsPerAttribute:2,values:c})),n.normal&&(V.normal=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:l})),n.tangent&&(V.tangent=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:A})),n.bitangent&&(V.bitangent=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:x})),g&&(V.extrudeDirection=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:O})),t&&K(e.offsetAttribute)){let m=new Uint8Array(E);if(e.offsetAttribute===G.TOP)m=m.fill(1,0,E/2);else{let u=e.offsetAttribute===G.NONE?0:1;m=m.fill(u)}V.applyOffset=new F({componentDatatype:S.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return V}function jt(o){let e=new Array(12*(o*(o+1))-6),t=0,n,s,i,r,f;for(n=0,i=1,r=0;r<3;r++)e[t++]=i++,e[t++]=n,e[t++]=i;for(r=2;r<o+1;++r){for(i=r*(r+1)-1,n=(r-1)*r-1,e[t++]=i++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;e[t++]=i++,e[t++]=n,e[t++]=i}for(s=o*2,++i,++n,r=0;r<s-1;++r)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;for(e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n++,e[t++]=n,++n,r=o-1;r>1;--r){for(e[t++]=n++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;e[t++]=n++,e[t++]=n++,e[t++]=i++}for(r=0;r<3;r++)e[t++]=n++,e[t++]=n,e[t++]=i;return e}var X=new a;function Dt(o){let e=o.center;X=a.multiplyByScalar(o.ellipsoid.geodeticSurfaceNormal(e,X),o.height,X),X=a.add(e,X,X);let t=new rt(X,o.semiMajorAxis),n=tt.computeEllipsePositions(o,!0,!1),s=n.positions,i=n.numPts,r=Ot(s,o,!1),f=jt(i);return f=at.createTypedArray(s.length/3,f),{boundingSphere:t,attributes:r,indices:f}}function vt(o,e){let t=e.vertexFormat,n=e.center,s=e.semiMajorAxis,i=e.semiMinorAxis,r=e.ellipsoid,f=e.height,h=e.extrudedHeight,E=e.stRotation,g=o.length/3*2,c=new Float64Array(g*3),l=t.st?new Float32Array(g*2):void 0,A=t.normal?new Float32Array(g*3):void 0,x=t.tangent?new Float32Array(g*3):void 0,O=t.bitangent?new Float32Array(g*3):void 0,B=e.shadowVolume,b=B?new Float32Array(g*3):void 0,M=0,d=Tt,_=Nt,L=Et,J=new dt(r),Z=J.project(r.cartesianToCartographic(n,lt),Pt),W=r.scaleToGeodeticSurface(n,et);r.geodeticSurfaceNormal(W,W);let k=it.fromAxisAngle(W,E,gt),q=R.fromQuaternion(k,Mt),j=Q.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,St),y=Q.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ft),p=o.length,V=p/3*2;for(let u=0;u<p;u+=3){let N=u+1,D=u+2,P=a.fromArray(o,u,et),C;if(t.st){let ot=R.multiplyByVector(q,P,pt),$=J.project(r.cartesianToCartographic(ot,lt),xt);a.subtract($,Z,$),w.x=($.x+s)/(2*s),w.y=($.y+i)/(2*i),j.x=Math.min(w.x,j.x),j.y=Math.min(w.y,j.y),y.x=Math.max(w.x,y.x),y.y=Math.max(w.y,y.y),l[M+V]=w.x,l[M+1+V]=w.y,l[M++]=w.x,l[M++]=w.y}P=r.scaleToGeodeticSurface(P,P),C=a.clone(P,pt),d=r.geodeticSurfaceNormal(P,d),B&&(b[u+p]=-d.x,b[N+p]=-d.y,b[D+p]=-d.z);let ct=a.multiplyByScalar(d,f,wt);if(P=a.add(P,ct,P),ct=a.multiplyByScalar(d,h,ct),C=a.add(C,ct,C),t.position&&(c[u+p]=C.x,c[N+p]=C.y,c[D+p]=C.z,c[u]=P.x,c[N]=P.y,c[D]=P.z),t.normal||t.tangent||t.bitangent){L=a.clone(d,L);let ot=a.fromArray(o,(u+3)%p,wt);a.subtract(ot,P,ot);let $=a.subtract(C,P,xt);d=a.normalize(a.cross($,ot,d),d),t.normal&&(A[u]=d.x,A[N]=d.y,A[D]=d.z,A[u+p]=d.x,A[N+p]=d.y,A[D+p]=d.z),t.tangent&&(_=a.normalize(a.cross(L,d,_),_),x[u]=_.x,x[N]=_.y,x[D]=_.z,x[u+p]=_.x,x[u+1+p]=_.y,x[u+2+p]=_.z),t.bitangent&&(O[u]=L.x,O[N]=L.y,O[D]=L.z,O[u+p]=L.x,O[N+p]=L.y,O[D+p]=L.z)}}if(t.st){p=l.length;for(let u=0;u<p;u+=2)l[u]=(l[u]-j.x)/(y.x-j.x),l[u+1]=(l[u+1]-j.y)/(y.y-j.y)}let m=new ht;if(t.position&&(m.position=new F({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:c})),t.st&&(m.st=new F({componentDatatype:S.FLOAT,componentsPerAttribute:2,values:l})),t.normal&&(m.normal=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(m.tangent=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:x})),t.bitangent&&(m.bitangent=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:O})),B&&(m.extrudeDirection=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:b})),K(e.offsetAttribute)){let u=new Uint8Array(g);if(e.offsetAttribute===G.TOP)u=u.fill(1,0,g/2);else{let N=e.offsetAttribute===G.NONE?0:1;u=u.fill(N)}m.applyOffset=new F({componentDatatype:S.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return m}function zt(o){let e=o.length/3,t=at.createTypedArray(e,e*6),n=0;for(let s=0;s<e;s++){let i=s,r=s+e,f=(i+1)%e,h=f+e;t[n++]=i,t[n++]=r,t[n++]=f,t[n++]=f,t[n++]=r,t[n++]=h}return t}var ut=new rt,ft=new rt;function Bt(o){let e=o.center,t=o.ellipsoid,n=o.semiMajorAxis,s=a.multiplyByScalar(t.geodeticSurfaceNormal(e,et),o.height,et);ut.center=a.add(e,s,ut.center),ut.radius=n,s=a.multiplyByScalar(t.geodeticSurfaceNormal(e,s),o.extrudedHeight,s),ft.center=a.add(e,s,ft.center),ft.radius=n;let i=tt.computeEllipsePositions(o,!0,!0),r=i.positions,f=i.numPts,h=i.outerPositions,E=rt.union(ut,ft),g=Ot(r,o,!0),c=jt(f),l=c.length;c.length=l*2;let A=r.length/3;for(let _=0;_<l;_+=3)c[_+l]=c[_+2]+A,c[_+1+l]=c[_+1]+A,c[_+2+l]=c[_]+A;let x=at.createTypedArray(A*2/3,c),O=new st({attributes:g,indices:x,primitiveType:mt.TRIANGLES}),B=vt(h,o);c=zt(h);let b=at.createTypedArray(h.length*2/3,c),M=new st({attributes:B,indices:b,primitiveType:mt.TRIANGLES}),d=yt.combineInstances([new At({geometry:O}),new At({geometry:M})]);return{boundingSphere:E,attributes:d[0].attributes,indices:d[0].indices}}function Ct(o,e,t,n,s,i,r){let h=tt.computeEllipsePositions({center:o,semiMajorAxis:e,semiMinorAxis:t,rotation:n,granularity:s},!1,!0).outerPositions,E=h.length/3,g=new Array(E);for(let l=0;l<E;++l)g[l]=a.fromArray(h,l*3);let c=bt.fromCartesianArray(g,i,r);return c.width>I.PI&&(c.north=c.north>0?I.PI_OVER_TWO-I.EPSILON7:c.north,c.south=c.south<0?I.EPSILON7-I.PI_OVER_TWO:c.south,c.east=I.PI,c.west=-I.PI),c}function U(o){o=T(o,T.EMPTY_OBJECT);let e=o.center,t=T(o.ellipsoid,v.WGS84),n=o.semiMajorAxis,s=o.semiMinorAxis,i=T(o.granularity,I.RADIANS_PER_DEGREE),r=T(o.vertexFormat,z.DEFAULT);if(H.defined("options.center",e),H.typeOf.number("options.semiMajorAxis",n),H.typeOf.number("options.semiMinorAxis",s),n<s)throw new nt("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(i<=0)throw new nt("granularity must be greater than zero.");let f=T(o.height,0),h=T(o.extrudedHeight,f);this._center=a.clone(e),this._semiMajorAxis=n,this._semiMinorAxis=s,this._ellipsoid=v.clone(t),this._rotation=T(o.rotation,0),this._stRotation=T(o.stRotation,0),this._height=Math.max(h,f),this._granularity=i,this._vertexFormat=z.clone(r),this._extrudedHeight=Math.min(h,f),this._shadowVolume=T(o.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=o.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}U.packedLength=a.packedLength+v.packedLength+z.packedLength+9;U.pack=function(o,e,t){return H.defined("value",o),H.defined("array",e),t=T(t,0),a.pack(o._center,e,t),t+=a.packedLength,v.pack(o._ellipsoid,e,t),t+=v.packedLength,z.pack(o._vertexFormat,e,t),t+=z.packedLength,e[t++]=o._semiMajorAxis,e[t++]=o._semiMinorAxis,e[t++]=o._rotation,e[t++]=o._stRotation,e[t++]=o._height,e[t++]=o._granularity,e[t++]=o._extrudedHeight,e[t++]=o._shadowVolume?1:0,e[t]=T(o._offsetAttribute,-1),e};var Rt=new a,It=new v,Lt=new z,Y={center:Rt,ellipsoid:It,vertexFormat:Lt,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};U.unpack=function(o,e,t){H.defined("array",o),e=T(e,0);let n=a.unpack(o,e,Rt);e+=a.packedLength;let s=v.unpack(o,e,It);e+=v.packedLength;let i=z.unpack(o,e,Lt);e+=z.packedLength;let r=o[e++],f=o[e++],h=o[e++],E=o[e++],g=o[e++],c=o[e++],l=o[e++],A=o[e++]===1,x=o[e];return K(t)?(t._center=a.clone(n,t._center),t._ellipsoid=v.clone(s,t._ellipsoid),t._vertexFormat=z.clone(i,t._vertexFormat),t._semiMajorAxis=r,t._semiMinorAxis=f,t._rotation=h,t._stRotation=E,t._height=g,t._granularity=c,t._extrudedHeight=l,t._shadowVolume=A,t._offsetAttribute=x===-1?void 0:x,t):(Y.height=g,Y.extrudedHeight=l,Y.granularity=c,Y.stRotation=E,Y.rotation=h,Y.semiMajorAxis=r,Y.semiMinorAxis=f,Y.shadowVolume=A,Y.offsetAttribute=x===-1?void 0:x,new U(Y))};U.computeRectangle=function(o,e){o=T(o,T.EMPTY_OBJECT);let t=o.center,n=T(o.ellipsoid,v.WGS84),s=o.semiMajorAxis,i=o.semiMinorAxis,r=T(o.granularity,I.RADIANS_PER_DEGREE),f=T(o.rotation,0);if(H.defined("options.center",t),H.typeOf.number("options.semiMajorAxis",s),H.typeOf.number("options.semiMinorAxis",i),s<i)throw new nt("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new nt("granularity must be greater than zero.");return Ct(t,s,i,f,r,n,e)};U.createGeometry=function(o){if(o._semiMajorAxis<=0||o._semiMinorAxis<=0)return;let e=o._height,t=o._extrudedHeight,n=!I.equalsEpsilon(e,t,0,I.EPSILON2);o._center=o._ellipsoid.scaleToGeodeticSurface(o._center,o._center);let s={center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,ellipsoid:o._ellipsoid,rotation:o._rotation,height:e,granularity:o._granularity,vertexFormat:o._vertexFormat,stRotation:o._stRotation},i;if(n)s.extrudedHeight=t,s.shadowVolume=o._shadowVolume,s.offsetAttribute=o._offsetAttribute,i=Bt(s);else if(i=Dt(s),K(o._offsetAttribute)){let r=i.attributes.position.values.length,f=o._offsetAttribute===G.NONE?0:1,h=new Uint8Array(r/3).fill(f);i.attributes.applyOffset=new F({componentDatatype:S.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new st({attributes:i.attributes,indices:i.indices,primitiveType:mt.TRIANGLES,boundingSphere:i.boundingSphere,offsetAttribute:o._offsetAttribute})};U.createShadowVolume=function(o,e,t){let n=o._granularity,s=o._ellipsoid,i=e(n,s),r=t(n,s);return new U({center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,ellipsoid:s,rotation:o._rotation,stRotation:o._stRotation,granularity:n,extrudedHeight:i,height:r,vertexFormat:z.POSITION_ONLY,shadowVolume:!0})};function kt(o){let e=-o._stRotation;if(e===0)return[0,0,0,1,1,0];let n=tt.computeEllipsePositions({center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,rotation:o._rotation,granularity:o._granularity},!1,!0).outerPositions,s=n.length/3,i=new Array(s);for(let h=0;h<s;++h)i[h]=a.fromArray(n,h*3);let r=o._ellipsoid,f=o.rectangle;return st._textureCoordinateRotationPoints(i,e,r,f)}Object.defineProperties(U.prototype,{rectangle:{get:function(){return K(this._rectangle)||(this._rectangle=Ct(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return K(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=kt(this)),this._textureCoordinateRotationPoints}}});var de=U;export{de as a}; diff --git a/cesium/Workers/chunk-JFG572S7.js b/cesium/Workers/chunk-R6KGAEF6.js similarity index 97% rename from cesium/Workers/chunk-JFG572S7.js rename to cesium/Workers/chunk-R6KGAEF6.js index d5d7d2a..0e144e0 100644 --- a/cesium/Workers/chunk-JFG572S7.js +++ b/cesium/Workers/chunk-R6KGAEF6.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as f}from"./chunk-42NIXFVW.js";import{a as n,b as c}from"./chunk-5YVCOCPP.js";import{c as I,d as _,e as o}from"./chunk-U73D6PDD.js";var P=I((O,d)=>{var u=function(t){t==null&&(t=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,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};u.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti<this.N;this.mti++){var t=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((t&4294901760)>>>16)*1812433253<<16)+(t&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};u.prototype.init_by_array=function(t,i){var e,s,h;for(this.init_seed(19650218),e=1,s=0,h=this.N>i?this.N:i;h;h--){var a=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((a&4294901760)>>>16)*1664525<<16)+(a&65535)*1664525)+t[s]+s,this.mt[e]>>>=0,e++,s++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1),s>=i&&(s=0)}for(h=this.N-1;h;h--){var a=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((a&4294901760)>>>16)*1566083941<<16)+(a&65535)*1566083941)-e,this.mt[e]>>>=0,e++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1)}this.mt[0]=2147483648};u.prototype.random_int=function(){var t,i=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var e;for(this.mti==this.N+1&&this.init_seed(5489),e=0;e<this.N-this.M;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+this.M]^t>>>1^i[t&1];for(;e<this.N-1;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+(this.M-this.N)]^t>>>1^i[t&1];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^i[t&1],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0};u.prototype.random_int31=function(){return this.random_int()>>>1};u.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};u.prototype.random=function(){return this.random_int()*(1/4294967296)};u.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};u.prototype.random_long=function(){var t=this.random_int()>>>5,i=this.random_int()>>>6;return(t*67108864+i)*(1/9007199254740992)};d.exports=u});var m=_(P(),1);var r={};r.EPSILON1=.1;r.EPSILON2=.01;r.EPSILON3=.001;r.EPSILON4=1e-4;r.EPSILON5=1e-5;r.EPSILON6=1e-6;r.EPSILON7=1e-7;r.EPSILON8=1e-8;r.EPSILON9=1e-9;r.EPSILON10=1e-10;r.EPSILON11=1e-11;r.EPSILON12=1e-12;r.EPSILON13=1e-13;r.EPSILON14=1e-14;r.EPSILON15=1e-15;r.EPSILON16=1e-16;r.EPSILON17=1e-17;r.EPSILON18=1e-18;r.EPSILON19=1e-19;r.EPSILON20=1e-20;r.EPSILON21=1e-21;r.GRAVITATIONALPARAMETER=3986004418e5;r.SOLAR_RADIUS=6955e5;r.LUNAR_RADIUS=1737400;r.SIXTY_FOUR_KILOBYTES=64*1024;r.FOUR_GIGABYTES=4*1024*1024*1024;r.sign=f(Math.sign,function(i){return i=+i,i===0||i!==i?i:i>0?1:-1});r.signNotZero=function(t){return t<0?-1:1};r.toSNorm=function(t,i){return i=f(i,255),Math.round((r.clamp(t,-1,1)*.5+.5)*i)};r.fromSNorm=function(t,i){return i=f(i,255),r.clamp(t,0,i)/i*2-1};r.normalize=function(t,i,e){return e=Math.max(e-i,0),e===0?0:r.clamp((t-i)/e,0,1)};r.sinh=f(Math.sinh,function(i){return(Math.exp(i)-Math.exp(-i))/2});r.cosh=f(Math.cosh,function(i){return(Math.exp(i)+Math.exp(-i))/2});r.lerp=function(t,i,e){return(1-e)*t+e*i};r.PI=Math.PI;r.ONE_OVER_PI=1/Math.PI;r.PI_OVER_TWO=Math.PI/2;r.PI_OVER_THREE=Math.PI/3;r.PI_OVER_FOUR=Math.PI/4;r.PI_OVER_SIX=Math.PI/6;r.THREE_PI_OVER_TWO=3*Math.PI/2;r.TWO_PI=2*Math.PI;r.ONE_OVER_TWO_PI=1/(2*Math.PI);r.RADIANS_PER_DEGREE=Math.PI/180;r.DEGREES_PER_RADIAN=180/Math.PI;r.RADIANS_PER_ARCSECOND=r.RADIANS_PER_DEGREE/3600;r.toRadians=function(t){if(!o(t))throw new n("degrees is required.");return t*r.RADIANS_PER_DEGREE};r.toDegrees=function(t){if(!o(t))throw new n("radians is required.");return t*r.DEGREES_PER_RADIAN};r.convertLongitudeRange=function(t){if(!o(t))throw new n("angle is required.");let i=r.TWO_PI,e=t-Math.floor(t/i)*i;return e<-Math.PI?e+i:e>=Math.PI?e-i:e};r.clampToLatitudeRange=function(t){if(!o(t))throw new n("angle is required.");return r.clamp(t,-1*r.PI_OVER_TWO,r.PI_OVER_TWO)};r.negativePiToPi=function(t){if(!o(t))throw new n("angle is required.");return t>=-r.PI&&t<=r.PI?t:r.zeroToTwoPi(t+r.PI)-r.PI};r.zeroToTwoPi=function(t){if(!o(t))throw new n("angle is required.");if(t>=0&&t<=r.TWO_PI)return t;let i=r.mod(t,r.TWO_PI);return Math.abs(i)<r.EPSILON14&&Math.abs(t)>r.EPSILON14?r.TWO_PI:i};r.mod=function(t,i){if(!o(t))throw new n("m is required.");if(!o(i))throw new n("n is required.");if(i===0)throw new n("divisor cannot be 0.");return r.sign(t)===r.sign(i)&&Math.abs(t)<Math.abs(i)?t:(t%i+i)%i};r.equalsEpsilon=function(t,i,e,s){if(!o(t))throw new n("left is required.");if(!o(i))throw new n("right is required.");e=f(e,0),s=f(s,e);let h=Math.abs(t-i);return h<=s||h<=e*Math.max(Math.abs(t),Math.abs(i))};r.lessThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<-e};r.lessThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<e};r.greaterThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>e};r.greaterThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>-e};var w=[1];r.factorial=function(t){if(typeof t!="number"||t<0)throw new n("A number greater than or equal to 0 is required.");let i=w.length;if(t>=i){let e=w[i-1];for(let s=i;s<=t;s++){let h=e*s;w.push(h),e=h}}return w[t]};r.incrementWrap=function(t,i,e){if(e=f(e,0),!o(t))throw new n("n is required.");if(i<=e)throw new n("maximumValue must be greater than minimumValue.");return++t,t>i&&(t=e),t};r.isPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t!==0&&(t&t-1)===0};r.nextPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>2147483648)throw new n("A number between 0 and 2^31 is required.");return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t,t};r.previousPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t|=t>>32,t=(t>>>0)-(t>>>1),t};r.clamp=function(t,i,e){return c.typeOf.number("value",t),c.typeOf.number("min",i),c.typeOf.number("max",e),t<i?i:t>e?e:t};var E=new m.default;r.setRandomNumberSeed=function(t){if(!o(t))throw new n("seed is required.");E=new m.default(t)};r.nextRandomNumber=function(){return E.random()};r.randomBetween=function(t,i){return r.nextRandomNumber()*(i-t)+t};r.acosClamped=function(t){if(!o(t))throw new n("value is required.");return Math.acos(r.clamp(t,-1,1))};r.asinClamped=function(t){if(!o(t))throw new n("value is required.");return Math.asin(r.clamp(t,-1,1))};r.chordLength=function(t,i){if(!o(t))throw new n("angle is required.");if(!o(i))throw new n("radius is required.");return 2*i*Math.sin(t*.5)};r.logBase=function(t,i){if(!o(t))throw new n("number is required.");if(!o(i))throw new n("base is required.");return Math.log(t)/Math.log(i)};r.cbrt=f(Math.cbrt,function(i){let e=Math.pow(Math.abs(i),.3333333333333333);return i<0?-e:e});r.log2=f(Math.log2,function(i){return Math.log(i)*Math.LOG2E});r.fog=function(t,i){let e=t*i;return 1-Math.exp(-(e*e))};r.fastApproximateAtan=function(t){return c.typeOf.number("x",t),t*(-.1784*Math.abs(t)-.0663*t*t+1.0301)};r.fastApproximateAtan2=function(t,i){c.typeOf.number("x",t),c.typeOf.number("y",i);let e,s=Math.abs(t);e=Math.abs(i);let h=Math.max(s,e);e=Math.min(s,e);let a=e/h;if(isNaN(a))throw new n("either x or y must be nonzero");return s=r.fastApproximateAtan(a),s=Math.abs(i)>Math.abs(t)?r.PI_OVER_TWO-s:s,s=t<0?r.PI-s:s,s=i<0?-s:s,s};var A=r;export{A as a}; +import{a as f}from"./chunk-IUA6FAOZ.js";import{a as n,b as c}from"./chunk-UH2WFNTA.js";import{c as I,d as _,e as o}from"./chunk-PEYJTJPE.js";var P=I((O,d)=>{var u=function(t){t==null&&(t=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,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};u.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti<this.N;this.mti++){var t=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((t&4294901760)>>>16)*1812433253<<16)+(t&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};u.prototype.init_by_array=function(t,i){var e,s,h;for(this.init_seed(19650218),e=1,s=0,h=this.N>i?this.N:i;h;h--){var a=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((a&4294901760)>>>16)*1664525<<16)+(a&65535)*1664525)+t[s]+s,this.mt[e]>>>=0,e++,s++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1),s>=i&&(s=0)}for(h=this.N-1;h;h--){var a=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((a&4294901760)>>>16)*1566083941<<16)+(a&65535)*1566083941)-e,this.mt[e]>>>=0,e++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1)}this.mt[0]=2147483648};u.prototype.random_int=function(){var t,i=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var e;for(this.mti==this.N+1&&this.init_seed(5489),e=0;e<this.N-this.M;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+this.M]^t>>>1^i[t&1];for(;e<this.N-1;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+(this.M-this.N)]^t>>>1^i[t&1];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^i[t&1],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0};u.prototype.random_int31=function(){return this.random_int()>>>1};u.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};u.prototype.random=function(){return this.random_int()*(1/4294967296)};u.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};u.prototype.random_long=function(){var t=this.random_int()>>>5,i=this.random_int()>>>6;return(t*67108864+i)*(1/9007199254740992)};d.exports=u});var m=_(P(),1);var r={};r.EPSILON1=.1;r.EPSILON2=.01;r.EPSILON3=.001;r.EPSILON4=1e-4;r.EPSILON5=1e-5;r.EPSILON6=1e-6;r.EPSILON7=1e-7;r.EPSILON8=1e-8;r.EPSILON9=1e-9;r.EPSILON10=1e-10;r.EPSILON11=1e-11;r.EPSILON12=1e-12;r.EPSILON13=1e-13;r.EPSILON14=1e-14;r.EPSILON15=1e-15;r.EPSILON16=1e-16;r.EPSILON17=1e-17;r.EPSILON18=1e-18;r.EPSILON19=1e-19;r.EPSILON20=1e-20;r.EPSILON21=1e-21;r.GRAVITATIONALPARAMETER=3986004418e5;r.SOLAR_RADIUS=6955e5;r.LUNAR_RADIUS=1737400;r.SIXTY_FOUR_KILOBYTES=64*1024;r.FOUR_GIGABYTES=4*1024*1024*1024;r.sign=f(Math.sign,function(i){return i=+i,i===0||i!==i?i:i>0?1:-1});r.signNotZero=function(t){return t<0?-1:1};r.toSNorm=function(t,i){return i=f(i,255),Math.round((r.clamp(t,-1,1)*.5+.5)*i)};r.fromSNorm=function(t,i){return i=f(i,255),r.clamp(t,0,i)/i*2-1};r.normalize=function(t,i,e){return e=Math.max(e-i,0),e===0?0:r.clamp((t-i)/e,0,1)};r.sinh=f(Math.sinh,function(i){return(Math.exp(i)-Math.exp(-i))/2});r.cosh=f(Math.cosh,function(i){return(Math.exp(i)+Math.exp(-i))/2});r.lerp=function(t,i,e){return(1-e)*t+e*i};r.PI=Math.PI;r.ONE_OVER_PI=1/Math.PI;r.PI_OVER_TWO=Math.PI/2;r.PI_OVER_THREE=Math.PI/3;r.PI_OVER_FOUR=Math.PI/4;r.PI_OVER_SIX=Math.PI/6;r.THREE_PI_OVER_TWO=3*Math.PI/2;r.TWO_PI=2*Math.PI;r.ONE_OVER_TWO_PI=1/(2*Math.PI);r.RADIANS_PER_DEGREE=Math.PI/180;r.DEGREES_PER_RADIAN=180/Math.PI;r.RADIANS_PER_ARCSECOND=r.RADIANS_PER_DEGREE/3600;r.toRadians=function(t){if(!o(t))throw new n("degrees is required.");return t*r.RADIANS_PER_DEGREE};r.toDegrees=function(t){if(!o(t))throw new n("radians is required.");return t*r.DEGREES_PER_RADIAN};r.convertLongitudeRange=function(t){if(!o(t))throw new n("angle is required.");let i=r.TWO_PI,e=t-Math.floor(t/i)*i;return e<-Math.PI?e+i:e>=Math.PI?e-i:e};r.clampToLatitudeRange=function(t){if(!o(t))throw new n("angle is required.");return r.clamp(t,-1*r.PI_OVER_TWO,r.PI_OVER_TWO)};r.negativePiToPi=function(t){if(!o(t))throw new n("angle is required.");return t>=-r.PI&&t<=r.PI?t:r.zeroToTwoPi(t+r.PI)-r.PI};r.zeroToTwoPi=function(t){if(!o(t))throw new n("angle is required.");if(t>=0&&t<=r.TWO_PI)return t;let i=r.mod(t,r.TWO_PI);return Math.abs(i)<r.EPSILON14&&Math.abs(t)>r.EPSILON14?r.TWO_PI:i};r.mod=function(t,i){if(!o(t))throw new n("m is required.");if(!o(i))throw new n("n is required.");if(i===0)throw new n("divisor cannot be 0.");return r.sign(t)===r.sign(i)&&Math.abs(t)<Math.abs(i)?t:(t%i+i)%i};r.equalsEpsilon=function(t,i,e,s){if(!o(t))throw new n("left is required.");if(!o(i))throw new n("right is required.");e=f(e,0),s=f(s,e);let h=Math.abs(t-i);return h<=s||h<=e*Math.max(Math.abs(t),Math.abs(i))};r.lessThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<-e};r.lessThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<e};r.greaterThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>e};r.greaterThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>-e};var w=[1];r.factorial=function(t){if(typeof t!="number"||t<0)throw new n("A number greater than or equal to 0 is required.");let i=w.length;if(t>=i){let e=w[i-1];for(let s=i;s<=t;s++){let h=e*s;w.push(h),e=h}}return w[t]};r.incrementWrap=function(t,i,e){if(e=f(e,0),!o(t))throw new n("n is required.");if(i<=e)throw new n("maximumValue must be greater than minimumValue.");return++t,t>i&&(t=e),t};r.isPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t!==0&&(t&t-1)===0};r.nextPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>2147483648)throw new n("A number between 0 and 2^31 is required.");return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t,t};r.previousPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t|=t>>32,t=(t>>>0)-(t>>>1),t};r.clamp=function(t,i,e){return c.typeOf.number("value",t),c.typeOf.number("min",i),c.typeOf.number("max",e),t<i?i:t>e?e:t};var E=new m.default;r.setRandomNumberSeed=function(t){if(!o(t))throw new n("seed is required.");E=new m.default(t)};r.nextRandomNumber=function(){return E.random()};r.randomBetween=function(t,i){return r.nextRandomNumber()*(i-t)+t};r.acosClamped=function(t){if(!o(t))throw new n("value is required.");return Math.acos(r.clamp(t,-1,1))};r.asinClamped=function(t){if(!o(t))throw new n("value is required.");return Math.asin(r.clamp(t,-1,1))};r.chordLength=function(t,i){if(!o(t))throw new n("angle is required.");if(!o(i))throw new n("radius is required.");return 2*i*Math.sin(t*.5)};r.logBase=function(t,i){if(!o(t))throw new n("number is required.");if(!o(i))throw new n("base is required.");return Math.log(t)/Math.log(i)};r.cbrt=f(Math.cbrt,function(i){let e=Math.pow(Math.abs(i),.3333333333333333);return i<0?-e:e});r.log2=f(Math.log2,function(i){return Math.log(i)*Math.LOG2E});r.fog=function(t,i){let e=t*i;return 1-Math.exp(-(e*e))};r.fastApproximateAtan=function(t){return c.typeOf.number("x",t),t*(-.1784*Math.abs(t)-.0663*t*t+1.0301)};r.fastApproximateAtan2=function(t,i){c.typeOf.number("x",t),c.typeOf.number("y",i);let e,s=Math.abs(t);e=Math.abs(i);let h=Math.max(s,e);e=Math.min(s,e);let a=e/h;if(isNaN(a))throw new n("either x or y must be nonzero");return s=r.fastApproximateAtan(a),s=Math.abs(i)>Math.abs(t)?r.PI_OVER_TWO-s:s,s=t<0?r.PI-s:s,s=i<0?-s:s,s};var A=r;export{A as a}; diff --git a/cesium/Workers/chunk-CIEXTRKV.js b/cesium/Workers/chunk-RXTBM4OI.js similarity index 85% rename from cesium/Workers/chunk-CIEXTRKV.js rename to cesium/Workers/chunk-RXTBM4OI.js index 4501ce6..9ffc2d1 100644 --- a/cesium/Workers/chunk-CIEXTRKV.js +++ b/cesium/Workers/chunk-RXTBM4OI.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as C}from"./chunk-JFG572S7.js";import{a as g}from"./chunk-42NIXFVW.js";import{b as d}from"./chunk-5YVCOCPP.js";import{e as i}from"./chunk-U73D6PDD.js";var u=C.EPSILON10;function x(e,r,h,l){if(d.defined("equalsEpsilon",r),!i(e))return;h=g(h,!1);let m=i(l),n=e.length;if(n<2)return e;let f,s=e[0],o,t,p=0,c=-1;for(f=1;f<n;++f)o=e[f],r(s,o,u)?(i(t)||(t=e.slice(0,f),p=f-1,c=0),m&&l.push(f)):(i(t)&&(t.push(o),p=f,m&&(c=l.length)),s=o);return h&&r(e[0],e[n-1],u)&&(m&&(i(t)?l.splice(c,0,p):l.push(n-1)),i(t)?t.length-=1:t=e.slice(0,-1)),i(t)?t:e}var a=x;export{a}; +import{a as C}from"./chunk-R6KGAEF6.js";import{a as g}from"./chunk-IUA6FAOZ.js";import{b as d}from"./chunk-UH2WFNTA.js";import{e as i}from"./chunk-PEYJTJPE.js";var u=C.EPSILON10;function x(e,r,h,l){if(d.defined("equalsEpsilon",r),!i(e))return;h=g(h,!1);let m=i(l),n=e.length;if(n<2)return e;let f,s=e[0],o,t,p=0,c=-1;for(f=1;f<n;++f)o=e[f],r(s,o,u)?(i(t)||(t=e.slice(0,f),p=f-1,c=0),m&&l.push(f)):(i(t)&&(t.push(o),p=f,m&&(c=l.length)),s=o);return h&&r(e[0],e[n-1],u)&&(m&&(i(t)?l.splice(c,0,p):l.push(n-1)),i(t)?t.length-=1:t=e.slice(0,-1)),i(t)?t:e}var a=x;export{a}; diff --git a/cesium/Workers/chunk-7RBDS4IP.js b/cesium/Workers/chunk-SB224QGV.js similarity index 86% rename from cesium/Workers/chunk-7RBDS4IP.js rename to cesium/Workers/chunk-SB224QGV.js index 2e6c099..acf39bd 100644 --- a/cesium/Workers/chunk-7RBDS4IP.js +++ b/cesium/Workers/chunk-SB224QGV.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as c,b as p,d as f}from"./chunk-LJCGAQ64.js";import{a as d}from"./chunk-JFG572S7.js";import{a as u}from"./chunk-42NIXFVW.js";import{a as s}from"./chunk-5YVCOCPP.js";import{e as a}from"./chunk-U73D6PDD.js";function e(t){this._ellipsoid=u(t,f.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(e.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});e.mercatorAngleToGeodeticLatitude=function(t){return d.PI_OVER_TWO-2*Math.atan(Math.exp(-t))};e.geodeticLatitudeToMercatorAngle=function(t){t>e.MaximumLatitude?t=e.MaximumLatitude:t<-e.MaximumLatitude&&(t=-e.MaximumLatitude);let i=Math.sin(t);return .5*Math.log((1+i)/(1-i))};e.MaximumLatitude=e.mercatorAngleToGeodeticLatitude(Math.PI);e.prototype.project=function(t,i){let o=this._semimajorAxis,r=t.longitude*o,n=e.geodeticLatitudeToMercatorAngle(t.latitude)*o,m=t.height;return a(i)?(i.x=r,i.y=n,i.z=m,i):new c(r,n,m)};e.prototype.unproject=function(t,i){if(!a(t))throw new s("cartesian is required");let o=this._oneOverSemimajorAxis,r=t.x*o,n=e.mercatorAngleToGeodeticLatitude(t.y*o),m=t.z;return a(i)?(i.longitude=r,i.latitude=n,i.height=m,i):new p(r,n,m)};var L=e;export{L as a}; +import{a as c,b as p,d as f}from"./chunk-POASMU2N.js";import{a as d}from"./chunk-R6KGAEF6.js";import{a as u}from"./chunk-IUA6FAOZ.js";import{a as s}from"./chunk-UH2WFNTA.js";import{e as a}from"./chunk-PEYJTJPE.js";function e(t){this._ellipsoid=u(t,f.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(e.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});e.mercatorAngleToGeodeticLatitude=function(t){return d.PI_OVER_TWO-2*Math.atan(Math.exp(-t))};e.geodeticLatitudeToMercatorAngle=function(t){t>e.MaximumLatitude?t=e.MaximumLatitude:t<-e.MaximumLatitude&&(t=-e.MaximumLatitude);let i=Math.sin(t);return .5*Math.log((1+i)/(1-i))};e.MaximumLatitude=e.mercatorAngleToGeodeticLatitude(Math.PI);e.prototype.project=function(t,i){let o=this._semimajorAxis,r=t.longitude*o,n=e.geodeticLatitudeToMercatorAngle(t.latitude)*o,m=t.height;return a(i)?(i.x=r,i.y=n,i.z=m,i):new c(r,n,m)};e.prototype.unproject=function(t,i){if(!a(t))throw new s("cartesian is required");let o=this._oneOverSemimajorAxis,r=t.x*o,n=e.mercatorAngleToGeodeticLatitude(t.y*o),m=t.z;return a(i)?(i.longitude=r,i.latitude=n,i.height=m,i):new p(r,n,m)};var L=e;export{L as a}; diff --git a/cesium/Workers/chunk-MPVEZNKB.js b/cesium/Workers/chunk-T6BE4RZK.js similarity index 92% rename from cesium/Workers/chunk-MPVEZNKB.js rename to cesium/Workers/chunk-T6BE4RZK.js index bbc8825..4de34ce 100644 --- a/cesium/Workers/chunk-MPVEZNKB.js +++ b/cesium/Workers/chunk-T6BE4RZK.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as e}from"./chunk-42NIXFVW.js";function a(t){t=e(t,e.EMPTY_OBJECT),this.position=t.position,this.normal=t.normal,this.st=t.st,this.bitangent=t.bitangent,this.tangent=t.tangent,this.color=t.color}var i=a;export{i as a}; +import{a as e}from"./chunk-IUA6FAOZ.js";function a(t){t=e(t,e.EMPTY_OBJECT),this.position=t.position,this.normal=t.normal,this.st=t.st,this.bitangent=t.bitangent,this.tangent=t.tangent,this.color=t.color}var i=a;export{i as a}; diff --git a/cesium/Workers/chunk-PT2EMSIG.js b/cesium/Workers/chunk-TAMCUKAR.js similarity index 97% rename from cesium/Workers/chunk-PT2EMSIG.js rename to cesium/Workers/chunk-TAMCUKAR.js index de3ae46..c1b6351 100644 --- a/cesium/Workers/chunk-PT2EMSIG.js +++ b/cesium/Workers/chunk-TAMCUKAR.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{c as Z}from"./chunk-3FEM743H.js";import{a as o,b as ft,e as b}from"./chunk-LJCGAQ64.js";import{a as R}from"./chunk-JFG572S7.js";import{a as H}from"./chunk-42NIXFVW.js";import{a as w,b as et}from"./chunk-5YVCOCPP.js";import{e as g}from"./chunk-U73D6PDD.js";var nt={};nt.computeDiscriminant=function(t,e,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");return e*e-4*t*r};function mt(t,e,r){let n=t+e;return R.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}nt.computeRealRoots=function(t,e,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");let n;if(t===0)return e===0?[]:[-r/e];if(e===0){if(r===0)return[0,0];let a=Math.abs(r),f=Math.abs(t);if(a<f&&a/f<R.EPSILON14)return[0,0];if(a>f&&f/a<R.EPSILON14)return[];if(n=-r/t,n<0)return[];let l=Math.sqrt(n);return[-l,l]}else if(r===0)return n=-e/t,n<0?[n,0]:[0,n];let i=e*e,c=4*t*r,s=mt(i,-c,R.EPSILON14);if(s<0)return[];let u=-.5*mt(e,R.sign(e)*Math.sqrt(s),R.EPSILON14);return e>0?[u/t,r/u]:[r/u,u/t]};var T=nt;var ot={};ot.computeDiscriminant=function(t,e,r,n){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");let i=t*t,c=e*e,s=r*r,u=n*n;return 18*t*e*r*n+c*s-27*i*u-4*(t*s*r+c*e*n)};function rt(t,e,r,n){let i=t,c=e/3,s=r/3,u=n,a=i*s,f=c*u,l=c*c,d=s*s,p=i*s-l,q=i*u-c*s,m=c*u-d,h=4*p*m-q*q,E,D;if(h<0){let X,k,G;l*f>=a*d?(X=i,k=p,G=-2*c*p+i*q):(X=u,k=m,G=-u*q+2*s*m);let at=-(G<0?-1:1)*Math.abs(X)*Math.sqrt(-h);D=-G+at;let $=D/2,j=$<0?-Math.pow(-$,1/3):Math.pow($,1/3),tt=D===at?-j:-k/j;return E=k<=0?j+tt:-G/(j*j+tt*tt+k),l*f>=a*d?[(E-c)/i]:[-u/(E+s)]}let W=p,V=-2*c*p+i*q,L=m,B=-u*q+2*s*m,I=Math.sqrt(h),C=Math.sqrt(3)/2,P=Math.abs(Math.atan2(i*I,-V)/3);E=2*Math.sqrt(-W);let y=Math.cos(P);D=E*y;let S=E*(-y/2-C*Math.sin(P)),M=D+S>2*c?D-c:S-c,N=i,x=M/N;P=Math.abs(Math.atan2(u*I,-B)/3),E=2*Math.sqrt(-L),y=Math.cos(P),D=E*y,S=E*(-y/2-C*Math.sin(P));let _=-u,A=D+S<2*s?D+s:S+s,v=_/A,yt=N*A,ut=-M*A-N*_,bt=M*_,U=(s*ut-c*bt)/(-c*ut+s*yt);return x<=U?x<=v?U<=v?[x,U,v]:[x,v,U]:[v,x,U]:x<=v?[U,x,v]:U<=v?[U,v,x]:[v,U,x]}ot.computeRealRoots=function(t,e,r,n){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");let i,c;if(t===0)return T.computeRealRoots(e,r,n);if(e===0){if(r===0){if(n===0)return[0,0,0];c=-n/t;let s=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3);return[s,s,s]}else if(n===0)return i=T.computeRealRoots(t,0,r),i.Length===0?[0]:[i[0],0,i[1]];return rt(t,0,r,n)}else{if(r===0)return n===0?(c=-e/t,c<0?[c,0,0]:[0,0,c]):rt(t,e,0,n);if(n===0)return i=T.computeRealRoots(t,e,r),i.length===0?[0]:i[1]<=0?[i[0],i[1],0]:i[0]>=0?[0,i[0],i[1]]:[i[0],0,i[1]]}return rt(t,e,r,n)};var F=ot;var it={};it.computeDiscriminant=function(t,e,r,n,i){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");if(typeof i!="number")throw new w("e is a required number.");let c=t*t,s=c*t,u=e*e,a=u*e,f=r*r,l=f*r,d=n*n,p=d*n,q=i*i,m=q*i;return u*f*d-4*a*p-4*t*l*d+18*t*e*r*p-27*c*d*d+256*s*m+i*(18*a*r*n-4*u*l+16*t*f*f-80*t*e*f*n-6*t*u*d+144*c*r*d)+q*(144*t*u*r-27*u*u-128*c*f-192*c*e*n)};function z(t,e,r,n){let i=t*t,c=e-3*i/8,s=r-e*t/2+i*t/8,u=n-r*t/4+e*i/16-3*i*i/256,a=F.computeRealRoots(1,2*c,c*c-4*u,-s*s);if(a.length>0){let f=-t/4,l=a[a.length-1];if(Math.abs(l)<R.EPSILON14){let d=T.computeRealRoots(1,c,u);if(d.length===2){let p=d[0],q=d[1],m;if(p>=0&&q>=0){let h=Math.sqrt(p),E=Math.sqrt(q);return[f-E,f-h,f+h,f+E]}else{if(p>=0&&q<0)return m=Math.sqrt(p),[f-m,f+m];if(p<0&&q>=0)return m=Math.sqrt(q),[f-m,f+m]}}return[]}else if(l>0){let d=Math.sqrt(l),p=(c+l-s/d)/2,q=(c+l+s/d)/2,m=T.computeRealRoots(1,d,p),h=T.computeRealRoots(1,-d,q);return m.length!==0?(m[0]+=f,m[1]+=f,h.length!==0?(h[0]+=f,h[1]+=f,m[1]<=h[0]?[m[0],m[1],h[0],h[1]]:h[1]<=m[0]?[h[0],h[1],m[0],m[1]]:m[0]>=h[0]&&m[1]<=h[1]?[h[0],m[0],m[1],h[1]]:h[0]>=m[0]&&h[1]<=m[1]?[m[0],h[0],h[1],m[1]]:m[0]>h[0]&&m[0]<h[1]?[h[0],m[0],h[1],m[1]]:[m[0],h[0],m[1],h[1]]):m):h.length!==0?(h[0]+=f,h[1]+=f,h):[]}}return[]}function Y(t,e,r,n){let i=r*r,c=e*e,s=t*t,u=-2*e,a=r*t+c-4*n,f=s*n-r*e*t+i,l=F.computeRealRoots(1,u,a,f);if(l.length>0){let d=l[0],p=e-d,q=p*p,m=t/2,h=p/2,E=q-4*n,D=q+4*Math.abs(n),W=s-4*d,V=s+4*Math.abs(d),L,B;if(d<0||E*V<W*D){let N=Math.sqrt(W);L=N/2,B=N===0?0:(t*h-r)/N}else{let N=Math.sqrt(E);L=N===0?0:(t*h-r)/N,B=N/2}let I,C;m===0&&L===0?(I=0,C=0):R.sign(m)===R.sign(L)?(I=m+L,C=d/I):(C=m-L,I=d/C);let P,y;h===0&&B===0?(P=0,y=0):R.sign(h)===R.sign(B)?(P=h+B,y=n/P):(y=h-B,P=n/y);let S=T.computeRealRoots(1,I,P),M=T.computeRealRoots(1,C,y);if(S.length!==0)return M.length!==0?S[1]<=M[0]?[S[0],S[1],M[0],M[1]]:M[1]<=S[0]?[M[0],M[1],S[0],S[1]]:S[0]>=M[0]&&S[1]<=M[1]?[M[0],S[0],S[1],M[1]]:M[0]>=S[0]&&M[1]<=S[1]?[S[0],M[0],M[1],S[1]]:S[0]>M[0]&&S[0]<M[1]?[M[0],S[0],M[1],S[1]]:[S[0],M[0],S[1],M[1]]:S;if(M.length!==0)return M}return[]}it.computeRealRoots=function(t,e,r,n,i){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");if(typeof i!="number")throw new w("e is a required number.");if(Math.abs(t)<R.EPSILON15)return F.computeRealRoots(e,r,n,i);let c=e/t,s=r/t,u=n/t,a=i/t,f=c<0?1:0;switch(f+=s<0?f+1:f,f+=u<0?f+1:f,f+=a<0?f+1:f,f){case 0:return z(c,s,u,a);case 1:return Y(c,s,u,a);case 2:return Y(c,s,u,a);case 3:return z(c,s,u,a);case 4:return z(c,s,u,a);case 5:return Y(c,s,u,a);case 6:return z(c,s,u,a);case 7:return z(c,s,u,a);case 8:return Y(c,s,u,a);case 9:return z(c,s,u,a);case 10:return z(c,s,u,a);case 11:return Y(c,s,u,a);case 12:return z(c,s,u,a);case 13:return z(c,s,u,a);case 14:return z(c,s,u,a);case 15:return z(c,s,u,a);default:return}};var dt=it;function J(t,e){e=o.clone(H(e,o.ZERO)),o.equals(e,o.ZERO)||o.normalize(e,e),this.origin=o.clone(H(t,o.ZERO)),this.direction=e}J.clone=function(t,e){if(g(t))return g(e)?(e.origin=o.clone(t.origin),e.direction=o.clone(t.direction),e):new J(t.origin,t.direction)};J.getPoint=function(t,e,r){return et.typeOf.object("ray",t),et.typeOf.number("t",e),g(r)||(r=new o),r=o.multiplyByScalar(t.direction,e,r),o.add(t.origin,r,r)};var st=J;var O={};O.rayPlane=function(t,e,r){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("plane is required.");g(r)||(r=new o);let n=t.origin,i=t.direction,c=e.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON15)return;let u=(-e.distance-o.dot(c,n))/s;if(!(u<0))return r=o.multiplyByScalar(i,u,r),o.add(n,r,r)};var Ot=new o,Pt=new o,Mt=new o,lt=new o,ht=new o;O.rayTriangleParametric=function(t,e,r,n,i){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("p0 is required.");if(!g(r))throw new w("p1 is required.");if(!g(n))throw new w("p2 is required.");i=H(i,!1);let c=t.origin,s=t.direction,u=o.subtract(r,e,Ot),a=o.subtract(n,e,Pt),f=o.cross(s,a,Mt),l=o.dot(u,f),d,p,q,m,h;if(i){if(l<R.EPSILON6||(d=o.subtract(c,e,lt),q=o.dot(d,f),q<0||q>l)||(p=o.cross(d,u,ht),m=o.dot(s,p),m<0||q+m>l))return;h=o.dot(a,p)/l}else{if(Math.abs(l)<R.EPSILON6)return;let E=1/l;if(d=o.subtract(c,e,lt),q=o.dot(d,f)*E,q<0||q>1||(p=o.cross(d,u,ht),m=o.dot(s,p)*E,m<0||q+m>1))return;h=o.dot(a,p)*E}return h};O.rayTriangle=function(t,e,r,n,i,c){let s=O.rayTriangleParametric(t,e,r,n,i);if(!(!g(s)||s<0))return g(c)||(c=new o),o.multiplyByScalar(t.direction,s,c),o.add(t.origin,c,c)};var Et=new st;O.lineSegmentTriangle=function(t,e,r,n,i,c,s){if(!g(t))throw new w("v0 is required.");if(!g(e))throw new w("v1 is required.");if(!g(r))throw new w("p0 is required.");if(!g(n))throw new w("p1 is required.");if(!g(i))throw new w("p2 is required.");let u=Et;o.clone(t,u.origin),o.subtract(e,t,u.direction),o.normalize(u.direction,u.direction);let a=O.rayTriangleParametric(u,r,n,i,c);if(!(!g(a)||a<0||a>o.distance(t,e)))return g(s)||(s=new o),o.multiplyByScalar(u.direction,a,s),o.add(u.origin,s,s)};function Ct(t,e,r,n){let i=e*e-4*t*r;if(i<0)return;if(i>0){let s=1/(2*t),u=Math.sqrt(i),a=(-e+u)*s,f=(-e-u)*s;return a<f?(n.root0=a,n.root1=f):(n.root0=f,n.root1=a),n}let c=-e/(2*t);if(c!==0)return n.root0=n.root1=c,n}var Nt={root0:0,root1:0};function Rt(t,e,r){g(r)||(r=new Z);let n=t.origin,i=t.direction,c=e.center,s=e.radius*e.radius,u=o.subtract(n,c,Mt),a=o.dot(i,i),f=2*o.dot(i,u),l=o.magnitudeSquared(u)-s,d=Ct(a,f,l,Nt);if(g(d))return r.start=d.root0,r.stop=d.root1,r}O.raySphere=function(t,e,r){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("sphere is required.");if(r=Rt(t,e,r),!(!g(r)||r.stop<0))return r.start=Math.max(r.start,0),r};var Lt=new st;O.lineSegmentSphere=function(t,e,r,n){if(!g(t))throw new w("p0 is required.");if(!g(e))throw new w("p1 is required.");if(!g(r))throw new w("sphere is required.");let i=Lt;o.clone(t,i.origin);let c=o.subtract(e,t,i.direction),s=o.magnitude(c);if(o.normalize(c,c),n=Rt(i,r,n),!(!g(n)||n.stop<0||n.start>s))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,s),n};var It=new o,Dt=new o;O.rayEllipsoid=function(t,e){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("ellipsoid is required.");let r=e.oneOverRadii,n=o.multiplyComponents(r,t.origin,It),i=o.multiplyComponents(r,t.direction,Dt),c=o.magnitudeSquared(n),s=o.dot(n,i),u,a,f,l,d;if(c>1){if(s>=0)return;let p=s*s;if(u=c-1,a=o.magnitudeSquared(i),f=a*u,p<f)return;if(p>f){l=s*s-f,d=-s+Math.sqrt(l);let m=d/a,h=u/d;return m<h?new Z(m,h):{start:h,stop:m}}let q=Math.sqrt(u/a);return new Z(q,q)}else if(c<1)return u=c-1,a=o.magnitudeSquared(i),f=a*u,l=s*s-f,d=-s+Math.sqrt(l),new Z(0,d/a);if(s<0)return a=o.magnitudeSquared(i),new Z(0,-s/a)};function Q(t,e,r){let n=t+e;return R.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}O.quadraticVectorExpression=function(t,e,r,n,i){let c=n*n,s=i*i,u=(t[b.COLUMN1ROW1]-t[b.COLUMN2ROW2])*s,a=i*(n*Q(t[b.COLUMN1ROW0],t[b.COLUMN0ROW1],R.EPSILON15)+e.y),f=t[b.COLUMN0ROW0]*c+t[b.COLUMN2ROW2]*s+n*e.x+r,l=s*Q(t[b.COLUMN2ROW1],t[b.COLUMN1ROW2],R.EPSILON15),d=i*(n*Q(t[b.COLUMN2ROW0],t[b.COLUMN0ROW2])+e.z),p,q=[];if(d===0&&l===0){if(p=T.computeRealRoots(u,a,f),p.length===0)return q;let P=p[0],y=Math.sqrt(Math.max(1-P*P,0));if(q.push(new o(n,i*P,i*-y)),q.push(new o(n,i*P,i*y)),p.length===2){let S=p[1],M=Math.sqrt(Math.max(1-S*S,0));q.push(new o(n,i*S,i*-M)),q.push(new o(n,i*S,i*M))}return q}let m=d*d,h=l*l,E=u*u,D=d*l,W=E+h,V=2*(a*u+D),L=2*f*u+a*a-h+m,B=2*(f*a-D),I=f*f-m;if(W===0&&V===0&&L===0&&B===0)return q;p=dt.computeRealRoots(W,V,L,B,I);let C=p.length;if(C===0)return q;for(let P=0;P<C;++P){let y=p[P],S=y*y,M=Math.max(1-S,0),N=Math.sqrt(M),x;R.sign(u)===R.sign(f)?x=Q(u*S+f,a*y,R.EPSILON12):R.sign(f)===R.sign(a*y)?x=Q(u*S,a*y+f,R.EPSILON12):x=Q(u*S+a*y,f,R.EPSILON12);let _=Q(l*y,d,R.EPSILON15),A=x*_;A<0?q.push(new o(n,i*y,i*N)):A>0?q.push(new o(n,i*y,i*-N)):N!==0?(q.push(new o(n,i*y,i*-N)),q.push(new o(n,i*y,i*N)),++P):q.push(new o(n,i*y,i*N))}return q};var ct=new o,wt=new o,qt=new o,K=new o,Bt=new o,xt=new b,Tt=new b,zt=new b,Wt=new b,Vt=new b,gt=new b,pt=new b,St=new o,vt=new o,Ut=new ft;O.grazingAltitudeLocation=function(t,e){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("ellipsoid is required.");let r=t.origin,n=t.direction;if(!o.equals(r,o.ZERO)){let I=e.geodeticSurfaceNormal(r,ct);if(o.dot(n,I)>=0)return r}let i=g(this.rayEllipsoid(t,e)),c=e.transformPositionToScaledSpace(n,ct),s=o.normalize(c,c),u=o.mostOrthogonalAxis(c,K),a=o.normalize(o.cross(u,s,wt),wt),f=o.normalize(o.cross(s,a,qt),qt),l=xt;l[0]=s.x,l[1]=s.y,l[2]=s.z,l[3]=a.x,l[4]=a.y,l[5]=a.z,l[6]=f.x,l[7]=f.y,l[8]=f.z;let d=b.transpose(l,Tt),p=b.fromScale(e.radii,zt),q=b.fromScale(e.oneOverRadii,Wt),m=Vt;m[0]=0,m[1]=-n.z,m[2]=n.y,m[3]=n.z,m[4]=0,m[5]=-n.x,m[6]=-n.y,m[7]=n.x,m[8]=0;let h=b.multiply(b.multiply(d,q,gt),m,gt),E=b.multiply(b.multiply(h,p,pt),l,pt),D=b.multiplyByVector(h,r,Bt),W=O.quadraticVectorExpression(E,o.negate(D,ct),0,0,1),V,L,B=W.length;if(B>0){let I=o.clone(o.ZERO,vt),C=Number.NEGATIVE_INFINITY;for(let y=0;y<B;++y){V=b.multiplyByVector(p,b.multiplyByVector(l,W[y],St),St);let S=o.normalize(o.subtract(V,r,K),K),M=o.dot(S,n);M>C&&(C=M,I=o.clone(V,I))}let P=e.cartesianToCartographic(I,Ut);return C=R.clamp(C,0,1),L=o.magnitude(o.subtract(I,r,K))*Math.sqrt(1-C*C),L=i?-L:L,P.height=L,e.cartographicToCartesian(P,new o)}};var Qt=new o;O.lineSegmentPlane=function(t,e,r,n){if(!g(t))throw new w("endPoint0 is required.");if(!g(e))throw new w("endPoint1 is required.");if(!g(r))throw new w("plane is required.");g(n)||(n=new o);let i=o.subtract(e,t,Qt),c=r.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON6)return;let u=o.dot(c,t),a=-(r.distance+u)/s;if(!(a<0||a>1))return o.multiplyByScalar(i,a,n),o.add(t,n,n),n};O.trianglePlaneIntersection=function(t,e,r,n){if(!g(t)||!g(e)||!g(r)||!g(n))throw new w("p0, p1, p2, and plane are required.");let i=n.normal,c=n.distance,s=o.dot(i,t)+c<0,u=o.dot(i,e)+c<0,a=o.dot(i,r)+c<0,f=0;f+=s?1:0,f+=u?1:0,f+=a?1:0;let l,d;if((f===1||f===2)&&(l=new o,d=new o),f===1){if(s)return O.lineSegmentPlane(t,e,n,l),O.lineSegmentPlane(t,r,n,d),{positions:[t,e,r,l,d],indices:[0,3,4,1,2,4,1,4,3]};if(u)return O.lineSegmentPlane(e,r,n,l),O.lineSegmentPlane(e,t,n,d),{positions:[t,e,r,l,d],indices:[1,3,4,2,0,4,2,4,3]};if(a)return O.lineSegmentPlane(r,t,n,l),O.lineSegmentPlane(r,e,n,d),{positions:[t,e,r,l,d],indices:[2,3,4,0,1,4,0,4,3]}}else if(f===2)if(s)if(u){if(!a)return O.lineSegmentPlane(t,r,n,l),O.lineSegmentPlane(e,r,n,d),{positions:[t,e,r,l,d],indices:[0,1,4,0,4,3,2,3,4]}}else return O.lineSegmentPlane(r,e,n,l),O.lineSegmentPlane(t,e,n,d),{positions:[t,e,r,l,d],indices:[2,0,4,2,4,3,1,3,4]};else return O.lineSegmentPlane(e,t,n,l),O.lineSegmentPlane(r,t,n,d),{positions:[t,e,r,l,d],indices:[1,2,4,1,4,3,0,3,4]}};var we=O;export{st as a,we as b}; +import{c as Z}from"./chunk-TMSETF7M.js";import{a as o,b as ft,e as b}from"./chunk-POASMU2N.js";import{a as R}from"./chunk-R6KGAEF6.js";import{a as H}from"./chunk-IUA6FAOZ.js";import{a as w,b as et}from"./chunk-UH2WFNTA.js";import{e as g}from"./chunk-PEYJTJPE.js";var nt={};nt.computeDiscriminant=function(t,e,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");return e*e-4*t*r};function mt(t,e,r){let n=t+e;return R.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}nt.computeRealRoots=function(t,e,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");let n;if(t===0)return e===0?[]:[-r/e];if(e===0){if(r===0)return[0,0];let a=Math.abs(r),f=Math.abs(t);if(a<f&&a/f<R.EPSILON14)return[0,0];if(a>f&&f/a<R.EPSILON14)return[];if(n=-r/t,n<0)return[];let l=Math.sqrt(n);return[-l,l]}else if(r===0)return n=-e/t,n<0?[n,0]:[0,n];let i=e*e,c=4*t*r,s=mt(i,-c,R.EPSILON14);if(s<0)return[];let u=-.5*mt(e,R.sign(e)*Math.sqrt(s),R.EPSILON14);return e>0?[u/t,r/u]:[r/u,u/t]};var T=nt;var ot={};ot.computeDiscriminant=function(t,e,r,n){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");let i=t*t,c=e*e,s=r*r,u=n*n;return 18*t*e*r*n+c*s-27*i*u-4*(t*s*r+c*e*n)};function rt(t,e,r,n){let i=t,c=e/3,s=r/3,u=n,a=i*s,f=c*u,l=c*c,d=s*s,p=i*s-l,q=i*u-c*s,m=c*u-d,h=4*p*m-q*q,E,D;if(h<0){let X,k,G;l*f>=a*d?(X=i,k=p,G=-2*c*p+i*q):(X=u,k=m,G=-u*q+2*s*m);let at=-(G<0?-1:1)*Math.abs(X)*Math.sqrt(-h);D=-G+at;let $=D/2,j=$<0?-Math.pow(-$,1/3):Math.pow($,1/3),tt=D===at?-j:-k/j;return E=k<=0?j+tt:-G/(j*j+tt*tt+k),l*f>=a*d?[(E-c)/i]:[-u/(E+s)]}let W=p,V=-2*c*p+i*q,L=m,B=-u*q+2*s*m,I=Math.sqrt(h),C=Math.sqrt(3)/2,P=Math.abs(Math.atan2(i*I,-V)/3);E=2*Math.sqrt(-W);let y=Math.cos(P);D=E*y;let S=E*(-y/2-C*Math.sin(P)),M=D+S>2*c?D-c:S-c,N=i,x=M/N;P=Math.abs(Math.atan2(u*I,-B)/3),E=2*Math.sqrt(-L),y=Math.cos(P),D=E*y,S=E*(-y/2-C*Math.sin(P));let _=-u,A=D+S<2*s?D+s:S+s,v=_/A,yt=N*A,ut=-M*A-N*_,bt=M*_,U=(s*ut-c*bt)/(-c*ut+s*yt);return x<=U?x<=v?U<=v?[x,U,v]:[x,v,U]:[v,x,U]:x<=v?[U,x,v]:U<=v?[U,v,x]:[v,U,x]}ot.computeRealRoots=function(t,e,r,n){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");let i,c;if(t===0)return T.computeRealRoots(e,r,n);if(e===0){if(r===0){if(n===0)return[0,0,0];c=-n/t;let s=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3);return[s,s,s]}else if(n===0)return i=T.computeRealRoots(t,0,r),i.Length===0?[0]:[i[0],0,i[1]];return rt(t,0,r,n)}else{if(r===0)return n===0?(c=-e/t,c<0?[c,0,0]:[0,0,c]):rt(t,e,0,n);if(n===0)return i=T.computeRealRoots(t,e,r),i.length===0?[0]:i[1]<=0?[i[0],i[1],0]:i[0]>=0?[0,i[0],i[1]]:[i[0],0,i[1]]}return rt(t,e,r,n)};var F=ot;var it={};it.computeDiscriminant=function(t,e,r,n,i){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");if(typeof i!="number")throw new w("e is a required number.");let c=t*t,s=c*t,u=e*e,a=u*e,f=r*r,l=f*r,d=n*n,p=d*n,q=i*i,m=q*i;return u*f*d-4*a*p-4*t*l*d+18*t*e*r*p-27*c*d*d+256*s*m+i*(18*a*r*n-4*u*l+16*t*f*f-80*t*e*f*n-6*t*u*d+144*c*r*d)+q*(144*t*u*r-27*u*u-128*c*f-192*c*e*n)};function z(t,e,r,n){let i=t*t,c=e-3*i/8,s=r-e*t/2+i*t/8,u=n-r*t/4+e*i/16-3*i*i/256,a=F.computeRealRoots(1,2*c,c*c-4*u,-s*s);if(a.length>0){let f=-t/4,l=a[a.length-1];if(Math.abs(l)<R.EPSILON14){let d=T.computeRealRoots(1,c,u);if(d.length===2){let p=d[0],q=d[1],m;if(p>=0&&q>=0){let h=Math.sqrt(p),E=Math.sqrt(q);return[f-E,f-h,f+h,f+E]}else{if(p>=0&&q<0)return m=Math.sqrt(p),[f-m,f+m];if(p<0&&q>=0)return m=Math.sqrt(q),[f-m,f+m]}}return[]}else if(l>0){let d=Math.sqrt(l),p=(c+l-s/d)/2,q=(c+l+s/d)/2,m=T.computeRealRoots(1,d,p),h=T.computeRealRoots(1,-d,q);return m.length!==0?(m[0]+=f,m[1]+=f,h.length!==0?(h[0]+=f,h[1]+=f,m[1]<=h[0]?[m[0],m[1],h[0],h[1]]:h[1]<=m[0]?[h[0],h[1],m[0],m[1]]:m[0]>=h[0]&&m[1]<=h[1]?[h[0],m[0],m[1],h[1]]:h[0]>=m[0]&&h[1]<=m[1]?[m[0],h[0],h[1],m[1]]:m[0]>h[0]&&m[0]<h[1]?[h[0],m[0],h[1],m[1]]:[m[0],h[0],m[1],h[1]]):m):h.length!==0?(h[0]+=f,h[1]+=f,h):[]}}return[]}function Y(t,e,r,n){let i=r*r,c=e*e,s=t*t,u=-2*e,a=r*t+c-4*n,f=s*n-r*e*t+i,l=F.computeRealRoots(1,u,a,f);if(l.length>0){let d=l[0],p=e-d,q=p*p,m=t/2,h=p/2,E=q-4*n,D=q+4*Math.abs(n),W=s-4*d,V=s+4*Math.abs(d),L,B;if(d<0||E*V<W*D){let N=Math.sqrt(W);L=N/2,B=N===0?0:(t*h-r)/N}else{let N=Math.sqrt(E);L=N===0?0:(t*h-r)/N,B=N/2}let I,C;m===0&&L===0?(I=0,C=0):R.sign(m)===R.sign(L)?(I=m+L,C=d/I):(C=m-L,I=d/C);let P,y;h===0&&B===0?(P=0,y=0):R.sign(h)===R.sign(B)?(P=h+B,y=n/P):(y=h-B,P=n/y);let S=T.computeRealRoots(1,I,P),M=T.computeRealRoots(1,C,y);if(S.length!==0)return M.length!==0?S[1]<=M[0]?[S[0],S[1],M[0],M[1]]:M[1]<=S[0]?[M[0],M[1],S[0],S[1]]:S[0]>=M[0]&&S[1]<=M[1]?[M[0],S[0],S[1],M[1]]:M[0]>=S[0]&&M[1]<=S[1]?[S[0],M[0],M[1],S[1]]:S[0]>M[0]&&S[0]<M[1]?[M[0],S[0],M[1],S[1]]:[S[0],M[0],S[1],M[1]]:S;if(M.length!==0)return M}return[]}it.computeRealRoots=function(t,e,r,n,i){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");if(typeof i!="number")throw new w("e is a required number.");if(Math.abs(t)<R.EPSILON15)return F.computeRealRoots(e,r,n,i);let c=e/t,s=r/t,u=n/t,a=i/t,f=c<0?1:0;switch(f+=s<0?f+1:f,f+=u<0?f+1:f,f+=a<0?f+1:f,f){case 0:return z(c,s,u,a);case 1:return Y(c,s,u,a);case 2:return Y(c,s,u,a);case 3:return z(c,s,u,a);case 4:return z(c,s,u,a);case 5:return Y(c,s,u,a);case 6:return z(c,s,u,a);case 7:return z(c,s,u,a);case 8:return Y(c,s,u,a);case 9:return z(c,s,u,a);case 10:return z(c,s,u,a);case 11:return Y(c,s,u,a);case 12:return z(c,s,u,a);case 13:return z(c,s,u,a);case 14:return z(c,s,u,a);case 15:return z(c,s,u,a);default:return}};var dt=it;function J(t,e){e=o.clone(H(e,o.ZERO)),o.equals(e,o.ZERO)||o.normalize(e,e),this.origin=o.clone(H(t,o.ZERO)),this.direction=e}J.clone=function(t,e){if(g(t))return g(e)?(e.origin=o.clone(t.origin),e.direction=o.clone(t.direction),e):new J(t.origin,t.direction)};J.getPoint=function(t,e,r){return et.typeOf.object("ray",t),et.typeOf.number("t",e),g(r)||(r=new o),r=o.multiplyByScalar(t.direction,e,r),o.add(t.origin,r,r)};var st=J;var O={};O.rayPlane=function(t,e,r){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("plane is required.");g(r)||(r=new o);let n=t.origin,i=t.direction,c=e.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON15)return;let u=(-e.distance-o.dot(c,n))/s;if(!(u<0))return r=o.multiplyByScalar(i,u,r),o.add(n,r,r)};var Ot=new o,Pt=new o,Mt=new o,lt=new o,ht=new o;O.rayTriangleParametric=function(t,e,r,n,i){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("p0 is required.");if(!g(r))throw new w("p1 is required.");if(!g(n))throw new w("p2 is required.");i=H(i,!1);let c=t.origin,s=t.direction,u=o.subtract(r,e,Ot),a=o.subtract(n,e,Pt),f=o.cross(s,a,Mt),l=o.dot(u,f),d,p,q,m,h;if(i){if(l<R.EPSILON6||(d=o.subtract(c,e,lt),q=o.dot(d,f),q<0||q>l)||(p=o.cross(d,u,ht),m=o.dot(s,p),m<0||q+m>l))return;h=o.dot(a,p)/l}else{if(Math.abs(l)<R.EPSILON6)return;let E=1/l;if(d=o.subtract(c,e,lt),q=o.dot(d,f)*E,q<0||q>1||(p=o.cross(d,u,ht),m=o.dot(s,p)*E,m<0||q+m>1))return;h=o.dot(a,p)*E}return h};O.rayTriangle=function(t,e,r,n,i,c){let s=O.rayTriangleParametric(t,e,r,n,i);if(!(!g(s)||s<0))return g(c)||(c=new o),o.multiplyByScalar(t.direction,s,c),o.add(t.origin,c,c)};var Et=new st;O.lineSegmentTriangle=function(t,e,r,n,i,c,s){if(!g(t))throw new w("v0 is required.");if(!g(e))throw new w("v1 is required.");if(!g(r))throw new w("p0 is required.");if(!g(n))throw new w("p1 is required.");if(!g(i))throw new w("p2 is required.");let u=Et;o.clone(t,u.origin),o.subtract(e,t,u.direction),o.normalize(u.direction,u.direction);let a=O.rayTriangleParametric(u,r,n,i,c);if(!(!g(a)||a<0||a>o.distance(t,e)))return g(s)||(s=new o),o.multiplyByScalar(u.direction,a,s),o.add(u.origin,s,s)};function Ct(t,e,r,n){let i=e*e-4*t*r;if(i<0)return;if(i>0){let s=1/(2*t),u=Math.sqrt(i),a=(-e+u)*s,f=(-e-u)*s;return a<f?(n.root0=a,n.root1=f):(n.root0=f,n.root1=a),n}let c=-e/(2*t);if(c!==0)return n.root0=n.root1=c,n}var Nt={root0:0,root1:0};function Rt(t,e,r){g(r)||(r=new Z);let n=t.origin,i=t.direction,c=e.center,s=e.radius*e.radius,u=o.subtract(n,c,Mt),a=o.dot(i,i),f=2*o.dot(i,u),l=o.magnitudeSquared(u)-s,d=Ct(a,f,l,Nt);if(g(d))return r.start=d.root0,r.stop=d.root1,r}O.raySphere=function(t,e,r){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("sphere is required.");if(r=Rt(t,e,r),!(!g(r)||r.stop<0))return r.start=Math.max(r.start,0),r};var Lt=new st;O.lineSegmentSphere=function(t,e,r,n){if(!g(t))throw new w("p0 is required.");if(!g(e))throw new w("p1 is required.");if(!g(r))throw new w("sphere is required.");let i=Lt;o.clone(t,i.origin);let c=o.subtract(e,t,i.direction),s=o.magnitude(c);if(o.normalize(c,c),n=Rt(i,r,n),!(!g(n)||n.stop<0||n.start>s))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,s),n};var It=new o,Dt=new o;O.rayEllipsoid=function(t,e){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("ellipsoid is required.");let r=e.oneOverRadii,n=o.multiplyComponents(r,t.origin,It),i=o.multiplyComponents(r,t.direction,Dt),c=o.magnitudeSquared(n),s=o.dot(n,i),u,a,f,l,d;if(c>1){if(s>=0)return;let p=s*s;if(u=c-1,a=o.magnitudeSquared(i),f=a*u,p<f)return;if(p>f){l=s*s-f,d=-s+Math.sqrt(l);let m=d/a,h=u/d;return m<h?new Z(m,h):{start:h,stop:m}}let q=Math.sqrt(u/a);return new Z(q,q)}else if(c<1)return u=c-1,a=o.magnitudeSquared(i),f=a*u,l=s*s-f,d=-s+Math.sqrt(l),new Z(0,d/a);if(s<0)return a=o.magnitudeSquared(i),new Z(0,-s/a)};function Q(t,e,r){let n=t+e;return R.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}O.quadraticVectorExpression=function(t,e,r,n,i){let c=n*n,s=i*i,u=(t[b.COLUMN1ROW1]-t[b.COLUMN2ROW2])*s,a=i*(n*Q(t[b.COLUMN1ROW0],t[b.COLUMN0ROW1],R.EPSILON15)+e.y),f=t[b.COLUMN0ROW0]*c+t[b.COLUMN2ROW2]*s+n*e.x+r,l=s*Q(t[b.COLUMN2ROW1],t[b.COLUMN1ROW2],R.EPSILON15),d=i*(n*Q(t[b.COLUMN2ROW0],t[b.COLUMN0ROW2])+e.z),p,q=[];if(d===0&&l===0){if(p=T.computeRealRoots(u,a,f),p.length===0)return q;let P=p[0],y=Math.sqrt(Math.max(1-P*P,0));if(q.push(new o(n,i*P,i*-y)),q.push(new o(n,i*P,i*y)),p.length===2){let S=p[1],M=Math.sqrt(Math.max(1-S*S,0));q.push(new o(n,i*S,i*-M)),q.push(new o(n,i*S,i*M))}return q}let m=d*d,h=l*l,E=u*u,D=d*l,W=E+h,V=2*(a*u+D),L=2*f*u+a*a-h+m,B=2*(f*a-D),I=f*f-m;if(W===0&&V===0&&L===0&&B===0)return q;p=dt.computeRealRoots(W,V,L,B,I);let C=p.length;if(C===0)return q;for(let P=0;P<C;++P){let y=p[P],S=y*y,M=Math.max(1-S,0),N=Math.sqrt(M),x;R.sign(u)===R.sign(f)?x=Q(u*S+f,a*y,R.EPSILON12):R.sign(f)===R.sign(a*y)?x=Q(u*S,a*y+f,R.EPSILON12):x=Q(u*S+a*y,f,R.EPSILON12);let _=Q(l*y,d,R.EPSILON15),A=x*_;A<0?q.push(new o(n,i*y,i*N)):A>0?q.push(new o(n,i*y,i*-N)):N!==0?(q.push(new o(n,i*y,i*-N)),q.push(new o(n,i*y,i*N)),++P):q.push(new o(n,i*y,i*N))}return q};var ct=new o,wt=new o,qt=new o,K=new o,Bt=new o,xt=new b,Tt=new b,zt=new b,Wt=new b,Vt=new b,gt=new b,pt=new b,St=new o,vt=new o,Ut=new ft;O.grazingAltitudeLocation=function(t,e){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("ellipsoid is required.");let r=t.origin,n=t.direction;if(!o.equals(r,o.ZERO)){let I=e.geodeticSurfaceNormal(r,ct);if(o.dot(n,I)>=0)return r}let i=g(this.rayEllipsoid(t,e)),c=e.transformPositionToScaledSpace(n,ct),s=o.normalize(c,c),u=o.mostOrthogonalAxis(c,K),a=o.normalize(o.cross(u,s,wt),wt),f=o.normalize(o.cross(s,a,qt),qt),l=xt;l[0]=s.x,l[1]=s.y,l[2]=s.z,l[3]=a.x,l[4]=a.y,l[5]=a.z,l[6]=f.x,l[7]=f.y,l[8]=f.z;let d=b.transpose(l,Tt),p=b.fromScale(e.radii,zt),q=b.fromScale(e.oneOverRadii,Wt),m=Vt;m[0]=0,m[1]=-n.z,m[2]=n.y,m[3]=n.z,m[4]=0,m[5]=-n.x,m[6]=-n.y,m[7]=n.x,m[8]=0;let h=b.multiply(b.multiply(d,q,gt),m,gt),E=b.multiply(b.multiply(h,p,pt),l,pt),D=b.multiplyByVector(h,r,Bt),W=O.quadraticVectorExpression(E,o.negate(D,ct),0,0,1),V,L,B=W.length;if(B>0){let I=o.clone(o.ZERO,vt),C=Number.NEGATIVE_INFINITY;for(let y=0;y<B;++y){V=b.multiplyByVector(p,b.multiplyByVector(l,W[y],St),St);let S=o.normalize(o.subtract(V,r,K),K),M=o.dot(S,n);M>C&&(C=M,I=o.clone(V,I))}let P=e.cartesianToCartographic(I,Ut);return C=R.clamp(C,0,1),L=o.magnitude(o.subtract(I,r,K))*Math.sqrt(1-C*C),L=i?-L:L,P.height=L,e.cartographicToCartesian(P,new o)}};var Qt=new o;O.lineSegmentPlane=function(t,e,r,n){if(!g(t))throw new w("endPoint0 is required.");if(!g(e))throw new w("endPoint1 is required.");if(!g(r))throw new w("plane is required.");g(n)||(n=new o);let i=o.subtract(e,t,Qt),c=r.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON6)return;let u=o.dot(c,t),a=-(r.distance+u)/s;if(!(a<0||a>1))return o.multiplyByScalar(i,a,n),o.add(t,n,n),n};O.trianglePlaneIntersection=function(t,e,r,n){if(!g(t)||!g(e)||!g(r)||!g(n))throw new w("p0, p1, p2, and plane are required.");let i=n.normal,c=n.distance,s=o.dot(i,t)+c<0,u=o.dot(i,e)+c<0,a=o.dot(i,r)+c<0,f=0;f+=s?1:0,f+=u?1:0,f+=a?1:0;let l,d;if((f===1||f===2)&&(l=new o,d=new o),f===1){if(s)return O.lineSegmentPlane(t,e,n,l),O.lineSegmentPlane(t,r,n,d),{positions:[t,e,r,l,d],indices:[0,3,4,1,2,4,1,4,3]};if(u)return O.lineSegmentPlane(e,r,n,l),O.lineSegmentPlane(e,t,n,d),{positions:[t,e,r,l,d],indices:[1,3,4,2,0,4,2,4,3]};if(a)return O.lineSegmentPlane(r,t,n,l),O.lineSegmentPlane(r,e,n,d),{positions:[t,e,r,l,d],indices:[2,3,4,0,1,4,0,4,3]}}else if(f===2)if(s)if(u){if(!a)return O.lineSegmentPlane(t,r,n,l),O.lineSegmentPlane(e,r,n,d),{positions:[t,e,r,l,d],indices:[0,1,4,0,4,3,2,3,4]}}else return O.lineSegmentPlane(r,e,n,l),O.lineSegmentPlane(t,e,n,d),{positions:[t,e,r,l,d],indices:[2,0,4,2,4,3,1,3,4]};else return O.lineSegmentPlane(e,t,n,l),O.lineSegmentPlane(r,t,n,d),{positions:[t,e,r,l,d],indices:[1,2,4,1,4,3,0,3,4]}};var we=O;export{st as a,we as b}; diff --git a/cesium/Workers/chunk-TLL4Q2KI.js b/cesium/Workers/chunk-TLL4Q2KI.js deleted file mode 100644 index 250a00a..0000000 --- a/cesium/Workers/chunk-TLL4Q2KI.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 - * - * Copyright 2011-2022 Cesium Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Columbus View (Pat. Pend.) - * - * Portions licensed separately. - * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. - */ - -import{a as P}from"./chunk-4IWHN7T4.js";import{a as j,b as d}from"./chunk-PT2EMSIG.js";import{a as O}from"./chunk-REUYHR24.js";import{a as A,b as m,g as u}from"./chunk-CMXCDAKR.js";import{a as e,c as l,d as _}from"./chunk-LJCGAQ64.js";import{a as g}from"./chunk-42NIXFVW.js";import{a as y,b as p}from"./chunk-5YVCOCPP.js";import{e as r}from"./chunk-U73D6PDD.js";var x=new A;function s(n,t){if(p.defined("origin",n),t=g(t,_.WGS84),n=t.scaleToGeodeticSurface(n),!r(n))throw new y("origin must not be at the center of the ellipsoid.");let o=u.eastNorthUpToFixedFrame(n,t);this._ellipsoid=t,this._origin=n,this._xAxis=e.fromCartesian4(m.getColumn(o,0,x)),this._yAxis=e.fromCartesian4(m.getColumn(o,1,x));let i=e.fromCartesian4(m.getColumn(o,2,x));this._plane=O.fromPointNormal(n,i)}Object.defineProperties(s.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var C=new P;s.fromPoints=function(n,t){p.defined("cartesians",n);let o=P.fromPoints(n,C);return new s(o.center,t)};var w=new j,h=new e;s.prototype.projectPointOntoPlane=function(n,t){p.defined("cartesian",n);let o=w;o.origin=n,e.normalize(n,o.direction);let i=d.rayPlane(o,this._plane,h);if(r(i)||(e.negate(o.direction,o.direction),i=d.rayPlane(o,this._plane,h)),r(i)){let c=e.subtract(i,this._origin,i),a=e.dot(this._xAxis,c),f=e.dot(this._yAxis,c);return r(t)?(t.x=a,t.y=f,t):new l(a,f)}};s.prototype.projectPointsOntoPlane=function(n,t){p.defined("cartesians",n),r(t)||(t=[]);let o=0,i=n.length;for(let c=0;c<i;c++){let a=this.projectPointOntoPlane(n[c],t[o]);r(a)&&(t[o]=a,o++)}return t.length=o,t};s.prototype.projectPointToNearestOnPlane=function(n,t){p.defined("cartesian",n),r(t)||(t=new l);let o=w;o.origin=n,e.clone(this._plane.normal,o.direction);let i=d.rayPlane(o,this._plane,h);r(i)||(e.negate(o.direction,o.direction),i=d.rayPlane(o,this._plane,h));let c=e.subtract(i,this._origin,i),a=e.dot(this._xAxis,c),f=e.dot(this._yAxis,c);return t.x=a,t.y=f,t};s.prototype.projectPointsToNearestOnPlane=function(n,t){p.defined("cartesians",n),r(t)||(t=[]);let o=n.length;t.length=o;for(let i=0;i<o;i++)t[i]=this.projectPointToNearestOnPlane(n[i],t[i]);return t};var T=new e;s.prototype.projectPointOntoEllipsoid=function(n,t){p.defined("cartesian",n),r(t)||(t=new e);let o=this._ellipsoid,i=this._origin,c=this._xAxis,a=this._yAxis,f=T;return e.multiplyByScalar(c,n.x,f),t=e.add(i,f,t),e.multiplyByScalar(a,n.y,f),e.add(t,f,t),o.scaleToGeocentricSurface(t,t),t};s.prototype.projectPointsOntoEllipsoid=function(n,t){p.defined("cartesians",n);let o=n.length;r(t)?t.length=o:t=new Array(o);for(let i=0;i<o;++i)t[i]=this.projectPointOntoEllipsoid(n[i],t[i]);return t};var M=s;export{M as a}; diff --git a/cesium/Workers/chunk-TMSETF7M.js b/cesium/Workers/chunk-TMSETF7M.js new file mode 100644 index 0000000..cfa0242 --- /dev/null +++ b/cesium/Workers/chunk-TMSETF7M.js @@ -0,0 +1,26 @@ +/** + * @license + * Cesium - https://github.com/CesiumGS/cesium + * Version 1.119 + * + * Copyright 2011-2022 Cesium Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Columbus View (Pat. Pend.) + * + * Portions licensed separately. + * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. + */ + +import{b as _,h as I}from"./chunk-7Z5IIKOJ.js";import{a as n,b as N,d as Z,e as A}from"./chunk-POASMU2N.js";import{a as cn}from"./chunk-R6KGAEF6.js";import{a as T}from"./chunk-IUA6FAOZ.js";import{a as on,b as h}from"./chunk-UH2WFNTA.js";import{e as x}from"./chunk-PEYJTJPE.js";function V(e){this._ellipsoid=T(e,Z.default),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(V.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});V.prototype.project=function(e,t){let o=this._semimajorAxis,c=e.longitude*o,r=e.latitude*o,d=e.height;return x(t)?(t.x=c,t.y=r,t.z=d,t):new n(c,r,d)};V.prototype.unproject=function(e,t){if(!x(e))throw new on("cartesian is required");let o=this._oneOverSemimajorAxis,c=e.x*o,r=e.y*o,d=e.z;return x(t)?(t.longitude=c,t.latitude=r,t.height=d,t):new N(c,r,d)};var k=V;var mn={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},U=Object.freeze(mn);function un(e,t){this.start=T(e,0),this.stop=T(t,0)}var rn=un;function a(e,t){this.center=n.clone(T(e,n.ZERO)),this.radius=T(t,0)}var F=new n,Y=new n,J=new n,K=new n,Q=new n,$=new n,L=new n,b=new n,H=new n,nn=new n,tn=new n,en=new n,xn=4/3*cn.PI;a.fromPoints=function(e,t){if(x(t)||(t=new a),!x(e)||e.length===0)return t.center=n.clone(n.ZERO,t.center),t.radius=0,t;let o=n.clone(e[0],L),c=n.clone(o,F),r=n.clone(o,Y),d=n.clone(o,J),f=n.clone(o,K),s=n.clone(o,Q),m=n.clone(o,$),z=e.length,y;for(y=1;y<z;y++){n.clone(e[y],o);let R=o.x,M=o.y,w=o.z;R<c.x&&n.clone(o,c),R>f.x&&n.clone(o,f),M<r.y&&n.clone(o,r),M>s.y&&n.clone(o,s),w<d.z&&n.clone(o,d),w>m.z&&n.clone(o,m)}let u=n.magnitudeSquared(n.subtract(f,c,b)),i=n.magnitudeSquared(n.subtract(s,r,b)),v=n.magnitudeSquared(n.subtract(m,d,b)),C=c,q=f,O=u;i>O&&(O=i,C=r,q=s),v>O&&(O=v,C=d,q=m);let p=H;p.x=(C.x+q.x)*.5,p.y=(C.y+q.y)*.5,p.z=(C.z+q.z)*.5;let S=n.magnitudeSquared(n.subtract(q,p,b)),l=Math.sqrt(S),j=nn;j.x=c.x,j.y=r.y,j.z=d.z;let P=tn;P.x=f.x,P.y=s.y,P.z=m.z;let D=n.midpoint(j,P,en),B=0;for(y=0;y<z;y++){n.clone(e[y],o);let R=n.magnitude(n.subtract(o,D,b));R>B&&(B=R);let M=n.magnitudeSquared(n.subtract(o,p,b));if(M>S){let w=Math.sqrt(M);l=(l+w)*.5,S=l*l;let g=w-l;p.x=(l*p.x+g*o.x)/w,p.y=(l*p.y+g*o.y)/w,p.z=(l*p.z+g*o.z)/w}}return l<B?(n.clone(p,t.center),t.radius=l):(n.clone(D,t.center),t.radius=B),t};var an=new k,yn=new n,ln=new n,G=new N,X=new N;a.fromRectangle2D=function(e,t,o){return a.fromRectangleWithHeights2D(e,t,0,0,o)};a.fromRectangleWithHeights2D=function(e,t,o,c,r){if(x(r)||(r=new a),!x(e))return r.center=n.clone(n.ZERO,r.center),r.radius=0,r;an._ellipsoid=Z.default,t=T(t,an),I.southwest(e,G),G.height=o,I.northeast(e,X),X.height=c;let d=t.project(G,yn),f=t.project(X,ln),s=f.x-d.x,m=f.y-d.y,z=f.z-d.z;r.radius=Math.sqrt(s*s+m*m+z*z)*.5;let y=r.center;return y.x=d.x+s*.5,y.y=d.y+m*.5,y.z=d.z+z*.5,r};var pn=[];a.fromRectangle3D=function(e,t,o,c){if(t=T(t,Z.default),o=T(o,0),x(c)||(c=new a),!x(e))return c.center=n.clone(n.ZERO,c.center),c.radius=0,c;let r=I.subsample(e,t,o,pn);return a.fromPoints(r,c)};a.fromVertices=function(e,t,o,c){if(x(c)||(c=new a),!x(e)||e.length===0)return c.center=n.clone(n.ZERO,c.center),c.radius=0,c;t=T(t,n.ZERO),o=T(o,3),h.typeOf.number.greaterThanOrEquals("stride",o,3);let r=L;r.x=e[0]+t.x,r.y=e[1]+t.y,r.z=e[2]+t.z;let d=n.clone(r,F),f=n.clone(r,Y),s=n.clone(r,J),m=n.clone(r,K),z=n.clone(r,Q),y=n.clone(r,$),u=e.length,i;for(i=0;i<u;i+=o){let w=e[i]+t.x,g=e[i+1]+t.y,E=e[i+2]+t.z;r.x=w,r.y=g,r.z=E,w<d.x&&n.clone(r,d),w>m.x&&n.clone(r,m),g<f.y&&n.clone(r,f),g>z.y&&n.clone(r,z),E<s.z&&n.clone(r,s),E>y.z&&n.clone(r,y)}let v=n.magnitudeSquared(n.subtract(m,d,b)),C=n.magnitudeSquared(n.subtract(z,f,b)),q=n.magnitudeSquared(n.subtract(y,s,b)),O=d,p=m,S=v;C>S&&(S=C,O=f,p=z),q>S&&(S=q,O=s,p=y);let l=H;l.x=(O.x+p.x)*.5,l.y=(O.y+p.y)*.5,l.z=(O.z+p.z)*.5;let j=n.magnitudeSquared(n.subtract(p,l,b)),P=Math.sqrt(j),D=nn;D.x=d.x,D.y=f.y,D.z=s.z;let B=tn;B.x=m.x,B.y=z.y,B.z=y.z;let R=n.midpoint(D,B,en),M=0;for(i=0;i<u;i+=o){r.x=e[i]+t.x,r.y=e[i+1]+t.y,r.z=e[i+2]+t.z;let w=n.magnitude(n.subtract(r,R,b));w>M&&(M=w);let g=n.magnitudeSquared(n.subtract(r,l,b));if(g>j){let E=Math.sqrt(g);P=(P+E)*.5,j=P*P;let W=E-P;l.x=(P*l.x+W*r.x)/E,l.y=(P*l.y+W*r.y)/E,l.z=(P*l.z+W*r.z)/E}}return P<M?(n.clone(l,c.center),c.radius=P):(n.clone(R,c.center),c.radius=M),c};a.fromEncodedCartesianVertices=function(e,t,o){if(x(o)||(o=new a),!x(e)||!x(t)||e.length!==t.length||e.length===0)return o.center=n.clone(n.ZERO,o.center),o.radius=0,o;let c=L;c.x=e[0]+t[0],c.y=e[1]+t[1],c.z=e[2]+t[2];let r=n.clone(c,F),d=n.clone(c,Y),f=n.clone(c,J),s=n.clone(c,K),m=n.clone(c,Q),z=n.clone(c,$),y=e.length,u;for(u=0;u<y;u+=3){let M=e[u]+t[u],w=e[u+1]+t[u+1],g=e[u+2]+t[u+2];c.x=M,c.y=w,c.z=g,M<r.x&&n.clone(c,r),M>s.x&&n.clone(c,s),w<d.y&&n.clone(c,d),w>m.y&&n.clone(c,m),g<f.z&&n.clone(c,f),g>z.z&&n.clone(c,z)}let i=n.magnitudeSquared(n.subtract(s,r,b)),v=n.magnitudeSquared(n.subtract(m,d,b)),C=n.magnitudeSquared(n.subtract(z,f,b)),q=r,O=s,p=i;v>p&&(p=v,q=d,O=m),C>p&&(p=C,q=f,O=z);let S=H;S.x=(q.x+O.x)*.5,S.y=(q.y+O.y)*.5,S.z=(q.z+O.z)*.5;let l=n.magnitudeSquared(n.subtract(O,S,b)),j=Math.sqrt(l),P=nn;P.x=r.x,P.y=d.y,P.z=f.z;let D=tn;D.x=s.x,D.y=m.y,D.z=z.z;let B=n.midpoint(P,D,en),R=0;for(u=0;u<y;u+=3){c.x=e[u]+t[u],c.y=e[u+1]+t[u+1],c.z=e[u+2]+t[u+2];let M=n.magnitude(n.subtract(c,B,b));M>R&&(R=M);let w=n.magnitudeSquared(n.subtract(c,S,b));if(w>l){let g=Math.sqrt(w);j=(j+g)*.5,l=j*j;let E=g-j;S.x=(j*S.x+E*c.x)/g,S.y=(j*S.y+E*c.y)/g,S.z=(j*S.z+E*c.z)/g}}return j<R?(n.clone(S,o.center),o.radius=j):(n.clone(B,o.center),o.radius=R),o};a.fromCornerPoints=function(e,t,o){h.typeOf.object("corner",e),h.typeOf.object("oppositeCorner",t),x(o)||(o=new a);let c=n.midpoint(e,t,o.center);return o.radius=n.distance(c,t),o};a.fromEllipsoid=function(e,t){return h.typeOf.object("ellipsoid",e),x(t)||(t=new a),n.clone(n.ZERO,t.center),t.radius=e.maximumRadius,t};var hn=new n;a.fromBoundingSpheres=function(e,t){if(x(t)||(t=new a),!x(e)||e.length===0)return t.center=n.clone(n.ZERO,t.center),t.radius=0,t;let o=e.length;if(o===1)return a.clone(e[0],t);if(o===2)return a.union(e[0],e[1],t);let c=[],r;for(r=0;r<o;r++)c.push(e[r].center);t=a.fromPoints(c,t);let d=t.center,f=t.radius;for(r=0;r<o;r++){let s=e[r];f=Math.max(f,n.distance(d,s.center,hn)+s.radius)}return t.radius=f,t};var zn=new n,Sn=new n,wn=new n;a.fromOrientedBoundingBox=function(e,t){h.defined("orientedBoundingBox",e),x(t)||(t=new a);let o=e.halfAxes,c=A.getColumn(o,0,zn),r=A.getColumn(o,1,Sn),d=A.getColumn(o,2,wn);return n.add(c,r,c),n.add(c,d,c),t.center=n.clone(e.center,t.center),t.radius=n.magnitude(c),t};var Pn=new n,gn=new n;a.fromTransformation=function(e,t){h.typeOf.object("transformation",e),x(t)||(t=new a);let o=_.getTranslation(e,Pn),c=_.getScale(e,gn),r=.5*n.magnitude(c);return t.center=n.clone(o,t.center),t.radius=r,t};a.clone=function(e,t){if(x(e))return x(t)?(t.center=n.clone(e.center,t.center),t.radius=e.radius,t):new a(e.center,e.radius)};a.packedLength=4;a.pack=function(e,t,o){h.typeOf.object("value",e),h.defined("array",t),o=T(o,0);let c=e.center;return t[o++]=c.x,t[o++]=c.y,t[o++]=c.z,t[o]=e.radius,t};a.unpack=function(e,t,o){h.defined("array",e),t=T(t,0),x(o)||(o=new a);let c=o.center;return c.x=e[t++],c.y=e[t++],c.z=e[t++],o.radius=e[t],o};var On=new n,jn=new n;a.union=function(e,t,o){h.typeOf.object("left",e),h.typeOf.object("right",t),x(o)||(o=new a);let c=e.center,r=e.radius,d=t.center,f=t.radius,s=n.subtract(d,c,On),m=n.magnitude(s);if(r>=m+f)return e.clone(o),o;if(f>=m+r)return t.clone(o),o;let z=(r+m+f)*.5,y=n.multiplyByScalar(s,(-r+z)/m,jn);return n.add(y,c,y),n.clone(y,o.center),o.radius=z,o};var bn=new n;a.expand=function(e,t,o){h.typeOf.object("sphere",e),h.typeOf.object("point",t),o=a.clone(e,o);let c=n.magnitude(n.subtract(t,o.center,bn));return c>o.radius&&(o.radius=c),o};a.intersectPlane=function(e,t){h.typeOf.object("sphere",e),h.typeOf.object("plane",t);let o=e.center,c=e.radius,r=t.normal,d=n.dot(r,o)+t.distance;return d<-c?U.OUTSIDE:d<c?U.INTERSECTING:U.INSIDE};a.transform=function(e,t,o){return h.typeOf.object("sphere",e),h.typeOf.object("transform",t),x(o)||(o=new a),o.center=_.multiplyByPoint(t,e.center,o.center),o.radius=_.getMaximumScale(t)*e.radius,o};var qn=new n;a.distanceSquaredTo=function(e,t){h.typeOf.object("sphere",e),h.typeOf.object("cartesian",t);let o=n.subtract(e.center,t,qn),c=n.magnitude(o)-e.radius;return c<=0?0:c*c};a.transformWithoutScale=function(e,t,o){return h.typeOf.object("sphere",e),h.typeOf.object("transform",t),x(o)||(o=new a),o.center=_.multiplyByPoint(t,e.center,o.center),o.radius=e.radius,o};var Mn=new n;a.computePlaneDistances=function(e,t,o,c){h.typeOf.object("sphere",e),h.typeOf.object("position",t),h.typeOf.object("direction",o),x(c)||(c=new rn);let r=n.subtract(e.center,t,Mn),d=n.dot(o,r);return c.start=d-e.radius,c.stop=d+e.radius,c};var dn=new n,Tn=new n,Cn=new n,Rn=new n,En=new n,Dn=new N,sn=new Array(8);for(let e=0;e<8;++e)sn[e]=new n;var fn=new k;a.projectTo2D=function(e,t,o){h.typeOf.object("sphere",e),fn._ellipsoid=Z.default,t=T(t,fn);let c=t.ellipsoid,r=e.center,d=e.radius,f;n.equals(r,n.ZERO)?f=n.clone(n.UNIT_X,dn):f=c.geodeticSurfaceNormal(r,dn);let s=n.cross(n.UNIT_Z,f,Tn);n.normalize(s,s);let m=n.cross(f,s,Cn);n.normalize(m,m),n.multiplyByScalar(f,d,f),n.multiplyByScalar(m,d,m),n.multiplyByScalar(s,d,s);let z=n.negate(m,En),y=n.negate(s,Rn),u=sn,i=u[0];n.add(f,m,i),n.add(i,s,i),i=u[1],n.add(f,m,i),n.add(i,y,i),i=u[2],n.add(f,z,i),n.add(i,y,i),i=u[3],n.add(f,z,i),n.add(i,s,i),n.negate(f,f),i=u[4],n.add(f,m,i),n.add(i,s,i),i=u[5],n.add(f,m,i),n.add(i,y,i),i=u[6],n.add(f,z,i),n.add(i,y,i),i=u[7],n.add(f,z,i),n.add(i,s,i);let v=u.length;for(let p=0;p<v;++p){let S=u[p];n.add(r,S,S);let l=c.cartesianToCartographic(S,Dn);t.project(l,S)}o=a.fromPoints(u,o),r=o.center;let C=r.x,q=r.y,O=r.z;return r.x=O,r.y=C,r.z=q,o};a.isOccluded=function(e,t){return h.typeOf.object("sphere",e),h.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)};a.equals=function(e,t){return e===t||x(e)&&x(t)&&n.equals(e.center,t.center)&&e.radius===t.radius};a.prototype.intersectPlane=function(e){return a.intersectPlane(this,e)};a.prototype.distanceSquaredTo=function(e){return a.distanceSquaredTo(this,e)};a.prototype.computePlaneDistances=function(e,t,o){return a.computePlaneDistances(this,e,t,o)};a.prototype.isOccluded=function(e){return a.isOccluded(this,e)};a.prototype.equals=function(e){return a.equals(this,e)};a.prototype.clone=function(e){return a.clone(this,e)};a.prototype.volume=function(){let e=this.radius;return xn*e*e*e};var et=a;export{k as a,U as b,rn as c,et as d}; diff --git a/cesium/Workers/chunk-W6AEJFXB.js b/cesium/Workers/chunk-TOGHF3VN.js similarity index 92% rename from cesium/Workers/chunk-W6AEJFXB.js rename to cesium/Workers/chunk-TOGHF3VN.js index deac122..cc5fe70 100644 --- a/cesium/Workers/chunk-W6AEJFXB.js +++ b/cesium/Workers/chunk-TOGHF3VN.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as wt}from"./chunk-WLRVP2UA.js";import{a as k}from"./chunk-DUVNED7U.js";import{a as kt}from"./chunk-RQXB4B4V.js";import{a as Ct}from"./chunk-MPVEZNKB.js";import{b as dt,c as _t,d as R}from"./chunk-FATK2EQ2.js";import{d as ht}from"./chunk-3FEM743H.js";import{a as N}from"./chunk-77ESX6BV.js";import{a as s,c as pt,d as ot}from"./chunk-LJCGAQ64.js";import{a as M}from"./chunk-JFG572S7.js";import{a as p}from"./chunk-42NIXFVW.js";import{a as z}from"./chunk-5YVCOCPP.js";import{e as E}from"./chunk-U73D6PDD.js";var yt=new s,vt=new s,Et=new s,Mt=new s,Nt=new s,Rt=new s(1,1,1),Pt=Math.cos,At=Math.sin;function O(n){n=p(n,p.EMPTY_OBJECT);let m=p(n.radii,Rt),i=p(n.innerRadii,m),P=p(n.minimumClock,0),T=p(n.maximumClock,M.TWO_PI),A=p(n.minimumCone,0),b=p(n.maximumCone,M.PI),a=Math.round(p(n.stackPartitions,64)),u=Math.round(p(n.slicePartitions,64)),h=p(n.vertexFormat,k.DEFAULT);if(u<3)throw new z("options.slicePartitions cannot be less than three.");if(a<3)throw new z("options.stackPartitions cannot be less than three.");this._radii=s.clone(m),this._innerRadii=s.clone(i),this._minimumClock=P,this._maximumClock=T,this._minimumCone=A,this._maximumCone=b,this._stackPartitions=a,this._slicePartitions=u,this._vertexFormat=k.clone(h),this._offsetAttribute=n.offsetAttribute,this._workerName="createEllipsoidGeometry"}O.packedLength=2*s.packedLength+k.packedLength+7;O.pack=function(n,m,i){if(!E(n))throw new z("value is required");if(!E(m))throw new z("array is required");return i=p(i,0),s.pack(n._radii,m,i),i+=s.packedLength,s.pack(n._innerRadii,m,i),i+=s.packedLength,k.pack(n._vertexFormat,m,i),i+=k.packedLength,m[i++]=n._minimumClock,m[i++]=n._maximumClock,m[i++]=n._minimumCone,m[i++]=n._maximumCone,m[i++]=n._stackPartitions,m[i++]=n._slicePartitions,m[i]=p(n._offsetAttribute,-1),m};var bt=new s,xt=new s,Ot=new k,y={radii:bt,innerRadii:xt,vertexFormat:Ot,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};O.unpack=function(n,m,i){if(!E(n))throw new z("array is required");m=p(m,0);let P=s.unpack(n,m,bt);m+=s.packedLength;let T=s.unpack(n,m,xt);m+=s.packedLength;let A=k.unpack(n,m,Ot);m+=k.packedLength;let b=n[m++],a=n[m++],u=n[m++],h=n[m++],t=n[m++],o=n[m++],e=n[m];return E(i)?(i._radii=s.clone(P,i._radii),i._innerRadii=s.clone(T,i._innerRadii),i._vertexFormat=k.clone(A,i._vertexFormat),i._minimumClock=b,i._maximumClock=a,i._minimumCone=u,i._maximumCone=h,i._stackPartitions=t,i._slicePartitions=o,i._offsetAttribute=e===-1?void 0:e,i):(y.minimumClock=b,y.maximumClock=a,y.minimumCone=u,y.maximumCone=h,y.stackPartitions=t,y.slicePartitions=o,y.offsetAttribute=e===-1?void 0:e,new O(y))};O.createGeometry=function(n){let m=n._radii;if(m.x<=0||m.y<=0||m.z<=0)return;let i=n._innerRadii;if(i.x<=0||i.y<=0||i.z<=0)return;let P=n._minimumClock,T=n._maximumClock,A=n._minimumCone,b=n._maximumCone,a=n._vertexFormat,u=n._slicePartitions+1,h=n._stackPartitions+1;u=Math.round(u*Math.abs(T-P)/M.TWO_PI),h=Math.round(h*Math.abs(b-A)/M.PI),u<2&&(u=2),h<2&&(h=2);let t,o,e=0,D=[A],S=[P];for(t=0;t<h;t++)D.push(A+t*(b-A)/(h-1));for(D.push(b),o=0;o<u;o++)S.push(P+o*(T-P)/(u-1));S.push(T);let f=D.length,c=S.length,U=0,B=1,q=i.x!==m.x||i.y!==m.y||i.z!==m.z,J=!1,rt=!1,ct=!1;q&&(B=2,A>0&&(J=!0,U+=u-1),b<Math.PI&&(rt=!0,U+=u-1),(T-P)%M.TWO_PI?(ct=!0,U+=(h-1)*2+1):U+=1);let w=c*f*B,x=new Float64Array(w*3),X=new Array(w).fill(!1),st=new Array(w).fill(!1),at=u*h*B,Tt=6*(at+U+1-(u+h)*B),r=kt.createTypedArray(at,Tt),Y=a.normal?new Float32Array(w*3):void 0,j=a.tangent?new Float32Array(w*3):void 0,H=a.bitangent?new Float32Array(w*3):void 0,Z=a.st?new Float32Array(w*2):void 0,V=new Array(f),G=new Array(f);for(t=0;t<f;t++)V[t]=At(D[t]),G[t]=Pt(D[t]);let K=new Array(c),Q=new Array(c);for(o=0;o<c;o++)Q[o]=Pt(S[o]),K[o]=At(S[o]);for(t=0;t<f;t++)for(o=0;o<c;o++)x[e++]=m.x*V[t]*Q[o],x[e++]=m.y*V[t]*K[o],x[e++]=m.z*G[t];let $=w/2;if(q)for(t=0;t<f;t++)for(o=0;o<c;o++)x[e++]=i.x*V[t]*Q[o],x[e++]=i.y*V[t]*K[o],x[e++]=i.z*G[t],X[$]=!0,t>0&&t!==f-1&&o!==0&&o!==c-1&&(st[$]=!0),$++;e=0;let F,L;for(t=1;t<f-2;t++)for(F=t*c,L=(t+1)*c,o=1;o<c-2;o++)r[e++]=L+o,r[e++]=L+o+1,r[e++]=F+o+1,r[e++]=L+o,r[e++]=F+o+1,r[e++]=F+o;if(q){let g=f*c;for(t=1;t<f-2;t++)for(F=g+t*c,L=g+(t+1)*c,o=1;o<c-2;o++)r[e++]=L+o,r[e++]=F+o,r[e++]=F+o+1,r[e++]=L+o,r[e++]=F+o+1,r[e++]=L+o+1}let d,l;if(q){if(J)for(l=f*c,t=1;t<c-2;t++)r[e++]=t,r[e++]=t+1,r[e++]=l+t+1,r[e++]=t,r[e++]=l+t+1,r[e++]=l+t;if(rt)for(d=f*c-c,l=f*c*B-c,t=1;t<c-2;t++)r[e++]=d+t+1,r[e++]=d+t,r[e++]=l+t,r[e++]=d+t+1,r[e++]=l+t,r[e++]=l+t+1}if(ct){for(t=1;t<f-2;t++)l=c*f+c*t,d=c*t,r[e++]=l,r[e++]=d+c,r[e++]=d,r[e++]=l,r[e++]=l+c,r[e++]=d+c;for(t=1;t<f-2;t++)l=c*f+c*(t+1)-1,d=c*(t+1)-1,r[e++]=d+c,r[e++]=l,r[e++]=d,r[e++]=d+c,r[e++]=l+c,r[e++]=l}let v=new Ct;a.position&&(v.position=new R({componentDatatype:N.DOUBLE,componentsPerAttribute:3,values:x}));let ft=0,I=0,tt=0,nt=0,Ft=w/2,ut,lt=ot.fromCartesian3(m),Lt=ot.fromCartesian3(i);if(a.st||a.normal||a.tangent||a.bitangent){for(t=0;t<w;t++){ut=X[t]?Lt:lt;let g=s.fromArray(x,t*3,yt),C=ut.geodeticSurfaceNormal(g,vt);if(st[t]&&s.negate(C,C),a.st){let _=pt.negate(C,Nt);Z[ft++]=Math.atan2(_.y,_.x)/M.TWO_PI+.5,Z[ft++]=Math.asin(C.z)/Math.PI+.5}if(a.normal&&(Y[I++]=C.x,Y[I++]=C.y,Y[I++]=C.z),a.tangent||a.bitangent){let _=Et,et=0,it;if(X[t]&&(et=Ft),!J&&t>=et&&t<et+c*2?it=s.UNIT_X:it=s.UNIT_Z,s.cross(it,C,_),s.normalize(_,_),a.tangent&&(j[tt++]=_.x,j[tt++]=_.y,j[tt++]=_.z),a.bitangent){let W=s.cross(C,_,Mt);s.normalize(W,W),H[nt++]=W.x,H[nt++]=W.y,H[nt++]=W.z}}}a.st&&(v.st=new R({componentDatatype:N.FLOAT,componentsPerAttribute:2,values:Z})),a.normal&&(v.normal=new R({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:Y})),a.tangent&&(v.tangent=new R({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:j})),a.bitangent&&(v.bitangent=new R({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:H}))}if(E(n._offsetAttribute)){let g=x.length,C=n._offsetAttribute===wt.NONE?0:1,_=new Uint8Array(g/3).fill(C);v.applyOffset=new R({componentDatatype:N.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new _t({attributes:v,indices:r,primitiveType:dt.TRIANGLES,boundingSphere:ht.fromEllipsoid(lt),offsetAttribute:n._offsetAttribute})};var mt;O.getUnitEllipsoid=function(){return E(mt)||(mt=O.createGeometry(new O({radii:new s(1,1,1),vertexFormat:k.POSITION_ONLY}))),mt};var Kt=O;export{Kt as a}; +import{a as wt}from"./chunk-ILGBPNP6.js";import{a as k}from"./chunk-HEEMUCG6.js";import{a as kt}from"./chunk-P37AI2DW.js";import{a as Ct}from"./chunk-T6BE4RZK.js";import{b as dt,c as _t,d as R}from"./chunk-X5IHHI6X.js";import{d as ht}from"./chunk-TMSETF7M.js";import{a as N}from"./chunk-KZNJOCYU.js";import{a as s,c as pt,d as ot}from"./chunk-POASMU2N.js";import{a as M}from"./chunk-R6KGAEF6.js";import{a as p}from"./chunk-IUA6FAOZ.js";import{a as z}from"./chunk-UH2WFNTA.js";import{e as E}from"./chunk-PEYJTJPE.js";var yt=new s,vt=new s,Et=new s,Mt=new s,Nt=new s,Rt=new s(1,1,1),Pt=Math.cos,At=Math.sin;function O(n){n=p(n,p.EMPTY_OBJECT);let m=p(n.radii,Rt),i=p(n.innerRadii,m),P=p(n.minimumClock,0),T=p(n.maximumClock,M.TWO_PI),A=p(n.minimumCone,0),b=p(n.maximumCone,M.PI),a=Math.round(p(n.stackPartitions,64)),u=Math.round(p(n.slicePartitions,64)),h=p(n.vertexFormat,k.DEFAULT);if(u<3)throw new z("options.slicePartitions cannot be less than three.");if(a<3)throw new z("options.stackPartitions cannot be less than three.");this._radii=s.clone(m),this._innerRadii=s.clone(i),this._minimumClock=P,this._maximumClock=T,this._minimumCone=A,this._maximumCone=b,this._stackPartitions=a,this._slicePartitions=u,this._vertexFormat=k.clone(h),this._offsetAttribute=n.offsetAttribute,this._workerName="createEllipsoidGeometry"}O.packedLength=2*s.packedLength+k.packedLength+7;O.pack=function(n,m,i){if(!E(n))throw new z("value is required");if(!E(m))throw new z("array is required");return i=p(i,0),s.pack(n._radii,m,i),i+=s.packedLength,s.pack(n._innerRadii,m,i),i+=s.packedLength,k.pack(n._vertexFormat,m,i),i+=k.packedLength,m[i++]=n._minimumClock,m[i++]=n._maximumClock,m[i++]=n._minimumCone,m[i++]=n._maximumCone,m[i++]=n._stackPartitions,m[i++]=n._slicePartitions,m[i]=p(n._offsetAttribute,-1),m};var bt=new s,xt=new s,Ot=new k,y={radii:bt,innerRadii:xt,vertexFormat:Ot,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};O.unpack=function(n,m,i){if(!E(n))throw new z("array is required");m=p(m,0);let P=s.unpack(n,m,bt);m+=s.packedLength;let T=s.unpack(n,m,xt);m+=s.packedLength;let A=k.unpack(n,m,Ot);m+=k.packedLength;let b=n[m++],a=n[m++],u=n[m++],h=n[m++],t=n[m++],o=n[m++],e=n[m];return E(i)?(i._radii=s.clone(P,i._radii),i._innerRadii=s.clone(T,i._innerRadii),i._vertexFormat=k.clone(A,i._vertexFormat),i._minimumClock=b,i._maximumClock=a,i._minimumCone=u,i._maximumCone=h,i._stackPartitions=t,i._slicePartitions=o,i._offsetAttribute=e===-1?void 0:e,i):(y.minimumClock=b,y.maximumClock=a,y.minimumCone=u,y.maximumCone=h,y.stackPartitions=t,y.slicePartitions=o,y.offsetAttribute=e===-1?void 0:e,new O(y))};O.createGeometry=function(n){let m=n._radii;if(m.x<=0||m.y<=0||m.z<=0)return;let i=n._innerRadii;if(i.x<=0||i.y<=0||i.z<=0)return;let P=n._minimumClock,T=n._maximumClock,A=n._minimumCone,b=n._maximumCone,a=n._vertexFormat,u=n._slicePartitions+1,h=n._stackPartitions+1;u=Math.round(u*Math.abs(T-P)/M.TWO_PI),h=Math.round(h*Math.abs(b-A)/M.PI),u<2&&(u=2),h<2&&(h=2);let t,o,e=0,D=[A],S=[P];for(t=0;t<h;t++)D.push(A+t*(b-A)/(h-1));for(D.push(b),o=0;o<u;o++)S.push(P+o*(T-P)/(u-1));S.push(T);let f=D.length,c=S.length,U=0,B=1,q=i.x!==m.x||i.y!==m.y||i.z!==m.z,J=!1,rt=!1,ct=!1;q&&(B=2,A>0&&(J=!0,U+=u-1),b<Math.PI&&(rt=!0,U+=u-1),(T-P)%M.TWO_PI?(ct=!0,U+=(h-1)*2+1):U+=1);let w=c*f*B,x=new Float64Array(w*3),X=new Array(w).fill(!1),st=new Array(w).fill(!1),at=u*h*B,Tt=6*(at+U+1-(u+h)*B),r=kt.createTypedArray(at,Tt),Y=a.normal?new Float32Array(w*3):void 0,j=a.tangent?new Float32Array(w*3):void 0,H=a.bitangent?new Float32Array(w*3):void 0,Z=a.st?new Float32Array(w*2):void 0,V=new Array(f),G=new Array(f);for(t=0;t<f;t++)V[t]=At(D[t]),G[t]=Pt(D[t]);let K=new Array(c),Q=new Array(c);for(o=0;o<c;o++)Q[o]=Pt(S[o]),K[o]=At(S[o]);for(t=0;t<f;t++)for(o=0;o<c;o++)x[e++]=m.x*V[t]*Q[o],x[e++]=m.y*V[t]*K[o],x[e++]=m.z*G[t];let $=w/2;if(q)for(t=0;t<f;t++)for(o=0;o<c;o++)x[e++]=i.x*V[t]*Q[o],x[e++]=i.y*V[t]*K[o],x[e++]=i.z*G[t],X[$]=!0,t>0&&t!==f-1&&o!==0&&o!==c-1&&(st[$]=!0),$++;e=0;let F,L;for(t=1;t<f-2;t++)for(F=t*c,L=(t+1)*c,o=1;o<c-2;o++)r[e++]=L+o,r[e++]=L+o+1,r[e++]=F+o+1,r[e++]=L+o,r[e++]=F+o+1,r[e++]=F+o;if(q){let g=f*c;for(t=1;t<f-2;t++)for(F=g+t*c,L=g+(t+1)*c,o=1;o<c-2;o++)r[e++]=L+o,r[e++]=F+o,r[e++]=F+o+1,r[e++]=L+o,r[e++]=F+o+1,r[e++]=L+o+1}let d,l;if(q){if(J)for(l=f*c,t=1;t<c-2;t++)r[e++]=t,r[e++]=t+1,r[e++]=l+t+1,r[e++]=t,r[e++]=l+t+1,r[e++]=l+t;if(rt)for(d=f*c-c,l=f*c*B-c,t=1;t<c-2;t++)r[e++]=d+t+1,r[e++]=d+t,r[e++]=l+t,r[e++]=d+t+1,r[e++]=l+t,r[e++]=l+t+1}if(ct){for(t=1;t<f-2;t++)l=c*f+c*t,d=c*t,r[e++]=l,r[e++]=d+c,r[e++]=d,r[e++]=l,r[e++]=l+c,r[e++]=d+c;for(t=1;t<f-2;t++)l=c*f+c*(t+1)-1,d=c*(t+1)-1,r[e++]=d+c,r[e++]=l,r[e++]=d,r[e++]=d+c,r[e++]=l+c,r[e++]=l}let v=new Ct;a.position&&(v.position=new R({componentDatatype:N.DOUBLE,componentsPerAttribute:3,values:x}));let ft=0,I=0,tt=0,nt=0,Ft=w/2,ut,lt=ot.fromCartesian3(m),Lt=ot.fromCartesian3(i);if(a.st||a.normal||a.tangent||a.bitangent){for(t=0;t<w;t++){ut=X[t]?Lt:lt;let g=s.fromArray(x,t*3,yt),C=ut.geodeticSurfaceNormal(g,vt);if(st[t]&&s.negate(C,C),a.st){let _=pt.negate(C,Nt);Z[ft++]=Math.atan2(_.y,_.x)/M.TWO_PI+.5,Z[ft++]=Math.asin(C.z)/Math.PI+.5}if(a.normal&&(Y[I++]=C.x,Y[I++]=C.y,Y[I++]=C.z),a.tangent||a.bitangent){let _=Et,et=0,it;if(X[t]&&(et=Ft),!J&&t>=et&&t<et+c*2?it=s.UNIT_X:it=s.UNIT_Z,s.cross(it,C,_),s.normalize(_,_),a.tangent&&(j[tt++]=_.x,j[tt++]=_.y,j[tt++]=_.z),a.bitangent){let W=s.cross(C,_,Mt);s.normalize(W,W),H[nt++]=W.x,H[nt++]=W.y,H[nt++]=W.z}}}a.st&&(v.st=new R({componentDatatype:N.FLOAT,componentsPerAttribute:2,values:Z})),a.normal&&(v.normal=new R({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:Y})),a.tangent&&(v.tangent=new R({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:j})),a.bitangent&&(v.bitangent=new R({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:H}))}if(E(n._offsetAttribute)){let g=x.length,C=n._offsetAttribute===wt.NONE?0:1,_=new Uint8Array(g/3).fill(C);v.applyOffset=new R({componentDatatype:N.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new _t({attributes:v,indices:r,primitiveType:dt.TRIANGLES,boundingSphere:ht.fromEllipsoid(lt),offsetAttribute:n._offsetAttribute})};var mt;O.getUnitEllipsoid=function(){return E(mt)||(mt=O.createGeometry(new O({radii:new s(1,1,1),vertexFormat:k.POSITION_ONLY}))),mt};var Kt=O;export{Kt as a}; diff --git a/cesium/Workers/chunk-5YVCOCPP.js b/cesium/Workers/chunk-UH2WFNTA.js similarity index 97% rename from cesium/Workers/chunk-5YVCOCPP.js rename to cesium/Workers/chunk-UH2WFNTA.js index ad18def..3db28fc 100644 --- a/cesium/Workers/chunk-5YVCOCPP.js +++ b/cesium/Workers/chunk-UH2WFNTA.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,5 +23,5 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{e as u}from"./chunk-U73D6PDD.js";function f(t){this.name="DeveloperError",this.message=t;let e;try{throw new Error}catch(o){e=o.stack}this.stack=e}u(Object.create)&&(f.prototype=Object.create(Error.prototype),f.prototype.constructor=f);f.prototype.toString=function(){let t=`${this.name}: ${this.message}`;return u(this.stack)&&(t+=` +import{e as u}from"./chunk-PEYJTJPE.js";function f(t){this.name="DeveloperError",this.message=t;let e;try{throw new Error}catch(o){e=o.stack}this.stack=e}u(Object.create)&&(f.prototype=Object.create(Error.prototype),f.prototype.constructor=f);f.prototype.toString=function(){let t=`${this.name}: ${this.message}`;return u(this.stack)&&(t+=` ${this.stack.toString()}`),t};f.throwInstantiationError=function(){throw new f("This function defines an interface and should not be called directly.")};var r=f;var n={};n.typeOf={};function c(t){return`${t} is required, actual value was undefined`}function a(t,e,o){return`Expected ${o} to be typeof ${e}, actual typeof was ${t}`}n.defined=function(t,e){if(!u(e))throw new r(c(t))};n.typeOf.func=function(t,e){if(typeof e!="function")throw new r(a(typeof e,"function",t))};n.typeOf.string=function(t,e){if(typeof e!="string")throw new r(a(typeof e,"string",t))};n.typeOf.number=function(t,e){if(typeof e!="number")throw new r(a(typeof e,"number",t))};n.typeOf.number.lessThan=function(t,e,o){if(n.typeOf.number(t,e),e>=o)throw new r(`Expected ${t} to be less than ${o}, actual value was ${e}`)};n.typeOf.number.lessThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e>o)throw new r(`Expected ${t} to be less than or equal to ${o}, actual value was ${e}`)};n.typeOf.number.greaterThan=function(t,e,o){if(n.typeOf.number(t,e),e<=o)throw new r(`Expected ${t} to be greater than ${o}, actual value was ${e}`)};n.typeOf.number.greaterThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e<o)throw new r(`Expected ${t} to be greater than or equal to ${o}, actual value was ${e}`)};n.typeOf.object=function(t,e){if(typeof e!="object")throw new r(a(typeof e,"object",t))};n.typeOf.bool=function(t,e){if(typeof e!="boolean")throw new r(a(typeof e,"boolean",t))};n.typeOf.bigint=function(t,e){if(typeof e!="bigint")throw new r(a(typeof e,"bigint",t))};n.typeOf.number.equals=function(t,e,o,i){if(n.typeOf.number(t,o),n.typeOf.number(e,i),o!==i)throw new r(`${t} must be equal to ${e}, the actual values are ${o} and ${i}`)};var l=n;export{r as a,l as b}; diff --git a/cesium/Workers/chunk-L5JEMK3W.js b/cesium/Workers/chunk-V7JEDBOE.js similarity index 98% rename from cesium/Workers/chunk-L5JEMK3W.js rename to cesium/Workers/chunk-V7JEDBOE.js index 3c70fa3..c9f102e 100644 --- a/cesium/Workers/chunk-L5JEMK3W.js +++ b/cesium/Workers/chunk-V7JEDBOE.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{f as j}from"./chunk-LJCGAQ64.js";import{a as E}from"./chunk-JFG572S7.js";import{a as C}from"./chunk-42NIXFVW.js";import{b as n}from"./chunk-5YVCOCPP.js";import{e as O}from"./chunk-U73D6PDD.js";function l(r,o,t){return t<0&&(t+=1),t>1&&(t-=1),t*6<1?r+(o-r)*6*t:t*2<1?o:t*3<2?r+(o-r)*(2/3-t)*6:r}function e(r,o,t,f){this.red=C(r,1),this.green=C(o,1),this.blue=C(t,1),this.alpha=C(f,1)}e.fromCartesian4=function(r,o){return n.typeOf.object("cartesian",r),O(o)?(o.red=r.x,o.green=r.y,o.blue=r.z,o.alpha=r.w,o):new e(r.x,r.y,r.z,r.w)};e.fromBytes=function(r,o,t,f,s){return r=e.byteToFloat(C(r,255)),o=e.byteToFloat(C(o,255)),t=e.byteToFloat(C(t,255)),f=e.byteToFloat(C(f,255)),O(s)?(s.red=r,s.green=o,s.blue=t,s.alpha=f,s):new e(r,o,t,f)};e.fromAlpha=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("alpha",o),O(t)?(t.red=r.red,t.green=r.green,t.blue=r.blue,t.alpha=o,t):new e(r.red,r.green,r.blue,o)};var A,g,m;j.supportsTypedArrays()&&(A=new ArrayBuffer(4),g=new Uint32Array(A),m=new Uint8Array(A));e.fromRgba=function(r,o){return g[0]=r,e.fromBytes(m[0],m[1],m[2],m[3],o)};e.fromHsl=function(r,o,t,f,s){r=C(r,0)%1,o=C(o,0),t=C(t,0),f=C(f,1);let c=t,b=t,i=t;if(o!==0){let S;t<.5?S=t*(1+o):S=t+o-t*o;let F=2*t-S;c=l(F,S,r+1/3),b=l(F,S,r),i=l(F,S,r-1/3)}return O(s)?(s.red=c,s.green=b,s.blue=i,s.alpha=f,s):new e(c,b,i,f)};e.fromRandom=function(r,o){r=C(r,C.EMPTY_OBJECT);let t=r.red;if(!O(t)){let b=C(r.minimumRed,0),i=C(r.maximumRed,1);n.typeOf.number.lessThanOrEquals("minimumRed",b,i),t=b+E.nextRandomNumber()*(i-b)}let f=r.green;if(!O(f)){let b=C(r.minimumGreen,0),i=C(r.maximumGreen,1);n.typeOf.number.lessThanOrEquals("minimumGreen",b,i),f=b+E.nextRandomNumber()*(i-b)}let s=r.blue;if(!O(s)){let b=C(r.minimumBlue,0),i=C(r.maximumBlue,1);n.typeOf.number.lessThanOrEquals("minimumBlue",b,i),s=b+E.nextRandomNumber()*(i-b)}let c=r.alpha;if(!O(c)){let b=C(r.minimumAlpha,0),i=C(r.maximumAlpha,1);n.typeOf.number.lessThanOrEquals("minumumAlpha",b,i),c=b+E.nextRandomNumber()*(i-b)}return O(o)?(o.red=t,o.green=f,o.blue=s,o.alpha=c,o):new e(t,f,s,c)};var a=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,z=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,p=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,R=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;e.fromCssColorString=function(r,o){n.typeOf.string("color",r),O(o)||(o=new e),r=r.trim();let t=e[r.toUpperCase()];if(O(t))return e.clone(t,o),o;let f=a.exec(r);return f!==null?(o.red=parseInt(f[1],16)/15,o.green=parseInt(f[2],16)/15,o.blue=parseInt(f[3],16)/15,o.alpha=parseInt(C(f[4],"f"),16)/15,o):(f=z.exec(r),f!==null?(o.red=parseInt(f[1],16)/255,o.green=parseInt(f[2],16)/255,o.blue=parseInt(f[3],16)/255,o.alpha=parseInt(C(f[4],"ff"),16)/255,o):(f=p.exec(r),f!==null?(o.red=parseFloat(f[1])/(f[1].substr(-1)==="%"?100:255),o.green=parseFloat(f[2])/(f[2].substr(-1)==="%"?100:255),o.blue=parseFloat(f[3])/(f[3].substr(-1)==="%"?100:255),o.alpha=parseFloat(C(f[4],"1.0")),o):(f=R.exec(r),f!==null?e.fromHsl(parseFloat(f[1])/360,parseFloat(f[2])/100,parseFloat(f[3])/100,parseFloat(C(f[4],"1.0")),o):(o=void 0,o))))};e.packedLength=4;e.pack=function(r,o,t){return n.typeOf.object("value",r),n.defined("array",o),t=C(t,0),o[t++]=r.red,o[t++]=r.green,o[t++]=r.blue,o[t]=r.alpha,o};e.unpack=function(r,o,t){return n.defined("array",r),o=C(o,0),O(t)||(t=new e),t.red=r[o++],t.green=r[o++],t.blue=r[o++],t.alpha=r[o],t};e.byteToFloat=function(r){return r/255};e.floatToByte=function(r){return r===1?255:r*256|0};e.clone=function(r,o){if(O(r))return O(o)?(o.red=r.red,o.green=r.green,o.blue=r.blue,o.alpha=r.alpha,o):new e(r.red,r.green,r.blue,r.alpha)};e.equals=function(r,o){return r===o||O(r)&&O(o)&&r.red===o.red&&r.green===o.green&&r.blue===o.blue&&r.alpha===o.alpha};e.equalsArray=function(r,o,t){return r.red===o[t]&&r.green===o[t+1]&&r.blue===o[t+2]&&r.alpha===o[t+3]};e.prototype.clone=function(r){return e.clone(this,r)};e.prototype.equals=function(r){return e.equals(this,r)};e.prototype.equalsEpsilon=function(r,o){return this===r||O(r)&&Math.abs(this.red-r.red)<=o&&Math.abs(this.green-r.green)<=o&&Math.abs(this.blue-r.blue)<=o&&Math.abs(this.alpha-r.alpha)<=o};e.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};e.prototype.toCssColorString=function(){let r=e.floatToByte(this.red),o=e.floatToByte(this.green),t=e.floatToByte(this.blue);return this.alpha===1?`rgb(${r},${o},${t})`:`rgba(${r},${o},${t},${this.alpha})`};e.prototype.toCssHexString=function(){let r=e.floatToByte(this.red).toString(16);r.length<2&&(r=`0${r}`);let o=e.floatToByte(this.green).toString(16);o.length<2&&(o=`0${o}`);let t=e.floatToByte(this.blue).toString(16);if(t.length<2&&(t=`0${t}`),this.alpha<1){let f=e.floatToByte(this.alpha).toString(16);return f.length<2&&(f=`0${f}`),`#${r}${o}${t}${f}`}return`#${r}${o}${t}`};e.prototype.toBytes=function(r){let o=e.floatToByte(this.red),t=e.floatToByte(this.green),f=e.floatToByte(this.blue),s=e.floatToByte(this.alpha);return O(r)?(r[0]=o,r[1]=t,r[2]=f,r[3]=s,r):[o,t,f,s]};e.prototype.toRgba=function(){return m[0]=e.floatToByte(this.red),m[1]=e.floatToByte(this.green),m[2]=e.floatToByte(this.blue),m[3]=e.floatToByte(this.alpha),g[0]};e.prototype.brighten=function(r,o){return n.typeOf.number("magnitude",r),n.typeOf.number.greaterThanOrEquals("magnitude",r,0),n.typeOf.object("result",o),r=1-r,o.red=1-(1-this.red)*r,o.green=1-(1-this.green)*r,o.blue=1-(1-this.blue)*r,o.alpha=this.alpha,o};e.prototype.darken=function(r,o){return n.typeOf.number("magnitude",r),n.typeOf.number.greaterThanOrEquals("magnitude",r,0),n.typeOf.object("result",o),r=1-r,o.red=this.red*r,o.green=this.green*r,o.blue=this.blue*r,o.alpha=this.alpha,o};e.prototype.withAlpha=function(r,o){return e.fromAlpha(this,r,o)};e.add=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red+o.red,t.green=r.green+o.green,t.blue=r.blue+o.blue,t.alpha=r.alpha+o.alpha,t};e.subtract=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red-o.red,t.green=r.green-o.green,t.blue=r.blue-o.blue,t.alpha=r.alpha-o.alpha,t};e.multiply=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red*o.red,t.green=r.green*o.green,t.blue=r.blue*o.blue,t.alpha=r.alpha*o.alpha,t};e.divide=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red/o.red,t.green=r.green/o.green,t.blue=r.blue/o.blue,t.alpha=r.alpha/o.alpha,t};e.mod=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red%o.red,t.green=r.green%o.green,t.blue=r.blue%o.blue,t.alpha=r.alpha%o.alpha,t};e.lerp=function(r,o,t,f){return n.typeOf.object("start",r),n.typeOf.object("end",o),n.typeOf.number("t",t),n.typeOf.object("result",f),f.red=E.lerp(r.red,o.red,t),f.green=E.lerp(r.green,o.green,t),f.blue=E.lerp(r.blue,o.blue,t),f.alpha=E.lerp(r.alpha,o.alpha,t),f};e.multiplyByScalar=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("scalar",o),n.typeOf.object("result",t),t.red=r.red*o,t.green=r.green*o,t.blue=r.blue*o,t.alpha=r.alpha*o,t};e.divideByScalar=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("scalar",o),n.typeOf.object("result",t),t.red=r.red/o,t.green=r.green/o,t.blue=r.blue/o,t.alpha=r.alpha/o,t};e.ALICEBLUE=Object.freeze(e.fromCssColorString("#F0F8FF"));e.ANTIQUEWHITE=Object.freeze(e.fromCssColorString("#FAEBD7"));e.AQUA=Object.freeze(e.fromCssColorString("#00FFFF"));e.AQUAMARINE=Object.freeze(e.fromCssColorString("#7FFFD4"));e.AZURE=Object.freeze(e.fromCssColorString("#F0FFFF"));e.BEIGE=Object.freeze(e.fromCssColorString("#F5F5DC"));e.BISQUE=Object.freeze(e.fromCssColorString("#FFE4C4"));e.BLACK=Object.freeze(e.fromCssColorString("#000000"));e.BLANCHEDALMOND=Object.freeze(e.fromCssColorString("#FFEBCD"));e.BLUE=Object.freeze(e.fromCssColorString("#0000FF"));e.BLUEVIOLET=Object.freeze(e.fromCssColorString("#8A2BE2"));e.BROWN=Object.freeze(e.fromCssColorString("#A52A2A"));e.BURLYWOOD=Object.freeze(e.fromCssColorString("#DEB887"));e.CADETBLUE=Object.freeze(e.fromCssColorString("#5F9EA0"));e.CHARTREUSE=Object.freeze(e.fromCssColorString("#7FFF00"));e.CHOCOLATE=Object.freeze(e.fromCssColorString("#D2691E"));e.CORAL=Object.freeze(e.fromCssColorString("#FF7F50"));e.CORNFLOWERBLUE=Object.freeze(e.fromCssColorString("#6495ED"));e.CORNSILK=Object.freeze(e.fromCssColorString("#FFF8DC"));e.CRIMSON=Object.freeze(e.fromCssColorString("#DC143C"));e.CYAN=Object.freeze(e.fromCssColorString("#00FFFF"));e.DARKBLUE=Object.freeze(e.fromCssColorString("#00008B"));e.DARKCYAN=Object.freeze(e.fromCssColorString("#008B8B"));e.DARKGOLDENROD=Object.freeze(e.fromCssColorString("#B8860B"));e.DARKGRAY=Object.freeze(e.fromCssColorString("#A9A9A9"));e.DARKGREEN=Object.freeze(e.fromCssColorString("#006400"));e.DARKGREY=e.DARKGRAY;e.DARKKHAKI=Object.freeze(e.fromCssColorString("#BDB76B"));e.DARKMAGENTA=Object.freeze(e.fromCssColorString("#8B008B"));e.DARKOLIVEGREEN=Object.freeze(e.fromCssColorString("#556B2F"));e.DARKORANGE=Object.freeze(e.fromCssColorString("#FF8C00"));e.DARKORCHID=Object.freeze(e.fromCssColorString("#9932CC"));e.DARKRED=Object.freeze(e.fromCssColorString("#8B0000"));e.DARKSALMON=Object.freeze(e.fromCssColorString("#E9967A"));e.DARKSEAGREEN=Object.freeze(e.fromCssColorString("#8FBC8F"));e.DARKSLATEBLUE=Object.freeze(e.fromCssColorString("#483D8B"));e.DARKSLATEGRAY=Object.freeze(e.fromCssColorString("#2F4F4F"));e.DARKSLATEGREY=e.DARKSLATEGRAY;e.DARKTURQUOISE=Object.freeze(e.fromCssColorString("#00CED1"));e.DARKVIOLET=Object.freeze(e.fromCssColorString("#9400D3"));e.DEEPPINK=Object.freeze(e.fromCssColorString("#FF1493"));e.DEEPSKYBLUE=Object.freeze(e.fromCssColorString("#00BFFF"));e.DIMGRAY=Object.freeze(e.fromCssColorString("#696969"));e.DIMGREY=e.DIMGRAY;e.DODGERBLUE=Object.freeze(e.fromCssColorString("#1E90FF"));e.FIREBRICK=Object.freeze(e.fromCssColorString("#B22222"));e.FLORALWHITE=Object.freeze(e.fromCssColorString("#FFFAF0"));e.FORESTGREEN=Object.freeze(e.fromCssColorString("#228B22"));e.FUCHSIA=Object.freeze(e.fromCssColorString("#FF00FF"));e.GAINSBORO=Object.freeze(e.fromCssColorString("#DCDCDC"));e.GHOSTWHITE=Object.freeze(e.fromCssColorString("#F8F8FF"));e.GOLD=Object.freeze(e.fromCssColorString("#FFD700"));e.GOLDENROD=Object.freeze(e.fromCssColorString("#DAA520"));e.GRAY=Object.freeze(e.fromCssColorString("#808080"));e.GREEN=Object.freeze(e.fromCssColorString("#008000"));e.GREENYELLOW=Object.freeze(e.fromCssColorString("#ADFF2F"));e.GREY=e.GRAY;e.HONEYDEW=Object.freeze(e.fromCssColorString("#F0FFF0"));e.HOTPINK=Object.freeze(e.fromCssColorString("#FF69B4"));e.INDIANRED=Object.freeze(e.fromCssColorString("#CD5C5C"));e.INDIGO=Object.freeze(e.fromCssColorString("#4B0082"));e.IVORY=Object.freeze(e.fromCssColorString("#FFFFF0"));e.KHAKI=Object.freeze(e.fromCssColorString("#F0E68C"));e.LAVENDER=Object.freeze(e.fromCssColorString("#E6E6FA"));e.LAVENDAR_BLUSH=Object.freeze(e.fromCssColorString("#FFF0F5"));e.LAWNGREEN=Object.freeze(e.fromCssColorString("#7CFC00"));e.LEMONCHIFFON=Object.freeze(e.fromCssColorString("#FFFACD"));e.LIGHTBLUE=Object.freeze(e.fromCssColorString("#ADD8E6"));e.LIGHTCORAL=Object.freeze(e.fromCssColorString("#F08080"));e.LIGHTCYAN=Object.freeze(e.fromCssColorString("#E0FFFF"));e.LIGHTGOLDENRODYELLOW=Object.freeze(e.fromCssColorString("#FAFAD2"));e.LIGHTGRAY=Object.freeze(e.fromCssColorString("#D3D3D3"));e.LIGHTGREEN=Object.freeze(e.fromCssColorString("#90EE90"));e.LIGHTGREY=e.LIGHTGRAY;e.LIGHTPINK=Object.freeze(e.fromCssColorString("#FFB6C1"));e.LIGHTSEAGREEN=Object.freeze(e.fromCssColorString("#20B2AA"));e.LIGHTSKYBLUE=Object.freeze(e.fromCssColorString("#87CEFA"));e.LIGHTSLATEGRAY=Object.freeze(e.fromCssColorString("#778899"));e.LIGHTSLATEGREY=e.LIGHTSLATEGRAY;e.LIGHTSTEELBLUE=Object.freeze(e.fromCssColorString("#B0C4DE"));e.LIGHTYELLOW=Object.freeze(e.fromCssColorString("#FFFFE0"));e.LIME=Object.freeze(e.fromCssColorString("#00FF00"));e.LIMEGREEN=Object.freeze(e.fromCssColorString("#32CD32"));e.LINEN=Object.freeze(e.fromCssColorString("#FAF0E6"));e.MAGENTA=Object.freeze(e.fromCssColorString("#FF00FF"));e.MAROON=Object.freeze(e.fromCssColorString("#800000"));e.MEDIUMAQUAMARINE=Object.freeze(e.fromCssColorString("#66CDAA"));e.MEDIUMBLUE=Object.freeze(e.fromCssColorString("#0000CD"));e.MEDIUMORCHID=Object.freeze(e.fromCssColorString("#BA55D3"));e.MEDIUMPURPLE=Object.freeze(e.fromCssColorString("#9370DB"));e.MEDIUMSEAGREEN=Object.freeze(e.fromCssColorString("#3CB371"));e.MEDIUMSLATEBLUE=Object.freeze(e.fromCssColorString("#7B68EE"));e.MEDIUMSPRINGGREEN=Object.freeze(e.fromCssColorString("#00FA9A"));e.MEDIUMTURQUOISE=Object.freeze(e.fromCssColorString("#48D1CC"));e.MEDIUMVIOLETRED=Object.freeze(e.fromCssColorString("#C71585"));e.MIDNIGHTBLUE=Object.freeze(e.fromCssColorString("#191970"));e.MINTCREAM=Object.freeze(e.fromCssColorString("#F5FFFA"));e.MISTYROSE=Object.freeze(e.fromCssColorString("#FFE4E1"));e.MOCCASIN=Object.freeze(e.fromCssColorString("#FFE4B5"));e.NAVAJOWHITE=Object.freeze(e.fromCssColorString("#FFDEAD"));e.NAVY=Object.freeze(e.fromCssColorString("#000080"));e.OLDLACE=Object.freeze(e.fromCssColorString("#FDF5E6"));e.OLIVE=Object.freeze(e.fromCssColorString("#808000"));e.OLIVEDRAB=Object.freeze(e.fromCssColorString("#6B8E23"));e.ORANGE=Object.freeze(e.fromCssColorString("#FFA500"));e.ORANGERED=Object.freeze(e.fromCssColorString("#FF4500"));e.ORCHID=Object.freeze(e.fromCssColorString("#DA70D6"));e.PALEGOLDENROD=Object.freeze(e.fromCssColorString("#EEE8AA"));e.PALEGREEN=Object.freeze(e.fromCssColorString("#98FB98"));e.PALETURQUOISE=Object.freeze(e.fromCssColorString("#AFEEEE"));e.PALEVIOLETRED=Object.freeze(e.fromCssColorString("#DB7093"));e.PAPAYAWHIP=Object.freeze(e.fromCssColorString("#FFEFD5"));e.PEACHPUFF=Object.freeze(e.fromCssColorString("#FFDAB9"));e.PERU=Object.freeze(e.fromCssColorString("#CD853F"));e.PINK=Object.freeze(e.fromCssColorString("#FFC0CB"));e.PLUM=Object.freeze(e.fromCssColorString("#DDA0DD"));e.POWDERBLUE=Object.freeze(e.fromCssColorString("#B0E0E6"));e.PURPLE=Object.freeze(e.fromCssColorString("#800080"));e.RED=Object.freeze(e.fromCssColorString("#FF0000"));e.ROSYBROWN=Object.freeze(e.fromCssColorString("#BC8F8F"));e.ROYALBLUE=Object.freeze(e.fromCssColorString("#4169E1"));e.SADDLEBROWN=Object.freeze(e.fromCssColorString("#8B4513"));e.SALMON=Object.freeze(e.fromCssColorString("#FA8072"));e.SANDYBROWN=Object.freeze(e.fromCssColorString("#F4A460"));e.SEAGREEN=Object.freeze(e.fromCssColorString("#2E8B57"));e.SEASHELL=Object.freeze(e.fromCssColorString("#FFF5EE"));e.SIENNA=Object.freeze(e.fromCssColorString("#A0522D"));e.SILVER=Object.freeze(e.fromCssColorString("#C0C0C0"));e.SKYBLUE=Object.freeze(e.fromCssColorString("#87CEEB"));e.SLATEBLUE=Object.freeze(e.fromCssColorString("#6A5ACD"));e.SLATEGRAY=Object.freeze(e.fromCssColorString("#708090"));e.SLATEGREY=e.SLATEGRAY;e.SNOW=Object.freeze(e.fromCssColorString("#FFFAFA"));e.SPRINGGREEN=Object.freeze(e.fromCssColorString("#00FF7F"));e.STEELBLUE=Object.freeze(e.fromCssColorString("#4682B4"));e.TAN=Object.freeze(e.fromCssColorString("#D2B48C"));e.TEAL=Object.freeze(e.fromCssColorString("#008080"));e.THISTLE=Object.freeze(e.fromCssColorString("#D8BFD8"));e.TOMATO=Object.freeze(e.fromCssColorString("#FF6347"));e.TURQUOISE=Object.freeze(e.fromCssColorString("#40E0D0"));e.VIOLET=Object.freeze(e.fromCssColorString("#EE82EE"));e.WHEAT=Object.freeze(e.fromCssColorString("#F5DEB3"));e.WHITE=Object.freeze(e.fromCssColorString("#FFFFFF"));e.WHITESMOKE=Object.freeze(e.fromCssColorString("#F5F5F5"));e.YELLOW=Object.freeze(e.fromCssColorString("#FFFF00"));e.YELLOWGREEN=Object.freeze(e.fromCssColorString("#9ACD32"));e.TRANSPARENT=Object.freeze(new e(0,0,0,0));var h=e;export{h as a}; +import{f as j}from"./chunk-POASMU2N.js";import{a as E}from"./chunk-R6KGAEF6.js";import{a as C}from"./chunk-IUA6FAOZ.js";import{b as n}from"./chunk-UH2WFNTA.js";import{e as O}from"./chunk-PEYJTJPE.js";function l(r,o,t){return t<0&&(t+=1),t>1&&(t-=1),t*6<1?r+(o-r)*6*t:t*2<1?o:t*3<2?r+(o-r)*(2/3-t)*6:r}function e(r,o,t,f){this.red=C(r,1),this.green=C(o,1),this.blue=C(t,1),this.alpha=C(f,1)}e.fromCartesian4=function(r,o){return n.typeOf.object("cartesian",r),O(o)?(o.red=r.x,o.green=r.y,o.blue=r.z,o.alpha=r.w,o):new e(r.x,r.y,r.z,r.w)};e.fromBytes=function(r,o,t,f,s){return r=e.byteToFloat(C(r,255)),o=e.byteToFloat(C(o,255)),t=e.byteToFloat(C(t,255)),f=e.byteToFloat(C(f,255)),O(s)?(s.red=r,s.green=o,s.blue=t,s.alpha=f,s):new e(r,o,t,f)};e.fromAlpha=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("alpha",o),O(t)?(t.red=r.red,t.green=r.green,t.blue=r.blue,t.alpha=o,t):new e(r.red,r.green,r.blue,o)};var A,g,m;j.supportsTypedArrays()&&(A=new ArrayBuffer(4),g=new Uint32Array(A),m=new Uint8Array(A));e.fromRgba=function(r,o){return g[0]=r,e.fromBytes(m[0],m[1],m[2],m[3],o)};e.fromHsl=function(r,o,t,f,s){r=C(r,0)%1,o=C(o,0),t=C(t,0),f=C(f,1);let c=t,b=t,i=t;if(o!==0){let S;t<.5?S=t*(1+o):S=t+o-t*o;let F=2*t-S;c=l(F,S,r+1/3),b=l(F,S,r),i=l(F,S,r-1/3)}return O(s)?(s.red=c,s.green=b,s.blue=i,s.alpha=f,s):new e(c,b,i,f)};e.fromRandom=function(r,o){r=C(r,C.EMPTY_OBJECT);let t=r.red;if(!O(t)){let b=C(r.minimumRed,0),i=C(r.maximumRed,1);n.typeOf.number.lessThanOrEquals("minimumRed",b,i),t=b+E.nextRandomNumber()*(i-b)}let f=r.green;if(!O(f)){let b=C(r.minimumGreen,0),i=C(r.maximumGreen,1);n.typeOf.number.lessThanOrEquals("minimumGreen",b,i),f=b+E.nextRandomNumber()*(i-b)}let s=r.blue;if(!O(s)){let b=C(r.minimumBlue,0),i=C(r.maximumBlue,1);n.typeOf.number.lessThanOrEquals("minimumBlue",b,i),s=b+E.nextRandomNumber()*(i-b)}let c=r.alpha;if(!O(c)){let b=C(r.minimumAlpha,0),i=C(r.maximumAlpha,1);n.typeOf.number.lessThanOrEquals("minumumAlpha",b,i),c=b+E.nextRandomNumber()*(i-b)}return O(o)?(o.red=t,o.green=f,o.blue=s,o.alpha=c,o):new e(t,f,s,c)};var a=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,z=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,p=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,R=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;e.fromCssColorString=function(r,o){n.typeOf.string("color",r),O(o)||(o=new e),r=r.trim();let t=e[r.toUpperCase()];if(O(t))return e.clone(t,o),o;let f=a.exec(r);return f!==null?(o.red=parseInt(f[1],16)/15,o.green=parseInt(f[2],16)/15,o.blue=parseInt(f[3],16)/15,o.alpha=parseInt(C(f[4],"f"),16)/15,o):(f=z.exec(r),f!==null?(o.red=parseInt(f[1],16)/255,o.green=parseInt(f[2],16)/255,o.blue=parseInt(f[3],16)/255,o.alpha=parseInt(C(f[4],"ff"),16)/255,o):(f=p.exec(r),f!==null?(o.red=parseFloat(f[1])/(f[1].substr(-1)==="%"?100:255),o.green=parseFloat(f[2])/(f[2].substr(-1)==="%"?100:255),o.blue=parseFloat(f[3])/(f[3].substr(-1)==="%"?100:255),o.alpha=parseFloat(C(f[4],"1.0")),o):(f=R.exec(r),f!==null?e.fromHsl(parseFloat(f[1])/360,parseFloat(f[2])/100,parseFloat(f[3])/100,parseFloat(C(f[4],"1.0")),o):(o=void 0,o))))};e.packedLength=4;e.pack=function(r,o,t){return n.typeOf.object("value",r),n.defined("array",o),t=C(t,0),o[t++]=r.red,o[t++]=r.green,o[t++]=r.blue,o[t]=r.alpha,o};e.unpack=function(r,o,t){return n.defined("array",r),o=C(o,0),O(t)||(t=new e),t.red=r[o++],t.green=r[o++],t.blue=r[o++],t.alpha=r[o],t};e.byteToFloat=function(r){return r/255};e.floatToByte=function(r){return r===1?255:r*256|0};e.clone=function(r,o){if(O(r))return O(o)?(o.red=r.red,o.green=r.green,o.blue=r.blue,o.alpha=r.alpha,o):new e(r.red,r.green,r.blue,r.alpha)};e.equals=function(r,o){return r===o||O(r)&&O(o)&&r.red===o.red&&r.green===o.green&&r.blue===o.blue&&r.alpha===o.alpha};e.equalsArray=function(r,o,t){return r.red===o[t]&&r.green===o[t+1]&&r.blue===o[t+2]&&r.alpha===o[t+3]};e.prototype.clone=function(r){return e.clone(this,r)};e.prototype.equals=function(r){return e.equals(this,r)};e.prototype.equalsEpsilon=function(r,o){return this===r||O(r)&&Math.abs(this.red-r.red)<=o&&Math.abs(this.green-r.green)<=o&&Math.abs(this.blue-r.blue)<=o&&Math.abs(this.alpha-r.alpha)<=o};e.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};e.prototype.toCssColorString=function(){let r=e.floatToByte(this.red),o=e.floatToByte(this.green),t=e.floatToByte(this.blue);return this.alpha===1?`rgb(${r},${o},${t})`:`rgba(${r},${o},${t},${this.alpha})`};e.prototype.toCssHexString=function(){let r=e.floatToByte(this.red).toString(16);r.length<2&&(r=`0${r}`);let o=e.floatToByte(this.green).toString(16);o.length<2&&(o=`0${o}`);let t=e.floatToByte(this.blue).toString(16);if(t.length<2&&(t=`0${t}`),this.alpha<1){let f=e.floatToByte(this.alpha).toString(16);return f.length<2&&(f=`0${f}`),`#${r}${o}${t}${f}`}return`#${r}${o}${t}`};e.prototype.toBytes=function(r){let o=e.floatToByte(this.red),t=e.floatToByte(this.green),f=e.floatToByte(this.blue),s=e.floatToByte(this.alpha);return O(r)?(r[0]=o,r[1]=t,r[2]=f,r[3]=s,r):[o,t,f,s]};e.prototype.toRgba=function(){return m[0]=e.floatToByte(this.red),m[1]=e.floatToByte(this.green),m[2]=e.floatToByte(this.blue),m[3]=e.floatToByte(this.alpha),g[0]};e.prototype.brighten=function(r,o){return n.typeOf.number("magnitude",r),n.typeOf.number.greaterThanOrEquals("magnitude",r,0),n.typeOf.object("result",o),r=1-r,o.red=1-(1-this.red)*r,o.green=1-(1-this.green)*r,o.blue=1-(1-this.blue)*r,o.alpha=this.alpha,o};e.prototype.darken=function(r,o){return n.typeOf.number("magnitude",r),n.typeOf.number.greaterThanOrEquals("magnitude",r,0),n.typeOf.object("result",o),r=1-r,o.red=this.red*r,o.green=this.green*r,o.blue=this.blue*r,o.alpha=this.alpha,o};e.prototype.withAlpha=function(r,o){return e.fromAlpha(this,r,o)};e.add=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red+o.red,t.green=r.green+o.green,t.blue=r.blue+o.blue,t.alpha=r.alpha+o.alpha,t};e.subtract=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red-o.red,t.green=r.green-o.green,t.blue=r.blue-o.blue,t.alpha=r.alpha-o.alpha,t};e.multiply=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red*o.red,t.green=r.green*o.green,t.blue=r.blue*o.blue,t.alpha=r.alpha*o.alpha,t};e.divide=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red/o.red,t.green=r.green/o.green,t.blue=r.blue/o.blue,t.alpha=r.alpha/o.alpha,t};e.mod=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red%o.red,t.green=r.green%o.green,t.blue=r.blue%o.blue,t.alpha=r.alpha%o.alpha,t};e.lerp=function(r,o,t,f){return n.typeOf.object("start",r),n.typeOf.object("end",o),n.typeOf.number("t",t),n.typeOf.object("result",f),f.red=E.lerp(r.red,o.red,t),f.green=E.lerp(r.green,o.green,t),f.blue=E.lerp(r.blue,o.blue,t),f.alpha=E.lerp(r.alpha,o.alpha,t),f};e.multiplyByScalar=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("scalar",o),n.typeOf.object("result",t),t.red=r.red*o,t.green=r.green*o,t.blue=r.blue*o,t.alpha=r.alpha*o,t};e.divideByScalar=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("scalar",o),n.typeOf.object("result",t),t.red=r.red/o,t.green=r.green/o,t.blue=r.blue/o,t.alpha=r.alpha/o,t};e.ALICEBLUE=Object.freeze(e.fromCssColorString("#F0F8FF"));e.ANTIQUEWHITE=Object.freeze(e.fromCssColorString("#FAEBD7"));e.AQUA=Object.freeze(e.fromCssColorString("#00FFFF"));e.AQUAMARINE=Object.freeze(e.fromCssColorString("#7FFFD4"));e.AZURE=Object.freeze(e.fromCssColorString("#F0FFFF"));e.BEIGE=Object.freeze(e.fromCssColorString("#F5F5DC"));e.BISQUE=Object.freeze(e.fromCssColorString("#FFE4C4"));e.BLACK=Object.freeze(e.fromCssColorString("#000000"));e.BLANCHEDALMOND=Object.freeze(e.fromCssColorString("#FFEBCD"));e.BLUE=Object.freeze(e.fromCssColorString("#0000FF"));e.BLUEVIOLET=Object.freeze(e.fromCssColorString("#8A2BE2"));e.BROWN=Object.freeze(e.fromCssColorString("#A52A2A"));e.BURLYWOOD=Object.freeze(e.fromCssColorString("#DEB887"));e.CADETBLUE=Object.freeze(e.fromCssColorString("#5F9EA0"));e.CHARTREUSE=Object.freeze(e.fromCssColorString("#7FFF00"));e.CHOCOLATE=Object.freeze(e.fromCssColorString("#D2691E"));e.CORAL=Object.freeze(e.fromCssColorString("#FF7F50"));e.CORNFLOWERBLUE=Object.freeze(e.fromCssColorString("#6495ED"));e.CORNSILK=Object.freeze(e.fromCssColorString("#FFF8DC"));e.CRIMSON=Object.freeze(e.fromCssColorString("#DC143C"));e.CYAN=Object.freeze(e.fromCssColorString("#00FFFF"));e.DARKBLUE=Object.freeze(e.fromCssColorString("#00008B"));e.DARKCYAN=Object.freeze(e.fromCssColorString("#008B8B"));e.DARKGOLDENROD=Object.freeze(e.fromCssColorString("#B8860B"));e.DARKGRAY=Object.freeze(e.fromCssColorString("#A9A9A9"));e.DARKGREEN=Object.freeze(e.fromCssColorString("#006400"));e.DARKGREY=e.DARKGRAY;e.DARKKHAKI=Object.freeze(e.fromCssColorString("#BDB76B"));e.DARKMAGENTA=Object.freeze(e.fromCssColorString("#8B008B"));e.DARKOLIVEGREEN=Object.freeze(e.fromCssColorString("#556B2F"));e.DARKORANGE=Object.freeze(e.fromCssColorString("#FF8C00"));e.DARKORCHID=Object.freeze(e.fromCssColorString("#9932CC"));e.DARKRED=Object.freeze(e.fromCssColorString("#8B0000"));e.DARKSALMON=Object.freeze(e.fromCssColorString("#E9967A"));e.DARKSEAGREEN=Object.freeze(e.fromCssColorString("#8FBC8F"));e.DARKSLATEBLUE=Object.freeze(e.fromCssColorString("#483D8B"));e.DARKSLATEGRAY=Object.freeze(e.fromCssColorString("#2F4F4F"));e.DARKSLATEGREY=e.DARKSLATEGRAY;e.DARKTURQUOISE=Object.freeze(e.fromCssColorString("#00CED1"));e.DARKVIOLET=Object.freeze(e.fromCssColorString("#9400D3"));e.DEEPPINK=Object.freeze(e.fromCssColorString("#FF1493"));e.DEEPSKYBLUE=Object.freeze(e.fromCssColorString("#00BFFF"));e.DIMGRAY=Object.freeze(e.fromCssColorString("#696969"));e.DIMGREY=e.DIMGRAY;e.DODGERBLUE=Object.freeze(e.fromCssColorString("#1E90FF"));e.FIREBRICK=Object.freeze(e.fromCssColorString("#B22222"));e.FLORALWHITE=Object.freeze(e.fromCssColorString("#FFFAF0"));e.FORESTGREEN=Object.freeze(e.fromCssColorString("#228B22"));e.FUCHSIA=Object.freeze(e.fromCssColorString("#FF00FF"));e.GAINSBORO=Object.freeze(e.fromCssColorString("#DCDCDC"));e.GHOSTWHITE=Object.freeze(e.fromCssColorString("#F8F8FF"));e.GOLD=Object.freeze(e.fromCssColorString("#FFD700"));e.GOLDENROD=Object.freeze(e.fromCssColorString("#DAA520"));e.GRAY=Object.freeze(e.fromCssColorString("#808080"));e.GREEN=Object.freeze(e.fromCssColorString("#008000"));e.GREENYELLOW=Object.freeze(e.fromCssColorString("#ADFF2F"));e.GREY=e.GRAY;e.HONEYDEW=Object.freeze(e.fromCssColorString("#F0FFF0"));e.HOTPINK=Object.freeze(e.fromCssColorString("#FF69B4"));e.INDIANRED=Object.freeze(e.fromCssColorString("#CD5C5C"));e.INDIGO=Object.freeze(e.fromCssColorString("#4B0082"));e.IVORY=Object.freeze(e.fromCssColorString("#FFFFF0"));e.KHAKI=Object.freeze(e.fromCssColorString("#F0E68C"));e.LAVENDER=Object.freeze(e.fromCssColorString("#E6E6FA"));e.LAVENDAR_BLUSH=Object.freeze(e.fromCssColorString("#FFF0F5"));e.LAWNGREEN=Object.freeze(e.fromCssColorString("#7CFC00"));e.LEMONCHIFFON=Object.freeze(e.fromCssColorString("#FFFACD"));e.LIGHTBLUE=Object.freeze(e.fromCssColorString("#ADD8E6"));e.LIGHTCORAL=Object.freeze(e.fromCssColorString("#F08080"));e.LIGHTCYAN=Object.freeze(e.fromCssColorString("#E0FFFF"));e.LIGHTGOLDENRODYELLOW=Object.freeze(e.fromCssColorString("#FAFAD2"));e.LIGHTGRAY=Object.freeze(e.fromCssColorString("#D3D3D3"));e.LIGHTGREEN=Object.freeze(e.fromCssColorString("#90EE90"));e.LIGHTGREY=e.LIGHTGRAY;e.LIGHTPINK=Object.freeze(e.fromCssColorString("#FFB6C1"));e.LIGHTSEAGREEN=Object.freeze(e.fromCssColorString("#20B2AA"));e.LIGHTSKYBLUE=Object.freeze(e.fromCssColorString("#87CEFA"));e.LIGHTSLATEGRAY=Object.freeze(e.fromCssColorString("#778899"));e.LIGHTSLATEGREY=e.LIGHTSLATEGRAY;e.LIGHTSTEELBLUE=Object.freeze(e.fromCssColorString("#B0C4DE"));e.LIGHTYELLOW=Object.freeze(e.fromCssColorString("#FFFFE0"));e.LIME=Object.freeze(e.fromCssColorString("#00FF00"));e.LIMEGREEN=Object.freeze(e.fromCssColorString("#32CD32"));e.LINEN=Object.freeze(e.fromCssColorString("#FAF0E6"));e.MAGENTA=Object.freeze(e.fromCssColorString("#FF00FF"));e.MAROON=Object.freeze(e.fromCssColorString("#800000"));e.MEDIUMAQUAMARINE=Object.freeze(e.fromCssColorString("#66CDAA"));e.MEDIUMBLUE=Object.freeze(e.fromCssColorString("#0000CD"));e.MEDIUMORCHID=Object.freeze(e.fromCssColorString("#BA55D3"));e.MEDIUMPURPLE=Object.freeze(e.fromCssColorString("#9370DB"));e.MEDIUMSEAGREEN=Object.freeze(e.fromCssColorString("#3CB371"));e.MEDIUMSLATEBLUE=Object.freeze(e.fromCssColorString("#7B68EE"));e.MEDIUMSPRINGGREEN=Object.freeze(e.fromCssColorString("#00FA9A"));e.MEDIUMTURQUOISE=Object.freeze(e.fromCssColorString("#48D1CC"));e.MEDIUMVIOLETRED=Object.freeze(e.fromCssColorString("#C71585"));e.MIDNIGHTBLUE=Object.freeze(e.fromCssColorString("#191970"));e.MINTCREAM=Object.freeze(e.fromCssColorString("#F5FFFA"));e.MISTYROSE=Object.freeze(e.fromCssColorString("#FFE4E1"));e.MOCCASIN=Object.freeze(e.fromCssColorString("#FFE4B5"));e.NAVAJOWHITE=Object.freeze(e.fromCssColorString("#FFDEAD"));e.NAVY=Object.freeze(e.fromCssColorString("#000080"));e.OLDLACE=Object.freeze(e.fromCssColorString("#FDF5E6"));e.OLIVE=Object.freeze(e.fromCssColorString("#808000"));e.OLIVEDRAB=Object.freeze(e.fromCssColorString("#6B8E23"));e.ORANGE=Object.freeze(e.fromCssColorString("#FFA500"));e.ORANGERED=Object.freeze(e.fromCssColorString("#FF4500"));e.ORCHID=Object.freeze(e.fromCssColorString("#DA70D6"));e.PALEGOLDENROD=Object.freeze(e.fromCssColorString("#EEE8AA"));e.PALEGREEN=Object.freeze(e.fromCssColorString("#98FB98"));e.PALETURQUOISE=Object.freeze(e.fromCssColorString("#AFEEEE"));e.PALEVIOLETRED=Object.freeze(e.fromCssColorString("#DB7093"));e.PAPAYAWHIP=Object.freeze(e.fromCssColorString("#FFEFD5"));e.PEACHPUFF=Object.freeze(e.fromCssColorString("#FFDAB9"));e.PERU=Object.freeze(e.fromCssColorString("#CD853F"));e.PINK=Object.freeze(e.fromCssColorString("#FFC0CB"));e.PLUM=Object.freeze(e.fromCssColorString("#DDA0DD"));e.POWDERBLUE=Object.freeze(e.fromCssColorString("#B0E0E6"));e.PURPLE=Object.freeze(e.fromCssColorString("#800080"));e.RED=Object.freeze(e.fromCssColorString("#FF0000"));e.ROSYBROWN=Object.freeze(e.fromCssColorString("#BC8F8F"));e.ROYALBLUE=Object.freeze(e.fromCssColorString("#4169E1"));e.SADDLEBROWN=Object.freeze(e.fromCssColorString("#8B4513"));e.SALMON=Object.freeze(e.fromCssColorString("#FA8072"));e.SANDYBROWN=Object.freeze(e.fromCssColorString("#F4A460"));e.SEAGREEN=Object.freeze(e.fromCssColorString("#2E8B57"));e.SEASHELL=Object.freeze(e.fromCssColorString("#FFF5EE"));e.SIENNA=Object.freeze(e.fromCssColorString("#A0522D"));e.SILVER=Object.freeze(e.fromCssColorString("#C0C0C0"));e.SKYBLUE=Object.freeze(e.fromCssColorString("#87CEEB"));e.SLATEBLUE=Object.freeze(e.fromCssColorString("#6A5ACD"));e.SLATEGRAY=Object.freeze(e.fromCssColorString("#708090"));e.SLATEGREY=e.SLATEGRAY;e.SNOW=Object.freeze(e.fromCssColorString("#FFFAFA"));e.SPRINGGREEN=Object.freeze(e.fromCssColorString("#00FF7F"));e.STEELBLUE=Object.freeze(e.fromCssColorString("#4682B4"));e.TAN=Object.freeze(e.fromCssColorString("#D2B48C"));e.TEAL=Object.freeze(e.fromCssColorString("#008080"));e.THISTLE=Object.freeze(e.fromCssColorString("#D8BFD8"));e.TOMATO=Object.freeze(e.fromCssColorString("#FF6347"));e.TURQUOISE=Object.freeze(e.fromCssColorString("#40E0D0"));e.VIOLET=Object.freeze(e.fromCssColorString("#EE82EE"));e.WHEAT=Object.freeze(e.fromCssColorString("#F5DEB3"));e.WHITE=Object.freeze(e.fromCssColorString("#FFFFFF"));e.WHITESMOKE=Object.freeze(e.fromCssColorString("#F5F5F5"));e.YELLOW=Object.freeze(e.fromCssColorString("#FFFF00"));e.YELLOWGREEN=Object.freeze(e.fromCssColorString("#9ACD32"));e.TRANSPARENT=Object.freeze(new e(0,0,0,0));var h=e;export{h as a}; diff --git a/cesium/Workers/chunk-X5DMAS4Q.js b/cesium/Workers/chunk-VBIROZR5.js similarity index 94% rename from cesium/Workers/chunk-X5DMAS4Q.js rename to cesium/Workers/chunk-VBIROZR5.js index d41a14f..3f4e156 100644 --- a/cesium/Workers/chunk-X5DMAS4Q.js +++ b/cesium/Workers/chunk-VBIROZR5.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as b}from"./chunk-WLRVP2UA.js";import{a as u}from"./chunk-DUVNED7U.js";import{a as O}from"./chunk-MPVEZNKB.js";import{b as w,c as h,d as x}from"./chunk-FATK2EQ2.js";import{d}from"./chunk-3FEM743H.js";import{a as y}from"./chunk-77ESX6BV.js";import{a as i}from"./chunk-LJCGAQ64.js";import{a as p}from"./chunk-42NIXFVW.js";import{a as z,b as c}from"./chunk-5YVCOCPP.js";import{e as A}from"./chunk-U73D6PDD.js";var D=new i;function f(r){r=p(r,p.EMPTY_OBJECT);let o=r.minimum,m=r.maximum;if(c.typeOf.object("min",o),c.typeOf.object("max",m),A(r.offsetAttribute)&&r.offsetAttribute===b.TOP)throw new z("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");let a=p(r.vertexFormat,u.DEFAULT);this._minimum=i.clone(o),this._maximum=i.clone(m),this._vertexFormat=a,this._offsetAttribute=r.offsetAttribute,this._workerName="createBoxGeometry"}f.fromDimensions=function(r){r=p(r,p.EMPTY_OBJECT);let o=r.dimensions;c.typeOf.object("dimensions",o),c.typeOf.number.greaterThanOrEquals("dimensions.x",o.x,0),c.typeOf.number.greaterThanOrEquals("dimensions.y",o.y,0),c.typeOf.number.greaterThanOrEquals("dimensions.z",o.z,0);let m=i.multiplyByScalar(o,.5,new i);return new f({minimum:i.negate(m,new i),maximum:m,vertexFormat:r.vertexFormat,offsetAttribute:r.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(r){return c.typeOf.object("boundingBox",r),new f({minimum:r.minimum,maximum:r.maximum})};f.packedLength=2*i.packedLength+u.packedLength+1;f.pack=function(r,o,m){return c.typeOf.object("value",r),c.defined("array",o),m=p(m,0),i.pack(r._minimum,o,m),i.pack(r._maximum,o,m+i.packedLength),u.pack(r._vertexFormat,o,m+2*i.packedLength),o[m+2*i.packedLength+u.packedLength]=p(r._offsetAttribute,-1),o};var _=new i,g=new i,k=new u,F={minimum:_,maximum:g,vertexFormat:k,offsetAttribute:void 0};f.unpack=function(r,o,m){c.defined("array",r),o=p(o,0);let a=i.unpack(r,o,_),s=i.unpack(r,o+i.packedLength,g),n=u.unpack(r,o+2*i.packedLength,k),e=r[o+2*i.packedLength+u.packedLength];return A(m)?(m._minimum=i.clone(a,m._minimum),m._maximum=i.clone(s,m._maximum),m._vertexFormat=u.clone(n,m._vertexFormat),m._offsetAttribute=e===-1?void 0:e,m):(F.offsetAttribute=e===-1?void 0:e,new f(F))};f.createGeometry=function(r){let o=r._minimum,m=r._maximum,a=r._vertexFormat;if(i.equals(o,m))return;let s=new O,n,e;if(a.position&&(a.st||a.normal||a.tangent||a.bitangent)){if(a.position&&(e=new Float64Array(6*4*3),e[0]=o.x,e[1]=o.y,e[2]=m.z,e[3]=m.x,e[4]=o.y,e[5]=m.z,e[6]=m.x,e[7]=m.y,e[8]=m.z,e[9]=o.x,e[10]=m.y,e[11]=m.z,e[12]=o.x,e[13]=o.y,e[14]=o.z,e[15]=m.x,e[16]=o.y,e[17]=o.z,e[18]=m.x,e[19]=m.y,e[20]=o.z,e[21]=o.x,e[22]=m.y,e[23]=o.z,e[24]=m.x,e[25]=o.y,e[26]=o.z,e[27]=m.x,e[28]=m.y,e[29]=o.z,e[30]=m.x,e[31]=m.y,e[32]=m.z,e[33]=m.x,e[34]=o.y,e[35]=m.z,e[36]=o.x,e[37]=o.y,e[38]=o.z,e[39]=o.x,e[40]=m.y,e[41]=o.z,e[42]=o.x,e[43]=m.y,e[44]=m.z,e[45]=o.x,e[46]=o.y,e[47]=m.z,e[48]=o.x,e[49]=m.y,e[50]=o.z,e[51]=m.x,e[52]=m.y,e[53]=o.z,e[54]=m.x,e[55]=m.y,e[56]=m.z,e[57]=o.x,e[58]=m.y,e[59]=m.z,e[60]=o.x,e[61]=o.y,e[62]=o.z,e[63]=m.x,e[64]=o.y,e[65]=o.z,e[66]=m.x,e[67]=o.y,e[68]=m.z,e[69]=o.x,e[70]=o.y,e[71]=m.z,s.position=new x({componentDatatype:y.DOUBLE,componentsPerAttribute:3,values:e})),a.normal){let t=new Float32Array(72);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,t[12]=0,t[13]=0,t[14]=-1,t[15]=0,t[16]=0,t[17]=-1,t[18]=0,t[19]=0,t[20]=-1,t[21]=0,t[22]=0,t[23]=-1,t[24]=1,t[25]=0,t[26]=0,t[27]=1,t[28]=0,t[29]=0,t[30]=1,t[31]=0,t[32]=0,t[33]=1,t[34]=0,t[35]=0,t[36]=-1,t[37]=0,t[38]=0,t[39]=-1,t[40]=0,t[41]=0,t[42]=-1,t[43]=0,t[44]=0,t[45]=-1,t[46]=0,t[47]=0,t[48]=0,t[49]=1,t[50]=0,t[51]=0,t[52]=1,t[53]=0,t[54]=0,t[55]=1,t[56]=0,t[57]=0,t[58]=1,t[59]=0,t[60]=0,t[61]=-1,t[62]=0,t[63]=0,t[64]=-1,t[65]=0,t[66]=0,t[67]=-1,t[68]=0,t[69]=0,t[70]=-1,t[71]=0,s.normal=new x({componentDatatype:y.FLOAT,componentsPerAttribute:3,values:t})}if(a.st){let t=new Float32Array(48);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,t[8]=1,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=1,t[14]=1,t[15]=1,t[16]=0,t[17]=0,t[18]=1,t[19]=0,t[20]=1,t[21]=1,t[22]=0,t[23]=1,t[24]=1,t[25]=0,t[26]=0,t[27]=0,t[28]=0,t[29]=1,t[30]=1,t[31]=1,t[32]=1,t[33]=0,t[34]=0,t[35]=0,t[36]=0,t[37]=1,t[38]=1,t[39]=1,t[40]=0,t[41]=0,t[42]=1,t[43]=0,t[44]=1,t[45]=1,t[46]=0,t[47]=1,s.st=new x({componentDatatype:y.FLOAT,componentsPerAttribute:2,values:t})}if(a.tangent){let t=new Float32Array(72);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,t[12]=-1,t[13]=0,t[14]=0,t[15]=-1,t[16]=0,t[17]=0,t[18]=-1,t[19]=0,t[20]=0,t[21]=-1,t[22]=0,t[23]=0,t[24]=0,t[25]=1,t[26]=0,t[27]=0,t[28]=1,t[29]=0,t[30]=0,t[31]=1,t[32]=0,t[33]=0,t[34]=1,t[35]=0,t[36]=0,t[37]=-1,t[38]=0,t[39]=0,t[40]=-1,t[41]=0,t[42]=0,t[43]=-1,t[44]=0,t[45]=0,t[46]=-1,t[47]=0,t[48]=-1,t[49]=0,t[50]=0,t[51]=-1,t[52]=0,t[53]=0,t[54]=-1,t[55]=0,t[56]=0,t[57]=-1,t[58]=0,t[59]=0,t[60]=1,t[61]=0,t[62]=0,t[63]=1,t[64]=0,t[65]=0,t[66]=1,t[67]=0,t[68]=0,t[69]=1,t[70]=0,t[71]=0,s.tangent=new x({componentDatatype:y.FLOAT,componentsPerAttribute:3,values:t})}if(a.bitangent){let t=new Float32Array(72);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=1,t[14]=0,t[15]=0,t[16]=1,t[17]=0,t[18]=0,t[19]=1,t[20]=0,t[21]=0,t[22]=1,t[23]=0,t[24]=0,t[25]=0,t[26]=1,t[27]=0,t[28]=0,t[29]=1,t[30]=0,t[31]=0,t[32]=1,t[33]=0,t[34]=0,t[35]=1,t[36]=0,t[37]=0,t[38]=1,t[39]=0,t[40]=0,t[41]=1,t[42]=0,t[43]=0,t[44]=1,t[45]=0,t[46]=0,t[47]=1,t[48]=0,t[49]=0,t[50]=1,t[51]=0,t[52]=0,t[53]=1,t[54]=0,t[55]=0,t[56]=1,t[57]=0,t[58]=0,t[59]=1,t[60]=0,t[61]=0,t[62]=1,t[63]=0,t[64]=0,t[65]=1,t[66]=0,t[67]=0,t[68]=1,t[69]=0,t[70]=0,t[71]=1,s.bitangent=new x({componentDatatype:y.FLOAT,componentsPerAttribute:3,values:t})}n=new Uint16Array(6*2*3),n[0]=0,n[1]=1,n[2]=2,n[3]=0,n[4]=2,n[5]=3,n[6]=6,n[7]=5,n[8]=4,n[9]=7,n[10]=6,n[11]=4,n[12]=8,n[13]=9,n[14]=10,n[15]=8,n[16]=10,n[17]=11,n[18]=14,n[19]=13,n[20]=12,n[21]=15,n[22]=14,n[23]=12,n[24]=18,n[25]=17,n[26]=16,n[27]=19,n[28]=18,n[29]=16,n[30]=20,n[31]=21,n[32]=22,n[33]=20,n[34]=22,n[35]=23}else e=new Float64Array(8*3),e[0]=o.x,e[1]=o.y,e[2]=o.z,e[3]=m.x,e[4]=o.y,e[5]=o.z,e[6]=m.x,e[7]=m.y,e[8]=o.z,e[9]=o.x,e[10]=m.y,e[11]=o.z,e[12]=o.x,e[13]=o.y,e[14]=m.z,e[15]=m.x,e[16]=o.y,e[17]=m.z,e[18]=m.x,e[19]=m.y,e[20]=m.z,e[21]=o.x,e[22]=m.y,e[23]=m.z,s.position=new x({componentDatatype:y.DOUBLE,componentsPerAttribute:3,values:e}),n=new Uint16Array(6*2*3),n[0]=4,n[1]=5,n[2]=6,n[3]=4,n[4]=6,n[5]=7,n[6]=1,n[7]=0,n[8]=3,n[9]=1,n[10]=3,n[11]=2,n[12]=1,n[13]=6,n[14]=5,n[15]=1,n[16]=2,n[17]=6,n[18]=2,n[19]=3,n[20]=7,n[21]=2,n[22]=7,n[23]=6,n[24]=3,n[25]=0,n[26]=4,n[27]=3,n[28]=4,n[29]=7,n[30]=0,n[31]=1,n[32]=5,n[33]=0,n[34]=5,n[35]=4;let v=i.subtract(m,o,D),L=i.magnitude(v)*.5;if(A(r._offsetAttribute)){let t=e.length,T=r._offsetAttribute===b.NONE?0:1,E=new Uint8Array(t/3).fill(T);s.applyOffset=new x({componentDatatype:y.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}return new h({attributes:s,indices:n,primitiveType:w.TRIANGLES,boundingSphere:new d(i.ZERO,L),offsetAttribute:r._offsetAttribute})};var l;f.getUnitBox=function(){return A(l)||(l=f.createGeometry(f.fromDimensions({dimensions:new i(1,1,1),vertexFormat:u.POSITION_ONLY}))),l};var R=f;export{R as a}; +import{a as b}from"./chunk-ILGBPNP6.js";import{a as u}from"./chunk-HEEMUCG6.js";import{a as O}from"./chunk-T6BE4RZK.js";import{b as w,c as h,d as x}from"./chunk-X5IHHI6X.js";import{d}from"./chunk-TMSETF7M.js";import{a as y}from"./chunk-KZNJOCYU.js";import{a as i}from"./chunk-POASMU2N.js";import{a as p}from"./chunk-IUA6FAOZ.js";import{a as z,b as c}from"./chunk-UH2WFNTA.js";import{e as A}from"./chunk-PEYJTJPE.js";var D=new i;function f(r){r=p(r,p.EMPTY_OBJECT);let o=r.minimum,m=r.maximum;if(c.typeOf.object("min",o),c.typeOf.object("max",m),A(r.offsetAttribute)&&r.offsetAttribute===b.TOP)throw new z("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");let a=p(r.vertexFormat,u.DEFAULT);this._minimum=i.clone(o),this._maximum=i.clone(m),this._vertexFormat=a,this._offsetAttribute=r.offsetAttribute,this._workerName="createBoxGeometry"}f.fromDimensions=function(r){r=p(r,p.EMPTY_OBJECT);let o=r.dimensions;c.typeOf.object("dimensions",o),c.typeOf.number.greaterThanOrEquals("dimensions.x",o.x,0),c.typeOf.number.greaterThanOrEquals("dimensions.y",o.y,0),c.typeOf.number.greaterThanOrEquals("dimensions.z",o.z,0);let m=i.multiplyByScalar(o,.5,new i);return new f({minimum:i.negate(m,new i),maximum:m,vertexFormat:r.vertexFormat,offsetAttribute:r.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(r){return c.typeOf.object("boundingBox",r),new f({minimum:r.minimum,maximum:r.maximum})};f.packedLength=2*i.packedLength+u.packedLength+1;f.pack=function(r,o,m){return c.typeOf.object("value",r),c.defined("array",o),m=p(m,0),i.pack(r._minimum,o,m),i.pack(r._maximum,o,m+i.packedLength),u.pack(r._vertexFormat,o,m+2*i.packedLength),o[m+2*i.packedLength+u.packedLength]=p(r._offsetAttribute,-1),o};var _=new i,g=new i,k=new u,F={minimum:_,maximum:g,vertexFormat:k,offsetAttribute:void 0};f.unpack=function(r,o,m){c.defined("array",r),o=p(o,0);let a=i.unpack(r,o,_),s=i.unpack(r,o+i.packedLength,g),n=u.unpack(r,o+2*i.packedLength,k),e=r[o+2*i.packedLength+u.packedLength];return A(m)?(m._minimum=i.clone(a,m._minimum),m._maximum=i.clone(s,m._maximum),m._vertexFormat=u.clone(n,m._vertexFormat),m._offsetAttribute=e===-1?void 0:e,m):(F.offsetAttribute=e===-1?void 0:e,new f(F))};f.createGeometry=function(r){let o=r._minimum,m=r._maximum,a=r._vertexFormat;if(i.equals(o,m))return;let s=new O,n,e;if(a.position&&(a.st||a.normal||a.tangent||a.bitangent)){if(a.position&&(e=new Float64Array(6*4*3),e[0]=o.x,e[1]=o.y,e[2]=m.z,e[3]=m.x,e[4]=o.y,e[5]=m.z,e[6]=m.x,e[7]=m.y,e[8]=m.z,e[9]=o.x,e[10]=m.y,e[11]=m.z,e[12]=o.x,e[13]=o.y,e[14]=o.z,e[15]=m.x,e[16]=o.y,e[17]=o.z,e[18]=m.x,e[19]=m.y,e[20]=o.z,e[21]=o.x,e[22]=m.y,e[23]=o.z,e[24]=m.x,e[25]=o.y,e[26]=o.z,e[27]=m.x,e[28]=m.y,e[29]=o.z,e[30]=m.x,e[31]=m.y,e[32]=m.z,e[33]=m.x,e[34]=o.y,e[35]=m.z,e[36]=o.x,e[37]=o.y,e[38]=o.z,e[39]=o.x,e[40]=m.y,e[41]=o.z,e[42]=o.x,e[43]=m.y,e[44]=m.z,e[45]=o.x,e[46]=o.y,e[47]=m.z,e[48]=o.x,e[49]=m.y,e[50]=o.z,e[51]=m.x,e[52]=m.y,e[53]=o.z,e[54]=m.x,e[55]=m.y,e[56]=m.z,e[57]=o.x,e[58]=m.y,e[59]=m.z,e[60]=o.x,e[61]=o.y,e[62]=o.z,e[63]=m.x,e[64]=o.y,e[65]=o.z,e[66]=m.x,e[67]=o.y,e[68]=m.z,e[69]=o.x,e[70]=o.y,e[71]=m.z,s.position=new x({componentDatatype:y.DOUBLE,componentsPerAttribute:3,values:e})),a.normal){let t=new Float32Array(72);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,t[12]=0,t[13]=0,t[14]=-1,t[15]=0,t[16]=0,t[17]=-1,t[18]=0,t[19]=0,t[20]=-1,t[21]=0,t[22]=0,t[23]=-1,t[24]=1,t[25]=0,t[26]=0,t[27]=1,t[28]=0,t[29]=0,t[30]=1,t[31]=0,t[32]=0,t[33]=1,t[34]=0,t[35]=0,t[36]=-1,t[37]=0,t[38]=0,t[39]=-1,t[40]=0,t[41]=0,t[42]=-1,t[43]=0,t[44]=0,t[45]=-1,t[46]=0,t[47]=0,t[48]=0,t[49]=1,t[50]=0,t[51]=0,t[52]=1,t[53]=0,t[54]=0,t[55]=1,t[56]=0,t[57]=0,t[58]=1,t[59]=0,t[60]=0,t[61]=-1,t[62]=0,t[63]=0,t[64]=-1,t[65]=0,t[66]=0,t[67]=-1,t[68]=0,t[69]=0,t[70]=-1,t[71]=0,s.normal=new x({componentDatatype:y.FLOAT,componentsPerAttribute:3,values:t})}if(a.st){let t=new Float32Array(48);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,t[8]=1,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=1,t[14]=1,t[15]=1,t[16]=0,t[17]=0,t[18]=1,t[19]=0,t[20]=1,t[21]=1,t[22]=0,t[23]=1,t[24]=1,t[25]=0,t[26]=0,t[27]=0,t[28]=0,t[29]=1,t[30]=1,t[31]=1,t[32]=1,t[33]=0,t[34]=0,t[35]=0,t[36]=0,t[37]=1,t[38]=1,t[39]=1,t[40]=0,t[41]=0,t[42]=1,t[43]=0,t[44]=1,t[45]=1,t[46]=0,t[47]=1,s.st=new x({componentDatatype:y.FLOAT,componentsPerAttribute:2,values:t})}if(a.tangent){let t=new Float32Array(72);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,t[12]=-1,t[13]=0,t[14]=0,t[15]=-1,t[16]=0,t[17]=0,t[18]=-1,t[19]=0,t[20]=0,t[21]=-1,t[22]=0,t[23]=0,t[24]=0,t[25]=1,t[26]=0,t[27]=0,t[28]=1,t[29]=0,t[30]=0,t[31]=1,t[32]=0,t[33]=0,t[34]=1,t[35]=0,t[36]=0,t[37]=-1,t[38]=0,t[39]=0,t[40]=-1,t[41]=0,t[42]=0,t[43]=-1,t[44]=0,t[45]=0,t[46]=-1,t[47]=0,t[48]=-1,t[49]=0,t[50]=0,t[51]=-1,t[52]=0,t[53]=0,t[54]=-1,t[55]=0,t[56]=0,t[57]=-1,t[58]=0,t[59]=0,t[60]=1,t[61]=0,t[62]=0,t[63]=1,t[64]=0,t[65]=0,t[66]=1,t[67]=0,t[68]=0,t[69]=1,t[70]=0,t[71]=0,s.tangent=new x({componentDatatype:y.FLOAT,componentsPerAttribute:3,values:t})}if(a.bitangent){let t=new Float32Array(72);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=1,t[14]=0,t[15]=0,t[16]=1,t[17]=0,t[18]=0,t[19]=1,t[20]=0,t[21]=0,t[22]=1,t[23]=0,t[24]=0,t[25]=0,t[26]=1,t[27]=0,t[28]=0,t[29]=1,t[30]=0,t[31]=0,t[32]=1,t[33]=0,t[34]=0,t[35]=1,t[36]=0,t[37]=0,t[38]=1,t[39]=0,t[40]=0,t[41]=1,t[42]=0,t[43]=0,t[44]=1,t[45]=0,t[46]=0,t[47]=1,t[48]=0,t[49]=0,t[50]=1,t[51]=0,t[52]=0,t[53]=1,t[54]=0,t[55]=0,t[56]=1,t[57]=0,t[58]=0,t[59]=1,t[60]=0,t[61]=0,t[62]=1,t[63]=0,t[64]=0,t[65]=1,t[66]=0,t[67]=0,t[68]=1,t[69]=0,t[70]=0,t[71]=1,s.bitangent=new x({componentDatatype:y.FLOAT,componentsPerAttribute:3,values:t})}n=new Uint16Array(6*2*3),n[0]=0,n[1]=1,n[2]=2,n[3]=0,n[4]=2,n[5]=3,n[6]=6,n[7]=5,n[8]=4,n[9]=7,n[10]=6,n[11]=4,n[12]=8,n[13]=9,n[14]=10,n[15]=8,n[16]=10,n[17]=11,n[18]=14,n[19]=13,n[20]=12,n[21]=15,n[22]=14,n[23]=12,n[24]=18,n[25]=17,n[26]=16,n[27]=19,n[28]=18,n[29]=16,n[30]=20,n[31]=21,n[32]=22,n[33]=20,n[34]=22,n[35]=23}else e=new Float64Array(8*3),e[0]=o.x,e[1]=o.y,e[2]=o.z,e[3]=m.x,e[4]=o.y,e[5]=o.z,e[6]=m.x,e[7]=m.y,e[8]=o.z,e[9]=o.x,e[10]=m.y,e[11]=o.z,e[12]=o.x,e[13]=o.y,e[14]=m.z,e[15]=m.x,e[16]=o.y,e[17]=m.z,e[18]=m.x,e[19]=m.y,e[20]=m.z,e[21]=o.x,e[22]=m.y,e[23]=m.z,s.position=new x({componentDatatype:y.DOUBLE,componentsPerAttribute:3,values:e}),n=new Uint16Array(6*2*3),n[0]=4,n[1]=5,n[2]=6,n[3]=4,n[4]=6,n[5]=7,n[6]=1,n[7]=0,n[8]=3,n[9]=1,n[10]=3,n[11]=2,n[12]=1,n[13]=6,n[14]=5,n[15]=1,n[16]=2,n[17]=6,n[18]=2,n[19]=3,n[20]=7,n[21]=2,n[22]=7,n[23]=6,n[24]=3,n[25]=0,n[26]=4,n[27]=3,n[28]=4,n[29]=7,n[30]=0,n[31]=1,n[32]=5,n[33]=0,n[34]=5,n[35]=4;let v=i.subtract(m,o,D),L=i.magnitude(v)*.5;if(A(r._offsetAttribute)){let t=e.length,T=r._offsetAttribute===b.NONE?0:1,E=new Uint8Array(t/3).fill(T);s.applyOffset=new x({componentDatatype:y.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}return new h({attributes:s,indices:n,primitiveType:w.TRIANGLES,boundingSphere:new d(i.ZERO,L),offsetAttribute:r._offsetAttribute})};var l;f.getUnitBox=function(){return A(l)||(l=f.createGeometry(f.fromDimensions({dimensions:new i(1,1,1),vertexFormat:u.POSITION_ONLY}))),l};var R=f;export{R as a}; diff --git a/cesium/Workers/chunk-65DFAZKW.js b/cesium/Workers/chunk-W23CU777.js similarity index 50% rename from cesium/Workers/chunk-65DFAZKW.js rename to cesium/Workers/chunk-W23CU777.js index 2983235..56497d5 100644 --- a/cesium/Workers/chunk-65DFAZKW.js +++ b/cesium/Workers/chunk-W23CU777.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as y,b as P,d as W}from"./chunk-LJCGAQ64.js";import{a as L}from"./chunk-JFG572S7.js";import{a as B}from"./chunk-42NIXFVW.js";import{b as q}from"./chunk-5YVCOCPP.js";import{e as T}from"./chunk-U73D6PDD.js";function Y(n){let a=n._uSquared,t=n._ellipsoid.maximumRadius,e=n._ellipsoid.minimumRadius,f=(t-e)/t,m=Math.cos(n._startHeading),_=Math.sin(n._startHeading),r=(1-f)*Math.tan(n._start.latitude),p=1/Math.sqrt(1+r*r),R=p*r,M=Math.atan2(r,m),l=p*_,U=l*l,i=1-U,A=Math.sqrt(i),c=a/4,o=c*c,h=o*c,S=o*o,u=1+c-3*o/4+5*h/4-175*S/64,C=1-c+15*o/8-35*h/8,d=1-3*c+35*o/4,g=1-5*c,w=u*M-C*Math.sin(2*M)*c/2-d*Math.sin(4*M)*o/16-g*Math.sin(6*M)*h/48-Math.sin(8*M)*5*S/512,s=n._constants;s.a=t,s.b=e,s.f=f,s.cosineHeading=m,s.sineHeading=_,s.tanU=r,s.cosineU=p,s.sineU=R,s.sigma=M,s.sineAlpha=l,s.sineSquaredAlpha=U,s.cosineSquaredAlpha=i,s.cosineAlpha=A,s.u2Over4=c,s.u4Over16=o,s.u6Over64=h,s.u8Over256=S,s.a0=u,s.a1=C,s.a2=d,s.a3=g,s.distanceRatio=w}function Z(n,a){return n*a*(4+n*(4-3*a))/16}function k(n,a,t,e,f,m,_){let r=Z(n,t);return(1-r)*n*a*(e+r*f*(_+r*m*(2*_*_-1)))}function $(n,a,t,e,f,m,_){let r=(a-t)/a,p=m-e,R=Math.atan((1-r)*Math.tan(f)),M=Math.atan((1-r)*Math.tan(_)),l=Math.cos(R),U=Math.sin(R),i=Math.cos(M),A=Math.sin(M),c=l*i,o=l*A,h=U*A,S=U*i,u=p,C=L.TWO_PI,d=Math.cos(u),g=Math.sin(u),w,s,O,H,b;do{d=Math.cos(u),g=Math.sin(u);let z=o-S*d;O=Math.sqrt(i*i*g*g+z*z),s=h+c*d,w=Math.atan2(O,s);let D;O===0?(D=0,H=1):(D=c*g/O,H=1-D*D),C=u,b=s-2*h/H,isFinite(b)||(b=0),u=p+k(r,D,H,w,O,s,b)}while(Math.abs(u-C)>L.EPSILON12);let v=H*(a*a-t*t)/(t*t),V=1+v*(4096+v*(v*(320-175*v)-768))/16384,I=v*(256+v*(v*(74-47*v)-128))/1024,F=b*b,J=I*O*(b+I*(s*(2*F-1)-I*b*(4*O*O-3)*(4*F-3)/6)/4),K=t*V*(w-J),Q=Math.atan2(i*g,o-S*d),X=Math.atan2(l*g,o*d-S);n._distance=K,n._startHeading=Q,n._endHeading=X,n._uSquared=v}var j=new y,x=new y;function N(n,a,t,e){let f=y.normalize(e.cartographicToCartesian(a,x),j),m=y.normalize(e.cartographicToCartesian(t,x),x);q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(y.angleBetween(f,m))-Math.PI),.0125),$(n,e.maximumRadius,e.minimumRadius,a.longitude,a.latitude,t.longitude,t.latitude),n._start=P.clone(a,n._start),n._end=P.clone(t,n._end),n._start.height=0,n._end.height=0,Y(n)}function E(n,a,t){let e=B(t,W.WGS84);this._ellipsoid=e,this._start=new P,this._end=new P,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,T(n)&&T(a)&&N(this,n,a,e)}Object.defineProperties(E.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return q.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return q.defined("distance",this._distance),this._endHeading}}});E.prototype.setEndPoints=function(n,a){q.defined("start",n),q.defined("end",a),N(this,n,a,this._ellipsoid)};E.prototype.interpolateUsingFraction=function(n,a){return this.interpolateUsingSurfaceDistance(this._distance*n,a)};E.prototype.interpolateUsingSurfaceDistance=function(n,a){q.defined("distance",this._distance);let t=this._constants,e=t.distanceRatio+n/t.b,f=Math.cos(2*e),m=Math.cos(4*e),_=Math.cos(6*e),r=Math.sin(2*e),p=Math.sin(4*e),R=Math.sin(6*e),M=Math.sin(8*e),l=e*e,U=e*l,i=t.u8Over256,A=t.u2Over4,c=t.u6Over64,o=t.u4Over16,h=2*U*i*f/3+e*(1-A+7*o/4-15*c/4+579*i/64-(o-15*c/4+187*i/16)*f-(5*c/4-115*i/16)*m-29*i*_/16)+(A/2-o+71*c/32-85*i/16)*r+(5*o/16-5*c/4+383*i/96)*p-l*((c-11*i/2)*r+5*i*p/2)+(29*c/96-29*i/16)*R+539*i*M/1536,S=Math.asin(Math.sin(h)*t.cosineAlpha),u=Math.atan(t.a/t.b*Math.tan(S));h=h-t.sigma;let C=Math.cos(2*t.sigma+h),d=Math.sin(h),g=Math.cos(h),w=t.cosineU*g,s=t.sineU*d,H=Math.atan2(d*t.sineHeading,w-s*t.cosineHeading)-k(t.f,t.sineAlpha,t.cosineSquaredAlpha,h,d,g,C);return T(a)?(a.longitude=this._start.longitude+H,a.latitude=u,a.height=0,a):new P(this._start.longitude+H,u,0)};var ct=E;export{ct as a}; +import{a as y,b as P,d as k}from"./chunk-POASMU2N.js";import{a as L}from"./chunk-R6KGAEF6.js";import{a as B}from"./chunk-IUA6FAOZ.js";import{b as q}from"./chunk-UH2WFNTA.js";import{e as T}from"./chunk-PEYJTJPE.js";function Y(n){let a=n._uSquared,t=n._ellipsoid.maximumRadius,e=n._ellipsoid.minimumRadius,f=(t-e)/t,m=Math.cos(n._startHeading),_=Math.sin(n._startHeading),r=(1-f)*Math.tan(n._start.latitude),p=1/Math.sqrt(1+r*r),R=p*r,M=Math.atan2(r,m),l=p*_,U=l*l,i=1-U,A=Math.sqrt(i),c=a/4,o=c*c,h=o*c,S=o*o,u=1+c-3*o/4+5*h/4-175*S/64,C=1-c+15*o/8-35*h/8,d=1-3*c+35*o/4,g=1-5*c,w=u*M-C*Math.sin(2*M)*c/2-d*Math.sin(4*M)*o/16-g*Math.sin(6*M)*h/48-Math.sin(8*M)*5*S/512,s=n._constants;s.a=t,s.b=e,s.f=f,s.cosineHeading=m,s.sineHeading=_,s.tanU=r,s.cosineU=p,s.sineU=R,s.sigma=M,s.sineAlpha=l,s.sineSquaredAlpha=U,s.cosineSquaredAlpha=i,s.cosineAlpha=A,s.u2Over4=c,s.u4Over16=o,s.u6Over64=h,s.u8Over256=S,s.a0=u,s.a1=C,s.a2=d,s.a3=g,s.distanceRatio=w}function Z(n,a){return n*a*(4+n*(4-3*a))/16}function N(n,a,t,e,f,m,_){let r=Z(n,t);return(1-r)*n*a*(e+r*f*(_+r*m*(2*_*_-1)))}function $(n,a,t,e,f,m,_){let r=(a-t)/a,p=m-e,R=Math.atan((1-r)*Math.tan(f)),M=Math.atan((1-r)*Math.tan(_)),l=Math.cos(R),U=Math.sin(R),i=Math.cos(M),A=Math.sin(M),c=l*i,o=l*A,h=U*A,S=U*i,u=p,C=L.TWO_PI,d=Math.cos(u),g=Math.sin(u),w,s,O,H,b;do{d=Math.cos(u),g=Math.sin(u);let z=o-S*d;O=Math.sqrt(i*i*g*g+z*z),s=h+c*d,w=Math.atan2(O,s);let D;O===0?(D=0,H=1):(D=c*g/O,H=1-D*D),C=u,b=s-2*h/H,isFinite(b)||(b=0),u=p+N(r,D,H,w,O,s,b)}while(Math.abs(u-C)>L.EPSILON12);let v=H*(a*a-t*t)/(t*t),W=1+v*(4096+v*(v*(320-175*v)-768))/16384,I=v*(256+v*(v*(74-47*v)-128))/1024,F=b*b,J=I*O*(b+I*(s*(2*F-1)-I*b*(4*O*O-3)*(4*F-3)/6)/4),K=t*W*(w-J),Q=Math.atan2(i*g,o-S*d),X=Math.atan2(l*g,o*d-S);n._distance=K,n._startHeading=Q,n._endHeading=X,n._uSquared=v}var j=new y,x=new y;function V(n,a,t,e){let f=y.normalize(e.cartographicToCartesian(a,x),j),m=y.normalize(e.cartographicToCartesian(t,x),x);q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(y.angleBetween(f,m))-Math.PI),.0125),$(n,e.maximumRadius,e.minimumRadius,a.longitude,a.latitude,t.longitude,t.latitude),n._start=P.clone(a,n._start),n._end=P.clone(t,n._end),n._start.height=0,n._end.height=0,Y(n)}function E(n,a,t){let e=B(t,k.default);this._ellipsoid=e,this._start=new P,this._end=new P,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,T(n)&&T(a)&&V(this,n,a,e)}Object.defineProperties(E.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return q.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return q.defined("distance",this._distance),this._endHeading}}});E.prototype.setEndPoints=function(n,a){q.defined("start",n),q.defined("end",a),V(this,n,a,this._ellipsoid)};E.prototype.interpolateUsingFraction=function(n,a){return this.interpolateUsingSurfaceDistance(this._distance*n,a)};E.prototype.interpolateUsingSurfaceDistance=function(n,a){q.defined("distance",this._distance);let t=this._constants,e=t.distanceRatio+n/t.b,f=Math.cos(2*e),m=Math.cos(4*e),_=Math.cos(6*e),r=Math.sin(2*e),p=Math.sin(4*e),R=Math.sin(6*e),M=Math.sin(8*e),l=e*e,U=e*l,i=t.u8Over256,A=t.u2Over4,c=t.u6Over64,o=t.u4Over16,h=2*U*i*f/3+e*(1-A+7*o/4-15*c/4+579*i/64-(o-15*c/4+187*i/16)*f-(5*c/4-115*i/16)*m-29*i*_/16)+(A/2-o+71*c/32-85*i/16)*r+(5*o/16-5*c/4+383*i/96)*p-l*((c-11*i/2)*r+5*i*p/2)+(29*c/96-29*i/16)*R+539*i*M/1536,S=Math.asin(Math.sin(h)*t.cosineAlpha),u=Math.atan(t.a/t.b*Math.tan(S));h=h-t.sigma;let C=Math.cos(2*t.sigma+h),d=Math.sin(h),g=Math.cos(h),w=t.cosineU*g,s=t.sineU*d,H=Math.atan2(d*t.sineHeading,w-s*t.cosineHeading)-N(t.f,t.sineAlpha,t.cosineSquaredAlpha,h,d,g,C);return T(a)?(a.longitude=this._start.longitude+H,a.latitude=u,a.height=0,a):new P(this._start.longitude+H,u,0)};var ct=E;export{ct as a}; diff --git a/cesium/Workers/chunk-WIE5YNSS.js b/cesium/Workers/chunk-WIE5YNSS.js deleted file mode 100644 index 52d7373..0000000 --- a/cesium/Workers/chunk-WIE5YNSS.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 - * - * Copyright 2011-2022 Cesium Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Columbus View (Pat. Pend.) - * - * Portions licensed separately. - * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. - */ - -import{a as _}from"./chunk-65DFAZKW.js";import{a as G}from"./chunk-OSVMDAN4.js";import{b as B}from"./chunk-PT2EMSIG.js";import{a as b}from"./chunk-REUYHR24.js";import{b as L}from"./chunk-CMXCDAKR.js";import{a,b as D,d as z}from"./chunk-LJCGAQ64.js";import{a as E}from"./chunk-JFG572S7.js";import{a as C}from"./chunk-42NIXFVW.js";import{a as I}from"./chunk-5YVCOCPP.js";import{e as T}from"./chunk-U73D6PDD.js";var p={};p.numberOfPoints=function(r,n,o){let e=a.distance(r,n);return Math.ceil(e/o)};p.numberOfPointsRhumbLine=function(r,n,o){let e=Math.pow(r.longitude-n.longitude,2)+Math.pow(r.latitude-n.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(e/(o*o))))};var V=new D;p.extractHeights=function(r,n){let o=r.length,e=new Array(o);for(let t=0;t<o;t++){let l=r[t];e[t]=n.cartesianToCartographic(l,V).height}return e};var Y=new L,W=new a,v=new a,F=new b(a.UNIT_X,0),H=new a,j=new b(a.UNIT_X,0),J=new a,K=new a,O=[];function q(r,n,o){let e=O;e.length=r;let t;if(n===o){for(t=0;t<r;t++)e[t]=n;return e}let u=(o-n)/r;for(t=0;t<r;t++){let d=n+t*u;e[t]=d}return e}var x=new D,N=new D,S=new a,k=new a,Q=new a,M=new _,R=new G;function $(r,n,o,e,t,l,u,d){let i=e.scaleToGeodeticSurface(r,k),w=e.scaleToGeodeticSurface(n,Q),h=p.numberOfPoints(r,n,o),f=e.cartesianToCartographic(i,x),y=e.cartesianToCartographic(w,N),g=q(h,t,l);M.setEndPoints(f,y);let P=M.surfaceDistance/h,c=d;f.height=t;let s=e.cartographicToCartesian(f,S);a.pack(s,u,c),c+=3;for(let m=1;m<h;m++){let A=M.interpolateUsingSurfaceDistance(m*P,N);A.height=g[m],s=e.cartographicToCartesian(A,S),a.pack(s,u,c),c+=3}return c}function tt(r,n,o,e,t,l,u,d){let i=e.cartesianToCartographic(r,x),w=e.cartesianToCartographic(n,N),h=p.numberOfPointsRhumbLine(i,w,o);i.height=0,w.height=0;let f=q(h,t,l);R.ellipsoid.equals(e)||(R=new G(void 0,void 0,e)),R.setEndPoints(i,w);let y=R.surfaceDistance/h,g=d;i.height=t;let P=e.cartographicToCartesian(i,S);a.pack(P,u,g),g+=3;for(let c=1;c<h;c++){let s=R.interpolateUsingSurfaceDistance(c*y,N);s.height=f[c],P=e.cartographicToCartesian(s,S),a.pack(P,u,g),g+=3}return g}p.wrapLongitude=function(r,n){let o=[],e=[];if(T(r)&&r.length>0){n=C(n,L.IDENTITY);let t=L.inverseTransformation(n,Y),l=L.multiplyByPoint(t,a.ZERO,W),u=a.normalize(L.multiplyByPointAsVector(t,a.UNIT_Y,v),v),d=b.fromPointNormal(l,u,F),i=a.normalize(L.multiplyByPointAsVector(t,a.UNIT_X,H),H),w=b.fromPointNormal(l,i,j),h=1;o.push(a.clone(r[0]));let f=o[0],y=r.length;for(let g=1;g<y;++g){let P=r[g];if(b.getPointDistance(w,f)<0||b.getPointDistance(w,P)<0){let c=B.lineSegmentPlane(f,P,d,J);if(T(c)){let s=a.multiplyByScalar(u,5e-9,K);b.getPointDistance(d,f)<0&&a.negate(s,s),o.push(a.add(c,s,new a)),e.push(h+1),a.negate(s,s),o.push(a.add(c,s,new a)),h=1}}o.push(a.clone(r[g])),h++,f=P}e.push(h)}return{positions:o,lengths:e}};p.generateArc=function(r){T(r)||(r={});let n=r.positions;if(!T(n))throw new I("options.positions is required.");let o=n.length,e=C(r.ellipsoid,z.WGS84),t=C(r.height,0),l=Array.isArray(t);if(o<1)return[];if(o===1){let c=e.scaleToGeodeticSurface(n[0],k);if(t=l?t[0]:t,t!==0){let s=e.geodeticSurfaceNormal(c,S);a.multiplyByScalar(s,t,s),a.add(c,s,c)}return[c.x,c.y,c.z]}let u=r.minDistance;if(!T(u)){let c=C(r.granularity,E.RADIANS_PER_DEGREE);u=E.chordLength(c,e.maximumRadius)}let d=0,i;for(i=0;i<o-1;i++)d+=p.numberOfPoints(n[i],n[i+1],u);let w=(d+1)*3,h=new Array(w),f=0;for(i=0;i<o-1;i++){let c=n[i],s=n[i+1],m=l?t[i]:t,A=l?t[i+1]:t;f=$(c,s,u,e,m,A,h,f)}O.length=0;let y=n[o-1],g=e.cartesianToCartographic(y,x);g.height=l?t[o-1]:t;let P=e.cartographicToCartesian(g,S);return a.pack(P,h,w-3),h};var U=new D,et=new D;p.generateRhumbArc=function(r){T(r)||(r={});let n=r.positions;if(!T(n))throw new I("options.positions is required.");let o=n.length,e=C(r.ellipsoid,z.WGS84),t=C(r.height,0),l=Array.isArray(t);if(o<1)return[];if(o===1){let m=e.scaleToGeodeticSurface(n[0],k);if(t=l?t[0]:t,t!==0){let A=e.geodeticSurfaceNormal(m,S);a.multiplyByScalar(A,t,A),a.add(m,A,m)}return[m.x,m.y,m.z]}let u=C(r.granularity,E.RADIANS_PER_DEGREE),d=0,i,w=e.cartesianToCartographic(n[0],U),h;for(i=0;i<o-1;i++)h=e.cartesianToCartographic(n[i+1],et),d+=p.numberOfPointsRhumbLine(w,h,u),w=D.clone(h,U);let f=(d+1)*3,y=new Array(f),g=0;for(i=0;i<o-1;i++){let m=n[i],A=n[i+1],X=l?t[i]:t,Z=l?t[i+1]:t;g=tt(m,A,u,e,X,Z,y,g)}O.length=0;let P=n[o-1],c=e.cartesianToCartographic(P,x);c.height=l?t[o-1]:t;let s=e.cartographicToCartesian(c,S);return a.pack(s,y,f-3),y};p.generateCartesianArc=function(r){let n=p.generateArc(r),o=n.length/3,e=new Array(o);for(let t=0;t<o;t++)e[t]=a.unpack(n,t*3);return e};p.generateCartesianRhumbArc=function(r){let n=p.generateRhumbArc(r),o=n.length/3,e=new Array(o);for(let t=0;t<o;t++)e[t]=a.unpack(n,t*3);return e};var mt=p;export{mt as a}; diff --git a/cesium/Workers/chunk-FATK2EQ2.js b/cesium/Workers/chunk-X5IHHI6X.js similarity index 91% rename from cesium/Workers/chunk-FATK2EQ2.js rename to cesium/Workers/chunk-X5IHHI6X.js index e5aa57b..eb200d4 100644 --- a/cesium/Workers/chunk-FATK2EQ2.js +++ b/cesium/Workers/chunk-X5IHHI6X.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{b as l,f as O,g as R,h as G,i as L}from"./chunk-CMXCDAKR.js";import{a as A,b as h,c as a,e as y}from"./chunk-LJCGAQ64.js";import{a as c}from"./chunk-JZYZ7RT4.js";import{a as s}from"./chunk-42NIXFVW.js";import{a as N,b as w}from"./chunk-5YVCOCPP.js";import{e as I}from"./chunk-U73D6PDD.js";var U={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},M=Object.freeze(U);var r={POINTS:c.POINTS,LINES:c.LINES,LINE_LOOP:c.LINE_LOOP,LINE_STRIP:c.LINE_STRIP,TRIANGLES:c.TRIANGLES,TRIANGLE_STRIP:c.TRIANGLE_STRIP,TRIANGLE_FAN:c.TRIANGLE_FAN};r.isLines=function(t){return t===r.LINES||t===r.LINE_LOOP||t===r.LINE_STRIP};r.isTriangles=function(t){return t===r.TRIANGLES||t===r.TRIANGLE_STRIP||t===r.TRIANGLE_FAN};r.validate=function(t){return t===r.POINTS||t===r.LINES||t===r.LINE_LOOP||t===r.LINE_STRIP||t===r.TRIANGLES||t===r.TRIANGLE_STRIP||t===r.TRIANGLE_FAN};var F=Object.freeze(r);function _(t){t=s(t,s.EMPTY_OBJECT),w.typeOf.object("options.attributes",t.attributes),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=s(t.primitiveType,F.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=s(t.geometryType,M.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}_.computeNumberOfVertices=function(t){w.typeOf.object("geometry",t);let m=-1;for(let u in t.attributes)if(t.attributes.hasOwnProperty(u)&&I(t.attributes[u])&&I(t.attributes[u].values)){let o=t.attributes[u],e=o.values.length/o.componentsPerAttribute;if(m!==e&&m!==-1)throw new N("All attribute lists must have the same number of attributes.");m=e}return m};var W=new h,H=new A,V=new l,Z=[new h,new h,new h],K=[new a,new a,new a],$=[new a,new a,new a],tt=new A,et=new O,rt=new l,nt=new L;_._textureCoordinateRotationPoints=function(t,m,u,o){let e,g=G.center(o,W),D=h.toCartesian(g,u,H),Y=R.eastNorthUpToFixedFrame(D,u,V),C=l.inverse(Y,V),b=K,f=Z;f[0].longitude=o.west,f[0].latitude=o.south,f[1].longitude=o.west,f[1].latitude=o.north,f[2].longitude=o.east,f[2].latitude=o.south;let n=tt;for(e=0;e<3;e++)h.toCartesian(f[e],u,n),n=l.multiplyByPointAsVector(C,n,n),b[e].x=n.x,b[e].y=n.y;let B=O.fromAxisAngle(A.UNIT_Z,-m,et),v=y.fromQuaternion(B,rt),j=t.length,T=Number.POSITIVE_INFINITY,p=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(e=0;e<j;e++)n=l.multiplyByPointAsVector(C,t[e],n),n=y.multiplyByVector(v,n,n),T=Math.min(T,n.x),p=Math.min(p,n.y),d=Math.max(d,n.x),x=Math.max(x,n.y);let k=L.fromRotation(m,nt),i=$;i[0].x=T,i[0].y=p,i[1].x=T,i[1].y=x,i[2].x=d,i[2].y=p;let P=b[0],z=b[2].x-P.x,X=b[1].y-P.y;for(e=0;e<3;e++){let E=i[e];L.multiplyByVector(k,E,E),E.x=(E.x-P.x)/z,E.y=(E.y-P.y)/X}let q=i[0],J=i[1],Q=i[2],S=new Array(6);return a.pack(q,S),a.pack(J,S,2),a.pack(Q,S,4),S};var Lt=_;function ot(t){if(t=s(t,s.EMPTY_OBJECT),!I(t.componentDatatype))throw new N("options.componentDatatype is required.");if(!I(t.componentsPerAttribute))throw new N("options.componentsPerAttribute is required.");if(t.componentsPerAttribute<1||t.componentsPerAttribute>4)throw new N("options.componentsPerAttribute must be between 1 and 4.");if(!I(t.values))throw new N("options.values is required.");this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=s(t.normalize,!1),this.values=t.values}var Ot=ot;export{M as a,F as b,Lt as c,Ot as d}; +import{b as l,f as O,g as R,h as G,i as L}from"./chunk-7Z5IIKOJ.js";import{a as A,b as h,c as a,e as y}from"./chunk-POASMU2N.js";import{a as c}from"./chunk-3C7WC463.js";import{a as s}from"./chunk-IUA6FAOZ.js";import{a as N,b as w}from"./chunk-UH2WFNTA.js";import{e as I}from"./chunk-PEYJTJPE.js";var U={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},M=Object.freeze(U);var r={POINTS:c.POINTS,LINES:c.LINES,LINE_LOOP:c.LINE_LOOP,LINE_STRIP:c.LINE_STRIP,TRIANGLES:c.TRIANGLES,TRIANGLE_STRIP:c.TRIANGLE_STRIP,TRIANGLE_FAN:c.TRIANGLE_FAN};r.isLines=function(t){return t===r.LINES||t===r.LINE_LOOP||t===r.LINE_STRIP};r.isTriangles=function(t){return t===r.TRIANGLES||t===r.TRIANGLE_STRIP||t===r.TRIANGLE_FAN};r.validate=function(t){return t===r.POINTS||t===r.LINES||t===r.LINE_LOOP||t===r.LINE_STRIP||t===r.TRIANGLES||t===r.TRIANGLE_STRIP||t===r.TRIANGLE_FAN};var F=Object.freeze(r);function _(t){t=s(t,s.EMPTY_OBJECT),w.typeOf.object("options.attributes",t.attributes),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=s(t.primitiveType,F.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=s(t.geometryType,M.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}_.computeNumberOfVertices=function(t){w.typeOf.object("geometry",t);let m=-1;for(let u in t.attributes)if(t.attributes.hasOwnProperty(u)&&I(t.attributes[u])&&I(t.attributes[u].values)){let o=t.attributes[u],e=o.values.length/o.componentsPerAttribute;if(m!==e&&m!==-1)throw new N("All attribute lists must have the same number of attributes.");m=e}return m};var W=new h,H=new A,V=new l,Z=[new h,new h,new h],K=[new a,new a,new a],$=[new a,new a,new a],tt=new A,et=new O,rt=new l,nt=new L;_._textureCoordinateRotationPoints=function(t,m,u,o){let e,g=G.center(o,W),D=h.toCartesian(g,u,H),Y=R.eastNorthUpToFixedFrame(D,u,V),C=l.inverse(Y,V),b=K,f=Z;f[0].longitude=o.west,f[0].latitude=o.south,f[1].longitude=o.west,f[1].latitude=o.north,f[2].longitude=o.east,f[2].latitude=o.south;let n=tt;for(e=0;e<3;e++)h.toCartesian(f[e],u,n),n=l.multiplyByPointAsVector(C,n,n),b[e].x=n.x,b[e].y=n.y;let B=O.fromAxisAngle(A.UNIT_Z,-m,et),v=y.fromQuaternion(B,rt),j=t.length,T=Number.POSITIVE_INFINITY,p=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(e=0;e<j;e++)n=l.multiplyByPointAsVector(C,t[e],n),n=y.multiplyByVector(v,n,n),T=Math.min(T,n.x),p=Math.min(p,n.y),d=Math.max(d,n.x),x=Math.max(x,n.y);let k=L.fromRotation(m,nt),i=$;i[0].x=T,i[0].y=p,i[1].x=T,i[1].y=x,i[2].x=d,i[2].y=p;let P=b[0],z=b[2].x-P.x,X=b[1].y-P.y;for(e=0;e<3;e++){let E=i[e];L.multiplyByVector(k,E,E),E.x=(E.x-P.x)/z,E.y=(E.y-P.y)/X}let q=i[0],J=i[1],Q=i[2],S=new Array(6);return a.pack(q,S),a.pack(J,S,2),a.pack(Q,S,4),S};var Lt=_;function ot(t){if(t=s(t,s.EMPTY_OBJECT),!I(t.componentDatatype))throw new N("options.componentDatatype is required.");if(!I(t.componentsPerAttribute))throw new N("options.componentsPerAttribute is required.");if(t.componentsPerAttribute<1||t.componentsPerAttribute>4)throw new N("options.componentsPerAttribute must be between 1 and 4.");if(!I(t.values))throw new N("options.values is required.");this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=s(t.normalize,!1),this.values=t.values}var Ot=ot;export{M as a,F as b,Lt as c,Ot as d}; diff --git a/cesium/Workers/chunk-TK3AFTVI.js b/cesium/Workers/chunk-XHX2UPDO.js similarity index 94% rename from cesium/Workers/chunk-TK3AFTVI.js rename to cesium/Workers/chunk-XHX2UPDO.js index aa5d422..0e494b2 100644 --- a/cesium/Workers/chunk-TK3AFTVI.js +++ b/cesium/Workers/chunk-XHX2UPDO.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as z,c as q}from"./chunk-DVG6ROYF.js";import{a as U}from"./chunk-WIE5YNSS.js";import{f as I}from"./chunk-CMXCDAKR.js";import{a as e,e as C}from"./chunk-LJCGAQ64.js";import{a as O}from"./chunk-JFG572S7.js";import{e as j}from"./chunk-U73D6PDD.js";var G={},B=new e,J=new e,_=new e,v=new e,g=[new e,new e],K=new e,W=new e,X=new e,$=new e,ee=new e,te=new e,ne=new e,oe=new e,re=new e,se=new e,F=new I,k=new C;function V(o,s,a,c,r){let d=e.angleBetween(e.subtract(s,o,B),e.subtract(a,o,J)),y=c===z.BEVELED?1:Math.ceil(d/O.toRadians(5))+1,n=y*3,l=new Array(n);l[n-3]=a.x,l[n-2]=a.y,l[n-1]=a.z;let m;r?m=C.fromQuaternion(I.fromAxisAngle(e.negate(o,B),d/y,F),k):m=C.fromQuaternion(I.fromAxisAngle(o,d/y,F),k);let t=0;s=e.clone(s,B);for(let i=0;i<y;i++)s=C.multiplyByVector(m,s,s),l[t++]=s.x,l[t++]=s.y,l[t++]=s.z;return l}function ae(o){let s=K,a=W,c=X,r=o[1];a=e.fromArray(o[1],r.length-3,a),c=e.fromArray(o[0],0,c),s=e.midpoint(a,c,s);let d=V(s,a,c,z.ROUNDED,!1),y=o.length-1,n=o[y-1];r=o[y],a=e.fromArray(n,n.length-3,a),c=e.fromArray(r,0,c),s=e.midpoint(a,c,s);let l=V(s,a,c,z.ROUNDED,!1);return[d,l]}function H(o,s,a,c){let r=B;return c?r=e.add(o,s,r):(s=e.negate(s,s),r=e.add(o,s,r)),[r.x,r.y,r.z,a.x,a.y,a.z]}function T(o,s,a,c){let r=new Array(o.length),d=new Array(o.length),y=e.multiplyByScalar(s,a,B),n=e.negate(y,J),l=0,m=o.length-1;for(let t=0;t<o.length;t+=3){let i=e.fromArray(o,t,_),w=e.add(i,n,v);r[l++]=w.x,r[l++]=w.y,r[l++]=w.z;let f=e.add(i,y,v);d[m--]=f.z,d[m--]=f.y,d[m--]=f.x}return c.push(r,d),c}G.addAttribute=function(o,s,a,c){let r=s.x,d=s.y,y=s.z;j(a)&&(o[a]=r,o[a+1]=d,o[a+2]=y),j(c)&&(o[c]=y,o[c-1]=d,o[c-2]=r)};var le=new e,ce=new e;G.computePositions=function(o){let s=o.granularity,a=o.positions,c=o.ellipsoid,r=o.width/2,d=o.cornerType,y=o.saveAttributes,n=K,l=W,m=X,t=$,i=ee,w=te,f=ne,u=oe,p=re,x=se,E=[],S=y?[]:void 0,D=y?[]:void 0,h=a[0],N=a[1];l=e.normalize(e.subtract(N,h,l),l),n=c.geodeticSurfaceNormal(h,n),t=e.normalize(e.cross(n,l,t),t),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z)),f=e.clone(h,f),h=N,m=e.negate(l,m);let A,P=[],M,Y=a.length;for(M=1;M<Y-1;M++){n=c.geodeticSurfaceNormal(h,n),N=a[M+1],l=e.normalize(e.subtract(N,h,l),l),i=e.normalize(e.add(l,m,i),i);let L=e.multiplyByScalar(n,e.dot(l,n),le);e.subtract(l,L,L),e.normalize(L,L);let R=e.multiplyByScalar(n,e.dot(m,n),ce);if(e.subtract(m,R,R),e.normalize(R,R),!O.equalsEpsilon(Math.abs(e.dot(L,R)),1,O.EPSILON7)){i=e.cross(i,n,i),i=e.cross(n,i,i),i=e.normalize(i,i);let Z=r/Math.max(.25,e.magnitude(e.cross(i,m,B))),b=q.angleIsGreaterThanPi(l,m,h,c);i=e.multiplyByScalar(i,Z,i),b?(u=e.add(h,i,u),x=e.add(u,e.multiplyByScalar(t,r,x),x),p=e.add(u,e.multiplyByScalar(t,r*2,p),p),g[0]=e.clone(f,g[0]),g[1]=e.clone(x,g[1]),A=U.generateArc({positions:g,granularity:s,ellipsoid:c}),E=T(A,t,r,E),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z)),w=e.clone(p,w),t=e.normalize(e.cross(n,l,t),t),p=e.add(u,e.multiplyByScalar(t,r*2,p),p),f=e.add(u,e.multiplyByScalar(t,r,f),f),d===z.ROUNDED||d===z.BEVELED?P.push({leftPositions:V(u,w,p,d,b)}):P.push({leftPositions:H(h,e.negate(i,i),p,b)})):(p=e.add(h,i,p),x=e.add(p,e.negate(e.multiplyByScalar(t,r,x),x),x),u=e.add(p,e.negate(e.multiplyByScalar(t,r*2,u),u),u),g[0]=e.clone(f,g[0]),g[1]=e.clone(x,g[1]),A=U.generateArc({positions:g,granularity:s,ellipsoid:c}),E=T(A,t,r,E),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z)),w=e.clone(u,w),t=e.normalize(e.cross(n,l,t),t),u=e.add(p,e.negate(e.multiplyByScalar(t,r*2,u),u),u),f=e.add(p,e.negate(e.multiplyByScalar(t,r,f),f),f),d===z.ROUNDED||d===z.BEVELED?P.push({rightPositions:V(p,w,u,d,b)}):P.push({rightPositions:H(h,i,u,b)})),m=e.negate(l,m)}h=N}n=c.geodeticSurfaceNormal(h,n),g[0]=e.clone(f,g[0]),g[1]=e.clone(h,g[1]),A=U.generateArc({positions:g,granularity:s,ellipsoid:c}),E=T(A,t,r,E),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z));let Q;return d===z.ROUNDED&&(Q=ae(E)),{positions:E,corners:P,lefts:S,normals:D,endPositions:Q}};var we=G;export{we as a}; +import{a as z,c as q}from"./chunk-K4ASOM65.js";import{a as U}from"./chunk-AMQUWUD4.js";import{f as I}from"./chunk-7Z5IIKOJ.js";import{a as e,e as C}from"./chunk-POASMU2N.js";import{a as O}from"./chunk-R6KGAEF6.js";import{e as j}from"./chunk-PEYJTJPE.js";var G={},B=new e,J=new e,_=new e,v=new e,g=[new e,new e],K=new e,W=new e,X=new e,$=new e,ee=new e,te=new e,ne=new e,oe=new e,re=new e,se=new e,F=new I,k=new C;function V(o,s,a,c,r){let d=e.angleBetween(e.subtract(s,o,B),e.subtract(a,o,J)),y=c===z.BEVELED?1:Math.ceil(d/O.toRadians(5))+1,n=y*3,l=new Array(n);l[n-3]=a.x,l[n-2]=a.y,l[n-1]=a.z;let m;r?m=C.fromQuaternion(I.fromAxisAngle(e.negate(o,B),d/y,F),k):m=C.fromQuaternion(I.fromAxisAngle(o,d/y,F),k);let t=0;s=e.clone(s,B);for(let i=0;i<y;i++)s=C.multiplyByVector(m,s,s),l[t++]=s.x,l[t++]=s.y,l[t++]=s.z;return l}function ae(o){let s=K,a=W,c=X,r=o[1];a=e.fromArray(o[1],r.length-3,a),c=e.fromArray(o[0],0,c),s=e.midpoint(a,c,s);let d=V(s,a,c,z.ROUNDED,!1),y=o.length-1,n=o[y-1];r=o[y],a=e.fromArray(n,n.length-3,a),c=e.fromArray(r,0,c),s=e.midpoint(a,c,s);let l=V(s,a,c,z.ROUNDED,!1);return[d,l]}function H(o,s,a,c){let r=B;return c?r=e.add(o,s,r):(s=e.negate(s,s),r=e.add(o,s,r)),[r.x,r.y,r.z,a.x,a.y,a.z]}function T(o,s,a,c){let r=new Array(o.length),d=new Array(o.length),y=e.multiplyByScalar(s,a,B),n=e.negate(y,J),l=0,m=o.length-1;for(let t=0;t<o.length;t+=3){let i=e.fromArray(o,t,_),w=e.add(i,n,v);r[l++]=w.x,r[l++]=w.y,r[l++]=w.z;let f=e.add(i,y,v);d[m--]=f.z,d[m--]=f.y,d[m--]=f.x}return c.push(r,d),c}G.addAttribute=function(o,s,a,c){let r=s.x,d=s.y,y=s.z;j(a)&&(o[a]=r,o[a+1]=d,o[a+2]=y),j(c)&&(o[c]=y,o[c-1]=d,o[c-2]=r)};var le=new e,ce=new e;G.computePositions=function(o){let s=o.granularity,a=o.positions,c=o.ellipsoid,r=o.width/2,d=o.cornerType,y=o.saveAttributes,n=K,l=W,m=X,t=$,i=ee,w=te,f=ne,u=oe,p=re,x=se,E=[],S=y?[]:void 0,D=y?[]:void 0,h=a[0],N=a[1];l=e.normalize(e.subtract(N,h,l),l),n=c.geodeticSurfaceNormal(h,n),t=e.normalize(e.cross(n,l,t),t),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z)),f=e.clone(h,f),h=N,m=e.negate(l,m);let A,P=[],M,Y=a.length;for(M=1;M<Y-1;M++){n=c.geodeticSurfaceNormal(h,n),N=a[M+1],l=e.normalize(e.subtract(N,h,l),l),i=e.normalize(e.add(l,m,i),i);let L=e.multiplyByScalar(n,e.dot(l,n),le);e.subtract(l,L,L),e.normalize(L,L);let R=e.multiplyByScalar(n,e.dot(m,n),ce);if(e.subtract(m,R,R),e.normalize(R,R),!O.equalsEpsilon(Math.abs(e.dot(L,R)),1,O.EPSILON7)){i=e.cross(i,n,i),i=e.cross(n,i,i),i=e.normalize(i,i);let Z=r/Math.max(.25,e.magnitude(e.cross(i,m,B))),b=q.angleIsGreaterThanPi(l,m,h,c);i=e.multiplyByScalar(i,Z,i),b?(u=e.add(h,i,u),x=e.add(u,e.multiplyByScalar(t,r,x),x),p=e.add(u,e.multiplyByScalar(t,r*2,p),p),g[0]=e.clone(f,g[0]),g[1]=e.clone(x,g[1]),A=U.generateArc({positions:g,granularity:s,ellipsoid:c}),E=T(A,t,r,E),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z)),w=e.clone(p,w),t=e.normalize(e.cross(n,l,t),t),p=e.add(u,e.multiplyByScalar(t,r*2,p),p),f=e.add(u,e.multiplyByScalar(t,r,f),f),d===z.ROUNDED||d===z.BEVELED?P.push({leftPositions:V(u,w,p,d,b)}):P.push({leftPositions:H(h,e.negate(i,i),p,b)})):(p=e.add(h,i,p),x=e.add(p,e.negate(e.multiplyByScalar(t,r,x),x),x),u=e.add(p,e.negate(e.multiplyByScalar(t,r*2,u),u),u),g[0]=e.clone(f,g[0]),g[1]=e.clone(x,g[1]),A=U.generateArc({positions:g,granularity:s,ellipsoid:c}),E=T(A,t,r,E),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z)),w=e.clone(u,w),t=e.normalize(e.cross(n,l,t),t),u=e.add(p,e.negate(e.multiplyByScalar(t,r*2,u),u),u),f=e.add(p,e.negate(e.multiplyByScalar(t,r,f),f),f),d===z.ROUNDED||d===z.BEVELED?P.push({rightPositions:V(p,w,u,d,b)}):P.push({rightPositions:H(h,i,u,b)})),m=e.negate(l,m)}h=N}n=c.geodeticSurfaceNormal(h,n),g[0]=e.clone(f,g[0]),g[1]=e.clone(h,g[1]),A=U.generateArc({positions:g,granularity:s,ellipsoid:c}),E=T(A,t,r,E),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z));let Q;return d===z.ROUNDED&&(Q=ae(E)),{positions:E,corners:P,lefts:S,normals:D,endPositions:Q}};var we=G;export{we as a}; diff --git a/cesium/Workers/combineGeometry.js b/cesium/Workers/combineGeometry.js index 530b3fb..a79a344 100644 --- a/cesium/Workers/combineGeometry.js +++ b/cesium/Workers/combineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as e}from"./chunk-ACE4ZHPK.js";import{a as r}from"./chunk-4FSMRIBR.js";import"./chunk-7RBDS4IP.js";import"./chunk-7JCIFY66.js";import"./chunk-ED2EM7ZX.js";import"./chunk-YZP3DYN3.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import"./chunk-U73D6PDD.js";function n(o,t){let m=e.unpackCombineGeometryParameters(o),i=e.combineGeometry(m);return e.packCombineGeometryResults(i,t)}var c=r(n);export{c as default}; +import{a as e}from"./chunk-FKRG4HDY.js";import{a as r}from"./chunk-PXCJYT2S.js";import"./chunk-SB224QGV.js";import"./chunk-QB3MDM4J.js";import"./chunk-ABGXSJNX.js";import"./chunk-DQO6B4EQ.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import"./chunk-PEYJTJPE.js";function n(o,t){let m=e.unpackCombineGeometryParameters(o),i=e.combineGeometry(m);return e.packCombineGeometryResults(i,t)}var c=r(n);export{c as default}; diff --git a/cesium/Workers/createBoxGeometry.js b/cesium/Workers/createBoxGeometry.js index 80b5f39..74ed222 100644 --- a/cesium/Workers/createBoxGeometry.js +++ b/cesium/Workers/createBoxGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as r}from"./chunk-X5DMAS4Q.js";import"./chunk-WLRVP2UA.js";import"./chunk-DUVNED7U.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import{e as o}from"./chunk-U73D6PDD.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; +import{a as r}from"./chunk-VBIROZR5.js";import"./chunk-ILGBPNP6.js";import"./chunk-HEEMUCG6.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import{e as o}from"./chunk-PEYJTJPE.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; diff --git a/cesium/Workers/createBoxOutlineGeometry.js b/cesium/Workers/createBoxOutlineGeometry.js index e076ab9..e20d6cf 100644 --- a/cesium/Workers/createBoxOutlineGeometry.js +++ b/cesium/Workers/createBoxOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as d}from"./chunk-WLRVP2UA.js";import{a as l}from"./chunk-MPVEZNKB.js";import{b as O,c as h,d as p}from"./chunk-FATK2EQ2.js";import{d as A}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a}from"./chunk-77ESX6BV.js";import{a as m}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as u}from"./chunk-42NIXFVW.js";import{a as b,b as r}from"./chunk-5YVCOCPP.js";import{e as c}from"./chunk-U73D6PDD.js";var g=new m;function f(e){e=u(e,u.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;if(r.typeOf.object("min",t),r.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===d.TOP)throw new b("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=m.clone(t),this._max=m.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}f.fromDimensions=function(e){e=u(e,u.EMPTY_OBJECT);let t=e.dimensions;r.typeOf.object("dimensions",t),r.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),r.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),r.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);let n=m.multiplyByScalar(t,.5,new m);return new f({minimum:m.negate(n,new m),maximum:n,offsetAttribute:e.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(e){return r.typeOf.object("boundindBox",e),new f({minimum:e.minimum,maximum:e.maximum})};f.packedLength=2*m.packedLength+1;f.pack=function(e,t,n){return r.typeOf.object("value",e),r.defined("array",t),n=u(n,0),m.pack(e._min,t,n),m.pack(e._max,t,n+m.packedLength),t[n+m.packedLength*2]=u(e._offsetAttribute,-1),t};var w=new m,x=new m,_={minimum:w,maximum:x,offsetAttribute:void 0};f.unpack=function(e,t,n){r.defined("array",e),t=u(t,0);let s=m.unpack(e,t,w),o=m.unpack(e,t+m.packedLength,x),i=e[t+m.packedLength*2];return c(n)?(n._min=m.clone(s,n._min),n._max=m.clone(o,n._max),n._offsetAttribute=i===-1?void 0:i,n):(_.offsetAttribute=i===-1?void 0:i,new f(_))};f.createGeometry=function(e){let t=e._min,n=e._max;if(m.equals(t,n))return;let s=new l,o=new Uint16Array(12*2),i=new Float64Array(8*3);i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=n.x,i[4]=t.y,i[5]=t.z,i[6]=n.x,i[7]=n.y,i[8]=t.z,i[9]=t.x,i[10]=n.y,i[11]=t.z,i[12]=t.x,i[13]=t.y,i[14]=n.z,i[15]=n.x,i[16]=t.y,i[17]=n.z,i[18]=n.x,i[19]=n.y,i[20]=n.z,i[21]=t.x,i[22]=n.y,i[23]=n.z,s.position=new p({componentDatatype:a.DOUBLE,componentsPerAttribute:3,values:i}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let k=m.subtract(n,t,g),E=m.magnitude(k)*.5;if(c(e._offsetAttribute)){let T=i.length,B=e._offsetAttribute===d.NONE?0:1,z=new Uint8Array(T/3).fill(B);s.applyOffset=new p({componentDatatype:a.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return new h({attributes:s,indices:o,primitiveType:O.LINES,boundingSphere:new A(m.ZERO,E),offsetAttribute:e._offsetAttribute})};var y=f;function L(e,t){return c(t)&&(e=y.unpack(e,t)),y.createGeometry(e)}var R=L;export{R as default}; +import{a as d}from"./chunk-ILGBPNP6.js";import{a as l}from"./chunk-T6BE4RZK.js";import{b as O,c as h,d as p}from"./chunk-X5IHHI6X.js";import{d as A}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a}from"./chunk-KZNJOCYU.js";import{a as m}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as u}from"./chunk-IUA6FAOZ.js";import{a as b,b as r}from"./chunk-UH2WFNTA.js";import{e as c}from"./chunk-PEYJTJPE.js";var g=new m;function f(e){e=u(e,u.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;if(r.typeOf.object("min",t),r.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===d.TOP)throw new b("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=m.clone(t),this._max=m.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}f.fromDimensions=function(e){e=u(e,u.EMPTY_OBJECT);let t=e.dimensions;r.typeOf.object("dimensions",t),r.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),r.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),r.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);let n=m.multiplyByScalar(t,.5,new m);return new f({minimum:m.negate(n,new m),maximum:n,offsetAttribute:e.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(e){return r.typeOf.object("boundindBox",e),new f({minimum:e.minimum,maximum:e.maximum})};f.packedLength=2*m.packedLength+1;f.pack=function(e,t,n){return r.typeOf.object("value",e),r.defined("array",t),n=u(n,0),m.pack(e._min,t,n),m.pack(e._max,t,n+m.packedLength),t[n+m.packedLength*2]=u(e._offsetAttribute,-1),t};var w=new m,x=new m,_={minimum:w,maximum:x,offsetAttribute:void 0};f.unpack=function(e,t,n){r.defined("array",e),t=u(t,0);let s=m.unpack(e,t,w),o=m.unpack(e,t+m.packedLength,x),i=e[t+m.packedLength*2];return c(n)?(n._min=m.clone(s,n._min),n._max=m.clone(o,n._max),n._offsetAttribute=i===-1?void 0:i,n):(_.offsetAttribute=i===-1?void 0:i,new f(_))};f.createGeometry=function(e){let t=e._min,n=e._max;if(m.equals(t,n))return;let s=new l,o=new Uint16Array(12*2),i=new Float64Array(8*3);i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=n.x,i[4]=t.y,i[5]=t.z,i[6]=n.x,i[7]=n.y,i[8]=t.z,i[9]=t.x,i[10]=n.y,i[11]=t.z,i[12]=t.x,i[13]=t.y,i[14]=n.z,i[15]=n.x,i[16]=t.y,i[17]=n.z,i[18]=n.x,i[19]=n.y,i[20]=n.z,i[21]=t.x,i[22]=n.y,i[23]=n.z,s.position=new p({componentDatatype:a.DOUBLE,componentsPerAttribute:3,values:i}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let k=m.subtract(n,t,g),E=m.magnitude(k)*.5;if(c(e._offsetAttribute)){let T=i.length,B=e._offsetAttribute===d.NONE?0:1,z=new Uint8Array(T/3).fill(B);s.applyOffset=new p({componentDatatype:a.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return new h({attributes:s,indices:o,primitiveType:O.LINES,boundingSphere:new A(m.ZERO,E),offsetAttribute:e._offsetAttribute})};var y=f;function L(e,t){return c(t)&&(e=y.unpack(e,t)),y.createGeometry(e)}var R=L;export{R as default}; diff --git a/cesium/Workers/createCircleGeometry.js b/cesium/Workers/createCircleGeometry.js index 8cee124..50276d3 100644 --- a/cesium/Workers/createCircleGeometry.js +++ b/cesium/Workers/createCircleGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as s}from"./chunk-QBLZNHRV.js";import"./chunk-Y5ISG54S.js";import"./chunk-CRFMECNE.js";import"./chunk-7JCIFY66.js";import"./chunk-ED2EM7ZX.js";import"./chunk-YZP3DYN3.js";import"./chunk-WLRVP2UA.js";import{a as d}from"./chunk-DUVNED7U.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as l,d as a}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as c}from"./chunk-42NIXFVW.js";import{b as p}from"./chunk-5YVCOCPP.js";import{e as m}from"./chunk-U73D6PDD.js";function n(e){e=c(e,c.EMPTY_OBJECT);let r=e.radius;p.typeOf.number("radius",r);let o={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new s(o),this._workerName="createCircleGeometry"}n.packedLength=s.packedLength;n.pack=function(e,r,o){return p.typeOf.object("value",e),s.pack(e._ellipseGeometry,r,o)};var x=new s({center:new l,semiMajorAxis:1,semiMinorAxis:1}),t={center:new l,radius:void 0,ellipsoid:a.clone(a.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new d,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};n.unpack=function(e,r,o){let i=s.unpack(e,r,x);return t.center=l.clone(i._center,t.center),t.ellipsoid=a.clone(i._ellipsoid,t.ellipsoid),t.height=i._height,t.extrudedHeight=i._extrudedHeight,t.granularity=i._granularity,t.vertexFormat=d.clone(i._vertexFormat,t.vertexFormat),t.stRotation=i._stRotation,t.shadowVolume=i._shadowVolume,m(o)?(t.semiMajorAxis=i._semiMajorAxis,t.semiMinorAxis=i._semiMinorAxis,o._ellipseGeometry=new s(t),o):(t.radius=i._semiMajorAxis,new n(t))};n.createGeometry=function(e){return s.createGeometry(e._ellipseGeometry)};n.createShadowVolume=function(e,r,o){let i=e._ellipseGeometry._granularity,u=e._ellipseGeometry._ellipsoid,h=r(i,u),f=o(i,u);return new n({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:u,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:h,height:f,vertexFormat:d.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(n.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var _=n;function g(e,r){return m(r)&&(e=_.unpack(e,r)),e._ellipseGeometry._center=l.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=a.clone(e._ellipseGeometry._ellipsoid),_.createGeometry(e)}var E=g;export{E as default}; +import{a as l}from"./chunk-KRKI6AAO.js";import"./chunk-BMHPVZ4H.js";import"./chunk-EFZKO5RU.js";import"./chunk-QB3MDM4J.js";import"./chunk-ABGXSJNX.js";import"./chunk-DQO6B4EQ.js";import"./chunk-ILGBPNP6.js";import{a as m}from"./chunk-HEEMUCG6.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a,d as s}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as c}from"./chunk-IUA6FAOZ.js";import{b as p}from"./chunk-UH2WFNTA.js";import{e as d}from"./chunk-PEYJTJPE.js";function n(e){e=c(e,c.EMPTY_OBJECT);let r=e.radius;p.typeOf.number("radius",r);let o={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new l(o),this._workerName="createCircleGeometry"}n.packedLength=l.packedLength;n.pack=function(e,r,o){return p.typeOf.object("value",e),l.pack(e._ellipseGeometry,r,o)};var f=new l({center:new a,semiMajorAxis:1,semiMinorAxis:1}),t={center:new a,radius:void 0,ellipsoid:s.clone(s.default),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new m,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};n.unpack=function(e,r,o){let i=l.unpack(e,r,f);return t.center=a.clone(i._center,t.center),t.ellipsoid=s.clone(i._ellipsoid,t.ellipsoid),t.ellipsoid=s.clone(i._ellipsoid,f._ellipsoid),t.height=i._height,t.extrudedHeight=i._extrudedHeight,t.granularity=i._granularity,t.vertexFormat=m.clone(i._vertexFormat,t.vertexFormat),t.stRotation=i._stRotation,t.shadowVolume=i._shadowVolume,d(o)?(t.semiMajorAxis=i._semiMajorAxis,t.semiMinorAxis=i._semiMinorAxis,o._ellipseGeometry=new l(t),o):(t.radius=i._semiMajorAxis,new n(t))};n.createGeometry=function(e){return l.createGeometry(e._ellipseGeometry)};n.createShadowVolume=function(e,r,o){let i=e._ellipseGeometry._granularity,u=e._ellipseGeometry._ellipsoid,h=r(i,u),x=o(i,u);return new n({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:u,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:h,height:x,vertexFormat:m.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(n.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var _=n;function g(e,r){return d(r)&&(e=_.unpack(e,r)),e._ellipseGeometry._center=a.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=s.clone(e._ellipseGeometry._ellipsoid),_.createGeometry(e)}var H=g;export{H as default}; diff --git a/cesium/Workers/createCircleOutlineGeometry.js b/cesium/Workers/createCircleOutlineGeometry.js index 6a2eea2..3699638 100644 --- a/cesium/Workers/createCircleOutlineGeometry.js +++ b/cesium/Workers/createCircleOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as n}from"./chunk-JE5KQ6H6.js";import"./chunk-Y5ISG54S.js";import"./chunk-WLRVP2UA.js";import"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as o,d as s}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as u}from"./chunk-42NIXFVW.js";import{b as d}from"./chunk-5YVCOCPP.js";import{e as a}from"./chunk-U73D6PDD.js";function m(e){e=u(e,u.EMPTY_OBJECT);let r=e.radius;d.typeOf.number("radius",r);let l={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new n(l),this._workerName="createCircleOutlineGeometry"}m.packedLength=n.packedLength;m.pack=function(e,r,l){return d.typeOf.object("value",e),n.pack(e._ellipseGeometry,r,l)};var p=new n({center:new o,semiMajorAxis:1,semiMinorAxis:1}),i={center:new o,radius:void 0,ellipsoid:s.clone(s.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};m.unpack=function(e,r,l){let t=n.unpack(e,r,p);return i.center=o.clone(t._center,i.center),i.ellipsoid=s.clone(t._ellipsoid,i.ellipsoid),i.height=t._height,i.extrudedHeight=t._extrudedHeight,i.granularity=t._granularity,i.numberOfVerticalLines=t._numberOfVerticalLines,a(l)?(i.semiMajorAxis=t._semiMajorAxis,i.semiMinorAxis=t._semiMinorAxis,l._ellipseGeometry=new n(i),l):(i.radius=t._semiMajorAxis,new m(i))};m.createGeometry=function(e){return n.createGeometry(e._ellipseGeometry)};var c=m;function f(e,r){return a(r)&&(e=c.unpack(e,r)),e._ellipseGeometry._center=o.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=s.clone(e._ellipseGeometry._ellipsoid),c.createGeometry(e)}var E=f;export{E as default}; +import{a as n}from"./chunk-4BTGX3WJ.js";import"./chunk-BMHPVZ4H.js";import"./chunk-ILGBPNP6.js";import"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as o,d as s}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as u}from"./chunk-IUA6FAOZ.js";import{b as d}from"./chunk-UH2WFNTA.js";import{e as a}from"./chunk-PEYJTJPE.js";function m(e){e=u(e,u.EMPTY_OBJECT);let r=e.radius;d.typeOf.number("radius",r);let l={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new n(l),this._workerName="createCircleOutlineGeometry"}m.packedLength=n.packedLength;m.pack=function(e,r,l){return d.typeOf.object("value",e),n.pack(e._ellipseGeometry,r,l)};var p=new n({center:new o,semiMajorAxis:1,semiMinorAxis:1}),i={center:new o,radius:void 0,ellipsoid:s.clone(s.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};m.unpack=function(e,r,l){let t=n.unpack(e,r,p);return i.center=o.clone(t._center,i.center),i.ellipsoid=s.clone(t._ellipsoid,i.ellipsoid),i.height=t._height,i.extrudedHeight=t._extrudedHeight,i.granularity=t._granularity,i.numberOfVerticalLines=t._numberOfVerticalLines,a(l)?(i.semiMajorAxis=t._semiMajorAxis,i.semiMinorAxis=t._semiMinorAxis,l._ellipseGeometry=new n(i),l):(i.radius=t._semiMajorAxis,new m(i))};m.createGeometry=function(e){return n.createGeometry(e._ellipseGeometry)};var c=m;function f(e,r){return a(r)&&(e=c.unpack(e,r)),e._ellipseGeometry._center=o.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=s.clone(e._ellipseGeometry._ellipsoid),c.createGeometry(e)}var E=f;export{E as default}; diff --git a/cesium/Workers/createCoplanarPolygonGeometry.js b/cesium/Workers/createCoplanarPolygonGeometry.js index 7adb4cb..abbeddf 100644 --- a/cesium/Workers/createCoplanarPolygonGeometry.js +++ b/cesium/Workers/createCoplanarPolygonGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as et}from"./chunk-JFTXHZ2O.js";import{a as U}from"./chunk-7KKODWB2.js";import"./chunk-K62YE2WO.js";import{a as y}from"./chunk-Q7FDDGQE.js";import"./chunk-EQCQ5LRI.js";import{a as I}from"./chunk-CRFMECNE.js";import{a as $}from"./chunk-7JCIFY66.js";import"./chunk-ED2EM7ZX.js";import"./chunk-YZP3DYN3.js";import{a as u}from"./chunk-DUVNED7U.js";import"./chunk-TLL4Q2KI.js";import"./chunk-4IWHN7T4.js";import{b as ot}from"./chunk-LKPDAB55.js";import{a as tt}from"./chunk-CIEXTRKV.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as J}from"./chunk-RQXB4B4V.js";import{a as X}from"./chunk-MPVEZNKB.js";import{b as K,c as Y,d as z}from"./chunk-FATK2EQ2.js";import{d as Z}from"./chunk-3FEM743H.js";import{f as Q}from"./chunk-CMXCDAKR.js";import{a as N}from"./chunk-77ESX6BV.js";import{a as i,c as x,d as m,e as P}from"./chunk-LJCGAQ64.js";import{a as q}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as f}from"./chunk-42NIXFVW.js";import{b as B}from"./chunk-5YVCOCPP.js";import{e as g}from"./chunk-U73D6PDD.js";var st=new i,at=new et,pt=new x,lt=new x,mt=new i,ft=new i,ut=new i,V=new i,yt=new i,ht=new i,nt=new Q,dt=new P,gt=new P,Pt=new i;function wt(e,t,o,a,h,A,r,n,p){let b=e.positions,c=ot.triangulate(e.positions2D,e.holes);c.length<3&&(c=[0,1,2]);let w=J.createTypedArray(b.length,c.length);w.set(c);let S=dt;if(a!==0){let d=Q.fromAxisAngle(r,a,nt);if(S=P.fromQuaternion(d,S),t.tangent||t.bitangent){d=Q.fromAxisAngle(r,-a,nt);let G=P.fromQuaternion(d,gt);n=i.normalize(P.multiplyByVector(G,n,n),n),t.bitangent&&(p=i.normalize(i.cross(r,n,p),p))}}else S=P.clone(P.IDENTITY,S);let j=lt;t.st&&(j.x=o.x,j.y=o.y);let k=b.length,C=k*3,L=new Float64Array(C),T=t.normal?new Float32Array(C):void 0,D=t.tangent?new Float32Array(C):void 0,R=t.bitangent?new Float32Array(C):void 0,H=t.st?new Float32Array(k*2):void 0,M=0,F=0,l=0,O=0,s=0;for(let d=0;d<k;d++){let G=b[d];if(L[M++]=G.x,L[M++]=G.y,L[M++]=G.z,t.st)if(g(h)&&h.positions.length===k)H[s++]=h.positions[d].x,H[s++]=h.positions[d].y;else{let it=P.multiplyByVector(S,G,st),v=A(it,pt);x.subtract(v,j,v);let rt=q.clamp(v.x/o.width,0,1),ct=q.clamp(v.y/o.height,0,1);H[s++]=rt,H[s++]=ct}t.normal&&(T[F++]=r.x,T[F++]=r.y,T[F++]=r.z),t.tangent&&(D[O++]=n.x,D[O++]=n.y,D[O++]=n.z),t.bitangent&&(R[l++]=p.x,R[l++]=p.y,R[l++]=p.z)}let _=new X;return t.position&&(_.position=new z({componentDatatype:N.DOUBLE,componentsPerAttribute:3,values:L})),t.normal&&(_.normal=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:T})),t.tangent&&(_.tangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:D})),t.bitangent&&(_.bitangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:R})),t.st&&(_.st=new z({componentDatatype:N.FLOAT,componentsPerAttribute:2,values:H})),new Y({attributes:_,indices:w,primitiveType:K.TRIANGLES})}function E(e){e=f(e,f.EMPTY_OBJECT);let t=e.polygonHierarchy,o=e.textureCoordinates;B.defined("options.polygonHierarchy",t);let a=f(e.vertexFormat,u.DEFAULT);this._vertexFormat=u.clone(a),this._polygonHierarchy=t,this._stRotation=f(e.stRotation,0),this._ellipsoid=m.clone(f(e.ellipsoid,m.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=o,this.packedLength=y.computeHierarchyPackedLength(t,i)+u.packedLength+m.packedLength+(g(o)?y.computeHierarchyPackedLength(o,x):1)+2}E.fromPositions=function(e){e=f(e,f.EMPTY_OBJECT),B.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new E(t)};E.pack=function(e,t,o){return B.typeOf.object("value",e),B.defined("array",t),o=f(o,0),o=y.packPolygonHierarchy(e._polygonHierarchy,t,o,i),m.pack(e._ellipsoid,t,o),o+=m.packedLength,u.pack(e._vertexFormat,t,o),o+=u.packedLength,t[o++]=e._stRotation,g(e._textureCoordinates)?o=y.packPolygonHierarchy(e._textureCoordinates,t,o,x):t[o++]=-1,t[o++]=e.packedLength,t};var _t=m.clone(m.UNIT_SPHERE),At=new u,bt={polygonHierarchy:{}};E.unpack=function(e,t,o){B.defined("array",e),t=f(t,0);let a=y.unpackPolygonHierarchy(e,t,i);t=a.startingIndex,delete a.startingIndex;let h=m.unpack(e,t,_t);t+=m.packedLength;let A=u.unpack(e,t,At);t+=u.packedLength;let r=e[t++],n=e[t]===-1?void 0:y.unpackPolygonHierarchy(e,t,x);g(n)?(t=n.startingIndex,delete n.startingIndex):t++;let p=e[t++];return g(o)||(o=new E(bt)),o._polygonHierarchy=a,o._ellipsoid=m.clone(h,o._ellipsoid),o._vertexFormat=u.clone(A,o._vertexFormat),o._stRotation=r,o._textureCoordinates=n,o.packedLength=p,o};E.createGeometry=function(e){let t=e._vertexFormat,o=e._polygonHierarchy,a=e._stRotation,h=e._textureCoordinates,A=g(h),r=o.positions;if(r=tt(r,i.equalsEpsilon,!0),r.length<3)return;let n=mt,p=ft,b=ut,c=yt,w=ht;if(!U.computeProjectTo2DArguments(r,V,c,w))return;if(n=i.cross(c,w,n),n=i.normalize(n,n),!i.equalsEpsilon(V,i.ZERO,q.EPSILON6)){let s=e._ellipsoid.geodeticSurfaceNormal(V,Pt);i.dot(n,s)<0&&(n=i.negate(n,n),c=i.negate(c,c))}let j=U.createProjectPointsTo2DFunction(V,c,w),k=U.createProjectPointTo2DFunction(V,c,w);t.tangent&&(p=i.clone(c,p)),t.bitangent&&(b=i.clone(w,b));let C=y.polygonsFromHierarchy(o,A,j,!1),L=C.hierarchy,T=C.polygons,D=function(s){return s},R=A?y.polygonsFromHierarchy(h,!0,D,!1).polygons:void 0;if(L.length===0)return;r=L[0].outerRing;let H=Z.fromPoints(r),M=y.computeBoundingRectangle(n,k,r,a,at),F=[];for(let s=0;s<T.length;s++){let _=new I({geometry:wt(T[s],t,M,a,A?R[s]:void 0,k,n,p,b)});F.push(_)}let l=$.combineInstances(F)[0];l.attributes.position.values=new Float64Array(l.attributes.position.values),l.indices=J.createTypedArray(l.attributes.position.values.length/3,l.indices);let O=l.attributes;return t.position||delete O.position,new Y({attributes:O,indices:l.indices,primitiveType:l.primitiveType,boundingSphere:H})};var W=E;function kt(e,t){return g(t)&&(e=W.unpack(e,t)),W.createGeometry(e)}var Xt=kt;export{Xt as default}; +import{a as et}from"./chunk-3JW36LZF.js";import{a as U}from"./chunk-ED3TLP6D.js";import"./chunk-Q6L7X3LP.js";import{a as y}from"./chunk-HSWA4OEL.js";import"./chunk-ATPDRNKI.js";import{a as I}from"./chunk-EFZKO5RU.js";import{a as $}from"./chunk-QB3MDM4J.js";import"./chunk-ABGXSJNX.js";import"./chunk-DQO6B4EQ.js";import{a as u}from"./chunk-HEEMUCG6.js";import"./chunk-KF5NF354.js";import"./chunk-4WRMLZA7.js";import{b as ot}from"./chunk-O5IJ3OGP.js";import{a as tt}from"./chunk-RXTBM4OI.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as J}from"./chunk-P37AI2DW.js";import{a as X}from"./chunk-T6BE4RZK.js";import{b as W,c as Y,d as z}from"./chunk-X5IHHI6X.js";import{d as K}from"./chunk-TMSETF7M.js";import{f as Q}from"./chunk-7Z5IIKOJ.js";import{a as N}from"./chunk-KZNJOCYU.js";import{a as i,c as x,d as m,e as P}from"./chunk-POASMU2N.js";import{a as q}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as f}from"./chunk-IUA6FAOZ.js";import{b as B}from"./chunk-UH2WFNTA.js";import{e as g}from"./chunk-PEYJTJPE.js";var st=new i,at=new et,pt=new x,lt=new x,mt=new i,ft=new i,ut=new i,V=new i,yt=new i,ht=new i,nt=new Q,dt=new P,gt=new P,Pt=new i;function wt(e,t,o,a,h,A,r,n,p){let b=e.positions,c=ot.triangulate(e.positions2D,e.holes);c.length<3&&(c=[0,1,2]);let w=J.createTypedArray(b.length,c.length);w.set(c);let D=dt;if(a!==0){let d=Q.fromAxisAngle(r,a,nt);if(D=P.fromQuaternion(d,D),t.tangent||t.bitangent){d=Q.fromAxisAngle(r,-a,nt);let G=P.fromQuaternion(d,gt);n=i.normalize(P.multiplyByVector(G,n,n),n),t.bitangent&&(p=i.normalize(i.cross(r,n,p),p))}}else D=P.clone(P.IDENTITY,D);let j=lt;t.st&&(j.x=o.x,j.y=o.y);let k=b.length,C=k*3,L=new Float64Array(C),T=t.normal?new Float32Array(C):void 0,R=t.tangent?new Float32Array(C):void 0,S=t.bitangent?new Float32Array(C):void 0,H=t.st?new Float32Array(k*2):void 0,M=0,F=0,l=0,O=0,s=0;for(let d=0;d<k;d++){let G=b[d];if(L[M++]=G.x,L[M++]=G.y,L[M++]=G.z,t.st)if(g(h)&&h.positions.length===k)H[s++]=h.positions[d].x,H[s++]=h.positions[d].y;else{let it=P.multiplyByVector(D,G,st),v=A(it,pt);x.subtract(v,j,v);let rt=q.clamp(v.x/o.width,0,1),ct=q.clamp(v.y/o.height,0,1);H[s++]=rt,H[s++]=ct}t.normal&&(T[F++]=r.x,T[F++]=r.y,T[F++]=r.z),t.tangent&&(R[O++]=n.x,R[O++]=n.y,R[O++]=n.z),t.bitangent&&(S[l++]=p.x,S[l++]=p.y,S[l++]=p.z)}let _=new X;return t.position&&(_.position=new z({componentDatatype:N.DOUBLE,componentsPerAttribute:3,values:L})),t.normal&&(_.normal=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:T})),t.tangent&&(_.tangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:R})),t.bitangent&&(_.bitangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:S})),t.st&&(_.st=new z({componentDatatype:N.FLOAT,componentsPerAttribute:2,values:H})),new Y({attributes:_,indices:w,primitiveType:W.TRIANGLES})}function E(e){e=f(e,f.EMPTY_OBJECT);let t=e.polygonHierarchy,o=e.textureCoordinates;B.defined("options.polygonHierarchy",t);let a=f(e.vertexFormat,u.DEFAULT);this._vertexFormat=u.clone(a),this._polygonHierarchy=t,this._stRotation=f(e.stRotation,0),this._ellipsoid=m.clone(f(e.ellipsoid,m.default)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=o,this.packedLength=y.computeHierarchyPackedLength(t,i)+u.packedLength+m.packedLength+(g(o)?y.computeHierarchyPackedLength(o,x):1)+2}E.fromPositions=function(e){e=f(e,f.EMPTY_OBJECT),B.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new E(t)};E.pack=function(e,t,o){return B.typeOf.object("value",e),B.defined("array",t),o=f(o,0),o=y.packPolygonHierarchy(e._polygonHierarchy,t,o,i),m.pack(e._ellipsoid,t,o),o+=m.packedLength,u.pack(e._vertexFormat,t,o),o+=u.packedLength,t[o++]=e._stRotation,g(e._textureCoordinates)?o=y.packPolygonHierarchy(e._textureCoordinates,t,o,x):t[o++]=-1,t[o++]=e.packedLength,t};var _t=m.clone(m.UNIT_SPHERE),At=new u,bt={polygonHierarchy:{}};E.unpack=function(e,t,o){B.defined("array",e),t=f(t,0);let a=y.unpackPolygonHierarchy(e,t,i);t=a.startingIndex,delete a.startingIndex;let h=m.unpack(e,t,_t);t+=m.packedLength;let A=u.unpack(e,t,At);t+=u.packedLength;let r=e[t++],n=e[t]===-1?void 0:y.unpackPolygonHierarchy(e,t,x);g(n)?(t=n.startingIndex,delete n.startingIndex):t++;let p=e[t++];return g(o)||(o=new E(bt)),o._polygonHierarchy=a,o._ellipsoid=m.clone(h,o._ellipsoid),o._vertexFormat=u.clone(A,o._vertexFormat),o._stRotation=r,o._textureCoordinates=n,o.packedLength=p,o};E.createGeometry=function(e){let t=e._vertexFormat,o=e._polygonHierarchy,a=e._stRotation,h=e._textureCoordinates,A=g(h),r=o.positions;if(r=tt(r,i.equalsEpsilon,!0),r.length<3)return;let n=mt,p=ft,b=ut,c=yt,w=ht;if(!U.computeProjectTo2DArguments(r,V,c,w))return;if(n=i.cross(c,w,n),n=i.normalize(n,n),!i.equalsEpsilon(V,i.ZERO,q.EPSILON6)){let s=e._ellipsoid.geodeticSurfaceNormal(V,Pt);i.dot(n,s)<0&&(n=i.negate(n,n),c=i.negate(c,c))}let j=U.createProjectPointsTo2DFunction(V,c,w),k=U.createProjectPointTo2DFunction(V,c,w);t.tangent&&(p=i.clone(c,p)),t.bitangent&&(b=i.clone(w,b));let C=y.polygonsFromHierarchy(o,A,j,!1),L=C.hierarchy,T=C.polygons,R=function(s){return s},S=A?y.polygonsFromHierarchy(h,!0,R,!1).polygons:void 0;if(L.length===0)return;r=L[0].outerRing;let H=K.fromPoints(r),M=y.computeBoundingRectangle(n,k,r,a,at),F=[];for(let s=0;s<T.length;s++){let _=new I({geometry:wt(T[s],t,M,a,A?S[s]:void 0,k,n,p,b)});F.push(_)}let l=$.combineInstances(F)[0];l.attributes.position.values=new Float64Array(l.attributes.position.values),l.indices=J.createTypedArray(l.attributes.position.values.length/3,l.indices);let O=l.attributes;return t.position||delete O.position,new Y({attributes:O,indices:l.indices,primitiveType:l.primitiveType,boundingSphere:H})};var Z=E;function kt(e,t){return g(t)&&(e=Z.unpack(e,t)),Z.createGeometry(e)}var Xt=kt;export{Xt as default}; diff --git a/cesium/Workers/createCoplanarPolygonOutlineGeometry.js b/cesium/Workers/createCoplanarPolygonOutlineGeometry.js index a5baea5..f308b64 100644 --- a/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +++ b/cesium/Workers/createCoplanarPolygonOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as T}from"./chunk-7KKODWB2.js";import"./chunk-K62YE2WO.js";import{a as f}from"./chunk-Q7FDDGQE.js";import"./chunk-EQCQ5LRI.js";import{a as G}from"./chunk-CRFMECNE.js";import{a as C}from"./chunk-7JCIFY66.js";import"./chunk-ED2EM7ZX.js";import"./chunk-YZP3DYN3.js";import"./chunk-TLL4Q2KI.js";import"./chunk-4IWHN7T4.js";import"./chunk-LKPDAB55.js";import{a as L}from"./chunk-CIEXTRKV.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as w}from"./chunk-RQXB4B4V.js";import{a as O}from"./chunk-MPVEZNKB.js";import{b,c as d,d as k}from"./chunk-FATK2EQ2.js";import{d as P}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as H}from"./chunk-77ESX6BV.js";import{a as l,d as g}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as c}from"./chunk-42NIXFVW.js";import{b as a}from"./chunk-5YVCOCPP.js";import{e as u}from"./chunk-U73D6PDD.js";function E(o){let e=o.length,t=new Float64Array(e*3),r=w.createTypedArray(e,e*2),i=0,s=0;for(let n=0;n<e;n++){let p=o[n];t[i++]=p.x,t[i++]=p.y,t[i++]=p.z,r[s++]=n,r[s++]=(n+1)%e}let y=new O({position:new k({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:t})});return new d({attributes:y,indices:r,primitiveType:b.LINES})}function m(o){o=c(o,c.EMPTY_OBJECT);let e=o.polygonHierarchy;a.defined("options.polygonHierarchy",e),this._polygonHierarchy=e,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=f.computeHierarchyPackedLength(e,l)+1}m.fromPositions=function(o){o=c(o,c.EMPTY_OBJECT),a.defined("options.positions",o.positions);let e={polygonHierarchy:{positions:o.positions}};return new m(e)};m.pack=function(o,e,t){return a.typeOf.object("value",o),a.defined("array",e),t=c(t,0),t=f.packPolygonHierarchy(o._polygonHierarchy,e,t,l),e[t]=o.packedLength,e};var v={polygonHierarchy:{}};m.unpack=function(o,e,t){a.defined("array",o),e=c(e,0);let r=f.unpackPolygonHierarchy(o,e,l);e=r.startingIndex,delete r.startingIndex;let i=o[e];return u(t)||(t=new m(v)),t._polygonHierarchy=r,t.packedLength=i,t};m.createGeometry=function(o){let e=o._polygonHierarchy,t=e.positions;if(t=L(t,l.equalsEpsilon,!0),t.length<3||!T.validOutline(t))return;let i=f.polygonOutlinesFromHierarchy(e,!1);if(i.length===0)return;let s=[];for(let p=0;p<i.length;p++){let _=new G({geometry:E(i[p])});s.push(_)}let y=C.combineInstances(s)[0],n=P.fromPoints(e.positions);return new d({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:n})};var h=m;function A(o,e){return u(e)&&(o=h.unpack(o,e)),o._ellipsoid=g.clone(o._ellipsoid),h.createGeometry(o)}var Z=A;export{Z as default}; +import{a as T}from"./chunk-ED3TLP6D.js";import"./chunk-Q6L7X3LP.js";import{a as f}from"./chunk-HSWA4OEL.js";import"./chunk-ATPDRNKI.js";import{a as G}from"./chunk-EFZKO5RU.js";import{a as C}from"./chunk-QB3MDM4J.js";import"./chunk-ABGXSJNX.js";import"./chunk-DQO6B4EQ.js";import"./chunk-KF5NF354.js";import"./chunk-4WRMLZA7.js";import"./chunk-O5IJ3OGP.js";import{a as L}from"./chunk-RXTBM4OI.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as w}from"./chunk-P37AI2DW.js";import{a as O}from"./chunk-T6BE4RZK.js";import{b,c as d,d as k}from"./chunk-X5IHHI6X.js";import{d as P}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as H}from"./chunk-KZNJOCYU.js";import{a as l,d as g}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as c}from"./chunk-IUA6FAOZ.js";import{b as a}from"./chunk-UH2WFNTA.js";import{e as u}from"./chunk-PEYJTJPE.js";function E(o){let e=o.length,t=new Float64Array(e*3),r=w.createTypedArray(e,e*2),i=0,s=0;for(let n=0;n<e;n++){let p=o[n];t[i++]=p.x,t[i++]=p.y,t[i++]=p.z,r[s++]=n,r[s++]=(n+1)%e}let y=new O({position:new k({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:t})});return new d({attributes:y,indices:r,primitiveType:b.LINES})}function m(o){o=c(o,c.EMPTY_OBJECT);let e=o.polygonHierarchy;a.defined("options.polygonHierarchy",e),this._polygonHierarchy=e,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=f.computeHierarchyPackedLength(e,l)+1}m.fromPositions=function(o){o=c(o,c.EMPTY_OBJECT),a.defined("options.positions",o.positions);let e={polygonHierarchy:{positions:o.positions}};return new m(e)};m.pack=function(o,e,t){return a.typeOf.object("value",o),a.defined("array",e),t=c(t,0),t=f.packPolygonHierarchy(o._polygonHierarchy,e,t,l),e[t]=o.packedLength,e};var v={polygonHierarchy:{}};m.unpack=function(o,e,t){a.defined("array",o),e=c(e,0);let r=f.unpackPolygonHierarchy(o,e,l);e=r.startingIndex,delete r.startingIndex;let i=o[e];return u(t)||(t=new m(v)),t._polygonHierarchy=r,t.packedLength=i,t};m.createGeometry=function(o){let e=o._polygonHierarchy,t=e.positions;if(t=L(t,l.equalsEpsilon,!0),t.length<3||!T.validOutline(t))return;let i=f.polygonOutlinesFromHierarchy(e,!1);if(i.length===0)return;let s=[];for(let p=0;p<i.length;p++){let _=new G({geometry:E(i[p])});s.push(_)}let y=C.combineInstances(s)[0],n=P.fromPoints(e.positions);return new d({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:n})};var h=m;function A(o,e){return u(e)&&(o=h.unpack(o,e)),o._ellipsoid=g.clone(o._ellipsoid),h.createGeometry(o)}var Z=A;export{Z as default}; diff --git a/cesium/Workers/createCorridorGeometry.js b/cesium/Workers/createCorridorGeometry.js index 38654e1..0bb781a 100644 --- a/cesium/Workers/createCorridorGeometry.js +++ b/cesium/Workers/createCorridorGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as M}from"./chunk-TK3AFTVI.js";import{a as ht}from"./chunk-DVG6ROYF.js";import"./chunk-WIE5YNSS.js";import"./chunk-65DFAZKW.js";import{a as _t}from"./chunk-WLRVP2UA.js";import{a as J}from"./chunk-DUVNED7U.js";import"./chunk-TLL4Q2KI.js";import"./chunk-4IWHN7T4.js";import{b as yt}from"./chunk-LKPDAB55.js";import{a as Pt}from"./chunk-CIEXTRKV.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as Nt}from"./chunk-RQXB4B4V.js";import{a as Ct}from"./chunk-MPVEZNKB.js";import{b as Mt,c as Vt,d as x}from"./chunk-FATK2EQ2.js";import{d as St}from"./chunk-3FEM743H.js";import{h as Et}from"./chunk-CMXCDAKR.js";import{a as F}from"./chunk-77ESX6BV.js";import{a as o,b as bt,d as I}from"./chunk-LJCGAQ64.js";import{a as st}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as B}from"./chunk-42NIXFVW.js";import{b as it}from"./chunk-5YVCOCPP.js";import{e as X}from"./chunk-U73D6PDD.js";var zt=new o,kt=new o,wt=new o,Tt=new o,jt=new o,Ht=new o,at=new o,ft=new o;function Ut(t,e){for(let i=0;i<t.length;i++)t[i]=e.scaleToGeodeticSurface(t[i],t[i]);return t}function Z(t,e,i,l,d,f){let h=t.normals,O=t.tangents,g=t.bitangents,r=o.normalize(o.cross(i,e,at),at);f.normal&&M.addAttribute(h,e,l,d),f.tangent&&M.addAttribute(O,r,l,d),f.bitangent&&M.addAttribute(g,i,l,d)}function Bt(t,e,i){let l=t.positions,d=t.corners,f=t.endPositions,h=t.lefts,O=t.normals,g=new Ct,r,a=0,s=0,n,A=0,u;for(n=0;n<l.length;n+=2)u=l[n].length-3,a+=u,A+=u*2,s+=l[n+1].length-3;for(a+=3,s+=3,n=0;n<d.length;n++){r=d[n];let c=d[n].leftPositions;X(c)?(u=c.length,a+=u,A+=u):(u=d[n].rightPositions.length,s+=u,A+=u)}let b=X(f),p;b&&(p=f[0].length-3,a+=p,s+=p,p/=3,A+=p*6);let R=a+s,m=new Float64Array(R),C=e.normal?new Float32Array(R):void 0,D=e.tangent?new Float32Array(R):void 0,lt=e.bitangent?new Float32Array(R):void 0,z={normals:C,tangents:D,bitangents:lt},y=0,E=R-1,S,V,H,G,P=zt,w=kt,nt,ot,mt=p/2,_=Nt.createTypedArray(R/3,A),T=0;if(b){ot=wt,nt=Tt;let c=f[0];for(P=o.fromArray(O,0,P),w=o.fromArray(h,0,w),n=0;n<mt;n++)ot=o.fromArray(c,(mt-1-n)*3,ot),nt=o.fromArray(c,(mt+n)*3,nt),M.addAttribute(m,nt,y),M.addAttribute(m,ot,void 0,E),Z(z,P,w,y,E,e),V=y/3,G=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3}let At=0,ut=0,rt=l[At++],q=l[At++];m.set(rt,y),m.set(q,E-q.length+1),w=o.fromArray(h,ut,w);let ct,dt;for(u=q.length-3,n=0;n<u;n+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,n,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-n,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),V=y/3,G=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3;for(ct=i.geodeticSurfaceNormal(o.fromArray(rt,u,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u,ft),ft),P=o.normalize(o.add(ct,dt,P),P),ut+=3,n=0;n<d.length;n++){let c;r=d[n];let $=r.leftPositions,v=r.rightPositions,L,U,N=Ht,k=wt,Y=Tt;if(P=o.fromArray(O,ut,P),X($)){for(Z(z,P,w,void 0,E,e),E-=3,L=G,U=H,c=0;c<$.length/3;c++)N=o.fromArray($,c*3,N),_[T++]=L,_[T++]=U-c-1,_[T++]=U-c,M.addAttribute(m,N,void 0,E),k=o.fromArray(m,(U-c-1)*3,k),Y=o.fromArray(m,L*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,void 0,E,e),E-=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,U*3,k),N,k),Y=o.subtract(o.fromArray(m,(U-c)*3,Y),N,Y),w=o.normalize(o.add(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3}else{for(Z(z,P,w,y,void 0,e),y+=3,L=H,U=G,c=0;c<v.length/3;c++)N=o.fromArray(v,c*3,N),_[T++]=L,_[T++]=U+c,_[T++]=U+c+1,M.addAttribute(m,N,y),k=o.fromArray(m,L*3,k),Y=o.fromArray(m,(U+c)*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,(U+c)*3,k),N,k),Y=o.subtract(o.fromArray(m,U*3,Y),N,Y),w=o.normalize(o.negate(o.add(Y,k,w),w),w),Z(z,P,w,void 0,E,e),E-=3}for(rt=l[At++],q=l[At++],rt.splice(0,3),q.splice(q.length-3,3),m.set(rt,y),m.set(q,E-q.length+1),u=q.length-3,ut+=3,w=o.fromArray(h,ut,w),c=0;c<q.length;c+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,c,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-c,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),G=y/3,V=G-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3;y-=3,E+=3}if(P=o.fromArray(O,O.length-3,P),Z(z,P,w,y,E,e),b){y+=3,E-=3,ot=wt,nt=Tt;let c=f[1];for(n=0;n<mt;n++)ot=o.fromArray(c,(p-n-1)*3,ot),nt=o.fromArray(c,n*3,nt),M.addAttribute(m,ot,void 0,E),M.addAttribute(m,nt,y),Z(z,P,w,y,E,e),G=y/3,V=G-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3}if(g.position=new x({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:m}),e.st){let c=new Float32Array(R/3*2),$,v,L=0;if(b){a/=3,s/=3;let U=Math.PI/(p+1);v=1/(a-p+1),$=1/(s-p+1);let N,k=p/2;for(n=k+1;n<p+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=1;n<s-p+1;n++)c[L++]=n*$,c[L++]=0;for(n=p;n>k;n--)N=st.PI_OVER_TWO-n*U,c[L++]=1-$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=k;n>0;n--)N=st.PI_OVER_TWO-U*n,c[L++]=1-v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=a-p;n>0;n--)c[L++]=n*v,c[L++]=1;for(n=1;n<k+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N))}else{for(a/=3,s/=3,v=1/(a-1),$=1/(s-1),n=0;n<s;n++)c[L++]=n*$,c[L++]=0;for(n=a;n>0;n--)c[L++]=(n-1)*v,c[L++]=1}g.st=new x({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:c})}return e.normal&&(g.normal=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.normals})),e.tangent&&(g.tangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.tangents})),e.bitangent&&(g.bitangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.bitangents})),{attributes:g,indices:_}}function qt(t,e){if(!e.normal&&!e.tangent&&!e.bitangent&&!e.st)return t;let i=t.position.values,l,d;(e.normal||e.bitangent)&&(l=t.normal.values,d=t.bitangent.values);let f=t.position.values.length/18,h=f*3,O=f*2,g=h*2,r;if(e.normal||e.bitangent||e.tangent){let a=e.normal?new Float32Array(h*6):void 0,s=e.tangent?new Float32Array(h*6):void 0,n=e.bitangent?new Float32Array(h*6):void 0,A=zt,u=kt,b=wt,p=Tt,R=jt,m=Ht,C=g;for(r=0;r<h;r+=3){let D=C+g;A=o.fromArray(i,r,A),u=o.fromArray(i,r+h,u),b=o.fromArray(i,(r+3)%h,b),u=o.subtract(u,A,u),b=o.subtract(b,A,b),p=o.normalize(o.cross(u,b,p),p),e.normal&&(M.addAttribute(a,p,D),M.addAttribute(a,p,D+3),M.addAttribute(a,p,C),M.addAttribute(a,p,C+3)),(e.tangent||e.bitangent)&&(m=o.fromArray(l,r,m),e.bitangent&&(M.addAttribute(n,m,D),M.addAttribute(n,m,D+3),M.addAttribute(n,m,C),M.addAttribute(n,m,C+3)),e.tangent&&(R=o.normalize(o.cross(m,p,R),R),M.addAttribute(s,R,D),M.addAttribute(s,R,D+3),M.addAttribute(s,R,C),M.addAttribute(s,R,C+3))),C+=6}if(e.normal){for(a.set(l),r=0;r<h;r+=3)a[r+h]=-l[r],a[r+h+1]=-l[r+1],a[r+h+2]=-l[r+2];t.normal.values=a}else t.normal=void 0;if(e.bitangent?(n.set(d),n.set(d,h),t.bitangent.values=n):t.bitangent=void 0,e.tangent){let D=t.tangent.values;s.set(D),s.set(D,h),t.tangent.values=s}}if(e.st){let a=t.st.values,s=new Float32Array(O*6);s.set(a),s.set(a,O);let n=O*2;for(let A=0;A<2;A++){for(s[n++]=a[0],s[n++]=a[1],r=2;r<O;r+=2){let u=a[r],b=a[r+1];s[n++]=u,s[n++]=b,s[n++]=u,s[n++]=b}s[n++]=a[0],s[n++]=a[1]}t.st.values=s}return t}function Ot(t,e,i){i[e++]=t[0],i[e++]=t[1],i[e++]=t[2];for(let l=3;l<t.length;l+=3){let d=t[l],f=t[l+1],h=t[l+2];i[e++]=d,i[e++]=f,i[e++]=h,i[e++]=d,i[e++]=f,i[e++]=h}return i[e++]=t[0],i[e++]=t[1],i[e++]=t[2],i}function Gt(t,e){let i=new J({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),l=t.ellipsoid,d=M.computePositions(t),f=Bt(d,i,l),h=t.height,O=t.extrudedHeight,g=f.attributes,r=f.indices,a=g.position.values,s=a.length,n=new Float64Array(s*6),A=new Float64Array(s);A.set(a);let u=new Float64Array(s*4);a=yt.scaleToGeodeticHeight(a,h,l),u=Ot(a,0,u),A=yt.scaleToGeodeticHeight(A,O,l),u=Ot(A,s*2,u),n.set(a),n.set(A,s),n.set(u,s*2),g.position.values=n,g=qt(g,e);let b,p=s/3;if(t.shadowVolume){let S=g.normal.values;s=S.length;let V=new Float32Array(s*6);for(b=0;b<s;b++)S[b]=-S[b];V.set(S,s),V=Ot(S,s*4,V),g.extrudeDirection=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:V}),e.normal||(g.normal=void 0)}if(X(t.offsetAttribute)){let S=new Uint8Array(p*6);if(t.offsetAttribute===_t.TOP)S=S.fill(1,0,p).fill(1,p*2,p*4);else{let V=t.offsetAttribute===_t.NONE?0:1;S=S.fill(V)}g.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:S})}let R=r.length,m=p+p,C=Nt.createTypedArray(n.length/3,R*2+m*3);C.set(r);let D=R;for(b=0;b<R;b+=3){let S=r[b],V=r[b+1],H=r[b+2];C[D++]=H+p,C[D++]=V+p,C[D++]=S+p}let lt,z,y,E;for(b=0;b<m;b+=2)lt=b+m,z=lt+m,y=lt+1,E=z+1,C[D++]=lt,C[D++]=z,C[D++]=y,C[D++]=y,C[D++]=z,C[D++]=E;return{attributes:g,indices:C}}var Dt=new o,gt=new o,Q=new bt;function Rt(t,e,i,l,d,f){let h=o.subtract(e,t,Dt);o.normalize(h,h);let O=i.geodeticSurfaceNormal(t,gt),g=o.cross(h,O,Dt);o.multiplyByScalar(g,l,g);let r=d.latitude,a=d.longitude,s=f.latitude,n=f.longitude;o.add(t,g,gt),i.cartesianToCartographic(gt,Q);let A=Q.latitude,u=Q.longitude;r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),o.subtract(t,g,gt),i.cartesianToCartographic(gt,Q),A=Q.latitude,u=Q.longitude,r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),d.latitude=r,d.longitude=a,f.latitude=s,f.longitude=n}var K=new o,pt=new o,W=new bt,j=new bt;function Yt(t,e,i,l,d){t=Ut(t,e);let f=Pt(t,o.equalsEpsilon),h=f.length;if(h<2||i<=0)return new Et;let O=i*.5;W.latitude=Number.POSITIVE_INFINITY,W.longitude=Number.POSITIVE_INFINITY,j.latitude=Number.NEGATIVE_INFINITY,j.longitude=Number.NEGATIVE_INFINITY;let g,r;if(l===ht.ROUNDED){let n=f[0];o.subtract(n,f[1],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(n,K,pt),e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r)}for(let n=0;n<h-1;++n)Rt(f[n],f[n+1],e,O,W,j);let a=f[h-1];o.subtract(a,f[h-2],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(a,K,pt),Rt(a,pt,e,O,W,j),l===ht.ROUNDED&&(e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r));let s=X(d)?d:new Et;return s.north=j.latitude,s.south=W.latitude,s.east=j.longitude,s.west=W.longitude,s}function et(t){t=B(t,B.EMPTY_OBJECT);let e=t.positions,i=t.width;it.defined("options.positions",e),it.defined("options.width",i);let l=B(t.height,0),d=B(t.extrudedHeight,l);this._positions=e,this._ellipsoid=I.clone(B(t.ellipsoid,I.WGS84)),this._vertexFormat=J.clone(B(t.vertexFormat,J.DEFAULT)),this._width=i,this._height=Math.max(l,d),this._extrudedHeight=Math.min(l,d),this._cornerType=B(t.cornerType,ht.ROUNDED),this._granularity=B(t.granularity,st.RADIANS_PER_DEGREE),this._shadowVolume=B(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*o.packedLength+I.packedLength+J.packedLength+7}et.pack=function(t,e,i){it.defined("value",t),it.defined("array",e),i=B(i,0);let l=t._positions,d=l.length;e[i++]=d;for(let f=0;f<d;++f,i+=o.packedLength)o.pack(l[f],e,i);return I.pack(t._ellipsoid,e,i),i+=I.packedLength,J.pack(t._vertexFormat,e,i),i+=J.packedLength,e[i++]=t._width,e[i++]=t._height,e[i++]=t._extrudedHeight,e[i++]=t._cornerType,e[i++]=t._granularity,e[i++]=t._shadowVolume?1:0,e[i]=B(t._offsetAttribute,-1),e};var It=I.clone(I.UNIT_SPHERE),Wt=new J,tt={positions:void 0,ellipsoid:It,vertexFormat:Wt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};et.unpack=function(t,e,i){it.defined("array",t),e=B(e,0);let l=t[e++],d=new Array(l);for(let u=0;u<l;++u,e+=o.packedLength)d[u]=o.unpack(t,e);let f=I.unpack(t,e,It);e+=I.packedLength;let h=J.unpack(t,e,Wt);e+=J.packedLength;let O=t[e++],g=t[e++],r=t[e++],a=t[e++],s=t[e++],n=t[e++]===1,A=t[e];return X(i)?(i._positions=d,i._ellipsoid=I.clone(f,i._ellipsoid),i._vertexFormat=J.clone(h,i._vertexFormat),i._width=O,i._height=g,i._extrudedHeight=r,i._cornerType=a,i._granularity=s,i._shadowVolume=n,i._offsetAttribute=A===-1?void 0:A,i):(tt.positions=d,tt.width=O,tt.height=g,tt.extrudedHeight=r,tt.cornerType=a,tt.granularity=s,tt.shadowVolume=n,tt.offsetAttribute=A===-1?void 0:A,new et(tt))};et.computeRectangle=function(t,e){t=B(t,B.EMPTY_OBJECT);let i=t.positions,l=t.width;it.defined("options.positions",i),it.defined("options.width",l);let d=B(t.ellipsoid,I.WGS84),f=B(t.cornerType,ht.ROUNDED);return Yt(i,d,l,f,e)};et.createGeometry=function(t){let e=t._positions,i=t._width,l=t._ellipsoid;e=Ut(e,l);let d=Pt(e,o.equalsEpsilon);if(d.length<2||i<=0)return;let f=t._height,h=t._extrudedHeight,O=!st.equalsEpsilon(f,h,0,st.EPSILON2),g=t._vertexFormat,r={ellipsoid:l,positions:d,width:i,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!0},a;if(O)r.height=f,r.extrudedHeight=h,r.shadowVolume=t._shadowVolume,r.offsetAttribute=t._offsetAttribute,a=Gt(r,g);else{let A=M.computePositions(r);if(a=Bt(A,g,l),a.attributes.position.values=yt.scaleToGeodeticHeight(a.attributes.position.values,f,l),X(t._offsetAttribute)){let u=t._offsetAttribute===_t.NONE?0:1,b=a.attributes.position.values.length,p=new Uint8Array(b/3).fill(u);a.attributes.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}}let s=a.attributes,n=St.fromVertices(s.position.values,void 0,3);return g.position||(a.attributes.position.values=void 0),new Vt({attributes:s,indices:a.indices,primitiveType:Mt.TRIANGLES,boundingSphere:n,offsetAttribute:t._offsetAttribute})};et.createShadowVolume=function(t,e,i){let l=t._granularity,d=t._ellipsoid,f=e(l,d),h=i(l,d);return new et({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:d,granularity:l,extrudedHeight:f,height:h,vertexFormat:J.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(et.prototype,{rectangle:{get:function(){return X(this._rectangle)||(this._rectangle=Yt(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var Lt=et;function Jt(t,e){return X(e)&&(t=Lt.unpack(t,e)),t._ellipsoid=I.clone(t._ellipsoid),Lt.createGeometry(t)}var Ae=Jt;export{Ae as default}; +import{a as M}from"./chunk-XHX2UPDO.js";import{a as ht}from"./chunk-K4ASOM65.js";import"./chunk-AMQUWUD4.js";import"./chunk-W23CU777.js";import{a as _t}from"./chunk-ILGBPNP6.js";import{a as G}from"./chunk-HEEMUCG6.js";import"./chunk-KF5NF354.js";import"./chunk-4WRMLZA7.js";import{b as yt}from"./chunk-O5IJ3OGP.js";import{a as Pt}from"./chunk-RXTBM4OI.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as Nt}from"./chunk-P37AI2DW.js";import{a as Ct}from"./chunk-T6BE4RZK.js";import{b as Mt,c as Vt,d as x}from"./chunk-X5IHHI6X.js";import{d as St}from"./chunk-TMSETF7M.js";import{h as Et}from"./chunk-7Z5IIKOJ.js";import{a as F}from"./chunk-KZNJOCYU.js";import{a as o,b as bt,d as I}from"./chunk-POASMU2N.js";import{a as st}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as B}from"./chunk-IUA6FAOZ.js";import{b as it}from"./chunk-UH2WFNTA.js";import{e as X}from"./chunk-PEYJTJPE.js";var zt=new o,kt=new o,wt=new o,Tt=new o,jt=new o,Ht=new o,at=new o,ft=new o;function Ut(t,e){for(let i=0;i<t.length;i++)t[i]=e.scaleToGeodeticSurface(t[i],t[i]);return t}function Z(t,e,i,l,d,f){let h=t.normals,O=t.tangents,g=t.bitangents,r=o.normalize(o.cross(i,e,at),at);f.normal&&M.addAttribute(h,e,l,d),f.tangent&&M.addAttribute(O,r,l,d),f.bitangent&&M.addAttribute(g,i,l,d)}function Bt(t,e,i){let l=t.positions,d=t.corners,f=t.endPositions,h=t.lefts,O=t.normals,g=new Ct,r,a=0,s=0,n,A=0,u;for(n=0;n<l.length;n+=2)u=l[n].length-3,a+=u,A+=u*2,s+=l[n+1].length-3;for(a+=3,s+=3,n=0;n<d.length;n++){r=d[n];let c=d[n].leftPositions;X(c)?(u=c.length,a+=u,A+=u):(u=d[n].rightPositions.length,s+=u,A+=u)}let b=X(f),p;b&&(p=f[0].length-3,a+=p,s+=p,p/=3,A+=p*6);let R=a+s,m=new Float64Array(R),C=e.normal?new Float32Array(R):void 0,D=e.tangent?new Float32Array(R):void 0,lt=e.bitangent?new Float32Array(R):void 0,z={normals:C,tangents:D,bitangents:lt},y=0,E=R-1,S,V,H,J,P=zt,w=kt,nt,ot,mt=p/2,_=Nt.createTypedArray(R/3,A),T=0;if(b){ot=wt,nt=Tt;let c=f[0];for(P=o.fromArray(O,0,P),w=o.fromArray(h,0,w),n=0;n<mt;n++)ot=o.fromArray(c,(mt-1-n)*3,ot),nt=o.fromArray(c,(mt+n)*3,nt),M.addAttribute(m,nt,y),M.addAttribute(m,ot,void 0,E),Z(z,P,w,y,E,e),V=y/3,J=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3}let At=0,ut=0,rt=l[At++],q=l[At++];m.set(rt,y),m.set(q,E-q.length+1),w=o.fromArray(h,ut,w);let ct,dt;for(u=q.length-3,n=0;n<u;n+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,n,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-n,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),V=y/3,J=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3;for(ct=i.geodeticSurfaceNormal(o.fromArray(rt,u,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u,ft),ft),P=o.normalize(o.add(ct,dt,P),P),ut+=3,n=0;n<d.length;n++){let c;r=d[n];let $=r.leftPositions,v=r.rightPositions,L,U,N=Ht,k=wt,Y=Tt;if(P=o.fromArray(O,ut,P),X($)){for(Z(z,P,w,void 0,E,e),E-=3,L=J,U=H,c=0;c<$.length/3;c++)N=o.fromArray($,c*3,N),_[T++]=L,_[T++]=U-c-1,_[T++]=U-c,M.addAttribute(m,N,void 0,E),k=o.fromArray(m,(U-c-1)*3,k),Y=o.fromArray(m,L*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,void 0,E,e),E-=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,U*3,k),N,k),Y=o.subtract(o.fromArray(m,(U-c)*3,Y),N,Y),w=o.normalize(o.add(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3}else{for(Z(z,P,w,y,void 0,e),y+=3,L=H,U=J,c=0;c<v.length/3;c++)N=o.fromArray(v,c*3,N),_[T++]=L,_[T++]=U+c,_[T++]=U+c+1,M.addAttribute(m,N,y),k=o.fromArray(m,L*3,k),Y=o.fromArray(m,(U+c)*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,(U+c)*3,k),N,k),Y=o.subtract(o.fromArray(m,U*3,Y),N,Y),w=o.normalize(o.negate(o.add(Y,k,w),w),w),Z(z,P,w,void 0,E,e),E-=3}for(rt=l[At++],q=l[At++],rt.splice(0,3),q.splice(q.length-3,3),m.set(rt,y),m.set(q,E-q.length+1),u=q.length-3,ut+=3,w=o.fromArray(h,ut,w),c=0;c<q.length;c+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,c,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-c,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),J=y/3,V=J-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3;y-=3,E+=3}if(P=o.fromArray(O,O.length-3,P),Z(z,P,w,y,E,e),b){y+=3,E-=3,ot=wt,nt=Tt;let c=f[1];for(n=0;n<mt;n++)ot=o.fromArray(c,(p-n-1)*3,ot),nt=o.fromArray(c,n*3,nt),M.addAttribute(m,ot,void 0,E),M.addAttribute(m,nt,y),Z(z,P,w,y,E,e),J=y/3,V=J-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3}if(g.position=new x({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:m}),e.st){let c=new Float32Array(R/3*2),$,v,L=0;if(b){a/=3,s/=3;let U=Math.PI/(p+1);v=1/(a-p+1),$=1/(s-p+1);let N,k=p/2;for(n=k+1;n<p+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=1;n<s-p+1;n++)c[L++]=n*$,c[L++]=0;for(n=p;n>k;n--)N=st.PI_OVER_TWO-n*U,c[L++]=1-$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=k;n>0;n--)N=st.PI_OVER_TWO-U*n,c[L++]=1-v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=a-p;n>0;n--)c[L++]=n*v,c[L++]=1;for(n=1;n<k+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N))}else{for(a/=3,s/=3,v=1/(a-1),$=1/(s-1),n=0;n<s;n++)c[L++]=n*$,c[L++]=0;for(n=a;n>0;n--)c[L++]=(n-1)*v,c[L++]=1}g.st=new x({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:c})}return e.normal&&(g.normal=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.normals})),e.tangent&&(g.tangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.tangents})),e.bitangent&&(g.bitangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.bitangents})),{attributes:g,indices:_}}function qt(t,e){if(!e.normal&&!e.tangent&&!e.bitangent&&!e.st)return t;let i=t.position.values,l,d;(e.normal||e.bitangent)&&(l=t.normal.values,d=t.bitangent.values);let f=t.position.values.length/18,h=f*3,O=f*2,g=h*2,r;if(e.normal||e.bitangent||e.tangent){let a=e.normal?new Float32Array(h*6):void 0,s=e.tangent?new Float32Array(h*6):void 0,n=e.bitangent?new Float32Array(h*6):void 0,A=zt,u=kt,b=wt,p=Tt,R=jt,m=Ht,C=g;for(r=0;r<h;r+=3){let D=C+g;A=o.fromArray(i,r,A),u=o.fromArray(i,r+h,u),b=o.fromArray(i,(r+3)%h,b),u=o.subtract(u,A,u),b=o.subtract(b,A,b),p=o.normalize(o.cross(u,b,p),p),e.normal&&(M.addAttribute(a,p,D),M.addAttribute(a,p,D+3),M.addAttribute(a,p,C),M.addAttribute(a,p,C+3)),(e.tangent||e.bitangent)&&(m=o.fromArray(l,r,m),e.bitangent&&(M.addAttribute(n,m,D),M.addAttribute(n,m,D+3),M.addAttribute(n,m,C),M.addAttribute(n,m,C+3)),e.tangent&&(R=o.normalize(o.cross(m,p,R),R),M.addAttribute(s,R,D),M.addAttribute(s,R,D+3),M.addAttribute(s,R,C),M.addAttribute(s,R,C+3))),C+=6}if(e.normal){for(a.set(l),r=0;r<h;r+=3)a[r+h]=-l[r],a[r+h+1]=-l[r+1],a[r+h+2]=-l[r+2];t.normal.values=a}else t.normal=void 0;if(e.bitangent?(n.set(d),n.set(d,h),t.bitangent.values=n):t.bitangent=void 0,e.tangent){let D=t.tangent.values;s.set(D),s.set(D,h),t.tangent.values=s}}if(e.st){let a=t.st.values,s=new Float32Array(O*6);s.set(a),s.set(a,O);let n=O*2;for(let A=0;A<2;A++){for(s[n++]=a[0],s[n++]=a[1],r=2;r<O;r+=2){let u=a[r],b=a[r+1];s[n++]=u,s[n++]=b,s[n++]=u,s[n++]=b}s[n++]=a[0],s[n++]=a[1]}t.st.values=s}return t}function Ot(t,e,i){i[e++]=t[0],i[e++]=t[1],i[e++]=t[2];for(let l=3;l<t.length;l+=3){let d=t[l],f=t[l+1],h=t[l+2];i[e++]=d,i[e++]=f,i[e++]=h,i[e++]=d,i[e++]=f,i[e++]=h}return i[e++]=t[0],i[e++]=t[1],i[e++]=t[2],i}function Jt(t,e){let i=new G({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),l=t.ellipsoid,d=M.computePositions(t),f=Bt(d,i,l),h=t.height,O=t.extrudedHeight,g=f.attributes,r=f.indices,a=g.position.values,s=a.length,n=new Float64Array(s*6),A=new Float64Array(s);A.set(a);let u=new Float64Array(s*4);a=yt.scaleToGeodeticHeight(a,h,l),u=Ot(a,0,u),A=yt.scaleToGeodeticHeight(A,O,l),u=Ot(A,s*2,u),n.set(a),n.set(A,s),n.set(u,s*2),g.position.values=n,g=qt(g,e);let b,p=s/3;if(t.shadowVolume){let S=g.normal.values;s=S.length;let V=new Float32Array(s*6);for(b=0;b<s;b++)S[b]=-S[b];V.set(S,s),V=Ot(S,s*4,V),g.extrudeDirection=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:V}),e.normal||(g.normal=void 0)}if(X(t.offsetAttribute)){let S=new Uint8Array(p*6);if(t.offsetAttribute===_t.TOP)S=S.fill(1,0,p).fill(1,p*2,p*4);else{let V=t.offsetAttribute===_t.NONE?0:1;S=S.fill(V)}g.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:S})}let R=r.length,m=p+p,C=Nt.createTypedArray(n.length/3,R*2+m*3);C.set(r);let D=R;for(b=0;b<R;b+=3){let S=r[b],V=r[b+1],H=r[b+2];C[D++]=H+p,C[D++]=V+p,C[D++]=S+p}let lt,z,y,E;for(b=0;b<m;b+=2)lt=b+m,z=lt+m,y=lt+1,E=z+1,C[D++]=lt,C[D++]=z,C[D++]=y,C[D++]=y,C[D++]=z,C[D++]=E;return{attributes:g,indices:C}}var Dt=new o,gt=new o,Q=new bt;function Rt(t,e,i,l,d,f){let h=o.subtract(e,t,Dt);o.normalize(h,h);let O=i.geodeticSurfaceNormal(t,gt),g=o.cross(h,O,Dt);o.multiplyByScalar(g,l,g);let r=d.latitude,a=d.longitude,s=f.latitude,n=f.longitude;o.add(t,g,gt),i.cartesianToCartographic(gt,Q);let A=Q.latitude,u=Q.longitude;r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),o.subtract(t,g,gt),i.cartesianToCartographic(gt,Q),A=Q.latitude,u=Q.longitude,r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),d.latitude=r,d.longitude=a,f.latitude=s,f.longitude=n}var K=new o,pt=new o,W=new bt,j=new bt;function Yt(t,e,i,l,d){t=Ut(t,e);let f=Pt(t,o.equalsEpsilon),h=f.length;if(h<2||i<=0)return new Et;let O=i*.5;W.latitude=Number.POSITIVE_INFINITY,W.longitude=Number.POSITIVE_INFINITY,j.latitude=Number.NEGATIVE_INFINITY,j.longitude=Number.NEGATIVE_INFINITY;let g,r;if(l===ht.ROUNDED){let n=f[0];o.subtract(n,f[1],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(n,K,pt),e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r)}for(let n=0;n<h-1;++n)Rt(f[n],f[n+1],e,O,W,j);let a=f[h-1];o.subtract(a,f[h-2],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(a,K,pt),Rt(a,pt,e,O,W,j),l===ht.ROUNDED&&(e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r));let s=X(d)?d:new Et;return s.north=j.latitude,s.south=W.latitude,s.east=j.longitude,s.west=W.longitude,s}function et(t){t=B(t,B.EMPTY_OBJECT);let e=t.positions,i=t.width;it.defined("options.positions",e),it.defined("options.width",i);let l=B(t.height,0),d=B(t.extrudedHeight,l);this._positions=e,this._ellipsoid=I.clone(B(t.ellipsoid,I.default)),this._vertexFormat=G.clone(B(t.vertexFormat,G.DEFAULT)),this._width=i,this._height=Math.max(l,d),this._extrudedHeight=Math.min(l,d),this._cornerType=B(t.cornerType,ht.ROUNDED),this._granularity=B(t.granularity,st.RADIANS_PER_DEGREE),this._shadowVolume=B(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*o.packedLength+I.packedLength+G.packedLength+7}et.pack=function(t,e,i){it.defined("value",t),it.defined("array",e),i=B(i,0);let l=t._positions,d=l.length;e[i++]=d;for(let f=0;f<d;++f,i+=o.packedLength)o.pack(l[f],e,i);return I.pack(t._ellipsoid,e,i),i+=I.packedLength,G.pack(t._vertexFormat,e,i),i+=G.packedLength,e[i++]=t._width,e[i++]=t._height,e[i++]=t._extrudedHeight,e[i++]=t._cornerType,e[i++]=t._granularity,e[i++]=t._shadowVolume?1:0,e[i]=B(t._offsetAttribute,-1),e};var It=I.clone(I.UNIT_SPHERE),Wt=new G,tt={positions:void 0,ellipsoid:It,vertexFormat:Wt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};et.unpack=function(t,e,i){it.defined("array",t),e=B(e,0);let l=t[e++],d=new Array(l);for(let u=0;u<l;++u,e+=o.packedLength)d[u]=o.unpack(t,e);let f=I.unpack(t,e,It);e+=I.packedLength;let h=G.unpack(t,e,Wt);e+=G.packedLength;let O=t[e++],g=t[e++],r=t[e++],a=t[e++],s=t[e++],n=t[e++]===1,A=t[e];return X(i)?(i._positions=d,i._ellipsoid=I.clone(f,i._ellipsoid),i._vertexFormat=G.clone(h,i._vertexFormat),i._width=O,i._height=g,i._extrudedHeight=r,i._cornerType=a,i._granularity=s,i._shadowVolume=n,i._offsetAttribute=A===-1?void 0:A,i):(tt.positions=d,tt.width=O,tt.height=g,tt.extrudedHeight=r,tt.cornerType=a,tt.granularity=s,tt.shadowVolume=n,tt.offsetAttribute=A===-1?void 0:A,new et(tt))};et.computeRectangle=function(t,e){t=B(t,B.EMPTY_OBJECT);let i=t.positions,l=t.width;it.defined("options.positions",i),it.defined("options.width",l);let d=B(t.ellipsoid,I.default),f=B(t.cornerType,ht.ROUNDED);return Yt(i,d,l,f,e)};et.createGeometry=function(t){let e=t._positions,i=t._width,l=t._ellipsoid;e=Ut(e,l);let d=Pt(e,o.equalsEpsilon);if(d.length<2||i<=0)return;let f=t._height,h=t._extrudedHeight,O=!st.equalsEpsilon(f,h,0,st.EPSILON2),g=t._vertexFormat,r={ellipsoid:l,positions:d,width:i,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!0},a;if(O)r.height=f,r.extrudedHeight=h,r.shadowVolume=t._shadowVolume,r.offsetAttribute=t._offsetAttribute,a=Jt(r,g);else{let A=M.computePositions(r);if(a=Bt(A,g,l),a.attributes.position.values=yt.scaleToGeodeticHeight(a.attributes.position.values,f,l),X(t._offsetAttribute)){let u=t._offsetAttribute===_t.NONE?0:1,b=a.attributes.position.values.length,p=new Uint8Array(b/3).fill(u);a.attributes.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}}let s=a.attributes,n=St.fromVertices(s.position.values,void 0,3);return g.position||(a.attributes.position.values=void 0),new Vt({attributes:s,indices:a.indices,primitiveType:Mt.TRIANGLES,boundingSphere:n,offsetAttribute:t._offsetAttribute})};et.createShadowVolume=function(t,e,i){let l=t._granularity,d=t._ellipsoid,f=e(l,d),h=i(l,d);return new et({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:d,granularity:l,extrudedHeight:f,height:h,vertexFormat:G.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(et.prototype,{rectangle:{get:function(){return X(this._rectangle)||(this._rectangle=Yt(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var Lt=et;function Gt(t,e){return X(e)&&(t=Lt.unpack(t,e)),t._ellipsoid=I.clone(t._ellipsoid),Lt.createGeometry(t)}var Ae=Gt;export{Ae as default}; diff --git a/cesium/Workers/createCorridorOutlineGeometry.js b/cesium/Workers/createCorridorOutlineGeometry.js index 94a075a..5687f6d 100644 --- a/cesium/Workers/createCorridorOutlineGeometry.js +++ b/cesium/Workers/createCorridorOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as S}from"./chunk-TK3AFTVI.js";import{a as Q}from"./chunk-DVG6ROYF.js";import"./chunk-WIE5YNSS.js";import"./chunk-65DFAZKW.js";import{a as W}from"./chunk-WLRVP2UA.js";import"./chunk-TLL4Q2KI.js";import"./chunk-4IWHN7T4.js";import{b as K}from"./chunk-LKPDAB55.js";import{a as it}from"./chunk-CIEXTRKV.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as Z}from"./chunk-RQXB4B4V.js";import{a as et}from"./chunk-MPVEZNKB.js";import{b as I,c as tt,d as J}from"./chunk-FATK2EQ2.js";import{d as x}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as z}from"./chunk-77ESX6BV.js";import{a as A,d as P}from"./chunk-LJCGAQ64.js";import{a as q}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as H}from"./chunk-42NIXFVW.js";import{b as M}from"./chunk-5YVCOCPP.js";import{e as C}from"./chunk-U73D6PDD.js";var ot=new A,nt=new A,rt=new A;function ft(t,i){for(let e=0;e<t.length;e++)t[e]=i.scaleToGeodeticSurface(t[e],t[e]);return t}function st(t,i){let e=[],l=t.positions,h=t.corners,m=t.endPositions,D=new et,y,u=0,p=0,o,g=0,d;for(o=0;o<l.length;o+=2)d=l[o].length-3,u+=d,g+=d/3*4,p+=l[o+1].length-3;for(u+=3,p+=3,o=0;o<h.length;o++){y=h[o];let c=h[o].leftPositions;C(c)?(d=c.length,u+=d,g+=d/3*2):(d=h[o].rightPositions.length,p+=d,g+=d/3*2)}let _=C(m),w;_&&(w=m[0].length-3,u+=w,p+=w,w/=3,g+=w*4);let T=u+p,b=new Float64Array(T),n=0,s=T-1,a,E,L,k,U,O,j=w/2,r=Z.createTypedArray(T/3,g+4),f=0;if(r[f++]=n/3,r[f++]=(s-2)/3,_){e.push(n/3),O=ot,U=nt;let c=m[0];for(o=0;o<j;o++)O=A.fromArray(c,(j-1-o)*3,O),U=A.fromArray(c,(j+o)*3,U),S.addAttribute(b,U,n),S.addAttribute(b,O,void 0,s),E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3}let G=0,F=l[G++],N=l[G++];for(b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,e.push(n/3,(s-2)/3),o=0;o<d;o+=3)E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;for(o=0;o<h.length;o++){let c;y=h[o];let Y=y.leftPositions,X=y.rightPositions,v,B=rt;if(C(Y)){for(s-=3,v=L,e.push(k),c=0;c<Y.length/3;c++)B=A.fromArray(Y,c*3,B),r[f++]=v-c-1,r[f++]=v-c,S.addAttribute(b,B,void 0,s),s-=3;e.push(v-Math.floor(Y.length/6)),i===Q.BEVELED&&e.push((s-2)/3+1),n+=3}else{for(n+=3,v=k,e.push(L),c=0;c<X.length/3;c++)B=A.fromArray(X,c*3,B),r[f++]=v+c,r[f++]=v+c+1,S.addAttribute(b,B,n),n+=3;e.push(v+Math.floor(X.length/6)),i===Q.BEVELED&&e.push(n/3-1),s-=3}for(F=l[G++],N=l[G++],F.splice(0,3),N.splice(N.length-3,3),b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,c=0;c<N.length;c+=3)k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;n-=3,s+=3,e.push(n/3,(s-2)/3)}if(_){n+=3,s-=3,O=ot,U=nt;let c=m[1];for(o=0;o<j;o++)O=A.fromArray(c,(w-o-1)*3,O),U=A.fromArray(c,o*3,U),S.addAttribute(b,O,void 0,s),S.addAttribute(b,U,n),k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;e.push(n/3)}else e.push(n/3,(s-2)/3);return r[f++]=n/3,r[f++]=(s-2)/3,D.position=new J({componentDatatype:z.DOUBLE,componentsPerAttribute:3,values:b}),{attributes:D,indices:r,wallIndices:e}}function ct(t){let i=t.ellipsoid,e=S.computePositions(t),l=st(e,t.cornerType),h=l.wallIndices,m=t.height,D=t.extrudedHeight,y=l.attributes,u=l.indices,p=y.position.values,o=p.length,g=new Float64Array(o);g.set(p);let d=new Float64Array(o*2);if(p=K.scaleToGeodeticHeight(p,m,i),g=K.scaleToGeodeticHeight(g,D,i),d.set(p),d.set(g,o),y.position.values=d,o/=3,C(t.offsetAttribute)){let a=new Uint8Array(o*2);if(t.offsetAttribute===W.TOP)a=a.fill(1,0,o);else{let E=t.offsetAttribute===W.NONE?0:1;a=a.fill(E)}y.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}let _,w=u.length,T=Z.createTypedArray(d.length/3,(w+h.length)*2);T.set(u);let b=w;for(_=0;_<w;_+=2){let a=u[_],E=u[_+1];T[b++]=a+o,T[b++]=E+o}let n,s;for(_=0;_<h.length;_++)n=h[_],s=n+o,T[b++]=n,T[b++]=s;return{attributes:y,indices:T}}function V(t){t=H(t,H.EMPTY_OBJECT);let i=t.positions,e=t.width;M.typeOf.object("options.positions",i),M.typeOf.number("options.width",e);let l=H(t.height,0),h=H(t.extrudedHeight,l);this._positions=i,this._ellipsoid=P.clone(H(t.ellipsoid,P.WGS84)),this._width=e,this._height=Math.max(l,h),this._extrudedHeight=Math.min(l,h),this._cornerType=H(t.cornerType,Q.ROUNDED),this._granularity=H(t.granularity,q.RADIANS_PER_DEGREE),this._offsetAttribute=t.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+i.length*A.packedLength+P.packedLength+6}V.pack=function(t,i,e){M.typeOf.object("value",t),M.typeOf.object("array",i),e=H(e,0);let l=t._positions,h=l.length;i[e++]=h;for(let m=0;m<h;++m,e+=A.packedLength)A.pack(l[m],i,e);return P.pack(t._ellipsoid,i,e),e+=P.packedLength,i[e++]=t._width,i[e++]=t._height,i[e++]=t._extrudedHeight,i[e++]=t._cornerType,i[e++]=t._granularity,i[e]=H(t._offsetAttribute,-1),i};var lt=P.clone(P.UNIT_SPHERE),R={positions:void 0,ellipsoid:lt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};V.unpack=function(t,i,e){M.typeOf.object("array",t),i=H(i,0);let l=t[i++],h=new Array(l);for(let d=0;d<l;++d,i+=A.packedLength)h[d]=A.unpack(t,i);let m=P.unpack(t,i,lt);i+=P.packedLength;let D=t[i++],y=t[i++],u=t[i++],p=t[i++],o=t[i++],g=t[i];return C(e)?(e._positions=h,e._ellipsoid=P.clone(m,e._ellipsoid),e._width=D,e._height=y,e._extrudedHeight=u,e._cornerType=p,e._granularity=o,e._offsetAttribute=g===-1?void 0:g,e):(R.positions=h,R.width=D,R.height=y,R.extrudedHeight=u,R.cornerType=p,R.granularity=o,R.offsetAttribute=g===-1?void 0:g,new V(R))};V.createGeometry=function(t){let i=t._positions,e=t._width,l=t._ellipsoid;i=ft(i,l);let h=it(i,A.equalsEpsilon);if(h.length<2||e<=0)return;let m=t._height,D=t._extrudedHeight,y=!q.equalsEpsilon(m,D,0,q.EPSILON2),u={ellipsoid:l,positions:h,width:e,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!1},p;if(y)u.height=m,u.extrudedHeight=D,u.offsetAttribute=t._offsetAttribute,p=ct(u);else{let d=S.computePositions(u);if(p=st(d,u.cornerType),p.attributes.position.values=K.scaleToGeodeticHeight(p.attributes.position.values,m,l),C(t._offsetAttribute)){let _=p.attributes.position.values.length,w=t._offsetAttribute===W.NONE?0:1,T=new Uint8Array(_/3).fill(w);p.attributes.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}}let o=p.attributes,g=x.fromVertices(o.position.values,void 0,3);return new tt({attributes:o,indices:p.indices,primitiveType:I.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var $=V;function ht(t,i){return C(i)&&(t=$.unpack(t,i)),t._ellipsoid=P.clone(t._ellipsoid),$.createGeometry(t)}var Ot=ht;export{Ot as default}; +import{a as S}from"./chunk-XHX2UPDO.js";import{a as W}from"./chunk-K4ASOM65.js";import"./chunk-AMQUWUD4.js";import"./chunk-W23CU777.js";import{a as K}from"./chunk-ILGBPNP6.js";import"./chunk-KF5NF354.js";import"./chunk-4WRMLZA7.js";import{b as Q}from"./chunk-O5IJ3OGP.js";import{a as it}from"./chunk-RXTBM4OI.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as Z}from"./chunk-P37AI2DW.js";import{a as et}from"./chunk-T6BE4RZK.js";import{b as I,c as tt,d as J}from"./chunk-X5IHHI6X.js";import{d as x}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as z}from"./chunk-KZNJOCYU.js";import{a as A,d as P}from"./chunk-POASMU2N.js";import{a as q}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as H}from"./chunk-IUA6FAOZ.js";import{b as M}from"./chunk-UH2WFNTA.js";import{e as C}from"./chunk-PEYJTJPE.js";var ot=new A,nt=new A,rt=new A;function ft(t,i){for(let e=0;e<t.length;e++)t[e]=i.scaleToGeodeticSurface(t[e],t[e]);return t}function st(t,i){let e=[],l=t.positions,h=t.corners,m=t.endPositions,D=new et,y,u=0,p=0,o,g=0,d;for(o=0;o<l.length;o+=2)d=l[o].length-3,u+=d,g+=d/3*4,p+=l[o+1].length-3;for(u+=3,p+=3,o=0;o<h.length;o++){y=h[o];let c=h[o].leftPositions;C(c)?(d=c.length,u+=d,g+=d/3*2):(d=h[o].rightPositions.length,p+=d,g+=d/3*2)}let _=C(m),w;_&&(w=m[0].length-3,u+=w,p+=w,w/=3,g+=w*4);let T=u+p,b=new Float64Array(T),n=0,s=T-1,a,E,L,k,U,O,j=w/2,r=Z.createTypedArray(T/3,g+4),f=0;if(r[f++]=n/3,r[f++]=(s-2)/3,_){e.push(n/3),O=ot,U=nt;let c=m[0];for(o=0;o<j;o++)O=A.fromArray(c,(j-1-o)*3,O),U=A.fromArray(c,(j+o)*3,U),S.addAttribute(b,U,n),S.addAttribute(b,O,void 0,s),E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3}let G=0,F=l[G++],N=l[G++];for(b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,e.push(n/3,(s-2)/3),o=0;o<d;o+=3)E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;for(o=0;o<h.length;o++){let c;y=h[o];let Y=y.leftPositions,X=y.rightPositions,v,B=rt;if(C(Y)){for(s-=3,v=L,e.push(k),c=0;c<Y.length/3;c++)B=A.fromArray(Y,c*3,B),r[f++]=v-c-1,r[f++]=v-c,S.addAttribute(b,B,void 0,s),s-=3;e.push(v-Math.floor(Y.length/6)),i===W.BEVELED&&e.push((s-2)/3+1),n+=3}else{for(n+=3,v=k,e.push(L),c=0;c<X.length/3;c++)B=A.fromArray(X,c*3,B),r[f++]=v+c,r[f++]=v+c+1,S.addAttribute(b,B,n),n+=3;e.push(v+Math.floor(X.length/6)),i===W.BEVELED&&e.push(n/3-1),s-=3}for(F=l[G++],N=l[G++],F.splice(0,3),N.splice(N.length-3,3),b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,c=0;c<N.length;c+=3)k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;n-=3,s+=3,e.push(n/3,(s-2)/3)}if(_){n+=3,s-=3,O=ot,U=nt;let c=m[1];for(o=0;o<j;o++)O=A.fromArray(c,(w-o-1)*3,O),U=A.fromArray(c,o*3,U),S.addAttribute(b,O,void 0,s),S.addAttribute(b,U,n),k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;e.push(n/3)}else e.push(n/3,(s-2)/3);return r[f++]=n/3,r[f++]=(s-2)/3,D.position=new J({componentDatatype:z.DOUBLE,componentsPerAttribute:3,values:b}),{attributes:D,indices:r,wallIndices:e}}function ct(t){let i=t.ellipsoid,e=S.computePositions(t),l=st(e,t.cornerType),h=l.wallIndices,m=t.height,D=t.extrudedHeight,y=l.attributes,u=l.indices,p=y.position.values,o=p.length,g=new Float64Array(o);g.set(p);let d=new Float64Array(o*2);if(p=Q.scaleToGeodeticHeight(p,m,i),g=Q.scaleToGeodeticHeight(g,D,i),d.set(p),d.set(g,o),y.position.values=d,o/=3,C(t.offsetAttribute)){let a=new Uint8Array(o*2);if(t.offsetAttribute===K.TOP)a=a.fill(1,0,o);else{let E=t.offsetAttribute===K.NONE?0:1;a=a.fill(E)}y.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}let _,w=u.length,T=Z.createTypedArray(d.length/3,(w+h.length)*2);T.set(u);let b=w;for(_=0;_<w;_+=2){let a=u[_],E=u[_+1];T[b++]=a+o,T[b++]=E+o}let n,s;for(_=0;_<h.length;_++)n=h[_],s=n+o,T[b++]=n,T[b++]=s;return{attributes:y,indices:T}}function V(t){t=H(t,H.EMPTY_OBJECT);let i=t.positions,e=t.width;M.typeOf.object("options.positions",i),M.typeOf.number("options.width",e);let l=H(t.height,0),h=H(t.extrudedHeight,l);this._positions=i,this._ellipsoid=P.clone(H(t.ellipsoid,P.default)),this._width=e,this._height=Math.max(l,h),this._extrudedHeight=Math.min(l,h),this._cornerType=H(t.cornerType,W.ROUNDED),this._granularity=H(t.granularity,q.RADIANS_PER_DEGREE),this._offsetAttribute=t.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+i.length*A.packedLength+P.packedLength+6}V.pack=function(t,i,e){M.typeOf.object("value",t),M.typeOf.object("array",i),e=H(e,0);let l=t._positions,h=l.length;i[e++]=h;for(let m=0;m<h;++m,e+=A.packedLength)A.pack(l[m],i,e);return P.pack(t._ellipsoid,i,e),e+=P.packedLength,i[e++]=t._width,i[e++]=t._height,i[e++]=t._extrudedHeight,i[e++]=t._cornerType,i[e++]=t._granularity,i[e]=H(t._offsetAttribute,-1),i};var lt=P.clone(P.UNIT_SPHERE),R={positions:void 0,ellipsoid:lt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};V.unpack=function(t,i,e){M.typeOf.object("array",t),i=H(i,0);let l=t[i++],h=new Array(l);for(let d=0;d<l;++d,i+=A.packedLength)h[d]=A.unpack(t,i);let m=P.unpack(t,i,lt);i+=P.packedLength;let D=t[i++],y=t[i++],u=t[i++],p=t[i++],o=t[i++],g=t[i];return C(e)?(e._positions=h,e._ellipsoid=P.clone(m,e._ellipsoid),e._width=D,e._height=y,e._extrudedHeight=u,e._cornerType=p,e._granularity=o,e._offsetAttribute=g===-1?void 0:g,e):(R.positions=h,R.width=D,R.height=y,R.extrudedHeight=u,R.cornerType=p,R.granularity=o,R.offsetAttribute=g===-1?void 0:g,new V(R))};V.createGeometry=function(t){let i=t._positions,e=t._width,l=t._ellipsoid;i=ft(i,l);let h=it(i,A.equalsEpsilon);if(h.length<2||e<=0)return;let m=t._height,D=t._extrudedHeight,y=!q.equalsEpsilon(m,D,0,q.EPSILON2),u={ellipsoid:l,positions:h,width:e,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!1},p;if(y)u.height=m,u.extrudedHeight=D,u.offsetAttribute=t._offsetAttribute,p=ct(u);else{let d=S.computePositions(u);if(p=st(d,u.cornerType),p.attributes.position.values=Q.scaleToGeodeticHeight(p.attributes.position.values,m,l),C(t._offsetAttribute)){let _=p.attributes.position.values.length,w=t._offsetAttribute===K.NONE?0:1,T=new Uint8Array(_/3).fill(w);p.attributes.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}}let o=p.attributes,g=x.fromVertices(o.position.values,void 0,3);return new tt({attributes:o,indices:p.indices,primitiveType:I.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var $=V;function ht(t,i){return C(i)&&(t=$.unpack(t,i)),t._ellipsoid=P.clone(t._ellipsoid),$.createGeometry(t)}var Ot=ht;export{Ot as default}; diff --git a/cesium/Workers/createCylinderGeometry.js b/cesium/Workers/createCylinderGeometry.js index 810442f..bc291b7 100644 --- a/cesium/Workers/createCylinderGeometry.js +++ b/cesium/Workers/createCylinderGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as r}from"./chunk-VVVZBARZ.js";import"./chunk-2TLJ26OO.js";import"./chunk-WLRVP2UA.js";import"./chunk-DUVNED7U.js";import"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import{e as o}from"./chunk-U73D6PDD.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; +import{a as r}from"./chunk-IAC5XVZV.js";import"./chunk-GFN7NNSJ.js";import"./chunk-ILGBPNP6.js";import"./chunk-HEEMUCG6.js";import"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import{e as o}from"./chunk-PEYJTJPE.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; diff --git a/cesium/Workers/createCylinderOutlineGeometry.js b/cesium/Workers/createCylinderOutlineGeometry.js index 4d03e08..1f2817b 100644 --- a/cesium/Workers/createCylinderOutlineGeometry.js +++ b/cesium/Workers/createCylinderOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as M}from"./chunk-2TLJ26OO.js";import{a as V}from"./chunk-WLRVP2UA.js";import{a as N}from"./chunk-RQXB4B4V.js";import{a as k}from"./chunk-MPVEZNKB.js";import{b as D,c as P,d as L}from"./chunk-FATK2EQ2.js";import{d as y}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as A}from"./chunk-77ESX6BV.js";import{a as S,c as R}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as c}from"./chunk-42NIXFVW.js";import{a as T,b as m}from"./chunk-5YVCOCPP.js";import{e as d}from"./chunk-U73D6PDD.js";var w=new R;function a(t){t=c(t,c.EMPTY_OBJECT);let e=t.length,i=t.topRadius,f=t.bottomRadius,o=c(t.slices,128),r=Math.max(c(t.numberOfVerticalLines,16),0);if(m.typeOf.number("options.positions",e),m.typeOf.number("options.topRadius",i),m.typeOf.number("options.bottomRadius",f),m.typeOf.number.greaterThanOrEquals("options.slices",o,3),d(t.offsetAttribute)&&t.offsetAttribute===V.TOP)throw new T("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=i,this._bottomRadius=f,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}a.packedLength=6;a.pack=function(t,e,i){return m.typeOf.object("value",t),m.defined("array",e),i=c(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=c(t._offsetAttribute,-1),e};var b={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};a.unpack=function(t,e,i){m.defined("array",t),e=c(e,0);let f=t[e++],o=t[e++],r=t[e++],h=t[e++],l=t[e++],p=t[e];return d(i)?(i._length=f,i._topRadius=o,i._bottomRadius=r,i._slices=h,i._numberOfVerticalLines=l,i._offsetAttribute=p===-1?void 0:p,i):(b.length=f,b.topRadius=o,b.bottomRadius=r,b.slices=h,b.numberOfVerticalLines=l,b.offsetAttribute=p===-1?void 0:p,new a(b))};a.createGeometry=function(t){let e=t._length,i=t._topRadius,f=t._bottomRadius,o=t._slices,r=t._numberOfVerticalLines;if(e<=0||i<0||f<0||i===0&&f===0)return;let h=o*2,l=M.computePositions(e,i,f,o,!1),p=o*2,E;if(r>0){let O=Math.min(r,o);E=Math.round(o/O),p+=O}let s=N.createTypedArray(h,p*2),u=0,n;for(n=0;n<o-1;n++)s[u++]=n,s[u++]=n+1,s[u++]=n+o,s[u++]=n+1+o;if(s[u++]=o-1,s[u++]=0,s[u++]=o+o-1,s[u++]=o,r>0)for(n=0;n<o;n+=E)s[u++]=n,s[u++]=n+o;let _=new k;_.position=new L({componentDatatype:A.DOUBLE,componentsPerAttribute:3,values:l}),w.x=e*.5,w.y=Math.max(f,i);let g=new y(S.ZERO,R.magnitude(w));if(d(t._offsetAttribute)){e=l.length;let O=t._offsetAttribute===V.NONE?0:1,B=new Uint8Array(e/3).fill(O);_.applyOffset=new L({componentDatatype:A.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}return new P({attributes:_,indices:s,primitiveType:D.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var C=a;function G(t,e){return d(e)&&(t=C.unpack(t,e)),C.createGeometry(t)}var et=G;export{et as default}; +import{a as M}from"./chunk-GFN7NNSJ.js";import{a as V}from"./chunk-ILGBPNP6.js";import{a as N}from"./chunk-P37AI2DW.js";import{a as k}from"./chunk-T6BE4RZK.js";import{b as D,c as P,d as L}from"./chunk-X5IHHI6X.js";import{d as y}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as A}from"./chunk-KZNJOCYU.js";import{a as S,c as R}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as c}from"./chunk-IUA6FAOZ.js";import{a as T,b as m}from"./chunk-UH2WFNTA.js";import{e as d}from"./chunk-PEYJTJPE.js";var w=new R;function a(t){t=c(t,c.EMPTY_OBJECT);let e=t.length,i=t.topRadius,f=t.bottomRadius,o=c(t.slices,128),r=Math.max(c(t.numberOfVerticalLines,16),0);if(m.typeOf.number("options.positions",e),m.typeOf.number("options.topRadius",i),m.typeOf.number("options.bottomRadius",f),m.typeOf.number.greaterThanOrEquals("options.slices",o,3),d(t.offsetAttribute)&&t.offsetAttribute===V.TOP)throw new T("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=i,this._bottomRadius=f,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}a.packedLength=6;a.pack=function(t,e,i){return m.typeOf.object("value",t),m.defined("array",e),i=c(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=c(t._offsetAttribute,-1),e};var b={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};a.unpack=function(t,e,i){m.defined("array",t),e=c(e,0);let f=t[e++],o=t[e++],r=t[e++],h=t[e++],l=t[e++],p=t[e];return d(i)?(i._length=f,i._topRadius=o,i._bottomRadius=r,i._slices=h,i._numberOfVerticalLines=l,i._offsetAttribute=p===-1?void 0:p,i):(b.length=f,b.topRadius=o,b.bottomRadius=r,b.slices=h,b.numberOfVerticalLines=l,b.offsetAttribute=p===-1?void 0:p,new a(b))};a.createGeometry=function(t){let e=t._length,i=t._topRadius,f=t._bottomRadius,o=t._slices,r=t._numberOfVerticalLines;if(e<=0||i<0||f<0||i===0&&f===0)return;let h=o*2,l=M.computePositions(e,i,f,o,!1),p=o*2,E;if(r>0){let O=Math.min(r,o);E=Math.round(o/O),p+=O}let s=N.createTypedArray(h,p*2),u=0,n;for(n=0;n<o-1;n++)s[u++]=n,s[u++]=n+1,s[u++]=n+o,s[u++]=n+1+o;if(s[u++]=o-1,s[u++]=0,s[u++]=o+o-1,s[u++]=o,r>0)for(n=0;n<o;n+=E)s[u++]=n,s[u++]=n+o;let _=new k;_.position=new L({componentDatatype:A.DOUBLE,componentsPerAttribute:3,values:l}),w.x=e*.5,w.y=Math.max(f,i);let g=new y(S.ZERO,R.magnitude(w));if(d(t._offsetAttribute)){e=l.length;let O=t._offsetAttribute===V.NONE?0:1,B=new Uint8Array(e/3).fill(O);_.applyOffset=new L({componentDatatype:A.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}return new P({attributes:_,indices:s,primitiveType:D.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var C=a;function G(t,e){return d(e)&&(t=C.unpack(t,e)),C.createGeometry(t)}var et=G;export{et as default}; diff --git a/cesium/Workers/createEllipseGeometry.js b/cesium/Workers/createEllipseGeometry.js index d8edfd8..ebf5ae3 100644 --- a/cesium/Workers/createEllipseGeometry.js +++ b/cesium/Workers/createEllipseGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as o}from"./chunk-QBLZNHRV.js";import"./chunk-Y5ISG54S.js";import"./chunk-CRFMECNE.js";import"./chunk-7JCIFY66.js";import"./chunk-ED2EM7ZX.js";import"./chunk-YZP3DYN3.js";import"./chunk-WLRVP2UA.js";import"./chunk-DUVNED7U.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as t,d as c}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import{e as n}from"./chunk-U73D6PDD.js";function a(r,i){return n(i)&&(r=o.unpack(r,i)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),o.createGeometry(r)}var u=a;export{u as default}; +import{a as o}from"./chunk-KRKI6AAO.js";import"./chunk-BMHPVZ4H.js";import"./chunk-EFZKO5RU.js";import"./chunk-QB3MDM4J.js";import"./chunk-ABGXSJNX.js";import"./chunk-DQO6B4EQ.js";import"./chunk-ILGBPNP6.js";import"./chunk-HEEMUCG6.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as t,d as c}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import{e as n}from"./chunk-PEYJTJPE.js";function a(r,i){return n(i)&&(r=o.unpack(r,i)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),o.createGeometry(r)}var u=a;export{u as default}; diff --git a/cesium/Workers/createEllipseOutlineGeometry.js b/cesium/Workers/createEllipseOutlineGeometry.js index 2bad849..dcadb96 100644 --- a/cesium/Workers/createEllipseOutlineGeometry.js +++ b/cesium/Workers/createEllipseOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as i}from"./chunk-JE5KQ6H6.js";import"./chunk-Y5ISG54S.js";import"./chunk-WLRVP2UA.js";import"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as t,d as c}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import{e as o}from"./chunk-U73D6PDD.js";function a(r,n){return o(n)&&(r=i.unpack(r,n)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),i.createGeometry(r)}var p=a;export{p as default}; +import{a as i}from"./chunk-4BTGX3WJ.js";import"./chunk-BMHPVZ4H.js";import"./chunk-ILGBPNP6.js";import"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as t,d as c}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import{e as o}from"./chunk-PEYJTJPE.js";function a(r,n){return o(n)&&(r=i.unpack(r,n)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),i.createGeometry(r)}var p=a;export{p as default}; diff --git a/cesium/Workers/createEllipsoidGeometry.js b/cesium/Workers/createEllipsoidGeometry.js index 69a36e8..6ae719f 100644 --- a/cesium/Workers/createEllipsoidGeometry.js +++ b/cesium/Workers/createEllipsoidGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as e}from"./chunk-W6AEJFXB.js";import"./chunk-WLRVP2UA.js";import"./chunk-DUVNED7U.js";import"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import{e as o}from"./chunk-U73D6PDD.js";function i(r,t){return o(t)&&(r=e.unpack(r,t)),e.createGeometry(r)}var a=i;export{a as default}; +import{a as e}from"./chunk-TOGHF3VN.js";import"./chunk-ILGBPNP6.js";import"./chunk-HEEMUCG6.js";import"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import{e as o}from"./chunk-PEYJTJPE.js";function i(r,t){return o(t)&&(r=e.unpack(r,t)),e.createGeometry(r)}var a=i;export{a as default}; diff --git a/cesium/Workers/createEllipsoidOutlineGeometry.js b/cesium/Workers/createEllipsoidOutlineGeometry.js index 664e12b..7c5b04e 100644 --- a/cesium/Workers/createEllipsoidOutlineGeometry.js +++ b/cesium/Workers/createEllipsoidOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as t}from"./chunk-TRGIYWHT.js";import"./chunk-WLRVP2UA.js";import"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import{e as n}from"./chunk-U73D6PDD.js";function u(r,e){return n(r.buffer,e)&&(r=t.unpack(r,e)),t.createGeometry(r)}var a=u;export{a as default}; +import{a as t}from"./chunk-KCIZBVXL.js";import"./chunk-ILGBPNP6.js";import"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import{e as n}from"./chunk-PEYJTJPE.js";function u(r,e){return n(r.buffer,e)&&(r=t.unpack(r,e)),t.createGeometry(r)}var a=u;export{a as default}; diff --git a/cesium/Workers/createFrustumGeometry.js b/cesium/Workers/createFrustumGeometry.js index 155f6d0..59d8111 100644 --- a/cesium/Workers/createFrustumGeometry.js +++ b/cesium/Workers/createFrustumGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{c as r}from"./chunk-VHVBHB4H.js";import"./chunk-DUVNED7U.js";import"./chunk-REUYHR24.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import{e as o}from"./chunk-U73D6PDD.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; +import{c as r}from"./chunk-CBEO3SHS.js";import"./chunk-HEEMUCG6.js";import"./chunk-PDMQLSBL.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import{e as o}from"./chunk-PEYJTJPE.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; diff --git a/cesium/Workers/createFrustumOutlineGeometry.js b/cesium/Workers/createFrustumOutlineGeometry.js index 497758f..761056d 100644 --- a/cesium/Workers/createFrustumOutlineGeometry.js +++ b/cesium/Workers/createFrustumOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as k,b as _,c as j}from"./chunk-VHVBHB4H.js";import"./chunk-DUVNED7U.js";import"./chunk-REUYHR24.js";import{a as A}from"./chunk-MPVEZNKB.js";import{b as N,c as g,d as F}from"./chunk-FATK2EQ2.js";import{d as T}from"./chunk-3FEM743H.js";import{f as s}from"./chunk-CMXCDAKR.js";import{a as b}from"./chunk-77ESX6BV.js";import{a}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as d}from"./chunk-42NIXFVW.js";import{b as h}from"./chunk-5YVCOCPP.js";import{e as w}from"./chunk-U73D6PDD.js";var L=0,C=1;function l(e){h.typeOf.object("options",e),h.typeOf.object("options.frustum",e.frustum),h.typeOf.object("options.origin",e.origin),h.typeOf.object("options.orientation",e.orientation);let t=e.frustum,o=e.orientation,u=e.origin,c=d(e._drawNearPlane,!0),m,p;t instanceof _?(m=L,p=_.packedLength):t instanceof k&&(m=C,p=k.packedLength),this._frustumType=m,this._frustum=t.clone(),this._origin=a.clone(u),this._orientation=s.clone(o),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+a.packedLength+s.packedLength}l.pack=function(e,t,o){h.typeOf.object("value",e),h.defined("array",t),o=d(o,0);let u=e._frustumType,c=e._frustum;return t[o++]=u,u===L?(_.pack(c,t,o),o+=_.packedLength):(k.pack(c,t,o),o+=k.packedLength),a.pack(e._origin,t,o),o+=a.packedLength,s.pack(e._orientation,t,o),o+=s.packedLength,t[o]=e._drawNearPlane?1:0,t};var E=new _,G=new k,R=new s,S=new a;l.unpack=function(e,t,o){h.defined("array",e),t=d(t,0);let u=e[t++],c;u===L?(c=_.unpack(e,t,E),t+=_.packedLength):(c=k.unpack(e,t,G),t+=k.packedLength);let m=a.unpack(e,t,S);t+=a.packedLength;let p=s.unpack(e,t,R);t+=s.packedLength;let P=e[t]===1;if(!w(o))return new l({frustum:c,origin:m,orientation:p,_drawNearPlane:P});let n=u===o._frustumType?o._frustum:void 0;return o._frustum=c.clone(n),o._frustumType=u,o._origin=a.clone(m,o._origin),o._orientation=s.clone(p,o._orientation),o._drawNearPlane=P,o};l.createGeometry=function(e){let t=e._frustumType,o=e._frustum,u=e._origin,c=e._orientation,m=e._drawNearPlane,p=new Float64Array(3*4*2);j._computeNearFarPlanes(u,c,t,o,p);let P=new A({position:new F({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:p})}),n,r,y=m?2:1,i=new Uint16Array(8*(y+1)),f=m?0:1;for(;f<2;++f)n=m?f*8:0,r=f*4,i[n]=r,i[n+1]=r+1,i[n+2]=r+1,i[n+3]=r+2,i[n+4]=r+2,i[n+5]=r+3,i[n+6]=r+3,i[n+7]=r;for(f=0;f<2;++f)n=(y+f)*8,r=f*4,i[n]=r,i[n+1]=r+4,i[n+2]=r+1,i[n+3]=r+5,i[n+4]=r+2,i[n+5]=r+6,i[n+6]=r+3,i[n+7]=r+7;return new g({attributes:P,indices:i,primitiveType:N.LINES,boundingSphere:T.fromVertices(p)})};var O=l;function D(e,t){return w(t)&&(e=O.unpack(e,t)),O.createGeometry(e)}var I=D;export{I as default}; +import{a as k,b as _,c as j}from"./chunk-CBEO3SHS.js";import"./chunk-HEEMUCG6.js";import"./chunk-PDMQLSBL.js";import{a as A}from"./chunk-T6BE4RZK.js";import{b as N,c as g,d as F}from"./chunk-X5IHHI6X.js";import{d as T}from"./chunk-TMSETF7M.js";import{f as s}from"./chunk-7Z5IIKOJ.js";import{a as b}from"./chunk-KZNJOCYU.js";import{a}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as d}from"./chunk-IUA6FAOZ.js";import{b as h}from"./chunk-UH2WFNTA.js";import{e as w}from"./chunk-PEYJTJPE.js";var L=0,C=1;function l(e){h.typeOf.object("options",e),h.typeOf.object("options.frustum",e.frustum),h.typeOf.object("options.origin",e.origin),h.typeOf.object("options.orientation",e.orientation);let t=e.frustum,o=e.orientation,u=e.origin,c=d(e._drawNearPlane,!0),m,p;t instanceof _?(m=L,p=_.packedLength):t instanceof k&&(m=C,p=k.packedLength),this._frustumType=m,this._frustum=t.clone(),this._origin=a.clone(u),this._orientation=s.clone(o),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+a.packedLength+s.packedLength}l.pack=function(e,t,o){h.typeOf.object("value",e),h.defined("array",t),o=d(o,0);let u=e._frustumType,c=e._frustum;return t[o++]=u,u===L?(_.pack(c,t,o),o+=_.packedLength):(k.pack(c,t,o),o+=k.packedLength),a.pack(e._origin,t,o),o+=a.packedLength,s.pack(e._orientation,t,o),o+=s.packedLength,t[o]=e._drawNearPlane?1:0,t};var E=new _,G=new k,R=new s,S=new a;l.unpack=function(e,t,o){h.defined("array",e),t=d(t,0);let u=e[t++],c;u===L?(c=_.unpack(e,t,E),t+=_.packedLength):(c=k.unpack(e,t,G),t+=k.packedLength);let m=a.unpack(e,t,S);t+=a.packedLength;let p=s.unpack(e,t,R);t+=s.packedLength;let P=e[t]===1;if(!w(o))return new l({frustum:c,origin:m,orientation:p,_drawNearPlane:P});let n=u===o._frustumType?o._frustum:void 0;return o._frustum=c.clone(n),o._frustumType=u,o._origin=a.clone(m,o._origin),o._orientation=s.clone(p,o._orientation),o._drawNearPlane=P,o};l.createGeometry=function(e){let t=e._frustumType,o=e._frustum,u=e._origin,c=e._orientation,m=e._drawNearPlane,p=new Float64Array(3*4*2);j._computeNearFarPlanes(u,c,t,o,p);let P=new A({position:new F({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:p})}),n,r,y=m?2:1,i=new Uint16Array(8*(y+1)),f=m?0:1;for(;f<2;++f)n=m?f*8:0,r=f*4,i[n]=r,i[n+1]=r+1,i[n+2]=r+1,i[n+3]=r+2,i[n+4]=r+2,i[n+5]=r+3,i[n+6]=r+3,i[n+7]=r;for(f=0;f<2;++f)n=(y+f)*8,r=f*4,i[n]=r,i[n+1]=r+4,i[n+2]=r+1,i[n+3]=r+5,i[n+4]=r+2,i[n+5]=r+6,i[n+6]=r+3,i[n+7]=r+7;return new g({attributes:P,indices:i,primitiveType:N.LINES,boundingSphere:T.fromVertices(p)})};var O=l;function D(e,t){return w(t)&&(e=O.unpack(e,t)),O.createGeometry(e)}var I=D;export{I as default}; diff --git a/cesium/Workers/createGeometry.js b/cesium/Workers/createGeometry.js index 746fc2b..071379d 100644 --- a/cesium/Workers/createGeometry.js +++ b/cesium/Workers/createGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as d}from"./chunk-ACE4ZHPK.js";import{a as w}from"./chunk-4FSMRIBR.js";import"./chunk-7RBDS4IP.js";import"./chunk-7JCIFY66.js";import"./chunk-ED2EM7ZX.js";import"./chunk-YZP3DYN3.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as k}from"./chunk-42NIXFVW.js";import{a as y}from"./chunk-5YVCOCPP.js";import{a,b as p,e as r}from"./chunk-U73D6PDD.js";var b=p({"./combineGeometry.js":()=>import("./combineGeometry.js"),"./createBoxGeometry.js":()=>import("./createBoxGeometry.js"),"./createBoxOutlineGeometry.js":()=>import("./createBoxOutlineGeometry.js"),"./createCircleGeometry.js":()=>import("./createCircleGeometry.js"),"./createCircleOutlineGeometry.js":()=>import("./createCircleOutlineGeometry.js"),"./createCoplanarPolygonGeometry.js":()=>import("./createCoplanarPolygonGeometry.js"),"./createCoplanarPolygonOutlineGeometry.js":()=>import("./createCoplanarPolygonOutlineGeometry.js"),"./createCorridorGeometry.js":()=>import("./createCorridorGeometry.js"),"./createCorridorOutlineGeometry.js":()=>import("./createCorridorOutlineGeometry.js"),"./createCylinderGeometry.js":()=>import("./createCylinderGeometry.js"),"./createCylinderOutlineGeometry.js":()=>import("./createCylinderOutlineGeometry.js"),"./createEllipseGeometry.js":()=>import("./createEllipseGeometry.js"),"./createEllipseOutlineGeometry.js":()=>import("./createEllipseOutlineGeometry.js"),"./createEllipsoidGeometry.js":()=>import("./createEllipsoidGeometry.js"),"./createEllipsoidOutlineGeometry.js":()=>import("./createEllipsoidOutlineGeometry.js"),"./createFrustumGeometry.js":()=>import("./createFrustumGeometry.js"),"./createFrustumOutlineGeometry.js":()=>import("./createFrustumOutlineGeometry.js"),"./createGeometry.js":()=>import("./createGeometry.js"),"./createGroundPolylineGeometry.js":()=>import("./createGroundPolylineGeometry.js"),"./createPlaneGeometry.js":()=>import("./createPlaneGeometry.js"),"./createPlaneOutlineGeometry.js":()=>import("./createPlaneOutlineGeometry.js"),"./createPolygonGeometry.js":()=>import("./createPolygonGeometry.js"),"./createPolygonOutlineGeometry.js":()=>import("./createPolygonOutlineGeometry.js"),"./createPolylineGeometry.js":()=>import("./createPolylineGeometry.js"),"./createPolylineVolumeGeometry.js":()=>import("./createPolylineVolumeGeometry.js"),"./createPolylineVolumeOutlineGeometry.js":()=>import("./createPolylineVolumeOutlineGeometry.js"),"./createRectangleGeometry.js":()=>import("./createRectangleGeometry.js"),"./createRectangleOutlineGeometry.js":()=>import("./createRectangleOutlineGeometry.js"),"./createSimplePolylineGeometry.js":()=>import("./createSimplePolylineGeometry.js"),"./createSphereGeometry.js":()=>import("./createSphereGeometry.js"),"./createSphereOutlineGeometry.js":()=>import("./createSphereOutlineGeometry.js"),"./createTaskProcessorWorker.js":()=>import("./createTaskProcessorWorker.js"),"./createVectorTileClampedPolylines.js":()=>import("./createVectorTileClampedPolylines.js"),"./createVectorTileGeometries.js":()=>import("./createVectorTileGeometries.js"),"./createVectorTilePoints.js":()=>import("./createVectorTilePoints.js"),"./createVectorTilePolygons.js":()=>import("./createVectorTilePolygons.js"),"./createVectorTilePolylines.js":()=>import("./createVectorTilePolylines.js"),"./createVerticesFromGoogleEarthEnterpriseBuffer.js":()=>import("./createVerticesFromGoogleEarthEnterpriseBuffer.js"),"./createVerticesFromHeightmap.js":()=>import("./createVerticesFromHeightmap.js"),"./createVerticesFromQuantizedTerrainMesh.js":()=>import("./createVerticesFromQuantizedTerrainMesh.js"),"./createWallGeometry.js":()=>import("./createWallGeometry.js"),"./createWallOutlineGeometry.js":()=>import("./createWallOutlineGeometry.js"),"./decodeDraco.js":()=>import("./decodeDraco.js"),"./decodeGoogleEarthEnterprisePacket.js":()=>import("./decodeGoogleEarthEnterprisePacket.js"),"./decodeI3S.js":()=>import("./decodeI3S.js"),"./transcodeKTX2.js":()=>import("./transcodeKTX2.js"),"./transferTypedArrayTest.js":()=>import("./transferTypedArrayTest.js"),"./upsampleQuantizedTerrainMesh.js":()=>import("./upsampleQuantizedTerrainMesh.js")});var f={};async function h(s,t){let e=k(f[t],f[s]);return r(e)?e:r(t)?(typeof exports=="object"?e=a(t):e=(await import(t)).default,f[t]=e,e):(typeof exports=="object"?e=a(`Workers/${s}`):e=(r(t)?await import(t):await b(`./${s}.js`)).default,f[s]=e,e)}async function x(s,t){let e=s.subTasks,n=e.length,u=new Array(n);for(let o=0;o<n;o++){let i=e[o],m=i.geometry,l=i.moduleName,c=i.modulePath;if(r(l)&&r(c))throw new y("Must only set moduleName or modulePath");r(l)||r(c)?u[o]=h(l,c).then(g=>g(m,i.offset)):u[o]=m}return Promise.all(u).then(function(o){return d.packCreateGeometryResults(o,t)})}var P=w(x);export{P as default}; +import{a as d}from"./chunk-FKRG4HDY.js";import{a as w}from"./chunk-PXCJYT2S.js";import"./chunk-SB224QGV.js";import"./chunk-QB3MDM4J.js";import"./chunk-ABGXSJNX.js";import"./chunk-DQO6B4EQ.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as k}from"./chunk-IUA6FAOZ.js";import{a as y}from"./chunk-UH2WFNTA.js";import{a,b as p,e as r}from"./chunk-PEYJTJPE.js";var b=p({"./combineGeometry.js":()=>import("./combineGeometry.js"),"./createBoxGeometry.js":()=>import("./createBoxGeometry.js"),"./createBoxOutlineGeometry.js":()=>import("./createBoxOutlineGeometry.js"),"./createCircleGeometry.js":()=>import("./createCircleGeometry.js"),"./createCircleOutlineGeometry.js":()=>import("./createCircleOutlineGeometry.js"),"./createCoplanarPolygonGeometry.js":()=>import("./createCoplanarPolygonGeometry.js"),"./createCoplanarPolygonOutlineGeometry.js":()=>import("./createCoplanarPolygonOutlineGeometry.js"),"./createCorridorGeometry.js":()=>import("./createCorridorGeometry.js"),"./createCorridorOutlineGeometry.js":()=>import("./createCorridorOutlineGeometry.js"),"./createCylinderGeometry.js":()=>import("./createCylinderGeometry.js"),"./createCylinderOutlineGeometry.js":()=>import("./createCylinderOutlineGeometry.js"),"./createEllipseGeometry.js":()=>import("./createEllipseGeometry.js"),"./createEllipseOutlineGeometry.js":()=>import("./createEllipseOutlineGeometry.js"),"./createEllipsoidGeometry.js":()=>import("./createEllipsoidGeometry.js"),"./createEllipsoidOutlineGeometry.js":()=>import("./createEllipsoidOutlineGeometry.js"),"./createFrustumGeometry.js":()=>import("./createFrustumGeometry.js"),"./createFrustumOutlineGeometry.js":()=>import("./createFrustumOutlineGeometry.js"),"./createGeometry.js":()=>import("./createGeometry.js"),"./createGroundPolylineGeometry.js":()=>import("./createGroundPolylineGeometry.js"),"./createPlaneGeometry.js":()=>import("./createPlaneGeometry.js"),"./createPlaneOutlineGeometry.js":()=>import("./createPlaneOutlineGeometry.js"),"./createPolygonGeometry.js":()=>import("./createPolygonGeometry.js"),"./createPolygonOutlineGeometry.js":()=>import("./createPolygonOutlineGeometry.js"),"./createPolylineGeometry.js":()=>import("./createPolylineGeometry.js"),"./createPolylineVolumeGeometry.js":()=>import("./createPolylineVolumeGeometry.js"),"./createPolylineVolumeOutlineGeometry.js":()=>import("./createPolylineVolumeOutlineGeometry.js"),"./createRectangleGeometry.js":()=>import("./createRectangleGeometry.js"),"./createRectangleOutlineGeometry.js":()=>import("./createRectangleOutlineGeometry.js"),"./createSimplePolylineGeometry.js":()=>import("./createSimplePolylineGeometry.js"),"./createSphereGeometry.js":()=>import("./createSphereGeometry.js"),"./createSphereOutlineGeometry.js":()=>import("./createSphereOutlineGeometry.js"),"./createTaskProcessorWorker.js":()=>import("./createTaskProcessorWorker.js"),"./createVectorTileClampedPolylines.js":()=>import("./createVectorTileClampedPolylines.js"),"./createVectorTileGeometries.js":()=>import("./createVectorTileGeometries.js"),"./createVectorTilePoints.js":()=>import("./createVectorTilePoints.js"),"./createVectorTilePolygons.js":()=>import("./createVectorTilePolygons.js"),"./createVectorTilePolylines.js":()=>import("./createVectorTilePolylines.js"),"./createVerticesFromGoogleEarthEnterpriseBuffer.js":()=>import("./createVerticesFromGoogleEarthEnterpriseBuffer.js"),"./createVerticesFromHeightmap.js":()=>import("./createVerticesFromHeightmap.js"),"./createVerticesFromQuantizedTerrainMesh.js":()=>import("./createVerticesFromQuantizedTerrainMesh.js"),"./createWallGeometry.js":()=>import("./createWallGeometry.js"),"./createWallOutlineGeometry.js":()=>import("./createWallOutlineGeometry.js"),"./decodeDraco.js":()=>import("./decodeDraco.js"),"./decodeGoogleEarthEnterprisePacket.js":()=>import("./decodeGoogleEarthEnterprisePacket.js"),"./decodeI3S.js":()=>import("./decodeI3S.js"),"./transcodeKTX2.js":()=>import("./transcodeKTX2.js"),"./transferTypedArrayTest.js":()=>import("./transferTypedArrayTest.js"),"./upsampleQuantizedTerrainMesh.js":()=>import("./upsampleQuantizedTerrainMesh.js")});var f={};async function h(s,t){let e=k(f[t],f[s]);return r(e)?e:r(t)?(typeof exports=="object"?e=a(t):e=(await import(t)).default,f[t]=e,e):(typeof exports=="object"?e=a(`Workers/${s}`):e=(r(t)?await import(t):await b(`./${s}.js`)).default,f[s]=e,e)}async function x(s,t){let e=s.subTasks,n=e.length,u=new Array(n);for(let o=0;o<n;o++){let i=e[o],m=i.geometry,l=i.moduleName,c=i.modulePath;if(r(l)&&r(c))throw new y("Must only set moduleName or modulePath");r(l)||r(c)?u[o]=h(l,c).then(g=>g(m,i.offset)):u[o]=m}return Promise.all(u).then(function(o){return d.packCreateGeometryResults(o,t)})}var P=w(x);export{P as default}; diff --git a/cesium/Workers/createGroundPolylineGeometry.js b/cesium/Workers/createGroundPolylineGeometry.js index 25b8589..dae6528 100644 --- a/cesium/Workers/createGroundPolylineGeometry.js +++ b/cesium/Workers/createGroundPolylineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as _e}from"./chunk-7RBDS4IP.js";import{a as Z}from"./chunk-EQCQ5LRI.js";import{a as _t}from"./chunk-YZP3DYN3.js";import{a as Oe}from"./chunk-65DFAZKW.js";import{a as Le}from"./chunk-CIEXTRKV.js";import{a as te}from"./chunk-OSVMDAN4.js";import{b as Qt}from"./chunk-PT2EMSIG.js";import{a as jt}from"./chunk-REUYHR24.js";import{c as Ce,d as zt}from"./chunk-FATK2EQ2.js";import{a as bt,d as U}from"./chunk-3FEM743H.js";import{d as xe,e as Ne,f as Kt,h as G}from"./chunk-CMXCDAKR.js";import{a as Bt}from"./chunk-77ESX6BV.js";import{a as t,b as u,c as Pt,d as z,e as vt}from"./chunk-LJCGAQ64.js";import{a as p}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as O}from"./chunk-42NIXFVW.js";import{a as St,b as et}from"./chunk-5YVCOCPP.js";import{e as g}from"./chunk-U73D6PDD.js";function rt(e){e=O(e,O.EMPTY_OBJECT),this._ellipsoid=O(e.ellipsoid,z.WGS84),this._rectangle=O(e.rectangle,G.MAX_VALUE),this._projection=new bt(this._ellipsoid),this._numberOfLevelZeroTilesX=O(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=O(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(rt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});rt.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};rt.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};rt.prototype.rectangleToNativeRectangle=function(e,i){et.defined("rectangle",e);let r=p.toDegrees(e.west),n=p.toDegrees(e.south),o=p.toDegrees(e.east),a=p.toDegrees(e.north);return g(i)?(i.west=r,i.south=n,i.east=o,i.north=a,i):new G(r,n,o,a)};rt.prototype.tileXYToNativeRectangle=function(e,i,r,n){let o=this.tileXYToRectangle(e,i,r,n);return o.west=p.toDegrees(o.west),o.south=p.toDegrees(o.south),o.east=p.toDegrees(o.east),o.north=p.toDegrees(o.north),o};rt.prototype.tileXYToRectangle=function(e,i,r,n){let o=this._rectangle,a=this.getNumberOfXTilesAtLevel(r),c=this.getNumberOfYTilesAtLevel(r),l=o.width/a,s=e*l+o.west,d=(e+1)*l+o.west,h=o.height/c,N=o.north-i*h,S=o.north-(i+1)*h;return g(n)||(n=new G(s,S,d,N)),n.west=s,n.south=S,n.east=d,n.north=N,n};rt.prototype.positionToTileXY=function(e,i,r){let n=this._rectangle;if(!G.contains(n,e))return;let o=this.getNumberOfXTilesAtLevel(i),a=this.getNumberOfYTilesAtLevel(i),c=n.width/o,l=n.height/a,s=e.longitude;n.east<n.west&&(s+=p.TWO_PI);let d=(s-n.west)/c|0;d>=o&&(d=o-1);let h=(n.north-e.latitude)/l|0;return h>=a&&(h=a-1),g(r)?(r.x=d,r.y=h,r):new Pt(d,h)};var De=rt;var Ie=new t,He=new t,ke=new u,ee=new t,hn=new t,ye=new U,pn=new De,Lt=[new u,new u,new u,new u],Ot=new Pt,w={};w.initialize=function(){let e=w._initPromise;return g(e)||(e=xe.fetchJson(Ne("Assets/approximateTerrainHeights.json")).then(function(i){w._terrainHeights=i}),w._initPromise=e),e};w.getMinimumMaximumHeights=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.WGS84);let r=Ae(e),n=w._defaultMinTerrainHeight,o=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[0],o=c[1]),i.cartographicToCartesian(G.northeast(e,ke),Ie),i.cartographicToCartesian(G.southwest(e,ke),He),t.midpoint(He,Ie,ee);let l=i.scaleToGeodeticSurface(ee,hn);if(g(l)){let s=t.distance(ee,l);n=Math.min(n,-s)}else n=w._defaultMinTerrainHeight}return n=Math.max(w._defaultMinTerrainHeight,n),{minimumTerrainHeight:n,maximumTerrainHeight:o}};w.getBoundingSphere=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.WGS84);let r=Ae(e),n=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[1])}let o=U.fromRectangle3D(e,i,0);return U.fromRectangle3D(e,i,n,ye),U.union(o,ye,o)};function Ae(e){u.fromRadians(e.east,e.north,0,Lt[0]),u.fromRadians(e.west,e.north,0,Lt[1]),u.fromRadians(e.east,e.south,0,Lt[2]),u.fromRadians(e.west,e.south,0,Lt[3]);let i=0,r=0,n=0,o=0,a=w._terrainHeightsMaxLevel,c;for(c=0;c<=a;++c){let l=!1;for(let s=0;s<4;++s){let d=Lt[s];if(pn.positionToTileXY(d,c,Ot),s===0)n=Ot.x,o=Ot.y;else if(n!==Ot.x||o!==Ot.y){l=!0;break}}if(l)break;i=n,r=o}if(c!==0)return{x:i,y:r,level:c>a?a:c-1}}w._terrainHeightsMaxLevel=6;w._defaultMaxTerrainHeight=9e3;w._defaultMinTerrainHeight=-1e5;w._terrainHeights=void 0;w._initPromise=void 0;Object.defineProperties(w,{initialized:{get:function(){return g(w._terrainHeights)}}});var Xt=w;var le=[bt,_e],dn=le.length,Ke=Math.cos(p.toRadians(30)),Me=Math.cos(p.toRadians(150)),Qe=0,tn=1e3;function ct(e){e=O(e,O.EMPTY_OBJECT);let i=e.positions;if(!g(i)||i.length<2)throw new St("At least two positions are required.");if(g(e.arcType)&&e.arcType!==Z.GEODESIC&&e.arcType!==Z.RHUMB)throw new St("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=O(e.width,1),this._positions=i,this.granularity=O(e.granularity,9999),this.loop=O(e.loop,!1),this.arcType=O(e.arcType,Z.GEODESIC),this._ellipsoid=z.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ct.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+z.packedLength+1+1}}});ct.setProjectionAndEllipsoid=function(e,i){let r=0;for(let n=0;n<dn;n++)if(i instanceof le[n]){r=n;break}e._projectionIndex=r,e._ellipsoid=i.ellipsoid};var fn=new t,Re=new t,Pe=new t;function se(e,i,r,n,o){let a=P(n,e,0,fn),c=P(n,e,r,Re),l=P(n,i,0,Pe),s=nt(c,a,Re),d=nt(l,a,Pe);return t.cross(d,s,o),t.normalize(o,o)}var mn=new u,gn=new t,un=new t,wn=new t;function ne(e,i,r,n,o,a,c,l,s,d,h){if(o===0)return;let N;a===Z.GEODESIC?N=new Oe(e,i,c):a===Z.RHUMB&&(N=new te(e,i,c));let S=N.surfaceDistance;if(S<o)return;let R=se(e,i,n,c,wn),D=Math.ceil(S/o),I=S/D,j=I,W=D-1,f=l.length;for(let X=0;X<W;X++){let v=N.interpolateUsingSurfaceDistance(j,mn),y=P(c,v,r,gn),H=P(c,v,n,un);t.pack(R,l,f),t.pack(y,s,f),t.pack(H,d,f),h.push(v.latitude),h.push(v.longitude),f+=3,j+=I}}var oe=new u;function P(e,i,r,n){return u.clone(i,oe),oe.height=r,u.toCartesian(oe,e,n)}ct.pack=function(e,i,r){et.typeOf.object("value",e),et.defined("array",i);let n=O(r,0),o=e._positions,a=o.length;i[n++]=a;for(let c=0;c<a;++c){let l=o[c];t.pack(l,i,n),n+=3}return i[n++]=e.granularity,i[n++]=e.loop?1:0,i[n++]=e.arcType,z.pack(e._ellipsoid,i,n),n+=z.packedLength,i[n++]=e._projectionIndex,i[n++]=e._scene3DOnly?1:0,i};ct.unpack=function(e,i,r){et.defined("array",e);let n=O(i,0),o=e[n++],a=new Array(o);for(let S=0;S<o;S++)a[S]=t.unpack(e,n),n+=3;let c=e[n++],l=e[n++]===1,s=e[n++],d=z.unpack(e,n);n+=z.packedLength;let h=e[n++],N=e[n++]===1;return g(r)||(r=new ct({positions:a})),r._positions=a,r.granularity=c,r.loop=l,r.arcType=s,r._ellipsoid=d,r._projectionIndex=h,r._scene3DOnly=N,r};function nt(e,i,r){return t.subtract(e,i,r),t.normalize(r,r),r}function be(e,i,r,n){return n=nt(e,i,n),n=t.cross(n,r,n),n=t.normalize(n,n),n=t.cross(r,n,n),n}var Sn=new t,Tn=new t,En=new t,en=new t,xn=0,Nn=-1;function ie(e,i,r,n,o){let a=nt(r,i,en),c=be(e,i,a,Sn),l=be(n,i,a,Tn);if(p.equalsEpsilon(t.dot(c,l),Nn,p.EPSILON5))return o=t.cross(a,c,o),o=t.normalize(o,o),o;o=t.add(l,c,o),o=t.normalize(o,o);let s=t.cross(a,o,En);return t.dot(l,s)<xn&&(o=t.negate(o,o)),o}var Ut=jt.fromPointNormal(t.ZERO,t.UNIT_Y),Cn=new t,_n=new t,Ln=new t,On=new t,Dn=new t,Yt=new t,Ft=new u,ve=new u,Be=new u;ct.createGeometry=function(e){let i=!e._scene3DOnly,r=e.loop,n=e._ellipsoid,o=e.granularity,a=e.arcType,c=new le[e._projectionIndex](n),l=Qe,s=tn,d,h,N=e._positions,S=N.length;S===2&&(r=!1);let R,D,I,j,W=new te(void 0,void 0,n),f,X,v,y=[N[0]];for(h=0;h<S-1;h++)R=N[h],D=N[h+1],f=Qt.lineSegmentPlane(R,D,Ut,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),W.setEndPoints(I,j),X=W.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))),y.push(D);r&&(R=N[S-1],D=N[0],f=Qt.lineSegmentPlane(R,D,Ut,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),W.setEndPoints(I,j),X=W.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))));let H=y.length,C=new Array(H);for(h=0;h<H;h++){let F=u.fromCartesian(y[h],n);F.height=0,C[h]=F}if(C=Le(C,u.equalsEpsilon),H=C.length,H<2)return;let k=[],b=[],B=[],E=[],x=Cn,L=_n,_=Ln,Y=On,A=Dn,m=C[0],V=C[1],It=C[H-1];for(x=P(n,It,l,x),Y=P(n,V,l,Y),L=P(n,m,l,L),_=P(n,m,s,_),r?A=ie(x,L,_,Y,A):A=se(m,V,s,n,A),t.pack(A,b,0),t.pack(L,B,0),t.pack(_,E,0),k.push(m.latitude),k.push(m.longitude),ne(m,V,l,s,o,a,n,b,B,E,k),h=1;h<H-1;++h){x=t.clone(L,x),L=t.clone(Y,L);let F=C[h];P(n,F,s,_),P(n,C[h+1],l,Y),ie(x,L,_,Y,A),d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(F.latitude),k.push(F.longitude),ne(C[h],C[h+1],l,s,o,a,n,b,B,E,k)}let M=C[H-1],Tt=C[H-2];if(L=P(n,M,l,L),_=P(n,M,s,_),r){let F=C[0];x=P(n,Tt,l,x),Y=P(n,F,l,Y),A=ie(x,L,_,Y,A)}else A=se(Tt,M,s,n,A);if(d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(M.latitude),k.push(M.longitude),r){for(ne(M,m,l,s,o,a,n,b,B,E,k),d=b.length,h=0;h<3;++h)b[d+h]=b[h],B[d+h]=B[h],E[d+h]=E[h];k.push(m.latitude),k.push(m.longitude)}return Qn(r,c,B,E,b,k,i)};var In=new t,Hn=new vt,kn=new Kt;function ze(e,i,r,n){let o=nt(r,i,In),a=t.dot(o,e);if(a>Ke||a<Me){let c=nt(n,r,en),l=a<Me?p.PI_OVER_TWO:-p.PI_OVER_TWO,s=Kt.fromAxisAngle(c,l,kn),d=vt.fromQuaternion(s,Hn);return vt.multiplyByVector(d,e,e),!0}return!1}var je=new u,yn=new t,Xe=new t;function Dt(e,i,r,n,o){let a=u.toCartesian(i,e._ellipsoid,yn),c=t.add(a,r,Xe),l=!1,s=e._ellipsoid,d=s.cartesianToCartographic(c,je);Math.abs(i.longitude-d.longitude)>p.PI_OVER_TWO&&(l=!0,c=t.subtract(a,r,Xe),d=s.cartesianToCartographic(c,je)),d.height=0;let h=e.project(d,o);return o=t.subtract(h,n,o),o.z=0,o=t.normalize(o,o),l&&t.negate(o,o),o}var An=new t,Ye=new t;function Fe(e,i,r,n,o,a){let c=t.subtract(i,e,An);t.normalize(c,c);let l=r-Qe,s=t.multiplyByScalar(c,l,Ye);t.add(e,s,o);let d=n-tn;s=t.multiplyByScalar(c,d,Ye),t.add(i,s,a)}var Mn=new t;function Gt(e,i){let r=jt.getPointDistance(Ut,e),n=jt.getPointDistance(Ut,i),o=Mn;p.equalsEpsilon(r,0,p.EPSILON2)?(o=nt(i,e,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(e,o,e)):p.equalsEpsilon(n,0,p.EPSILON2)&&(o=nt(e,i,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(i,o,i))}function Rn(e,i){let r=Math.abs(e.longitude),n=Math.abs(i.longitude);if(p.equalsEpsilon(r,p.PI,p.EPSILON11)){let o=p.sign(i.longitude);return e.longitude=o*(r-p.EPSILON11),1}else if(p.equalsEpsilon(n,p.PI,p.EPSILON11)){let o=p.sign(e.longitude);return i.longitude=o*(n-p.EPSILON11),2}return 0}var nn=new u,on=new u,Ge=new t,re=new t,Ue=new t,We=new t,Pn=new t,qe=new t,bn=[nn,on],vn=new G,Bn=new t,zn=new t,jn=new t,Xn=new t,Yn=new t,Fn=new t,ae=new t,ce=new t,Gn=new t,Un=new t,Wn=new t,Ze=new t,qn=new t,Zn=new t,Vn=new _t,$n=new _t,Ve=new t,Jn=new t,$e=new t,Kn=[new U,new U],rn=[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],Je=rn.length;function Qn(e,i,r,n,o,a,c){let l,s,d=i._ellipsoid,h=r.length/3-1,N=h*8,S=N*4,R=h*36,D=N>65535?new Uint32Array(R):new Uint16Array(R),I=new Float64Array(N*3),j=new Float32Array(S),W=new Float32Array(S),f=new Float32Array(S),X=new Float32Array(S),v=new Float32Array(S),y,H,C,k;c&&(y=new Float32Array(S),H=new Float32Array(S),C=new Float32Array(S),k=new Float32Array(N*2));let b=a.length/2,B=0,E=nn;E.height=0;let x=on;x.height=0;let L=Ge,_=re;if(c)for(s=0,l=1;l<b;l++)E.latitude=a[s],E.longitude=a[s+1],x.latitude=a[s+2],x.longitude=a[s+3],L=i.project(E,L),_=i.project(x,_),B+=t.distance(L,_),s+=2;let Y=n.length/3;_=t.unpack(n,0,_);let A=0;for(s=3,l=1;l<Y;l++)L=t.clone(_,L),_=t.unpack(n,s,_),A+=t.distance(L,_),s+=3;let m;s=3;let V=0,It=0,M=0,Tt=0,F=!1,st=t.unpack(r,0,We),lt=t.unpack(n,0,re),q=t.unpack(o,0,qe);if(e){let ht=t.unpack(r,r.length-6,Ue);ze(q,ht,st,lt)&&(q=t.negate(q,q))}let pe=0,de=0,Wt=0;for(l=0;l<h;l++){let ht=t.clone(st,Ue),Zt=t.clone(lt,Ge),mt=t.clone(q,Pn);F&&(mt=t.negate(mt,mt)),st=t.unpack(r,s,We),lt=t.unpack(n,s,re),q=t.unpack(o,s,qe),F=ze(q,ht,st,lt),E.latitude=a[V],E.longitude=a[V+1],x.latitude=a[V+2],x.longitude=a[V+3];let pt,gt,ot,it;if(c){let T=Rn(E,x);pt=i.project(E,Yn),gt=i.project(x,Fn);let wt=nt(gt,pt,Ve);wt.y=Math.abs(wt.y),ot=ae,it=ce,T===0||t.dot(wt,t.UNIT_Y)>Ke?(ot=Dt(i,E,mt,pt,ae),it=Dt(i,x,q,gt,ce)):T===1?(it=Dt(i,x,q,gt,ce),ot.x=0,ot.y=p.sign(E.longitude-Math.abs(x.longitude)),ot.z=0):(ot=Dt(i,E,mt,pt,ae),it.x=0,it.y=p.sign(E.longitude-x.longitude),it.z=0)}let ge=t.distance(Zt,lt),ue=_t.fromCartesian(ht,Vn),Ht=t.subtract(st,ht,Gn),an=t.normalize(Ht,Ze),xt=t.subtract(Zt,ht,Un);xt=t.normalize(xt,xt);let ut=t.cross(an,xt,Ze);ut=t.normalize(ut,ut);let kt=t.cross(xt,mt,qn);kt=t.normalize(kt,kt);let yt=t.subtract(lt,st,Wn);yt=t.normalize(yt,yt);let At=t.cross(q,yt,Zn);At=t.normalize(At,At);let cn=ge/A,sn=pe/A,Vt=0,Nt,Mt,dt,we=0,Se=0;if(c){Vt=t.distance(pt,gt),Nt=_t.fromCartesian(pt,$n),Mt=t.subtract(gt,pt,Ve),dt=t.normalize(Mt,Jn);let T=dt.x;dt.x=dt.y,dt.y=-T,we=Vt/B,Se=de/B}for(m=0;m<8;m++){let T=Tt+m*4,wt=It+m*2,Ct=T+3,Ee=m<4?1:-1,Rt=m===2||m===3||m===6||m===7?1:-1;t.pack(ue.high,j,T),j[Ct]=Ht.x,t.pack(ue.low,W,T),W[Ct]=Ht.y,t.pack(kt,f,T),f[Ct]=Ht.z,t.pack(At,X,T),X[Ct]=cn*Ee,t.pack(ut,v,T);let ft=sn*Rt;ft===0&&Rt<0&&(ft=9),v[Ct]=ft,c&&(y[T]=Nt.high.x,y[T+1]=Nt.high.y,y[T+2]=Nt.low.x,y[T+3]=Nt.low.y,C[T]=-ot.y,C[T+1]=ot.x,C[T+2]=it.y,C[T+3]=-it.x,H[T]=Mt.x,H[T+1]=Mt.y,H[T+2]=dt.x,H[T+3]=dt.y,k[wt]=we*Ee,ft=Se*Rt,ft===0&&Rt<0&&(ft=9),k[wt+1]=ft)}let $=jn,J=Xn,K=Bn,Q=zn,ln=G.fromCartographicArray(bn,vn),Te=Xt.getMinimumMaximumHeights(ln,d),$t=Te.minimumTerrainHeight,Jt=Te.maximumTerrainHeight;Wt+=Math.abs($t),Wt+=Math.abs(Jt),Fe(ht,Zt,$t,Jt,$,K),Fe(st,lt,$t,Jt,J,Q);let tt=t.multiplyByScalar(ut,p.EPSILON5,$e);t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,M),t.pack(J,I,M+3),t.pack(Q,I,M+6),t.pack(K,I,M+9),tt=t.multiplyByScalar(ut,-2*p.EPSILON5,$e),t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,M+12),t.pack(J,I,M+15),t.pack(Q,I,M+18),t.pack(K,I,M+21),V+=2,s+=3,It+=16,M+=24,Tt+=32,pe+=ge,de+=Vt}s=0;let fe=0;for(l=0;l<h;l++){for(m=0;m<Je;m++)D[s+m]=rn[m]+fe;fe+=8,s+=Je}let qt=Kn;U.fromVertices(r,t.ZERO,3,qt[0]),U.fromVertices(n,t.ZERO,3,qt[1]);let me=U.fromBoundingSpheres(qt);me.radius+=Wt/(h*2);let Et={position:new zt({componentDatatype:Bt.DOUBLE,componentsPerAttribute:3,normalize:!1,values:I}),startHiAndForwardOffsetX:at(j),startLoAndForwardOffsetY:at(W),startNormalAndForwardOffsetZ:at(f),endNormalAndTextureCoordinateNormalizationX:at(X),rightNormalAndTextureCoordinateNormalizationY:at(v)};return c&&(Et.startHiLo2D=at(y),Et.offsetAndRight2D=at(H),Et.startEndNormals2D=at(C),Et.texcoordNormalization2D=new zt({componentDatatype:Bt.FLOAT,componentsPerAttribute:2,normalize:!1,values:k})),new Ce({attributes:Et,indices:D,boundingSphere:me})}function at(e){return new zt({componentDatatype:Bt.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}ct._projectNormal=Dt;var he=ct;function to(e,i){return Xt.initialize().then(function(){return g(i)&&(e=he.unpack(e,i)),he.createGeometry(e)})}var ti=to;export{ti as default}; +import{a as _e}from"./chunk-SB224QGV.js";import{a as Z}from"./chunk-ATPDRNKI.js";import{a as _t}from"./chunk-DQO6B4EQ.js";import{a as Oe}from"./chunk-W23CU777.js";import{a as Le}from"./chunk-RXTBM4OI.js";import{a as te}from"./chunk-FYOYUPXG.js";import{b as Qt}from"./chunk-TAMCUKAR.js";import{a as jt}from"./chunk-PDMQLSBL.js";import{c as Ce,d as zt}from"./chunk-X5IHHI6X.js";import{a as bt,d as G}from"./chunk-TMSETF7M.js";import{d as xe,e as Ne,f as Kt,h as U}from"./chunk-7Z5IIKOJ.js";import{a as Bt}from"./chunk-KZNJOCYU.js";import{a as t,b as u,c as Pt,d as z,e as vt}from"./chunk-POASMU2N.js";import{a as p}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as O}from"./chunk-IUA6FAOZ.js";import{a as St,b as et}from"./chunk-UH2WFNTA.js";import{e as g}from"./chunk-PEYJTJPE.js";function rt(e){e=O(e,O.EMPTY_OBJECT),this._ellipsoid=O(e.ellipsoid,z.default),this._rectangle=O(e.rectangle,U.MAX_VALUE),this._projection=new bt(this._ellipsoid),this._numberOfLevelZeroTilesX=O(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=O(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(rt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});rt.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};rt.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};rt.prototype.rectangleToNativeRectangle=function(e,i){et.defined("rectangle",e);let r=p.toDegrees(e.west),n=p.toDegrees(e.south),o=p.toDegrees(e.east),a=p.toDegrees(e.north);return g(i)?(i.west=r,i.south=n,i.east=o,i.north=a,i):new U(r,n,o,a)};rt.prototype.tileXYToNativeRectangle=function(e,i,r,n){let o=this.tileXYToRectangle(e,i,r,n);return o.west=p.toDegrees(o.west),o.south=p.toDegrees(o.south),o.east=p.toDegrees(o.east),o.north=p.toDegrees(o.north),o};rt.prototype.tileXYToRectangle=function(e,i,r,n){let o=this._rectangle,a=this.getNumberOfXTilesAtLevel(r),c=this.getNumberOfYTilesAtLevel(r),l=o.width/a,s=e*l+o.west,d=(e+1)*l+o.west,h=o.height/c,N=o.north-i*h,S=o.north-(i+1)*h;return g(n)||(n=new U(s,S,d,N)),n.west=s,n.south=S,n.east=d,n.north=N,n};rt.prototype.positionToTileXY=function(e,i,r){let n=this._rectangle;if(!U.contains(n,e))return;let o=this.getNumberOfXTilesAtLevel(i),a=this.getNumberOfYTilesAtLevel(i),c=n.width/o,l=n.height/a,s=e.longitude;n.east<n.west&&(s+=p.TWO_PI);let d=(s-n.west)/c|0;d>=o&&(d=o-1);let h=(n.north-e.latitude)/l|0;return h>=a&&(h=a-1),g(r)?(r.x=d,r.y=h,r):new Pt(d,h)};var De=rt;var Ie=new t,He=new t,ke=new u,ee=new t,hn=new t,ye=new G,pn=new De,Lt=[new u,new u,new u,new u],Ot=new Pt,w={};w.initialize=function(){let e=w._initPromise;return g(e)||(e=xe.fetchJson(Ne("Assets/approximateTerrainHeights.json")).then(function(i){w._terrainHeights=i}),w._initPromise=e),e};w.getMinimumMaximumHeights=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.default);let r=Ae(e),n=w._defaultMinTerrainHeight,o=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[0],o=c[1]),i.cartographicToCartesian(U.northeast(e,ke),Ie),i.cartographicToCartesian(U.southwest(e,ke),He),t.midpoint(He,Ie,ee);let l=i.scaleToGeodeticSurface(ee,hn);if(g(l)){let s=t.distance(ee,l);n=Math.min(n,-s)}else n=w._defaultMinTerrainHeight}return n=Math.max(w._defaultMinTerrainHeight,n),{minimumTerrainHeight:n,maximumTerrainHeight:o}};w.getBoundingSphere=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.default);let r=Ae(e),n=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[1])}let o=G.fromRectangle3D(e,i,0);return G.fromRectangle3D(e,i,n,ye),G.union(o,ye,o)};function Ae(e){u.fromRadians(e.east,e.north,0,Lt[0]),u.fromRadians(e.west,e.north,0,Lt[1]),u.fromRadians(e.east,e.south,0,Lt[2]),u.fromRadians(e.west,e.south,0,Lt[3]);let i=0,r=0,n=0,o=0,a=w._terrainHeightsMaxLevel,c;for(c=0;c<=a;++c){let l=!1;for(let s=0;s<4;++s){let d=Lt[s];if(pn.positionToTileXY(d,c,Ot),s===0)n=Ot.x,o=Ot.y;else if(n!==Ot.x||o!==Ot.y){l=!0;break}}if(l)break;i=n,r=o}if(c!==0)return{x:i,y:r,level:c>a?a:c-1}}w._terrainHeightsMaxLevel=6;w._defaultMaxTerrainHeight=9e3;w._defaultMinTerrainHeight=-1e5;w._terrainHeights=void 0;w._initPromise=void 0;Object.defineProperties(w,{initialized:{get:function(){return g(w._terrainHeights)}}});var Xt=w;var le=[bt,_e],dn=le.length,Ke=Math.cos(p.toRadians(30)),Me=Math.cos(p.toRadians(150)),Qe=0,tn=1e3;function ct(e){e=O(e,O.EMPTY_OBJECT);let i=e.positions;if(!g(i)||i.length<2)throw new St("At least two positions are required.");if(g(e.arcType)&&e.arcType!==Z.GEODESIC&&e.arcType!==Z.RHUMB)throw new St("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=O(e.width,1),this._positions=i,this.granularity=O(e.granularity,9999),this.loop=O(e.loop,!1),this.arcType=O(e.arcType,Z.GEODESIC),this._ellipsoid=z.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ct.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+z.packedLength+1+1}}});ct.setProjectionAndEllipsoid=function(e,i){let r=0;for(let n=0;n<dn;n++)if(i instanceof le[n]){r=n;break}e._projectionIndex=r,e._ellipsoid=i.ellipsoid};var fn=new t,Re=new t,Pe=new t;function se(e,i,r,n,o){let a=P(n,e,0,fn),c=P(n,e,r,Re),l=P(n,i,0,Pe),s=nt(c,a,Re),d=nt(l,a,Pe);return t.cross(d,s,o),t.normalize(o,o)}var mn=new u,gn=new t,un=new t,wn=new t;function ne(e,i,r,n,o,a,c,l,s,d,h){if(o===0)return;let N;a===Z.GEODESIC?N=new Oe(e,i,c):a===Z.RHUMB&&(N=new te(e,i,c));let S=N.surfaceDistance;if(S<o)return;let R=se(e,i,n,c,wn),D=Math.ceil(S/o),I=S/D,j=I,q=D-1,f=l.length;for(let X=0;X<q;X++){let v=N.interpolateUsingSurfaceDistance(j,mn),y=P(c,v,r,gn),H=P(c,v,n,un);t.pack(R,l,f),t.pack(y,s,f),t.pack(H,d,f),h.push(v.latitude),h.push(v.longitude),f+=3,j+=I}}var oe=new u;function P(e,i,r,n){return u.clone(i,oe),oe.height=r,u.toCartesian(oe,e,n)}ct.pack=function(e,i,r){et.typeOf.object("value",e),et.defined("array",i);let n=O(r,0),o=e._positions,a=o.length;i[n++]=a;for(let c=0;c<a;++c){let l=o[c];t.pack(l,i,n),n+=3}return i[n++]=e.granularity,i[n++]=e.loop?1:0,i[n++]=e.arcType,z.pack(e._ellipsoid,i,n),n+=z.packedLength,i[n++]=e._projectionIndex,i[n++]=e._scene3DOnly?1:0,i};ct.unpack=function(e,i,r){et.defined("array",e);let n=O(i,0),o=e[n++],a=new Array(o);for(let S=0;S<o;S++)a[S]=t.unpack(e,n),n+=3;let c=e[n++],l=e[n++]===1,s=e[n++],d=z.unpack(e,n);n+=z.packedLength;let h=e[n++],N=e[n++]===1;return g(r)||(r=new ct({positions:a})),r._positions=a,r.granularity=c,r.loop=l,r.arcType=s,r._ellipsoid=d,r._projectionIndex=h,r._scene3DOnly=N,r};function nt(e,i,r){return t.subtract(e,i,r),t.normalize(r,r),r}function be(e,i,r,n){return n=nt(e,i,n),n=t.cross(n,r,n),n=t.normalize(n,n),n=t.cross(r,n,n),n}var Sn=new t,Tn=new t,En=new t,en=new t,xn=0,Nn=-1;function ie(e,i,r,n,o){let a=nt(r,i,en),c=be(e,i,a,Sn),l=be(n,i,a,Tn);if(p.equalsEpsilon(t.dot(c,l),Nn,p.EPSILON5))return o=t.cross(a,c,o),o=t.normalize(o,o),o;o=t.add(l,c,o),o=t.normalize(o,o);let s=t.cross(a,o,En);return t.dot(l,s)<xn&&(o=t.negate(o,o)),o}var Gt=jt.fromPointNormal(t.ZERO,t.UNIT_Y),Cn=new t,_n=new t,Ln=new t,On=new t,Dn=new t,Yt=new t,Ft=new u,ve=new u,Be=new u;ct.createGeometry=function(e){let i=!e._scene3DOnly,r=e.loop,n=e._ellipsoid,o=e.granularity,a=e.arcType,c=new le[e._projectionIndex](n),l=Qe,s=tn,d,h,N=e._positions,S=N.length;S===2&&(r=!1);let R,D,I,j,q=new te(void 0,void 0,n),f,X,v,y=[N[0]];for(h=0;h<S-1;h++)R=N[h],D=N[h+1],f=Qt.lineSegmentPlane(R,D,Gt,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),q.setEndPoints(I,j),X=q.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))),y.push(D);r&&(R=N[S-1],D=N[0],f=Qt.lineSegmentPlane(R,D,Gt,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),q.setEndPoints(I,j),X=q.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))));let H=y.length,C=new Array(H);for(h=0;h<H;h++){let F=u.fromCartesian(y[h],n);F.height=0,C[h]=F}if(C=Le(C,u.equalsEpsilon),H=C.length,H<2)return;let k=[],b=[],B=[],E=[],x=Cn,L=_n,_=Ln,Y=On,A=Dn,m=C[0],V=C[1],It=C[H-1];for(x=P(n,It,l,x),Y=P(n,V,l,Y),L=P(n,m,l,L),_=P(n,m,s,_),r?A=ie(x,L,_,Y,A):A=se(m,V,s,n,A),t.pack(A,b,0),t.pack(L,B,0),t.pack(_,E,0),k.push(m.latitude),k.push(m.longitude),ne(m,V,l,s,o,a,n,b,B,E,k),h=1;h<H-1;++h){x=t.clone(L,x),L=t.clone(Y,L);let F=C[h];P(n,F,s,_),P(n,C[h+1],l,Y),ie(x,L,_,Y,A),d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(F.latitude),k.push(F.longitude),ne(C[h],C[h+1],l,s,o,a,n,b,B,E,k)}let M=C[H-1],Tt=C[H-2];if(L=P(n,M,l,L),_=P(n,M,s,_),r){let F=C[0];x=P(n,Tt,l,x),Y=P(n,F,l,Y),A=ie(x,L,_,Y,A)}else A=se(Tt,M,s,n,A);if(d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(M.latitude),k.push(M.longitude),r){for(ne(M,m,l,s,o,a,n,b,B,E,k),d=b.length,h=0;h<3;++h)b[d+h]=b[h],B[d+h]=B[h],E[d+h]=E[h];k.push(m.latitude),k.push(m.longitude)}return Qn(r,c,B,E,b,k,i)};var In=new t,Hn=new vt,kn=new Kt;function ze(e,i,r,n){let o=nt(r,i,In),a=t.dot(o,e);if(a>Ke||a<Me){let c=nt(n,r,en),l=a<Me?p.PI_OVER_TWO:-p.PI_OVER_TWO,s=Kt.fromAxisAngle(c,l,kn),d=vt.fromQuaternion(s,Hn);return vt.multiplyByVector(d,e,e),!0}return!1}var je=new u,yn=new t,Xe=new t;function Dt(e,i,r,n,o){let a=u.toCartesian(i,e._ellipsoid,yn),c=t.add(a,r,Xe),l=!1,s=e._ellipsoid,d=s.cartesianToCartographic(c,je);Math.abs(i.longitude-d.longitude)>p.PI_OVER_TWO&&(l=!0,c=t.subtract(a,r,Xe),d=s.cartesianToCartographic(c,je)),d.height=0;let h=e.project(d,o);return o=t.subtract(h,n,o),o.z=0,o=t.normalize(o,o),l&&t.negate(o,o),o}var An=new t,Ye=new t;function Fe(e,i,r,n,o,a){let c=t.subtract(i,e,An);t.normalize(c,c);let l=r-Qe,s=t.multiplyByScalar(c,l,Ye);t.add(e,s,o);let d=n-tn;s=t.multiplyByScalar(c,d,Ye),t.add(i,s,a)}var Mn=new t;function Ut(e,i){let r=jt.getPointDistance(Gt,e),n=jt.getPointDistance(Gt,i),o=Mn;p.equalsEpsilon(r,0,p.EPSILON2)?(o=nt(i,e,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(e,o,e)):p.equalsEpsilon(n,0,p.EPSILON2)&&(o=nt(e,i,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(i,o,i))}function Rn(e,i){let r=Math.abs(e.longitude),n=Math.abs(i.longitude);if(p.equalsEpsilon(r,p.PI,p.EPSILON11)){let o=p.sign(i.longitude);return e.longitude=o*(r-p.EPSILON11),1}else if(p.equalsEpsilon(n,p.PI,p.EPSILON11)){let o=p.sign(e.longitude);return i.longitude=o*(n-p.EPSILON11),2}return 0}var nn=new u,on=new u,Ue=new t,re=new t,Ge=new t,qe=new t,Pn=new t,We=new t,bn=[nn,on],vn=new U,Bn=new t,zn=new t,jn=new t,Xn=new t,Yn=new t,Fn=new t,ae=new t,ce=new t,Un=new t,Gn=new t,qn=new t,Ze=new t,Wn=new t,Zn=new t,Vn=new _t,$n=new _t,Ve=new t,Jn=new t,$e=new t,Kn=[new G,new G],rn=[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],Je=rn.length;function Qn(e,i,r,n,o,a,c){let l,s,d=i._ellipsoid,h=r.length/3-1,N=h*8,S=N*4,R=h*36,D=N>65535?new Uint32Array(R):new Uint16Array(R),I=new Float64Array(N*3),j=new Float32Array(S),q=new Float32Array(S),f=new Float32Array(S),X=new Float32Array(S),v=new Float32Array(S),y,H,C,k;c&&(y=new Float32Array(S),H=new Float32Array(S),C=new Float32Array(S),k=new Float32Array(N*2));let b=a.length/2,B=0,E=nn;E.height=0;let x=on;x.height=0;let L=Ue,_=re;if(c)for(s=0,l=1;l<b;l++)E.latitude=a[s],E.longitude=a[s+1],x.latitude=a[s+2],x.longitude=a[s+3],L=i.project(E,L),_=i.project(x,_),B+=t.distance(L,_),s+=2;let Y=n.length/3;_=t.unpack(n,0,_);let A=0;for(s=3,l=1;l<Y;l++)L=t.clone(_,L),_=t.unpack(n,s,_),A+=t.distance(L,_),s+=3;let m;s=3;let V=0,It=0,M=0,Tt=0,F=!1,st=t.unpack(r,0,qe),lt=t.unpack(n,0,re),W=t.unpack(o,0,We);if(e){let ht=t.unpack(r,r.length-6,Ge);ze(W,ht,st,lt)&&(W=t.negate(W,W))}let pe=0,de=0,qt=0;for(l=0;l<h;l++){let ht=t.clone(st,Ge),Zt=t.clone(lt,Ue),mt=t.clone(W,Pn);F&&(mt=t.negate(mt,mt)),st=t.unpack(r,s,qe),lt=t.unpack(n,s,re),W=t.unpack(o,s,We),F=ze(W,ht,st,lt),E.latitude=a[V],E.longitude=a[V+1],x.latitude=a[V+2],x.longitude=a[V+3];let pt,gt,ot,it;if(c){let T=Rn(E,x);pt=i.project(E,Yn),gt=i.project(x,Fn);let wt=nt(gt,pt,Ve);wt.y=Math.abs(wt.y),ot=ae,it=ce,T===0||t.dot(wt,t.UNIT_Y)>Ke?(ot=Dt(i,E,mt,pt,ae),it=Dt(i,x,W,gt,ce)):T===1?(it=Dt(i,x,W,gt,ce),ot.x=0,ot.y=p.sign(E.longitude-Math.abs(x.longitude)),ot.z=0):(ot=Dt(i,E,mt,pt,ae),it.x=0,it.y=p.sign(E.longitude-x.longitude),it.z=0)}let ge=t.distance(Zt,lt),ue=_t.fromCartesian(ht,Vn),Ht=t.subtract(st,ht,Un),an=t.normalize(Ht,Ze),xt=t.subtract(Zt,ht,Gn);xt=t.normalize(xt,xt);let ut=t.cross(an,xt,Ze);ut=t.normalize(ut,ut);let kt=t.cross(xt,mt,Wn);kt=t.normalize(kt,kt);let yt=t.subtract(lt,st,qn);yt=t.normalize(yt,yt);let At=t.cross(W,yt,Zn);At=t.normalize(At,At);let cn=ge/A,sn=pe/A,Vt=0,Nt,Mt,dt,we=0,Se=0;if(c){Vt=t.distance(pt,gt),Nt=_t.fromCartesian(pt,$n),Mt=t.subtract(gt,pt,Ve),dt=t.normalize(Mt,Jn);let T=dt.x;dt.x=dt.y,dt.y=-T,we=Vt/B,Se=de/B}for(m=0;m<8;m++){let T=Tt+m*4,wt=It+m*2,Ct=T+3,Ee=m<4?1:-1,Rt=m===2||m===3||m===6||m===7?1:-1;t.pack(ue.high,j,T),j[Ct]=Ht.x,t.pack(ue.low,q,T),q[Ct]=Ht.y,t.pack(kt,f,T),f[Ct]=Ht.z,t.pack(At,X,T),X[Ct]=cn*Ee,t.pack(ut,v,T);let ft=sn*Rt;ft===0&&Rt<0&&(ft=9),v[Ct]=ft,c&&(y[T]=Nt.high.x,y[T+1]=Nt.high.y,y[T+2]=Nt.low.x,y[T+3]=Nt.low.y,C[T]=-ot.y,C[T+1]=ot.x,C[T+2]=it.y,C[T+3]=-it.x,H[T]=Mt.x,H[T+1]=Mt.y,H[T+2]=dt.x,H[T+3]=dt.y,k[wt]=we*Ee,ft=Se*Rt,ft===0&&Rt<0&&(ft=9),k[wt+1]=ft)}let $=jn,J=Xn,K=Bn,Q=zn,ln=U.fromCartographicArray(bn,vn),Te=Xt.getMinimumMaximumHeights(ln,d),$t=Te.minimumTerrainHeight,Jt=Te.maximumTerrainHeight;qt+=Math.abs($t),qt+=Math.abs(Jt),Fe(ht,Zt,$t,Jt,$,K),Fe(st,lt,$t,Jt,J,Q);let tt=t.multiplyByScalar(ut,p.EPSILON5,$e);t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Ut($,J),Ut(K,Q),t.pack($,I,M),t.pack(J,I,M+3),t.pack(Q,I,M+6),t.pack(K,I,M+9),tt=t.multiplyByScalar(ut,-2*p.EPSILON5,$e),t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Ut($,J),Ut(K,Q),t.pack($,I,M+12),t.pack(J,I,M+15),t.pack(Q,I,M+18),t.pack(K,I,M+21),V+=2,s+=3,It+=16,M+=24,Tt+=32,pe+=ge,de+=Vt}s=0;let fe=0;for(l=0;l<h;l++){for(m=0;m<Je;m++)D[s+m]=rn[m]+fe;fe+=8,s+=Je}let Wt=Kn;G.fromVertices(r,t.ZERO,3,Wt[0]),G.fromVertices(n,t.ZERO,3,Wt[1]);let me=G.fromBoundingSpheres(Wt);me.radius+=qt/(h*2);let Et={position:new zt({componentDatatype:Bt.DOUBLE,componentsPerAttribute:3,normalize:!1,values:I}),startHiAndForwardOffsetX:at(j),startLoAndForwardOffsetY:at(q),startNormalAndForwardOffsetZ:at(f),endNormalAndTextureCoordinateNormalizationX:at(X),rightNormalAndTextureCoordinateNormalizationY:at(v)};return c&&(Et.startHiLo2D=at(y),Et.offsetAndRight2D=at(H),Et.startEndNormals2D=at(C),Et.texcoordNormalization2D=new zt({componentDatatype:Bt.FLOAT,componentsPerAttribute:2,normalize:!1,values:k})),new Ce({attributes:Et,indices:D,boundingSphere:me})}function at(e){return new zt({componentDatatype:Bt.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}ct._projectNormal=Dt;var he=ct;function to(e,i){return Xt.initialize().then(function(){return g(i)&&(e=he.unpack(e,i)),he.createGeometry(e)})}var ti=to;export{ti as default}; diff --git a/cesium/Workers/createPlaneGeometry.js b/cesium/Workers/createPlaneGeometry.js index 113e423..73da1af 100644 --- a/cesium/Workers/createPlaneGeometry.js +++ b/cesium/Workers/createPlaneGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as m}from"./chunk-DUVNED7U.js";import{a as b}from"./chunk-MPVEZNKB.js";import{b as v,c as x,d as p}from"./chunk-FATK2EQ2.js";import{d as A}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as c}from"./chunk-77ESX6BV.js";import{a as y}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as i}from"./chunk-42NIXFVW.js";import{b as u}from"./chunk-5YVCOCPP.js";import{e as f}from"./chunk-U73D6PDD.js";function s(r){r=i(r,i.EMPTY_OBJECT);let e=i(r.vertexFormat,m.DEFAULT);this._vertexFormat=e,this._workerName="createPlaneGeometry"}s.packedLength=m.packedLength;s.pack=function(r,e,o){return u.typeOf.object("value",r),u.defined("array",e),o=i(o,0),m.pack(r._vertexFormat,e,o),e};var d=new m,P={vertexFormat:d};s.unpack=function(r,e,o){u.defined("array",r),e=i(e,0);let a=m.unpack(r,e,d);return f(o)?(o._vertexFormat=m.clone(a,o._vertexFormat),o):new s(P)};var F=new y(-.5,-.5,0),l=new y(.5,.5,0);s.createGeometry=function(r){let e=r._vertexFormat,o=new b,a,n;if(e.position){if(n=new Float64Array(4*3),n[0]=F.x,n[1]=F.y,n[2]=0,n[3]=l.x,n[4]=F.y,n[5]=0,n[6]=l.x,n[7]=l.y,n[8]=0,n[9]=F.x,n[10]=l.y,n[11]=0,o.position=new p({componentDatatype:c.DOUBLE,componentsPerAttribute:3,values:n}),e.normal){let t=new Float32Array(12);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,o.normal=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.st){let t=new Float32Array(8);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,o.st=new p({componentDatatype:c.FLOAT,componentsPerAttribute:2,values:t})}if(e.tangent){let t=new Float32Array(12);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,o.tangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.bitangent){let t=new Float32Array(12);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,o.bitangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}a=new Uint16Array(2*3),a[0]=0,a[1]=1,a[2]=2,a[3]=0,a[4]=2,a[5]=3}return new x({attributes:o,indices:a,primitiveType:v.TRIANGLES,boundingSphere:new A(y.ZERO,Math.sqrt(2))})};var w=s;function h(r,e){return f(e)&&(r=w.unpack(r,e)),w.createGeometry(r)}var M=h;export{M as default}; +import{a as m}from"./chunk-HEEMUCG6.js";import{a as b}from"./chunk-T6BE4RZK.js";import{b as v,c as x,d as p}from"./chunk-X5IHHI6X.js";import{d as A}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as c}from"./chunk-KZNJOCYU.js";import{a as y}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as i}from"./chunk-IUA6FAOZ.js";import{b as u}from"./chunk-UH2WFNTA.js";import{e as f}from"./chunk-PEYJTJPE.js";function s(r){r=i(r,i.EMPTY_OBJECT);let e=i(r.vertexFormat,m.DEFAULT);this._vertexFormat=e,this._workerName="createPlaneGeometry"}s.packedLength=m.packedLength;s.pack=function(r,e,o){return u.typeOf.object("value",r),u.defined("array",e),o=i(o,0),m.pack(r._vertexFormat,e,o),e};var d=new m,P={vertexFormat:d};s.unpack=function(r,e,o){u.defined("array",r),e=i(e,0);let a=m.unpack(r,e,d);return f(o)?(o._vertexFormat=m.clone(a,o._vertexFormat),o):new s(P)};var F=new y(-.5,-.5,0),l=new y(.5,.5,0);s.createGeometry=function(r){let e=r._vertexFormat,o=new b,a,n;if(e.position){if(n=new Float64Array(4*3),n[0]=F.x,n[1]=F.y,n[2]=0,n[3]=l.x,n[4]=F.y,n[5]=0,n[6]=l.x,n[7]=l.y,n[8]=0,n[9]=F.x,n[10]=l.y,n[11]=0,o.position=new p({componentDatatype:c.DOUBLE,componentsPerAttribute:3,values:n}),e.normal){let t=new Float32Array(12);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,o.normal=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.st){let t=new Float32Array(8);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,o.st=new p({componentDatatype:c.FLOAT,componentsPerAttribute:2,values:t})}if(e.tangent){let t=new Float32Array(12);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,o.tangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.bitangent){let t=new Float32Array(12);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,o.bitangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}a=new Uint16Array(2*3),a[0]=0,a[1]=1,a[2]=2,a[3]=0,a[4]=2,a[5]=3}return new x({attributes:o,indices:a,primitiveType:v.TRIANGLES,boundingSphere:new A(y.ZERO,Math.sqrt(2))})};var w=s;function h(r,e){return f(e)&&(r=w.unpack(r,e)),w.createGeometry(r)}var M=h;export{M as default}; diff --git a/cesium/Workers/createPlaneOutlineGeometry.js b/cesium/Workers/createPlaneOutlineGeometry.js index fbfe18c..2ee50bf 100644 --- a/cesium/Workers/createPlaneOutlineGeometry.js +++ b/cesium/Workers/createPlaneOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as l}from"./chunk-MPVEZNKB.js";import{b as d,c as y,d as s}from"./chunk-FATK2EQ2.js";import{d as c}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as f}from"./chunk-77ESX6BV.js";import{a}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import{b as m}from"./chunk-5YVCOCPP.js";import{e as i}from"./chunk-U73D6PDD.js";function o(){this._workerName="createPlaneOutlineGeometry"}o.packedLength=0;o.pack=function(r,e){return m.defined("value",r),m.defined("array",e),e};o.unpack=function(r,e,t){return m.defined("array",r),i(t)?t:new o};var n=new a(-.5,-.5,0),p=new a(.5,.5,0);o.createGeometry=function(){let r=new l,e=new Uint16Array(4*2),t=new Float64Array(4*3);return t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=p.x,t[4]=n.y,t[5]=n.z,t[6]=p.x,t[7]=p.y,t[8]=n.z,t[9]=n.x,t[10]=p.y,t[11]=n.z,r.position=new s({componentDatatype:f.DOUBLE,componentsPerAttribute:3,values:t}),e[0]=0,e[1]=1,e[2]=1,e[3]=2,e[4]=2,e[5]=3,e[6]=3,e[7]=0,new y({attributes:r,indices:e,primitiveType:d.LINES,boundingSphere:new c(a.ZERO,Math.sqrt(2))})};var u=o;function w(r,e){return i(e)&&(r=u.unpack(r,e)),u.createGeometry(r)}var D=w;export{D as default}; +import{a as l}from"./chunk-T6BE4RZK.js";import{b as d,c as y,d as s}from"./chunk-X5IHHI6X.js";import{d as c}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as f}from"./chunk-KZNJOCYU.js";import{a}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import{b as m}from"./chunk-UH2WFNTA.js";import{e as i}from"./chunk-PEYJTJPE.js";function o(){this._workerName="createPlaneOutlineGeometry"}o.packedLength=0;o.pack=function(r,e){return m.defined("value",r),m.defined("array",e),e};o.unpack=function(r,e,t){return m.defined("array",r),i(t)?t:new o};var n=new a(-.5,-.5,0),p=new a(.5,.5,0);o.createGeometry=function(){let r=new l,e=new Uint16Array(4*2),t=new Float64Array(4*3);return t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=p.x,t[4]=n.y,t[5]=n.z,t[6]=p.x,t[7]=p.y,t[8]=n.z,t[9]=n.x,t[10]=p.y,t[11]=n.z,r.position=new s({componentDatatype:f.DOUBLE,componentsPerAttribute:3,values:t}),e[0]=0,e[1]=1,e[2]=1,e[3]=2,e[4]=2,e[5]=3,e[6]=3,e[7]=0,new y({attributes:r,indices:e,primitiveType:d.LINES,boundingSphere:new c(a.ZERO,Math.sqrt(2))})};var u=o;function w(r,e){return i(e)&&(r=u.unpack(r,e)),u.createGeometry(r)}var D=w;export{D as default}; diff --git a/cesium/Workers/createPolygonGeometry.js b/cesium/Workers/createPolygonGeometry.js index eeb167d..28a9e33 100644 --- a/cesium/Workers/createPolygonGeometry.js +++ b/cesium/Workers/createPolygonGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as dt}from"./chunk-JFTXHZ2O.js";import{a as F}from"./chunk-Q7FDDGQE.js";import{a as at}from"./chunk-EQCQ5LRI.js";import{a as st}from"./chunk-CRFMECNE.js";import{a as bt}from"./chunk-7JCIFY66.js";import"./chunk-ED2EM7ZX.js";import"./chunk-YZP3DYN3.js";import{a as ht}from"./chunk-WLRVP2UA.js";import{a as Q}from"./chunk-DUVNED7U.js";import{a as K}from"./chunk-TLL4Q2KI.js";import"./chunk-4IWHN7T4.js";import{a as gt,b as nt}from"./chunk-LKPDAB55.js";import"./chunk-CIEXTRKV.js";import"./chunk-OSVMDAN4.js";import{a as wt,b as yt}from"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as lt}from"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import{c as mt,d as tt}from"./chunk-FATK2EQ2.js";import{d as Tt}from"./chunk-3FEM743H.js";import{f as ct,h as _t}from"./chunk-CMXCDAKR.js";import{a as $}from"./chunk-77ESX6BV.js";import{a as c,b as ot,c as O,d as V,e as W}from"./chunk-LJCGAQ64.js";import{a as l}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as L}from"./chunk-42NIXFVW.js";import{a as ut,b as q}from"./chunk-5YVCOCPP.js";import{e as P}from"./chunk-U73D6PDD.js";function b(t,e){this.position=t,P(this.position)||(this.position=new O),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=b.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(b.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let t=O.magnitude(this.position),e=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(l.PI_OVER_TWO-2*Math.atan2(t,e))}},longitude:{get:function(){let t=l.PI_OVER_TWO+Math.atan2(this.y,this.x);return t>Math.PI&&(t-=l.TWO_PI),t}}});var it=new ot,Rt=new c;b.prototype.getLatitude=function(t){P(t)||(t=V.WGS84),it.latitude=this.conformalLatitude,it.longitude=this.longitude,it.height=0;let e=this.ellipsoid.cartographicToCartesian(it,Rt);return t.cartesianToCartographic(e,it),it.latitude};var It=new wt,Lt=new c,Ft=new c;b.fromCartesian=function(t,e){q.defined("cartesian",t);let o=l.signNotZero(t.z),n=b.NORTH_POLE_TANGENT_PLANE,s=b.SOUTH_POLE;o<0&&(n=b.SOUTH_POLE_TANGENT_PLANE,s=b.NORTH_POLE);let i=It;i.origin=n.ellipsoid.scaleToGeocentricSurface(t,i.origin),i.direction=c.subtract(i.origin,s,Lt),c.normalize(i.direction,i.direction);let r=yt.rayPlane(i,n.plane,Ft),f=c.subtract(r,s,r),d=c.dot(n.xAxis,f),p=o*c.dot(n.yAxis,f);return P(e)?(e.position=new O(d,p),e.tangentPlane=n,e):new b(new O(d,p),n)};b.fromCartesianArray=function(t,e){q.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let n=0;n<o;n++)e[n]=b.fromCartesian(t[n],e[n]);return e};b.clone=function(t,e){if(P(t))return P(e)?(e.position=t.position,e.tangentPlane=t.tangentPlane,e):new b(t.position,t.tangentPlane)};b.HALF_UNIT_SPHERE=Object.freeze(new V(.5,.5,.5));b.NORTH_POLE=Object.freeze(new c(0,0,.5));b.SOUTH_POLE=Object.freeze(new c(0,0,-.5));b.NORTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.NORTH_POLE,b.HALF_UNIT_SPHERE));b.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.SOUTH_POLE,b.HALF_UNIT_SPHERE));var D=b;var vt=new ot,Ot=new ot;function St(t,e,o,n){let i=n.cartesianToCartographic(t,vt).height,r=n.cartesianToCartographic(e,Ot);r.height=i,n.cartographicToCartesian(r,e);let f=n.cartesianToCartographic(o,Ot);f.height=i-100,n.cartographicToCartesian(f,o)}var Et=new dt,Vt=new c,Bt=new c,Mt=new c,jt=new c,kt=new c,zt=new c,ft=new c,Z=new c,rt=new c,Dt=new O,Wt=new O,Ut=new c,At=new ct,Gt=new W,Yt=new W;function pt(t){let e=t.vertexFormat,o=t.geometry,n=t.shadowVolume,s=o.attributes.position.values,i=P(o.attributes.st)?o.attributes.st.values:void 0,r=s.length,f=t.wall,d=t.top||f,p=t.bottom||f;if(e.st||e.normal||e.tangent||e.bitangent||n){let w=t.boundingRectangle,a=t.rotationAxis,H=t.projectTo2d,x=t.ellipsoid,j=t.stRotation,C=t.perPositionHeight,R=Dt;R.x=w.x,R.y=w.y;let B=e.st?new Float32Array(2*(r/3)):void 0,u;e.normal&&(C&&d&&!f?u=o.attributes.normal.values:u=new Float32Array(r));let E=e.tangent?new Float32Array(r):void 0,A=e.bitangent?new Float32Array(r):void 0,v=n?new Float32Array(r):void 0,T=0,y=0,_=Bt,h=Mt,g=jt,k=!0,Y=Gt,J=Yt;if(j!==0){let M=ct.fromAxisAngle(a,j,At);Y=W.fromQuaternion(M,Y),M=ct.fromAxisAngle(a,-j,At),J=W.fromQuaternion(M,J)}else Y=W.clone(W.IDENTITY,Y),J=W.clone(W.IDENTITY,J);let m=0,I=0;d&&p&&(m=r/2,I=r/3,r/=2);for(let M=0;M<r;M+=3){let z=c.fromArray(s,M,Ut);if(e.st&&!P(i)){let N=W.multiplyByVector(Y,z,Vt);N=x.scaleToGeodeticSurface(N,N);let S=H([N],Wt)[0];O.subtract(S,R,S);let X=l.clamp(S.x/w.width,0,1),et=l.clamp(S.y/w.height,0,1);p&&(B[T+I]=X,B[T+1+I]=et),d&&(B[T]=X,B[T+1]=et),T+=2}if(e.normal||e.tangent||e.bitangent||n){let N=y+1,S=y+2;if(f){if(M+3<r){let X=c.fromArray(s,M+3,kt);if(k){let et=c.fromArray(s,M+r,zt);C&&St(z,X,et,x),c.subtract(X,z,X),c.subtract(et,z,et),_=c.normalize(c.cross(et,X,_),_),k=!1}c.equalsEpsilon(X,z,l.EPSILON10)&&(k=!0)}(e.tangent||e.bitangent)&&(g=x.geodeticSurfaceNormal(z,g),e.tangent&&(h=c.normalize(c.cross(g,_,h),h)))}else _=x.geodeticSurfaceNormal(z,_),(e.tangent||e.bitangent)&&(C&&(ft=c.fromArray(u,y,ft),Z=c.cross(c.UNIT_Z,ft,Z),Z=c.normalize(W.multiplyByVector(J,Z,Z),Z),e.bitangent&&(rt=c.normalize(c.cross(ft,Z,rt),rt))),h=c.cross(c.UNIT_Z,_,h),h=c.normalize(W.multiplyByVector(J,h,h),h),e.bitangent&&(g=c.normalize(c.cross(_,h,g),g)));e.normal&&(t.wall?(u[y+m]=_.x,u[N+m]=_.y,u[S+m]=_.z):p&&(u[y+m]=-_.x,u[N+m]=-_.y,u[S+m]=-_.z),(d&&!C||f)&&(u[y]=_.x,u[N]=_.y,u[S]=_.z)),n&&(f&&(_=x.geodeticSurfaceNormal(z,_)),v[y+m]=-_.x,v[N+m]=-_.y,v[S+m]=-_.z),e.tangent&&(t.wall?(E[y+m]=h.x,E[N+m]=h.y,E[S+m]=h.z):p&&(E[y+m]=-h.x,E[N+m]=-h.y,E[S+m]=-h.z),d&&(C?(E[y]=Z.x,E[N]=Z.y,E[S]=Z.z):(E[y]=h.x,E[N]=h.y,E[S]=h.z))),e.bitangent&&(p&&(A[y+m]=g.x,A[N+m]=g.y,A[S+m]=g.z),d&&(C?(A[y]=rt.x,A[N]=rt.y,A[S]=rt.z):(A[y]=g.x,A[N]=g.y,A[S]=g.z))),y+=3}}e.st&&!P(i)&&(o.attributes.st=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:2,values:B})),e.normal&&(o.attributes.normal=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:u})),e.tangent&&(o.attributes.tangent=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:E})),e.bitangent&&(o.attributes.bitangent=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:A})),n&&(o.attributes.extrudeDirection=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:v}))}if(t.extrude&&P(t.offsetAttribute)){let w=s.length/3,a=new Uint8Array(w);if(t.offsetAttribute===ht.TOP)d&&p||f?a=a.fill(1,0,w/2):d&&(a=a.fill(1));else{let H=t.offsetAttribute===ht.NONE?0:1;a=a.fill(H)}o.attributes.applyOffset=new tt({componentDatatype:$.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return o}var Ht=[];function qt(t,e,o,n,s,i,r,f,d,p){let w={walls:[]},a;if(r||f){let u=F.createGeometryFromPositions(t,e,o,n,i,d,p),E=u.attributes.position.values,A=u.indices,v,T;if(r&&f){let y=E.concat(E);v=y.length/3,T=lt.createTypedArray(v,A.length*2),T.set(A);let _=A.length,h=v/2;for(a=0;a<_;a+=3){let g=T[a]+h,k=T[a+1]+h,Y=T[a+2]+h;T[a+_]=Y,T[a+1+_]=k,T[a+2+_]=g}if(u.attributes.position.values=y,i&&d.normal){let g=u.attributes.normal.values;u.attributes.normal.values=new Float32Array(y.length),u.attributes.normal.values.set(g)}if(d.st&&P(o)){let g=u.attributes.st.values;u.attributes.st.values=new Float32Array(v*2),u.attributes.st.values=g.concat(g)}u.indices=T}else if(f){for(v=E.length/3,T=lt.createTypedArray(v,A.length),a=0;a<A.length;a+=3)T[a]=A[a+2],T[a+1]=A[a+1],T[a+2]=A[a];u.indices=T}w.topAndBottom=new st({geometry:u})}let H=s.outerRing,x=K.fromPoints(H,t),j=x.projectPointsOntoPlane(H,Ht),C=nt.computeWindingOrder2D(j);C===gt.CLOCKWISE&&(H=H.slice().reverse());let R=F.computeWallGeometry(H,o,t,n,i,p);w.walls.push(new st({geometry:R}));let B=s.holes;for(a=0;a<B.length;a++){let u=B[a];j=x.projectPointsOntoPlane(u,Ht),C=nt.computeWindingOrder2D(j),C===gt.COUNTER_CLOCKWISE&&(u=u.slice().reverse()),R=F.computeWallGeometry(u,o,t,n,i,p),w.walls.push(new st({geometry:R}))}return w}function G(t){if(q.typeOf.object("options",t),q.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),P(t.perPositionHeight)&&t.perPositionHeight&&P(t.height))throw new ut("Cannot use both options.perPositionHeight and options.height");if(P(t.arcType)&&t.arcType!==at.GEODESIC&&t.arcType!==at.RHUMB)throw new ut("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let e=t.polygonHierarchy,o=L(t.vertexFormat,Q.DEFAULT),n=L(t.ellipsoid,V.WGS84),s=L(t.granularity,l.RADIANS_PER_DEGREE),i=L(t.stRotation,0),r=t.textureCoordinates,f=L(t.perPositionHeight,!1),d=f&&P(t.extrudedHeight),p=L(t.height,0),w=L(t.extrudedHeight,p);if(!d){let a=Math.max(p,w);w=Math.min(p,w),p=a}this._vertexFormat=Q.clone(o),this._ellipsoid=V.clone(n),this._granularity=s,this._stRotation=i,this._height=p,this._extrudedHeight=w,this._closeTop=L(t.closeTop,!0),this._closeBottom=L(t.closeBottom,!0),this._polygonHierarchy=e,this._perPositionHeight=f,this._perPositionHeightExtrude=d,this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=t.offsetAttribute,this._arcType=L(t.arcType,at.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=r,this.packedLength=F.computeHierarchyPackedLength(e,c)+V.packedLength+Q.packedLength+(r?F.computeHierarchyPackedLength(r,O):1)+12}G.fromPositions=function(t){t=L(t,L.EMPTY_OBJECT),q.defined("options.positions",t.positions);let e={polygonHierarchy:{positions:t.positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates};return new G(e)};G.pack=function(t,e,o){return q.typeOf.object("value",t),q.defined("array",e),o=L(o,0),o=F.packPolygonHierarchy(t._polygonHierarchy,e,o,c),V.pack(t._ellipsoid,e,o),o+=V.packedLength,Q.pack(t._vertexFormat,e,o),o+=Q.packedLength,e[o++]=t._height,e[o++]=t._extrudedHeight,e[o++]=t._granularity,e[o++]=t._stRotation,e[o++]=t._perPositionHeightExtrude?1:0,e[o++]=t._perPositionHeight?1:0,e[o++]=t._closeTop?1:0,e[o++]=t._closeBottom?1:0,e[o++]=t._shadowVolume?1:0,e[o++]=L(t._offsetAttribute,-1),e[o++]=t._arcType,P(t._textureCoordinates)?o=F.packPolygonHierarchy(t._textureCoordinates,e,o,O):e[o++]=-1,e[o++]=t.packedLength,e};var Qt=V.clone(V.UNIT_SPHERE),Zt=new Q,Kt={polygonHierarchy:{}};G.unpack=function(t,e,o){q.defined("array",t),e=L(e,0);let n=F.unpackPolygonHierarchy(t,e,c);e=n.startingIndex,delete n.startingIndex;let s=V.unpack(t,e,Qt);e+=V.packedLength;let i=Q.unpack(t,e,Zt);e+=Q.packedLength;let r=t[e++],f=t[e++],d=t[e++],p=t[e++],w=t[e++]===1,a=t[e++]===1,H=t[e++]===1,x=t[e++]===1,j=t[e++]===1,C=t[e++],R=t[e++],B=t[e]===-1?void 0:F.unpackPolygonHierarchy(t,e,O);P(B)?(e=B.startingIndex,delete B.startingIndex):e++;let u=t[e++];return P(o)||(o=new G(Kt)),o._polygonHierarchy=n,o._ellipsoid=V.clone(s,o._ellipsoid),o._vertexFormat=Q.clone(i,o._vertexFormat),o._height=r,o._extrudedHeight=f,o._granularity=d,o._stRotation=p,o._perPositionHeightExtrude=w,o._perPositionHeight=a,o._closeTop=H,o._closeBottom=x,o._shadowVolume=j,o._offsetAttribute=C===-1?void 0:C,o._arcType=R,o._textureCoordinates=B,o.packedLength=u,o};var Jt=new O,Xt=new O,$t=new D;function xt(t,e,o,n,s,i){let r=t.longitude,f=r>=0?r:r+l.TWO_PI;s.westOverIdl=Math.min(s.westOverIdl,f),s.eastOverIdl=Math.max(s.eastOverIdl,f),i.west=Math.min(i.west,r),i.east=Math.max(i.east,r);let d=t.getLatitude(o),p=d;if(i.south=Math.min(i.south,d),i.north=Math.max(i.north,d),n!==at.RHUMB){let H=O.subtract(e.position,t.position,Jt),x=O.dot(e.position,H)/O.dot(H,H);if(x>0&&x<1){let j=O.add(e.position,O.multiplyByScalar(H,-x,H),Xt),C=D.clone(e,$t);C.position=j;let R=C.getLatitude(o);i.south=Math.min(i.south,R),i.north=Math.max(i.north,R),Math.abs(d)>Math.abs(R)&&(p=R)}}let w=e.x*t.y-t.x*e.y,a=Math.sign(w);a!==0&&(a*=O.angleBetween(e.position,t.position)),p>=0&&(s.northAngle+=a),p<=0&&(s.southAngle+=a)}var Ct=new D,te=new D,U={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};G.computeRectangleFromPositions=function(t,e,o,n){if(q.defined("positions",t),P(n)||(n=new _t),t.length<3)return n;n.west=Number.POSITIVE_INFINITY,n.east=Number.NEGATIVE_INFINITY,n.south=Number.POSITIVE_INFINITY,n.north=Number.NEGATIVE_INFINITY,U.northAngle=0,U.southAngle=0,U.westOverIdl=Number.POSITIVE_INFINITY,U.eastOverIdl=Number.NEGATIVE_INFINITY;let s=t.length,i=D.fromCartesian(t[0],te);for(let r=1;r<s;r++){let f=D.fromCartesian(t[r],Ct);xt(f,i,e,o,U,n),i=D.clone(f,i)}return xt(D.fromCartesian(t[0],Ct),i,e,o,U,n),n.east-n.west>U.eastOverIdl-U.westOverIdl&&(n.west=U.westOverIdl,n.east=U.eastOverIdl,n.east>l.PI&&(n.east=n.east-l.TWO_PI),n.west>l.PI&&(n.west=n.west-l.TWO_PI)),l.equalsEpsilon(Math.abs(U.northAngle),l.TWO_PI,l.EPSILON10)&&(n.north=l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),l.equalsEpsilon(Math.abs(U.southAngle),l.TWO_PI,l.EPSILON10)&&(n.south=-l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),n};var ee=new D;function oe(t,e,o){return t.height>=l.PI||t.width>=l.PI?D.fromCartesian(e[0],ee).tangentPlane:K.fromPoints(e,o)}var Nt=new ot;function ne(t,e,o){return(n,s)=>{if(t.height>=l.PI||t.width>=l.PI){if(t.south<0&&t.north>0){P(s)||(s=[]);for(let r=0;r<n.length;++r){let f=o.cartesianToCartographic(n[r],Nt);s[r]=new O(f.longitude/l.PI,f.latitude/l.PI_OVER_TWO)}return s.length=n.length,s}return D.fromCartesianArray(n,s)}return K.fromPoints(e,o).projectPointsOntoPlane(n,s)}}function ie(t,e,o){if(t.height>=l.PI||t.width>=l.PI)return(s,i)=>{if(t.south<0&&t.north>0){let r=o.cartesianToCartographic(s,Nt);return P(i)||(i=new O),i.x=r.longitude/l.PI,i.y=r.latitude/l.PI_OVER_TWO,i}return D.fromCartesian(s,i)};let n=K.fromPoints(e,o);return(s,i)=>n.projectPointsOntoPlane(s,i)}function re(t,e,o,n){return(s,i)=>!n&&(t.height>=l.PI_OVER_TWO||t.width>=2*l.PI_OVER_THREE)?F.splitPolygonsOnEquator(s,e,o,i):s}function se(t,e,o,n){if(e.height>=l.PI||e.width>=l.PI)return dt.fromRectangle(e,void 0,Et);let s=t,i=K.fromPoints(s,o);return F.computeBoundingRectangle(i.plane.normal,i.projectPointOntoPlane.bind(i),s,n,Et)}G.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,n=t._granularity,s=t._stRotation,i=t._polygonHierarchy,r=t._perPositionHeight,f=t._closeTop,d=t._closeBottom,p=t._arcType,w=t._textureCoordinates,a=P(w),H=i.positions;if(H.length<3)return;let x=t.rectangle,j=F.polygonsFromHierarchy(i,a,ne(x,H,o),!r,o,re(x,o,p,r)),C=j.hierarchy,R=j.polygons,B=function(m){return m},u=a?F.polygonsFromHierarchy(w,!0,B,!1,o).polygons:void 0;if(C.length===0)return;let E=C[0].outerRing,A=se(E,x,o,s),v=[],T=t._height,y=t._extrudedHeight,_=t._perPositionHeightExtrude||!l.equalsEpsilon(T,y,0,l.EPSILON2),h={perPositionHeight:r,vertexFormat:e,geometry:void 0,rotationAxis:oe(x,E,o).plane.normal,projectTo2d:ie(x,E,o),boundingRectangle:A,ellipsoid:o,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:p},g;if(_)for(h.extrude=!0,h.top=f,h.bottom=d,h.shadowVolume=t._shadowVolume,h.offsetAttribute=t._offsetAttribute,g=0;g<R.length;g++){let m=qt(o,R[g],a?u[g]:void 0,n,C[g],r,f,d,e,p),I;f&&d?(I=m.topAndBottom,h.geometry=F.scaleToGeodeticHeightExtruded(I.geometry,T,y,o,r)):f?(I=m.topAndBottom,I.geometry.attributes.position.values=nt.scaleToGeodeticHeight(I.geometry.attributes.position.values,T,o,!r),h.geometry=I.geometry):d&&(I=m.topAndBottom,I.geometry.attributes.position.values=nt.scaleToGeodeticHeight(I.geometry.attributes.position.values,y,o,!0),h.geometry=I.geometry),(f||d)&&(h.wall=!1,I.geometry=pt(h),v.push(I));let M=m.walls;h.wall=!0;for(let z=0;z<M.length;z++){let N=M[z];h.geometry=F.scaleToGeodeticHeightExtruded(N.geometry,T,y,o,r),N.geometry=pt(h),v.push(N)}}else for(g=0;g<R.length;g++){let m=new st({geometry:F.createGeometryFromPositions(o,R[g],a?u[g]:void 0,n,r,e,p)});if(m.geometry.attributes.position.values=nt.scaleToGeodeticHeight(m.geometry.attributes.position.values,T,o,!r),h.geometry=m.geometry,m.geometry=pt(h),P(t._offsetAttribute)){let I=m.geometry.attributes.position.values.length,M=t._offsetAttribute===ht.NONE?0:1,z=new Uint8Array(I/3).fill(M);m.geometry.attributes.applyOffset=new tt({componentDatatype:$.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}v.push(m)}let k=bt.combineInstances(v)[0];k.attributes.position.values=new Float64Array(k.attributes.position.values),k.indices=lt.createTypedArray(k.attributes.position.values.length/3,k.indices);let Y=k.attributes,J=Tt.fromVertices(Y.position.values);return e.position||delete Y.position,new mt({attributes:Y,indices:k.indices,primitiveType:k.primitiveType,boundingSphere:J,offsetAttribute:t._offsetAttribute})};G.createShadowVolume=function(t,e,o){let n=t._granularity,s=t._ellipsoid,i=e(n,s),r=o(n,s);return new G({polygonHierarchy:t._polygonHierarchy,ellipsoid:s,stRotation:t._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:i,height:r,vertexFormat:Q.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})};function ae(t){let e=-t._stRotation;if(e===0)return[0,0,0,1,1,0];let o=t._ellipsoid,n=t._polygonHierarchy.positions,s=t.rectangle;return mt._textureCoordinateRotationPoints(n,e,o,s)}Object.defineProperties(G.prototype,{rectangle:{get:function(){if(!P(this._rectangle)){let t=this._polygonHierarchy.positions;this._rectangle=G.computeRectangleFromPositions(t,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return P(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=ae(this)),this._textureCoordinateRotationPoints}}});var Pt=G;function ce(t,e){return P(e)&&(t=Pt.unpack(t,e)),t._ellipsoid=V.clone(t._ellipsoid),Pt.createGeometry(t)}var Xe=ce;export{Xe as default}; +import{a as dt}from"./chunk-3JW36LZF.js";import{a as F}from"./chunk-HSWA4OEL.js";import{a as at}from"./chunk-ATPDRNKI.js";import{a as st}from"./chunk-EFZKO5RU.js";import{a as bt}from"./chunk-QB3MDM4J.js";import"./chunk-ABGXSJNX.js";import"./chunk-DQO6B4EQ.js";import{a as ht}from"./chunk-ILGBPNP6.js";import{a as Q}from"./chunk-HEEMUCG6.js";import{a as K}from"./chunk-KF5NF354.js";import"./chunk-4WRMLZA7.js";import{a as gt,b as nt}from"./chunk-O5IJ3OGP.js";import"./chunk-RXTBM4OI.js";import"./chunk-FYOYUPXG.js";import{a as wt,b as yt}from"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as lt}from"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import{c as mt,d as tt}from"./chunk-X5IHHI6X.js";import{d as Tt}from"./chunk-TMSETF7M.js";import{f as ct,h as _t}from"./chunk-7Z5IIKOJ.js";import{a as $}from"./chunk-KZNJOCYU.js";import{a as c,b as ot,c as O,d as V,e as U}from"./chunk-POASMU2N.js";import{a as l}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as L}from"./chunk-IUA6FAOZ.js";import{a as ut,b as q}from"./chunk-UH2WFNTA.js";import{e as P}from"./chunk-PEYJTJPE.js";function b(t,e){this.position=t,P(this.position)||(this.position=new O),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=b.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(b.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let t=O.magnitude(this.position),e=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(l.PI_OVER_TWO-2*Math.atan2(t,e))}},longitude:{get:function(){let t=l.PI_OVER_TWO+Math.atan2(this.y,this.x);return t>Math.PI&&(t-=l.TWO_PI),t}}});var it=new ot,Rt=new c;b.prototype.getLatitude=function(t){P(t)||(t=V.default),it.latitude=this.conformalLatitude,it.longitude=this.longitude,it.height=0;let e=this.ellipsoid.cartographicToCartesian(it,Rt);return t.cartesianToCartographic(e,it),it.latitude};var It=new wt,Lt=new c,Ft=new c;b.fromCartesian=function(t,e){q.defined("cartesian",t);let o=l.signNotZero(t.z),n=b.NORTH_POLE_TANGENT_PLANE,s=b.SOUTH_POLE;o<0&&(n=b.SOUTH_POLE_TANGENT_PLANE,s=b.NORTH_POLE);let i=It;i.origin=n.ellipsoid.scaleToGeocentricSurface(t,i.origin),i.direction=c.subtract(i.origin,s,Lt),c.normalize(i.direction,i.direction);let r=yt.rayPlane(i,n.plane,Ft),f=c.subtract(r,s,r),d=c.dot(n.xAxis,f),p=o*c.dot(n.yAxis,f);return P(e)?(e.position=new O(d,p),e.tangentPlane=n,e):new b(new O(d,p),n)};b.fromCartesianArray=function(t,e){q.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let n=0;n<o;n++)e[n]=b.fromCartesian(t[n],e[n]);return e};b.clone=function(t,e){if(P(t))return P(e)?(e.position=t.position,e.tangentPlane=t.tangentPlane,e):new b(t.position,t.tangentPlane)};b.HALF_UNIT_SPHERE=Object.freeze(new V(.5,.5,.5));b.NORTH_POLE=Object.freeze(new c(0,0,.5));b.SOUTH_POLE=Object.freeze(new c(0,0,-.5));b.NORTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.NORTH_POLE,b.HALF_UNIT_SPHERE));b.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.SOUTH_POLE,b.HALF_UNIT_SPHERE));var D=b;var vt=new ot,Ot=new ot;function St(t,e,o,n){let i=n.cartesianToCartographic(t,vt).height,r=n.cartesianToCartographic(e,Ot);r.height=i,n.cartographicToCartesian(r,e);let f=n.cartesianToCartographic(o,Ot);f.height=i-100,n.cartographicToCartesian(f,o)}var Et=new dt,Vt=new c,Bt=new c,Mt=new c,jt=new c,kt=new c,zt=new c,ft=new c,Z=new c,rt=new c,Dt=new O,Ut=new O,Wt=new c,At=new ct,Gt=new U,Yt=new U;function pt(t){let e=t.vertexFormat,o=t.geometry,n=t.shadowVolume,s=o.attributes.position.values,i=P(o.attributes.st)?o.attributes.st.values:void 0,r=s.length,f=t.wall,d=t.top||f,p=t.bottom||f;if(e.st||e.normal||e.tangent||e.bitangent||n){let w=t.boundingRectangle,a=t.rotationAxis,H=t.projectTo2d,x=t.ellipsoid,j=t.stRotation,C=t.perPositionHeight,R=Dt;R.x=w.x,R.y=w.y;let B=e.st?new Float32Array(2*(r/3)):void 0,u;e.normal&&(C&&d&&!f?u=o.attributes.normal.values:u=new Float32Array(r));let E=e.tangent?new Float32Array(r):void 0,A=e.bitangent?new Float32Array(r):void 0,v=n?new Float32Array(r):void 0,T=0,y=0,_=Bt,h=Mt,g=jt,k=!0,Y=Gt,J=Yt;if(j!==0){let M=ct.fromAxisAngle(a,j,At);Y=U.fromQuaternion(M,Y),M=ct.fromAxisAngle(a,-j,At),J=U.fromQuaternion(M,J)}else Y=U.clone(U.IDENTITY,Y),J=U.clone(U.IDENTITY,J);let m=0,I=0;d&&p&&(m=r/2,I=r/3,r/=2);for(let M=0;M<r;M+=3){let z=c.fromArray(s,M,Wt);if(e.st&&!P(i)){let N=U.multiplyByVector(Y,z,Vt);N=x.scaleToGeodeticSurface(N,N);let S=H([N],Ut)[0];O.subtract(S,R,S);let X=l.clamp(S.x/w.width,0,1),et=l.clamp(S.y/w.height,0,1);p&&(B[T+I]=X,B[T+1+I]=et),d&&(B[T]=X,B[T+1]=et),T+=2}if(e.normal||e.tangent||e.bitangent||n){let N=y+1,S=y+2;if(f){if(M+3<r){let X=c.fromArray(s,M+3,kt);if(k){let et=c.fromArray(s,M+r,zt);C&&St(z,X,et,x),c.subtract(X,z,X),c.subtract(et,z,et),_=c.normalize(c.cross(et,X,_),_),k=!1}c.equalsEpsilon(X,z,l.EPSILON10)&&(k=!0)}(e.tangent||e.bitangent)&&(g=x.geodeticSurfaceNormal(z,g),e.tangent&&(h=c.normalize(c.cross(g,_,h),h)))}else _=x.geodeticSurfaceNormal(z,_),(e.tangent||e.bitangent)&&(C&&(ft=c.fromArray(u,y,ft),Z=c.cross(c.UNIT_Z,ft,Z),Z=c.normalize(U.multiplyByVector(J,Z,Z),Z),e.bitangent&&(rt=c.normalize(c.cross(ft,Z,rt),rt))),h=c.cross(c.UNIT_Z,_,h),h=c.normalize(U.multiplyByVector(J,h,h),h),e.bitangent&&(g=c.normalize(c.cross(_,h,g),g)));e.normal&&(t.wall?(u[y+m]=_.x,u[N+m]=_.y,u[S+m]=_.z):p&&(u[y+m]=-_.x,u[N+m]=-_.y,u[S+m]=-_.z),(d&&!C||f)&&(u[y]=_.x,u[N]=_.y,u[S]=_.z)),n&&(f&&(_=x.geodeticSurfaceNormal(z,_)),v[y+m]=-_.x,v[N+m]=-_.y,v[S+m]=-_.z),e.tangent&&(t.wall?(E[y+m]=h.x,E[N+m]=h.y,E[S+m]=h.z):p&&(E[y+m]=-h.x,E[N+m]=-h.y,E[S+m]=-h.z),d&&(C?(E[y]=Z.x,E[N]=Z.y,E[S]=Z.z):(E[y]=h.x,E[N]=h.y,E[S]=h.z))),e.bitangent&&(p&&(A[y+m]=g.x,A[N+m]=g.y,A[S+m]=g.z),d&&(C?(A[y]=rt.x,A[N]=rt.y,A[S]=rt.z):(A[y]=g.x,A[N]=g.y,A[S]=g.z))),y+=3}}e.st&&!P(i)&&(o.attributes.st=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:2,values:B})),e.normal&&(o.attributes.normal=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:u})),e.tangent&&(o.attributes.tangent=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:E})),e.bitangent&&(o.attributes.bitangent=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:A})),n&&(o.attributes.extrudeDirection=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:v}))}if(t.extrude&&P(t.offsetAttribute)){let w=s.length/3,a=new Uint8Array(w);if(t.offsetAttribute===ht.TOP)d&&p||f?a=a.fill(1,0,w/2):d&&(a=a.fill(1));else{let H=t.offsetAttribute===ht.NONE?0:1;a=a.fill(H)}o.attributes.applyOffset=new tt({componentDatatype:$.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return o}var Ht=[];function qt(t,e,o,n,s,i,r,f,d,p){let w={walls:[]},a;if(r||f){let u=F.createGeometryFromPositions(t,e,o,n,i,d,p),E=u.attributes.position.values,A=u.indices,v,T;if(r&&f){let y=E.concat(E);v=y.length/3,T=lt.createTypedArray(v,A.length*2),T.set(A);let _=A.length,h=v/2;for(a=0;a<_;a+=3){let g=T[a]+h,k=T[a+1]+h,Y=T[a+2]+h;T[a+_]=Y,T[a+1+_]=k,T[a+2+_]=g}if(u.attributes.position.values=y,i&&d.normal){let g=u.attributes.normal.values;u.attributes.normal.values=new Float32Array(y.length),u.attributes.normal.values.set(g)}if(d.st&&P(o)){let g=u.attributes.st.values;u.attributes.st.values=new Float32Array(v*2),u.attributes.st.values=g.concat(g)}u.indices=T}else if(f){for(v=E.length/3,T=lt.createTypedArray(v,A.length),a=0;a<A.length;a+=3)T[a]=A[a+2],T[a+1]=A[a+1],T[a+2]=A[a];u.indices=T}w.topAndBottom=new st({geometry:u})}let H=s.outerRing,x=K.fromPoints(H,t),j=x.projectPointsOntoPlane(H,Ht),C=nt.computeWindingOrder2D(j);C===gt.CLOCKWISE&&(H=H.slice().reverse());let R=F.computeWallGeometry(H,o,t,n,i,p);w.walls.push(new st({geometry:R}));let B=s.holes;for(a=0;a<B.length;a++){let u=B[a];j=x.projectPointsOntoPlane(u,Ht),C=nt.computeWindingOrder2D(j),C===gt.COUNTER_CLOCKWISE&&(u=u.slice().reverse()),R=F.computeWallGeometry(u,o,t,n,i,p),w.walls.push(new st({geometry:R}))}return w}function G(t){if(q.typeOf.object("options",t),q.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),P(t.perPositionHeight)&&t.perPositionHeight&&P(t.height))throw new ut("Cannot use both options.perPositionHeight and options.height");if(P(t.arcType)&&t.arcType!==at.GEODESIC&&t.arcType!==at.RHUMB)throw new ut("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let e=t.polygonHierarchy,o=L(t.vertexFormat,Q.DEFAULT),n=L(t.ellipsoid,V.default),s=L(t.granularity,l.RADIANS_PER_DEGREE),i=L(t.stRotation,0),r=t.textureCoordinates,f=L(t.perPositionHeight,!1),d=f&&P(t.extrudedHeight),p=L(t.height,0),w=L(t.extrudedHeight,p);if(!d){let a=Math.max(p,w);w=Math.min(p,w),p=a}this._vertexFormat=Q.clone(o),this._ellipsoid=V.clone(n),this._granularity=s,this._stRotation=i,this._height=p,this._extrudedHeight=w,this._closeTop=L(t.closeTop,!0),this._closeBottom=L(t.closeBottom,!0),this._polygonHierarchy=e,this._perPositionHeight=f,this._perPositionHeightExtrude=d,this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=t.offsetAttribute,this._arcType=L(t.arcType,at.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=r,this.packedLength=F.computeHierarchyPackedLength(e,c)+V.packedLength+Q.packedLength+(r?F.computeHierarchyPackedLength(r,O):1)+12}G.fromPositions=function(t){t=L(t,L.EMPTY_OBJECT),q.defined("options.positions",t.positions);let e={polygonHierarchy:{positions:t.positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates};return new G(e)};G.pack=function(t,e,o){return q.typeOf.object("value",t),q.defined("array",e),o=L(o,0),o=F.packPolygonHierarchy(t._polygonHierarchy,e,o,c),V.pack(t._ellipsoid,e,o),o+=V.packedLength,Q.pack(t._vertexFormat,e,o),o+=Q.packedLength,e[o++]=t._height,e[o++]=t._extrudedHeight,e[o++]=t._granularity,e[o++]=t._stRotation,e[o++]=t._perPositionHeightExtrude?1:0,e[o++]=t._perPositionHeight?1:0,e[o++]=t._closeTop?1:0,e[o++]=t._closeBottom?1:0,e[o++]=t._shadowVolume?1:0,e[o++]=L(t._offsetAttribute,-1),e[o++]=t._arcType,P(t._textureCoordinates)?o=F.packPolygonHierarchy(t._textureCoordinates,e,o,O):e[o++]=-1,e[o++]=t.packedLength,e};var Qt=V.clone(V.UNIT_SPHERE),Zt=new Q,Kt={polygonHierarchy:{}};G.unpack=function(t,e,o){q.defined("array",t),e=L(e,0);let n=F.unpackPolygonHierarchy(t,e,c);e=n.startingIndex,delete n.startingIndex;let s=V.unpack(t,e,Qt);e+=V.packedLength;let i=Q.unpack(t,e,Zt);e+=Q.packedLength;let r=t[e++],f=t[e++],d=t[e++],p=t[e++],w=t[e++]===1,a=t[e++]===1,H=t[e++]===1,x=t[e++]===1,j=t[e++]===1,C=t[e++],R=t[e++],B=t[e]===-1?void 0:F.unpackPolygonHierarchy(t,e,O);P(B)?(e=B.startingIndex,delete B.startingIndex):e++;let u=t[e++];return P(o)||(o=new G(Kt)),o._polygonHierarchy=n,o._ellipsoid=V.clone(s,o._ellipsoid),o._vertexFormat=Q.clone(i,o._vertexFormat),o._height=r,o._extrudedHeight=f,o._granularity=d,o._stRotation=p,o._perPositionHeightExtrude=w,o._perPositionHeight=a,o._closeTop=H,o._closeBottom=x,o._shadowVolume=j,o._offsetAttribute=C===-1?void 0:C,o._arcType=R,o._textureCoordinates=B,o.packedLength=u,o};var Jt=new O,Xt=new O,$t=new D;function xt(t,e,o,n,s,i){let r=t.longitude,f=r>=0?r:r+l.TWO_PI;s.westOverIdl=Math.min(s.westOverIdl,f),s.eastOverIdl=Math.max(s.eastOverIdl,f),i.west=Math.min(i.west,r),i.east=Math.max(i.east,r);let d=t.getLatitude(o),p=d;if(i.south=Math.min(i.south,d),i.north=Math.max(i.north,d),n!==at.RHUMB){let H=O.subtract(e.position,t.position,Jt),x=O.dot(e.position,H)/O.dot(H,H);if(x>0&&x<1){let j=O.add(e.position,O.multiplyByScalar(H,-x,H),Xt),C=D.clone(e,$t);C.position=j;let R=C.getLatitude(o);i.south=Math.min(i.south,R),i.north=Math.max(i.north,R),Math.abs(d)>Math.abs(R)&&(p=R)}}let w=e.x*t.y-t.x*e.y,a=Math.sign(w);a!==0&&(a*=O.angleBetween(e.position,t.position)),p>=0&&(s.northAngle+=a),p<=0&&(s.southAngle+=a)}var Ct=new D,te=new D,W={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};G.computeRectangleFromPositions=function(t,e,o,n){if(q.defined("positions",t),P(n)||(n=new _t),t.length<3)return n;n.west=Number.POSITIVE_INFINITY,n.east=Number.NEGATIVE_INFINITY,n.south=Number.POSITIVE_INFINITY,n.north=Number.NEGATIVE_INFINITY,W.northAngle=0,W.southAngle=0,W.westOverIdl=Number.POSITIVE_INFINITY,W.eastOverIdl=Number.NEGATIVE_INFINITY;let s=t.length,i=D.fromCartesian(t[0],te);for(let r=1;r<s;r++){let f=D.fromCartesian(t[r],Ct);xt(f,i,e,o,W,n),i=D.clone(f,i)}return xt(D.fromCartesian(t[0],Ct),i,e,o,W,n),n.east-n.west>W.eastOverIdl-W.westOverIdl&&(n.west=W.westOverIdl,n.east=W.eastOverIdl,n.east>l.PI&&(n.east=n.east-l.TWO_PI),n.west>l.PI&&(n.west=n.west-l.TWO_PI)),l.equalsEpsilon(Math.abs(W.northAngle),l.TWO_PI,l.EPSILON10)&&(n.north=l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),l.equalsEpsilon(Math.abs(W.southAngle),l.TWO_PI,l.EPSILON10)&&(n.south=-l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),n};var ee=new D;function oe(t,e,o){return t.height>=l.PI||t.width>=l.PI?D.fromCartesian(e[0],ee).tangentPlane:K.fromPoints(e,o)}var Nt=new ot;function ne(t,e,o){return(n,s)=>{if(t.height>=l.PI||t.width>=l.PI){if(t.south<0&&t.north>0){P(s)||(s=[]);for(let r=0;r<n.length;++r){let f=o.cartesianToCartographic(n[r],Nt);s[r]=new O(f.longitude/l.PI,f.latitude/l.PI_OVER_TWO)}return s.length=n.length,s}return D.fromCartesianArray(n,s)}return K.fromPoints(e,o).projectPointsOntoPlane(n,s)}}function ie(t,e,o){if(t.height>=l.PI||t.width>=l.PI)return(s,i)=>{if(t.south<0&&t.north>0){let r=o.cartesianToCartographic(s,Nt);return P(i)||(i=new O),i.x=r.longitude/l.PI,i.y=r.latitude/l.PI_OVER_TWO,i}return D.fromCartesian(s,i)};let n=K.fromPoints(e,o);return(s,i)=>n.projectPointsOntoPlane(s,i)}function re(t,e,o,n){return(s,i)=>!n&&(t.height>=l.PI_OVER_TWO||t.width>=2*l.PI_OVER_THREE)?F.splitPolygonsOnEquator(s,e,o,i):s}function se(t,e,o,n){if(e.height>=l.PI||e.width>=l.PI)return dt.fromRectangle(e,void 0,Et);let s=t,i=K.fromPoints(s,o);return F.computeBoundingRectangle(i.plane.normal,i.projectPointOntoPlane.bind(i),s,n,Et)}G.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,n=t._granularity,s=t._stRotation,i=t._polygonHierarchy,r=t._perPositionHeight,f=t._closeTop,d=t._closeBottom,p=t._arcType,w=t._textureCoordinates,a=P(w),H=i.positions;if(H.length<3)return;let x=t.rectangle,j=F.polygonsFromHierarchy(i,a,ne(x,H,o),!r,o,re(x,o,p,r)),C=j.hierarchy,R=j.polygons,B=function(m){return m},u=a?F.polygonsFromHierarchy(w,!0,B,!1,o).polygons:void 0;if(C.length===0)return;let E=C[0].outerRing,A=se(E,x,o,s),v=[],T=t._height,y=t._extrudedHeight,_=t._perPositionHeightExtrude||!l.equalsEpsilon(T,y,0,l.EPSILON2),h={perPositionHeight:r,vertexFormat:e,geometry:void 0,rotationAxis:oe(x,E,o).plane.normal,projectTo2d:ie(x,E,o),boundingRectangle:A,ellipsoid:o,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:p},g;if(_)for(h.extrude=!0,h.top=f,h.bottom=d,h.shadowVolume=t._shadowVolume,h.offsetAttribute=t._offsetAttribute,g=0;g<R.length;g++){let m=qt(o,R[g],a?u[g]:void 0,n,C[g],r,f,d,e,p),I;f&&d?(I=m.topAndBottom,h.geometry=F.scaleToGeodeticHeightExtruded(I.geometry,T,y,o,r)):f?(I=m.topAndBottom,I.geometry.attributes.position.values=nt.scaleToGeodeticHeight(I.geometry.attributes.position.values,T,o,!r),h.geometry=I.geometry):d&&(I=m.topAndBottom,I.geometry.attributes.position.values=nt.scaleToGeodeticHeight(I.geometry.attributes.position.values,y,o,!0),h.geometry=I.geometry),(f||d)&&(h.wall=!1,I.geometry=pt(h),v.push(I));let M=m.walls;h.wall=!0;for(let z=0;z<M.length;z++){let N=M[z];h.geometry=F.scaleToGeodeticHeightExtruded(N.geometry,T,y,o,r),N.geometry=pt(h),v.push(N)}}else for(g=0;g<R.length;g++){let m=new st({geometry:F.createGeometryFromPositions(o,R[g],a?u[g]:void 0,n,r,e,p)});if(m.geometry.attributes.position.values=nt.scaleToGeodeticHeight(m.geometry.attributes.position.values,T,o,!r),h.geometry=m.geometry,m.geometry=pt(h),P(t._offsetAttribute)){let I=m.geometry.attributes.position.values.length,M=t._offsetAttribute===ht.NONE?0:1,z=new Uint8Array(I/3).fill(M);m.geometry.attributes.applyOffset=new tt({componentDatatype:$.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}v.push(m)}let k=bt.combineInstances(v)[0];k.attributes.position.values=new Float64Array(k.attributes.position.values),k.indices=lt.createTypedArray(k.attributes.position.values.length/3,k.indices);let Y=k.attributes,J=Tt.fromVertices(Y.position.values);return e.position||delete Y.position,new mt({attributes:Y,indices:k.indices,primitiveType:k.primitiveType,boundingSphere:J,offsetAttribute:t._offsetAttribute})};G.createShadowVolume=function(t,e,o){let n=t._granularity,s=t._ellipsoid,i=e(n,s),r=o(n,s);return new G({polygonHierarchy:t._polygonHierarchy,ellipsoid:s,stRotation:t._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:i,height:r,vertexFormat:Q.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})};function ae(t){let e=-t._stRotation;if(e===0)return[0,0,0,1,1,0];let o=t._ellipsoid,n=t._polygonHierarchy.positions,s=t.rectangle;return mt._textureCoordinateRotationPoints(n,e,o,s)}Object.defineProperties(G.prototype,{rectangle:{get:function(){if(!P(this._rectangle)){let t=this._polygonHierarchy.positions;this._rectangle=G.computeRectangleFromPositions(t,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return P(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=ae(this)),this._textureCoordinateRotationPoints}}});var Pt=G;function ce(t,e){return P(e)&&(t=Pt.unpack(t,e)),t._ellipsoid=V.clone(t._ellipsoid),Pt.createGeometry(t)}var Xe=ce;export{Xe as default}; diff --git a/cesium/Workers/createPolygonOutlineGeometry.js b/cesium/Workers/createPolygonOutlineGeometry.js index 31121d7..6d2eb72 100644 --- a/cesium/Workers/createPolygonOutlineGeometry.js +++ b/cesium/Workers/createPolygonOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a}from"./chunk-Q7FDDGQE.js";import{a as b}from"./chunk-EQCQ5LRI.js";import{a as W}from"./chunk-CRFMECNE.js";import{a as V}from"./chunk-7JCIFY66.js";import"./chunk-ED2EM7ZX.js";import"./chunk-YZP3DYN3.js";import{a as D}from"./chunk-WLRVP2UA.js";import{a as F}from"./chunk-TLL4Q2KI.js";import"./chunk-4IWHN7T4.js";import{a as j,b as k}from"./chunk-LKPDAB55.js";import"./chunk-CIEXTRKV.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as M}from"./chunk-RQXB4B4V.js";import{a as B}from"./chunk-MPVEZNKB.js";import{b as U,c as C,d as S}from"./chunk-FATK2EQ2.js";import{d as z}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as w}from"./chunk-77ESX6BV.js";import{a as v,d as y}from"./chunk-LJCGAQ64.js";import{a as T}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as P}from"./chunk-42NIXFVW.js";import{a as G,b as A}from"./chunk-5YVCOCPP.js";import{e as O}from"./chunk-U73D6PDD.js";var Y=[],R=[];function K(e,t,r,H,l){let p=F.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=0;if(H)for(n=new Float64Array(o*2*3),i=0;i<o;i++){let u=t[i],h=t[(i+1)%o];n[c++]=u.x,n[c++]=u.y,n[c++]=u.z,n[c++]=h.x,n[c++]=h.y,n[c++]=h.z}else{let u=0;if(l===b.GEODESIC)for(i=0;i<o;i++)u+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)u+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(u*3),i=0;i<o;i++){let h;l===b.GEODESIC?h=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(h=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let g=h.length;for(let d=0;d<g;++d)n[c++]=h[d]}}o=n.length/3;let f=o*2,m=M.createTypedArray(o,f);for(c=0,i=0;i<o-1;i++)m[c++]=i,m[c++]=i+1;return m[c++]=o-1,m[c++]=0,new W({geometry:new C({attributes:new B({position:new S({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:m,primitiveType:U.LINES})})}function q(e,t,r,H,l){let p=F.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=new Array(o),f=0;if(H)for(n=new Float64Array(o*2*3*2),i=0;i<o;++i){c[i]=f/3;let g=t[i],d=t[(i+1)%o];n[f++]=g.x,n[f++]=g.y,n[f++]=g.z,n[f++]=d.x,n[f++]=d.y,n[f++]=d.z}else{let g=0;if(l===b.GEODESIC)for(i=0;i<o;i++)g+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)g+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(g*3*2),i=0;i<o;++i){c[i]=f/3;let d;l===b.GEODESIC?d=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(d=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let E=d.length;for(let N=0;N<E;++N)n[f++]=d[N]}}o=n.length/(3*2);let m=c.length,u=(o*2+m)*2,h=M.createTypedArray(o+m,u);for(f=0,i=0;i<o;++i)h[f++]=i,h[f++]=(i+1)%o,h[f++]=i+o,h[f++]=(i+1)%o+o;for(i=0;i<m;i++){let g=c[i];h[f++]=g,h[f++]=g+o}return new W({geometry:new C({attributes:new B({position:new S({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:h,primitiveType:U.LINES})})}function L(e){if(A.typeOf.object("options",e),A.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&O(e.height))throw new G("Cannot use both options.perPositionHeight and options.height");if(O(e.arcType)&&e.arcType!==b.GEODESIC&&e.arcType!==b.RHUMB)throw new G("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,r=P(e.ellipsoid,y.WGS84),H=P(e.granularity,T.RADIANS_PER_DEGREE),l=P(e.perPositionHeight,!1),_=l&&O(e.extrudedHeight),p=P(e.arcType,b.GEODESIC),s=P(e.height,0),n=P(e.extrudedHeight,s);if(!_){let i=Math.max(s,n);n=Math.min(s,n),s=i}this._ellipsoid=y.clone(r),this._granularity=H,this._height=s,this._extrudedHeight=n,this._arcType=p,this._polygonHierarchy=t,this._perPositionHeight=l,this._perPositionHeightExtrude=_,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=a.computeHierarchyPackedLength(t,v)+y.packedLength+8}L.pack=function(e,t,r){return A.typeOf.object("value",e),A.defined("array",t),r=P(r,0),r=a.packPolygonHierarchy(e._polygonHierarchy,t,r,v),y.pack(e._ellipsoid,t,r),r+=y.packedLength,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._granularity,t[r++]=e._perPositionHeightExtrude?1:0,t[r++]=e._perPositionHeight?1:0,t[r++]=e._arcType,t[r++]=P(e._offsetAttribute,-1),t[r]=e.packedLength,t};var J=y.clone(y.UNIT_SPHERE),Q={polygonHierarchy:{}};L.unpack=function(e,t,r){A.defined("array",e),t=P(t,0);let H=a.unpackPolygonHierarchy(e,t,v);t=H.startingIndex,delete H.startingIndex;let l=y.unpack(e,t,J);t+=y.packedLength;let _=e[t++],p=e[t++],s=e[t++],n=e[t++]===1,i=e[t++]===1,o=e[t++],c=e[t++],f=e[t];return O(r)||(r=new L(Q)),r._polygonHierarchy=H,r._ellipsoid=y.clone(l,r._ellipsoid),r._height=_,r._extrudedHeight=p,r._granularity=s,r._perPositionHeight=i,r._perPositionHeightExtrude=n,r._arcType=o,r._offsetAttribute=c===-1?void 0:c,r.packedLength=f,r};L.fromPositions=function(e){e=P(e,P.EMPTY_OBJECT),A.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute};return new L(t)};L.createGeometry=function(e){let t=e._ellipsoid,r=e._granularity,H=e._polygonHierarchy,l=e._perPositionHeight,_=e._arcType,p=a.polygonOutlinesFromHierarchy(H,!l,t);if(p.length===0)return;let s,n=[],i=T.chordLength(r,t.maximumRadius),o=e._height,c=e._extrudedHeight,f=e._perPositionHeightExtrude||!T.equalsEpsilon(o,c,0,T.EPSILON2),m,u;if(f)for(u=0;u<p.length;u++){if(s=q(t,p[u],i,l,_),s.geometry=a.scaleToGeodeticHeightExtruded(s.geometry,o,c,t,l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length/3,E=new Uint8Array(d);e._offsetAttribute===D.TOP?E=E.fill(1,0,d/2):(m=e._offsetAttribute===D.NONE?0:1,E=E.fill(m)),s.geometry.attributes.applyOffset=new S({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}else for(u=0;u<p.length;u++){if(s=K(t,p[u],i,l,_),s.geometry.attributes.position.values=k.scaleToGeodeticHeight(s.geometry.attributes.position.values,o,t,!l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length;m=e._offsetAttribute===D.NONE?0:1;let E=new Uint8Array(d/3).fill(m);s.geometry.attributes.applyOffset=new S({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}let h=V.combineInstances(n)[0],g=z.fromVertices(h.attributes.position.values);return new C({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:g,offsetAttribute:e._offsetAttribute})};var x=L;function X(e,t){return O(t)&&(e=x.unpack(e,t)),e._ellipsoid=y.clone(e._ellipsoid),x.createGeometry(e)}var Oe=X;export{Oe as default}; +import{a}from"./chunk-HSWA4OEL.js";import{a as b}from"./chunk-ATPDRNKI.js";import{a as F}from"./chunk-EFZKO5RU.js";import{a as V}from"./chunk-QB3MDM4J.js";import"./chunk-ABGXSJNX.js";import"./chunk-DQO6B4EQ.js";import{a as D}from"./chunk-ILGBPNP6.js";import{a as W}from"./chunk-KF5NF354.js";import"./chunk-4WRMLZA7.js";import{a as j,b as k}from"./chunk-O5IJ3OGP.js";import"./chunk-RXTBM4OI.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as M}from"./chunk-P37AI2DW.js";import{a as G}from"./chunk-T6BE4RZK.js";import{b as B,c as C,d as v}from"./chunk-X5IHHI6X.js";import{d as z}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as w}from"./chunk-KZNJOCYU.js";import{a as S,d as y}from"./chunk-POASMU2N.js";import{a as T}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as P}from"./chunk-IUA6FAOZ.js";import{a as U,b as A}from"./chunk-UH2WFNTA.js";import{e as O}from"./chunk-PEYJTJPE.js";var Y=[],R=[];function K(e,t,r,H,l){let p=W.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=0;if(H)for(n=new Float64Array(o*2*3),i=0;i<o;i++){let u=t[i],h=t[(i+1)%o];n[c++]=u.x,n[c++]=u.y,n[c++]=u.z,n[c++]=h.x,n[c++]=h.y,n[c++]=h.z}else{let u=0;if(l===b.GEODESIC)for(i=0;i<o;i++)u+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)u+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(u*3),i=0;i<o;i++){let h;l===b.GEODESIC?h=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(h=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let g=h.length;for(let d=0;d<g;++d)n[c++]=h[d]}}o=n.length/3;let f=o*2,m=M.createTypedArray(o,f);for(c=0,i=0;i<o-1;i++)m[c++]=i,m[c++]=i+1;return m[c++]=o-1,m[c++]=0,new F({geometry:new C({attributes:new G({position:new v({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:m,primitiveType:B.LINES})})}function q(e,t,r,H,l){let p=W.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=new Array(o),f=0;if(H)for(n=new Float64Array(o*2*3*2),i=0;i<o;++i){c[i]=f/3;let g=t[i],d=t[(i+1)%o];n[f++]=g.x,n[f++]=g.y,n[f++]=g.z,n[f++]=d.x,n[f++]=d.y,n[f++]=d.z}else{let g=0;if(l===b.GEODESIC)for(i=0;i<o;i++)g+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)g+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(g*3*2),i=0;i<o;++i){c[i]=f/3;let d;l===b.GEODESIC?d=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(d=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let E=d.length;for(let N=0;N<E;++N)n[f++]=d[N]}}o=n.length/(3*2);let m=c.length,u=(o*2+m)*2,h=M.createTypedArray(o+m,u);for(f=0,i=0;i<o;++i)h[f++]=i,h[f++]=(i+1)%o,h[f++]=i+o,h[f++]=(i+1)%o+o;for(i=0;i<m;i++){let g=c[i];h[f++]=g,h[f++]=g+o}return new F({geometry:new C({attributes:new G({position:new v({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:h,primitiveType:B.LINES})})}function L(e){if(A.typeOf.object("options",e),A.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&O(e.height))throw new U("Cannot use both options.perPositionHeight and options.height");if(O(e.arcType)&&e.arcType!==b.GEODESIC&&e.arcType!==b.RHUMB)throw new U("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,r=P(e.ellipsoid,y.default),H=P(e.granularity,T.RADIANS_PER_DEGREE),l=P(e.perPositionHeight,!1),_=l&&O(e.extrudedHeight),p=P(e.arcType,b.GEODESIC),s=P(e.height,0),n=P(e.extrudedHeight,s);if(!_){let i=Math.max(s,n);n=Math.min(s,n),s=i}this._ellipsoid=y.clone(r),this._granularity=H,this._height=s,this._extrudedHeight=n,this._arcType=p,this._polygonHierarchy=t,this._perPositionHeight=l,this._perPositionHeightExtrude=_,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=a.computeHierarchyPackedLength(t,S)+y.packedLength+8}L.pack=function(e,t,r){return A.typeOf.object("value",e),A.defined("array",t),r=P(r,0),r=a.packPolygonHierarchy(e._polygonHierarchy,t,r,S),y.pack(e._ellipsoid,t,r),r+=y.packedLength,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._granularity,t[r++]=e._perPositionHeightExtrude?1:0,t[r++]=e._perPositionHeight?1:0,t[r++]=e._arcType,t[r++]=P(e._offsetAttribute,-1),t[r]=e.packedLength,t};var J=y.clone(y.UNIT_SPHERE),Q={polygonHierarchy:{}};L.unpack=function(e,t,r){A.defined("array",e),t=P(t,0);let H=a.unpackPolygonHierarchy(e,t,S);t=H.startingIndex,delete H.startingIndex;let l=y.unpack(e,t,J);t+=y.packedLength;let _=e[t++],p=e[t++],s=e[t++],n=e[t++]===1,i=e[t++]===1,o=e[t++],c=e[t++],f=e[t];return O(r)||(r=new L(Q)),r._polygonHierarchy=H,r._ellipsoid=y.clone(l,r._ellipsoid),r._height=_,r._extrudedHeight=p,r._granularity=s,r._perPositionHeight=i,r._perPositionHeightExtrude=n,r._arcType=o,r._offsetAttribute=c===-1?void 0:c,r.packedLength=f,r};L.fromPositions=function(e){e=P(e,P.EMPTY_OBJECT),A.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute};return new L(t)};L.createGeometry=function(e){let t=e._ellipsoid,r=e._granularity,H=e._polygonHierarchy,l=e._perPositionHeight,_=e._arcType,p=a.polygonOutlinesFromHierarchy(H,!l,t);if(p.length===0)return;let s,n=[],i=T.chordLength(r,t.maximumRadius),o=e._height,c=e._extrudedHeight,f=e._perPositionHeightExtrude||!T.equalsEpsilon(o,c,0,T.EPSILON2),m,u;if(f)for(u=0;u<p.length;u++){if(s=q(t,p[u],i,l,_),s.geometry=a.scaleToGeodeticHeightExtruded(s.geometry,o,c,t,l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length/3,E=new Uint8Array(d);e._offsetAttribute===D.TOP?E=E.fill(1,0,d/2):(m=e._offsetAttribute===D.NONE?0:1,E=E.fill(m)),s.geometry.attributes.applyOffset=new v({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}else for(u=0;u<p.length;u++){if(s=K(t,p[u],i,l,_),s.geometry.attributes.position.values=k.scaleToGeodeticHeight(s.geometry.attributes.position.values,o,t,!l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length;m=e._offsetAttribute===D.NONE?0:1;let E=new Uint8Array(d/3).fill(m);s.geometry.attributes.applyOffset=new v({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}let h=V.combineInstances(n)[0],g=z.fromVertices(h.attributes.position.values);return new C({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:g,offsetAttribute:e._offsetAttribute})};var x=L;function X(e,t){return O(t)&&(e=x.unpack(e,t)),e._ellipsoid=y.clone(e._ellipsoid),x.createGeometry(e)}var Oe=X;export{Oe as default}; diff --git a/cesium/Workers/createPolylineGeometry.js b/cesium/Workers/createPolylineGeometry.js index 08e24b2..12c9349 100644 --- a/cesium/Workers/createPolylineGeometry.js +++ b/cesium/Workers/createPolylineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as m}from"./chunk-L5JEMK3W.js";import{a as N}from"./chunk-EQCQ5LRI.js";import{a as U}from"./chunk-WIE5YNSS.js";import"./chunk-65DFAZKW.js";import{a as k}from"./chunk-DUVNED7U.js";import{a as le}from"./chunk-CIEXTRKV.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as se}from"./chunk-RQXB4B4V.js";import{a as ce}from"./chunk-MPVEZNKB.js";import{a as ne,b as re,c as ie,d as O}from"./chunk-FATK2EQ2.js";import{d as oe}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as x}from"./chunk-77ESX6BV.js";import{a as p,d as u}from"./chunk-LJCGAQ64.js";import{a as J}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as A}from"./chunk-42NIXFVW.js";import{a as V}from"./chunk-5YVCOCPP.js";import{e as h}from"./chunk-U73D6PDD.js";var me=[];function Ae(e,o,t,n,c){let s=me;s.length=c;let l,E=t.red,a=t.green,r=t.blue,w=t.alpha,b=n.red,i=n.green,f=n.blue,L=n.alpha;if(m.equals(t,n)){for(l=0;l<c;l++)s[l]=m.clone(t);return s}let M=(b-E)/c,W=(i-a)/c,z=(f-r)/c,B=(L-w)/c;for(l=0;l<c;l++)s[l]=new m(E+l*M,a+l*W,r+l*z,w+l*B);return s}function q(e){e=A(e,A.EMPTY_OBJECT);let o=e.positions,t=e.colors,n=A(e.width,1),c=A(e.colorsPerVertex,!1);if(!h(o)||o.length<2)throw new V("At least two positions are required.");if(typeof n!="number")throw new V("width must be a number");if(h(t)&&(c&&t.length<o.length||!c&&t.length<o.length-1))throw new V("colors has an invalid length.");this._positions=o,this._colors=t,this._width=n,this._colorsPerVertex=c,this._vertexFormat=k.clone(A(e.vertexFormat,k.DEFAULT)),this._arcType=A(e.arcType,N.GEODESIC),this._granularity=A(e.granularity,J.RADIANS_PER_DEGREE),this._ellipsoid=u.clone(A(e.ellipsoid,u.WGS84)),this._workerName="createPolylineGeometry";let s=1+o.length*p.packedLength;s+=h(t)?1+t.length*m.packedLength:1,this.packedLength=s+u.packedLength+k.packedLength+4}q.pack=function(e,o,t){if(!h(e))throw new V("value is required");if(!h(o))throw new V("array is required");t=A(t,0);let n,c=e._positions,s=c.length;for(o[t++]=s,n=0;n<s;++n,t+=p.packedLength)p.pack(c[n],o,t);let l=e._colors;for(s=h(l)?l.length:0,o[t++]=s,n=0;n<s;++n,t+=m.packedLength)m.pack(l[n],o,t);return u.pack(e._ellipsoid,o,t),t+=u.packedLength,k.pack(e._vertexFormat,o,t),t+=k.packedLength,o[t++]=e._width,o[t++]=e._colorsPerVertex?1:0,o[t++]=e._arcType,o[t]=e._granularity,o};var de=u.clone(u.UNIT_SPHERE),ue=new k,S={positions:void 0,colors:void 0,ellipsoid:de,vertexFormat:ue,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};q.unpack=function(e,o,t){if(!h(e))throw new V("array is required");o=A(o,0);let n,c=e[o++],s=new Array(c);for(n=0;n<c;++n,o+=p.packedLength)s[n]=p.unpack(e,o);c=e[o++];let l=c>0?new Array(c):void 0;for(n=0;n<c;++n,o+=m.packedLength)l[n]=m.unpack(e,o);let E=u.unpack(e,o,de);o+=u.packedLength;let a=k.unpack(e,o,ue);o+=k.packedLength;let r=e[o++],w=e[o++]===1,b=e[o++],i=e[o];return h(t)?(t._positions=s,t._colors=l,t._ellipsoid=u.clone(E,t._ellipsoid),t._vertexFormat=k.clone(a,t._vertexFormat),t._width=r,t._colorsPerVertex=w,t._arcType=b,t._granularity=i,t):(S.positions=s,S.colors=l,S.width=r,S.colorsPerVertex=w,S.arcType=b,S.granularity=i,new q(S))};var pe=new p,ae=new p,fe=new p,he=new p;q.createGeometry=function(e){let o=e._width,t=e._vertexFormat,n=e._colors,c=e._colorsPerVertex,s=e._arcType,l=e._granularity,E=e._ellipsoid,a,r,w,b=[],i=le(e._positions,p.equalsEpsilon,!1,b);if(h(n)&&b.length>0){let d=0,P=b[0];n=n.filter(function(G,T){let g=!1;return c?g=T===P||T===0&&P===1:g=T+1===P,g?(d++,P=b[d],!1):!0})}let f=i.length;if(f<2||o<=0)return;if(s===N.GEODESIC||s===N.RHUMB){let d,P;s===N.GEODESIC?(d=J.chordLength(l,E.maximumRadius),P=U.numberOfPoints):(d=l,P=U.numberOfPointsRhumbLine);let G=U.extractHeights(i,E);if(h(n)){let T=1;for(a=0;a<f-1;++a)T+=P(i[a],i[a+1],d);let g=new Array(T),D=0;for(a=0;a<f-1;++a){let Z=i[a],$=i[a+1],I=n[a],ee=P(Z,$,d);if(c&&a<T){let _e=n[a+1],te=Ae(Z,$,I,_e,ee),Pe=te.length;for(r=0;r<Pe;++r)g[D++]=te[r]}else for(r=0;r<ee;++r)g[D++]=m.clone(I)}g[D]=m.clone(n[n.length-1]),n=g,me.length=0}s===N.GEODESIC?i=U.generateCartesianArc({positions:i,minDistance:d,ellipsoid:E,height:G}):i=U.generateCartesianRhumbArc({positions:i,granularity:d,ellipsoid:E,height:G})}f=i.length;let L=f*4-4,M=new Float64Array(L*3),W=new Float64Array(L*3),z=new Float64Array(L*3),B=new Float32Array(L*2),K=t.st?new Float32Array(L*2):void 0,y=h(n)?new Uint8Array(L*4):void 0,H=0,j=0,X=0,Y=0,_;for(r=0;r<f;++r){r===0?(_=pe,p.subtract(i[0],i[1],_),p.add(i[0],_,_)):_=i[r-1],p.clone(_,fe),p.clone(i[r],ae),r===f-1?(_=pe,p.subtract(i[f-1],i[f-2],_),p.add(i[f-1],_,_)):_=i[r+1],p.clone(_,he);let d,P;h(y)&&(r!==0&&!c?d=n[r-1]:d=n[r],r!==f-1&&(P=n[r]));let G=r===0?2:0,T=r===f-1?2:4;for(w=G;w<T;++w){p.pack(ae,M,H),p.pack(fe,W,H),p.pack(he,z,H),H+=3;let g=w-2<0?-1:1;if(B[j++]=2*(w%2)-1,B[j++]=g*o,t.st&&(K[X++]=r/(f-1),K[X++]=Math.max(B[j-2],0)),h(y)){let D=w<2?d:P;y[Y++]=m.floatToByte(D.red),y[Y++]=m.floatToByte(D.green),y[Y++]=m.floatToByte(D.blue),y[Y++]=m.floatToByte(D.alpha)}}}let v=new ce;v.position=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:M}),v.prevPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:W}),v.nextPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:z}),v.expandAndWidth=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:B}),t.st&&(v.st=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:K})),h(y)&&(v.color=new O({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:4,values:y,normalize:!0}));let C=se.createTypedArray(L,f*6-6),F=0,R=0,we=f-1;for(r=0;r<we;++r)C[R++]=F,C[R++]=F+2,C[R++]=F+1,C[R++]=F+1,C[R++]=F+2,C[R++]=F+3,F+=4;return new ie({attributes:v,indices:C,primitiveType:re.TRIANGLES,boundingSphere:oe.fromPoints(i),geometryType:ne.POLYLINES})};var Q=q;function ge(e,o){return h(o)&&(e=Q.unpack(e,o)),e._ellipsoid=u.clone(e._ellipsoid),Q.createGeometry(e)}var He=ge;export{He as default}; +import{a as m}from"./chunk-V7JEDBOE.js";import{a as N}from"./chunk-ATPDRNKI.js";import{a as U}from"./chunk-AMQUWUD4.js";import"./chunk-W23CU777.js";import{a as k}from"./chunk-HEEMUCG6.js";import{a as le}from"./chunk-RXTBM4OI.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as se}from"./chunk-P37AI2DW.js";import{a as ce}from"./chunk-T6BE4RZK.js";import{a as ne,b as re,c as ie,d as O}from"./chunk-X5IHHI6X.js";import{d as oe}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as x}from"./chunk-KZNJOCYU.js";import{a as p,d as u}from"./chunk-POASMU2N.js";import{a as J}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as A}from"./chunk-IUA6FAOZ.js";import{a as V}from"./chunk-UH2WFNTA.js";import{e as h}from"./chunk-PEYJTJPE.js";var me=[];function Ae(e,o,t,n,c){let s=me;s.length=c;let l,E=t.red,a=t.green,r=t.blue,w=t.alpha,b=n.red,i=n.green,f=n.blue,L=n.alpha;if(m.equals(t,n)){for(l=0;l<c;l++)s[l]=m.clone(t);return s}let M=(b-E)/c,z=(i-a)/c,H=(f-r)/c,B=(L-w)/c;for(l=0;l<c;l++)s[l]=new m(E+l*M,a+l*z,r+l*H,w+l*B);return s}function G(e){e=A(e,A.EMPTY_OBJECT);let o=e.positions,t=e.colors,n=A(e.width,1),c=A(e.colorsPerVertex,!1);if(!h(o)||o.length<2)throw new V("At least two positions are required.");if(typeof n!="number")throw new V("width must be a number");if(h(t)&&(c&&t.length<o.length||!c&&t.length<o.length-1))throw new V("colors has an invalid length.");this._positions=o,this._colors=t,this._width=n,this._colorsPerVertex=c,this._vertexFormat=k.clone(A(e.vertexFormat,k.DEFAULT)),this._arcType=A(e.arcType,N.GEODESIC),this._granularity=A(e.granularity,J.RADIANS_PER_DEGREE),this._ellipsoid=u.clone(A(e.ellipsoid,u.default)),this._workerName="createPolylineGeometry";let s=1+o.length*p.packedLength;s+=h(t)?1+t.length*m.packedLength:1,this.packedLength=s+u.packedLength+k.packedLength+4}G.pack=function(e,o,t){if(!h(e))throw new V("value is required");if(!h(o))throw new V("array is required");t=A(t,0);let n,c=e._positions,s=c.length;for(o[t++]=s,n=0;n<s;++n,t+=p.packedLength)p.pack(c[n],o,t);let l=e._colors;for(s=h(l)?l.length:0,o[t++]=s,n=0;n<s;++n,t+=m.packedLength)m.pack(l[n],o,t);return u.pack(e._ellipsoid,o,t),t+=u.packedLength,k.pack(e._vertexFormat,o,t),t+=k.packedLength,o[t++]=e._width,o[t++]=e._colorsPerVertex?1:0,o[t++]=e._arcType,o[t]=e._granularity,o};var de=u.clone(u.UNIT_SPHERE),ue=new k,S={positions:void 0,colors:void 0,ellipsoid:de,vertexFormat:ue,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};G.unpack=function(e,o,t){if(!h(e))throw new V("array is required");o=A(o,0);let n,c=e[o++],s=new Array(c);for(n=0;n<c;++n,o+=p.packedLength)s[n]=p.unpack(e,o);c=e[o++];let l=c>0?new Array(c):void 0;for(n=0;n<c;++n,o+=m.packedLength)l[n]=m.unpack(e,o);let E=u.unpack(e,o,de);o+=u.packedLength;let a=k.unpack(e,o,ue);o+=k.packedLength;let r=e[o++],w=e[o++]===1,b=e[o++],i=e[o];return h(t)?(t._positions=s,t._colors=l,t._ellipsoid=u.clone(E,t._ellipsoid),t._vertexFormat=k.clone(a,t._vertexFormat),t._width=r,t._colorsPerVertex=w,t._arcType=b,t._granularity=i,t):(S.positions=s,S.colors=l,S.width=r,S.colorsPerVertex=w,S.arcType=b,S.granularity=i,new G(S))};var pe=new p,ae=new p,fe=new p,he=new p;G.createGeometry=function(e){let o=e._width,t=e._vertexFormat,n=e._colors,c=e._colorsPerVertex,s=e._arcType,l=e._granularity,E=e._ellipsoid,a,r,w,b=[],i=le(e._positions,p.equalsEpsilon,!1,b);if(h(n)&&b.length>0){let d=0,P=b[0];n=n.filter(function(q,T){let g=!1;return c?g=T===P||T===0&&P===1:g=T+1===P,g?(d++,P=b[d],!1):!0})}let f=i.length;if(f<2||o<=0)return;if(s===N.GEODESIC||s===N.RHUMB){let d,P;s===N.GEODESIC?(d=J.chordLength(l,E.maximumRadius),P=U.numberOfPoints):(d=l,P=U.numberOfPointsRhumbLine);let q=U.extractHeights(i,E);if(h(n)){let T=1;for(a=0;a<f-1;++a)T+=P(i[a],i[a+1],d);let g=new Array(T),D=0;for(a=0;a<f-1;++a){let Z=i[a],$=i[a+1],I=n[a],ee=P(Z,$,d);if(c&&a<T){let _e=n[a+1],te=Ae(Z,$,I,_e,ee),Pe=te.length;for(r=0;r<Pe;++r)g[D++]=te[r]}else for(r=0;r<ee;++r)g[D++]=m.clone(I)}g[D]=m.clone(n[n.length-1]),n=g,me.length=0}s===N.GEODESIC?i=U.generateCartesianArc({positions:i,minDistance:d,ellipsoid:E,height:q}):i=U.generateCartesianRhumbArc({positions:i,granularity:d,ellipsoid:E,height:q})}f=i.length;let L=f*4-4,M=new Float64Array(L*3),z=new Float64Array(L*3),H=new Float64Array(L*3),B=new Float32Array(L*2),K=t.st?new Float32Array(L*2):void 0,y=h(n)?new Uint8Array(L*4):void 0,W=0,j=0,X=0,Y=0,_;for(r=0;r<f;++r){r===0?(_=pe,p.subtract(i[0],i[1],_),p.add(i[0],_,_)):_=i[r-1],p.clone(_,fe),p.clone(i[r],ae),r===f-1?(_=pe,p.subtract(i[f-1],i[f-2],_),p.add(i[f-1],_,_)):_=i[r+1],p.clone(_,he);let d,P;h(y)&&(r!==0&&!c?d=n[r-1]:d=n[r],r!==f-1&&(P=n[r]));let q=r===0?2:0,T=r===f-1?2:4;for(w=q;w<T;++w){p.pack(ae,M,W),p.pack(fe,z,W),p.pack(he,H,W),W+=3;let g=w-2<0?-1:1;if(B[j++]=2*(w%2)-1,B[j++]=g*o,t.st&&(K[X++]=r/(f-1),K[X++]=Math.max(B[j-2],0)),h(y)){let D=w<2?d:P;y[Y++]=m.floatToByte(D.red),y[Y++]=m.floatToByte(D.green),y[Y++]=m.floatToByte(D.blue),y[Y++]=m.floatToByte(D.alpha)}}}let v=new ce;v.position=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:M}),v.prevPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:z}),v.nextPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:H}),v.expandAndWidth=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:B}),t.st&&(v.st=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:K})),h(y)&&(v.color=new O({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:4,values:y,normalize:!0}));let C=se.createTypedArray(L,f*6-6),F=0,R=0,we=f-1;for(r=0;r<we;++r)C[R++]=F,C[R++]=F+2,C[R++]=F+1,C[R++]=F+1,C[R++]=F+2,C[R++]=F+3,F+=4;return new ie({attributes:v,indices:C,primitiveType:re.TRIANGLES,boundingSphere:oe.fromPoints(i),geometryType:ne.POLYLINES})};var Q=G;function ge(e,o){return h(o)&&(e=Q.unpack(e,o)),e._ellipsoid=u.clone(e._ellipsoid),Q.createGeometry(e)}var We=ge;export{We as default}; diff --git a/cesium/Workers/createPolylineVolumeGeometry.js b/cesium/Workers/createPolylineVolumeGeometry.js index 4f37a84..022885b 100644 --- a/cesium/Workers/createPolylineVolumeGeometry.js +++ b/cesium/Workers/createPolylineVolumeGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as M}from"./chunk-JFTXHZ2O.js";import{a as W}from"./chunk-7JCIFY66.js";import"./chunk-ED2EM7ZX.js";import"./chunk-YZP3DYN3.js";import{a as x,b as I,c as j}from"./chunk-DVG6ROYF.js";import"./chunk-WIE5YNSS.js";import"./chunk-65DFAZKW.js";import{a as g}from"./chunk-DUVNED7U.js";import"./chunk-TLL4Q2KI.js";import"./chunk-4IWHN7T4.js";import{a as $,b as V}from"./chunk-LKPDAB55.js";import{a as Z}from"./chunk-CIEXTRKV.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as X}from"./chunk-RQXB4B4V.js";import{a as Q}from"./chunk-MPVEZNKB.js";import{b as Y,c as z,d as U}from"./chunk-FATK2EQ2.js";import{d as K}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as B}from"./chunk-77ESX6BV.js";import{a as T,c as C,d as f}from"./chunk-LJCGAQ64.js";import{a as J}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as k}from"./chunk-42NIXFVW.js";import{a as D}from"./chunk-5YVCOCPP.js";import{e as _}from"./chunk-U73D6PDD.js";function oe(t,e,n,o){let l=new Q;o.position&&(l.position=new U({componentDatatype:B.DOUBLE,componentsPerAttribute:3,values:t}));let i=e.length,u=t.length/3,L=(u-i*2)/(i*2),E=V.triangulate(e),G=(L-1)*i*6+E.length*2,r=X.createTypedArray(u,G),m,s,d,b,A,q,F=i*2,p=0;for(m=0;m<L-1;m++){for(s=0;s<i-1;s++)d=s*2+m*i*2,q=d+F,b=d+1,A=b+F,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=q;d=i*2-2+m*i*2,b=d+1,A=b+F,q=d+F,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=q}if(o.st||o.tangent||o.bitangent){let c=new Float32Array(u*2),S=1/(L-1),w=1/n.height,O=n.height/2,y,a,h=0;for(m=0;m<L;m++){for(y=m*S,a=w*(e[0].y+O),c[h++]=y,c[h++]=a,s=1;s<i;s++)a=w*(e[s].y+O),c[h++]=y,c[h++]=a,c[h++]=y,c[h++]=a;a=w*(e[0].y+O),c[h++]=y,c[h++]=a}for(s=0;s<i;s++)y=0,a=w*(e[s].y+O),c[h++]=y,c[h++]=a;for(s=0;s<i;s++)y=(L-1)*S,a=w*(e[s].y+O),c[h++]=y,c[h++]=a;l.st=new U({componentDatatype:B.FLOAT,componentsPerAttribute:2,values:new Float32Array(c)})}let N=u-i*2;for(m=0;m<E.length;m+=3){let c=E[m]+N,S=E[m+1]+N,w=E[m+2]+N;r[p++]=c,r[p++]=S,r[p++]=w,r[p++]=w+i,r[p++]=S+i,r[p++]=c+i}let P=new z({attributes:l,indices:r,boundingSphere:K.fromVertices(t),primitiveType:Y.TRIANGLES});if(o.normal&&(P=W.computeNormal(P)),o.tangent||o.bitangent){try{P=W.computeTangentAndBitangent(P)}catch{I("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(P.attributes.tangent=void 0),o.bitangent||(P.attributes.bitangent=void 0),o.st||(P.attributes.st=void 0)}return P}function R(t){t=k(t,k.EMPTY_OBJECT);let e=t.polylinePositions,n=t.shapePositions;if(!_(e))throw new D("options.polylinePositions is required.");if(!_(n))throw new D("options.shapePositions is required.");this._positions=e,this._shape=n,this._ellipsoid=f.clone(k(t.ellipsoid,f.WGS84)),this._cornerType=k(t.cornerType,x.ROUNDED),this._vertexFormat=g.clone(k(t.vertexFormat,g.DEFAULT)),this._granularity=k(t.granularity,J.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let o=1+e.length*T.packedLength;o+=1+n.length*C.packedLength,this.packedLength=o+f.packedLength+g.packedLength+2}R.pack=function(t,e,n){if(!_(t))throw new D("value is required");if(!_(e))throw new D("array is required");n=k(n,0);let o,l=t._positions,i=l.length;for(e[n++]=i,o=0;o<i;++o,n+=T.packedLength)T.pack(l[o],e,n);let u=t._shape;for(i=u.length,e[n++]=i,o=0;o<i;++o,n+=C.packedLength)C.pack(u[o],e,n);return f.pack(t._ellipsoid,e,n),n+=f.packedLength,g.pack(t._vertexFormat,e,n),n+=g.packedLength,e[n++]=t._cornerType,e[n]=t._granularity,e};var ee=f.clone(f.UNIT_SPHERE),te=new g,v={polylinePositions:void 0,shapePositions:void 0,ellipsoid:ee,vertexFormat:te,cornerType:void 0,granularity:void 0};R.unpack=function(t,e,n){if(!_(t))throw new D("array is required");e=k(e,0);let o,l=t[e++],i=new Array(l);for(o=0;o<l;++o,e+=T.packedLength)i[o]=T.unpack(t,e);l=t[e++];let u=new Array(l);for(o=0;o<l;++o,e+=C.packedLength)u[o]=C.unpack(t,e);let L=f.unpack(t,e,ee);e+=f.packedLength;let E=g.unpack(t,e,te);e+=g.packedLength;let G=t[e++],r=t[e];return _(n)?(n._positions=i,n._shape=u,n._ellipsoid=f.clone(L,n._ellipsoid),n._vertexFormat=g.clone(E,n._vertexFormat),n._cornerType=G,n._granularity=r,n):(v.polylinePositions=i,v.shapePositions=u,v.cornerType=G,v.granularity=r,new R(v))};var ne=new M;R.createGeometry=function(t){let e=t._positions,n=Z(e,T.equalsEpsilon),o=t._shape;if(o=j.removeDuplicatesFromShape(o),n.length<2||o.length<3)return;V.computeWindingOrder2D(o)===$.CLOCKWISE&&o.reverse();let l=M.fromPoints(o,ne),i=j.computePositions(n,o,l,t,!0);return oe(i,o,l,t._vertexFormat)};var H=R;function ie(t,e){return _(e)&&(t=H.unpack(t,e)),t._ellipsoid=f.clone(t._ellipsoid),H.createGeometry(t)}var Re=ie;export{Re as default}; +import{a as M}from"./chunk-3JW36LZF.js";import{a as W}from"./chunk-QB3MDM4J.js";import"./chunk-ABGXSJNX.js";import"./chunk-DQO6B4EQ.js";import{a as x,b as I,c as j}from"./chunk-K4ASOM65.js";import"./chunk-AMQUWUD4.js";import"./chunk-W23CU777.js";import{a as g}from"./chunk-HEEMUCG6.js";import"./chunk-KF5NF354.js";import"./chunk-4WRMLZA7.js";import{a as $,b as V}from"./chunk-O5IJ3OGP.js";import{a as Z}from"./chunk-RXTBM4OI.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as X}from"./chunk-P37AI2DW.js";import{a as Q}from"./chunk-T6BE4RZK.js";import{b as Y,c as z,d as U}from"./chunk-X5IHHI6X.js";import{d as K}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as B}from"./chunk-KZNJOCYU.js";import{a as T,c as C,d as f}from"./chunk-POASMU2N.js";import{a as J}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as k}from"./chunk-IUA6FAOZ.js";import{a as D}from"./chunk-UH2WFNTA.js";import{e as _}from"./chunk-PEYJTJPE.js";function oe(t,e,n,o){let l=new Q;o.position&&(l.position=new U({componentDatatype:B.DOUBLE,componentsPerAttribute:3,values:t}));let i=e.length,u=t.length/3,L=(u-i*2)/(i*2),E=V.triangulate(e),q=(L-1)*i*6+E.length*2,r=X.createTypedArray(u,q),m,s,d,b,A,F,G=i*2,p=0;for(m=0;m<L-1;m++){for(s=0;s<i-1;s++)d=s*2+m*i*2,F=d+G,b=d+1,A=b+G,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=F;d=i*2-2+m*i*2,b=d+1,A=b+G,F=d+G,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=F}if(o.st||o.tangent||o.bitangent){let c=new Float32Array(u*2),O=1/(L-1),w=1/n.height,S=n.height/2,y,a,h=0;for(m=0;m<L;m++){for(y=m*O,a=w*(e[0].y+S),c[h++]=y,c[h++]=a,s=1;s<i;s++)a=w*(e[s].y+S),c[h++]=y,c[h++]=a,c[h++]=y,c[h++]=a;a=w*(e[0].y+S),c[h++]=y,c[h++]=a}for(s=0;s<i;s++)y=0,a=w*(e[s].y+S),c[h++]=y,c[h++]=a;for(s=0;s<i;s++)y=(L-1)*O,a=w*(e[s].y+S),c[h++]=y,c[h++]=a;l.st=new U({componentDatatype:B.FLOAT,componentsPerAttribute:2,values:new Float32Array(c)})}let N=u-i*2;for(m=0;m<E.length;m+=3){let c=E[m]+N,O=E[m+1]+N,w=E[m+2]+N;r[p++]=c,r[p++]=O,r[p++]=w,r[p++]=w+i,r[p++]=O+i,r[p++]=c+i}let P=new z({attributes:l,indices:r,boundingSphere:K.fromVertices(t),primitiveType:Y.TRIANGLES});if(o.normal&&(P=W.computeNormal(P)),o.tangent||o.bitangent){try{P=W.computeTangentAndBitangent(P)}catch{I("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(P.attributes.tangent=void 0),o.bitangent||(P.attributes.bitangent=void 0),o.st||(P.attributes.st=void 0)}return P}function R(t){t=k(t,k.EMPTY_OBJECT);let e=t.polylinePositions,n=t.shapePositions;if(!_(e))throw new D("options.polylinePositions is required.");if(!_(n))throw new D("options.shapePositions is required.");this._positions=e,this._shape=n,this._ellipsoid=f.clone(k(t.ellipsoid,f.default)),this._cornerType=k(t.cornerType,x.ROUNDED),this._vertexFormat=g.clone(k(t.vertexFormat,g.DEFAULT)),this._granularity=k(t.granularity,J.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let o=1+e.length*T.packedLength;o+=1+n.length*C.packedLength,this.packedLength=o+f.packedLength+g.packedLength+2}R.pack=function(t,e,n){if(!_(t))throw new D("value is required");if(!_(e))throw new D("array is required");n=k(n,0);let o,l=t._positions,i=l.length;for(e[n++]=i,o=0;o<i;++o,n+=T.packedLength)T.pack(l[o],e,n);let u=t._shape;for(i=u.length,e[n++]=i,o=0;o<i;++o,n+=C.packedLength)C.pack(u[o],e,n);return f.pack(t._ellipsoid,e,n),n+=f.packedLength,g.pack(t._vertexFormat,e,n),n+=g.packedLength,e[n++]=t._cornerType,e[n]=t._granularity,e};var ee=f.clone(f.UNIT_SPHERE),te=new g,v={polylinePositions:void 0,shapePositions:void 0,ellipsoid:ee,vertexFormat:te,cornerType:void 0,granularity:void 0};R.unpack=function(t,e,n){if(!_(t))throw new D("array is required");e=k(e,0);let o,l=t[e++],i=new Array(l);for(o=0;o<l;++o,e+=T.packedLength)i[o]=T.unpack(t,e);l=t[e++];let u=new Array(l);for(o=0;o<l;++o,e+=C.packedLength)u[o]=C.unpack(t,e);let L=f.unpack(t,e,ee);e+=f.packedLength;let E=g.unpack(t,e,te);e+=g.packedLength;let q=t[e++],r=t[e];return _(n)?(n._positions=i,n._shape=u,n._ellipsoid=f.clone(L,n._ellipsoid),n._vertexFormat=g.clone(E,n._vertexFormat),n._cornerType=q,n._granularity=r,n):(v.polylinePositions=i,v.shapePositions=u,v.cornerType=q,v.granularity=r,new R(v))};var ne=new M;R.createGeometry=function(t){let e=t._positions,n=Z(e,T.equalsEpsilon),o=t._shape;if(o=j.removeDuplicatesFromShape(o),n.length<2||o.length<3)return;V.computeWindingOrder2D(o)===$.CLOCKWISE&&o.reverse();let l=M.fromPoints(o,ne),i=j.computePositions(n,o,l,t,!0);return oe(i,o,l,t._vertexFormat)};var H=R;function ie(t,e){return _(e)&&(t=H.unpack(t,e)),t._ellipsoid=f.clone(t._ellipsoid),H.createGeometry(t)}var Re=ie;export{Re as default}; diff --git a/cesium/Workers/createPolylineVolumeOutlineGeometry.js b/cesium/Workers/createPolylineVolumeOutlineGeometry.js index 326a7e0..7061c00 100644 --- a/cesium/Workers/createPolylineVolumeOutlineGeometry.js +++ b/cesium/Workers/createPolylineVolumeOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as w}from"./chunk-JFTXHZ2O.js";import{a as N,c as E}from"./chunk-DVG6ROYF.js";import"./chunk-WIE5YNSS.js";import"./chunk-65DFAZKW.js";import"./chunk-TLL4Q2KI.js";import"./chunk-4IWHN7T4.js";import{a as G,b as v}from"./chunk-LKPDAB55.js";import{a as q}from"./chunk-CIEXTRKV.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as k}from"./chunk-RQXB4B4V.js";import{a as O}from"./chunk-MPVEZNKB.js";import{b as A,c as S,d as R}from"./chunk-FATK2EQ2.js";import{d as C}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as b}from"./chunk-77ESX6BV.js";import{a,c as _,d as s}from"./chunk-LJCGAQ64.js";import{a as D}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as d}from"./chunk-42NIXFVW.js";import{a as y}from"./chunk-5YVCOCPP.js";import{e as u}from"./chunk-U73D6PDD.js";function U(o,i){let t=new O;t.position=new R({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:o});let e=i.length,r=t.position.values.length/3,f=o.length/3/e,p=k.createTypedArray(r,2*e*(f+1)),m,n,l=0;m=0;let h=m*e;for(n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=f-1,h=m*e,n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=0;m<f-1;m++){let T=e*m,W=T+e;for(n=0;n<e;n++)p[l++]=n+T,p[l++]=n+W}return new S({attributes:t,indices:k.createTypedArray(r,p),boundingSphere:C.fromVertices(o),primitiveType:A.LINES})}function g(o){o=d(o,d.EMPTY_OBJECT);let i=o.polylinePositions,t=o.shapePositions;if(!u(i))throw new y("options.polylinePositions is required.");if(!u(t))throw new y("options.shapePositions is required.");this._positions=i,this._shape=t,this._ellipsoid=s.clone(d(o.ellipsoid,s.WGS84)),this._cornerType=d(o.cornerType,N.ROUNDED),this._granularity=d(o.granularity,D.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let e=1+i.length*a.packedLength;e+=1+t.length*_.packedLength,this.packedLength=e+s.packedLength+2}g.pack=function(o,i,t){if(!u(o))throw new y("value is required");if(!u(i))throw new y("array is required");t=d(t,0);let e,r=o._positions,c=r.length;for(i[t++]=c,e=0;e<c;++e,t+=a.packedLength)a.pack(r[e],i,t);let f=o._shape;for(c=f.length,i[t++]=c,e=0;e<c;++e,t+=_.packedLength)_.pack(f[e],i,t);return s.pack(o._ellipsoid,i,t),t+=s.packedLength,i[t++]=o._cornerType,i[t]=o._granularity,i};var B=s.clone(s.UNIT_SPHERE),P={polylinePositions:void 0,shapePositions:void 0,ellipsoid:B,height:void 0,cornerType:void 0,granularity:void 0};g.unpack=function(o,i,t){if(!u(o))throw new y("array is required");i=d(i,0);let e,r=o[i++],c=new Array(r);for(e=0;e<r;++e,i+=a.packedLength)c[e]=a.unpack(o,i);r=o[i++];let f=new Array(r);for(e=0;e<r;++e,i+=_.packedLength)f[e]=_.unpack(o,i);let p=s.unpack(o,i,B);i+=s.packedLength;let m=o[i++],n=o[i];return u(t)?(t._positions=c,t._shape=f,t._ellipsoid=s.clone(p,t._ellipsoid),t._cornerType=m,t._granularity=n,t):(P.polylinePositions=c,P.shapePositions=f,P.cornerType=m,P.granularity=n,new g(P))};var M=new w;g.createGeometry=function(o){let i=o._positions,t=q(i,a.equalsEpsilon),e=o._shape;if(e=E.removeDuplicatesFromShape(e),t.length<2||e.length<3)return;v.computeWindingOrder2D(e)===G.CLOCKWISE&&e.reverse();let r=w.fromPoints(e,M),c=E.computePositions(t,e,r,o,!1);return U(c,e)};var L=g;function j(o,i){return u(i)&&(o=L.unpack(o,i)),o._ellipsoid=s.clone(o._ellipsoid),L.createGeometry(o)}var he=j;export{he as default}; +import{a as w}from"./chunk-3JW36LZF.js";import{a as N,c as E}from"./chunk-K4ASOM65.js";import"./chunk-AMQUWUD4.js";import"./chunk-W23CU777.js";import"./chunk-KF5NF354.js";import"./chunk-4WRMLZA7.js";import{a as v,b as G}from"./chunk-O5IJ3OGP.js";import{a as q}from"./chunk-RXTBM4OI.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as k}from"./chunk-P37AI2DW.js";import{a as O}from"./chunk-T6BE4RZK.js";import{b as A,c as R,d as S}from"./chunk-X5IHHI6X.js";import{d as C}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as b}from"./chunk-KZNJOCYU.js";import{a,c as _,d as s}from"./chunk-POASMU2N.js";import{a as D}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as d}from"./chunk-IUA6FAOZ.js";import{a as y}from"./chunk-UH2WFNTA.js";import{e as u}from"./chunk-PEYJTJPE.js";function W(o,i){let t=new O;t.position=new S({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:o});let e=i.length,r=t.position.values.length/3,f=o.length/3/e,p=k.createTypedArray(r,2*e*(f+1)),m,n,l=0;m=0;let h=m*e;for(n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=f-1,h=m*e,n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=0;m<f-1;m++){let T=e*m,U=T+e;for(n=0;n<e;n++)p[l++]=n+T,p[l++]=n+U}return new R({attributes:t,indices:k.createTypedArray(r,p),boundingSphere:C.fromVertices(o),primitiveType:A.LINES})}function g(o){o=d(o,d.EMPTY_OBJECT);let i=o.polylinePositions,t=o.shapePositions;if(!u(i))throw new y("options.polylinePositions is required.");if(!u(t))throw new y("options.shapePositions is required.");this._positions=i,this._shape=t,this._ellipsoid=s.clone(d(o.ellipsoid,s.default)),this._cornerType=d(o.cornerType,N.ROUNDED),this._granularity=d(o.granularity,D.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let e=1+i.length*a.packedLength;e+=1+t.length*_.packedLength,this.packedLength=e+s.packedLength+2}g.pack=function(o,i,t){if(!u(o))throw new y("value is required");if(!u(i))throw new y("array is required");t=d(t,0);let e,r=o._positions,c=r.length;for(i[t++]=c,e=0;e<c;++e,t+=a.packedLength)a.pack(r[e],i,t);let f=o._shape;for(c=f.length,i[t++]=c,e=0;e<c;++e,t+=_.packedLength)_.pack(f[e],i,t);return s.pack(o._ellipsoid,i,t),t+=s.packedLength,i[t++]=o._cornerType,i[t]=o._granularity,i};var B=s.clone(s.UNIT_SPHERE),P={polylinePositions:void 0,shapePositions:void 0,ellipsoid:B,height:void 0,cornerType:void 0,granularity:void 0};g.unpack=function(o,i,t){if(!u(o))throw new y("array is required");i=d(i,0);let e,r=o[i++],c=new Array(r);for(e=0;e<r;++e,i+=a.packedLength)c[e]=a.unpack(o,i);r=o[i++];let f=new Array(r);for(e=0;e<r;++e,i+=_.packedLength)f[e]=_.unpack(o,i);let p=s.unpack(o,i,B);i+=s.packedLength;let m=o[i++],n=o[i];return u(t)?(t._positions=c,t._shape=f,t._ellipsoid=s.clone(p,t._ellipsoid),t._cornerType=m,t._granularity=n,t):(P.polylinePositions=c,P.shapePositions=f,P.cornerType=m,P.granularity=n,new g(P))};var M=new w;g.createGeometry=function(o){let i=o._positions,t=q(i,a.equalsEpsilon),e=o._shape;if(e=E.removeDuplicatesFromShape(e),t.length<2||e.length<3)return;G.computeWindingOrder2D(e)===v.CLOCKWISE&&e.reverse();let r=w.fromPoints(e,M),c=E.computePositions(t,e,r,o,!1);return W(c,e)};var L=g;function j(o,i){return u(i)&&(o=L.unpack(o,i)),o._ellipsoid=s.clone(o._ellipsoid),L.createGeometry(o)}var he=j;export{he as default}; diff --git a/cesium/Workers/createRectangleGeometry.js b/cesium/Workers/createRectangleGeometry.js index a38ee06..1342dce 100644 --- a/cesium/Workers/createRectangleGeometry.js +++ b/cesium/Workers/createRectangleGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as J}from"./chunk-FPY4GPIL.js";import{a as Nt}from"./chunk-CRFMECNE.js";import{a as zt}from"./chunk-7JCIFY66.js";import"./chunk-ED2EM7ZX.js";import"./chunk-YZP3DYN3.js";import{a as ut}from"./chunk-WLRVP2UA.js";import{a as X}from"./chunk-DUVNED7U.js";import{b as Rt}from"./chunk-LKPDAB55.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as yt}from"./chunk-RQXB4B4V.js";import{a as Vt}from"./chunk-MPVEZNKB.js";import{b as Mt,c as Pt,d as q}from"./chunk-FATK2EQ2.js";import{d as st}from"./chunk-3FEM743H.js";import{f as Lt,h as S,i as At}from"./chunk-CMXCDAKR.js";import{a as Y}from"./chunk-77ESX6BV.js";import{a as _,b as wt,c as G,d as H,e as ft}from"./chunk-LJCGAQ64.js";import{a as W}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as L}from"./chunk-42NIXFVW.js";import{a as Et,b as lt}from"./chunk-5YVCOCPP.js";import{e as $}from"./chunk-U73D6PDD.js";var Tt=new _,Bt=new _,Ut=new _,Yt=new _,qt=new S,Zt=new G,Kt=new st,$t=new st;function Xt(t,e){let n=new Pt({attributes:new Vt,primitiveType:Mt.TRIANGLES});return n.attributes.position=new q({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}function Gt(t,e,n,r){let a=t.length,c=e.normal?new Float32Array(a):void 0,l=e.tangent?new Float32Array(a):void 0,u=e.bitangent?new Float32Array(a):void 0,p=0,d=Yt,o=Ut,i=Bt;if(e.normal||e.tangent||e.bitangent)for(let f=0;f<a;f+=3){let s=_.fromArray(t,f,Tt),h=p+1,g=p+2;i=n.geodeticSurfaceNormal(s,i),(e.tangent||e.bitangent)&&(_.cross(_.UNIT_Z,i,o),ft.multiplyByVector(r,o,o),_.normalize(o,o),e.bitangent&&_.normalize(_.cross(i,o,d),d)),e.normal&&(c[p]=i.x,c[h]=i.y,c[g]=i.z),e.tangent&&(l[p]=o.x,l[h]=o.y,l[g]=o.z),e.bitangent&&(u[p]=d.x,u[h]=d.y,u[g]=d.z),p+=3}return Xt(e,{positions:t,normals:c,tangents:l,bitangents:u})}var Ct=new _,jt=new _;function te(t,e,n){let r=t.length,a=e.normal?new Float32Array(r):void 0,c=e.tangent?new Float32Array(r):void 0,l=e.bitangent?new Float32Array(r):void 0,u=0,p=0,d=0,o=!0,i=Yt,f=Ut,s=Bt;if(e.normal||e.tangent||e.bitangent)for(let h=0;h<r;h+=6){let g=_.fromArray(t,h,Tt),A=_.fromArray(t,(h+6)%r,Ct);if(o){let b=_.fromArray(t,(h+3)%r,jt);_.subtract(A,g,A),_.subtract(b,g,b),s=_.normalize(_.cross(b,A,s),s),o=!1}_.equalsEpsilon(A,g,W.EPSILON10)&&(o=!0),(e.tangent||e.bitangent)&&(i=n.geodeticSurfaceNormal(g,i),e.tangent&&(f=_.normalize(_.cross(i,s,f),f))),e.normal&&(a[u++]=s.x,a[u++]=s.y,a[u++]=s.z,a[u++]=s.x,a[u++]=s.y,a[u++]=s.z),e.tangent&&(c[p++]=f.x,c[p++]=f.y,c[p++]=f.z,c[p++]=f.x,c[p++]=f.y,c[p++]=f.z),e.bitangent&&(l[d++]=i.x,l[d++]=i.y,l[d++]=i.z,l[d++]=i.x,l[d++]=i.y,l[d++]=i.z)}return Xt(e,{positions:t,normals:a,tangents:c,bitangents:l})}function It(t,e){let n=t._vertexFormat,r=t._ellipsoid,a=e.height,c=e.width,l=e.northCap,u=e.southCap,p=0,d=a,o=a,i=0;l&&(p=1,o-=1,i+=1),u&&(d-=1,o-=1,i+=1),i+=c*o;let f=n.position?new Float64Array(i*3):void 0,s=n.st?new Float32Array(i*2):void 0,h=0,g=0,A=Tt,b=Zt,z=Number.MAX_VALUE,F=Number.MAX_VALUE,j=-Number.MAX_VALUE,T=-Number.MAX_VALUE;for(let x=p;x<d;++x)for(let k=0;k<c;++k)J.computePosition(e,r,n.st,x,k,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y));if(l&&(J.computePosition(e,r,n.st,0,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=b.x,F=b.y,j=b.x,T=b.y)),u&&(J.computePosition(e,r,n.st,a-1,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h]=A.z,n.st&&(s[g++]=b.x,s[g]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y))),n.st&&(z<0||F<0||j>1||T>1))for(let x=0;x<s.length;x+=2)s[x]=(s[x]-z)/(j-z),s[x+1]=(s[x+1]-F)/(T-F);let m=Gt(f,n,r,e.tangentRotationMatrix),K=6*(c-1)*(o-1);l&&(K+=3*(c-1)),u&&(K+=3*(c-1));let P=yt.createTypedArray(i,K),D=0,N=0,O;for(O=0;O<o-1;++O){for(let x=0;x<c-1;++x){let k=D,M=k+c,I=M+1,rt=k+1;P[N++]=k,P[N++]=M,P[N++]=rt,P[N++]=rt,P[N++]=M,P[N++]=I,++D}++D}if(l||u){let x=i-1,k=i-1;l&&u&&(x=i-2);let M,I;if(D=0,l)for(O=0;O<c-1;O++)M=D,I=M+1,P[N++]=x,P[N++]=M,P[N++]=I,++D;if(u)for(D=(o-1)*c,O=0;O<c-1;O++)M=D,I=M+1,P[N++]=M,P[N++]=k,P[N++]=I,++D}return m.indices=P,n.st&&(m.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:s})),m}function ht(t,e,n,r,a){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n+2],t[e++]=a[n],t[e++]=a[n+1],t[e]=a[n+2],t}function pt(t,e,n,r){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n],t[e]=r[n+1],t}var Dt=new X;function ee(t,e){let n=t._shadowVolume,r=t._offsetAttribute,a=t._vertexFormat,c=t._extrudedHeight,l=t._surfaceHeight,u=t._ellipsoid,p=e.height,d=e.width,o;if(n){let R=X.clone(a,Dt);R.normal=!0,t._vertexFormat=R}let i=It(t,e);n&&(t._vertexFormat=a);let f=Rt.scaleToGeodeticHeight(i.attributes.position.values,l,u,!1);f=new Float64Array(f);let s=f.length,h=s*2,g=new Float64Array(h);g.set(f);let A=Rt.scaleToGeodeticHeight(i.attributes.position.values,c,u);g.set(A,s),i.attributes.position.values=g;let b=a.normal?new Float32Array(h):void 0,z=a.tangent?new Float32Array(h):void 0,F=a.bitangent?new Float32Array(h):void 0,j=a.st?new Float32Array(h/3*2):void 0,T,m;if(a.normal){for(m=i.attributes.normal.values,b.set(m),o=0;o<s;o++)m[o]=-m[o];b.set(m,s),i.attributes.normal.values=b}if(n){m=i.attributes.normal.values,a.normal||(i.attributes.normal=void 0);let R=new Float32Array(h);for(o=0;o<s;o++)m[o]=-m[o];R.set(m,s),i.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:R})}let K,P=$(r);if(P){let R=s/3*2,at=new Uint8Array(R);r===ut.TOP?at=at.fill(1,0,R/2):(K=r===ut.NONE?0:1,at=at.fill(K)),i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:at})}if(a.tangent){let R=i.attributes.tangent.values;for(z.set(R),o=0;o<s;o++)R[o]=-R[o];z.set(R,s),i.attributes.tangent.values=z}if(a.bitangent){let R=i.attributes.bitangent.values;F.set(R),F.set(R,s),i.attributes.bitangent.values=F}a.st&&(T=i.attributes.st.values,j.set(T),j.set(T,s/3*2),i.attributes.st.values=j);let D=i.indices,N=D.length,O=s/3,x=yt.createTypedArray(h/3,N*2);for(x.set(D),o=0;o<N;o+=3)x[o+N]=D[o+2]+O,x[o+1+N]=D[o+1]+O,x[o+2+N]=D[o]+O;i.indices=x;let k=e.northCap,M=e.southCap,I=p,rt=2,dt=0,xt=4,St=4;k&&(rt-=1,I-=1,dt+=1,xt-=2,St-=1),M&&(rt-=1,I-=1,dt+=1,xt-=2,St-=1),dt+=rt*d+2*I-xt;let gt=(dt+St)*2,C=new Float64Array(gt*3),E=n?new Float32Array(gt*3):void 0,Z=P?new Uint8Array(gt):void 0,V=a.st?new Float32Array(gt*2):void 0,et=r===ut.TOP;P&&!et&&(K=r===ut.ALL?1:0,Z=Z.fill(K));let v=0,B=0,y=0,U=0,nt=d*I,w;for(o=0;o<nt;o+=d)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(M){let R=k?nt+1:nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,R*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=nt-d;o<nt;o++)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);for(o=nt-1;o>0;o-=d)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(k){let R=nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,R*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=d-1;o>=0;o--)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);let ot=te(C,a,u);a.st&&(ot.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:V})),n&&(ot.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:E})),P&&(ot.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z}));let it=yt.createTypedArray(gt,dt*6),mt,_t,kt,bt;s=C.length/3;let ct=0;for(o=0;o<s-1;o+=2){mt=o,bt=(mt+2)%s;let R=_.fromArray(C,mt*3,Ct),at=_.fromArray(C,bt*3,jt);_.equalsEpsilon(R,at,W.EPSILON10)||(_t=(mt+1)%s,kt=(_t+2)%s,it[ct++]=mt,it[ct++]=_t,it[ct++]=bt,it[ct++]=bt,it[ct++]=_t,it[ct++]=kt)}return ot.indices=it,ot=zt.combineInstances([new Nt({geometry:i}),new Nt({geometry:ot})]),ot[0]}var ne=[new _,new _,new _,new _],Wt=new wt,oe=new wt;function Ht(t,e,n,r,a){if(n===0)return S.clone(t,a);let c=J.computeOptions(t,e,n,0,qt,Wt),l=c.height,u=c.width,p=ne;return J.computePosition(c,r,!1,0,0,p[0]),J.computePosition(c,r,!1,0,u-1,p[1]),J.computePosition(c,r,!1,l-1,0,p[2]),J.computePosition(c,r,!1,l-1,u-1,p[3]),S.fromCartesianArray(p,r,a)}function Q(t){t=L(t,L.EMPTY_OBJECT);let e=t.rectangle;if(lt.typeOf.object("rectangle",e),S.validate(e),e.north<e.south)throw new Et("options.rectangle.north must be greater than or equal to options.rectangle.south");let n=L(t.height,0),r=L(t.extrudedHeight,n);this._rectangle=S.clone(e),this._granularity=L(t.granularity,W.RADIANS_PER_DEGREE),this._ellipsoid=H.clone(L(t.ellipsoid,H.WGS84)),this._surfaceHeight=Math.max(n,r),this._rotation=L(t.rotation,0),this._stRotation=L(t.stRotation,0),this._vertexFormat=X.clone(L(t.vertexFormat,X.DEFAULT)),this._extrudedHeight=Math.min(n,r),this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=t.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Q.packedLength=S.packedLength+H.packedLength+X.packedLength+7;Q.pack=function(t,e,n){return lt.typeOf.object("value",t),lt.defined("array",e),n=L(n,0),S.pack(t._rectangle,e,n),n+=S.packedLength,H.pack(t._ellipsoid,e,n),n+=H.packedLength,X.pack(t._vertexFormat,e,n),n+=X.packedLength,e[n++]=t._granularity,e[n++]=t._surfaceHeight,e[n++]=t._rotation,e[n++]=t._stRotation,e[n++]=t._extrudedHeight,e[n++]=t._shadowVolume?1:0,e[n]=L(t._offsetAttribute,-1),e};var Jt=new S,Qt=H.clone(H.UNIT_SPHERE),tt={rectangle:Jt,ellipsoid:Qt,vertexFormat:Dt,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Q.unpack=function(t,e,n){lt.defined("array",t),e=L(e,0);let r=S.unpack(t,e,Jt);e+=S.packedLength;let a=H.unpack(t,e,Qt);e+=H.packedLength;let c=X.unpack(t,e,Dt);e+=X.packedLength;let l=t[e++],u=t[e++],p=t[e++],d=t[e++],o=t[e++],i=t[e++]===1,f=t[e];return $(n)?(n._rectangle=S.clone(r,n._rectangle),n._ellipsoid=H.clone(a,n._ellipsoid),n._vertexFormat=X.clone(c,n._vertexFormat),n._granularity=l,n._surfaceHeight=u,n._rotation=p,n._stRotation=d,n._extrudedHeight=o,n._shadowVolume=i,n._offsetAttribute=f===-1?void 0:f,n):(tt.granularity=l,tt.height=u,tt.rotation=p,tt.stRotation=d,tt.extrudedHeight=o,tt.shadowVolume=i,tt.offsetAttribute=f===-1?void 0:f,new Q(tt))};Q.computeRectangle=function(t,e){t=L(t,L.EMPTY_OBJECT);let n=t.rectangle;if(lt.typeOf.object("rectangle",n),S.validate(n),n.north<n.south)throw new Et("options.rectangle.north must be greater than or equal to options.rectangle.south");let r=L(t.granularity,W.RADIANS_PER_DEGREE),a=L(t.ellipsoid,H.WGS84),c=L(t.rotation,0);return Ht(n,r,c,a,e)};var ie=new ft,Ft=new Lt,ae=new wt;Q.createGeometry=function(t){if(W.equalsEpsilon(t._rectangle.north,t._rectangle.south,W.EPSILON10)||W.equalsEpsilon(t._rectangle.east,t._rectangle.west,W.EPSILON10))return;let e=t._rectangle,n=t._ellipsoid,r=t._rotation,a=t._stRotation,c=t._vertexFormat,l=J.computeOptions(e,t._granularity,r,a,qt,Wt,oe),u=ie;if(a!==0||r!==0){let s=S.center(e,ae),h=n.geodeticSurfaceNormalCartographic(s,Ct);Lt.fromAxisAngle(h,-a,Ft),ft.fromQuaternion(Ft,u)}else ft.clone(ft.IDENTITY,u);let p=t._surfaceHeight,d=t._extrudedHeight,o=!W.equalsEpsilon(p,d,0,W.EPSILON2);l.lonScalar=1/t._rectangle.width,l.latScalar=1/t._rectangle.height,l.tangentRotationMatrix=u;let i,f;if(e=t._rectangle,o){i=ee(t,l);let s=st.fromRectangle3D(e,n,p,$t),h=st.fromRectangle3D(e,n,d,Kt);f=st.union(s,h)}else{if(i=It(t,l),i.attributes.position.values=Rt.scaleToGeodeticHeight(i.attributes.position.values,p,n,!1),$(t._offsetAttribute)){let s=i.attributes.position.values.length,h=t._offsetAttribute===ut.NONE?0:1,g=new Uint8Array(s/3).fill(h);i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}f=st.fromRectangle3D(e,n,p)}return c.position||delete i.attributes.position,new Pt({attributes:i.attributes,indices:i.indices,primitiveType:i.primitiveType,boundingSphere:f,offsetAttribute:t._offsetAttribute})};Q.createShadowVolume=function(t,e,n){let r=t._granularity,a=t._ellipsoid,c=e(r,a),l=n(r,a);return new Q({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:a,stRotation:t._stRotation,granularity:r,extrudedHeight:l,height:c,vertexFormat:X.POSITION_ONLY,shadowVolume:!0})};var vt=new S,se=[new G,new G,new G],re=new At,ce=new wt;function le(t){if(t._stRotation===0)return[0,0,0,1,1,0];let e=S.clone(t._rectangle,vt),n=t._granularity,r=t._ellipsoid,a=t._rotation-t._stRotation,c=Ht(e,n,a,r,vt),l=se;l[0].x=c.west,l[0].y=c.south,l[1].x=c.west,l[1].y=c.north,l[2].x=c.east,l[2].y=c.south;let u=t.rectangle,p=At.fromRotation(t._stRotation,re),d=S.center(u,ce);for(let h=0;h<3;++h){let g=l[h];g.x-=d.longitude,g.y-=d.latitude,At.multiplyByVector(p,g,g),g.x+=d.longitude,g.y+=d.latitude,g.x=(g.x-u.west)/u.width,g.y=(g.y-u.south)/u.height}let o=l[0],i=l[1],f=l[2],s=new Array(6);return G.pack(o,s),G.pack(i,s,2),G.pack(f,s,4),s}Object.defineProperties(Q.prototype,{rectangle:{get:function(){return $(this._rotatedRectangle)||(this._rotatedRectangle=Ht(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return $(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=le(this)),this._textureCoordinateRotationPoints}}});var Ot=Q;function fe(t,e){return $(e)&&(t=Ot.unpack(t,e)),t._ellipsoid=H.clone(t._ellipsoid),t._rectangle=S.clone(t._rectangle),Ot.createGeometry(t)}var Ye=fe;export{Ye as default}; +import{a as J}from"./chunk-OO23RBLX.js";import{a as Nt}from"./chunk-EFZKO5RU.js";import{a as zt}from"./chunk-QB3MDM4J.js";import"./chunk-ABGXSJNX.js";import"./chunk-DQO6B4EQ.js";import{a as ut}from"./chunk-ILGBPNP6.js";import{a as X}from"./chunk-HEEMUCG6.js";import{b as Rt}from"./chunk-O5IJ3OGP.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as yt}from"./chunk-P37AI2DW.js";import{a as Vt}from"./chunk-T6BE4RZK.js";import{b as Mt,c as Pt,d as q}from"./chunk-X5IHHI6X.js";import{d as st}from"./chunk-TMSETF7M.js";import{f as Lt,h as E,i as At}from"./chunk-7Z5IIKOJ.js";import{a as Y}from"./chunk-KZNJOCYU.js";import{a as _,b as wt,c as G,d as H,e as ft}from"./chunk-POASMU2N.js";import{a as W}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as L}from"./chunk-IUA6FAOZ.js";import{a as St,b as lt}from"./chunk-UH2WFNTA.js";import{e as $}from"./chunk-PEYJTJPE.js";var Tt=new _,Bt=new _,Ut=new _,Yt=new _,qt=new E,Zt=new G,Kt=new st,$t=new st;function Xt(t,e){let n=new Pt({attributes:new Vt,primitiveType:Mt.TRIANGLES});return n.attributes.position=new q({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}function Gt(t,e,n,r){let a=t.length,c=e.normal?new Float32Array(a):void 0,l=e.tangent?new Float32Array(a):void 0,u=e.bitangent?new Float32Array(a):void 0,d=0,p=Yt,o=Ut,i=Bt;if(e.normal||e.tangent||e.bitangent)for(let f=0;f<a;f+=3){let s=_.fromArray(t,f,Tt),h=d+1,g=d+2;i=n.geodeticSurfaceNormal(s,i),(e.tangent||e.bitangent)&&(_.cross(_.UNIT_Z,i,o),ft.multiplyByVector(r,o,o),_.normalize(o,o),e.bitangent&&_.normalize(_.cross(i,o,p),p)),e.normal&&(c[d]=i.x,c[h]=i.y,c[g]=i.z),e.tangent&&(l[d]=o.x,l[h]=o.y,l[g]=o.z),e.bitangent&&(u[d]=p.x,u[h]=p.y,u[g]=p.z),d+=3}return Xt(e,{positions:t,normals:c,tangents:l,bitangents:u})}var Ct=new _,jt=new _;function te(t,e,n){let r=t.length,a=e.normal?new Float32Array(r):void 0,c=e.tangent?new Float32Array(r):void 0,l=e.bitangent?new Float32Array(r):void 0,u=0,d=0,p=0,o=!0,i=Yt,f=Ut,s=Bt;if(e.normal||e.tangent||e.bitangent)for(let h=0;h<r;h+=6){let g=_.fromArray(t,h,Tt),A=_.fromArray(t,(h+6)%r,Ct);if(o){let b=_.fromArray(t,(h+3)%r,jt);_.subtract(A,g,A),_.subtract(b,g,b),s=_.normalize(_.cross(b,A,s),s),o=!1}_.equalsEpsilon(A,g,W.EPSILON10)&&(o=!0),(e.tangent||e.bitangent)&&(i=n.geodeticSurfaceNormal(g,i),e.tangent&&(f=_.normalize(_.cross(i,s,f),f))),e.normal&&(a[u++]=s.x,a[u++]=s.y,a[u++]=s.z,a[u++]=s.x,a[u++]=s.y,a[u++]=s.z),e.tangent&&(c[d++]=f.x,c[d++]=f.y,c[d++]=f.z,c[d++]=f.x,c[d++]=f.y,c[d++]=f.z),e.bitangent&&(l[p++]=i.x,l[p++]=i.y,l[p++]=i.z,l[p++]=i.x,l[p++]=i.y,l[p++]=i.z)}return Xt(e,{positions:t,normals:a,tangents:c,bitangents:l})}function It(t,e){let n=t._vertexFormat,r=t._ellipsoid,a=e.height,c=e.width,l=e.northCap,u=e.southCap,d=0,p=a,o=a,i=0;l&&(d=1,o-=1,i+=1),u&&(p-=1,o-=1,i+=1),i+=c*o;let f=n.position?new Float64Array(i*3):void 0,s=n.st?new Float32Array(i*2):void 0,h=0,g=0,A=Tt,b=Zt,z=Number.MAX_VALUE,F=Number.MAX_VALUE,j=-Number.MAX_VALUE,T=-Number.MAX_VALUE;for(let x=d;x<p;++x)for(let k=0;k<c;++k)J.computePosition(e,r,n.st,x,k,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y));if(l&&(J.computePosition(e,r,n.st,0,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=b.x,F=b.y,j=b.x,T=b.y)),u&&(J.computePosition(e,r,n.st,a-1,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h]=A.z,n.st&&(s[g++]=b.x,s[g]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y))),n.st&&(z<0||F<0||j>1||T>1))for(let x=0;x<s.length;x+=2)s[x]=(s[x]-z)/(j-z),s[x+1]=(s[x+1]-F)/(T-F);let m=Gt(f,n,r,e.tangentRotationMatrix),K=6*(c-1)*(o-1);l&&(K+=3*(c-1)),u&&(K+=3*(c-1));let P=yt.createTypedArray(i,K),D=0,N=0,O;for(O=0;O<o-1;++O){for(let x=0;x<c-1;++x){let k=D,M=k+c,I=M+1,rt=k+1;P[N++]=k,P[N++]=M,P[N++]=rt,P[N++]=rt,P[N++]=M,P[N++]=I,++D}++D}if(l||u){let x=i-1,k=i-1;l&&u&&(x=i-2);let M,I;if(D=0,l)for(O=0;O<c-1;O++)M=D,I=M+1,P[N++]=x,P[N++]=M,P[N++]=I,++D;if(u)for(D=(o-1)*c,O=0;O<c-1;O++)M=D,I=M+1,P[N++]=M,P[N++]=k,P[N++]=I,++D}return m.indices=P,n.st&&(m.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:s})),m}function ht(t,e,n,r,a){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n+2],t[e++]=a[n],t[e++]=a[n+1],t[e]=a[n+2],t}function dt(t,e,n,r){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n],t[e]=r[n+1],t}var Dt=new X;function ee(t,e){let n=t._shadowVolume,r=t._offsetAttribute,a=t._vertexFormat,c=t._extrudedHeight,l=t._surfaceHeight,u=t._ellipsoid,d=e.height,p=e.width,o;if(n){let R=X.clone(a,Dt);R.normal=!0,t._vertexFormat=R}let i=It(t,e);n&&(t._vertexFormat=a);let f=Rt.scaleToGeodeticHeight(i.attributes.position.values,l,u,!1);f=new Float64Array(f);let s=f.length,h=s*2,g=new Float64Array(h);g.set(f);let A=Rt.scaleToGeodeticHeight(i.attributes.position.values,c,u);g.set(A,s),i.attributes.position.values=g;let b=a.normal?new Float32Array(h):void 0,z=a.tangent?new Float32Array(h):void 0,F=a.bitangent?new Float32Array(h):void 0,j=a.st?new Float32Array(h/3*2):void 0,T,m;if(a.normal){for(m=i.attributes.normal.values,b.set(m),o=0;o<s;o++)m[o]=-m[o];b.set(m,s),i.attributes.normal.values=b}if(n){m=i.attributes.normal.values,a.normal||(i.attributes.normal=void 0);let R=new Float32Array(h);for(o=0;o<s;o++)m[o]=-m[o];R.set(m,s),i.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:R})}let K,P=$(r);if(P){let R=s/3*2,at=new Uint8Array(R);r===ut.TOP?at=at.fill(1,0,R/2):(K=r===ut.NONE?0:1,at=at.fill(K)),i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:at})}if(a.tangent){let R=i.attributes.tangent.values;for(z.set(R),o=0;o<s;o++)R[o]=-R[o];z.set(R,s),i.attributes.tangent.values=z}if(a.bitangent){let R=i.attributes.bitangent.values;F.set(R),F.set(R,s),i.attributes.bitangent.values=F}a.st&&(T=i.attributes.st.values,j.set(T),j.set(T,s/3*2),i.attributes.st.values=j);let D=i.indices,N=D.length,O=s/3,x=yt.createTypedArray(h/3,N*2);for(x.set(D),o=0;o<N;o+=3)x[o+N]=D[o+2]+O,x[o+1+N]=D[o+1]+O,x[o+2+N]=D[o]+O;i.indices=x;let k=e.northCap,M=e.southCap,I=d,rt=2,pt=0,xt=4,Et=4;k&&(rt-=1,I-=1,pt+=1,xt-=2,Et-=1),M&&(rt-=1,I-=1,pt+=1,xt-=2,Et-=1),pt+=rt*p+2*I-xt;let gt=(pt+Et)*2,C=new Float64Array(gt*3),S=n?new Float32Array(gt*3):void 0,Z=P?new Uint8Array(gt):void 0,V=a.st?new Float32Array(gt*2):void 0,et=r===ut.TOP;P&&!et&&(K=r===ut.ALL?1:0,Z=Z.fill(K));let v=0,B=0,y=0,U=0,nt=p*I,w;for(o=0;o<nt;o+=p)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(M){let R=k?nt+1:nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,R*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=nt-p;o<nt;o++)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);for(o=nt-1;o>0;o-=p)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(k){let R=nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,R*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=p-1;o>=0;o--)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);let ot=te(C,a,u);a.st&&(ot.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:V})),n&&(ot.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:S})),P&&(ot.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z}));let it=yt.createTypedArray(gt,pt*6),mt,_t,kt,bt;s=C.length/3;let ct=0;for(o=0;o<s-1;o+=2){mt=o,bt=(mt+2)%s;let R=_.fromArray(C,mt*3,Ct),at=_.fromArray(C,bt*3,jt);_.equalsEpsilon(R,at,W.EPSILON10)||(_t=(mt+1)%s,kt=(_t+2)%s,it[ct++]=mt,it[ct++]=_t,it[ct++]=bt,it[ct++]=bt,it[ct++]=_t,it[ct++]=kt)}return ot.indices=it,ot=zt.combineInstances([new Nt({geometry:i}),new Nt({geometry:ot})]),ot[0]}var ne=[new _,new _,new _,new _],Wt=new wt,oe=new wt;function Ht(t,e,n,r,a){if(n===0)return E.clone(t,a);let c=J.computeOptions(t,e,n,0,qt,Wt),l=c.height,u=c.width,d=ne;return J.computePosition(c,r,!1,0,0,d[0]),J.computePosition(c,r,!1,0,u-1,d[1]),J.computePosition(c,r,!1,l-1,0,d[2]),J.computePosition(c,r,!1,l-1,u-1,d[3]),E.fromCartesianArray(d,r,a)}function Q(t){t=L(t,L.EMPTY_OBJECT);let e=t.rectangle;if(lt.typeOf.object("rectangle",e),E.validate(e),e.north<e.south)throw new St("options.rectangle.north must be greater than or equal to options.rectangle.south");let n=L(t.height,0),r=L(t.extrudedHeight,n);this._rectangle=E.clone(e),this._granularity=L(t.granularity,W.RADIANS_PER_DEGREE),this._ellipsoid=H.clone(L(t.ellipsoid,H.default)),this._surfaceHeight=Math.max(n,r),this._rotation=L(t.rotation,0),this._stRotation=L(t.stRotation,0),this._vertexFormat=X.clone(L(t.vertexFormat,X.DEFAULT)),this._extrudedHeight=Math.min(n,r),this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=t.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Q.packedLength=E.packedLength+H.packedLength+X.packedLength+7;Q.pack=function(t,e,n){return lt.typeOf.object("value",t),lt.defined("array",e),n=L(n,0),E.pack(t._rectangle,e,n),n+=E.packedLength,H.pack(t._ellipsoid,e,n),n+=H.packedLength,X.pack(t._vertexFormat,e,n),n+=X.packedLength,e[n++]=t._granularity,e[n++]=t._surfaceHeight,e[n++]=t._rotation,e[n++]=t._stRotation,e[n++]=t._extrudedHeight,e[n++]=t._shadowVolume?1:0,e[n]=L(t._offsetAttribute,-1),e};var Jt=new E,Qt=H.clone(H.UNIT_SPHERE),tt={rectangle:Jt,ellipsoid:Qt,vertexFormat:Dt,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Q.unpack=function(t,e,n){lt.defined("array",t),e=L(e,0);let r=E.unpack(t,e,Jt);e+=E.packedLength;let a=H.unpack(t,e,Qt);e+=H.packedLength;let c=X.unpack(t,e,Dt);e+=X.packedLength;let l=t[e++],u=t[e++],d=t[e++],p=t[e++],o=t[e++],i=t[e++]===1,f=t[e];return $(n)?(n._rectangle=E.clone(r,n._rectangle),n._ellipsoid=H.clone(a,n._ellipsoid),n._vertexFormat=X.clone(c,n._vertexFormat),n._granularity=l,n._surfaceHeight=u,n._rotation=d,n._stRotation=p,n._extrudedHeight=o,n._shadowVolume=i,n._offsetAttribute=f===-1?void 0:f,n):(tt.granularity=l,tt.height=u,tt.rotation=d,tt.stRotation=p,tt.extrudedHeight=o,tt.shadowVolume=i,tt.offsetAttribute=f===-1?void 0:f,new Q(tt))};Q.computeRectangle=function(t,e){t=L(t,L.EMPTY_OBJECT);let n=t.rectangle;if(lt.typeOf.object("rectangle",n),E.validate(n),n.north<n.south)throw new St("options.rectangle.north must be greater than or equal to options.rectangle.south");let r=L(t.granularity,W.RADIANS_PER_DEGREE),a=L(t.ellipsoid,H.default),c=L(t.rotation,0);return Ht(n,r,c,a,e)};var ie=new ft,Ft=new Lt,ae=new wt;Q.createGeometry=function(t){if(W.equalsEpsilon(t._rectangle.north,t._rectangle.south,W.EPSILON10)||W.equalsEpsilon(t._rectangle.east,t._rectangle.west,W.EPSILON10))return;let e=t._rectangle,n=t._ellipsoid,r=t._rotation,a=t._stRotation,c=t._vertexFormat,l=J.computeOptions(e,t._granularity,r,a,qt,Wt,oe),u=ie;if(a!==0||r!==0){let s=E.center(e,ae),h=n.geodeticSurfaceNormalCartographic(s,Ct);Lt.fromAxisAngle(h,-a,Ft),ft.fromQuaternion(Ft,u)}else ft.clone(ft.IDENTITY,u);let d=t._surfaceHeight,p=t._extrudedHeight,o=!W.equalsEpsilon(d,p,0,W.EPSILON2);l.lonScalar=1/t._rectangle.width,l.latScalar=1/t._rectangle.height,l.tangentRotationMatrix=u;let i,f;if(e=t._rectangle,o){i=ee(t,l);let s=st.fromRectangle3D(e,n,d,$t),h=st.fromRectangle3D(e,n,p,Kt);f=st.union(s,h)}else{if(i=It(t,l),i.attributes.position.values=Rt.scaleToGeodeticHeight(i.attributes.position.values,d,n,!1),$(t._offsetAttribute)){let s=i.attributes.position.values.length,h=t._offsetAttribute===ut.NONE?0:1,g=new Uint8Array(s/3).fill(h);i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}f=st.fromRectangle3D(e,n,d)}return c.position||delete i.attributes.position,new Pt({attributes:i.attributes,indices:i.indices,primitiveType:i.primitiveType,boundingSphere:f,offsetAttribute:t._offsetAttribute})};Q.createShadowVolume=function(t,e,n){let r=t._granularity,a=t._ellipsoid,c=e(r,a),l=n(r,a);return new Q({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:a,stRotation:t._stRotation,granularity:r,extrudedHeight:l,height:c,vertexFormat:X.POSITION_ONLY,shadowVolume:!0})};var vt=new E,se=[new G,new G,new G],re=new At,ce=new wt;function le(t){if(t._stRotation===0)return[0,0,0,1,1,0];let e=E.clone(t._rectangle,vt),n=t._granularity,r=t._ellipsoid,a=t._rotation-t._stRotation,c=Ht(e,n,a,r,vt),l=se;l[0].x=c.west,l[0].y=c.south,l[1].x=c.west,l[1].y=c.north,l[2].x=c.east,l[2].y=c.south;let u=t.rectangle,d=At.fromRotation(t._stRotation,re),p=E.center(u,ce);for(let h=0;h<3;++h){let g=l[h];g.x-=p.longitude,g.y-=p.latitude,At.multiplyByVector(d,g,g),g.x+=p.longitude,g.y+=p.latitude,g.x=(g.x-u.west)/u.width,g.y=(g.y-u.south)/u.height}let o=l[0],i=l[1],f=l[2],s=new Array(6);return G.pack(o,s),G.pack(i,s,2),G.pack(f,s,4),s}Object.defineProperties(Q.prototype,{rectangle:{get:function(){return $(this._rotatedRectangle)||(this._rotatedRectangle=Ht(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return $(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=le(this)),this._textureCoordinateRotationPoints}}});var Ot=Q;function fe(t,e){return $(e)&&(t=Ot.unpack(t,e)),t._ellipsoid=H.clone(t._ellipsoid),t._rectangle=E.clone(t._rectangle),Ot.createGeometry(t)}var Ye=fe;export{Ye as default}; diff --git a/cesium/Workers/createRectangleOutlineGeometry.js b/cesium/Workers/createRectangleOutlineGeometry.js index 2a9c274..fb8bc38 100644 --- a/cesium/Workers/createRectangleOutlineGeometry.js +++ b/cesium/Workers/createRectangleOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as C}from"./chunk-FPY4GPIL.js";import{a as v}from"./chunk-WLRVP2UA.js";import{b as z}from"./chunk-LKPDAB55.js";import"./chunk-OSVMDAN4.js";import{a as O}from"./chunk-RQXB4B4V.js";import{a as Y}from"./chunk-MPVEZNKB.js";import{b as B,c as q,d as y}from"./chunk-FATK2EQ2.js";import{d as R}from"./chunk-3FEM743H.js";import{h as b}from"./chunk-CMXCDAKR.js";import{a as T}from"./chunk-77ESX6BV.js";import{a as U,b as M,d as w}from"./chunk-LJCGAQ64.js";import{a as P}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as E}from"./chunk-42NIXFVW.js";import{a as N}from"./chunk-5YVCOCPP.js";import{e as S}from"./chunk-U73D6PDD.js";var W=new R,j=new R,K=new U,Q=new b;function F(t,e){let i=t._ellipsoid,m=e.height,s=e.width,h=e.northCap,p=e.southCap,_=m,A=2,o=0,g=4;h&&(A-=1,_-=1,o+=1,g-=2),p&&(A-=1,_-=1,o+=1,g-=2),o+=A*s+2*_-g;let n=new Float64Array(o*3),l=0,f=0,a,r=K;if(h)C.computePosition(e,i,!1,f,0,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;else for(a=0;a<s;a++)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(a=s-1,f=1;f<m;f++)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;if(f=m-1,!p)for(a=s-2;a>=0;a--)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(a=0,f=m-2;f>0;f--)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;let u=n.length/3*2,c=O.createTypedArray(n.length/3,u),H=0;for(let D=0;D<n.length/3-1;D++)c[H++]=D,c[H++]=D+1;c[H++]=n.length/3-1,c[H++]=0;let d=new q({attributes:new Y,primitiveType:B.LINES});return d.attributes.position=new y({componentDatatype:T.DOUBLE,componentsPerAttribute:3,values:n}),d.indices=c,d}function X(t,e){let i=t._surfaceHeight,m=t._extrudedHeight,s=t._ellipsoid,h=F(t,e),p=e.height,_=e.width,A=z.scaleToGeodeticHeight(h.attributes.position.values,i,s,!1),o=A.length,g=new Float64Array(o*2);g.set(A);let n=z.scaleToGeodeticHeight(h.attributes.position.values,m,s);g.set(n,o),h.attributes.position.values=g;let l=e.northCap,f=e.southCap,a=4;l&&(a-=1),f&&(a-=1);let r=(g.length/3+a)*2,u=O.createTypedArray(g.length/3,r);o=g.length/6;let c=0;for(let d=0;d<o-1;d++)u[c++]=d,u[c++]=d+1,u[c++]=d+o,u[c++]=d+o+1;u[c++]=o-1,u[c++]=0,u[c++]=o+o-1,u[c++]=o,u[c++]=0,u[c++]=o;let H;if(l)H=p-1;else{let d=_-1;u[c++]=d,u[c++]=d+o,H=_+p-2}if(u[c++]=H,u[c++]=H+o,!f){let d=_+H-1;u[c++]=d,u[c]=d+o}return h.indices=u,h}function L(t){t=E(t,E.EMPTY_OBJECT);let e=t.rectangle,i=E(t.granularity,P.RADIANS_PER_DEGREE),m=E(t.ellipsoid,w.WGS84),s=E(t.rotation,0);if(!S(e))throw new N("rectangle is required.");if(b.validate(e),e.north<e.south)throw new N("options.rectangle.north must be greater than options.rectangle.south");let h=E(t.height,0),p=E(t.extrudedHeight,h);this._rectangle=b.clone(e),this._granularity=i,this._ellipsoid=m,this._surfaceHeight=Math.max(h,p),this._rotation=s,this._extrudedHeight=Math.min(h,p),this._offsetAttribute=t.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}L.packedLength=b.packedLength+w.packedLength+5;L.pack=function(t,e,i){if(!S(t))throw new N("value is required");if(!S(e))throw new N("array is required");return i=E(i,0),b.pack(t._rectangle,e,i),i+=b.packedLength,w.pack(t._ellipsoid,e,i),i+=w.packedLength,e[i++]=t._granularity,e[i++]=t._surfaceHeight,e[i++]=t._rotation,e[i++]=t._extrudedHeight,e[i]=E(t._offsetAttribute,-1),e};var V=new b,J=w.clone(w.UNIT_SPHERE),k={rectangle:V,ellipsoid:J,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};L.unpack=function(t,e,i){if(!S(t))throw new N("array is required");e=E(e,0);let m=b.unpack(t,e,V);e+=b.packedLength;let s=w.unpack(t,e,J);e+=w.packedLength;let h=t[e++],p=t[e++],_=t[e++],A=t[e++],o=t[e];return S(i)?(i._rectangle=b.clone(m,i._rectangle),i._ellipsoid=w.clone(s,i._ellipsoid),i._surfaceHeight=p,i._rotation=_,i._extrudedHeight=A,i._offsetAttribute=o===-1?void 0:o,i):(k.granularity=h,k.height=p,k.rotation=_,k.extrudedHeight=A,k.offsetAttribute=o===-1?void 0:o,new L(k))};var Z=new M;L.createGeometry=function(t){let e=t._rectangle,i=t._ellipsoid,m=C.computeOptions(e,t._granularity,t._rotation,0,Q,Z),s,h;if(P.equalsEpsilon(e.north,e.south,P.EPSILON10)||P.equalsEpsilon(e.east,e.west,P.EPSILON10))return;let p=t._surfaceHeight,_=t._extrudedHeight,A=!P.equalsEpsilon(p,_,0,P.EPSILON2),o;if(A){if(s=X(t,m),S(t._offsetAttribute)){let l=s.attributes.position.values.length/3,f=new Uint8Array(l);t._offsetAttribute===v.TOP?f=f.fill(1,0,l/2):(o=t._offsetAttribute===v.NONE?0:1,f=f.fill(o)),s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}let g=R.fromRectangle3D(e,i,p,j),n=R.fromRectangle3D(e,i,_,W);h=R.union(g,n)}else{if(s=F(t,m),s.attributes.position.values=z.scaleToGeodeticHeight(s.attributes.position.values,p,i,!1),S(t._offsetAttribute)){let g=s.attributes.position.values.length;o=t._offsetAttribute===v.NONE?0:1;let n=new Uint8Array(g/3).fill(o);s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}h=R.fromRectangle3D(e,i,p)}return new q({attributes:s.attributes,indices:s.indices,primitiveType:B.LINES,boundingSphere:h,offsetAttribute:t._offsetAttribute})};var x=L;function $(t,e){return S(e)&&(t=x.unpack(t,e)),t._ellipsoid=w.clone(t._ellipsoid),t._rectangle=b.clone(t._rectangle),x.createGeometry(t)}var Et=$;export{Et as default}; +import{a as C}from"./chunk-OO23RBLX.js";import{a as v}from"./chunk-ILGBPNP6.js";import{b as z}from"./chunk-O5IJ3OGP.js";import"./chunk-FYOYUPXG.js";import{a as O}from"./chunk-P37AI2DW.js";import{a as Y}from"./chunk-T6BE4RZK.js";import{b as B,c as q,d as y}from"./chunk-X5IHHI6X.js";import{d as R}from"./chunk-TMSETF7M.js";import{h as b}from"./chunk-7Z5IIKOJ.js";import{a as T}from"./chunk-KZNJOCYU.js";import{a as U,b as M,d as w}from"./chunk-POASMU2N.js";import{a as P}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as E}from"./chunk-IUA6FAOZ.js";import{a as N}from"./chunk-UH2WFNTA.js";import{e as S}from"./chunk-PEYJTJPE.js";var j=new R,K=new R,Q=new U,W=new b;function F(t,e){let i=t._ellipsoid,m=e.height,s=e.width,h=e.northCap,a=e.southCap,_=m,A=2,o=0,g=4;h&&(A-=1,_-=1,o+=1,g-=2),a&&(A-=1,_-=1,o+=1,g-=2),o+=A*s+2*_-g;let n=new Float64Array(o*3),l=0,f=0,p,r=Q;if(h)C.computePosition(e,i,!1,f,0,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;else for(p=0;p<s;p++)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(p=s-1,f=1;f<m;f++)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;if(f=m-1,!a)for(p=s-2;p>=0;p--)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(p=0,f=m-2;f>0;f--)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;let u=n.length/3*2,c=O.createTypedArray(n.length/3,u),H=0;for(let D=0;D<n.length/3-1;D++)c[H++]=D,c[H++]=D+1;c[H++]=n.length/3-1,c[H++]=0;let d=new q({attributes:new Y,primitiveType:B.LINES});return d.attributes.position=new y({componentDatatype:T.DOUBLE,componentsPerAttribute:3,values:n}),d.indices=c,d}function X(t,e){let i=t._surfaceHeight,m=t._extrudedHeight,s=t._ellipsoid,h=F(t,e),a=e.height,_=e.width,A=z.scaleToGeodeticHeight(h.attributes.position.values,i,s,!1),o=A.length,g=new Float64Array(o*2);g.set(A);let n=z.scaleToGeodeticHeight(h.attributes.position.values,m,s);g.set(n,o),h.attributes.position.values=g;let l=e.northCap,f=e.southCap,p=4;l&&(p-=1),f&&(p-=1);let r=(g.length/3+p)*2,u=O.createTypedArray(g.length/3,r);o=g.length/6;let c=0;for(let d=0;d<o-1;d++)u[c++]=d,u[c++]=d+1,u[c++]=d+o,u[c++]=d+o+1;u[c++]=o-1,u[c++]=0,u[c++]=o+o-1,u[c++]=o,u[c++]=0,u[c++]=o;let H;if(l)H=a-1;else{let d=_-1;u[c++]=d,u[c++]=d+o,H=_+a-2}if(u[c++]=H,u[c++]=H+o,!f){let d=_+H-1;u[c++]=d,u[c]=d+o}return h.indices=u,h}function L(t){t=E(t,E.EMPTY_OBJECT);let e=t.rectangle,i=E(t.granularity,P.RADIANS_PER_DEGREE),m=E(t.ellipsoid,w.default),s=E(t.rotation,0);if(!S(e))throw new N("rectangle is required.");if(b.validate(e),e.north<e.south)throw new N("options.rectangle.north must be greater than options.rectangle.south");let h=E(t.height,0),a=E(t.extrudedHeight,h);this._rectangle=b.clone(e),this._granularity=i,this._ellipsoid=m,this._surfaceHeight=Math.max(h,a),this._rotation=s,this._extrudedHeight=Math.min(h,a),this._offsetAttribute=t.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}L.packedLength=b.packedLength+w.packedLength+5;L.pack=function(t,e,i){if(!S(t))throw new N("value is required");if(!S(e))throw new N("array is required");return i=E(i,0),b.pack(t._rectangle,e,i),i+=b.packedLength,w.pack(t._ellipsoid,e,i),i+=w.packedLength,e[i++]=t._granularity,e[i++]=t._surfaceHeight,e[i++]=t._rotation,e[i++]=t._extrudedHeight,e[i]=E(t._offsetAttribute,-1),e};var V=new b,J=w.clone(w.UNIT_SPHERE),k={rectangle:V,ellipsoid:J,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};L.unpack=function(t,e,i){if(!S(t))throw new N("array is required");e=E(e,0);let m=b.unpack(t,e,V);e+=b.packedLength;let s=w.unpack(t,e,J);e+=w.packedLength;let h=t[e++],a=t[e++],_=t[e++],A=t[e++],o=t[e];return S(i)?(i._rectangle=b.clone(m,i._rectangle),i._ellipsoid=w.clone(s,i._ellipsoid),i._surfaceHeight=a,i._rotation=_,i._extrudedHeight=A,i._offsetAttribute=o===-1?void 0:o,i):(k.granularity=h,k.height=a,k.rotation=_,k.extrudedHeight=A,k.offsetAttribute=o===-1?void 0:o,new L(k))};var Z=new M;L.createGeometry=function(t){let e=t._rectangle,i=t._ellipsoid,m=C.computeOptions(e,t._granularity,t._rotation,0,W,Z),s,h;if(P.equalsEpsilon(e.north,e.south,P.EPSILON10)||P.equalsEpsilon(e.east,e.west,P.EPSILON10))return;let a=t._surfaceHeight,_=t._extrudedHeight,A=!P.equalsEpsilon(a,_,0,P.EPSILON2),o;if(A){if(s=X(t,m),S(t._offsetAttribute)){let l=s.attributes.position.values.length/3,f=new Uint8Array(l);t._offsetAttribute===v.TOP?f=f.fill(1,0,l/2):(o=t._offsetAttribute===v.NONE?0:1,f=f.fill(o)),s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}let g=R.fromRectangle3D(e,i,a,K),n=R.fromRectangle3D(e,i,_,j);h=R.union(g,n)}else{if(s=F(t,m),s.attributes.position.values=z.scaleToGeodeticHeight(s.attributes.position.values,a,i,!1),S(t._offsetAttribute)){let g=s.attributes.position.values.length;o=t._offsetAttribute===v.NONE?0:1;let n=new Uint8Array(g/3).fill(o);s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}h=R.fromRectangle3D(e,i,a)}return new q({attributes:s.attributes,indices:s.indices,primitiveType:B.LINES,boundingSphere:h,offsetAttribute:t._offsetAttribute})};var x=L;function $(t,e){return S(e)&&(t=x.unpack(t,e)),t._ellipsoid=w.clone(t._ellipsoid),t._rectangle=b.clone(t._rectangle),x.createGeometry(t)}var Et=$;export{Et as default}; diff --git a/cesium/Workers/createSimplePolylineGeometry.js b/cesium/Workers/createSimplePolylineGeometry.js index ba6952b..5a2537d 100644 --- a/cesium/Workers/createSimplePolylineGeometry.js +++ b/cesium/Workers/createSimplePolylineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as r}from"./chunk-L5JEMK3W.js";import{a as L}from"./chunk-EQCQ5LRI.js";import{a as E}from"./chunk-WIE5YNSS.js";import"./chunk-65DFAZKW.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as X}from"./chunk-RQXB4B4V.js";import{a as Q}from"./chunk-MPVEZNKB.js";import{b as j,c as K,d as Y}from"./chunk-FATK2EQ2.js";import{d as W}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as H}from"./chunk-77ESX6BV.js";import{a as k,d as b}from"./chunk-LJCGAQ64.js";import{a as q}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as w}from"./chunk-42NIXFVW.js";import{a as D}from"./chunk-5YVCOCPP.js";import{e as u}from"./chunk-U73D6PDD.js";function Z(t,e,o,i,s,c,p){let g=E.numberOfPoints(t,e,s),f,n=o.red,m=o.green,d=o.blue,T=o.alpha,l=i.red,h=i.green,y=i.blue,V=i.alpha;if(r.equals(o,i)){for(f=0;f<g;f++)c[p++]=r.floatToByte(n),c[p++]=r.floatToByte(m),c[p++]=r.floatToByte(d),c[p++]=r.floatToByte(T);return p}let M=(l-n)/g,C=(h-m)/g,G=(y-d)/g,_=(V-T)/g,a=p;for(f=0;f<g;f++)c[a++]=r.floatToByte(n+f*M),c[a++]=r.floatToByte(m+f*C),c[a++]=r.floatToByte(d+f*G),c[a++]=r.floatToByte(T+f*_);return a}function R(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.colors,i=w(t.colorsPerVertex,!1);if(!u(e)||e.length<2)throw new D("At least two positions are required.");if(u(o)&&(i&&o.length<e.length||!i&&o.length<e.length-1))throw new D("colors has an invalid length.");this._positions=e,this._colors=o,this._colorsPerVertex=i,this._arcType=w(t.arcType,L.GEODESIC),this._granularity=w(t.granularity,q.RADIANS_PER_DEGREE),this._ellipsoid=w(t.ellipsoid,b.WGS84),this._workerName="createSimplePolylineGeometry";let s=1+e.length*k.packedLength;s+=u(o)?1+o.length*r.packedLength:1,this.packedLength=s+b.packedLength+3}R.pack=function(t,e,o){if(!u(t))throw new D("value is required");if(!u(e))throw new D("array is required");o=w(o,0);let i,s=t._positions,c=s.length;for(e[o++]=c,i=0;i<c;++i,o+=k.packedLength)k.pack(s[i],e,o);let p=t._colors;for(c=u(p)?p.length:0,e[o++]=c,i=0;i<c;++i,o+=r.packedLength)r.pack(p[i],e,o);return b.pack(t._ellipsoid,e,o),o+=b.packedLength,e[o++]=t._colorsPerVertex?1:0,e[o++]=t._arcType,e[o]=t._granularity,e};R.unpack=function(t,e,o){if(!u(t))throw new D("array is required");e=w(e,0);let i,s=t[e++],c=new Array(s);for(i=0;i<s;++i,e+=k.packedLength)c[i]=k.unpack(t,e);s=t[e++];let p=s>0?new Array(s):void 0;for(i=0;i<s;++i,e+=r.packedLength)p[i]=r.unpack(t,e);let g=b.unpack(t,e);e+=b.packedLength;let f=t[e++]===1,n=t[e++],m=t[e];return u(o)?(o._positions=c,o._colors=p,o._ellipsoid=g,o._colorsPerVertex=f,o._arcType=n,o._granularity=m,o):new R({positions:c,colors:p,ellipsoid:g,colorsPerVertex:f,arcType:n,granularity:m})};var F=new Array(2),N=new Array(2),$={positions:F,height:N,ellipsoid:void 0,minDistance:void 0,granularity:void 0};R.createGeometry=function(t){let e=t._positions,o=t._colors,i=t._colorsPerVertex,s=t._arcType,c=t._granularity,p=t._ellipsoid,g=q.chordLength(c,p.maximumRadius),f=u(o)&&!i,n,m=e.length,d,T,l,h,y=0;if(s===L.GEODESIC||s===L.RHUMB){let _,a,P;s===L.GEODESIC?(_=q.chordLength(c,p.maximumRadius),a=E.numberOfPoints,P=E.generateArc):(_=c,a=E.numberOfPointsRhumbLine,P=E.generateRhumbArc);let v=E.extractHeights(e,p),B=$;if(s===L.GEODESIC?B.minDistance=g:B.granularity=c,B.ellipsoid=p,f){let A=0;for(n=0;n<m-1;n++)A+=a(e[n],e[n+1],_)+1;d=new Float64Array(A*3),l=new Uint8Array(A*4),B.positions=F,B.height=N;let S=0;for(n=0;n<m-1;++n){F[0]=e[n],F[1]=e[n+1],N[0]=v[n],N[1]=v[n+1];let O=P(B);if(u(o)){let z=O.length/3;h=o[n];for(let U=0;U<z;++U)l[S++]=r.floatToByte(h.red),l[S++]=r.floatToByte(h.green),l[S++]=r.floatToByte(h.blue),l[S++]=r.floatToByte(h.alpha)}d.set(O,y),y+=O.length}}else if(B.positions=e,B.height=v,d=new Float64Array(P(B)),u(o)){for(l=new Uint8Array(d.length/3*4),n=0;n<m-1;++n){let S=e[n],O=e[n+1],z=o[n],U=o[n+1];y=Z(S,O,z,U,g,l,y)}let A=o[m-1];l[y++]=r.floatToByte(A.red),l[y++]=r.floatToByte(A.green),l[y++]=r.floatToByte(A.blue),l[y++]=r.floatToByte(A.alpha)}}else{T=f?m*2-2:m,d=new Float64Array(T*3),l=u(o)?new Uint8Array(T*4):void 0;let _=0,a=0;for(n=0;n<m;++n){let P=e[n];if(f&&n>0&&(k.pack(P,d,_),_+=3,h=o[n-1],l[a++]=r.floatToByte(h.red),l[a++]=r.floatToByte(h.green),l[a++]=r.floatToByte(h.blue),l[a++]=r.floatToByte(h.alpha)),f&&n===m-1)break;k.pack(P,d,_),_+=3,u(o)&&(h=o[n],l[a++]=r.floatToByte(h.red),l[a++]=r.floatToByte(h.green),l[a++]=r.floatToByte(h.blue),l[a++]=r.floatToByte(h.alpha))}}let V=new Q;V.position=new Y({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:d}),u(o)&&(V.color=new Y({componentDatatype:H.UNSIGNED_BYTE,componentsPerAttribute:4,values:l,normalize:!0})),T=d.length/3;let M=(T-1)*2,C=X.createTypedArray(T,M),G=0;for(n=0;n<T-1;++n)C[G++]=n,C[G++]=n+1;return new K({attributes:V,indices:C,primitiveType:j.LINES,boundingSphere:W.fromPoints(e)})};var J=R;function x(t,e){return u(e)&&(t=J.unpack(t,e)),t._ellipsoid=b.clone(t._ellipsoid),J.createGeometry(t)}var _e=x;export{_e as default}; +import{a as r}from"./chunk-V7JEDBOE.js";import{a as S}from"./chunk-ATPDRNKI.js";import{a as E}from"./chunk-AMQUWUD4.js";import"./chunk-W23CU777.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as X}from"./chunk-P37AI2DW.js";import{a as W}from"./chunk-T6BE4RZK.js";import{b as K,c as Q,d as Y}from"./chunk-X5IHHI6X.js";import{d as j}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as H}from"./chunk-KZNJOCYU.js";import{a as k,d as b}from"./chunk-POASMU2N.js";import{a as q}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as w}from"./chunk-IUA6FAOZ.js";import{a as L}from"./chunk-UH2WFNTA.js";import{e as u}from"./chunk-PEYJTJPE.js";function Z(t,e,o,i,s,l,p){let g=E.numberOfPoints(t,e,s),f,n=o.red,m=o.green,d=o.blue,T=o.alpha,c=i.red,h=i.green,y=i.blue,V=i.alpha;if(r.equals(o,i)){for(f=0;f<g;f++)l[p++]=r.floatToByte(n),l[p++]=r.floatToByte(m),l[p++]=r.floatToByte(d),l[p++]=r.floatToByte(T);return p}let M=(c-n)/g,C=(h-m)/g,G=(y-d)/g,_=(V-T)/g,a=p;for(f=0;f<g;f++)l[a++]=r.floatToByte(n+f*M),l[a++]=r.floatToByte(m+f*C),l[a++]=r.floatToByte(d+f*G),l[a++]=r.floatToByte(T+f*_);return a}function R(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.colors,i=w(t.colorsPerVertex,!1);if(!u(e)||e.length<2)throw new L("At least two positions are required.");if(u(o)&&(i&&o.length<e.length||!i&&o.length<e.length-1))throw new L("colors has an invalid length.");this._positions=e,this._colors=o,this._colorsPerVertex=i,this._arcType=w(t.arcType,S.GEODESIC),this._granularity=w(t.granularity,q.RADIANS_PER_DEGREE),this._ellipsoid=w(t.ellipsoid,b.default),this._workerName="createSimplePolylineGeometry";let s=1+e.length*k.packedLength;s+=u(o)?1+o.length*r.packedLength:1,this.packedLength=s+b.packedLength+3}R.pack=function(t,e,o){if(!u(t))throw new L("value is required");if(!u(e))throw new L("array is required");o=w(o,0);let i,s=t._positions,l=s.length;for(e[o++]=l,i=0;i<l;++i,o+=k.packedLength)k.pack(s[i],e,o);let p=t._colors;for(l=u(p)?p.length:0,e[o++]=l,i=0;i<l;++i,o+=r.packedLength)r.pack(p[i],e,o);return b.pack(t._ellipsoid,e,o),o+=b.packedLength,e[o++]=t._colorsPerVertex?1:0,e[o++]=t._arcType,e[o]=t._granularity,e};R.unpack=function(t,e,o){if(!u(t))throw new L("array is required");e=w(e,0);let i,s=t[e++],l=new Array(s);for(i=0;i<s;++i,e+=k.packedLength)l[i]=k.unpack(t,e);s=t[e++];let p=s>0?new Array(s):void 0;for(i=0;i<s;++i,e+=r.packedLength)p[i]=r.unpack(t,e);let g=b.unpack(t,e);e+=b.packedLength;let f=t[e++]===1,n=t[e++],m=t[e];return u(o)?(o._positions=l,o._colors=p,o._ellipsoid=g,o._colorsPerVertex=f,o._arcType=n,o._granularity=m,o):new R({positions:l,colors:p,ellipsoid:g,colorsPerVertex:f,arcType:n,granularity:m})};var F=new Array(2),N=new Array(2),$={positions:F,height:N,ellipsoid:void 0,minDistance:void 0,granularity:void 0};R.createGeometry=function(t){let e=t._positions,o=t._colors,i=t._colorsPerVertex,s=t._arcType,l=t._granularity,p=t._ellipsoid,g=q.chordLength(l,p.maximumRadius),f=u(o)&&!i,n,m=e.length,d,T,c,h,y=0;if(s===S.GEODESIC||s===S.RHUMB){let _,a,P;s===S.GEODESIC?(_=q.chordLength(l,p.maximumRadius),a=E.numberOfPoints,P=E.generateArc):(_=l,a=E.numberOfPointsRhumbLine,P=E.generateRhumbArc);let v=E.extractHeights(e,p),B=$;if(s===S.GEODESIC?B.minDistance=g:B.granularity=l,B.ellipsoid=p,f){let A=0;for(n=0;n<m-1;n++)A+=a(e[n],e[n+1],_)+1;d=new Float64Array(A*3),c=new Uint8Array(A*4),B.positions=F,B.height=N;let D=0;for(n=0;n<m-1;++n){F[0]=e[n],F[1]=e[n+1],N[0]=v[n],N[1]=v[n+1];let O=P(B);if(u(o)){let z=O.length/3;h=o[n];for(let U=0;U<z;++U)c[D++]=r.floatToByte(h.red),c[D++]=r.floatToByte(h.green),c[D++]=r.floatToByte(h.blue),c[D++]=r.floatToByte(h.alpha)}d.set(O,y),y+=O.length}}else if(B.positions=e,B.height=v,d=new Float64Array(P(B)),u(o)){for(c=new Uint8Array(d.length/3*4),n=0;n<m-1;++n){let D=e[n],O=e[n+1],z=o[n],U=o[n+1];y=Z(D,O,z,U,g,c,y)}let A=o[m-1];c[y++]=r.floatToByte(A.red),c[y++]=r.floatToByte(A.green),c[y++]=r.floatToByte(A.blue),c[y++]=r.floatToByte(A.alpha)}}else{T=f?m*2-2:m,d=new Float64Array(T*3),c=u(o)?new Uint8Array(T*4):void 0;let _=0,a=0;for(n=0;n<m;++n){let P=e[n];if(f&&n>0&&(k.pack(P,d,_),_+=3,h=o[n-1],c[a++]=r.floatToByte(h.red),c[a++]=r.floatToByte(h.green),c[a++]=r.floatToByte(h.blue),c[a++]=r.floatToByte(h.alpha)),f&&n===m-1)break;k.pack(P,d,_),_+=3,u(o)&&(h=o[n],c[a++]=r.floatToByte(h.red),c[a++]=r.floatToByte(h.green),c[a++]=r.floatToByte(h.blue),c[a++]=r.floatToByte(h.alpha))}}let V=new W;V.position=new Y({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:d}),u(o)&&(V.color=new Y({componentDatatype:H.UNSIGNED_BYTE,componentsPerAttribute:4,values:c,normalize:!0})),T=d.length/3;let M=(T-1)*2,C=X.createTypedArray(T,M),G=0;for(n=0;n<T-1;++n)C[G++]=n,C[G++]=n+1;return new Q({attributes:V,indices:C,primitiveType:K.LINES,boundingSphere:j.fromPoints(e)})};var J=R;function x(t,e){return u(e)&&(t=J.unpack(t,e)),t._ellipsoid=b.clone(t._ellipsoid),J.createGeometry(t)}var _e=x;export{_e as default}; diff --git a/cesium/Workers/createSphereGeometry.js b/cesium/Workers/createSphereGeometry.js index ba9876c..4c3c83f 100644 --- a/cesium/Workers/createSphereGeometry.js +++ b/cesium/Workers/createSphereGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as r}from"./chunk-W6AEJFXB.js";import"./chunk-WLRVP2UA.js";import{a as m}from"./chunk-DUVNED7U.js";import"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as s}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as l}from"./chunk-42NIXFVW.js";import{b as p}from"./chunk-5YVCOCPP.js";import{e as c}from"./chunk-U73D6PDD.js";function n(e){let t=l(e.radius,1),o={radii:new s(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new r(o),this._workerName="createSphereGeometry"}n.packedLength=r.packedLength;n.pack=function(e,t,a){return p.typeOf.object("value",e),r.pack(e._ellipsoidGeometry,t,a)};var f=new r,i={radius:void 0,radii:new s,vertexFormat:new m,stackPartitions:void 0,slicePartitions:void 0};n.unpack=function(e,t,a){let o=r.unpack(e,t,f);return i.vertexFormat=m.clone(o._vertexFormat,i.vertexFormat),i.stackPartitions=o._stackPartitions,i.slicePartitions=o._slicePartitions,c(a)?(s.clone(o._radii,i.radii),a._ellipsoidGeometry=new r(i),a):(i.radius=o._radii.x,new n(i))};n.createGeometry=function(e){return r.createGeometry(e._ellipsoidGeometry)};var d=n;function u(e,t){return c(t)&&(e=d.unpack(e,t)),d.createGeometry(e)}var v=u;export{v as default}; +import{a as r}from"./chunk-TOGHF3VN.js";import"./chunk-ILGBPNP6.js";import{a as m}from"./chunk-HEEMUCG6.js";import"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as s}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as l}from"./chunk-IUA6FAOZ.js";import{b as p}from"./chunk-UH2WFNTA.js";import{e as c}from"./chunk-PEYJTJPE.js";function n(e){let t=l(e.radius,1),o={radii:new s(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new r(o),this._workerName="createSphereGeometry"}n.packedLength=r.packedLength;n.pack=function(e,t,a){return p.typeOf.object("value",e),r.pack(e._ellipsoidGeometry,t,a)};var f=new r,i={radius:void 0,radii:new s,vertexFormat:new m,stackPartitions:void 0,slicePartitions:void 0};n.unpack=function(e,t,a){let o=r.unpack(e,t,f);return i.vertexFormat=m.clone(o._vertexFormat,i.vertexFormat),i.stackPartitions=o._stackPartitions,i.slicePartitions=o._slicePartitions,c(a)?(s.clone(o._radii,i.radii),a._ellipsoidGeometry=new r(i),a):(i.radius=o._radii.x,new n(i))};n.createGeometry=function(e){return r.createGeometry(e._ellipsoidGeometry)};var d=n;function u(e,t){return c(t)&&(e=d.unpack(e,t)),d.createGeometry(e)}var v=u;export{v as default}; diff --git a/cesium/Workers/createSphereOutlineGeometry.js b/cesium/Workers/createSphereOutlineGeometry.js index e65c9ed..dfa54ed 100644 --- a/cesium/Workers/createSphereOutlineGeometry.js +++ b/cesium/Workers/createSphereOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as t}from"./chunk-TRGIYWHT.js";import"./chunk-WLRVP2UA.js";import"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as d}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as l}from"./chunk-42NIXFVW.js";import{b as u}from"./chunk-5YVCOCPP.js";import{e as a}from"./chunk-U73D6PDD.js";function s(i){let e=l(i.radius,1),r={radii:new d(e,e,e),stackPartitions:i.stackPartitions,slicePartitions:i.slicePartitions,subdivisions:i.subdivisions};this._ellipsoidGeometry=new t(r),this._workerName="createSphereOutlineGeometry"}s.packedLength=t.packedLength;s.pack=function(i,e,o){return u.typeOf.object("value",i),t.pack(i._ellipsoidGeometry,e,o)};var m=new t,n={radius:void 0,radii:new d,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};s.unpack=function(i,e,o){let r=t.unpack(i,e,m);return n.stackPartitions=r._stackPartitions,n.slicePartitions=r._slicePartitions,n.subdivisions=r._subdivisions,a(o)?(d.clone(r._radii,n.radii),o._ellipsoidGeometry=new t(n),o):(n.radius=r._radii.x,new s(n))};s.createGeometry=function(i){return t.createGeometry(i._ellipsoidGeometry)};var c=s;function p(i,e){return a(e)&&(i=c.unpack(i,e)),c.createGeometry(i)}var w=p;export{w as default}; +import{a as t}from"./chunk-KCIZBVXL.js";import"./chunk-ILGBPNP6.js";import"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as d}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as l}from"./chunk-IUA6FAOZ.js";import{b as u}from"./chunk-UH2WFNTA.js";import{e as a}from"./chunk-PEYJTJPE.js";function s(i){let e=l(i.radius,1),r={radii:new d(e,e,e),stackPartitions:i.stackPartitions,slicePartitions:i.slicePartitions,subdivisions:i.subdivisions};this._ellipsoidGeometry=new t(r),this._workerName="createSphereOutlineGeometry"}s.packedLength=t.packedLength;s.pack=function(i,e,o){return u.typeOf.object("value",i),t.pack(i._ellipsoidGeometry,e,o)};var m=new t,n={radius:void 0,radii:new d,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};s.unpack=function(i,e,o){let r=t.unpack(i,e,m);return n.stackPartitions=r._stackPartitions,n.slicePartitions=r._slicePartitions,n.subdivisions=r._subdivisions,a(o)?(d.clone(r._radii,n.radii),o._ellipsoidGeometry=new t(n),o):(n.radius=r._radii.x,new s(n))};s.createGeometry=function(i){return t.createGeometry(i._ellipsoidGeometry)};var c=s;function p(i,e){return a(e)&&(i=c.unpack(i,e)),c.createGeometry(i)}var w=p;export{w as default}; diff --git a/cesium/Workers/createTaskProcessorWorker.js b/cesium/Workers/createTaskProcessorWorker.js index 574733c..a74df54 100644 --- a/cesium/Workers/createTaskProcessorWorker.js +++ b/cesium/Workers/createTaskProcessorWorker.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a}from"./chunk-4FSMRIBR.js";import"./chunk-U73D6PDD.js";export{a as default}; +import{a}from"./chunk-PXCJYT2S.js";import"./chunk-PEYJTJPE.js";export{a as default}; diff --git a/cesium/Workers/createVectorTileClampedPolylines.js b/cesium/Workers/createVectorTileClampedPolylines.js index 6c71d04..df40833 100644 --- a/cesium/Workers/createVectorTileClampedPolylines.js +++ b/cesium/Workers/createVectorTileClampedPolylines.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as J}from"./chunk-4FSMRIBR.js";import{a as Y}from"./chunk-ED2EM7ZX.js";import{a as B}from"./chunk-RQXB4B4V.js";import{c as X,h as W}from"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as t,b as k,d as _}from"./chunk-LJCGAQ64.js";import{a as v}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import"./chunk-U73D6PDD.js";var V=32767,it=Math.cos(v.toRadians(150)),ct=new k,rt=new t;function at(e,o,c,i,s,A,h){let g=e.length,f=new Float64Array(g*3);for(let d=0;d<g;++d){let l=e[d],r=o[d],E=c[d],n=v.lerp(i.west,i.east,l/V),p=v.lerp(i.south,i.north,r/V),w=v.lerp(s,A,E/V),x=k.fromRadians(n,p,w,ct),P=h.cartographicToCartesian(x,rt);t.pack(P,f,d*3)}return f}function dt(e){let o=e.length,c=new Uint32Array(o+1),i=0;for(let s=0;s<o;++s)c[s]=i,i+=e[s];return c[o]=i,c}var lt=new k,ht=new k;function ft(e,o,c,i){let s=i.length,A=e.length,h=new Uint8Array(A),g=lt,f=ht,d=0;for(let r=0;r<s;r++){let E=i[r],n=E;for(let p=1;p<E;p++){let w=d+p,x=w-1;f.longitude=e[w],f.latitude=o[w],g.longitude=e[x],g.latitude=o[x],k.equals(f,g)&&(n--,h[x]=1)}i[r]=n,d+=E}let l=0;for(let r=0;r<A;r++)h[r]!==1&&(e[l]=e[r],o[l]=o[r],c[l]=c[r],l++)}function ot(e){let o=e*8,c=o*3,i=o*4;this.startEllipsoidNormals=new Float32Array(c),this.endEllipsoidNormals=new Float32Array(c),this.startPositionAndHeights=new Float32Array(i),this.startFaceNormalAndVertexCornerIds=new Float32Array(i),this.endPositionAndHeights=new Float32Array(i),this.endFaceNormalAndHalfWidths=new Float32Array(i),this.vertexBatchIds=new Uint16Array(o),this.indices=B.createTypedArray(o,36*e),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}var Q=new t,pt=new t;function $(e,o,c,i,s){let A=t.subtract(c,o,pt),h=t.subtract(o,e,Q);return t.normalize(A,A),t.normalize(h,h),t.dot(A,h)<it&&(h=t.multiplyByScalar(h,-1,Q)),t.add(A,h,s),t.equals(s,t.ZERO)&&(s=t.subtract(e,o)),t.cross(s,i,s),t.cross(i,s,s),t.normalize(s,s),s}var st=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],j=st.length,tt=new t,ut=new t,mt=new t,At=new t,Nt=new t;ot.prototype.addVolume=function(e,o,c,i,s,A,h,g,f,d){let l=t.add(o,f,tt),r=d.geodeticSurfaceNormal(l,ut);l=t.add(c,f,tt);let E=d.geodeticSurfaceNormal(l,At),n=$(e,o,c,r,mt),p=$(i,c,o,E,Nt),w=this.startEllipsoidNormals,x=this.endEllipsoidNormals,P=this.startPositionAndHeights,H=this.startFaceNormalAndVertexCornerIds,b=this.endPositionAndHeights,a=this.endFaceNormalAndHalfWidths,F=this.vertexBatchIds,m=this.batchIdOffset,I=this.vec3Offset,u=this.vec4Offset,N;for(N=0;N<8;N++)t.pack(r,w,I),t.pack(E,x,I),t.pack(o,P,u),P[u+3]=s,t.pack(c,b,u),b[u+3]=A,t.pack(n,H,u),H[u+3]=N,t.pack(p,a,u),a[u+3]=h,F[m++]=g,I+=3,u+=4;this.batchIdOffset=m,this.vec3Offset=I,this.vec4Offset=u;let C=this.indices,y=this.volumeStartIndex,z=this.indexOffset;for(N=0;N<j;N++)C[z+N]=st[N]+y;this.volumeStartIndex+=8,this.indexOffset+=j};var gt=new W,Et=new _,wt=new t,M=new t,It=new t,xt=new t,T=new t;function Pt(e,o){let c=new Uint16Array(e.positions),i=new Uint16Array(e.widths),s=new Uint32Array(e.counts),A=new Uint16Array(e.batchIds),h=gt,g=Et,f=wt,d=new Float64Array(e.packedBuffer),l=0,r=d[l++],E=d[l++];W.unpack(d,l,h),l+=W.packedLength,_.unpack(d,l,g),l+=_.packedLength,t.unpack(d,l,f);let n,p=c.length/3,w=c.subarray(0,p),x=c.subarray(p,2*p),P=c.subarray(2*p,3*p);Y.zigZagDeltaDecode(w,x,P),ft(w,x,P,s);let H=s.length,b=0;for(n=0;n<H;n++){let y=s[n];b+=y-1}let a=new ot(b),F=at(w,x,P,h,r,E,g,f);p=w.length;let m=new Float32Array(p*3);for(n=0;n<p;++n)m[n*3]=F[n*3]-f.x,m[n*3+1]=F[n*3+1]-f.y,m[n*3+2]=F[n*3+2]-f.z;let I=0,u=0;for(n=0;n<H;n++){let y=s[n]-1,z=i[n]*.5,et=A[n],q=I;for(let D=0;D<y;D++){let S=t.unpack(m,I,It),O=t.unpack(m,I+3,xt),G=P[u],Z=P[u+1];G=v.lerp(r,E,G/V),Z=v.lerp(r,E,Z/V),u++;let L=M,R=T;if(D===0){let U=q+y*3,K=t.unpack(m,U,M);if(t.equals(K,S))t.unpack(m,U-3,L);else{let nt=t.subtract(S,O,M);L=t.add(nt,S,M)}}else t.unpack(m,I-3,L);if(D===y-1){let U=t.unpack(m,q,T);if(t.equals(U,O))t.unpack(m,q+3,R);else{let K=t.subtract(O,S,T);R=t.add(K,O,T)}}else t.unpack(m,I+6,R);a.addVolume(L,S,O,R,G,Z,z,et,f,g),I+=3}I+=3,u++}let N=a.indices;o.push(a.startEllipsoidNormals.buffer),o.push(a.endEllipsoidNormals.buffer),o.push(a.startPositionAndHeights.buffer),o.push(a.startFaceNormalAndVertexCornerIds.buffer),o.push(a.endPositionAndHeights.buffer),o.push(a.endFaceNormalAndHalfWidths.buffer),o.push(a.vertexBatchIds.buffer),o.push(N.buffer);let C={indexDatatype:N.BYTES_PER_ELEMENT===2?B.UNSIGNED_SHORT:B.UNSIGNED_INT,startEllipsoidNormals:a.startEllipsoidNormals.buffer,endEllipsoidNormals:a.endEllipsoidNormals.buffer,startPositionAndHeights:a.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:a.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:a.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:a.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:a.vertexBatchIds.buffer,indices:N.buffer};if(e.keepDecodedPositions){let y=dt(s);o.push(F.buffer,y.buffer),C=X(C,{decodedPositions:F.buffer,decodedPositionOffsets:y.buffer})}return C}var Vt=J(Pt);export{Vt as default}; +import{a as J}from"./chunk-PXCJYT2S.js";import{a as Y}from"./chunk-ABGXSJNX.js";import{a as B}from"./chunk-P37AI2DW.js";import{c as X,h as W}from"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as t,b as k,d as _}from"./chunk-POASMU2N.js";import{a as v}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import"./chunk-PEYJTJPE.js";var V=32767,it=Math.cos(v.toRadians(150)),ct=new k,rt=new t;function at(e,o,c,i,s,A,h){let g=e.length,f=new Float64Array(g*3);for(let d=0;d<g;++d){let l=e[d],r=o[d],E=c[d],n=v.lerp(i.west,i.east,l/V),p=v.lerp(i.south,i.north,r/V),w=v.lerp(s,A,E/V),x=k.fromRadians(n,p,w,ct),P=h.cartographicToCartesian(x,rt);t.pack(P,f,d*3)}return f}function dt(e){let o=e.length,c=new Uint32Array(o+1),i=0;for(let s=0;s<o;++s)c[s]=i,i+=e[s];return c[o]=i,c}var lt=new k,ht=new k;function ft(e,o,c,i){let s=i.length,A=e.length,h=new Uint8Array(A),g=lt,f=ht,d=0;for(let r=0;r<s;r++){let E=i[r],n=E;for(let p=1;p<E;p++){let w=d+p,x=w-1;f.longitude=e[w],f.latitude=o[w],g.longitude=e[x],g.latitude=o[x],k.equals(f,g)&&(n--,h[x]=1)}i[r]=n,d+=E}let l=0;for(let r=0;r<A;r++)h[r]!==1&&(e[l]=e[r],o[l]=o[r],c[l]=c[r],l++)}function ot(e){let o=e*8,c=o*3,i=o*4;this.startEllipsoidNormals=new Float32Array(c),this.endEllipsoidNormals=new Float32Array(c),this.startPositionAndHeights=new Float32Array(i),this.startFaceNormalAndVertexCornerIds=new Float32Array(i),this.endPositionAndHeights=new Float32Array(i),this.endFaceNormalAndHalfWidths=new Float32Array(i),this.vertexBatchIds=new Uint16Array(o),this.indices=B.createTypedArray(o,36*e),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}var Q=new t,pt=new t;function $(e,o,c,i,s){let A=t.subtract(c,o,pt),h=t.subtract(o,e,Q);return t.normalize(A,A),t.normalize(h,h),t.dot(A,h)<it&&(h=t.multiplyByScalar(h,-1,Q)),t.add(A,h,s),t.equals(s,t.ZERO)&&(s=t.subtract(e,o)),t.cross(s,i,s),t.cross(i,s,s),t.normalize(s,s),s}var st=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],j=st.length,tt=new t,ut=new t,mt=new t,At=new t,Nt=new t;ot.prototype.addVolume=function(e,o,c,i,s,A,h,g,f,d){let l=t.add(o,f,tt),r=d.geodeticSurfaceNormal(l,ut);l=t.add(c,f,tt);let E=d.geodeticSurfaceNormal(l,At),n=$(e,o,c,r,mt),p=$(i,c,o,E,Nt),w=this.startEllipsoidNormals,x=this.endEllipsoidNormals,P=this.startPositionAndHeights,H=this.startFaceNormalAndVertexCornerIds,b=this.endPositionAndHeights,a=this.endFaceNormalAndHalfWidths,F=this.vertexBatchIds,m=this.batchIdOffset,I=this.vec3Offset,u=this.vec4Offset,N;for(N=0;N<8;N++)t.pack(r,w,I),t.pack(E,x,I),t.pack(o,P,u),P[u+3]=s,t.pack(c,b,u),b[u+3]=A,t.pack(n,H,u),H[u+3]=N,t.pack(p,a,u),a[u+3]=h,F[m++]=g,I+=3,u+=4;this.batchIdOffset=m,this.vec3Offset=I,this.vec4Offset=u;let C=this.indices,y=this.volumeStartIndex,z=this.indexOffset;for(N=0;N<j;N++)C[z+N]=st[N]+y;this.volumeStartIndex+=8,this.indexOffset+=j};var gt=new W,Et=new _,wt=new t,M=new t,It=new t,xt=new t,T=new t;function Pt(e,o){let c=new Uint16Array(e.positions),i=new Uint16Array(e.widths),s=new Uint32Array(e.counts),A=new Uint16Array(e.batchIds),h=gt,g=Et,f=wt,d=new Float64Array(e.packedBuffer),l=0,r=d[l++],E=d[l++];W.unpack(d,l,h),l+=W.packedLength,_.unpack(d,l,g),l+=_.packedLength,t.unpack(d,l,f);let n,p=c.length/3,w=c.subarray(0,p),x=c.subarray(p,2*p),P=c.subarray(2*p,3*p);Y.zigZagDeltaDecode(w,x,P),ft(w,x,P,s);let H=s.length,b=0;for(n=0;n<H;n++){let y=s[n];b+=y-1}let a=new ot(b),F=at(w,x,P,h,r,E,g,f);p=w.length;let m=new Float32Array(p*3);for(n=0;n<p;++n)m[n*3]=F[n*3]-f.x,m[n*3+1]=F[n*3+1]-f.y,m[n*3+2]=F[n*3+2]-f.z;let I=0,u=0;for(n=0;n<H;n++){let y=s[n]-1,z=i[n]*.5,et=A[n],q=I;for(let D=0;D<y;D++){let S=t.unpack(m,I,It),O=t.unpack(m,I+3,xt),G=P[u],Z=P[u+1];G=v.lerp(r,E,G/V),Z=v.lerp(r,E,Z/V),u++;let L=M,R=T;if(D===0){let U=q+y*3,K=t.unpack(m,U,M);if(t.equals(K,S))t.unpack(m,U-3,L);else{let nt=t.subtract(S,O,M);L=t.add(nt,S,M)}}else t.unpack(m,I-3,L);if(D===y-1){let U=t.unpack(m,q,T);if(t.equals(U,O))t.unpack(m,q+3,R);else{let K=t.subtract(O,S,T);R=t.add(K,O,T)}}else t.unpack(m,I+6,R);a.addVolume(L,S,O,R,G,Z,z,et,f,g),I+=3}I+=3,u++}let N=a.indices;o.push(a.startEllipsoidNormals.buffer),o.push(a.endEllipsoidNormals.buffer),o.push(a.startPositionAndHeights.buffer),o.push(a.startFaceNormalAndVertexCornerIds.buffer),o.push(a.endPositionAndHeights.buffer),o.push(a.endFaceNormalAndHalfWidths.buffer),o.push(a.vertexBatchIds.buffer),o.push(N.buffer);let C={indexDatatype:N.BYTES_PER_ELEMENT===2?B.UNSIGNED_SHORT:B.UNSIGNED_INT,startEllipsoidNormals:a.startEllipsoidNormals.buffer,endEllipsoidNormals:a.endEllipsoidNormals.buffer,startPositionAndHeights:a.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:a.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:a.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:a.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:a.vertexBatchIds.buffer,indices:N.buffer};if(e.keepDecodedPositions){let y=dt(s);o.push(F.buffer,y.buffer),C=X(C,{decodedPositions:F.buffer,decodedPositionOffsets:y.buffer})}return C}var Vt=J(Pt);export{Vt as default}; diff --git a/cesium/Workers/createVectorTileGeometries.js b/cesium/Workers/createVectorTileGeometries.js index 4c974f0..2c78c70 100644 --- a/cesium/Workers/createVectorTileGeometries.js +++ b/cesium/Workers/createVectorTileGeometries.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as P}from"./chunk-L5JEMK3W.js";import{a as z}from"./chunk-VVVZBARZ.js";import"./chunk-2TLJ26OO.js";import{a as H}from"./chunk-W6AEJFXB.js";import{a as Y}from"./chunk-4FSMRIBR.js";import{a as j}from"./chunk-X5DMAS4Q.js";import"./chunk-WLRVP2UA.js";import"./chunk-DUVNED7U.js";import{a as W}from"./chunk-RQXB4B4V.js";import"./chunk-MPVEZNKB.js";import"./chunk-FATK2EQ2.js";import{d as E}from"./chunk-3FEM743H.js";import{b as d}from"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as o}from"./chunk-LJCGAQ64.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import{e as l}from"./chunk-U73D6PDD.js";function X(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var J=X;var S=new o,$=d.packedLength+o.packedLength,ee=d.packedLength+2,ne=d.packedLength+o.packedLength,te=o.packedLength+1,u={modelMatrix:new d,boundingVolume:new E};function oe(e,c){let n=c*$,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=Math.sqrt(3),u}function ce(e,c){let n=c*ee,i=e[n++],r=e[n++],t=o.fromElements(i,i,r,S),s=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(s,t,s);let h=u.boundingVolume;return o.clone(o.ZERO,h.center),h.radius=Math.sqrt(2),u}function se(e,c){let n=c*ne,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=1,u}function ie(e,c){let n=c*te,i=e[n++],r=o.unpack(e,n,S),t=d.fromTranslation(r,u.modelMatrix);d.multiplyByUniformScale(t,i,t);let s=u.boundingVolume;return o.clone(o.ZERO,s.center),s.radius=1,u}var de=new o;function R(e,c,n,i,r){if(!l(c))return;let t=n.length,s=i.attributes.position.values,h=i.indices,a=e.positions,x=e.vertexBatchIds,y=e.indices,I=e.batchIds,p=e.batchTableColors,T=e.batchedIndices,U=e.indexOffsets,v=e.indexCounts,L=e.boundingVolumes,F=e.modelMatrix,Z=e.center,V=e.positionOffset,B=e.batchIdIndex,O=e.indexOffset,D=e.batchedIndicesOffset;for(let w=0;w<t;++w){let C=r(c,w),k=C.modelMatrix;d.multiply(F,k,k);let M=n[w],A=s.length;for(let f=0;f<A;f+=3){let m=o.unpack(s,f,de);d.multiplyByPoint(k,m,m),o.subtract(m,Z,m),o.pack(m,a,V*3+f),x[B++]=M}let b=h.length;for(let f=0;f<b;++f)y[O+f]=h[f]+V;let g=w+D;T[g]=new J({offset:O,count:b,color:P.fromRgba(p[M]),batchIds:[M]}),I[g]=M,U[g]=O,v[g]=b,L[g]=E.transform(C.boundingVolume,k),V+=A/3,O+=b}e.positionOffset=V,e.batchIdIndex=B,e.indexOffset=O,e.batchedIndicesOffset+=t}var K=new o,Q=new d;function re(e){let c=new Float64Array(e),n=0;o.unpack(c,n,K),n+=o.packedLength,d.unpack(c,n,Q)}function le(e){let c=e.length,n=0;for(let i=0;i<c;++i)n+=P.packedLength+3+e[i].batchIds.length;return n}function ae(e,c,n){let i=n.length,r=2+i*E.packedLength+1+le(c),t=new Float64Array(r),s=0;t[s++]=e,t[s++]=i;for(let a=0;a<i;++a)E.pack(n[a],t,s),s+=E.packedLength;let h=c.length;t[s++]=h;for(let a=0;a<h;++a){let x=c[a];P.pack(x.color,t,s),s+=P.packedLength,t[s++]=x.offset,t[s++]=x.count;let y=x.batchIds,I=y.length;t[s++]=I;for(let p=0;p<I;++p)t[s++]=y[p]}return t}function fe(e,c){let n=l(e.boxes)?new Float32Array(e.boxes):void 0,i=l(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,r=l(e.cylinders)?new Float32Array(e.cylinders):void 0,t=l(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,s=l(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,h=l(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,a=l(e.spheres)?new Float32Array(e.spheres):void 0,x=l(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,y=l(n)?i.length:0,I=l(r)?t.length:0,p=l(s)?h.length:0,T=l(a)?x.length:0,U=j.getUnitBox(),v=z.getUnitCylinder(),L=H.getUnitEllipsoid(),F=U.attributes.position.values,Z=v.attributes.position.values,V=L.attributes.position.values,B=F.length*y;B+=Z.length*I,B+=V.length*(p+T);let O=U.indices,D=v.indices,w=L.indices,C=O.length*y;C+=D.length*I,C+=w.length*(p+T);let k=new Float32Array(B),M=new Uint16Array(B/3),A=W.createTypedArray(B/3,C),b=y+I+p+T,g=new Uint16Array(b),f=new Array(b),m=new Uint32Array(b),q=new Uint32Array(b),_=new Array(b);re(e.packedBuffer);let G={batchTableColors:new Uint32Array(e.batchTableColors),positions:k,vertexBatchIds:M,indices:A,batchIds:g,batchedIndices:f,indexOffsets:m,indexCounts:q,boundingVolumes:_,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:Q,center:K};R(G,n,i,U,oe),R(G,r,t,v,ce),R(G,s,h,L,se),R(G,a,x,L,ie);let N=ae(A.BYTES_PER_ELEMENT,f,_);return c.push(k.buffer,M.buffer,A.buffer),c.push(g.buffer,m.buffer,q.buffer),c.push(N.buffer),{positions:k.buffer,vertexBatchIds:M.buffer,indices:A.buffer,indexOffsets:m.buffer,indexCounts:q.buffer,batchIds:g.buffer,packedBuffer:N.buffer}}var Oe=Y(fe);export{Oe as default}; +import{a as P}from"./chunk-V7JEDBOE.js";import{a as z}from"./chunk-IAC5XVZV.js";import"./chunk-GFN7NNSJ.js";import{a as H}from"./chunk-TOGHF3VN.js";import{a as Y}from"./chunk-PXCJYT2S.js";import{a as j}from"./chunk-VBIROZR5.js";import"./chunk-ILGBPNP6.js";import"./chunk-HEEMUCG6.js";import{a as W}from"./chunk-P37AI2DW.js";import"./chunk-T6BE4RZK.js";import"./chunk-X5IHHI6X.js";import{d as E}from"./chunk-TMSETF7M.js";import{b as d}from"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as o}from"./chunk-POASMU2N.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import{e as l}from"./chunk-PEYJTJPE.js";function X(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var J=X;var S=new o,$=d.packedLength+o.packedLength,ee=d.packedLength+2,ne=d.packedLength+o.packedLength,te=o.packedLength+1,u={modelMatrix:new d,boundingVolume:new E};function oe(e,c){let n=c*$,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=Math.sqrt(3),u}function ce(e,c){let n=c*ee,i=e[n++],r=e[n++],t=o.fromElements(i,i,r,S),s=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(s,t,s);let h=u.boundingVolume;return o.clone(o.ZERO,h.center),h.radius=Math.sqrt(2),u}function se(e,c){let n=c*ne,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=1,u}function ie(e,c){let n=c*te,i=e[n++],r=o.unpack(e,n,S),t=d.fromTranslation(r,u.modelMatrix);d.multiplyByUniformScale(t,i,t);let s=u.boundingVolume;return o.clone(o.ZERO,s.center),s.radius=1,u}var de=new o;function R(e,c,n,i,r){if(!l(c))return;let t=n.length,s=i.attributes.position.values,h=i.indices,a=e.positions,x=e.vertexBatchIds,y=e.indices,I=e.batchIds,p=e.batchTableColors,T=e.batchedIndices,U=e.indexOffsets,v=e.indexCounts,L=e.boundingVolumes,F=e.modelMatrix,Z=e.center,V=e.positionOffset,B=e.batchIdIndex,O=e.indexOffset,D=e.batchedIndicesOffset;for(let w=0;w<t;++w){let C=r(c,w),k=C.modelMatrix;d.multiply(F,k,k);let M=n[w],A=s.length;for(let f=0;f<A;f+=3){let m=o.unpack(s,f,de);d.multiplyByPoint(k,m,m),o.subtract(m,Z,m),o.pack(m,a,V*3+f),x[B++]=M}let b=h.length;for(let f=0;f<b;++f)y[O+f]=h[f]+V;let g=w+D;T[g]=new J({offset:O,count:b,color:P.fromRgba(p[M]),batchIds:[M]}),I[g]=M,U[g]=O,v[g]=b,L[g]=E.transform(C.boundingVolume,k),V+=A/3,O+=b}e.positionOffset=V,e.batchIdIndex=B,e.indexOffset=O,e.batchedIndicesOffset+=t}var K=new o,Q=new d;function re(e){let c=new Float64Array(e),n=0;o.unpack(c,n,K),n+=o.packedLength,d.unpack(c,n,Q)}function le(e){let c=e.length,n=0;for(let i=0;i<c;++i)n+=P.packedLength+3+e[i].batchIds.length;return n}function ae(e,c,n){let i=n.length,r=2+i*E.packedLength+1+le(c),t=new Float64Array(r),s=0;t[s++]=e,t[s++]=i;for(let a=0;a<i;++a)E.pack(n[a],t,s),s+=E.packedLength;let h=c.length;t[s++]=h;for(let a=0;a<h;++a){let x=c[a];P.pack(x.color,t,s),s+=P.packedLength,t[s++]=x.offset,t[s++]=x.count;let y=x.batchIds,I=y.length;t[s++]=I;for(let p=0;p<I;++p)t[s++]=y[p]}return t}function fe(e,c){let n=l(e.boxes)?new Float32Array(e.boxes):void 0,i=l(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,r=l(e.cylinders)?new Float32Array(e.cylinders):void 0,t=l(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,s=l(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,h=l(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,a=l(e.spheres)?new Float32Array(e.spheres):void 0,x=l(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,y=l(n)?i.length:0,I=l(r)?t.length:0,p=l(s)?h.length:0,T=l(a)?x.length:0,U=j.getUnitBox(),v=z.getUnitCylinder(),L=H.getUnitEllipsoid(),F=U.attributes.position.values,Z=v.attributes.position.values,V=L.attributes.position.values,B=F.length*y;B+=Z.length*I,B+=V.length*(p+T);let O=U.indices,D=v.indices,w=L.indices,C=O.length*y;C+=D.length*I,C+=w.length*(p+T);let k=new Float32Array(B),M=new Uint16Array(B/3),A=W.createTypedArray(B/3,C),b=y+I+p+T,g=new Uint16Array(b),f=new Array(b),m=new Uint32Array(b),q=new Uint32Array(b),_=new Array(b);re(e.packedBuffer);let G={batchTableColors:new Uint32Array(e.batchTableColors),positions:k,vertexBatchIds:M,indices:A,batchIds:g,batchedIndices:f,indexOffsets:m,indexCounts:q,boundingVolumes:_,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:Q,center:K};R(G,n,i,U,oe),R(G,r,t,v,ce),R(G,s,h,L,se),R(G,a,x,L,ie);let N=ae(A.BYTES_PER_ELEMENT,f,_);return c.push(k.buffer,M.buffer,A.buffer),c.push(g.buffer,m.buffer,q.buffer),c.push(N.buffer),{positions:k.buffer,vertexBatchIds:M.buffer,indices:A.buffer,indexOffsets:m.buffer,indexCounts:q.buffer,batchIds:g.buffer,packedBuffer:N.buffer}}var Oe=Y(fe);export{Oe as default}; diff --git a/cesium/Workers/createVectorTilePoints.js b/cesium/Workers/createVectorTilePoints.js index 31a4d0a..b091ddb 100644 --- a/cesium/Workers/createVectorTilePoints.js +++ b/cesium/Workers/createVectorTilePoints.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as x}from"./chunk-4FSMRIBR.js";import{a as w}from"./chunk-ED2EM7ZX.js";import{h as c}from"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as h,b as l,d as p}from"./chunk-LJCGAQ64.js";import{a as i}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import"./chunk-U73D6PDD.js";var u=32767,F=new l,L=new h,b=new c,y=new p,a={min:void 0,max:void 0};function V(t){t=new Float64Array(t);let o=0;a.min=t[o++],a.max=t[o++],c.unpack(t,o,b),o+=c.packedLength,p.unpack(t,o,y)}function z(t,o){let s=new Uint16Array(t.positions);V(t.packedBuffer);let e=b,C=y,A=a.min,P=a.max,n=s.length/3,f=s.subarray(0,n),g=s.subarray(n,2*n),d=s.subarray(2*n,3*n);w.zigZagDeltaDecode(f,g,d);let m=new Float64Array(s.length);for(let r=0;r<n;++r){let k=f[r],E=g[r],H=d[r],M=i.lerp(e.west,e.east,k/u),R=i.lerp(e.south,e.north,E/u),T=i.lerp(A,P,H/u),v=l.fromRadians(M,R,T,F),D=C.cartographicToCartesian(v,L);h.pack(D,m,r*3)}return o.push(m.buffer),{positions:m.buffer}}var G=x(z);export{G as default}; +import{a as x}from"./chunk-PXCJYT2S.js";import{a as w}from"./chunk-ABGXSJNX.js";import{h as c}from"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as h,b as l,d as p}from"./chunk-POASMU2N.js";import{a as i}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import"./chunk-PEYJTJPE.js";var u=32767,F=new l,L=new h,b=new c,y=new p,a={min:void 0,max:void 0};function V(t){t=new Float64Array(t);let o=0;a.min=t[o++],a.max=t[o++],c.unpack(t,o,b),o+=c.packedLength,p.unpack(t,o,y)}function z(t,o){let s=new Uint16Array(t.positions);V(t.packedBuffer);let e=b,C=y,A=a.min,P=a.max,n=s.length/3,f=s.subarray(0,n),g=s.subarray(n,2*n),d=s.subarray(2*n,3*n);w.zigZagDeltaDecode(f,g,d);let m=new Float64Array(s.length);for(let r=0;r<n;++r){let k=f[r],E=g[r],H=d[r],M=i.lerp(e.west,e.east,k/u),R=i.lerp(e.south,e.north,E/u),T=i.lerp(A,P,H/u),v=l.fromRadians(M,R,T,F),D=C.cartographicToCartesian(v,L);h.pack(D,m,r*3)}return o.push(m.buffer),{positions:m.buffer}}var G=x(z);export{G as default}; diff --git a/cesium/Workers/createVectorTilePolygons.js b/cesium/Workers/createVectorTilePolygons.js index 82d46f6..4e7f739 100644 --- a/cesium/Workers/createVectorTilePolygons.js +++ b/cesium/Workers/createVectorTilePolygons.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as R}from"./chunk-L5JEMK3W.js";import{a as It}from"./chunk-4FSMRIBR.js";import{a as M}from"./chunk-K62YE2WO.js";import{a as bt}from"./chunk-ED2EM7ZX.js";import"./chunk-TLL4Q2KI.js";import"./chunk-4IWHN7T4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as W}from"./chunk-RQXB4B4V.js";import"./chunk-3FEM743H.js";import{h as z}from"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as o,b as nt,d as j}from"./chunk-LJCGAQ64.js";import{a as et}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import{e as A}from"./chunk-U73D6PDD.js";var kt=new o,Bt=new j,Nt=new z,E={min:void 0,max:void 0,indexBytesPerElement:void 0};function Pt(s){let u=new Float64Array(s),n=0;E.indexBytesPerElement=u[n++],E.min=u[n++],E.max=u[n++],o.unpack(u,n,kt),n+=o.packedLength,j.unpack(u,n,Bt),n+=j.packedLength,z.unpack(u,n,Nt)}function Tt(s){let u=s.length,n=0;for(let y=0;y<u;++y)n+=R.packedLength+3+s[y].batchIds.length;return n}function Ct(s,u,n){let y=u.length,O=2+y*M.packedLength+1+Tt(n),c=new Float64Array(O),i=0;c[i++]=s,c[i++]=y;for(let x=0;x<y;++x)M.pack(u[x],c,i),i+=M.packedLength;let V=n.length;c[i++]=V;for(let x=0;x<V;++x){let B=n[x];R.pack(B.color,c,i),i+=R.packedLength,c[i++]=B.offset,c[i++]=B.count;let P=B.batchIds,w=P.length;c[i++]=w;for(let h=0;h<w;++h)c[i++]=P[h]}return c}var yt=32767,wt=new o,Ht=new o,St=new o,Ut=new o,Ft=new o,Lt=new nt,Mt=new z;function Rt(s,u){Pt(s.packedBuffer);let n;E.indexBytesPerElement===2?n=new Uint16Array(s.indices):n=new Uint32Array(s.indices);let O=new Uint16Array(s.positions),c=new Uint32Array(s.counts),i=new Uint32Array(s.indexCounts),V=new Uint32Array(s.batchIds),x=new Uint32Array(s.batchTableColors),B=new Array(c.length),P=kt,w=Bt,h=Nt,ot=E.min,st=E.max,T=s.minimumHeights,C=s.maximumHeights;A(T)&&A(C)&&(T=new Float32Array(T),C=new Float32Array(C));let t,f,l,N=O.length/2,ct=O.subarray(0,N),it=O.subarray(N,2*N);bt.zigZagDeltaDecode(ct,it);let rt=new Float64Array(N*3);for(t=0;t<N;++t){let e=ct[t],p=it[t],L=et.lerp(h.west,h.east,e/yt),k=et.lerp(h.south,h.north,p/yt),b=nt.fromRadians(L,k,0,Lt),Y=w.cartographicToCartesian(b,wt);o.pack(Y,rt,t*3)}let H=c.length,at=new Array(H),Z=new Array(H),ft=0,lt=0;for(t=0;t<H;++t)at[t]=ft,Z[t]=lt,ft+=c[t],lt+=i[t];let S=new Float32Array(N*3*2),_=new Uint16Array(N*2),D=new Uint32Array(Z.length),G=new Uint32Array(i.length),r=[],g={};for(t=0;t<H;++t)l=x[t],A(g[l])?(g[l].positionLength+=c[t],g[l].indexLength+=i[t],g[l].batchIds.push(t)):g[l]={positionLength:c[t],indexLength:i[t],offset:0,indexOffset:0,batchIds:[t]};let a,dt=0,ht=0;for(l in g)if(g.hasOwnProperty(l)){a=g[l],a.offset=dt,a.indexOffset=ht;let e=a.positionLength*2,p=a.indexLength*2+a.positionLength*6;dt+=e,ht+=p,a.indexLength=p}let U=[];for(l in g)g.hasOwnProperty(l)&&(a=g[l],U.push({color:R.fromRgba(parseInt(l)),offset:a.indexOffset,count:a.indexLength,batchIds:a.batchIds}));for(t=0;t<H;++t){l=x[t],a=g[l];let e=a.offset,p=e*3,L=e,k=at[t],b=c[t],Y=V[t],mt=ot,gt=st;A(T)&&A(C)&&(mt=T[t],gt=C[t]);let q=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,K=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY;for(f=0;f<b;++f){let m=o.unpack(rt,k*3+f*3,wt);w.scaleToGeodeticSurface(m,m);let I=w.cartesianToCartographic(m,Lt),F=I.latitude,pt=I.longitude;q=Math.min(F,q),J=Math.max(F,J),K=Math.min(pt,K),Q=Math.max(pt,Q);let xt=w.geodeticSurfaceNormal(m,Ht),v=o.multiplyByScalar(xt,mt,St),$=o.add(m,v,Ut);v=o.multiplyByScalar(xt,gt,v);let tt=o.add(m,v,Ft);o.subtract(tt,P,tt),o.subtract($,P,$),o.pack(tt,S,p),o.pack($,S,p+3),_[L]=Y,_[L+1]=Y,p+=6,L+=2}h=Mt,h.west=K,h.east=Q,h.south=q,h.north=J,B[t]=M.fromRectangle(h,ot,st,w);let d=a.indexOffset,X=Z[t],Ot=i[t];for(D[t]=d,f=0;f<Ot;f+=3){let m=n[X+f]-k,I=n[X+f+1]-k,F=n[X+f+2]-k;r[d++]=m*2+e,r[d++]=I*2+e,r[d++]=F*2+e,r[d++]=F*2+1+e,r[d++]=I*2+1+e,r[d++]=m*2+1+e}for(f=0;f<b;++f){let m=f,I=(f+1)%b;r[d++]=m*2+1+e,r[d++]=I*2+e,r[d++]=m*2+e,r[d++]=m*2+1+e,r[d++]=I*2+1+e,r[d++]=I*2+e}a.offset+=b*2,a.indexOffset=d,G[t]=d-D[t]}r=W.createTypedArray(S.length/3,r);let At=U.length;for(let e=0;e<At;++e){let p=U[e].batchIds,L=0,k=p.length;for(let b=0;b<k;++b)L+=G[p[b]];U[e].count=L}let Et=r.BYTES_PER_ELEMENT===2?W.UNSIGNED_SHORT:W.UNSIGNED_INT,ut=Ct(Et,B,U);return u.push(S.buffer,r.buffer,D.buffer,G.buffer,_.buffer,ut.buffer),{positions:S.buffer,indices:r.buffer,indexOffsets:D.buffer,indexCounts:G.buffer,batchIds:_.buffer,packedBuffer:ut.buffer}}var Jt=It(Rt);export{Jt as default}; +import{a as R}from"./chunk-V7JEDBOE.js";import{a as It}from"./chunk-PXCJYT2S.js";import{a as M}from"./chunk-Q6L7X3LP.js";import{a as bt}from"./chunk-ABGXSJNX.js";import"./chunk-KF5NF354.js";import"./chunk-4WRMLZA7.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as W}from"./chunk-P37AI2DW.js";import"./chunk-TMSETF7M.js";import{h as z}from"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as o,b as nt,d as j}from"./chunk-POASMU2N.js";import{a as et}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import{e as A}from"./chunk-PEYJTJPE.js";var kt=new o,Bt=new j,Nt=new z,E={min:void 0,max:void 0,indexBytesPerElement:void 0};function Pt(s){let u=new Float64Array(s),n=0;E.indexBytesPerElement=u[n++],E.min=u[n++],E.max=u[n++],o.unpack(u,n,kt),n+=o.packedLength,j.unpack(u,n,Bt),n+=j.packedLength,z.unpack(u,n,Nt)}function Tt(s){let u=s.length,n=0;for(let y=0;y<u;++y)n+=R.packedLength+3+s[y].batchIds.length;return n}function Ct(s,u,n){let y=u.length,O=2+y*M.packedLength+1+Tt(n),c=new Float64Array(O),i=0;c[i++]=s,c[i++]=y;for(let x=0;x<y;++x)M.pack(u[x],c,i),i+=M.packedLength;let V=n.length;c[i++]=V;for(let x=0;x<V;++x){let B=n[x];R.pack(B.color,c,i),i+=R.packedLength,c[i++]=B.offset,c[i++]=B.count;let P=B.batchIds,w=P.length;c[i++]=w;for(let h=0;h<w;++h)c[i++]=P[h]}return c}var yt=32767,wt=new o,Ht=new o,St=new o,Ut=new o,Ft=new o,Lt=new nt,Mt=new z;function Rt(s,u){Pt(s.packedBuffer);let n;E.indexBytesPerElement===2?n=new Uint16Array(s.indices):n=new Uint32Array(s.indices);let O=new Uint16Array(s.positions),c=new Uint32Array(s.counts),i=new Uint32Array(s.indexCounts),V=new Uint32Array(s.batchIds),x=new Uint32Array(s.batchTableColors),B=new Array(c.length),P=kt,w=Bt,h=Nt,ot=E.min,st=E.max,T=s.minimumHeights,C=s.maximumHeights;A(T)&&A(C)&&(T=new Float32Array(T),C=new Float32Array(C));let t,f,l,N=O.length/2,ct=O.subarray(0,N),it=O.subarray(N,2*N);bt.zigZagDeltaDecode(ct,it);let rt=new Float64Array(N*3);for(t=0;t<N;++t){let e=ct[t],p=it[t],L=et.lerp(h.west,h.east,e/yt),k=et.lerp(h.south,h.north,p/yt),b=nt.fromRadians(L,k,0,Lt),Y=w.cartographicToCartesian(b,wt);o.pack(Y,rt,t*3)}let H=c.length,at=new Array(H),Z=new Array(H),ft=0,lt=0;for(t=0;t<H;++t)at[t]=ft,Z[t]=lt,ft+=c[t],lt+=i[t];let S=new Float32Array(N*3*2),_=new Uint16Array(N*2),D=new Uint32Array(Z.length),G=new Uint32Array(i.length),r=[],g={};for(t=0;t<H;++t)l=x[t],A(g[l])?(g[l].positionLength+=c[t],g[l].indexLength+=i[t],g[l].batchIds.push(t)):g[l]={positionLength:c[t],indexLength:i[t],offset:0,indexOffset:0,batchIds:[t]};let a,dt=0,ht=0;for(l in g)if(g.hasOwnProperty(l)){a=g[l],a.offset=dt,a.indexOffset=ht;let e=a.positionLength*2,p=a.indexLength*2+a.positionLength*6;dt+=e,ht+=p,a.indexLength=p}let U=[];for(l in g)g.hasOwnProperty(l)&&(a=g[l],U.push({color:R.fromRgba(parseInt(l)),offset:a.indexOffset,count:a.indexLength,batchIds:a.batchIds}));for(t=0;t<H;++t){l=x[t],a=g[l];let e=a.offset,p=e*3,L=e,k=at[t],b=c[t],Y=V[t],mt=ot,gt=st;A(T)&&A(C)&&(mt=T[t],gt=C[t]);let q=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,K=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY;for(f=0;f<b;++f){let m=o.unpack(rt,k*3+f*3,wt);w.scaleToGeodeticSurface(m,m);let I=w.cartesianToCartographic(m,Lt),F=I.latitude,pt=I.longitude;q=Math.min(F,q),J=Math.max(F,J),K=Math.min(pt,K),Q=Math.max(pt,Q);let xt=w.geodeticSurfaceNormal(m,Ht),v=o.multiplyByScalar(xt,mt,St),$=o.add(m,v,Ut);v=o.multiplyByScalar(xt,gt,v);let tt=o.add(m,v,Ft);o.subtract(tt,P,tt),o.subtract($,P,$),o.pack(tt,S,p),o.pack($,S,p+3),_[L]=Y,_[L+1]=Y,p+=6,L+=2}h=Mt,h.west=K,h.east=Q,h.south=q,h.north=J,B[t]=M.fromRectangle(h,ot,st,w);let d=a.indexOffset,X=Z[t],Ot=i[t];for(D[t]=d,f=0;f<Ot;f+=3){let m=n[X+f]-k,I=n[X+f+1]-k,F=n[X+f+2]-k;r[d++]=m*2+e,r[d++]=I*2+e,r[d++]=F*2+e,r[d++]=F*2+1+e,r[d++]=I*2+1+e,r[d++]=m*2+1+e}for(f=0;f<b;++f){let m=f,I=(f+1)%b;r[d++]=m*2+1+e,r[d++]=I*2+e,r[d++]=m*2+e,r[d++]=m*2+1+e,r[d++]=I*2+1+e,r[d++]=I*2+e}a.offset+=b*2,a.indexOffset=d,G[t]=d-D[t]}r=W.createTypedArray(S.length/3,r);let At=U.length;for(let e=0;e<At;++e){let p=U[e].batchIds,L=0,k=p.length;for(let b=0;b<k;++b)L+=G[p[b]];U[e].count=L}let Et=r.BYTES_PER_ELEMENT===2?W.UNSIGNED_SHORT:W.UNSIGNED_INT,ut=Ct(Et,B,U);return u.push(S.buffer,r.buffer,D.buffer,G.buffer,_.buffer,ut.buffer),{positions:S.buffer,indices:r.buffer,indexOffsets:D.buffer,indexCounts:G.buffer,batchIds:_.buffer,packedBuffer:ut.buffer}}var Jt=It(Rt);export{Jt as default}; diff --git a/cesium/Workers/createVectorTilePolylines.js b/cesium/Workers/createVectorTilePolylines.js index 2321c47..cfea50b 100644 --- a/cesium/Workers/createVectorTilePolylines.js +++ b/cesium/Workers/createVectorTilePolylines.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as K}from"./chunk-4FSMRIBR.js";import{a as G}from"./chunk-ED2EM7ZX.js";import{a as S}from"./chunk-RQXB4B4V.js";import{c as B,h as R}from"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as t,b as _,d as L}from"./chunk-LJCGAQ64.js";import{a as F}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import"./chunk-U73D6PDD.js";var O=32767,ct=new _,rt=new t;function it(n,o,p,m,s){let d=n.length/3,U=n.subarray(0,d),v=n.subarray(d,2*d),P=n.subarray(2*d,3*d);G.zigZagDeltaDecode(U,v,P);let D=new Float64Array(n.length);for(let u=0;u<d;++u){let e=U[u],A=v[u],l=P[u],k=F.lerp(o.west,o.east,e/O),I=F.lerp(o.south,o.north,A/O),E=F.lerp(p,m,l/O),g=_.fromRadians(k,I,E,ct),C=s.cartographicToCartesian(g,rt);t.pack(C,D,u*3)}return D}var Y=it;var X=new R,$=new L,j=new t,H={min:void 0,max:void 0};function at(n){n=new Float64Array(n);let o=0;H.min=n[o++],H.max=n[o++],R.unpack(n,o,X),o+=R.packedLength,L.unpack(n,o,$),o+=L.packedLength,t.unpack(n,o,j)}function ft(n){let o=n.length,p=new Uint32Array(o+1),m=0;for(let s=0;s<o;++s)p[s]=m,m+=n[s];return p[o]=m,p}var Z=new t,q=new t,J=new t,dt=new t,Q=new t;function ut(n,o){let p=new Uint16Array(n.positions),m=new Uint16Array(n.widths),s=new Uint32Array(n.counts),d=new Uint16Array(n.batchIds);at(n.packedBuffer);let U=X,v=$,P=j,D=H.min,u=H.max,e=Y(p,U,D,u,v),A=e.length/3,l=A*4-4,k=new Float32Array(l*3),I=new Float32Array(l*3),E=new Float32Array(l*3),g=new Float32Array(l*2),C=new Uint16Array(l),N=0,z=0,tt=0,r,h=0,M=s.length;for(r=0;r<M;++r){let a=s[r],nt=m[r],ot=d[r];for(let f=0;f<a;++f){let w;if(f===0){let c=t.unpack(e,h*3,Z),T=t.unpack(e,(h+1)*3,q);w=t.subtract(c,T,J),t.add(c,w,w)}else w=t.unpack(e,(h+f-1)*3,J);let W=t.unpack(e,(h+f)*3,dt),x;if(f===a-1){let c=t.unpack(e,(h+a-1)*3,Z),T=t.unpack(e,(h+a-2)*3,q);x=t.subtract(c,T,Q),t.add(c,x,x)}else x=t.unpack(e,(h+f+1)*3,Q);t.subtract(w,P,w),t.subtract(W,P,W),t.subtract(x,P,x);let et=f===0?2:0,st=f===a-1?2:4;for(let c=et;c<st;++c){t.pack(W,k,N),t.pack(w,I,N),t.pack(x,E,N),N+=3;let T=c-2<0?-1:1;g[z++]=2*(c%2)-1,g[z++]=T*nt,C[tt++]=ot}}h+=a}let i=S.createTypedArray(l,A*6-6),b=0,y=0;for(M=A-1,r=0;r<M;++r)i[y++]=b,i[y++]=b+2,i[y++]=b+1,i[y++]=b+1,i[y++]=b+2,i[y++]=b+3,b+=4;o.push(k.buffer,I.buffer,E.buffer),o.push(g.buffer,C.buffer,i.buffer);let V={indexDatatype:i.BYTES_PER_ELEMENT===2?S.UNSIGNED_SHORT:S.UNSIGNED_INT,currentPositions:k.buffer,previousPositions:I.buffer,nextPositions:E.buffer,expandAndWidth:g.buffer,batchIds:C.buffer,indices:i.buffer};if(n.keepDecodedPositions){let a=ft(s);o.push(e.buffer,a.buffer),V=B(V,{decodedPositions:e.buffer,decodedPositionOffsets:a.buffer})}return V}var It=K(ut);export{It as default}; +import{a as K}from"./chunk-PXCJYT2S.js";import{a as G}from"./chunk-ABGXSJNX.js";import{a as S}from"./chunk-P37AI2DW.js";import{c as B,h as R}from"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as t,b as _,d as L}from"./chunk-POASMU2N.js";import{a as F}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import"./chunk-PEYJTJPE.js";var O=32767,ct=new _,rt=new t;function it(n,o,p,m,s){let d=n.length/3,U=n.subarray(0,d),v=n.subarray(d,2*d),P=n.subarray(2*d,3*d);G.zigZagDeltaDecode(U,v,P);let D=new Float64Array(n.length);for(let u=0;u<d;++u){let e=U[u],A=v[u],l=P[u],k=F.lerp(o.west,o.east,e/O),I=F.lerp(o.south,o.north,A/O),E=F.lerp(p,m,l/O),g=_.fromRadians(k,I,E,ct),C=s.cartographicToCartesian(g,rt);t.pack(C,D,u*3)}return D}var Y=it;var X=new R,$=new L,j=new t,H={min:void 0,max:void 0};function at(n){n=new Float64Array(n);let o=0;H.min=n[o++],H.max=n[o++],R.unpack(n,o,X),o+=R.packedLength,L.unpack(n,o,$),o+=L.packedLength,t.unpack(n,o,j)}function ft(n){let o=n.length,p=new Uint32Array(o+1),m=0;for(let s=0;s<o;++s)p[s]=m,m+=n[s];return p[o]=m,p}var Z=new t,q=new t,J=new t,dt=new t,Q=new t;function ut(n,o){let p=new Uint16Array(n.positions),m=new Uint16Array(n.widths),s=new Uint32Array(n.counts),d=new Uint16Array(n.batchIds);at(n.packedBuffer);let U=X,v=$,P=j,D=H.min,u=H.max,e=Y(p,U,D,u,v),A=e.length/3,l=A*4-4,k=new Float32Array(l*3),I=new Float32Array(l*3),E=new Float32Array(l*3),g=new Float32Array(l*2),C=new Uint16Array(l),N=0,z=0,tt=0,r,h=0,M=s.length;for(r=0;r<M;++r){let a=s[r],nt=m[r],ot=d[r];for(let f=0;f<a;++f){let w;if(f===0){let c=t.unpack(e,h*3,Z),T=t.unpack(e,(h+1)*3,q);w=t.subtract(c,T,J),t.add(c,w,w)}else w=t.unpack(e,(h+f-1)*3,J);let W=t.unpack(e,(h+f)*3,dt),x;if(f===a-1){let c=t.unpack(e,(h+a-1)*3,Z),T=t.unpack(e,(h+a-2)*3,q);x=t.subtract(c,T,Q),t.add(c,x,x)}else x=t.unpack(e,(h+f+1)*3,Q);t.subtract(w,P,w),t.subtract(W,P,W),t.subtract(x,P,x);let et=f===0?2:0,st=f===a-1?2:4;for(let c=et;c<st;++c){t.pack(W,k,N),t.pack(w,I,N),t.pack(x,E,N),N+=3;let T=c-2<0?-1:1;g[z++]=2*(c%2)-1,g[z++]=T*nt,C[tt++]=ot}}h+=a}let i=S.createTypedArray(l,A*6-6),b=0,y=0;for(M=A-1,r=0;r<M;++r)i[y++]=b,i[y++]=b+2,i[y++]=b+1,i[y++]=b+1,i[y++]=b+2,i[y++]=b+3,b+=4;o.push(k.buffer,I.buffer,E.buffer),o.push(g.buffer,C.buffer,i.buffer);let V={indexDatatype:i.BYTES_PER_ELEMENT===2?S.UNSIGNED_SHORT:S.UNSIGNED_INT,currentPositions:k.buffer,previousPositions:I.buffer,nextPositions:E.buffer,expandAndWidth:g.buffer,batchIds:C.buffer,indices:i.buffer};if(n.keepDecodedPositions){let a=ft(s);o.push(e.buffer,a.buffer),V=B(V,{decodedPositions:e.buffer,decodedPositionOffsets:a.buffer})}return V}var It=K(ut);export{It as default}; diff --git a/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js b/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js index ff8d7a3..cfb1eb7 100644 --- a/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +++ b/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as Gt,b as Xt}from"./chunk-XXATY55N.js";import{a as kt}from"./chunk-4FSMRIBR.js";import{a as lt}from"./chunk-7RBDS4IP.js";import{a as Dt}from"./chunk-K62YE2WO.js";import"./chunk-ED2EM7ZX.js";import"./chunk-TLL4Q2KI.js";import{a as qt}from"./chunk-4IWHN7T4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{d as Lt}from"./chunk-3FEM743H.js";import{b as $,g as Ot,h as zt}from"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as P,b as N,c as wt,d as Ht}from"./chunk-LJCGAQ64.js";import{a as r}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import{a as Vt}from"./chunk-IRDBGNMC.js";import{a as Ut}from"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import{e as ht}from"./chunk-U73D6PDD.js";var te=Uint16Array.BYTES_PER_ELEMENT,mt=Int32Array.BYTES_PER_ELEMENT,Pt=Uint32Array.BYTES_PER_ELEMENT,ee=Float32Array.BYTES_PER_ELEMENT,H=Float64Array.BYTES_PER_ELEMENT;function tt(n,l,e){e=Ut(e,r);let i=n.length;for(let c=0;c<i;++c)if(e.equalsEpsilon(n[c],l,r.EPSILON12))return c;return-1}function oe(n,l){n.ellipsoid=Ht.clone(n.ellipsoid),n.rectangle=zt.clone(n.rectangle);let e=se(n.buffer,n.relativeToCenter,n.ellipsoid,n.rectangle,n.nativeRectangle,n.exaggeration,n.exaggerationRelativeHeight,n.skirtHeight,n.includeWebMercatorT,n.negativeAltitudeExponentBias,n.negativeElevationThreshold),i=e.vertices;l.push(i.buffer);let c=e.indices;return l.push(c.buffer),{vertices:i.buffer,indices:c.buffer,numberOfAttributes:e.encoding.stride,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere3D:e.boundingSphere3D,orientedBoundingBox:e.orientedBoundingBox,occludeePointInScaledSpace:e.occludeePointInScaledSpace,encoding:e.encoding,vertexCountWithoutSkirts:e.vertexCountWithoutSkirts,indexCountWithoutSkirts:e.indexCountWithoutSkirts,westIndicesSouthToNorth:e.westIndicesSouthToNorth,southIndicesEastToWest:e.southIndicesEastToWest,eastIndicesNorthToSouth:e.eastIndicesNorthToSouth,northIndicesWestToEast:e.northIndicesWestToEast}}var u=new N,G=new P,ne=new P,ie=new P,re=new $;function se(n,l,e,i,c,et,m,ot,T,nt,it){let I,h,E,f,x,p;ht(i)?(I=i.west,h=i.south,E=i.east,f=i.north,x=i.width,p=i.height):(I=r.toRadians(c.west),h=r.toRadians(c.south),E=r.toRadians(c.east),f=r.toRadians(c.north),x=r.toRadians(i.width),p=r.toRadians(i.height));let X=[h,f],A=[I,E],V=Ot.eastNorthUpToFixedFrame(l,e),j=$.inverseTransformation(V,re),O,Q;T&&(O=lt.geodeticLatitudeToMercatorAngle(h),Q=1/(lt.geodeticLatitudeToMercatorAngle(f)-O));let y=et!==1,a=new DataView(n),z=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,b=ne;b.x=Number.POSITIVE_INFINITY,b.y=Number.POSITIVE_INFINITY,b.z=Number.POSITIVE_INFINITY;let M=ie;M.x=Number.NEGATIVE_INFINITY,M.y=Number.NEGATIVE_INFINITY,M.z=Number.NEGATIVE_INFINITY;let o=0,S=0,At=0,rt,L;for(L=0;L<4;++L){let t=o;rt=a.getUint32(t,!0),t+=Pt;let d=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(A,d)===-1&&A.push(d);let Y=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(X,Y)===-1&&X.push(Y),t+=2*H;let B=a.getInt32(t,!0);t+=mt,S+=B,B=a.getInt32(t,!0),At+=B*3,o+=rt+Pt}let yt=[],bt=[],g=new Array(S),R=new Array(S),_=new Array(S),C=T?new Array(S):[],F=y?new Array(S):[],v=new Array(At),k=[],st=[],ct=[],W=[],s=0,pt=0;for(o=0,L=0;L<4;++L){rt=a.getUint32(o,!0),o+=Pt;let t=o,d=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let Y=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let B=r.toRadians(a.getFloat64(o,!0)*180),Ft=B*.5;o+=H;let vt=r.toRadians(a.getFloat64(o,!0)*180),Wt=vt*.5;o+=H;let Yt=a.getInt32(o,!0);o+=mt;let Zt=a.getInt32(o,!0);o+=mt,o+=mt;let St=new Array(Yt);for(let U=0;U<Yt;++U){let Z=d+a.getUint8(o++)*B;u.longitude=Z;let D=Y+a.getUint8(o++)*vt;u.latitude=D;let w=a.getFloat32(o,!0);if(o+=ee,w!==0&&w<it&&(w*=-Math.pow(2,nt)),w*=6371010,u.height=w,tt(A,Z)!==-1||tt(X,D)!==-1){let dt=tt(yt,u,N);if(dt===-1)yt.push(N.clone(u)),bt.push(s);else{St[U]=bt[dt];continue}}St[U]=s,Math.abs(Z-I)<Ft?k.push({index:s,cartographic:N.clone(u)}):Math.abs(Z-E)<Ft?ct.push({index:s,cartographic:N.clone(u)}):Math.abs(D-h)<Wt?st.push({index:s,cartographic:N.clone(u)}):Math.abs(D-f)<Wt&&W.push({index:s,cartographic:N.clone(u)}),z=Math.min(w,z),J=Math.max(w,J),_[s]=w;let Nt=e.cartographicToCartesian(u);if(g[s]=Nt,T&&(C[s]=(lt.geodeticLatitudeToMercatorAngle(D)-O)*Q),y){let dt=e.geodeticSurfaceNormal(Nt);F[s]=dt}$.multiplyByPoint(j,Nt,G),P.minimumByComponent(G,b,b),P.maximumByComponent(G,M,M);let Tt=(Z-I)/(E-I);Tt=r.clamp(Tt,0,1);let Bt=(D-h)/(f-h);Bt=r.clamp(Bt,0,1),R[s]=new wt(Tt,Bt),++s}let $t=Zt*3;for(let U=0;U<$t;++U,++pt)v[pt]=St[a.getUint16(o,!0)],o+=te;if(rt!==o-t)throw new Vt("Invalid terrain tile.")}g.length=s,R.length=s,_.length=s,T&&(C.length=s),y&&(F.length=s);let Mt=s,jt=pt,K={hMin:z,lastBorderPoint:void 0,skirtHeight:ot,toENU:j,ellipsoid:e,minimum:b,maximum:M};k.sort(function(t,d){return d.cartographic.latitude-t.cartographic.latitude}),st.sort(function(t,d){return t.cartographic.longitude-d.cartographic.longitude}),ct.sort(function(t,d){return t.cartographic.latitude-d.cartographic.latitude}),W.sort(function(t,d){return d.cartographic.longitude-t.cartographic.longitude});let q=1e-5;if(gt(g,_,R,C,F,v,K,k,-q*x,!0,-q*p),gt(g,_,R,C,F,v,K,st,-q*p,!1),gt(g,_,R,C,F,v,K,ct,q*x,!0,q*p),gt(g,_,R,C,F,v,K,W,q*p,!1),k.length>0&&W.length>0){let t=k[0].index,d=Mt,Y=W[W.length-1].index,B=g.length-1;v.push(Y,B,d,d,t,Y)}S=g.length;let Qt=Lt.fromPoints(g),Rt;ht(i)&&(Rt=Dt.fromRectangle(i,z,J,e));let Jt=new Gt(e).computeHorizonCullingPointPossiblyUnderEllipsoid(l,g,z),Kt=new qt(b,M,l),It=new Xt(l,Kt,K.hMin,J,V,!1,T,y,et,m),_t=new Float32Array(S*It.stride),Ct=0;for(let t=0;t<S;++t)Ct=It.encode(_t,Ct,g[t],R[t],_[t],void 0,C[t],F[t]);let at=k.map(function(t){return t.index}).reverse(),Et=st.map(function(t){return t.index}).reverse(),ut=ct.map(function(t){return t.index}).reverse(),xt=W.map(function(t){return t.index}).reverse();return Et.unshift(ut[ut.length-1]),Et.push(at[0]),xt.unshift(at[at.length-1]),xt.push(ut[0]),{vertices:_t,indices:new Uint16Array(v),maximumHeight:J,minimumHeight:z,encoding:It,boundingSphere3D:Qt,orientedBoundingBox:Rt,occludeePointInScaledSpace:Jt,vertexCountWithoutSkirts:Mt,indexCountWithoutSkirts:jt,westIndicesSouthToNorth:at,southIndicesEastToWest:Et,eastIndicesNorthToSouth:ut,northIndicesWestToEast:xt}}function gt(n,l,e,i,c,et,m,ot,T,nt,it){let I=ot.length;for(let h=0;h<I;++h){let E=ot[h],f=E.cartographic,x=E.index,p=n.length,X=f.longitude,A=f.latitude;A=r.clamp(A,-r.PI_OVER_TWO,r.PI_OVER_TWO);let V=f.height-m.skirtHeight;m.hMin=Math.min(m.hMin,V),N.fromRadians(X,A,V,u),nt&&(u.longitude+=T),nt?h===I-1?u.latitude+=it:h===0&&(u.latitude-=it):u.latitude+=T;let j=m.ellipsoid.cartographicToCartesian(u);n.push(j),l.push(V),e.push(wt.clone(e[x])),i.length>0&&i.push(i[x]),c.length>0&&c.push(c[x]),$.multiplyByPoint(m.toENU,j,G);let O=m.minimum,Q=m.maximum;P.minimumByComponent(G,O,O),P.maximumByComponent(G,Q,Q);let ft=m.lastBorderPoint;if(ht(ft)){let y=ft.index;et.push(y,p-1,p,p,x,y)}m.lastBorderPoint=E}}var Ae=kt(oe);export{Ae as default}; +import{a as Gt,b as Xt}from"./chunk-CV7DLCWG.js";import{a as kt}from"./chunk-PXCJYT2S.js";import{a as lt}from"./chunk-SB224QGV.js";import{a as Dt}from"./chunk-Q6L7X3LP.js";import"./chunk-ABGXSJNX.js";import"./chunk-KF5NF354.js";import{a as qt}from"./chunk-4WRMLZA7.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{d as Lt}from"./chunk-TMSETF7M.js";import{b as $,g as Ot,h as zt}from"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as P,b as N,c as wt,d as Ht}from"./chunk-POASMU2N.js";import{a as r}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import{a as Vt}from"./chunk-II4VNKYR.js";import{a as Ut}from"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import{e as ht}from"./chunk-PEYJTJPE.js";var te=Uint16Array.BYTES_PER_ELEMENT,mt=Int32Array.BYTES_PER_ELEMENT,Pt=Uint32Array.BYTES_PER_ELEMENT,ee=Float32Array.BYTES_PER_ELEMENT,H=Float64Array.BYTES_PER_ELEMENT;function tt(n,l,e){e=Ut(e,r);let i=n.length;for(let c=0;c<i;++c)if(e.equalsEpsilon(n[c],l,r.EPSILON12))return c;return-1}function oe(n,l){n.ellipsoid=Ht.clone(n.ellipsoid),n.rectangle=zt.clone(n.rectangle);let e=se(n.buffer,n.relativeToCenter,n.ellipsoid,n.rectangle,n.nativeRectangle,n.exaggeration,n.exaggerationRelativeHeight,n.skirtHeight,n.includeWebMercatorT,n.negativeAltitudeExponentBias,n.negativeElevationThreshold),i=e.vertices;l.push(i.buffer);let c=e.indices;return l.push(c.buffer),{vertices:i.buffer,indices:c.buffer,numberOfAttributes:e.encoding.stride,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere3D:e.boundingSphere3D,orientedBoundingBox:e.orientedBoundingBox,occludeePointInScaledSpace:e.occludeePointInScaledSpace,encoding:e.encoding,vertexCountWithoutSkirts:e.vertexCountWithoutSkirts,indexCountWithoutSkirts:e.indexCountWithoutSkirts,westIndicesSouthToNorth:e.westIndicesSouthToNorth,southIndicesEastToWest:e.southIndicesEastToWest,eastIndicesNorthToSouth:e.eastIndicesNorthToSouth,northIndicesWestToEast:e.northIndicesWestToEast}}var u=new N,G=new P,ne=new P,ie=new P,re=new $;function se(n,l,e,i,c,et,m,ot,T,nt,it){let I,h,E,f,x,p;ht(i)?(I=i.west,h=i.south,E=i.east,f=i.north,x=i.width,p=i.height):(I=r.toRadians(c.west),h=r.toRadians(c.south),E=r.toRadians(c.east),f=r.toRadians(c.north),x=r.toRadians(i.width),p=r.toRadians(i.height));let X=[h,f],A=[I,E],V=Ot.eastNorthUpToFixedFrame(l,e),j=$.inverseTransformation(V,re),O,Q;T&&(O=lt.geodeticLatitudeToMercatorAngle(h),Q=1/(lt.geodeticLatitudeToMercatorAngle(f)-O));let y=et!==1,a=new DataView(n),z=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,b=ne;b.x=Number.POSITIVE_INFINITY,b.y=Number.POSITIVE_INFINITY,b.z=Number.POSITIVE_INFINITY;let M=ie;M.x=Number.NEGATIVE_INFINITY,M.y=Number.NEGATIVE_INFINITY,M.z=Number.NEGATIVE_INFINITY;let o=0,S=0,At=0,rt,L;for(L=0;L<4;++L){let t=o;rt=a.getUint32(t,!0),t+=Pt;let d=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(A,d)===-1&&A.push(d);let Y=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(X,Y)===-1&&X.push(Y),t+=2*H;let B=a.getInt32(t,!0);t+=mt,S+=B,B=a.getInt32(t,!0),At+=B*3,o+=rt+Pt}let yt=[],bt=[],g=new Array(S),R=new Array(S),_=new Array(S),C=T?new Array(S):[],F=y?new Array(S):[],v=new Array(At),k=[],st=[],ct=[],W=[],s=0,pt=0;for(o=0,L=0;L<4;++L){rt=a.getUint32(o,!0),o+=Pt;let t=o,d=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let Y=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let B=r.toRadians(a.getFloat64(o,!0)*180),Ft=B*.5;o+=H;let vt=r.toRadians(a.getFloat64(o,!0)*180),Wt=vt*.5;o+=H;let Yt=a.getInt32(o,!0);o+=mt;let Zt=a.getInt32(o,!0);o+=mt,o+=mt;let St=new Array(Yt);for(let U=0;U<Yt;++U){let Z=d+a.getUint8(o++)*B;u.longitude=Z;let D=Y+a.getUint8(o++)*vt;u.latitude=D;let w=a.getFloat32(o,!0);if(o+=ee,w!==0&&w<it&&(w*=-Math.pow(2,nt)),w*=6371010,u.height=w,tt(A,Z)!==-1||tt(X,D)!==-1){let dt=tt(yt,u,N);if(dt===-1)yt.push(N.clone(u)),bt.push(s);else{St[U]=bt[dt];continue}}St[U]=s,Math.abs(Z-I)<Ft?k.push({index:s,cartographic:N.clone(u)}):Math.abs(Z-E)<Ft?ct.push({index:s,cartographic:N.clone(u)}):Math.abs(D-h)<Wt?st.push({index:s,cartographic:N.clone(u)}):Math.abs(D-f)<Wt&&W.push({index:s,cartographic:N.clone(u)}),z=Math.min(w,z),J=Math.max(w,J),_[s]=w;let Nt=e.cartographicToCartesian(u);if(g[s]=Nt,T&&(C[s]=(lt.geodeticLatitudeToMercatorAngle(D)-O)*Q),y){let dt=e.geodeticSurfaceNormal(Nt);F[s]=dt}$.multiplyByPoint(j,Nt,G),P.minimumByComponent(G,b,b),P.maximumByComponent(G,M,M);let Tt=(Z-I)/(E-I);Tt=r.clamp(Tt,0,1);let Bt=(D-h)/(f-h);Bt=r.clamp(Bt,0,1),R[s]=new wt(Tt,Bt),++s}let $t=Zt*3;for(let U=0;U<$t;++U,++pt)v[pt]=St[a.getUint16(o,!0)],o+=te;if(rt!==o-t)throw new Vt("Invalid terrain tile.")}g.length=s,R.length=s,_.length=s,T&&(C.length=s),y&&(F.length=s);let Mt=s,jt=pt,K={hMin:z,lastBorderPoint:void 0,skirtHeight:ot,toENU:j,ellipsoid:e,minimum:b,maximum:M};k.sort(function(t,d){return d.cartographic.latitude-t.cartographic.latitude}),st.sort(function(t,d){return t.cartographic.longitude-d.cartographic.longitude}),ct.sort(function(t,d){return t.cartographic.latitude-d.cartographic.latitude}),W.sort(function(t,d){return d.cartographic.longitude-t.cartographic.longitude});let q=1e-5;if(gt(g,_,R,C,F,v,K,k,-q*x,!0,-q*p),gt(g,_,R,C,F,v,K,st,-q*p,!1),gt(g,_,R,C,F,v,K,ct,q*x,!0,q*p),gt(g,_,R,C,F,v,K,W,q*p,!1),k.length>0&&W.length>0){let t=k[0].index,d=Mt,Y=W[W.length-1].index,B=g.length-1;v.push(Y,B,d,d,t,Y)}S=g.length;let Qt=Lt.fromPoints(g),Rt;ht(i)&&(Rt=Dt.fromRectangle(i,z,J,e));let Jt=new Gt(e).computeHorizonCullingPointPossiblyUnderEllipsoid(l,g,z),Kt=new qt(b,M,l),It=new Xt(l,Kt,K.hMin,J,V,!1,T,y,et,m),_t=new Float32Array(S*It.stride),Ct=0;for(let t=0;t<S;++t)Ct=It.encode(_t,Ct,g[t],R[t],_[t],void 0,C[t],F[t]);let at=k.map(function(t){return t.index}).reverse(),Et=st.map(function(t){return t.index}).reverse(),ut=ct.map(function(t){return t.index}).reverse(),xt=W.map(function(t){return t.index}).reverse();return Et.unshift(ut[ut.length-1]),Et.push(at[0]),xt.unshift(at[at.length-1]),xt.push(ut[0]),{vertices:_t,indices:new Uint16Array(v),maximumHeight:J,minimumHeight:z,encoding:It,boundingSphere3D:Qt,orientedBoundingBox:Rt,occludeePointInScaledSpace:Jt,vertexCountWithoutSkirts:Mt,indexCountWithoutSkirts:jt,westIndicesSouthToNorth:at,southIndicesEastToWest:Et,eastIndicesNorthToSouth:ut,northIndicesWestToEast:xt}}function gt(n,l,e,i,c,et,m,ot,T,nt,it){let I=ot.length;for(let h=0;h<I;++h){let E=ot[h],f=E.cartographic,x=E.index,p=n.length,X=f.longitude,A=f.latitude;A=r.clamp(A,-r.PI_OVER_TWO,r.PI_OVER_TWO);let V=f.height-m.skirtHeight;m.hMin=Math.min(m.hMin,V),N.fromRadians(X,A,V,u),nt&&(u.longitude+=T),nt?h===I-1?u.latitude+=it:h===0&&(u.latitude-=it):u.latitude+=T;let j=m.ellipsoid.cartographicToCartesian(u);n.push(j),l.push(V),e.push(wt.clone(e[x])),i.length>0&&i.push(i[x]),c.length>0&&c.push(c[x]),$.multiplyByPoint(m.toENU,j,G);let O=m.minimum,Q=m.maximum;P.minimumByComponent(G,O,O),P.maximumByComponent(G,Q,Q);let ft=m.lastBorderPoint;if(ht(ft)){let y=ft.index;et.push(y,p-1,p,p,x,y)}m.lastBorderPoint=E}}var Ae=kt(oe);export{Ae as default}; diff --git a/cesium/Workers/createVerticesFromHeightmap.js b/cesium/Workers/createVerticesFromHeightmap.js index 6304ee4..9956d14 100644 --- a/cesium/Workers/createVerticesFromHeightmap.js +++ b/cesium/Workers/createVerticesFromHeightmap.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as sr,b as fr}from"./chunk-XXATY55N.js";import{a as tr}from"./chunk-4FSMRIBR.js";import{a as Ue}from"./chunk-7RBDS4IP.js";import{a as ar}from"./chunk-K62YE2WO.js";import"./chunk-ED2EM7ZX.js";import"./chunk-TLL4Q2KI.js";import{a as nr}from"./chunk-4IWHN7T4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{d as ir}from"./chunk-3FEM743H.js";import{b as xe,g as rr,h as ae}from"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as ie,c as er,d as Ie}from"./chunk-LJCGAQ64.js";import{a as ge}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import{a as He}from"./chunk-IRDBGNMC.js";import{a as Y}from"./chunk-42NIXFVW.js";import{a as he}from"./chunk-5YVCOCPP.js";import{c as Ir,d as xr,e as G}from"./chunk-U73D6PDD.js";var ur=Ir((qr,Te)=>{/* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */(function(){var D=function(){var A={};A.defaultNoDataValue=-34027999387901484e22,A.decode=function(r,a){a=a||{};var t=a.encodedMaskData||a.encodedMaskData===null,i=n(r,a.inputOffset||0,t),o=a.noDataValue!==null?a.noDataValue:A.defaultNoDataValue,s=V(i,a.pixelType||Float32Array,a.encodedMaskData,o,a.returnMask),u={width:i.width,height:i.height,pixelData:s.resultPixels,minValue:s.minValue,maxValue:i.pixels.maxValue,noDataValue:o};return s.resultMask&&(u.maskData=s.resultMask),a.returnEncodedMask&&i.mask&&(u.encodedMaskData=i.mask.bitset?i.mask.bitset:null),a.returnFileInfo&&(u.fileInfo=b(i),a.computeUsedBitDepths&&(u.fileInfo.bitDepths=X(i))),u};var V=function(r,a,t,i,o){var s=0,u=r.pixels.numBlocksX,m=r.pixels.numBlocksY,l=Math.floor(r.width/u),f=Math.floor(r.height/m),h=2*r.maxZError,c=Number.MAX_VALUE,g;t=t||(r.mask?r.mask.bitset:null);var v,U;v=new a(r.width*r.height),o&&t&&(U=new Uint8Array(r.width*r.height));for(var M=new Float32Array(l*f),S,I,k=0;k<=m;k++){var w=k!==m?f:r.height%m;if(w!==0)for(var d=0;d<=u;d++){var x=d!==u?l:r.width%u;if(x!==0){var T=k*r.width*f+d*l,y=r.width-x,p=r.pixels.blocks[s],L,B,E;p.encoding<2?(p.encoding===0?L=p.rawData:(e(p.stuffedData,p.bitsPerPixel,p.numValidPixels,p.offset,h,M,r.pixels.maxValue),L=M),B=0):p.encoding===2?E=0:E=p.offset;var O;if(t)for(I=0;I<w;I++){for(T&7&&(O=t[T>>3],O<<=T&7),S=0;S<x;S++)T&7||(O=t[T>>3]),O&128?(U&&(U[T]=1),g=p.encoding<2?L[B++]:E,c=c>g?g:c,v[T++]=g):(U&&(U[T]=0),v[T++]=i),O<<=1;T+=y}else if(p.encoding<2)for(I=0;I<w;I++){for(S=0;S<x;S++)g=L[B++],c=c>g?g:c,v[T++]=g;T+=y}else for(c=c>E?E:c,I=0;I<w;I++){for(S=0;S<x;S++)v[T++]=E;T+=y}if(p.encoding===1&&B!==p.numValidPixels)throw"Block and Mask do not match";s++}}}return{resultPixels:v,resultMask:U,minValue:c}},b=function(r){return{fileIdentifierString:r.fileIdentifierString,fileVersion:r.fileVersion,imageType:r.imageType,height:r.height,width:r.width,maxZError:r.maxZError,eofOffset:r.eofOffset,mask:r.mask?{numBlocksX:r.mask.numBlocksX,numBlocksY:r.mask.numBlocksY,numBytes:r.mask.numBytes,maxValue:r.mask.maxValue}:null,pixels:{numBlocksX:r.pixels.numBlocksX,numBlocksY:r.pixels.numBlocksY,numBytes:r.pixels.numBytes,maxValue:r.pixels.maxValue,noDataValue:r.noDataValue}}},X=function(r){for(var a=r.pixels.numBlocksX*r.pixels.numBlocksY,t={},i=0;i<a;i++){var o=r.pixels.blocks[i];o.encoding===0?t.float32=!0:o.encoding===1?t[o.bitsPerPixel]=!0:t[0]=!0}return Object.keys(t)},n=function(r,a,t){var i={},o=new Uint8Array(r,a,10);if(i.fileIdentifierString=String.fromCharCode.apply(null,o),i.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+i.fileIdentifierString;a+=10;var s=new DataView(r,a,24);if(i.fileVersion=s.getInt32(0,!0),i.imageType=s.getInt32(4,!0),i.height=s.getUint32(8,!0),i.width=s.getUint32(12,!0),i.maxZError=s.getFloat64(16,!0),a+=24,!t)if(s=new DataView(r,a,16),i.mask={},i.mask.numBlocksY=s.getUint32(0,!0),i.mask.numBlocksX=s.getUint32(4,!0),i.mask.numBytes=s.getUint32(8,!0),i.mask.maxValue=s.getFloat32(12,!0),a+=16,i.mask.numBytes>0){var u=new Uint8Array(Math.ceil(i.width*i.height/8));s=new DataView(r,a,i.mask.numBytes);var m=s.getInt16(0,!0),l=2,f=0;do{if(m>0)for(;m--;)u[f++]=s.getUint8(l++);else{var h=s.getUint8(l++);for(m=-m;m--;)u[f++]=h}m=s.getInt16(l,!0),l+=2}while(l<i.mask.numBytes);if(m!==-32768||f<u.length)throw"Unexpected end of mask RLE encoding";i.mask.bitset=u,a+=i.mask.numBytes}else i.mask.numBytes|i.mask.numBlocksY|i.mask.maxValue||(i.mask.bitset=new Uint8Array(Math.ceil(i.width*i.height/8)));s=new DataView(r,a,16),i.pixels={},i.pixels.numBlocksY=s.getUint32(0,!0),i.pixels.numBlocksX=s.getUint32(4,!0),i.pixels.numBytes=s.getUint32(8,!0),i.pixels.maxValue=s.getFloat32(12,!0),a+=16;var c=i.pixels.numBlocksX,g=i.pixels.numBlocksY,v=c+(i.width%c>0?1:0),U=g+(i.height%g>0?1:0);i.pixels.blocks=new Array(v*U);for(var M=0,S=0;S<U;S++)for(var I=0;I<v;I++){var k=0,w=r.byteLength-a;s=new DataView(r,a,Math.min(10,w));var d={};i.pixels.blocks[M++]=d;var x=s.getUint8(0);if(k++,d.encoding=x&63,d.encoding>3)throw"Invalid block encoding ("+d.encoding+")";if(d.encoding===2){a++;continue}if(x!==0&&x!==2){if(x>>=6,d.offsetType=x,x===2)d.offset=s.getInt8(1),k++;else if(x===1)d.offset=s.getInt16(1,!0),k+=2;else if(x===0)d.offset=s.getFloat32(1,!0),k+=4;else throw"Invalid block offset type";if(d.encoding===1)if(x=s.getUint8(k),k++,d.bitsPerPixel=x&63,x>>=6,d.numValidPixelsType=x,x===2)d.numValidPixels=s.getUint8(k),k++;else if(x===1)d.numValidPixels=s.getUint16(k,!0),k+=2;else if(x===0)d.numValidPixels=s.getUint32(k,!0),k+=4;else throw"Invalid valid pixel count type"}if(a+=k,d.encoding!==3){var T,y;if(d.encoding===0){var p=(i.pixels.numBytes-1)/4;if(p!==Math.floor(p))throw"uncompressed block has invalid length";T=new ArrayBuffer(p*4),y=new Uint8Array(T),y.set(new Uint8Array(r,a,p*4));var L=new Float32Array(T);d.rawData=L,a+=p*4}else if(d.encoding===1){var B=Math.ceil(d.numValidPixels*d.bitsPerPixel/8),E=Math.ceil(B/4);T=new ArrayBuffer(E*4),y=new Uint8Array(T),y.set(new Uint8Array(r,a,B)),d.stuffedData=new Uint32Array(T),a+=B}}}return i.eofOffset=a,i},e=function(r,a,t,i,o,s,u){var m=(1<<a)-1,l=0,f,h=0,c,g,v=Math.ceil((u-i)/o),U=r.length*4-Math.ceil(a*t/8);for(r[r.length-1]<<=8*U,f=0;f<t;f++){if(h===0&&(g=r[l++],h=32),h>=a)c=g>>>h-a&m,h-=a;else{var M=a-h;c=(g&m)<<M&m,g=r[l++],h=32-M,c+=g>>>h}s[f]=c<v?i+c*o:u}return s};return A}(),se=function(){"use strict";var A={unstuff:function(n,e,r,a,t,i,o,s){var u=(1<<r)-1,m=0,l,f=0,h,c,g,v,U=n.length*4-Math.ceil(r*a/8);if(n[n.length-1]<<=8*U,t)for(l=0;l<a;l++)f===0&&(c=n[m++],f=32),f>=r?(h=c>>>f-r&u,f-=r):(g=r-f,h=(c&u)<<g&u,c=n[m++],f=32-g,h+=c>>>f),e[l]=t[h];else for(v=Math.ceil((s-i)/o),l=0;l<a;l++)f===0&&(c=n[m++],f=32),f>=r?(h=c>>>f-r&u,f-=r):(g=r-f,h=(c&u)<<g&u,c=n[m++],f=32-g,h+=c>>>f),e[l]=h<v?i+h*o:s},unstuffLUT:function(n,e,r,a,t,i){var o=(1<<e)-1,s=0,u=0,m=0,l=0,f=0,h,c=[],g=n.length*4-Math.ceil(e*r/8);n[n.length-1]<<=8*g;var v=Math.ceil((i-a)/t);for(u=0;u<r;u++)l===0&&(h=n[s++],l=32),l>=e?(f=h>>>l-e&o,l-=e):(m=e-l,f=(h&o)<<m&o,h=n[s++],l=32-m,f+=h>>>l),c[u]=f<v?a+f*t:i;return c.unshift(a),c},unstuff2:function(n,e,r,a,t,i,o,s){var u=(1<<r)-1,m=0,l,f=0,h=0,c,g,v;if(t)for(l=0;l<a;l++)f===0&&(g=n[m++],f=32,h=0),f>=r?(c=g>>>h&u,f-=r,h+=r):(v=r-f,c=g>>>h&u,g=n[m++],f=32-v,c|=(g&(1<<v)-1)<<r-v,h=v),e[l]=t[c];else{var U=Math.ceil((s-i)/o);for(l=0;l<a;l++)f===0&&(g=n[m++],f=32,h=0),f>=r?(c=g>>>h&u,f-=r,h+=r):(v=r-f,c=g>>>h&u,g=n[m++],f=32-v,c|=(g&(1<<v)-1)<<r-v,h=v),e[l]=c<U?i+c*o:s}return e},unstuffLUT2:function(n,e,r,a,t,i){var o=(1<<e)-1,s=0,u=0,m=0,l=0,f=0,h=0,c,g=[],v=Math.ceil((i-a)/t);for(u=0;u<r;u++)l===0&&(c=n[s++],l=32,h=0),l>=e?(f=c>>>h&o,l-=e,h+=e):(m=e-l,f=c>>>h&o,c=n[s++],l=32-m,f|=(c&(1<<m)-1)<<e-m,h=m),g[u]=f<v?a+f*t:i;return g.unshift(a),g},originalUnstuff:function(n,e,r,a){var t=(1<<r)-1,i=0,o,s=0,u,m,l,f=n.length*4-Math.ceil(r*a/8);for(n[n.length-1]<<=8*f,o=0;o<a;o++)s===0&&(m=n[i++],s=32),s>=r?(u=m>>>s-r&t,s-=r):(l=r-s,u=(m&t)<<l&t,m=n[i++],s=32-l,u+=m>>>s),e[o]=u;return e},originalUnstuff2:function(n,e,r,a){var t=(1<<r)-1,i=0,o,s=0,u=0,m,l,f;for(o=0;o<a;o++)s===0&&(l=n[i++],s=32,u=0),s>=r?(m=l>>>u&t,s-=r,u+=r):(f=r-s,m=l>>>u&t,l=n[i++],s=32-f,m|=(l&(1<<f)-1)<<r-f,u=f),e[o]=m;return e}},V={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(n){for(var e=65535,r=65535,a=n.length,t=Math.floor(a/2),i=0;t;){var o=t>=359?359:t;t-=o;do e+=n[i++]<<8,r+=e+=n[i++];while(--o);e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16)}return a&1&&(r+=e+=n[i]<<8),e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16),(r<<16|e)>>>0},readHeaderInfo:function(n,e){var r=e.ptr,a=new Uint8Array(n,r,6),t={};if(t.fileIdentifierString=String.fromCharCode.apply(null,a),t.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+t.fileIdentifierString;r+=6;var i=new DataView(n,r,8),o=i.getInt32(0,!0);t.fileVersion=o,r+=4,o>=3&&(t.checksum=i.getUint32(4,!0),r+=4),i=new DataView(n,r,12),t.height=i.getUint32(0,!0),t.width=i.getUint32(4,!0),r+=8,o>=4?(t.numDims=i.getUint32(8,!0),r+=4):t.numDims=1,i=new DataView(n,r,40),t.numValidPixel=i.getUint32(0,!0),t.microBlockSize=i.getInt32(4,!0),t.blobSize=i.getInt32(8,!0),t.imageType=i.getInt32(12,!0),t.maxZError=i.getFloat64(16,!0),t.zMin=i.getFloat64(24,!0),t.zMax=i.getFloat64(32,!0),r+=40,e.headerInfo=t,e.ptr=r;var s,u;if(o>=3&&(u=o>=4?52:48,s=this.computeChecksumFletcher32(new Uint8Array(n,r-u,t.blobSize-14)),s!==t.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(n,e){var r=e.headerInfo,a=this.getDataTypeArray(r.imageType),t=r.numDims*this.getDataTypeSize(r.imageType),i=this.readSubArray(n,e.ptr,a,t),o=this.readSubArray(n,e.ptr+t,a,t);e.ptr+=2*t;var s,u=!0;for(s=0;s<r.numDims;s++)if(i[s]!==o[s]){u=!1;break}return r.minValues=i,r.maxValues=o,u},readSubArray:function(n,e,r,a){var t;if(r===Uint8Array)t=new Uint8Array(n,e,a);else{var i=new ArrayBuffer(a),o=new Uint8Array(i);o.set(new Uint8Array(n,e,a)),t=new r(i)}return t},readMask:function(n,e){var r=e.ptr,a=e.headerInfo,t=a.width*a.height,i=a.numValidPixel,o=new DataView(n,r,4),s={};if(s.numBytes=o.getUint32(0,!0),r+=4,(i===0||t===i)&&s.numBytes!==0)throw"invalid mask";var u,m;if(i===0)u=new Uint8Array(Math.ceil(t/8)),s.bitset=u,m=new Uint8Array(t),e.pixels.resultMask=m,r+=s.numBytes;else if(s.numBytes>0){u=new Uint8Array(Math.ceil(t/8)),o=new DataView(n,r,s.numBytes);var l=o.getInt16(0,!0),f=2,h=0,c=0;do{if(l>0)for(;l--;)u[h++]=o.getUint8(f++);else for(c=o.getUint8(f++),l=-l;l--;)u[h++]=c;l=o.getInt16(f,!0),f+=2}while(f<s.numBytes);if(l!==-32768||h<u.length)throw"Unexpected end of mask RLE encoding";m=new Uint8Array(t);var g=0,v=0;for(v=0;v<t;v++)v&7?(g=u[v>>3],g<<=v&7):g=u[v>>3],g&128&&(m[v]=1);e.pixels.resultMask=m,s.bitset=u,r+=s.numBytes}return e.ptr=r,e.mask=s,!0},readDataOneSweep:function(n,e,r){var a=e.ptr,t=e.headerInfo,i=t.numDims,o=t.width*t.height,s=t.imageType,u=t.numValidPixel*V.getDataTypeSize(s)*i,m,l=e.pixels.resultMask;if(r===Uint8Array)m=new Uint8Array(n,a,u);else{var f=new ArrayBuffer(u),h=new Uint8Array(f);h.set(new Uint8Array(n,a,u)),m=new r(f)}if(m.length===o*i)e.pixels.resultPixels=m;else{e.pixels.resultPixels=new r(o*i);var c=0,g=0,v=0,U=0;if(i>1)for(v=0;v<i;v++)for(U=v*o,g=0;g<o;g++)l[g]&&(e.pixels.resultPixels[U+g]=m[c++]);else for(g=0;g<o;g++)l[g]&&(e.pixels.resultPixels[g]=m[c++])}return a+=u,e.ptr=a,!0},readHuffmanTree:function(n,e){var r=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(n,e.ptr,16);e.ptr+=16;var t=a.getInt32(0,!0);if(t<2)throw"unsupported Huffman version";var i=a.getInt32(4,!0),o=a.getInt32(8,!0),s=a.getInt32(12,!0);if(o>=s)return!1;var u=new Uint32Array(s-o);V.decodeBits(n,e,u);var m=[],l,f,h,c;for(l=o;l<s;l++)f=l-(l<i?0:i),m[f]={first:u[l-o],second:null};var g=n.byteLength-e.ptr,v=Math.ceil(g/4),U=new ArrayBuffer(v*4),M=new Uint8Array(U);M.set(new Uint8Array(n,e.ptr,g));var S=new Uint32Array(U),I=0,k,w=0;for(k=S[0],l=o;l<s;l++)f=l-(l<i?0:i),c=m[f].first,c>0&&(m[f].second=k<<I>>>32-c,32-I>=c?(I+=c,I===32&&(I=0,w++,k=S[w])):(I+=c-32,w++,k=S[w],m[f].second|=k>>>32-I));var d=0,x=0,T=new b;for(l=0;l<m.length;l++)m[l]!==void 0&&(d=Math.max(d,m[l].first));d>=r?x=r:x=d,d>=30&&console.log("WARning, large NUM LUT BITS IS "+d);var y=[],p,L,B,E,O,F;for(l=o;l<s;l++)if(f=l-(l<i?0:i),c=m[f].first,c>0)if(p=[c,f],c<=x)for(L=m[f].second<<x-c,B=1<<x-c,h=0;h<B;h++)y[L|h]=p;else for(L=m[f].second,F=T,E=c-1;E>=0;E--)O=L>>>E&1,O?(F.right||(F.right=new b),F=F.right):(F.left||(F.left=new b),F=F.left),E===0&&!F.val&&(F.val=p[1]);return{decodeLut:y,numBitsLUTQick:x,numBitsLUT:d,tree:T,stuffedData:S,srcPtr:w,bitPos:I}},readHuffman:function(n,e,r){var a=e.headerInfo,t=a.numDims,i=e.headerInfo.height,o=e.headerInfo.width,s=o*i,u=this.readHuffmanTree(n,e),m=u.decodeLut,l=u.tree,f=u.stuffedData,h=u.srcPtr,c=u.bitPos,g=u.numBitsLUTQick,v=u.numBitsLUT,U=e.headerInfo.imageType===0?128:0,M,S,I,k=e.pixels.resultMask,w,d,x,T,y,p,L,B=0;c>0&&(h++,c=0);var E=f[h],O=e.encodeMode===1,F=new r(s*t),N=F,z;for(z=0;z<a.numDims;z++){if(t>1&&(N=new r(F.buffer,s*z,s),B=0),e.headerInfo.numValidPixel===o*i)for(p=0,T=0;T<i;T++)for(y=0;y<o;y++,p++){if(S=0,w=E<<c>>>32-g,d=w,32-c<g&&(w|=f[h+1]>>>64-c-g,d=w),m[d])S=m[d][1],c+=m[d][0];else for(w=E<<c>>>32-v,d=w,32-c<v&&(w|=f[h+1]>>>64-c-v,d=w),M=l,L=0;L<v;L++)if(x=w>>>v-L-1&1,M=x?M.right:M.left,!(M.left||M.right)){S=M.val,c=c+L+1;break}c>=32&&(c-=32,h++,E=f[h]),I=S-U,O?(y>0?I+=B:T>0?I+=N[p-o]:I+=B,I&=255,N[p]=I,B=I):N[p]=I}else for(p=0,T=0;T<i;T++)for(y=0;y<o;y++,p++)if(k[p]){if(S=0,w=E<<c>>>32-g,d=w,32-c<g&&(w|=f[h+1]>>>64-c-g,d=w),m[d])S=m[d][1],c+=m[d][0];else for(w=E<<c>>>32-v,d=w,32-c<v&&(w|=f[h+1]>>>64-c-v,d=w),M=l,L=0;L<v;L++)if(x=w>>>v-L-1&1,M=x?M.right:M.left,!(M.left||M.right)){S=M.val,c=c+L+1;break}c>=32&&(c-=32,h++,E=f[h]),I=S-U,O?(y>0&&k[p-1]?I+=B:T>0&&k[p-o]?I+=N[p-o]:I+=B,I&=255,N[p]=I,B=I):N[p]=I}e.ptr=e.ptr+(h+1)*4+(c>0?4:0)}e.pixels.resultPixels=F},decodeBits:function(n,e,r,a,t){{var i=e.headerInfo,o=i.fileVersion,s=0,u=new DataView(n,e.ptr,5),m=u.getUint8(0);s++;var l=m>>6,f=l===0?4:3-l,h=(m&32)>0,c=m&31,g=0;if(f===1)g=u.getUint8(s),s++;else if(f===2)g=u.getUint16(s,!0),s+=2;else if(f===4)g=u.getUint32(s,!0),s+=4;else throw"Invalid valid pixel count type";var v=2*i.maxZError,U,M,S,I,k,w,d,x,T,y,p=i.numDims>1?i.maxValues[t]:i.zMax;if(h){for(e.counter.lut++,x=u.getUint8(s),T=c,s++,I=Math.ceil((x-1)*c/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),e.ptr+=s,S.set(new Uint8Array(n,e.ptr,I)),d=new Uint32Array(M),e.ptr+=I,y=0;x-1>>>y;)y++;I=Math.ceil(g*y/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),S.set(new Uint8Array(n,e.ptr,I)),U=new Uint32Array(M),e.ptr+=I,o>=3?w=A.unstuffLUT2(d,c,x-1,a,v,p):w=A.unstuffLUT(d,c,x-1,a,v,p),o>=3?A.unstuff2(U,r,y,g,w):A.unstuff(U,r,y,g,w)}else e.counter.bitstuffer++,y=c,e.ptr+=s,y>0&&(I=Math.ceil(g*y/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),S.set(new Uint8Array(n,e.ptr,I)),U=new Uint32Array(M),e.ptr+=I,o>=3?a==null?A.originalUnstuff2(U,r,y,g):A.unstuff2(U,r,y,g,!1,a,v,p):a==null?A.originalUnstuff(U,r,y,g):A.unstuff(U,r,y,g,!1,a,v,p))}},readTiles:function(n,e,r){var a=e.headerInfo,t=a.width,i=a.height,o=a.microBlockSize,s=a.imageType,u=V.getDataTypeSize(s),m=Math.ceil(t/o),l=Math.ceil(i/o);e.pixels.numBlocksY=l,e.pixels.numBlocksX=m,e.pixels.ptr=0;var f=0,h=0,c=0,g=0,v=0,U=0,M=0,S=0,I=0,k=0,w=0,d=0,x=0,T=0,y=0,p=0,L,B,E,O,F,N,z=new r(o*o),ke=i%o||o,ye=t%o||o,J,Z,ue=a.numDims,te,j=e.pixels.resultMask,q=e.pixels.resultPixels;for(c=0;c<l;c++)for(v=c!==l-1?o:ke,g=0;g<m;g++)for(U=g!==m-1?o:ye,w=c*t*o+g*o,d=t-U,te=0;te<ue;te++){if(ue>1&&(q=new r(e.pixels.resultPixels.buffer,t*i*te*u,t*i)),M=n.byteLength-e.ptr,L=new DataView(n,e.ptr,Math.min(10,M)),B={},p=0,S=L.getUint8(0),p++,I=S>>6&255,k=S>>2&15,k!==(g*o>>3&15))throw"integrity issue";if(N=S&3,N>3)throw e.ptr+=p,"Invalid block encoding ("+N+")";if(N===2){e.counter.constant++,e.ptr+=p;continue}else if(N===0){if(e.counter.uncompressed++,e.ptr+=p,x=v*U*u,T=n.byteLength-e.ptr,x=x<T?x:T,E=new ArrayBuffer(x%u===0?x:x+u-x%u),O=new Uint8Array(E),O.set(new Uint8Array(n,e.ptr,x)),F=new r(E),y=0,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=F[y++]),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=F[y++];w+=d}e.ptr+=y*u}else if(J=V.getDataTypeUsed(s,I),Z=V.getOnePixel(B,p,J,L),p+=V.getDataTypeSize(J),N===3)if(e.ptr+=p,e.counter.constantoffset++,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=Z),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=Z;w+=d}else if(e.ptr+=p,V.decodeBits(n,e,z,Z,te),p=0,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=z[p++]),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=z[p++];w+=d}}},formatFileInfo:function(n){return{fileIdentifierString:n.headerInfo.fileIdentifierString,fileVersion:n.headerInfo.fileVersion,imageType:n.headerInfo.imageType,height:n.headerInfo.height,width:n.headerInfo.width,numValidPixel:n.headerInfo.numValidPixel,microBlockSize:n.headerInfo.microBlockSize,blobSize:n.headerInfo.blobSize,maxZError:n.headerInfo.maxZError,pixelType:V.getPixelType(n.headerInfo.imageType),eofOffset:n.eofOffset,mask:n.mask?{numBytes:n.mask.numBytes}:null,pixels:{numBlocksX:n.pixels.numBlocksX,numBlocksY:n.pixels.numBlocksY,maxValue:n.headerInfo.zMax,minValue:n.headerInfo.zMin,noDataValue:n.noDataValue}}},constructConstantSurface:function(n){var e=n.headerInfo.zMax,r=n.headerInfo.numDims,a=n.headerInfo.height*n.headerInfo.width,t=a*r,i=0,o=0,s=0,u=n.pixels.resultMask;if(u)if(r>1)for(i=0;i<r;i++)for(s=i*a,o=0;o<a;o++)u[o]&&(n.pixels.resultPixels[s+o]=e);else for(o=0;o<a;o++)u[o]&&(n.pixels.resultPixels[o]=e);else if(n.pixels.resultPixels.fill)n.pixels.resultPixels.fill(e);else for(o=0;o<t;o++)n.pixels.resultPixels[o]=e},getDataTypeArray:function(n){var e;switch(n){case 0:e=Int8Array;break;case 1:e=Uint8Array;break;case 2:e=Int16Array;break;case 3:e=Uint16Array;break;case 4:e=Int32Array;break;case 5:e=Uint32Array;break;case 6:e=Float32Array;break;case 7:e=Float64Array;break;default:e=Float32Array}return e},getPixelType:function(n){var e;switch(n){case 0:e="S8";break;case 1:e="U8";break;case 2:e="S16";break;case 3:e="U16";break;case 4:e="S32";break;case 5:e="U32";break;case 6:e="F32";break;case 7:e="F64";break;default:e="F32"}return e},isValidPixelValue:function(n,e){if(e==null)return!1;var r;switch(n){case 0:r=e>=-128&&e<=127;break;case 1:r=e>=0&&e<=255;break;case 2:r=e>=-32768&&e<=32767;break;case 3:r=e>=0&&e<=65536;break;case 4:r=e>=-2147483648&&e<=2147483647;break;case 5:r=e>=0&&e<=4294967296;break;case 6:r=e>=-34027999387901484e22&&e<=34027999387901484e22;break;case 7:r=e>=5e-324&&e<=17976931348623157e292;break;default:r=!1}return r},getDataTypeSize:function(n){var e=0;switch(n){case 0:case 1:e=1;break;case 2:case 3:e=2;break;case 4:case 5:case 6:e=4;break;case 7:e=8;break;default:e=n}return e},getDataTypeUsed:function(n,e){var r=n;switch(n){case 2:case 4:r=n-e;break;case 3:case 5:r=n-2*e;break;case 6:e===0?r=n:e===1?r=2:r=1;break;case 7:e===0?r=n:r=n-2*e+1;break;default:r=n;break}return r},getOnePixel:function(n,e,r,a){var t=0;switch(r){case 0:t=a.getInt8(e);break;case 1:t=a.getUint8(e);break;case 2:t=a.getInt16(e,!0);break;case 3:t=a.getUint16(e,!0);break;case 4:t=a.getInt32(e,!0);break;case 5:t=a.getUInt32(e,!0);break;case 6:t=a.getFloat32(e,!0);break;case 7:t=a.getFloat64(e,!0);break;default:throw"the decoder does not understand this pixel type"}return t}},b=function(n,e,r){this.val=n,this.left=e,this.right=r},X={decode:function(n,e){e=e||{};var r=e.noDataValue,a=0,t={};if(t.ptr=e.inputOffset||0,t.pixels={},!!V.readHeaderInfo(n,t)){var i=t.headerInfo,o=i.fileVersion,s=V.getDataTypeArray(i.imageType);V.readMask(n,t),i.numValidPixel!==i.width*i.height&&!t.pixels.resultMask&&(t.pixels.resultMask=e.maskData);var u=i.width*i.height;if(t.pixels.resultPixels=new s(u*i.numDims),t.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},i.numValidPixel!==0)if(i.zMax===i.zMin)V.constructConstantSurface(t);else if(o>=4&&V.checkMinMaxRanges(n,t))V.constructConstantSurface(t);else{var m=new DataView(n,t.ptr,2),l=m.getUint8(0);if(t.ptr++,l)V.readDataOneSweep(n,t,s);else if(o>1&&i.imageType<=1&&Math.abs(i.maxZError-.5)<1e-5){var f=m.getUint8(1);if(t.ptr++,t.encodeMode=f,f>2||o<4&&f>1)throw"Invalid Huffman flag "+f;f?V.readHuffman(n,t,s):V.readTiles(n,t,s)}else V.readTiles(n,t,s)}t.eofOffset=t.ptr;var h;e.inputOffset?(h=t.headerInfo.blobSize+e.inputOffset-t.ptr,Math.abs(h)>=1&&(t.eofOffset=e.inputOffset+t.headerInfo.blobSize)):(h=t.headerInfo.blobSize-t.ptr,Math.abs(h)>=1&&(t.eofOffset=t.headerInfo.blobSize));var c={width:i.width,height:i.height,pixelData:t.pixels.resultPixels,minValue:i.zMin,maxValue:i.zMax,validPixelCount:i.numValidPixel,dimCount:i.numDims,dimStats:{minValues:i.minValues,maxValues:i.maxValues},maskData:t.pixels.resultMask};if(t.pixels.resultMask&&V.isValidPixelValue(i.imageType,r)){var g=t.pixels.resultMask;for(a=0;a<u;a++)g[a]||(c.pixelData[a]=r);c.noDataValue=r}return t.noDataValue=r,e.returnFileInfo&&(c.fileInfo=V.formatFileInfo(t)),c}},getBandCount:function(n){var e=0,r=0,a={};for(a.ptr=0,a.pixels={};r<n.byteLength-58;)V.readHeaderInfo(n,a),r+=a.headerInfo.blobSize,e++,a.ptr=r;return e}};return X}(),C=function(){var A=new ArrayBuffer(4),V=new Uint8Array(A),b=new Uint32Array(A);return b[0]=1,V[0]===1}(),re={decode:function(A,V){if(!C)throw"Big endian system is not supported.";V=V||{};var b=V.inputOffset||0,X=new Uint8Array(A,b,10),n=String.fromCharCode.apply(null,X),e,r;if(n.trim()==="CntZImage")e=D,r=1;else if(n.substring(0,5)==="Lerc2")e=se,r=2;else throw"Unexpected file identifier string: "+n;for(var a=0,t=A.byteLength-10,i,o=[],s,u,m={width:0,height:0,pixels:[],pixelType:V.pixelType,mask:null,statistics:[]};b<t;){var l=e.decode(A,{inputOffset:b,encodedMaskData:i,maskData:u,returnMask:a===0,returnEncodedMask:a===0,returnFileInfo:!0,pixelType:V.pixelType||null,noDataValue:V.noDataValue||null});b=l.fileInfo.eofOffset,a===0&&(i=l.encodedMaskData,u=l.maskData,m.width=l.width,m.height=l.height,m.dimCount=l.dimCount||1,m.pixelType=l.pixelType||l.fileInfo.pixelType,m.mask=l.maskData),r>1&&l.fileInfo.mask&&l.fileInfo.mask.numBytes>0&&o.push(l.maskData),a++,m.pixels.push(l.pixelData),m.statistics.push({minValue:l.minValue,maxValue:l.maxValue,noDataValue:l.noDataValue,dimStats:l.dimStats})}var f,h,c;if(r>1&&o.length>1){for(c=m.width*m.height,m.bandMasks=o,u=new Uint8Array(c),u.set(o[0]),f=1;f<o.length;f++)for(s=o[f],h=0;h<c;h++)u[h]=u[h]&s[h];m.maskData=u}return m}};typeof define=="function"&&define.amd?define([],function(){return re}):typeof Te<"u"&&Te.exports?Te.exports=re:this.Lerc=re})()});var Ur={NONE:0,LERC:1},or=Object.freeze(Ur);var Q={};Q.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var Ye=new ie,Tr=new xe,kr=new ie,yr=new ie;Q.computeVertices=function(D){if(!G(D)||!G(D.heightmap))throw new he("options.heightmap is required.");if(!G(D.width)||!G(D.height))throw new he("options.width and options.height are required.");if(!G(D.nativeRectangle))throw new he("options.nativeRectangle is required.");if(!G(D.skirtHeight))throw new he("options.skirtHeight is required.");let se=Math.cos,C=Math.sin,re=Math.sqrt,A=Math.atan,V=Math.exp,b=ge.PI_OVER_TWO,X=ge.toRadians,n=D.heightmap,e=D.width,r=D.height,a=D.skirtHeight,t=a>0,i=Y(D.isGeographic,!0),o=Y(D.ellipsoid,Ie.WGS84),s=1/o.maximumRadius,u=ae.clone(D.nativeRectangle),m=ae.clone(D.rectangle),l,f,h,c;G(m)?(l=m.west,f=m.south,h=m.east,c=m.north):i?(l=X(u.west),f=X(u.south),h=X(u.east),c=X(u.north)):(l=u.west*s,f=b-2*A(V(-u.south*s)),h=u.east*s,c=b-2*A(V(-u.north*s)));let g=D.relativeToCenter,v=G(g);g=v?g:ie.ZERO;let U=Y(D.includeWebMercatorT,!1),M=Y(D.exaggeration,1),S=Y(D.exaggerationRelativeHeight,0),k=M!==1,w=Y(D.structure,Q.DEFAULT_STRUCTURE),d=Y(w.heightScale,Q.DEFAULT_STRUCTURE.heightScale),x=Y(w.heightOffset,Q.DEFAULT_STRUCTURE.heightOffset),T=Y(w.elementsPerHeight,Q.DEFAULT_STRUCTURE.elementsPerHeight),y=Y(w.stride,Q.DEFAULT_STRUCTURE.stride),p=Y(w.elementMultiplier,Q.DEFAULT_STRUCTURE.elementMultiplier),L=Y(w.isBigEndian,Q.DEFAULT_STRUCTURE.isBigEndian),B=ae.computeWidth(u),E=ae.computeHeight(u),O=B/(e-1),F=E/(r-1);i||(B*=s,E*=s);let N=o.radiiSquared,z=N.x,ke=N.y,ye=N.z,J=65536,Z=-65536,ue=rr.eastNorthUpToFixedFrame(g,o),te=xe.inverseTransformation(ue,Tr),j,q;U&&(j=Ue.geodeticLatitudeToMercatorAngle(f),q=1/(Ue.geodeticLatitudeToMercatorAngle(c)-j));let fe=kr;fe.x=Number.POSITIVE_INFINITY,fe.y=Number.POSITIVE_INFINITY,fe.z=Number.POSITIVE_INFINITY;let oe=yr;oe.x=Number.NEGATIVE_INFINITY,oe.y=Number.NEGATIVE_INFINITY,oe.z=Number.NEGATIVE_INFINITY;let Me=Number.POSITIVE_INFINITY,ce=e*r,mr=a>0?e*2+r*2:0,ne=ce+mr,ve=new Array(ne),Xe=new Array(ne),_e=new Array(ne),ze=U?new Array(ne):[],Ze=k?new Array(ne):[],Se=0,Ve=r,De=0,Ae=e;t&&(--Se,++Ve,--De,++Ae);let de=1e-5;for(let H=Se;H<Ve;++H){let K=H;K<0&&(K=0),K>=r&&(K=r-1);let W=u.north-F*K;i?W=X(W):W=b-2*A(V(-W*s));let Le=(W-f)/(c-f);Le=ge.clamp(Le,0,1);let we=H===Se,pe=H===Ve-1;a>0&&(we?W+=de*E:pe&&(W-=de*E));let Qe=se(W),Be=C(W),Je=ye*Be,Ke;U&&(Ke=(Ue.geodeticLatitudeToMercatorAngle(W)-j)*q);for(let me=De;me<Ae;++me){let $=me;$<0&&($=0),$>=e&&($=e-1);let Fe=K*(e*y)+$*y,R;if(T===1)R=n[Fe];else{R=0;let _;if(L)for(_=0;_<T;++_)R=R*p+n[Fe+_];else for(_=T-1;_>=0;--_)R=R*p+n[Fe+_]}R=R*d+x,Z=Math.max(Z,R),J=Math.min(J,R);let P=u.west+O*$;i?P=X(P):P=P*s;let be=(P-l)/(h-l);be=ge.clamp(be,0,1);let ee=K*e+$;if(a>0){let _=me===De,Re=me===Ae-1,pr=we||pe||_||Re;if((we||pe)&&(_||Re))continue;pr&&(R-=a,_?(ee=ce+(r-K-1),P-=de*B):pe?ee=ce+r+(e-$-1):Re?(ee=ce+r+e+K,P+=de*B):we&&(ee=ce+r+e+r+$))}let Ne=Qe*se(P),Ce=Qe*C(P),$e=z*Ne,Pe=ke*Ce,Oe=1/re($e*Ne+Pe*Ce+Je*Be),vr=$e*Oe,dr=Pe*Oe,wr=Je*Oe,le=new ie;le.x=vr+Ne*R,le.y=dr+Ce*R,le.z=wr+Be*R,xe.multiplyByPoint(te,le,Ye),ie.minimumByComponent(Ye,fe,fe),ie.maximumByComponent(Ye,oe,oe),Me=Math.min(Me,R),ve[ee]=le,_e[ee]=new er(be,Le),Xe[ee]=R,U&&(ze[ee]=Ke),k&&(Ze[ee]=o.geodeticSurfaceNormal(le))}}let hr=ir.fromPoints(ve),je;G(m)&&(je=ar.fromRectangle(m,J,Z,o));let qe;v&&(qe=new sr(o).computeHorizonCullingPointPossiblyUnderEllipsoid(g,ve,J));let gr=new nr(fe,oe,g),Ee=new fr(g,gr,Me,Z,ue,!1,U,k,M,S),We=new Float32Array(ne*Ee.stride),Ge=0;for(let H=0;H<ne;++H)Ge=Ee.encode(We,Ge,ve[H],_e[H],Xe[H],void 0,ze[H],Ze[H]);return{vertices:We,maximumHeight:Z,minimumHeight:J,encoding:Ee,boundingSphere3D:hr,orientedBoundingBox:je,occludeePointInScaledSpace:qe}};var lr=Q;var cr=xr(ur(),1);function Mr(D,se){if(D.encoding===or.LERC){let A;try{A=cr.default.decode(D.heightmap)}catch(b){throw new He(b)}if(A.statistics[0].minValue===Number.MAX_VALUE)throw new He("Invalid tile data");D.heightmap=A.pixels[0],D.width=A.width,D.height=A.height}D.ellipsoid=Ie.clone(D.ellipsoid),D.rectangle=ae.clone(D.rectangle);let C=lr.computeVertices(D),re=C.vertices;return se.push(re.buffer),{vertices:re.buffer,numberOfAttributes:C.encoding.stride,minimumHeight:C.minimumHeight,maximumHeight:C.maximumHeight,gridWidth:D.width,gridHeight:D.height,boundingSphere3D:C.boundingSphere3D,orientedBoundingBox:C.orientedBoundingBox,occludeePointInScaledSpace:C.occludeePointInScaledSpace,encoding:C.encoding,westIndicesSouthToNorth:C.westIndicesSouthToNorth,southIndicesEastToWest:C.southIndicesEastToWest,eastIndicesNorthToSouth:C.eastIndicesNorthToSouth,northIndicesWestToEast:C.northIndicesWestToEast}}var Pr=tr(Mr);export{Pr as default}; +import{a as sr,b as fr}from"./chunk-CV7DLCWG.js";import{a as tr}from"./chunk-PXCJYT2S.js";import{a as Ue}from"./chunk-SB224QGV.js";import{a as ar}from"./chunk-Q6L7X3LP.js";import"./chunk-ABGXSJNX.js";import"./chunk-KF5NF354.js";import{a as nr}from"./chunk-4WRMLZA7.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{d as ir}from"./chunk-TMSETF7M.js";import{b as xe,g as rr,h as ae}from"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as ie,c as er,d as Ie}from"./chunk-POASMU2N.js";import{a as ge}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import{a as He}from"./chunk-II4VNKYR.js";import{a as Y}from"./chunk-IUA6FAOZ.js";import{a as he}from"./chunk-UH2WFNTA.js";import{c as Ir,d as xr,e as G}from"./chunk-PEYJTJPE.js";var ur=Ir((qr,Te)=>{/* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */(function(){var D=function(){var A={};A.defaultNoDataValue=-34027999387901484e22,A.decode=function(r,a){a=a||{};var t=a.encodedMaskData||a.encodedMaskData===null,i=n(r,a.inputOffset||0,t),o=a.noDataValue!==null?a.noDataValue:A.defaultNoDataValue,s=V(i,a.pixelType||Float32Array,a.encodedMaskData,o,a.returnMask),u={width:i.width,height:i.height,pixelData:s.resultPixels,minValue:s.minValue,maxValue:i.pixels.maxValue,noDataValue:o};return s.resultMask&&(u.maskData=s.resultMask),a.returnEncodedMask&&i.mask&&(u.encodedMaskData=i.mask.bitset?i.mask.bitset:null),a.returnFileInfo&&(u.fileInfo=b(i),a.computeUsedBitDepths&&(u.fileInfo.bitDepths=X(i))),u};var V=function(r,a,t,i,o){var s=0,u=r.pixels.numBlocksX,m=r.pixels.numBlocksY,l=Math.floor(r.width/u),f=Math.floor(r.height/m),h=2*r.maxZError,c=Number.MAX_VALUE,g;t=t||(r.mask?r.mask.bitset:null);var v,U;v=new a(r.width*r.height),o&&t&&(U=new Uint8Array(r.width*r.height));for(var M=new Float32Array(l*f),S,I,k=0;k<=m;k++){var w=k!==m?f:r.height%m;if(w!==0)for(var d=0;d<=u;d++){var x=d!==u?l:r.width%u;if(x!==0){var T=k*r.width*f+d*l,y=r.width-x,p=r.pixels.blocks[s],L,B,E;p.encoding<2?(p.encoding===0?L=p.rawData:(e(p.stuffedData,p.bitsPerPixel,p.numValidPixels,p.offset,h,M,r.pixels.maxValue),L=M),B=0):p.encoding===2?E=0:E=p.offset;var O;if(t)for(I=0;I<w;I++){for(T&7&&(O=t[T>>3],O<<=T&7),S=0;S<x;S++)T&7||(O=t[T>>3]),O&128?(U&&(U[T]=1),g=p.encoding<2?L[B++]:E,c=c>g?g:c,v[T++]=g):(U&&(U[T]=0),v[T++]=i),O<<=1;T+=y}else if(p.encoding<2)for(I=0;I<w;I++){for(S=0;S<x;S++)g=L[B++],c=c>g?g:c,v[T++]=g;T+=y}else for(c=c>E?E:c,I=0;I<w;I++){for(S=0;S<x;S++)v[T++]=E;T+=y}if(p.encoding===1&&B!==p.numValidPixels)throw"Block and Mask do not match";s++}}}return{resultPixels:v,resultMask:U,minValue:c}},b=function(r){return{fileIdentifierString:r.fileIdentifierString,fileVersion:r.fileVersion,imageType:r.imageType,height:r.height,width:r.width,maxZError:r.maxZError,eofOffset:r.eofOffset,mask:r.mask?{numBlocksX:r.mask.numBlocksX,numBlocksY:r.mask.numBlocksY,numBytes:r.mask.numBytes,maxValue:r.mask.maxValue}:null,pixels:{numBlocksX:r.pixels.numBlocksX,numBlocksY:r.pixels.numBlocksY,numBytes:r.pixels.numBytes,maxValue:r.pixels.maxValue,noDataValue:r.noDataValue}}},X=function(r){for(var a=r.pixels.numBlocksX*r.pixels.numBlocksY,t={},i=0;i<a;i++){var o=r.pixels.blocks[i];o.encoding===0?t.float32=!0:o.encoding===1?t[o.bitsPerPixel]=!0:t[0]=!0}return Object.keys(t)},n=function(r,a,t){var i={},o=new Uint8Array(r,a,10);if(i.fileIdentifierString=String.fromCharCode.apply(null,o),i.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+i.fileIdentifierString;a+=10;var s=new DataView(r,a,24);if(i.fileVersion=s.getInt32(0,!0),i.imageType=s.getInt32(4,!0),i.height=s.getUint32(8,!0),i.width=s.getUint32(12,!0),i.maxZError=s.getFloat64(16,!0),a+=24,!t)if(s=new DataView(r,a,16),i.mask={},i.mask.numBlocksY=s.getUint32(0,!0),i.mask.numBlocksX=s.getUint32(4,!0),i.mask.numBytes=s.getUint32(8,!0),i.mask.maxValue=s.getFloat32(12,!0),a+=16,i.mask.numBytes>0){var u=new Uint8Array(Math.ceil(i.width*i.height/8));s=new DataView(r,a,i.mask.numBytes);var m=s.getInt16(0,!0),l=2,f=0;do{if(m>0)for(;m--;)u[f++]=s.getUint8(l++);else{var h=s.getUint8(l++);for(m=-m;m--;)u[f++]=h}m=s.getInt16(l,!0),l+=2}while(l<i.mask.numBytes);if(m!==-32768||f<u.length)throw"Unexpected end of mask RLE encoding";i.mask.bitset=u,a+=i.mask.numBytes}else i.mask.numBytes|i.mask.numBlocksY|i.mask.maxValue||(i.mask.bitset=new Uint8Array(Math.ceil(i.width*i.height/8)));s=new DataView(r,a,16),i.pixels={},i.pixels.numBlocksY=s.getUint32(0,!0),i.pixels.numBlocksX=s.getUint32(4,!0),i.pixels.numBytes=s.getUint32(8,!0),i.pixels.maxValue=s.getFloat32(12,!0),a+=16;var c=i.pixels.numBlocksX,g=i.pixels.numBlocksY,v=c+(i.width%c>0?1:0),U=g+(i.height%g>0?1:0);i.pixels.blocks=new Array(v*U);for(var M=0,S=0;S<U;S++)for(var I=0;I<v;I++){var k=0,w=r.byteLength-a;s=new DataView(r,a,Math.min(10,w));var d={};i.pixels.blocks[M++]=d;var x=s.getUint8(0);if(k++,d.encoding=x&63,d.encoding>3)throw"Invalid block encoding ("+d.encoding+")";if(d.encoding===2){a++;continue}if(x!==0&&x!==2){if(x>>=6,d.offsetType=x,x===2)d.offset=s.getInt8(1),k++;else if(x===1)d.offset=s.getInt16(1,!0),k+=2;else if(x===0)d.offset=s.getFloat32(1,!0),k+=4;else throw"Invalid block offset type";if(d.encoding===1)if(x=s.getUint8(k),k++,d.bitsPerPixel=x&63,x>>=6,d.numValidPixelsType=x,x===2)d.numValidPixels=s.getUint8(k),k++;else if(x===1)d.numValidPixels=s.getUint16(k,!0),k+=2;else if(x===0)d.numValidPixels=s.getUint32(k,!0),k+=4;else throw"Invalid valid pixel count type"}if(a+=k,d.encoding!==3){var T,y;if(d.encoding===0){var p=(i.pixels.numBytes-1)/4;if(p!==Math.floor(p))throw"uncompressed block has invalid length";T=new ArrayBuffer(p*4),y=new Uint8Array(T),y.set(new Uint8Array(r,a,p*4));var L=new Float32Array(T);d.rawData=L,a+=p*4}else if(d.encoding===1){var B=Math.ceil(d.numValidPixels*d.bitsPerPixel/8),E=Math.ceil(B/4);T=new ArrayBuffer(E*4),y=new Uint8Array(T),y.set(new Uint8Array(r,a,B)),d.stuffedData=new Uint32Array(T),a+=B}}}return i.eofOffset=a,i},e=function(r,a,t,i,o,s,u){var m=(1<<a)-1,l=0,f,h=0,c,g,v=Math.ceil((u-i)/o),U=r.length*4-Math.ceil(a*t/8);for(r[r.length-1]<<=8*U,f=0;f<t;f++){if(h===0&&(g=r[l++],h=32),h>=a)c=g>>>h-a&m,h-=a;else{var M=a-h;c=(g&m)<<M&m,g=r[l++],h=32-M,c+=g>>>h}s[f]=c<v?i+c*o:u}return s};return A}(),se=function(){"use strict";var A={unstuff:function(n,e,r,a,t,i,o,s){var u=(1<<r)-1,m=0,l,f=0,h,c,g,v,U=n.length*4-Math.ceil(r*a/8);if(n[n.length-1]<<=8*U,t)for(l=0;l<a;l++)f===0&&(c=n[m++],f=32),f>=r?(h=c>>>f-r&u,f-=r):(g=r-f,h=(c&u)<<g&u,c=n[m++],f=32-g,h+=c>>>f),e[l]=t[h];else for(v=Math.ceil((s-i)/o),l=0;l<a;l++)f===0&&(c=n[m++],f=32),f>=r?(h=c>>>f-r&u,f-=r):(g=r-f,h=(c&u)<<g&u,c=n[m++],f=32-g,h+=c>>>f),e[l]=h<v?i+h*o:s},unstuffLUT:function(n,e,r,a,t,i){var o=(1<<e)-1,s=0,u=0,m=0,l=0,f=0,h,c=[],g=n.length*4-Math.ceil(e*r/8);n[n.length-1]<<=8*g;var v=Math.ceil((i-a)/t);for(u=0;u<r;u++)l===0&&(h=n[s++],l=32),l>=e?(f=h>>>l-e&o,l-=e):(m=e-l,f=(h&o)<<m&o,h=n[s++],l=32-m,f+=h>>>l),c[u]=f<v?a+f*t:i;return c.unshift(a),c},unstuff2:function(n,e,r,a,t,i,o,s){var u=(1<<r)-1,m=0,l,f=0,h=0,c,g,v;if(t)for(l=0;l<a;l++)f===0&&(g=n[m++],f=32,h=0),f>=r?(c=g>>>h&u,f-=r,h+=r):(v=r-f,c=g>>>h&u,g=n[m++],f=32-v,c|=(g&(1<<v)-1)<<r-v,h=v),e[l]=t[c];else{var U=Math.ceil((s-i)/o);for(l=0;l<a;l++)f===0&&(g=n[m++],f=32,h=0),f>=r?(c=g>>>h&u,f-=r,h+=r):(v=r-f,c=g>>>h&u,g=n[m++],f=32-v,c|=(g&(1<<v)-1)<<r-v,h=v),e[l]=c<U?i+c*o:s}return e},unstuffLUT2:function(n,e,r,a,t,i){var o=(1<<e)-1,s=0,u=0,m=0,l=0,f=0,h=0,c,g=[],v=Math.ceil((i-a)/t);for(u=0;u<r;u++)l===0&&(c=n[s++],l=32,h=0),l>=e?(f=c>>>h&o,l-=e,h+=e):(m=e-l,f=c>>>h&o,c=n[s++],l=32-m,f|=(c&(1<<m)-1)<<e-m,h=m),g[u]=f<v?a+f*t:i;return g.unshift(a),g},originalUnstuff:function(n,e,r,a){var t=(1<<r)-1,i=0,o,s=0,u,m,l,f=n.length*4-Math.ceil(r*a/8);for(n[n.length-1]<<=8*f,o=0;o<a;o++)s===0&&(m=n[i++],s=32),s>=r?(u=m>>>s-r&t,s-=r):(l=r-s,u=(m&t)<<l&t,m=n[i++],s=32-l,u+=m>>>s),e[o]=u;return e},originalUnstuff2:function(n,e,r,a){var t=(1<<r)-1,i=0,o,s=0,u=0,m,l,f;for(o=0;o<a;o++)s===0&&(l=n[i++],s=32,u=0),s>=r?(m=l>>>u&t,s-=r,u+=r):(f=r-s,m=l>>>u&t,l=n[i++],s=32-f,m|=(l&(1<<f)-1)<<r-f,u=f),e[o]=m;return e}},V={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(n){for(var e=65535,r=65535,a=n.length,t=Math.floor(a/2),i=0;t;){var o=t>=359?359:t;t-=o;do e+=n[i++]<<8,r+=e+=n[i++];while(--o);e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16)}return a&1&&(r+=e+=n[i]<<8),e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16),(r<<16|e)>>>0},readHeaderInfo:function(n,e){var r=e.ptr,a=new Uint8Array(n,r,6),t={};if(t.fileIdentifierString=String.fromCharCode.apply(null,a),t.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+t.fileIdentifierString;r+=6;var i=new DataView(n,r,8),o=i.getInt32(0,!0);t.fileVersion=o,r+=4,o>=3&&(t.checksum=i.getUint32(4,!0),r+=4),i=new DataView(n,r,12),t.height=i.getUint32(0,!0),t.width=i.getUint32(4,!0),r+=8,o>=4?(t.numDims=i.getUint32(8,!0),r+=4):t.numDims=1,i=new DataView(n,r,40),t.numValidPixel=i.getUint32(0,!0),t.microBlockSize=i.getInt32(4,!0),t.blobSize=i.getInt32(8,!0),t.imageType=i.getInt32(12,!0),t.maxZError=i.getFloat64(16,!0),t.zMin=i.getFloat64(24,!0),t.zMax=i.getFloat64(32,!0),r+=40,e.headerInfo=t,e.ptr=r;var s,u;if(o>=3&&(u=o>=4?52:48,s=this.computeChecksumFletcher32(new Uint8Array(n,r-u,t.blobSize-14)),s!==t.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(n,e){var r=e.headerInfo,a=this.getDataTypeArray(r.imageType),t=r.numDims*this.getDataTypeSize(r.imageType),i=this.readSubArray(n,e.ptr,a,t),o=this.readSubArray(n,e.ptr+t,a,t);e.ptr+=2*t;var s,u=!0;for(s=0;s<r.numDims;s++)if(i[s]!==o[s]){u=!1;break}return r.minValues=i,r.maxValues=o,u},readSubArray:function(n,e,r,a){var t;if(r===Uint8Array)t=new Uint8Array(n,e,a);else{var i=new ArrayBuffer(a),o=new Uint8Array(i);o.set(new Uint8Array(n,e,a)),t=new r(i)}return t},readMask:function(n,e){var r=e.ptr,a=e.headerInfo,t=a.width*a.height,i=a.numValidPixel,o=new DataView(n,r,4),s={};if(s.numBytes=o.getUint32(0,!0),r+=4,(i===0||t===i)&&s.numBytes!==0)throw"invalid mask";var u,m;if(i===0)u=new Uint8Array(Math.ceil(t/8)),s.bitset=u,m=new Uint8Array(t),e.pixels.resultMask=m,r+=s.numBytes;else if(s.numBytes>0){u=new Uint8Array(Math.ceil(t/8)),o=new DataView(n,r,s.numBytes);var l=o.getInt16(0,!0),f=2,h=0,c=0;do{if(l>0)for(;l--;)u[h++]=o.getUint8(f++);else for(c=o.getUint8(f++),l=-l;l--;)u[h++]=c;l=o.getInt16(f,!0),f+=2}while(f<s.numBytes);if(l!==-32768||h<u.length)throw"Unexpected end of mask RLE encoding";m=new Uint8Array(t);var g=0,v=0;for(v=0;v<t;v++)v&7?(g=u[v>>3],g<<=v&7):g=u[v>>3],g&128&&(m[v]=1);e.pixels.resultMask=m,s.bitset=u,r+=s.numBytes}return e.ptr=r,e.mask=s,!0},readDataOneSweep:function(n,e,r){var a=e.ptr,t=e.headerInfo,i=t.numDims,o=t.width*t.height,s=t.imageType,u=t.numValidPixel*V.getDataTypeSize(s)*i,m,l=e.pixels.resultMask;if(r===Uint8Array)m=new Uint8Array(n,a,u);else{var f=new ArrayBuffer(u),h=new Uint8Array(f);h.set(new Uint8Array(n,a,u)),m=new r(f)}if(m.length===o*i)e.pixels.resultPixels=m;else{e.pixels.resultPixels=new r(o*i);var c=0,g=0,v=0,U=0;if(i>1)for(v=0;v<i;v++)for(U=v*o,g=0;g<o;g++)l[g]&&(e.pixels.resultPixels[U+g]=m[c++]);else for(g=0;g<o;g++)l[g]&&(e.pixels.resultPixels[g]=m[c++])}return a+=u,e.ptr=a,!0},readHuffmanTree:function(n,e){var r=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(n,e.ptr,16);e.ptr+=16;var t=a.getInt32(0,!0);if(t<2)throw"unsupported Huffman version";var i=a.getInt32(4,!0),o=a.getInt32(8,!0),s=a.getInt32(12,!0);if(o>=s)return!1;var u=new Uint32Array(s-o);V.decodeBits(n,e,u);var m=[],l,f,h,c;for(l=o;l<s;l++)f=l-(l<i?0:i),m[f]={first:u[l-o],second:null};var g=n.byteLength-e.ptr,v=Math.ceil(g/4),U=new ArrayBuffer(v*4),M=new Uint8Array(U);M.set(new Uint8Array(n,e.ptr,g));var S=new Uint32Array(U),I=0,k,w=0;for(k=S[0],l=o;l<s;l++)f=l-(l<i?0:i),c=m[f].first,c>0&&(m[f].second=k<<I>>>32-c,32-I>=c?(I+=c,I===32&&(I=0,w++,k=S[w])):(I+=c-32,w++,k=S[w],m[f].second|=k>>>32-I));var d=0,x=0,T=new b;for(l=0;l<m.length;l++)m[l]!==void 0&&(d=Math.max(d,m[l].first));d>=r?x=r:x=d,d>=30&&console.log("WARning, large NUM LUT BITS IS "+d);var y=[],p,L,B,E,O,F;for(l=o;l<s;l++)if(f=l-(l<i?0:i),c=m[f].first,c>0)if(p=[c,f],c<=x)for(L=m[f].second<<x-c,B=1<<x-c,h=0;h<B;h++)y[L|h]=p;else for(L=m[f].second,F=T,E=c-1;E>=0;E--)O=L>>>E&1,O?(F.right||(F.right=new b),F=F.right):(F.left||(F.left=new b),F=F.left),E===0&&!F.val&&(F.val=p[1]);return{decodeLut:y,numBitsLUTQick:x,numBitsLUT:d,tree:T,stuffedData:S,srcPtr:w,bitPos:I}},readHuffman:function(n,e,r){var a=e.headerInfo,t=a.numDims,i=e.headerInfo.height,o=e.headerInfo.width,s=o*i,u=this.readHuffmanTree(n,e),m=u.decodeLut,l=u.tree,f=u.stuffedData,h=u.srcPtr,c=u.bitPos,g=u.numBitsLUTQick,v=u.numBitsLUT,U=e.headerInfo.imageType===0?128:0,M,S,I,k=e.pixels.resultMask,w,d,x,T,y,p,L,B=0;c>0&&(h++,c=0);var E=f[h],O=e.encodeMode===1,F=new r(s*t),N=F,z;for(z=0;z<a.numDims;z++){if(t>1&&(N=new r(F.buffer,s*z,s),B=0),e.headerInfo.numValidPixel===o*i)for(p=0,T=0;T<i;T++)for(y=0;y<o;y++,p++){if(S=0,w=E<<c>>>32-g,d=w,32-c<g&&(w|=f[h+1]>>>64-c-g,d=w),m[d])S=m[d][1],c+=m[d][0];else for(w=E<<c>>>32-v,d=w,32-c<v&&(w|=f[h+1]>>>64-c-v,d=w),M=l,L=0;L<v;L++)if(x=w>>>v-L-1&1,M=x?M.right:M.left,!(M.left||M.right)){S=M.val,c=c+L+1;break}c>=32&&(c-=32,h++,E=f[h]),I=S-U,O?(y>0?I+=B:T>0?I+=N[p-o]:I+=B,I&=255,N[p]=I,B=I):N[p]=I}else for(p=0,T=0;T<i;T++)for(y=0;y<o;y++,p++)if(k[p]){if(S=0,w=E<<c>>>32-g,d=w,32-c<g&&(w|=f[h+1]>>>64-c-g,d=w),m[d])S=m[d][1],c+=m[d][0];else for(w=E<<c>>>32-v,d=w,32-c<v&&(w|=f[h+1]>>>64-c-v,d=w),M=l,L=0;L<v;L++)if(x=w>>>v-L-1&1,M=x?M.right:M.left,!(M.left||M.right)){S=M.val,c=c+L+1;break}c>=32&&(c-=32,h++,E=f[h]),I=S-U,O?(y>0&&k[p-1]?I+=B:T>0&&k[p-o]?I+=N[p-o]:I+=B,I&=255,N[p]=I,B=I):N[p]=I}e.ptr=e.ptr+(h+1)*4+(c>0?4:0)}e.pixels.resultPixels=F},decodeBits:function(n,e,r,a,t){{var i=e.headerInfo,o=i.fileVersion,s=0,u=new DataView(n,e.ptr,5),m=u.getUint8(0);s++;var l=m>>6,f=l===0?4:3-l,h=(m&32)>0,c=m&31,g=0;if(f===1)g=u.getUint8(s),s++;else if(f===2)g=u.getUint16(s,!0),s+=2;else if(f===4)g=u.getUint32(s,!0),s+=4;else throw"Invalid valid pixel count type";var v=2*i.maxZError,U,M,S,I,k,w,d,x,T,y,p=i.numDims>1?i.maxValues[t]:i.zMax;if(h){for(e.counter.lut++,x=u.getUint8(s),T=c,s++,I=Math.ceil((x-1)*c/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),e.ptr+=s,S.set(new Uint8Array(n,e.ptr,I)),d=new Uint32Array(M),e.ptr+=I,y=0;x-1>>>y;)y++;I=Math.ceil(g*y/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),S.set(new Uint8Array(n,e.ptr,I)),U=new Uint32Array(M),e.ptr+=I,o>=3?w=A.unstuffLUT2(d,c,x-1,a,v,p):w=A.unstuffLUT(d,c,x-1,a,v,p),o>=3?A.unstuff2(U,r,y,g,w):A.unstuff(U,r,y,g,w)}else e.counter.bitstuffer++,y=c,e.ptr+=s,y>0&&(I=Math.ceil(g*y/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),S.set(new Uint8Array(n,e.ptr,I)),U=new Uint32Array(M),e.ptr+=I,o>=3?a==null?A.originalUnstuff2(U,r,y,g):A.unstuff2(U,r,y,g,!1,a,v,p):a==null?A.originalUnstuff(U,r,y,g):A.unstuff(U,r,y,g,!1,a,v,p))}},readTiles:function(n,e,r){var a=e.headerInfo,t=a.width,i=a.height,o=a.microBlockSize,s=a.imageType,u=V.getDataTypeSize(s),m=Math.ceil(t/o),l=Math.ceil(i/o);e.pixels.numBlocksY=l,e.pixels.numBlocksX=m,e.pixels.ptr=0;var f=0,h=0,c=0,g=0,v=0,U=0,M=0,S=0,I=0,k=0,w=0,d=0,x=0,T=0,y=0,p=0,L,B,E,O,F,N,z=new r(o*o),ke=i%o||o,ye=t%o||o,J,Z,ue=a.numDims,te,j=e.pixels.resultMask,q=e.pixels.resultPixels;for(c=0;c<l;c++)for(v=c!==l-1?o:ke,g=0;g<m;g++)for(U=g!==m-1?o:ye,w=c*t*o+g*o,d=t-U,te=0;te<ue;te++){if(ue>1&&(q=new r(e.pixels.resultPixels.buffer,t*i*te*u,t*i)),M=n.byteLength-e.ptr,L=new DataView(n,e.ptr,Math.min(10,M)),B={},p=0,S=L.getUint8(0),p++,I=S>>6&255,k=S>>2&15,k!==(g*o>>3&15))throw"integrity issue";if(N=S&3,N>3)throw e.ptr+=p,"Invalid block encoding ("+N+")";if(N===2){e.counter.constant++,e.ptr+=p;continue}else if(N===0){if(e.counter.uncompressed++,e.ptr+=p,x=v*U*u,T=n.byteLength-e.ptr,x=x<T?x:T,E=new ArrayBuffer(x%u===0?x:x+u-x%u),O=new Uint8Array(E),O.set(new Uint8Array(n,e.ptr,x)),F=new r(E),y=0,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=F[y++]),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=F[y++];w+=d}e.ptr+=y*u}else if(J=V.getDataTypeUsed(s,I),Z=V.getOnePixel(B,p,J,L),p+=V.getDataTypeSize(J),N===3)if(e.ptr+=p,e.counter.constantoffset++,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=Z),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=Z;w+=d}else if(e.ptr+=p,V.decodeBits(n,e,z,Z,te),p=0,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=z[p++]),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=z[p++];w+=d}}},formatFileInfo:function(n){return{fileIdentifierString:n.headerInfo.fileIdentifierString,fileVersion:n.headerInfo.fileVersion,imageType:n.headerInfo.imageType,height:n.headerInfo.height,width:n.headerInfo.width,numValidPixel:n.headerInfo.numValidPixel,microBlockSize:n.headerInfo.microBlockSize,blobSize:n.headerInfo.blobSize,maxZError:n.headerInfo.maxZError,pixelType:V.getPixelType(n.headerInfo.imageType),eofOffset:n.eofOffset,mask:n.mask?{numBytes:n.mask.numBytes}:null,pixels:{numBlocksX:n.pixels.numBlocksX,numBlocksY:n.pixels.numBlocksY,maxValue:n.headerInfo.zMax,minValue:n.headerInfo.zMin,noDataValue:n.noDataValue}}},constructConstantSurface:function(n){var e=n.headerInfo.zMax,r=n.headerInfo.numDims,a=n.headerInfo.height*n.headerInfo.width,t=a*r,i=0,o=0,s=0,u=n.pixels.resultMask;if(u)if(r>1)for(i=0;i<r;i++)for(s=i*a,o=0;o<a;o++)u[o]&&(n.pixels.resultPixels[s+o]=e);else for(o=0;o<a;o++)u[o]&&(n.pixels.resultPixels[o]=e);else if(n.pixels.resultPixels.fill)n.pixels.resultPixels.fill(e);else for(o=0;o<t;o++)n.pixels.resultPixels[o]=e},getDataTypeArray:function(n){var e;switch(n){case 0:e=Int8Array;break;case 1:e=Uint8Array;break;case 2:e=Int16Array;break;case 3:e=Uint16Array;break;case 4:e=Int32Array;break;case 5:e=Uint32Array;break;case 6:e=Float32Array;break;case 7:e=Float64Array;break;default:e=Float32Array}return e},getPixelType:function(n){var e;switch(n){case 0:e="S8";break;case 1:e="U8";break;case 2:e="S16";break;case 3:e="U16";break;case 4:e="S32";break;case 5:e="U32";break;case 6:e="F32";break;case 7:e="F64";break;default:e="F32"}return e},isValidPixelValue:function(n,e){if(e==null)return!1;var r;switch(n){case 0:r=e>=-128&&e<=127;break;case 1:r=e>=0&&e<=255;break;case 2:r=e>=-32768&&e<=32767;break;case 3:r=e>=0&&e<=65536;break;case 4:r=e>=-2147483648&&e<=2147483647;break;case 5:r=e>=0&&e<=4294967296;break;case 6:r=e>=-34027999387901484e22&&e<=34027999387901484e22;break;case 7:r=e>=5e-324&&e<=17976931348623157e292;break;default:r=!1}return r},getDataTypeSize:function(n){var e=0;switch(n){case 0:case 1:e=1;break;case 2:case 3:e=2;break;case 4:case 5:case 6:e=4;break;case 7:e=8;break;default:e=n}return e},getDataTypeUsed:function(n,e){var r=n;switch(n){case 2:case 4:r=n-e;break;case 3:case 5:r=n-2*e;break;case 6:e===0?r=n:e===1?r=2:r=1;break;case 7:e===0?r=n:r=n-2*e+1;break;default:r=n;break}return r},getOnePixel:function(n,e,r,a){var t=0;switch(r){case 0:t=a.getInt8(e);break;case 1:t=a.getUint8(e);break;case 2:t=a.getInt16(e,!0);break;case 3:t=a.getUint16(e,!0);break;case 4:t=a.getInt32(e,!0);break;case 5:t=a.getUInt32(e,!0);break;case 6:t=a.getFloat32(e,!0);break;case 7:t=a.getFloat64(e,!0);break;default:throw"the decoder does not understand this pixel type"}return t}},b=function(n,e,r){this.val=n,this.left=e,this.right=r},X={decode:function(n,e){e=e||{};var r=e.noDataValue,a=0,t={};if(t.ptr=e.inputOffset||0,t.pixels={},!!V.readHeaderInfo(n,t)){var i=t.headerInfo,o=i.fileVersion,s=V.getDataTypeArray(i.imageType);V.readMask(n,t),i.numValidPixel!==i.width*i.height&&!t.pixels.resultMask&&(t.pixels.resultMask=e.maskData);var u=i.width*i.height;if(t.pixels.resultPixels=new s(u*i.numDims),t.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},i.numValidPixel!==0)if(i.zMax===i.zMin)V.constructConstantSurface(t);else if(o>=4&&V.checkMinMaxRanges(n,t))V.constructConstantSurface(t);else{var m=new DataView(n,t.ptr,2),l=m.getUint8(0);if(t.ptr++,l)V.readDataOneSweep(n,t,s);else if(o>1&&i.imageType<=1&&Math.abs(i.maxZError-.5)<1e-5){var f=m.getUint8(1);if(t.ptr++,t.encodeMode=f,f>2||o<4&&f>1)throw"Invalid Huffman flag "+f;f?V.readHuffman(n,t,s):V.readTiles(n,t,s)}else V.readTiles(n,t,s)}t.eofOffset=t.ptr;var h;e.inputOffset?(h=t.headerInfo.blobSize+e.inputOffset-t.ptr,Math.abs(h)>=1&&(t.eofOffset=e.inputOffset+t.headerInfo.blobSize)):(h=t.headerInfo.blobSize-t.ptr,Math.abs(h)>=1&&(t.eofOffset=t.headerInfo.blobSize));var c={width:i.width,height:i.height,pixelData:t.pixels.resultPixels,minValue:i.zMin,maxValue:i.zMax,validPixelCount:i.numValidPixel,dimCount:i.numDims,dimStats:{minValues:i.minValues,maxValues:i.maxValues},maskData:t.pixels.resultMask};if(t.pixels.resultMask&&V.isValidPixelValue(i.imageType,r)){var g=t.pixels.resultMask;for(a=0;a<u;a++)g[a]||(c.pixelData[a]=r);c.noDataValue=r}return t.noDataValue=r,e.returnFileInfo&&(c.fileInfo=V.formatFileInfo(t)),c}},getBandCount:function(n){var e=0,r=0,a={};for(a.ptr=0,a.pixels={};r<n.byteLength-58;)V.readHeaderInfo(n,a),r+=a.headerInfo.blobSize,e++,a.ptr=r;return e}};return X}(),C=function(){var A=new ArrayBuffer(4),V=new Uint8Array(A),b=new Uint32Array(A);return b[0]=1,V[0]===1}(),re={decode:function(A,V){if(!C)throw"Big endian system is not supported.";V=V||{};var b=V.inputOffset||0,X=new Uint8Array(A,b,10),n=String.fromCharCode.apply(null,X),e,r;if(n.trim()==="CntZImage")e=D,r=1;else if(n.substring(0,5)==="Lerc2")e=se,r=2;else throw"Unexpected file identifier string: "+n;for(var a=0,t=A.byteLength-10,i,o=[],s,u,m={width:0,height:0,pixels:[],pixelType:V.pixelType,mask:null,statistics:[]};b<t;){var l=e.decode(A,{inputOffset:b,encodedMaskData:i,maskData:u,returnMask:a===0,returnEncodedMask:a===0,returnFileInfo:!0,pixelType:V.pixelType||null,noDataValue:V.noDataValue||null});b=l.fileInfo.eofOffset,a===0&&(i=l.encodedMaskData,u=l.maskData,m.width=l.width,m.height=l.height,m.dimCount=l.dimCount||1,m.pixelType=l.pixelType||l.fileInfo.pixelType,m.mask=l.maskData),r>1&&l.fileInfo.mask&&l.fileInfo.mask.numBytes>0&&o.push(l.maskData),a++,m.pixels.push(l.pixelData),m.statistics.push({minValue:l.minValue,maxValue:l.maxValue,noDataValue:l.noDataValue,dimStats:l.dimStats})}var f,h,c;if(r>1&&o.length>1){for(c=m.width*m.height,m.bandMasks=o,u=new Uint8Array(c),u.set(o[0]),f=1;f<o.length;f++)for(s=o[f],h=0;h<c;h++)u[h]=u[h]&s[h];m.maskData=u}return m}};typeof define=="function"&&define.amd?define([],function(){return re}):typeof Te<"u"&&Te.exports?Te.exports=re:this.Lerc=re})()});var Ur={NONE:0,LERC:1},or=Object.freeze(Ur);var Q={};Q.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var Ye=new ie,Tr=new xe,kr=new ie,yr=new ie;Q.computeVertices=function(D){if(!G(D)||!G(D.heightmap))throw new he("options.heightmap is required.");if(!G(D.width)||!G(D.height))throw new he("options.width and options.height are required.");if(!G(D.nativeRectangle))throw new he("options.nativeRectangle is required.");if(!G(D.skirtHeight))throw new he("options.skirtHeight is required.");let se=Math.cos,C=Math.sin,re=Math.sqrt,A=Math.atan,V=Math.exp,b=ge.PI_OVER_TWO,X=ge.toRadians,n=D.heightmap,e=D.width,r=D.height,a=D.skirtHeight,t=a>0,i=Y(D.isGeographic,!0),o=Y(D.ellipsoid,Ie.default),s=1/o.maximumRadius,u=ae.clone(D.nativeRectangle),m=ae.clone(D.rectangle),l,f,h,c;G(m)?(l=m.west,f=m.south,h=m.east,c=m.north):i?(l=X(u.west),f=X(u.south),h=X(u.east),c=X(u.north)):(l=u.west*s,f=b-2*A(V(-u.south*s)),h=u.east*s,c=b-2*A(V(-u.north*s)));let g=D.relativeToCenter,v=G(g);g=v?g:ie.ZERO;let U=Y(D.includeWebMercatorT,!1),M=Y(D.exaggeration,1),S=Y(D.exaggerationRelativeHeight,0),k=M!==1,w=Y(D.structure,Q.DEFAULT_STRUCTURE),d=Y(w.heightScale,Q.DEFAULT_STRUCTURE.heightScale),x=Y(w.heightOffset,Q.DEFAULT_STRUCTURE.heightOffset),T=Y(w.elementsPerHeight,Q.DEFAULT_STRUCTURE.elementsPerHeight),y=Y(w.stride,Q.DEFAULT_STRUCTURE.stride),p=Y(w.elementMultiplier,Q.DEFAULT_STRUCTURE.elementMultiplier),L=Y(w.isBigEndian,Q.DEFAULT_STRUCTURE.isBigEndian),B=ae.computeWidth(u),E=ae.computeHeight(u),O=B/(e-1),F=E/(r-1);i||(B*=s,E*=s);let N=o.radiiSquared,z=N.x,ke=N.y,ye=N.z,J=65536,Z=-65536,ue=rr.eastNorthUpToFixedFrame(g,o),te=xe.inverseTransformation(ue,Tr),j,q;U&&(j=Ue.geodeticLatitudeToMercatorAngle(f),q=1/(Ue.geodeticLatitudeToMercatorAngle(c)-j));let fe=kr;fe.x=Number.POSITIVE_INFINITY,fe.y=Number.POSITIVE_INFINITY,fe.z=Number.POSITIVE_INFINITY;let oe=yr;oe.x=Number.NEGATIVE_INFINITY,oe.y=Number.NEGATIVE_INFINITY,oe.z=Number.NEGATIVE_INFINITY;let Me=Number.POSITIVE_INFINITY,ce=e*r,mr=a>0?e*2+r*2:0,ne=ce+mr,ve=new Array(ne),Xe=new Array(ne),_e=new Array(ne),ze=U?new Array(ne):[],Ze=k?new Array(ne):[],Se=0,Ve=r,De=0,Ae=e;t&&(--Se,++Ve,--De,++Ae);let de=1e-5;for(let H=Se;H<Ve;++H){let K=H;K<0&&(K=0),K>=r&&(K=r-1);let W=u.north-F*K;i?W=X(W):W=b-2*A(V(-W*s));let Le=(W-f)/(c-f);Le=ge.clamp(Le,0,1);let we=H===Se,pe=H===Ve-1;a>0&&(we?W+=de*E:pe&&(W-=de*E));let Qe=se(W),Be=C(W),Je=ye*Be,Ke;U&&(Ke=(Ue.geodeticLatitudeToMercatorAngle(W)-j)*q);for(let me=De;me<Ae;++me){let $=me;$<0&&($=0),$>=e&&($=e-1);let Fe=K*(e*y)+$*y,R;if(T===1)R=n[Fe];else{R=0;let _;if(L)for(_=0;_<T;++_)R=R*p+n[Fe+_];else for(_=T-1;_>=0;--_)R=R*p+n[Fe+_]}R=R*d+x,Z=Math.max(Z,R),J=Math.min(J,R);let P=u.west+O*$;i?P=X(P):P=P*s;let be=(P-l)/(h-l);be=ge.clamp(be,0,1);let ee=K*e+$;if(a>0){let _=me===De,Re=me===Ae-1,pr=we||pe||_||Re;if((we||pe)&&(_||Re))continue;pr&&(R-=a,_?(ee=ce+(r-K-1),P-=de*B):pe?ee=ce+r+(e-$-1):Re?(ee=ce+r+e+K,P+=de*B):we&&(ee=ce+r+e+r+$))}let Ne=Qe*se(P),Ce=Qe*C(P),$e=z*Ne,Pe=ke*Ce,Oe=1/re($e*Ne+Pe*Ce+Je*Be),vr=$e*Oe,dr=Pe*Oe,wr=Je*Oe,le=new ie;le.x=vr+Ne*R,le.y=dr+Ce*R,le.z=wr+Be*R,xe.multiplyByPoint(te,le,Ye),ie.minimumByComponent(Ye,fe,fe),ie.maximumByComponent(Ye,oe,oe),Me=Math.min(Me,R),ve[ee]=le,_e[ee]=new er(be,Le),Xe[ee]=R,U&&(ze[ee]=Ke),k&&(Ze[ee]=o.geodeticSurfaceNormal(le))}}let hr=ir.fromPoints(ve),je;G(m)&&(je=ar.fromRectangle(m,J,Z,o));let qe;v&&(qe=new sr(o).computeHorizonCullingPointPossiblyUnderEllipsoid(g,ve,J));let gr=new nr(fe,oe,g),Ee=new fr(g,gr,Me,Z,ue,!1,U,k,M,S),We=new Float32Array(ne*Ee.stride),Ge=0;for(let H=0;H<ne;++H)Ge=Ee.encode(We,Ge,ve[H],_e[H],Xe[H],void 0,ze[H],Ze[H]);return{vertices:We,maximumHeight:Z,minimumHeight:J,encoding:Ee,boundingSphere3D:hr,orientedBoundingBox:je,occludeePointInScaledSpace:qe}};var lr=Q;var cr=xr(ur(),1);function Mr(D,se){if(D.encoding===or.LERC){let A;try{A=cr.default.decode(D.heightmap)}catch(b){throw new He(b)}if(A.statistics[0].minValue===Number.MAX_VALUE)throw new He("Invalid tile data");D.heightmap=A.pixels[0],D.width=A.width,D.height=A.height}D.ellipsoid=Ie.clone(D.ellipsoid),D.rectangle=ae.clone(D.rectangle);let C=lr.computeVertices(D),re=C.vertices;return se.push(re.buffer),{vertices:re.buffer,numberOfAttributes:C.encoding.stride,minimumHeight:C.minimumHeight,maximumHeight:C.maximumHeight,gridWidth:D.width,gridHeight:D.height,boundingSphere3D:C.boundingSphere3D,orientedBoundingBox:C.orientedBoundingBox,occludeePointInScaledSpace:C.occludeePointInScaledSpace,encoding:C.encoding,westIndicesSouthToNorth:C.westIndicesSouthToNorth,southIndicesEastToWest:C.southIndicesEastToWest,eastIndicesNorthToSouth:C.eastIndicesNorthToSouth,northIndicesWestToEast:C.northIndicesWestToEast}}var Pr=tr(Mr);export{Pr as default}; diff --git a/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js b/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js index 51be2e5..4508528 100644 --- a/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +++ b/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as Ct,b as vt}from"./chunk-XXATY55N.js";import{a as Mt}from"./chunk-4FSMRIBR.js";import{a as z}from"./chunk-7RBDS4IP.js";import"./chunk-ED2EM7ZX.js";import{a as Wt}from"./chunk-4IWHN7T4.js";import{a as X}from"./chunk-RQXB4B4V.js";import"./chunk-3FEM743H.js";import{b as U,g as bt,h as At}from"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as P,b as wt,c as lt,d as pt}from"./chunk-LJCGAQ64.js";import{a as f}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import{a as m}from"./chunk-5YVCOCPP.js";import{e as w}from"./chunk-U73D6PDD.js";function T(){m.throwInstantiationError()}Object.defineProperties(T.prototype,{errorEvent:{get:m.throwInstantiationError},credit:{get:m.throwInstantiationError},tilingScheme:{get:m.throwInstantiationError},hasWaterMask:{get:m.throwInstantiationError},hasVertexNormals:{get:m.throwInstantiationError},availability:{get:m.throwInstantiationError}});var Ot=[];T.getRegularGridIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=Ot[t];w(o)||(Ot[t]=o=[]);let e=o[n];return w(e)||(t*n<f.SIXTY_FOUR_KILOBYTES?e=o[n]=new Uint16Array((t-1)*(n-1)*6):e=o[n]=new Uint32Array((t-1)*(n-1)*6),Pt(t,n,e,0)),e};var Gt=[];T.getRegularGridIndicesAndEdgeIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=Gt[t];w(o)||(Gt[t]=o=[]);let e=o[n];if(!w(e)){let r=T.getRegularGridIndices(t,n),s=Lt(t,n),i=s.westIndicesSouthToNorth,c=s.southIndicesEastToWest,h=s.eastIndicesNorthToSouth,E=s.northIndicesWestToEast;e=o[n]={indices:r,westIndicesSouthToNorth:i,southIndicesEastToWest:c,eastIndicesNorthToSouth:h,northIndicesWestToEast:E}}return e};var kt=[];T.getRegularGridAndSkirtIndicesAndEdgeIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=kt[t];w(o)||(kt[t]=o=[]);let e=o[n];if(!w(e)){let r=t*n,s=(t-1)*(n-1)*6,i=t*2+n*2,c=Math.max(0,i-4)*6,h=r+i,E=s+c,g=Lt(t,n),d=g.westIndicesSouthToNorth,p=g.southIndicesEastToWest,b=g.eastIndicesNorthToSouth,L=g.northIndicesWestToEast,N=X.createTypedArray(h,E);Pt(t,n,N,0),T.addSkirtIndices(d,p,b,L,r,N,s),e=o[n]={indices:N,westIndicesSouthToNorth:d,southIndicesEastToWest:p,eastIndicesNorthToSouth:b,northIndicesWestToEast:L,indexCountWithoutSkirts:s}}return e};T.addSkirtIndices=function(t,n,o,e,r,s,i){let c=r;i=Z(t,c,s,i),c+=t.length,i=Z(n,c,s,i),c+=n.length,i=Z(o,c,s,i),c+=o.length,Z(e,c,s,i)};function Lt(t,n){let o=new Array(n),e=new Array(t),r=new Array(n),s=new Array(t),i;for(i=0;i<t;++i)s[i]=i,e[i]=t*n-1-i;for(i=0;i<n;++i)r[i]=(i+1)*t-1,o[i]=(n-i-1)*t;return{westIndicesSouthToNorth:o,southIndicesEastToWest:e,eastIndicesNorthToSouth:r,northIndicesWestToEast:s}}function Pt(t,n,o,e){let r=0;for(let s=0;s<n-1;++s){for(let i=0;i<t-1;++i){let c=r,h=c+t,E=h+1,g=c+1;o[e++]=c,o[e++]=h,o[e++]=g,o[e++]=g,o[e++]=h,o[e++]=E,++r}++r}}function Z(t,n,o,e){let r=t[0],s=t.length;for(let i=1;i<s;++i){let c=t[i];o[e++]=r,o[e++]=c,o[e++]=n,o[e++]=n,o[e++]=c,o[e++]=n+1,r=c,++n}return e}T.heightmapTerrainQuality=.25;T.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(t,n,o){return t.maximumRadius*2*Math.PI*T.heightmapTerrainQuality/(n*o)};T.prototype.requestTileGeometry=m.throwInstantiationError;T.prototype.getLevelMaximumGeometricError=m.throwInstantiationError;T.prototype.getTileDataAvailable=m.throwInstantiationError;T.prototype.loadTileDataAvailability=m.throwInstantiationError;var Vt=T;var ht=32767,D=new P,Xt=new P,Zt=new P,u=new wt,Y=new lt;function Jt(t,n){let o=t.quantizedVertices,e=o.length/3,r=t.octEncodedNormals,s=t.westIndices.length+t.eastIndices.length+t.southIndices.length+t.northIndices.length,i=t.includeWebMercatorT,c=t.exaggeration,h=t.exaggerationRelativeHeight,g=c!==1,d=At.clone(t.rectangle),p=d.west,b=d.south,L=d.east,N=d.north,I=pt.clone(t.ellipsoid),y=t.minimumHeight,v=t.maximumHeight,S=t.relativeToCenter,_=bt.eastNorthUpToFixedFrame(S,I),O=U.inverseTransformation(_,new U),G,A;i&&(G=z.geodeticLatitudeToMercatorAngle(b),A=1/(z.geodeticLatitudeToMercatorAngle(N)-G));let j=o.subarray(0,e),q=o.subarray(e,2*e),Q=o.subarray(e*2,3*e),R=w(r),l=new Array(e),M=new Array(e),et=new Array(e),It=i?new Array(e):[],gt=g?new Array(e):[],W=Xt;W.x=Number.POSITIVE_INFINITY,W.y=Number.POSITIVE_INFINITY,W.z=Number.POSITIVE_INFINITY;let C=Zt;C.x=Number.NEGATIVE_INFINITY,C.y=Number.NEGATIVE_INFINITY,C.z=Number.NEGATIVE_INFINITY;let ot=Number.POSITIVE_INFINITY,nt=Number.NEGATIVE_INFINITY,it=Number.POSITIVE_INFINITY,rt=Number.NEGATIVE_INFINITY;for(let a=0;a<e;++a){let x=j[a],Kt=q[a],St=x/ht,xt=Kt/ht,yt=f.lerp(y,v,Q[a]/ht);u.longitude=f.lerp(p,L,St),u.latitude=f.lerp(b,N,xt),u.height=yt,ot=Math.min(u.longitude,ot),nt=Math.max(u.longitude,nt),it=Math.min(u.latitude,it),rt=Math.max(u.latitude,rt);let dt=I.cartographicToCartesian(u);l[a]=new lt(St,xt),M[a]=yt,et[a]=dt,i&&(It[a]=(z.geodeticLatitudeToMercatorAngle(u.latitude)-G)*A),g&&(gt[a]=I.geodeticSurfaceNormal(dt)),U.multiplyByPoint(O,dt,D),P.minimumByComponent(D,W,W),P.maximumByComponent(D,C,C)}let st=tt(t.westIndices,function(a,x){return l[a].y-l[x].y}),ct=tt(t.eastIndices,function(a,x){return l[x].y-l[a].y}),at=tt(t.southIndices,function(a,x){return l[x].x-l[a].x}),ut=tt(t.northIndices,function(a,x){return l[a].x-l[x].x}),mt;y<0&&(mt=new Ct(I).computeHorizonCullingPointPossiblyUnderEllipsoid(S,et,y));let k=y;k=Math.min(k,J(t.westIndices,t.westSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.southIndices,t.southSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.eastIndices,t.eastSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.northIndices,t.northSkirtHeight,M,l,d,I,O,W,C));let Ft=new Wt(W,C,S),V=new vt(S,Ft,k,v,_,R,i,g,c,h),F=V.stride,Bt=e*F+s*F,B=new Float32Array(Bt),ft=0;for(let a=0;a<e;++a){if(R){let x=a*2;Y.x=r[x],Y.y=r[x+1]}ft=V.encode(B,ft,et[a],l[a],M[a],Y,It[a],gt[a])}let Ht=Math.max(0,(s-4)*2),_t=t.indices.length+Ht*3,K=X.createTypedArray(e+s,_t);K.set(t.indices,0);let Tt=1e-4,Et=(nt-ot)*Tt,Nt=(rt-it)*Tt,Yt=-Et,Rt=0,Ut=Et,zt=0,Dt=0,jt=Nt,qt=0,Qt=-Nt,H=e*F;return $(B,H,st,V,M,l,r,I,d,t.westSkirtHeight,G,A,Yt,Rt),H+=t.westIndices.length*F,$(B,H,at,V,M,l,r,I,d,t.southSkirtHeight,G,A,qt,Qt),H+=t.southIndices.length*F,$(B,H,ct,V,M,l,r,I,d,t.eastSkirtHeight,G,A,Ut,zt),H+=t.eastIndices.length*F,$(B,H,ut,V,M,l,r,I,d,t.northSkirtHeight,G,A,Dt,jt),Vt.addSkirtIndices(st,at,ct,ut,e,K,t.indices.length),n.push(B.buffer,K.buffer),{vertices:B.buffer,indices:K.buffer,westIndicesSouthToNorth:st,southIndicesEastToWest:at,eastIndicesNorthToSouth:ct,northIndicesWestToEast:ut,vertexStride:F,center:S,minimumHeight:y,maximumHeight:v,occludeePointInScaledSpace:mt,encoding:V,indexCountWithoutSkirts:t.indices.length}}function J(t,n,o,e,r,s,i,c,h){let E=Number.POSITIVE_INFINITY,g=r.north,d=r.south,p=r.east,b=r.west;p<b&&(p+=f.TWO_PI);let L=t.length;for(let N=0;N<L;++N){let I=t[N],y=o[I],v=e[I];u.longitude=f.lerp(b,p,v.x),u.latitude=f.lerp(d,g,v.y),u.height=y-n;let S=s.cartographicToCartesian(u,D);U.multiplyByPoint(i,S,S),P.minimumByComponent(S,c,c),P.maximumByComponent(S,h,h),E=Math.min(E,u.height)}return E}function $(t,n,o,e,r,s,i,c,h,E,g,d,p,b){let L=w(i),N=h.north,I=h.south,y=h.east,v=h.west;y<v&&(y+=f.TWO_PI);let S=o.length;for(let _=0;_<S;++_){let O=o[_],G=r[O],A=s[O];u.longitude=f.lerp(v,y,A.x)+p,u.latitude=f.lerp(I,N,A.y)+b,u.height=G-E;let j=c.cartographicToCartesian(u,D);if(L){let R=O*2;Y.x=i[R],Y.y=i[R+1]}let q;e.hasWebMercatorT&&(q=(z.geodeticLatitudeToMercatorAngle(u.latitude)-g)*d);let Q;e.hasGeodeticSurfaceNormals&&(Q=c.geodeticSurfaceNormal(j)),n=e.encode(t,n,j,A,u.height,Y,q,Q)}}function tt(t,n){let o;return typeof t.slice=="function"&&(o=t.slice(),typeof o.sort!="function"&&(o=void 0)),w(o)||(o=Array.prototype.slice.call(t)),o.sort(n),o}var Se=Mt(Jt);export{Se as default}; +import{a as Ct,b as vt}from"./chunk-CV7DLCWG.js";import{a as Mt}from"./chunk-PXCJYT2S.js";import{a as z}from"./chunk-SB224QGV.js";import"./chunk-ABGXSJNX.js";import{a as Wt}from"./chunk-4WRMLZA7.js";import{a as X}from"./chunk-P37AI2DW.js";import"./chunk-TMSETF7M.js";import{b as U,g as bt,h as At}from"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as P,b as wt,c as lt,d as pt}from"./chunk-POASMU2N.js";import{a as f}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import{a as m}from"./chunk-UH2WFNTA.js";import{e as w}from"./chunk-PEYJTJPE.js";function T(){m.throwInstantiationError()}Object.defineProperties(T.prototype,{errorEvent:{get:m.throwInstantiationError},credit:{get:m.throwInstantiationError},tilingScheme:{get:m.throwInstantiationError},hasWaterMask:{get:m.throwInstantiationError},hasVertexNormals:{get:m.throwInstantiationError},availability:{get:m.throwInstantiationError}});var Ot=[];T.getRegularGridIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=Ot[t];w(o)||(Ot[t]=o=[]);let e=o[n];return w(e)||(t*n<f.SIXTY_FOUR_KILOBYTES?e=o[n]=new Uint16Array((t-1)*(n-1)*6):e=o[n]=new Uint32Array((t-1)*(n-1)*6),Pt(t,n,e,0)),e};var Gt=[];T.getRegularGridIndicesAndEdgeIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=Gt[t];w(o)||(Gt[t]=o=[]);let e=o[n];if(!w(e)){let r=T.getRegularGridIndices(t,n),s=Lt(t,n),i=s.westIndicesSouthToNorth,c=s.southIndicesEastToWest,h=s.eastIndicesNorthToSouth,E=s.northIndicesWestToEast;e=o[n]={indices:r,westIndicesSouthToNorth:i,southIndicesEastToWest:c,eastIndicesNorthToSouth:h,northIndicesWestToEast:E}}return e};var kt=[];T.getRegularGridAndSkirtIndicesAndEdgeIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=kt[t];w(o)||(kt[t]=o=[]);let e=o[n];if(!w(e)){let r=t*n,s=(t-1)*(n-1)*6,i=t*2+n*2,c=Math.max(0,i-4)*6,h=r+i,E=s+c,g=Lt(t,n),d=g.westIndicesSouthToNorth,p=g.southIndicesEastToWest,b=g.eastIndicesNorthToSouth,L=g.northIndicesWestToEast,N=X.createTypedArray(h,E);Pt(t,n,N,0),T.addSkirtIndices(d,p,b,L,r,N,s),e=o[n]={indices:N,westIndicesSouthToNorth:d,southIndicesEastToWest:p,eastIndicesNorthToSouth:b,northIndicesWestToEast:L,indexCountWithoutSkirts:s}}return e};T.addSkirtIndices=function(t,n,o,e,r,s,i){let c=r;i=Z(t,c,s,i),c+=t.length,i=Z(n,c,s,i),c+=n.length,i=Z(o,c,s,i),c+=o.length,Z(e,c,s,i)};function Lt(t,n){let o=new Array(n),e=new Array(t),r=new Array(n),s=new Array(t),i;for(i=0;i<t;++i)s[i]=i,e[i]=t*n-1-i;for(i=0;i<n;++i)r[i]=(i+1)*t-1,o[i]=(n-i-1)*t;return{westIndicesSouthToNorth:o,southIndicesEastToWest:e,eastIndicesNorthToSouth:r,northIndicesWestToEast:s}}function Pt(t,n,o,e){let r=0;for(let s=0;s<n-1;++s){for(let i=0;i<t-1;++i){let c=r,h=c+t,E=h+1,g=c+1;o[e++]=c,o[e++]=h,o[e++]=g,o[e++]=g,o[e++]=h,o[e++]=E,++r}++r}}function Z(t,n,o,e){let r=t[0],s=t.length;for(let i=1;i<s;++i){let c=t[i];o[e++]=r,o[e++]=c,o[e++]=n,o[e++]=n,o[e++]=c,o[e++]=n+1,r=c,++n}return e}T.heightmapTerrainQuality=.25;T.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(t,n,o){return t.maximumRadius*2*Math.PI*T.heightmapTerrainQuality/(n*o)};T.prototype.requestTileGeometry=m.throwInstantiationError;T.prototype.getLevelMaximumGeometricError=m.throwInstantiationError;T.prototype.getTileDataAvailable=m.throwInstantiationError;T.prototype.loadTileDataAvailability=m.throwInstantiationError;var Vt=T;var ht=32767,D=new P,Xt=new P,Zt=new P,u=new wt,Y=new lt;function Jt(t,n){let o=t.quantizedVertices,e=o.length/3,r=t.octEncodedNormals,s=t.westIndices.length+t.eastIndices.length+t.southIndices.length+t.northIndices.length,i=t.includeWebMercatorT,c=t.exaggeration,h=t.exaggerationRelativeHeight,g=c!==1,d=At.clone(t.rectangle),p=d.west,b=d.south,L=d.east,N=d.north,I=pt.clone(t.ellipsoid),y=t.minimumHeight,v=t.maximumHeight,S=t.relativeToCenter,_=bt.eastNorthUpToFixedFrame(S,I),O=U.inverseTransformation(_,new U),G,A;i&&(G=z.geodeticLatitudeToMercatorAngle(b),A=1/(z.geodeticLatitudeToMercatorAngle(N)-G));let j=o.subarray(0,e),q=o.subarray(e,2*e),Q=o.subarray(e*2,3*e),R=w(r),l=new Array(e),M=new Array(e),et=new Array(e),It=i?new Array(e):[],gt=g?new Array(e):[],W=Xt;W.x=Number.POSITIVE_INFINITY,W.y=Number.POSITIVE_INFINITY,W.z=Number.POSITIVE_INFINITY;let C=Zt;C.x=Number.NEGATIVE_INFINITY,C.y=Number.NEGATIVE_INFINITY,C.z=Number.NEGATIVE_INFINITY;let ot=Number.POSITIVE_INFINITY,nt=Number.NEGATIVE_INFINITY,it=Number.POSITIVE_INFINITY,rt=Number.NEGATIVE_INFINITY;for(let a=0;a<e;++a){let x=j[a],Kt=q[a],St=x/ht,xt=Kt/ht,yt=f.lerp(y,v,Q[a]/ht);u.longitude=f.lerp(p,L,St),u.latitude=f.lerp(b,N,xt),u.height=yt,ot=Math.min(u.longitude,ot),nt=Math.max(u.longitude,nt),it=Math.min(u.latitude,it),rt=Math.max(u.latitude,rt);let dt=I.cartographicToCartesian(u);l[a]=new lt(St,xt),M[a]=yt,et[a]=dt,i&&(It[a]=(z.geodeticLatitudeToMercatorAngle(u.latitude)-G)*A),g&&(gt[a]=I.geodeticSurfaceNormal(dt)),U.multiplyByPoint(O,dt,D),P.minimumByComponent(D,W,W),P.maximumByComponent(D,C,C)}let st=tt(t.westIndices,function(a,x){return l[a].y-l[x].y}),ct=tt(t.eastIndices,function(a,x){return l[x].y-l[a].y}),at=tt(t.southIndices,function(a,x){return l[x].x-l[a].x}),ut=tt(t.northIndices,function(a,x){return l[a].x-l[x].x}),mt;y<0&&(mt=new Ct(I).computeHorizonCullingPointPossiblyUnderEllipsoid(S,et,y));let k=y;k=Math.min(k,J(t.westIndices,t.westSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.southIndices,t.southSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.eastIndices,t.eastSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.northIndices,t.northSkirtHeight,M,l,d,I,O,W,C));let Ft=new Wt(W,C,S),V=new vt(S,Ft,k,v,_,R,i,g,c,h),F=V.stride,Bt=e*F+s*F,B=new Float32Array(Bt),ft=0;for(let a=0;a<e;++a){if(R){let x=a*2;Y.x=r[x],Y.y=r[x+1]}ft=V.encode(B,ft,et[a],l[a],M[a],Y,It[a],gt[a])}let Ht=Math.max(0,(s-4)*2),_t=t.indices.length+Ht*3,K=X.createTypedArray(e+s,_t);K.set(t.indices,0);let Tt=1e-4,Et=(nt-ot)*Tt,Nt=(rt-it)*Tt,Yt=-Et,Rt=0,Ut=Et,zt=0,Dt=0,jt=Nt,qt=0,Qt=-Nt,H=e*F;return $(B,H,st,V,M,l,r,I,d,t.westSkirtHeight,G,A,Yt,Rt),H+=t.westIndices.length*F,$(B,H,at,V,M,l,r,I,d,t.southSkirtHeight,G,A,qt,Qt),H+=t.southIndices.length*F,$(B,H,ct,V,M,l,r,I,d,t.eastSkirtHeight,G,A,Ut,zt),H+=t.eastIndices.length*F,$(B,H,ut,V,M,l,r,I,d,t.northSkirtHeight,G,A,Dt,jt),Vt.addSkirtIndices(st,at,ct,ut,e,K,t.indices.length),n.push(B.buffer,K.buffer),{vertices:B.buffer,indices:K.buffer,westIndicesSouthToNorth:st,southIndicesEastToWest:at,eastIndicesNorthToSouth:ct,northIndicesWestToEast:ut,vertexStride:F,center:S,minimumHeight:y,maximumHeight:v,occludeePointInScaledSpace:mt,encoding:V,indexCountWithoutSkirts:t.indices.length}}function J(t,n,o,e,r,s,i,c,h){let E=Number.POSITIVE_INFINITY,g=r.north,d=r.south,p=r.east,b=r.west;p<b&&(p+=f.TWO_PI);let L=t.length;for(let N=0;N<L;++N){let I=t[N],y=o[I],v=e[I];u.longitude=f.lerp(b,p,v.x),u.latitude=f.lerp(d,g,v.y),u.height=y-n;let S=s.cartographicToCartesian(u,D);U.multiplyByPoint(i,S,S),P.minimumByComponent(S,c,c),P.maximumByComponent(S,h,h),E=Math.min(E,u.height)}return E}function $(t,n,o,e,r,s,i,c,h,E,g,d,p,b){let L=w(i),N=h.north,I=h.south,y=h.east,v=h.west;y<v&&(y+=f.TWO_PI);let S=o.length;for(let _=0;_<S;++_){let O=o[_],G=r[O],A=s[O];u.longitude=f.lerp(v,y,A.x)+p,u.latitude=f.lerp(I,N,A.y)+b,u.height=G-E;let j=c.cartographicToCartesian(u,D);if(L){let R=O*2;Y.x=i[R],Y.y=i[R+1]}let q;e.hasWebMercatorT&&(q=(z.geodeticLatitudeToMercatorAngle(u.latitude)-g)*d);let Q;e.hasGeodeticSurfaceNormals&&(Q=c.geodeticSurfaceNormal(j)),n=e.encode(t,n,j,A,u.height,Y,q,Q)}}function tt(t,n){let o;return typeof t.slice=="function"&&(o=t.slice(),typeof o.sort!="function"&&(o=void 0)),w(o)||(o=Array.prototype.slice.call(t)),o.sort(n),o}var Se=Mt(Jt);export{Se as default}; diff --git a/cesium/Workers/createWallGeometry.js b/cesium/Workers/createWallGeometry.js index 3935889..3a38444 100644 --- a/cesium/Workers/createWallGeometry.js +++ b/cesium/Workers/createWallGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as nt}from"./chunk-4C7K4BFS.js";import"./chunk-WIE5YNSS.js";import"./chunk-65DFAZKW.js";import{a as _}from"./chunk-DUVNED7U.js";import"./chunk-CIEXTRKV.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as ot}from"./chunk-RQXB4B4V.js";import{a as it}from"./chunk-MPVEZNKB.js";import{b as tt,c as et,d as R}from"./chunk-FATK2EQ2.js";import{d as I}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as S}from"./chunk-77ESX6BV.js";import{a as s,d as l}from"./chunk-LJCGAQ64.js";import{a as J}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as w}from"./chunk-42NIXFVW.js";import{a as P}from"./chunk-5YVCOCPP.js";import{e as r}from"./chunk-U73D6PDD.js";var Q=new s,Y=new s,lt=new s,st=new s,pt=new s,ut=new s,ft=new s;function k(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.maximumHeights,n=t.minimumHeights;if(!r(e))throw new P("options.positions is required.");if(r(o)&&o.length!==e.length)throw new P("options.positions and options.maximumHeights must have the same length.");if(r(n)&&n.length!==e.length)throw new P("options.positions and options.minimumHeights must have the same length.");let i=w(t.vertexFormat,_.DEFAULT),c=w(t.granularity,J.RADIANS_PER_DEGREE),a=w(t.ellipsoid,l.WGS84);this._positions=e,this._minimumHeights=n,this._maximumHeights=o,this._vertexFormat=_.clone(i),this._granularity=c,this._ellipsoid=l.clone(a),this._workerName="createWallGeometry";let m=1+e.length*s.packedLength+2;r(n)&&(m+=n.length),r(o)&&(m+=o.length),this.packedLength=m+l.packedLength+_.packedLength+1}k.pack=function(t,e,o){if(!r(t))throw new P("value is required");if(!r(e))throw new P("array is required");o=w(o,0);let n,i=t._positions,c=i.length;for(e[o++]=c,n=0;n<c;++n,o+=s.packedLength)s.pack(i[n],e,o);let a=t._minimumHeights;if(c=r(a)?a.length:0,e[o++]=c,r(a))for(n=0;n<c;++n)e[o++]=a[n];let m=t._maximumHeights;if(c=r(m)?m.length:0,e[o++]=c,r(m))for(n=0;n<c;++n)e[o++]=m[n];return l.pack(t._ellipsoid,e,o),o+=l.packedLength,_.pack(t._vertexFormat,e,o),o+=_.packedLength,e[o]=t._granularity,e};var mt=l.clone(l.UNIT_SPHERE),rt=new _,M={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:mt,vertexFormat:rt,granularity:void 0};k.unpack=function(t,e,o){if(!r(t))throw new P("array is required");e=w(e,0);let n,i=t[e++],c=new Array(i);for(n=0;n<i;++n,e+=s.packedLength)c[n]=s.unpack(t,e);i=t[e++];let a;if(i>0)for(a=new Array(i),n=0;n<i;++n)a[n]=t[e++];i=t[e++];let m;if(i>0)for(m=new Array(i),n=0;n<i;++n)m[n]=t[e++];let q=l.unpack(t,e,mt);e+=l.packedLength;let H=_.unpack(t,e,rt);e+=_.packedLength;let f=t[e];return r(o)?(o._positions=c,o._minimumHeights=a,o._maximumHeights=m,o._ellipsoid=l.clone(q,o._ellipsoid),o._vertexFormat=_.clone(H,o._vertexFormat),o._granularity=f,o):(M.positions=c,M.minimumHeights=a,M.maximumHeights=m,M.granularity=f,new k(M))};k.fromConstantHeights=function(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions;if(!r(e))throw new P("options.positions is required.");let o,n,i=t.minimumHeight,c=t.maximumHeight,a=r(i),m=r(c);if(a||m){let H=e.length;o=a?new Array(H):void 0,n=m?new Array(H):void 0;for(let f=0;f<H;++f)a&&(o[f]=i),m&&(n[f]=c)}let q={positions:e,maximumHeights:n,minimumHeights:o,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat};return new k(q)};k.createGeometry=function(t){let e=t._positions,o=t._minimumHeights,n=t._maximumHeights,i=t._vertexFormat,c=t._granularity,a=t._ellipsoid,m=nt.computePositions(a,e,n,o,c,!0);if(!r(m))return;let q=m.bottomPositions,H=m.topPositions,f=m.numCorners,W=H.length,y=W*2,h=i.position?new Float64Array(y):void 0,b=i.normal?new Float32Array(y):void 0,x=i.tangent?new Float32Array(y):void 0,F=i.bitangent?new Float32Array(y):void 0,B=i.st?new Float32Array(y/3*2):void 0,v=0,T=0,C=0,z=0,U=0,g=ft,d=ut,A=pt,Z=!0;W/=3;let p,j=0,ct=1/(W-f-1);for(p=0;p<W;++p){let E=p*3,u=s.fromArray(H,E,Q),G=s.fromArray(q,E,Y);if(i.position&&(h[v++]=G.x,h[v++]=G.y,h[v++]=G.z,h[v++]=u.x,h[v++]=u.y,h[v++]=u.z),i.st&&(B[U++]=j,B[U++]=0,B[U++]=j,B[U++]=1),i.normal||i.tangent||i.bitangent){let N=s.clone(s.ZERO,st),K=s.subtract(u,a.geodeticSurfaceNormal(u,Y),Y);if(p+1<W&&(N=s.fromArray(H,E+3,st)),Z){let V=s.subtract(N,u,lt),at=s.subtract(K,u,Q);g=s.normalize(s.cross(at,V,g),g),Z=!1}s.equalsEpsilon(u,N,J.EPSILON10)?Z=!0:(j+=ct,i.tangent&&(d=s.normalize(s.subtract(N,u,d),d)),i.bitangent&&(A=s.normalize(s.cross(g,d,A),A))),i.normal&&(b[T++]=g.x,b[T++]=g.y,b[T++]=g.z,b[T++]=g.x,b[T++]=g.y,b[T++]=g.z),i.tangent&&(x[z++]=d.x,x[z++]=d.y,x[z++]=d.z,x[z++]=d.x,x[z++]=d.y,x[z++]=d.z),i.bitangent&&(F[C++]=A.x,F[C++]=A.y,F[C++]=A.z,F[C++]=A.x,F[C++]=A.y,F[C++]=A.z)}}let D=new it;i.position&&(D.position=new R({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:h})),i.normal&&(D.normal=new R({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:b})),i.tangent&&(D.tangent=new R({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:x})),i.bitangent&&(D.bitangent=new R({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:F})),i.st&&(D.st=new R({componentDatatype:S.FLOAT,componentsPerAttribute:2,values:B}));let $=y/3;y-=6*(f+1);let L=ot.createTypedArray($,y),O=0;for(p=0;p<$-2;p+=2){let E=p,u=p+2,G=s.fromArray(h,E*3,Q),N=s.fromArray(h,u*3,Y);if(s.equalsEpsilon(G,N,J.EPSILON10))continue;let K=p+1,V=p+3;L[O++]=K,L[O++]=E,L[O++]=V,L[O++]=V,L[O++]=E,L[O++]=u}return new et({attributes:D,indices:L,primitiveType:tt.TRIANGLES,boundingSphere:new I.fromVertices(h)})};var X=k;function ht(t,e){return r(e)&&(t=X.unpack(t,e)),t._ellipsoid=l.clone(t._ellipsoid),X.createGeometry(t)}var Ot=ht;export{Ot as default}; +import{a as nt}from"./chunk-IRH46BDL.js";import"./chunk-AMQUWUD4.js";import"./chunk-W23CU777.js";import{a as _}from"./chunk-HEEMUCG6.js";import"./chunk-RXTBM4OI.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as ot}from"./chunk-P37AI2DW.js";import{a as it}from"./chunk-T6BE4RZK.js";import{b as tt,c as et,d as S}from"./chunk-X5IHHI6X.js";import{d as I}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as R}from"./chunk-KZNJOCYU.js";import{a as s,d as l}from"./chunk-POASMU2N.js";import{a as J}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as w}from"./chunk-IUA6FAOZ.js";import{a as P}from"./chunk-UH2WFNTA.js";import{e as r}from"./chunk-PEYJTJPE.js";var Q=new s,Y=new s,lt=new s,st=new s,pt=new s,ut=new s,ft=new s;function k(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.maximumHeights,n=t.minimumHeights;if(!r(e))throw new P("options.positions is required.");if(r(o)&&o.length!==e.length)throw new P("options.positions and options.maximumHeights must have the same length.");if(r(n)&&n.length!==e.length)throw new P("options.positions and options.minimumHeights must have the same length.");let i=w(t.vertexFormat,_.DEFAULT),c=w(t.granularity,J.RADIANS_PER_DEGREE),a=w(t.ellipsoid,l.default);this._positions=e,this._minimumHeights=n,this._maximumHeights=o,this._vertexFormat=_.clone(i),this._granularity=c,this._ellipsoid=l.clone(a),this._workerName="createWallGeometry";let m=1+e.length*s.packedLength+2;r(n)&&(m+=n.length),r(o)&&(m+=o.length),this.packedLength=m+l.packedLength+_.packedLength+1}k.pack=function(t,e,o){if(!r(t))throw new P("value is required");if(!r(e))throw new P("array is required");o=w(o,0);let n,i=t._positions,c=i.length;for(e[o++]=c,n=0;n<c;++n,o+=s.packedLength)s.pack(i[n],e,o);let a=t._minimumHeights;if(c=r(a)?a.length:0,e[o++]=c,r(a))for(n=0;n<c;++n)e[o++]=a[n];let m=t._maximumHeights;if(c=r(m)?m.length:0,e[o++]=c,r(m))for(n=0;n<c;++n)e[o++]=m[n];return l.pack(t._ellipsoid,e,o),o+=l.packedLength,_.pack(t._vertexFormat,e,o),o+=_.packedLength,e[o]=t._granularity,e};var mt=l.clone(l.UNIT_SPHERE),rt=new _,V={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:mt,vertexFormat:rt,granularity:void 0};k.unpack=function(t,e,o){if(!r(t))throw new P("array is required");e=w(e,0);let n,i=t[e++],c=new Array(i);for(n=0;n<i;++n,e+=s.packedLength)c[n]=s.unpack(t,e);i=t[e++];let a;if(i>0)for(a=new Array(i),n=0;n<i;++n)a[n]=t[e++];i=t[e++];let m;if(i>0)for(m=new Array(i),n=0;n<i;++n)m[n]=t[e++];let q=l.unpack(t,e,mt);e+=l.packedLength;let H=_.unpack(t,e,rt);e+=_.packedLength;let f=t[e];return r(o)?(o._positions=c,o._minimumHeights=a,o._maximumHeights=m,o._ellipsoid=l.clone(q,o._ellipsoid),o._vertexFormat=_.clone(H,o._vertexFormat),o._granularity=f,o):(V.positions=c,V.minimumHeights=a,V.maximumHeights=m,V.granularity=f,new k(V))};k.fromConstantHeights=function(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions;if(!r(e))throw new P("options.positions is required.");let o,n,i=t.minimumHeight,c=t.maximumHeight,a=r(i),m=r(c);if(a||m){let H=e.length;o=a?new Array(H):void 0,n=m?new Array(H):void 0;for(let f=0;f<H;++f)a&&(o[f]=i),m&&(n[f]=c)}let q={positions:e,maximumHeights:n,minimumHeights:o,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat};return new k(q)};k.createGeometry=function(t){let e=t._positions,o=t._minimumHeights,n=t._maximumHeights,i=t._vertexFormat,c=t._granularity,a=t._ellipsoid,m=nt.computePositions(a,e,n,o,c,!0);if(!r(m))return;let q=m.bottomPositions,H=m.topPositions,f=m.numCorners,B=H.length,y=B*2,h=i.position?new Float64Array(y):void 0,b=i.normal?new Float32Array(y):void 0,x=i.tangent?new Float32Array(y):void 0,F=i.bitangent?new Float32Array(y):void 0,M=i.st?new Float32Array(y/3*2):void 0,v=0,T=0,C=0,z=0,W=0,g=ft,d=ut,A=pt,Z=!0;B/=3;let p,j=0,ct=1/(B-f-1);for(p=0;p<B;++p){let E=p*3,u=s.fromArray(H,E,Q),U=s.fromArray(q,E,Y);if(i.position&&(h[v++]=U.x,h[v++]=U.y,h[v++]=U.z,h[v++]=u.x,h[v++]=u.y,h[v++]=u.z),i.st&&(M[W++]=j,M[W++]=0,M[W++]=j,M[W++]=1),i.normal||i.tangent||i.bitangent){let N=s.clone(s.ZERO,st),K=s.subtract(u,a.geodeticSurfaceNormal(u,Y),Y);if(p+1<B&&(N=s.fromArray(H,E+3,st)),Z){let G=s.subtract(N,u,lt),at=s.subtract(K,u,Q);g=s.normalize(s.cross(at,G,g),g),Z=!1}s.equalsEpsilon(u,N,J.EPSILON10)?Z=!0:(j+=ct,i.tangent&&(d=s.normalize(s.subtract(N,u,d),d)),i.bitangent&&(A=s.normalize(s.cross(g,d,A),A))),i.normal&&(b[T++]=g.x,b[T++]=g.y,b[T++]=g.z,b[T++]=g.x,b[T++]=g.y,b[T++]=g.z),i.tangent&&(x[z++]=d.x,x[z++]=d.y,x[z++]=d.z,x[z++]=d.x,x[z++]=d.y,x[z++]=d.z),i.bitangent&&(F[C++]=A.x,F[C++]=A.y,F[C++]=A.z,F[C++]=A.x,F[C++]=A.y,F[C++]=A.z)}}let D=new it;i.position&&(D.position=new S({componentDatatype:R.DOUBLE,componentsPerAttribute:3,values:h})),i.normal&&(D.normal=new S({componentDatatype:R.FLOAT,componentsPerAttribute:3,values:b})),i.tangent&&(D.tangent=new S({componentDatatype:R.FLOAT,componentsPerAttribute:3,values:x})),i.bitangent&&(D.bitangent=new S({componentDatatype:R.FLOAT,componentsPerAttribute:3,values:F})),i.st&&(D.st=new S({componentDatatype:R.FLOAT,componentsPerAttribute:2,values:M}));let $=y/3;y-=6*(f+1);let L=ot.createTypedArray($,y),O=0;for(p=0;p<$-2;p+=2){let E=p,u=p+2,U=s.fromArray(h,E*3,Q),N=s.fromArray(h,u*3,Y);if(s.equalsEpsilon(U,N,J.EPSILON10))continue;let K=p+1,G=p+3;L[O++]=K,L[O++]=E,L[O++]=G,L[O++]=G,L[O++]=E,L[O++]=u}return new et({attributes:D,indices:L,primitiveType:tt.TRIANGLES,boundingSphere:new I.fromVertices(h)})};var X=k;function ht(t,e){return r(e)&&(t=X.unpack(t,e)),t._ellipsoid=l.clone(t._ellipsoid),X.createGeometry(t)}var Ot=ht;export{Ot as default}; diff --git a/cesium/Workers/createWallOutlineGeometry.js b/cesium/Workers/createWallOutlineGeometry.js index 13e3106..8a94fbb 100644 --- a/cesium/Workers/createWallOutlineGeometry.js +++ b/cesium/Workers/createWallOutlineGeometry.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as B}from"./chunk-4C7K4BFS.js";import"./chunk-WIE5YNSS.js";import"./chunk-65DFAZKW.js";import"./chunk-CIEXTRKV.js";import"./chunk-OSVMDAN4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as N}from"./chunk-RQXB4B4V.js";import{a as M}from"./chunk-MPVEZNKB.js";import{b as q,c as R,d as W}from"./chunk-FATK2EQ2.js";import{d as D}from"./chunk-3FEM743H.js";import"./chunk-CMXCDAKR.js";import{a as S}from"./chunk-77ESX6BV.js";import{a as p,d as l}from"./chunk-LJCGAQ64.js";import{a as O}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import{a as d}from"./chunk-42NIXFVW.js";import{a as _}from"./chunk-5YVCOCPP.js";import{e as m}from"./chunk-U73D6PDD.js";var G=new p,U=new p;function w(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions,e=i.maximumHeights,o=i.minimumHeights;if(!m(t))throw new _("options.positions is required.");if(m(e)&&e.length!==t.length)throw new _("options.positions and options.maximumHeights must have the same length.");if(m(o)&&o.length!==t.length)throw new _("options.positions and options.minimumHeights must have the same length.");let s=d(i.granularity,O.RADIANS_PER_DEGREE),r=d(i.ellipsoid,l.WGS84);this._positions=t,this._minimumHeights=o,this._maximumHeights=e,this._granularity=s,this._ellipsoid=l.clone(r),this._workerName="createWallOutlineGeometry";let n=1+t.length*p.packedLength+2;m(o)&&(n+=o.length),m(e)&&(n+=e.length),this.packedLength=n+l.packedLength+1}w.pack=function(i,t,e){if(!m(i))throw new _("value is required");if(!m(t))throw new _("array is required");e=d(e,0);let o,s=i._positions,r=s.length;for(t[e++]=r,o=0;o<r;++o,e+=p.packedLength)p.pack(s[o],t,e);let n=i._minimumHeights;if(r=m(n)?n.length:0,t[e++]=r,m(n))for(o=0;o<r;++o)t[e++]=n[o];let c=i._maximumHeights;if(r=m(c)?c.length:0,t[e++]=r,m(c))for(o=0;o<r;++o)t[e++]=c[o];return l.pack(i._ellipsoid,t,e),e+=l.packedLength,t[e]=i._granularity,t};var z=l.clone(l.UNIT_SPHERE),b={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:z,granularity:void 0};w.unpack=function(i,t,e){if(!m(i))throw new _("array is required");t=d(t,0);let o,s=i[t++],r=new Array(s);for(o=0;o<s;++o,t+=p.packedLength)r[o]=p.unpack(i,t);s=i[t++];let n;if(s>0)for(n=new Array(s),o=0;o<s;++o)n[o]=i[t++];s=i[t++];let c;if(s>0)for(c=new Array(s),o=0;o<s;++o)c[o]=i[t++];let E=l.unpack(i,t,z);t+=l.packedLength;let u=i[t];return m(e)?(e._positions=r,e._minimumHeights=n,e._maximumHeights=c,e._ellipsoid=l.clone(E,e._ellipsoid),e._granularity=u,e):(b.positions=r,b.minimumHeights=n,b.maximumHeights=c,b.granularity=u,new w(b))};w.fromConstantHeights=function(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions;if(!m(t))throw new _("options.positions is required.");let e,o,s=i.minimumHeight,r=i.maximumHeight,n=m(s),c=m(r);if(n||c){let u=t.length;e=n?new Array(u):void 0,o=c?new Array(u):void 0;for(let g=0;g<u;++g)n&&(e[g]=s),c&&(o[g]=r)}let E={positions:t,maximumHeights:o,minimumHeights:e,ellipsoid:i.ellipsoid};return new w(E)};w.createGeometry=function(i){let t=i._positions,e=i._minimumHeights,o=i._maximumHeights,s=i._granularity,r=i._ellipsoid,n=B.computePositions(r,t,o,e,s,!1);if(!m(n))return;let c=n.bottomPositions,E=n.topPositions,u=E.length,g=u*2,f=new Float64Array(g),P=0;u/=3;let h;for(h=0;h<u;++h){let A=h*3,k=p.fromArray(E,A,G),L=p.fromArray(c,A,U);f[P++]=L.x,f[P++]=L.y,f[P++]=L.z,f[P++]=k.x,f[P++]=k.y,f[P++]=k.z}let V=new M({position:new W({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:f})}),y=g/3;g=2*y-4+y;let a=N.createTypedArray(y,g),H=0;for(h=0;h<y-2;h+=2){let A=h,k=h+2,L=p.fromArray(f,A*3,G),v=p.fromArray(f,k*3,U);if(p.equalsEpsilon(L,v,O.EPSILON10))continue;let T=h+1,x=h+3;a[H++]=T,a[H++]=A,a[H++]=T,a[H++]=x,a[H++]=A,a[H++]=k}return a[H++]=y-2,a[H++]=y-1,new R({attributes:V,indices:a,primitiveType:q.LINES,boundingSphere:new D.fromVertices(f)})};var C=w;function J(i,t){return m(t)&&(i=C.unpack(i,t)),i._ellipsoid=l.clone(i._ellipsoid),C.createGeometry(i)}var pi=J;export{pi as default}; +import{a as B}from"./chunk-IRH46BDL.js";import"./chunk-AMQUWUD4.js";import"./chunk-W23CU777.js";import"./chunk-RXTBM4OI.js";import"./chunk-FYOYUPXG.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as W}from"./chunk-P37AI2DW.js";import{a as N}from"./chunk-T6BE4RZK.js";import{b as R,c as S,d as M}from"./chunk-X5IHHI6X.js";import{d as D}from"./chunk-TMSETF7M.js";import"./chunk-7Z5IIKOJ.js";import{a as q}from"./chunk-KZNJOCYU.js";import{a as p,d as l}from"./chunk-POASMU2N.js";import{a as O}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import{a as d}from"./chunk-IUA6FAOZ.js";import{a as _}from"./chunk-UH2WFNTA.js";import{e as m}from"./chunk-PEYJTJPE.js";var U=new p,z=new p;function w(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions,e=i.maximumHeights,o=i.minimumHeights;if(!m(t))throw new _("options.positions is required.");if(m(e)&&e.length!==t.length)throw new _("options.positions and options.maximumHeights must have the same length.");if(m(o)&&o.length!==t.length)throw new _("options.positions and options.minimumHeights must have the same length.");let s=d(i.granularity,O.RADIANS_PER_DEGREE),r=d(i.ellipsoid,l.default);this._positions=t,this._minimumHeights=o,this._maximumHeights=e,this._granularity=s,this._ellipsoid=l.clone(r),this._workerName="createWallOutlineGeometry";let n=1+t.length*p.packedLength+2;m(o)&&(n+=o.length),m(e)&&(n+=e.length),this.packedLength=n+l.packedLength+1}w.pack=function(i,t,e){if(!m(i))throw new _("value is required");if(!m(t))throw new _("array is required");e=d(e,0);let o,s=i._positions,r=s.length;for(t[e++]=r,o=0;o<r;++o,e+=p.packedLength)p.pack(s[o],t,e);let n=i._minimumHeights;if(r=m(n)?n.length:0,t[e++]=r,m(n))for(o=0;o<r;++o)t[e++]=n[o];let c=i._maximumHeights;if(r=m(c)?c.length:0,t[e++]=r,m(c))for(o=0;o<r;++o)t[e++]=c[o];return l.pack(i._ellipsoid,t,e),e+=l.packedLength,t[e]=i._granularity,t};var G=l.clone(l.UNIT_SPHERE),b={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:G,granularity:void 0};w.unpack=function(i,t,e){if(!m(i))throw new _("array is required");t=d(t,0);let o,s=i[t++],r=new Array(s);for(o=0;o<s;++o,t+=p.packedLength)r[o]=p.unpack(i,t);s=i[t++];let n;if(s>0)for(n=new Array(s),o=0;o<s;++o)n[o]=i[t++];s=i[t++];let c;if(s>0)for(c=new Array(s),o=0;o<s;++o)c[o]=i[t++];let E=l.unpack(i,t,G);t+=l.packedLength;let u=i[t];return m(e)?(e._positions=r,e._minimumHeights=n,e._maximumHeights=c,e._ellipsoid=l.clone(E,e._ellipsoid),e._granularity=u,e):(b.positions=r,b.minimumHeights=n,b.maximumHeights=c,b.granularity=u,new w(b))};w.fromConstantHeights=function(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions;if(!m(t))throw new _("options.positions is required.");let e,o,s=i.minimumHeight,r=i.maximumHeight,n=m(s),c=m(r);if(n||c){let u=t.length;e=n?new Array(u):void 0,o=c?new Array(u):void 0;for(let a=0;a<u;++a)n&&(e[a]=s),c&&(o[a]=r)}let E={positions:t,maximumHeights:o,minimumHeights:e,ellipsoid:i.ellipsoid};return new w(E)};w.createGeometry=function(i){let t=i._positions,e=i._minimumHeights,o=i._maximumHeights,s=i._granularity,r=i._ellipsoid,n=B.computePositions(r,t,o,e,s,!1);if(!m(n))return;let c=n.bottomPositions,E=n.topPositions,u=E.length,a=u*2,f=new Float64Array(a),P=0;u/=3;let h;for(h=0;h<u;++h){let A=h*3,k=p.fromArray(E,A,U),L=p.fromArray(c,A,z);f[P++]=L.x,f[P++]=L.y,f[P++]=L.z,f[P++]=k.x,f[P++]=k.y,f[P++]=k.z}let V=new N({position:new M({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:f})}),y=a/3;a=2*y-4+y;let g=W.createTypedArray(y,a),H=0;for(h=0;h<y-2;h+=2){let A=h,k=h+2,L=p.fromArray(f,A*3,U),v=p.fromArray(f,k*3,z);if(p.equalsEpsilon(L,v,O.EPSILON10))continue;let T=h+1,x=h+3;g[H++]=T,g[H++]=A,g[H++]=T,g[H++]=x,g[H++]=A,g[H++]=k}return g[H++]=y-2,g[H++]=y-1,new S({attributes:V,indices:g,primitiveType:R.LINES,boundingSphere:new D.fromVertices(f)})};var C=w;function J(i,t){return m(t)&&(i=C.unpack(i,t)),i._ellipsoid=l.clone(i._ellipsoid),C.createGeometry(i)}var pi=J;export{pi as default}; diff --git a/cesium/Workers/decodeDraco.js b/cesium/Workers/decodeDraco.js index ed557b6..385c7b5 100644 --- a/cesium/Workers/decodeDraco.js +++ b/cesium/Workers/decodeDraco.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as O}from"./chunk-5DM27XHE.js";import{a as I}from"./chunk-4FSMRIBR.js";import{a as m}from"./chunk-RQXB4B4V.js";import{a as w}from"./chunk-77ESX6BV.js";import"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import{a as A}from"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import"./chunk-5YVCOCPP.js";import{d as D,e as d}from"./chunk-U73D6PDD.js";var b=D(O(),1),o;function F(t,e){let i=t.num_points(),a=t.num_faces(),n=new o.DracoInt32Array,s=a*3,r=m.createTypedArray(i,s),u=0;for(let c=0;c<a;++c)e.GetFaceFromMesh(t,c,n),r[u+0]=n.GetValue(0),r[u+1]=n.GetValue(1),r[u+2]=n.GetValue(2),u+=3;return o.destroy(n),{typedArray:r,numberOfIndices:s}}function U(t,e,i,a,n){let s,r;a.quantizationBits<=8?(r=new o.DracoUInt8Array,s=new Uint8Array(n),e.GetAttributeUInt8ForAllPoints(t,i,r)):a.quantizationBits<=16?(r=new o.DracoUInt16Array,s=new Uint16Array(n),e.GetAttributeUInt16ForAllPoints(t,i,r)):(r=new o.DracoFloat32Array,s=new Float32Array(n),e.GetAttributeFloatForAllPoints(t,i,r));for(let u=0;u<n;++u)s[u]=r.GetValue(u);return o.destroy(r),s}function k(t,e,i,a){let n,s;switch(i.data_type()){case 1:case 11:s=new o.DracoInt8Array,n=new Int8Array(a),e.GetAttributeInt8ForAllPoints(t,i,s);break;case 2:s=new o.DracoUInt8Array,n=new Uint8Array(a),e.GetAttributeUInt8ForAllPoints(t,i,s);break;case 3:s=new o.DracoInt16Array,n=new Int16Array(a),e.GetAttributeInt16ForAllPoints(t,i,s);break;case 4:s=new o.DracoUInt16Array,n=new Uint16Array(a),e.GetAttributeUInt16ForAllPoints(t,i,s);break;case 5:case 7:s=new o.DracoInt32Array,n=new Int32Array(a),e.GetAttributeInt32ForAllPoints(t,i,s);break;case 6:case 8:s=new o.DracoUInt32Array,n=new Uint32Array(a),e.GetAttributeUInt32ForAllPoints(t,i,s);break;case 9:case 10:s=new o.DracoFloat32Array,n=new Float32Array(a),e.GetAttributeFloatForAllPoints(t,i,s);break}for(let r=0;r<a;++r)n[r]=s.GetValue(r);return o.destroy(s),n}function p(t,e,i){let a=t.num_points(),n=i.num_components(),s,r=new o.AttributeQuantizationTransform;if(r.InitFromAttribute(i)){let y=new Array(n);for(let f=0;f<n;++f)y[f]=r.min_value(f);s={quantizationBits:r.quantization_bits(),minValues:y,range:r.range(),octEncoded:!1}}o.destroy(r),r=new o.AttributeOctahedronTransform,r.InitFromAttribute(i)&&(s={quantizationBits:r.quantization_bits(),octEncoded:!0}),o.destroy(r);let u=a*n,c;d(s)?c=U(t,e,i,s,u):c=k(t,e,i,u);let l=w.fromTypedArray(c);return{array:c,data:{componentsPerAttribute:n,componentDatatype:l,byteOffset:i.byte_offset(),byteStride:w.getSizeInBytes(l)*n,normalized:i.normalized(),quantization:s}}}function _(t){let e=new o.Decoder;t.dequantizeInShader&&(e.SkipAttributeTransform(o.POSITION),e.SkipAttributeTransform(o.NORMAL));let i=new o.DecoderBuffer;if(i.Init(t.buffer,t.buffer.length),e.GetEncodedGeometryType(i)!==o.POINT_CLOUD)throw new A("Draco geometry type must be POINT_CLOUD.");let n=new o.PointCloud,s=e.DecodeBufferToPointCloud(i,n);if(!s.ok()||n.ptr===0)throw new A(`Error decoding draco point cloud: ${s.error_msg()}`);o.destroy(i);let r={},u=t.properties;for(let c in u)if(u.hasOwnProperty(c)){let l;if(c==="POSITION"||c==="NORMAL"){let y=e.GetAttributeId(n,o[c]);l=e.GetAttribute(n,y)}else{let y=u[c];l=e.GetAttributeByUniqueId(n,y)}r[c]=p(n,e,l)}return o.destroy(n),o.destroy(e),r}function g(t){let e=new o.Decoder,i=["POSITION","NORMAL","COLOR","TEX_COORD"];if(t.dequantizeInShader)for(let f=0;f<i.length;++f)e.SkipAttributeTransform(o[i[f]]);let a=t.bufferView,n=new o.DecoderBuffer;if(n.Init(t.array,a.byteLength),e.GetEncodedGeometryType(n)!==o.TRIANGULAR_MESH)throw new A("Unsupported draco mesh geometry type.");let r=new o.Mesh,u=e.DecodeBufferToMesh(n,r);if(!u.ok()||r.ptr===0)throw new A(`Error decoding draco mesh geometry: ${u.error_msg()}`);o.destroy(n);let c={},l=t.compressedAttributes;for(let f in l)if(l.hasOwnProperty(f)){let P=l[f],T=e.GetAttributeByUniqueId(r,P);c[f]=p(r,e,T)}let y={indexArray:F(r,e),attributeData:c};return o.destroy(r),o.destroy(e),y}async function z(t,e){return d(t.bufferView)?g(t):_(t)}async function C(t,e){let i=t.webAssemblyConfig;return d(i)&&d(i.wasmBinaryFile)?o=await(0,b.default)(i):o=await(0,b.default)(),!0}async function G(t,e){let i=t.webAssemblyConfig;return d(i)?C(t,e):z(t,e)}var h=I(G);export{h as default}; +import{a as O}from"./chunk-F5IHREXR.js";import{a as I}from"./chunk-PXCJYT2S.js";import{a as m}from"./chunk-P37AI2DW.js";import{a as w}from"./chunk-KZNJOCYU.js";import"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import{a as A}from"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import"./chunk-UH2WFNTA.js";import{d as D,e as d}from"./chunk-PEYJTJPE.js";var b=D(O(),1),o;function F(t,e){let i=t.num_points(),a=t.num_faces(),n=new o.DracoInt32Array,s=a*3,r=m.createTypedArray(i,s),u=0;for(let c=0;c<a;++c)e.GetFaceFromMesh(t,c,n),r[u+0]=n.GetValue(0),r[u+1]=n.GetValue(1),r[u+2]=n.GetValue(2),u+=3;return o.destroy(n),{typedArray:r,numberOfIndices:s}}function U(t,e,i,a,n){let s,r;a.quantizationBits<=8?(r=new o.DracoUInt8Array,s=new Uint8Array(n),e.GetAttributeUInt8ForAllPoints(t,i,r)):a.quantizationBits<=16?(r=new o.DracoUInt16Array,s=new Uint16Array(n),e.GetAttributeUInt16ForAllPoints(t,i,r)):(r=new o.DracoFloat32Array,s=new Float32Array(n),e.GetAttributeFloatForAllPoints(t,i,r));for(let u=0;u<n;++u)s[u]=r.GetValue(u);return o.destroy(r),s}function k(t,e,i,a){let n,s;switch(i.data_type()){case 1:case 11:s=new o.DracoInt8Array,n=new Int8Array(a),e.GetAttributeInt8ForAllPoints(t,i,s);break;case 2:s=new o.DracoUInt8Array,n=new Uint8Array(a),e.GetAttributeUInt8ForAllPoints(t,i,s);break;case 3:s=new o.DracoInt16Array,n=new Int16Array(a),e.GetAttributeInt16ForAllPoints(t,i,s);break;case 4:s=new o.DracoUInt16Array,n=new Uint16Array(a),e.GetAttributeUInt16ForAllPoints(t,i,s);break;case 5:case 7:s=new o.DracoInt32Array,n=new Int32Array(a),e.GetAttributeInt32ForAllPoints(t,i,s);break;case 6:case 8:s=new o.DracoUInt32Array,n=new Uint32Array(a),e.GetAttributeUInt32ForAllPoints(t,i,s);break;case 9:case 10:s=new o.DracoFloat32Array,n=new Float32Array(a),e.GetAttributeFloatForAllPoints(t,i,s);break}for(let r=0;r<a;++r)n[r]=s.GetValue(r);return o.destroy(s),n}function p(t,e,i){let a=t.num_points(),n=i.num_components(),s,r=new o.AttributeQuantizationTransform;if(r.InitFromAttribute(i)){let y=new Array(n);for(let f=0;f<n;++f)y[f]=r.min_value(f);s={quantizationBits:r.quantization_bits(),minValues:y,range:r.range(),octEncoded:!1}}o.destroy(r),r=new o.AttributeOctahedronTransform,r.InitFromAttribute(i)&&(s={quantizationBits:r.quantization_bits(),octEncoded:!0}),o.destroy(r);let u=a*n,c;d(s)?c=U(t,e,i,s,u):c=k(t,e,i,u);let l=w.fromTypedArray(c);return{array:c,data:{componentsPerAttribute:n,componentDatatype:l,byteOffset:i.byte_offset(),byteStride:w.getSizeInBytes(l)*n,normalized:i.normalized(),quantization:s}}}function _(t){let e=new o.Decoder;t.dequantizeInShader&&(e.SkipAttributeTransform(o.POSITION),e.SkipAttributeTransform(o.NORMAL));let i=new o.DecoderBuffer;if(i.Init(t.buffer,t.buffer.length),e.GetEncodedGeometryType(i)!==o.POINT_CLOUD)throw new A("Draco geometry type must be POINT_CLOUD.");let n=new o.PointCloud,s=e.DecodeBufferToPointCloud(i,n);if(!s.ok()||n.ptr===0)throw new A(`Error decoding draco point cloud: ${s.error_msg()}`);o.destroy(i);let r={},u=t.properties;for(let c in u)if(u.hasOwnProperty(c)){let l;if(c==="POSITION"||c==="NORMAL"){let y=e.GetAttributeId(n,o[c]);l=e.GetAttribute(n,y)}else{let y=u[c];l=e.GetAttributeByUniqueId(n,y)}r[c]=p(n,e,l)}return o.destroy(n),o.destroy(e),r}function g(t){let e=new o.Decoder,i=["POSITION","NORMAL","COLOR","TEX_COORD"];if(t.dequantizeInShader)for(let f=0;f<i.length;++f)e.SkipAttributeTransform(o[i[f]]);let a=t.bufferView,n=new o.DecoderBuffer;if(n.Init(t.array,a.byteLength),e.GetEncodedGeometryType(n)!==o.TRIANGULAR_MESH)throw new A("Unsupported draco mesh geometry type.");let r=new o.Mesh,u=e.DecodeBufferToMesh(n,r);if(!u.ok()||r.ptr===0)throw new A(`Error decoding draco mesh geometry: ${u.error_msg()}`);o.destroy(n);let c={},l=t.compressedAttributes;for(let f in l)if(l.hasOwnProperty(f)){let P=l[f],T=e.GetAttributeByUniqueId(r,P);c[f]=p(r,e,T)}let y={indexArray:F(r,e),attributeData:c};return o.destroy(r),o.destroy(e),y}async function z(t,e){return d(t.bufferView)?g(t):_(t)}async function C(t,e){let i=t.webAssemblyConfig;return d(i)&&d(i.wasmBinaryFile)?o=await(0,b.default)(i):o=await(0,b.default)(),!0}async function G(t,e){let i=t.webAssemblyConfig;return d(i)?C(t,e):z(t,e)}var h=I(G);export{h as default}; diff --git a/cesium/Workers/decodeGoogleEarthEnterprisePacket.js b/cesium/Workers/decodeGoogleEarthEnterprisePacket.js index ebd046b..52fbbae 100644 --- a/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +++ b/cesium/Workers/decodeGoogleEarthEnterprisePacket.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as Se}from"./chunk-4FSMRIBR.js";import{a as D}from"./chunk-IRDBGNMC.js";import{b as ae}from"./chunk-5YVCOCPP.js";import{c as R,d as Ot,e as me}from"./chunk-U73D6PDD.js";var Ie=R((Li,Ae)=>{"use strict";var zt=(t,i,e,r)=>{let s=t&65535|0,n=t>>>16&65535|0,c=0;for(;e!==0;){c=e>2e3?2e3:e,e-=c;do s=s+i[r++]|0,n=n+s|0;while(--c);s%=65521,n%=65521}return s|n<<16|0};Ae.exports=zt});var De=R((Pi,Re)=>{"use strict";var Ht=()=>{let t,i=[];for(var e=0;e<256;e++){t=e;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;i[e]=t}return i},Ft=new Uint32Array(Ht()),Vt=(t,i,e,r)=>{let s=Ft,n=r+e;t^=-1;for(let c=r;c<n;c++)t=t>>>8^s[(t^i[c])&255];return t^-1};Re.exports=Vt});var Oe=R((zi,Ue)=>{"use strict";Ue.exports=function(i,e){let r,s,n,c,f,_,a,o,v,w,l,u,I,p,x,T,g,d,E,A,h,S,k,b,m=i.state;r=i.next_in,k=i.input,s=r+(i.avail_in-5),n=i.next_out,b=i.output,c=n-(e-i.avail_out),f=n+(i.avail_out-257),_=m.dmax,a=m.wsize,o=m.whave,v=m.wnext,w=m.window,l=m.hold,u=m.bits,I=m.lencode,p=m.distcode,x=(1<<m.lenbits)-1,T=(1<<m.distbits)-1;e:do{u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=I[l&x];t:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d===0)b[n++]=g&65535;else if(d&16){E=g&65535,d&=15,d&&(u<d&&(l+=k[r++]<<u,u+=8),E+=l&(1<<d)-1,l>>>=d,u-=d),u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=p[l&T];i:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d&16){if(A=g&65535,d&=15,u<d&&(l+=k[r++]<<u,u+=8,u<d&&(l+=k[r++]<<u,u+=8)),A+=l&(1<<d)-1,A>_){i.msg="invalid distance too far back",m.mode=16209;break e}if(l>>>=d,u-=d,d=n-c,A>d){if(d=A-d,d>o&&m.sane){i.msg="invalid distance too far back",m.mode=16209;break e}if(h=0,S=w,v===0){if(h+=a-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}else if(v<d){if(h+=a+v-d,d-=v,d<E){E-=d;do b[n++]=w[h++];while(--d);if(h=0,v<E){d=v,E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}}else if(h+=v-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}for(;E>2;)b[n++]=S[h++],b[n++]=S[h++],b[n++]=S[h++],E-=3;E&&(b[n++]=S[h++],E>1&&(b[n++]=S[h++]))}else{h=n-A;do b[n++]=b[h++],b[n++]=b[h++],b[n++]=b[h++],E-=3;while(E>2);E&&(b[n++]=b[h++],E>1&&(b[n++]=b[h++]))}}else if(d&64){i.msg="invalid distance code",m.mode=16209;break e}else{g=p[(g&65535)+(l&(1<<d)-1)];continue i}break}}else if(d&64)if(d&32){m.mode=16191;break e}else{i.msg="invalid literal/length code",m.mode=16209;break e}else{g=I[(g&65535)+(l&(1<<d)-1)];continue t}break}}while(r<s&&n<f);E=u>>3,r-=E,u-=E<<3,l&=(1<<u)-1,i.next_in=r,i.next_out=n,i.avail_in=r<s?5+(s-r):5-(r-s),i.avail_out=n<f?257+(f-n):257-(n-f),m.hold=l,m.bits=u}});var Me=R((Hi,Ne)=>{"use strict";var Gt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Yt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Xt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),qt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Kt=(t,i,e,r,s,n,c,f)=>{let _=f.bits,a=0,o=0,v=0,w=0,l=0,u=0,I=0,p=0,x=0,T=0,g,d,E,A,h,S=null,k,b=new Uint16Array(16),m=new Uint16Array(16),L=null,Ee,W,Q;for(a=0;a<=15;a++)b[a]=0;for(o=0;o<r;o++)b[i[e+o]]++;for(l=_,w=15;w>=1&&b[w]===0;w--);if(l>w&&(l=w),w===0)return s[n++]=1<<24|64<<16|0,s[n++]=1<<24|64<<16|0,f.bits=1,0;for(v=1;v<w&&b[v]===0;v++);for(l<v&&(l=v),p=1,a=1;a<=15;a++)if(p<<=1,p-=b[a],p<0)return-1;if(p>0&&(t===0||w!==1))return-1;for(m[1]=0,a=1;a<15;a++)m[a+1]=m[a]+b[a];for(o=0;o<r;o++)i[e+o]!==0&&(c[m[i[e+o]]++]=o);if(t===0?(S=L=c,k=20):t===1?(S=Gt,L=Yt,k=257):(S=Xt,L=qt,k=0),T=0,o=0,a=v,h=n,u=l,I=0,E=-1,x=1<<l,A=x-1,t===1&&x>852||t===2&&x>592)return 1;for(;;){Ee=a-I,c[o]+1<k?(W=0,Q=c[o]):c[o]>=k?(W=L[c[o]-k],Q=S[c[o]-k]):(W=96,Q=0),g=1<<a-I,d=1<<u,v=d;do d-=g,s[h+(T>>I)+d]=Ee<<24|W<<16|Q|0;while(d!==0);for(g=1<<a-1;T&g;)g>>=1;if(g!==0?(T&=g-1,T+=g):T=0,o++,--b[a]===0){if(a===w)break;a=i[e+c[o]]}if(a>l&&(T&A)!==E){for(I===0&&(I=l),h+=v,u=a-I,p=1<<u;u+I<w&&(p-=b[u+I],!(p<=0));)u++,p<<=1;if(x+=1<<u,t===1&&x>852||t===2&&x>592)return 1;E=T&A,s[E]=l<<24|u<<16|h-n|0}}return T!==0&&(s[h+T]=a-I<<24|64<<16|0),f.bits=l,0};Ne.exports=Kt});var J=R((Fi,Ze)=>{"use strict";Ze.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var bt=R((Vi,O)=>{"use strict";var he=Ie(),M=De(),jt=Oe(),X=Me(),Wt=0,st=1,ft=2,{Z_FINISH:Be,Z_BLOCK:Qt,Z_TREES:$,Z_OK:P,Z_STREAM_END:Jt,Z_NEED_DICT:$t,Z_STREAM_ERROR:U,Z_DATA_ERROR:lt,Z_MEM_ERROR:ue,Z_BUF_ERROR:ei,Z_DEFLATED:Ce}=J(),ne=16180,Le=16181,Pe=16182,ze=16183,He=16184,Fe=16185,Ve=16186,Ge=16187,Ye=16188,Xe=16189,ie=16190,Z=16191,se=16192,qe=16193,fe=16194,Ke=16195,je=16196,We=16197,Qe=16198,ee=16199,te=16200,Je=16201,$e=16202,et=16203,tt=16204,it=16205,le=16206,nt=16207,rt=16208,y=16209,we=16210,ct=16211,ti=852,ii=592,ni=15,ri=ni,at=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function ai(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var z=t=>{if(!t)return 1;let i=t.state;return!i||i.strm!==t||i.mode<ne||i.mode>ct?1:0},dt=t=>{if(z(t))return U;let i=t.state;return t.total_in=t.total_out=i.total=0,t.msg="",i.wrap&&(t.adler=i.wrap&1),i.mode=ne,i.last=0,i.havedict=0,i.flags=-1,i.dmax=32768,i.head=null,i.hold=0,i.bits=0,i.lencode=i.lendyn=new Int32Array(ti),i.distcode=i.distdyn=new Int32Array(ii),i.sane=1,i.back=-1,P},ht=t=>{if(z(t))return U;let i=t.state;return i.wsize=0,i.whave=0,i.wnext=0,dt(t)},ut=(t,i)=>{let e;if(z(t))return U;let r=t.state;return i<0?(e=0,i=-i):(e=(i>>4)+5,i<48&&(i&=15)),i&&(i<8||i>15)?U:(r.window!==null&&r.wbits!==i&&(r.window=null),r.wrap=e,r.wbits=i,ht(t))},wt=(t,i)=>{if(!t)return U;let e=new ai;t.state=e,e.strm=t,e.window=null,e.mode=ne;let r=ut(t,i);return r!==P&&(t.state=null),r},oi=t=>wt(t,ri),ot=!0,ce,de,si=t=>{if(ot){ce=new Int32Array(512),de=new Int32Array(32);let i=0;for(;i<144;)t.lens[i++]=8;for(;i<256;)t.lens[i++]=9;for(;i<280;)t.lens[i++]=7;for(;i<288;)t.lens[i++]=8;for(X(st,t.lens,0,288,ce,0,t.work,{bits:9}),i=0;i<32;)t.lens[i++]=5;X(ft,t.lens,0,32,de,0,t.work,{bits:5}),ot=!1}t.lencode=ce,t.lenbits=9,t.distcode=de,t.distbits=5},xt=(t,i,e,r)=>{let s,n=t.state;return n.window===null&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new Uint8Array(n.wsize)),r>=n.wsize?(n.window.set(i.subarray(e-n.wsize,e),0),n.wnext=0,n.whave=n.wsize):(s=n.wsize-n.wnext,s>r&&(s=r),n.window.set(i.subarray(e-r,e-r+s),n.wnext),r-=s,r?(n.window.set(i.subarray(e-r,e),0),n.wnext=r,n.whave=n.wsize):(n.wnext+=s,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=s))),0},fi=(t,i)=>{let e,r,s,n,c,f,_,a,o,v,w,l,u,I,p=0,x,T,g,d,E,A,h,S,k=new Uint8Array(4),b,m,L=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(z(t)||!t.output||!t.input&&t.avail_in!==0)return U;e=t.state,e.mode===Z&&(e.mode=se),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,v=f,w=_,S=P;e:for(;;)switch(e.mode){case ne:if(e.wrap===0){e.mode=se;break}for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&2&&a===35615){e.wbits===0&&(e.wbits=15),e.check=0,k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0),a=0,o=0,e.mode=Le;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((a&255)<<8)+(a>>8))%31){t.msg="incorrect header check",e.mode=y;break}if((a&15)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(a>>>=4,o-=4,h=(a&15)+8,e.wbits===0&&(e.wbits=h),h>15||h>e.wbits){t.msg="invalid window size",e.mode=y;break}e.dmax=1<<e.wbits,e.flags=0,t.adler=e.check=1,e.mode=a&512?Xe:Z,a=0,o=0;break;case Le:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.flags=a,(e.flags&255)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(e.flags&57344){t.msg="unknown header flags set",e.mode=y;break}e.head&&(e.head.text=a>>8&1),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=Pe;case Pe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.time=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,k[2]=a>>>16&255,k[3]=a>>>24&255,e.check=M(e.check,k,4,0)),a=0,o=0,e.mode=ze;case ze:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.xflags=a&255,e.head.os=a>>8),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=He;case He:if(e.flags&1024){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length=a,e.head&&(e.head.extra_len=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0}else e.head&&(e.head.extra=null);e.mode=Fe;case Fe:if(e.flags&1024&&(l=e.length,l>f&&(l=f),l&&(e.head&&(h=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(n,n+l),h)),e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,e.length-=l),e.length))break e;e.length=0,e.mode=Ve;case Ve:if(e.flags&2048){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.name+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.name=null);e.length=0,e.mode=Ge;case Ge:if(e.flags&4096){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.comment+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.comment=null);e.mode=Ye;case Ye:if(e.flags&512){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.check&65535)){t.msg="header crc mismatch",e.mode=y;break}a=0,o=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=Z;break;case Xe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}t.adler=e.check=at(a),a=0,o=0,e.mode=ie;case ie:if(e.havedict===0)return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,$t;t.adler=e.check=1,e.mode=Z;case Z:if(i===Qt||i===$)break e;case se:if(e.last){a>>>=o&7,o-=o&7,e.mode=le;break}for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}switch(e.last=a&1,a>>>=1,o-=1,a&3){case 0:e.mode=qe;break;case 1:if(si(e),e.mode=ee,i===$){a>>>=2,o-=2;break e}break;case 2:e.mode=je;break;case 3:t.msg="invalid block type",e.mode=y}a>>>=2,o-=2;break;case qe:for(a>>>=o&7,o-=o&7;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if((a&65535)!==(a>>>16^65535)){t.msg="invalid stored block lengths",e.mode=y;break}if(e.length=a&65535,a=0,o=0,e.mode=fe,i===$)break e;case fe:e.mode=Ke;case Ke:if(l=e.length,l){if(l>f&&(l=f),l>_&&(l=_),l===0)break e;s.set(r.subarray(n,n+l),c),f-=l,n+=l,_-=l,c+=l,e.length-=l;break}e.mode=Z;break;case je:for(;o<14;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.nlen=(a&31)+257,a>>>=5,o-=5,e.ndist=(a&31)+1,a>>>=5,o-=5,e.ncode=(a&15)+4,a>>>=4,o-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=y;break}e.have=0,e.mode=We;case We:for(;e.have<e.ncode;){for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.lens[L[e.have++]]=a&7,a>>>=3,o-=3}for(;e.have<19;)e.lens[L[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,b={bits:e.lenbits},S=X(Wt,e.lens,0,19,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid code lengths set",e.mode=y;break}e.have=0,e.mode=Qe;case Qe:for(;e.have<e.nlen+e.ndist;){for(;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(g<16)a>>>=x,o-=x,e.lens[e.have++]=g;else{if(g===16){for(m=x+2;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(a>>>=x,o-=x,e.have===0){t.msg="invalid bit length repeat",e.mode=y;break}h=e.lens[e.have-1],l=3+(a&3),a>>>=2,o-=2}else if(g===17){for(m=x+3;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=3+(a&7),a>>>=3,o-=3}else{for(m=x+7;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=11+(a&127),a>>>=7,o-=7}if(e.have+l>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=y;break}for(;l--;)e.lens[e.have++]=h}}if(e.mode===y)break;if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block",e.mode=y;break}if(e.lenbits=9,b={bits:e.lenbits},S=X(st,e.lens,0,e.nlen,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid literal/lengths set",e.mode=y;break}if(e.distbits=6,e.distcode=e.distdyn,b={bits:e.distbits},S=X(ft,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,b),e.distbits=b.bits,S){t.msg="invalid distances set",e.mode=y;break}if(e.mode=ee,i===$)break e;case ee:e.mode=te;case te:if(f>=6&&_>=258){t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,jt(t,w),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,e.mode===Z&&(e.back=-1);break}for(e.back=0;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(T&&!(T&240)){for(d=x,E=T,A=g;p=e.lencode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,e.length=g,T===0){e.mode=it;break}if(T&32){e.back=-1,e.mode=Z;break}if(T&64){t.msg="invalid literal/length code",e.mode=y;break}e.extra=T&15,e.mode=Je;case Je:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=$e;case $e:for(;p=e.distcode[a&(1<<e.distbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(!(T&240)){for(d=x,E=T,A=g;p=e.distcode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,T&64){t.msg="invalid distance code",e.mode=y;break}e.offset=g,e.extra=T&15,e.mode=et;case et:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.offset+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=y;break}e.mode=tt;case tt:if(_===0)break e;if(l=w-_,e.offset>l){if(l=e.offset-l,l>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=y;break}l>e.wnext?(l-=e.wnext,u=e.wsize-l):u=e.wnext-l,l>e.length&&(l=e.length),I=e.window}else I=s,u=c-e.offset,l=e.length;l>_&&(l=_),_-=l,e.length-=l;do s[c++]=I[u++];while(--l);e.length===0&&(e.mode=te);break;case it:if(_===0)break e;s[c++]=e.length,_--,e.mode=te;break;case le:if(e.wrap){for(;o<32;){if(f===0)break e;f--,a|=r[n++]<<o,o+=8}if(w-=_,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,c-w):he(e.check,s,w,c-w)),w=_,e.wrap&4&&(e.flags?a:at(a))!==e.check){t.msg="incorrect data check",e.mode=y;break}a=0,o=0}e.mode=nt;case nt:if(e.wrap&&e.flags){for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.total&4294967295)){t.msg="incorrect length check",e.mode=y;break}a=0,o=0}e.mode=rt;case rt:S=Jt;break e;case y:S=lt;break e;case we:return ue;case ct:default:return U}return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,(e.wsize||w!==t.avail_out&&e.mode<y&&(e.mode<le||i!==Be))&&xt(t,t.output,t.next_out,w-t.avail_out)?(e.mode=we,ue):(v-=t.avail_in,w-=t.avail_out,t.total_in+=v,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,t.next_out-w):he(e.check,s,w,t.next_out-w)),t.data_type=e.bits+(e.last?64:0)+(e.mode===Z?128:0)+(e.mode===ee||e.mode===fe?256:0),(v===0&&w===0||i===Be)&&S===P&&(S=ei),S)},li=t=>{if(z(t))return U;let i=t.state;return i.window&&(i.window=null),t.state=null,P},ci=(t,i)=>{if(z(t))return U;let e=t.state;return e.wrap&2?(e.head=i,i.done=!1,P):U},di=(t,i)=>{let e=i.length,r,s,n;return z(t)||(r=t.state,r.wrap!==0&&r.mode!==ie)?U:r.mode===ie&&(s=1,s=he(s,i,e,0),s!==r.check)?lt:(n=xt(t,i,e,e),n?(r.mode=we,ue):(r.havedict=1,P))};O.exports.inflateReset=ht;O.exports.inflateReset2=ut;O.exports.inflateResetKeep=dt;O.exports.inflateInit=oi;O.exports.inflateInit2=wt;O.exports.inflate=fi;O.exports.inflateEnd=li;O.exports.inflateGetHeader=ci;O.exports.inflateSetDictionary=di;O.exports.inflateInfo="pako inflate (from Nodeca project)"});var _t=R((Gi,xe)=>{"use strict";var hi=(t,i)=>Object.prototype.hasOwnProperty.call(t,i);xe.exports.assign=function(t){let i=Array.prototype.slice.call(arguments,1);for(;i.length;){let e=i.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let r in e)hi(e,r)&&(t[r]=e[r])}}return t};xe.exports.flattenChunks=t=>{let i=0;for(let r=0,s=t.length;r<s;r++)i+=t[r].length;let e=new Uint8Array(i);for(let r=0,s=0,n=t.length;r<n;r++){let c=t[r];e.set(c,s),s+=c.length}return e}});var kt=R((Yi,re)=>{"use strict";var gt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{gt=!1}var q=new Uint8Array(256);for(let t=0;t<256;t++)q[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;q[254]=q[254]=1;re.exports.string2buf=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let i,e,r,s,n,c=t.length,f=0;for(s=0;s<c;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),f+=e<128?1:e<2048?2:e<65536?3:4;for(i=new Uint8Array(f),n=0,s=0;n<f;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),e<128?i[n++]=e:e<2048?(i[n++]=192|e>>>6,i[n++]=128|e&63):e<65536?(i[n++]=224|e>>>12,i[n++]=128|e>>>6&63,i[n++]=128|e&63):(i[n++]=240|e>>>18,i[n++]=128|e>>>12&63,i[n++]=128|e>>>6&63,i[n++]=128|e&63);return i};var ui=(t,i)=>{if(i<65534&&t.subarray&>)return String.fromCharCode.apply(null,t.length===i?t:t.subarray(0,i));let e="";for(let r=0;r<i;r++)e+=String.fromCharCode(t[r]);return e};re.exports.buf2string=(t,i)=>{let e=i||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,i));let r,s,n=new Array(e*2);for(s=0,r=0;r<e;){let c=t[r++];if(c<128){n[s++]=c;continue}let f=q[c];if(f>4){n[s++]=65533,r+=f-1;continue}for(c&=f===2?31:f===3?15:7;f>1&&r<e;)c=c<<6|t[r++]&63,f--;if(f>1){n[s++]=65533;continue}c<65536?n[s++]=c:(c-=65536,n[s++]=55296|c>>10&1023,n[s++]=56320|c&1023)}return ui(n,s)};re.exports.utf8border=(t,i)=>{i=i||t.length,i>t.length&&(i=t.length);let e=i-1;for(;e>=0&&(t[e]&192)===128;)e--;return e<0||e===0?i:e+q[t[e]]>i?e:i}});var Et=R((Xi,pt)=>{"use strict";pt.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var St=R((qi,mt)=>{"use strict";function wi(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}mt.exports=wi});var vt=R((Ki,Tt)=>{"use strict";function xi(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Tt.exports=xi});var Rt=R((ji,V)=>{"use strict";var B=bt(),At=_t(),ge=kt(),ke=Et(),bi=St(),_i=vt(),It=Object.prototype.toString,{Z_NO_FLUSH:gi,Z_FINISH:ki,Z_OK:K,Z_STREAM_END:be,Z_NEED_DICT:_e,Z_STREAM_ERROR:pi,Z_DATA_ERROR:yt,Z_MEM_ERROR:Ei}=J();function j(t){this.options=At.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});let i=this.options;i.raw&&i.windowBits>=0&&i.windowBits<16&&(i.windowBits=-i.windowBits,i.windowBits===0&&(i.windowBits=-15)),i.windowBits>=0&&i.windowBits<16&&!(t&&t.windowBits)&&(i.windowBits+=32),i.windowBits>15&&i.windowBits<48&&(i.windowBits&15||(i.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bi,this.strm.avail_out=0;let e=B.inflateInit2(this.strm,i.windowBits);if(e!==K)throw new Error(ke[e]);if(this.header=new _i,B.inflateGetHeader(this.strm,this.header),i.dictionary&&(typeof i.dictionary=="string"?i.dictionary=ge.string2buf(i.dictionary):It.call(i.dictionary)==="[object ArrayBuffer]"&&(i.dictionary=new Uint8Array(i.dictionary)),i.raw&&(e=B.inflateSetDictionary(this.strm,i.dictionary),e!==K)))throw new Error(ke[e])}j.prototype.push=function(t,i){let e=this.strm,r=this.options.chunkSize,s=this.options.dictionary,n,c,f;if(this.ended)return!1;for(i===~~i?c=i:c=i===!0?ki:gi,It.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),n=B.inflate(e,c),n===_e&&s&&(n=B.inflateSetDictionary(e,s),n===K?n=B.inflate(e,c):n===yt&&(n=_e));e.avail_in>0&&n===be&&e.state.wrap>0&&t[e.next_in]!==0;)B.inflateReset(e),n=B.inflate(e,c);switch(n){case pi:case yt:case _e:case Ei:return this.onEnd(n),this.ended=!0,!1}if(f=e.avail_out,e.next_out&&(e.avail_out===0||n===be))if(this.options.to==="string"){let _=ge.utf8border(e.output,e.next_out),a=e.next_out-_,o=ge.buf2string(e.output,_);e.next_out=a,e.avail_out=r-a,a&&e.output.set(e.output.subarray(_,_+a),0),this.onData(o)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(n===K&&f===0)){if(n===be)return n=B.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};j.prototype.onData=function(t){this.chunks.push(t)};j.prototype.onEnd=function(t){t===K&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=At.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function pe(t,i){let e=new j(i);if(e.push(t),e.err)throw e.msg||ke[e.err];return e.result}function mi(t,i){return i=i||{},i.raw=!0,pe(t,i)}V.exports.Inflate=j;V.exports.inflate=pe;V.exports.inflateRaw=mi;V.exports.ungzip=pe;V.exports.constants=J()});var Nt=1953029805,Mt=2917034100;function oe(t,i){if(oe.passThroughDataForTesting)return i;ae.typeOf.object("key",t),ae.typeOf.object("data",i);let e=t.byteLength;if(e===0||e%4!==0)throw new D("The length of key must be greater than 0 and a multiple of 4.");let r=new DataView(i),s=r.getUint32(0,!0);if(s===Nt||s===Mt)return i;let n=new DataView(t),c=0,f=i.byteLength,_=f-f%8,a=e,o,v=8;for(;c<_;)for(v=(v+8)%24,o=v;c<_&&o<a;)r.setUint32(c,r.getUint32(c,!0)^n.getUint32(o,!0),!0),r.setUint32(c+4,r.getUint32(c+4,!0)^n.getUint32(o+4,!0),!0),c+=8,o+=24;if(c<f)for(o>=a&&(v=(v+8)%24,o=v);c<f;)r.setUint8(c,r.getUint8(c)^n.getUint8(o)),c++,o++}oe.passThroughDataForTesting=!1;var Te=oe;function Zt(t,i){return(t&i)!==0}var F=Zt;var Bt=[1,2,4,8],ve=15,Ct=16,Lt=64,Pt=128;function N(t,i,e,r,s,n){this._bits=t,this.cnodeVersion=i,this.imageryVersion=e,this.terrainVersion=r,this.imageryProvider=s,this.terrainProvider=n,this.ancestorHasTerrain=!1,this.terrainState=void 0}N.clone=function(t,i){return me(i)?(i._bits=t._bits,i.cnodeVersion=t.cnodeVersion,i.imageryVersion=t.imageryVersion,i.terrainVersion=t.terrainVersion,i.imageryProvider=t.imageryProvider,i.terrainProvider=t.terrainProvider):i=new N(t._bits,t.cnodeVersion,t.imageryVersion,t.terrainVersion,t.imageryProvider,t.terrainProvider),i.ancestorHasTerrain=t.ancestorHasTerrain,i.terrainState=t.terrainState,i};N.prototype.setParent=function(t){this.ancestorHasTerrain=t.ancestorHasTerrain||this.hasTerrain()};N.prototype.hasSubtree=function(){return F(this._bits,Ct)};N.prototype.hasImagery=function(){return F(this._bits,Lt)};N.prototype.hasTerrain=function(){return F(this._bits,Pt)};N.prototype.hasChildren=function(){return F(this._bits,ve)};N.prototype.hasChild=function(t){return F(this._bits,Bt[t])};N.prototype.getChildBitmask=function(){return this._bits&ve};var ye=N;var Ut=Ot(Rt(),1);var G=Uint16Array.BYTES_PER_ELEMENT,H=Int32Array.BYTES_PER_ELEMENT,Y=Uint32Array.BYTES_PER_ELEMENT,C={METADATA:0,TERRAIN:1,DBROOT:2};C.fromString=function(t){if(t==="Metadata")return C.METADATA;if(t==="Terrain")return C.TERRAIN;if(t==="DbRoot")return C.DBROOT};function Si(t,i){let e=C.fromString(t.type),r=t.buffer;Te(t.key,r);let s=Di(r);r=s.buffer;let n=s.length;switch(e){case C.METADATA:return vi(r,n,t.quadKey);case C.TERRAIN:return Ii(r,n,i);case C.DBROOT:return i.push(r),{buffer:r}}}var Ti=32301;function vi(t,i,e){let r=new DataView(t),s=0,n=r.getUint32(s,!0);if(s+=Y,n!==Ti)throw new D("Invalid magic");let c=r.getUint32(s,!0);if(s+=Y,c!==1)throw new D("Invalid data type. Must be 1 for QuadTreePacket");let f=r.getUint32(s,!0);if(s+=Y,f!==2)throw new D("Invalid QuadTreePacket version. Only version 2 is supported.");let _=r.getInt32(s,!0);s+=H;let a=r.getInt32(s,!0);if(s+=H,a!==32)throw new D("Invalid instance size.");let o=r.getInt32(s,!0);s+=H;let v=r.getInt32(s,!0);s+=H;let w=r.getInt32(s,!0);if(s+=H,o!==_*a+s)throw new D("Invalid dataBufferOffset");if(o+v+w!==i)throw new D("Invalid packet offsets");let l=[];for(let g=0;g<_;++g){let d=r.getUint8(s);++s,++s;let E=r.getUint16(s,!0);s+=G;let A=r.getUint16(s,!0);s+=G;let h=r.getUint16(s,!0);s+=G,s+=G,s+=G,s+=H,s+=H,s+=8;let S=r.getUint8(s++),k=r.getUint8(s++);s+=G,l.push(new ye(d,E,A,h,S,k))}let u=[],I=0;function p(g,d,E){let A=!1;if(E===4){if(d.hasSubtree())return;A=!0}for(let h=0;h<4;++h){let S=g+h.toString();if(A)u[S]=null;else if(E<4)if(!d.hasChild(h))u[S]=null;else{if(I===_){console.log("Incorrect number of instances");return}let k=l[I++];u[S]=k,p(S,k,E+1)}}}let x=0,T=l[I++];return e===""?++x:u[e]=T,p(e,T,x),u}var yi=5,Ai=4;function Ii(t,i,e){let r=new DataView(t),s=function(f){for(let _=0;_<Ai;++_){let a=r.getUint32(f,!0);if(f+=Y,f+=a,f>i)throw new D("Malformed terrain packet found.")}return f},n=0,c=[];for(;c.length<yi;){let f=n;n=s(n);let _=t.slice(f,n);e.push(_),c.push(_)}return c}var Dt=1953029805,Ri=2917034100;function Di(t){let i=new DataView(t),e=0,r=i.getUint32(e,!0);if(e+=Y,r!==Dt&&r!==Ri)throw new D("Invalid magic");let s=i.getUint32(e,r===Dt);e+=Y;let n=new Uint8Array(t,e),c=Ut.default.inflate(n);if(c.length!==s)throw new D("Size of packet doesn't match header");return c}var en=Se(Si);export{en as default}; +import{a as Se}from"./chunk-PXCJYT2S.js";import{a as D}from"./chunk-II4VNKYR.js";import{b as ae}from"./chunk-UH2WFNTA.js";import{c as R,d as Ot,e as me}from"./chunk-PEYJTJPE.js";var Ie=R((Li,Ae)=>{"use strict";var zt=(t,i,e,r)=>{let s=t&65535|0,n=t>>>16&65535|0,c=0;for(;e!==0;){c=e>2e3?2e3:e,e-=c;do s=s+i[r++]|0,n=n+s|0;while(--c);s%=65521,n%=65521}return s|n<<16|0};Ae.exports=zt});var De=R((Pi,Re)=>{"use strict";var Ht=()=>{let t,i=[];for(var e=0;e<256;e++){t=e;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;i[e]=t}return i},Ft=new Uint32Array(Ht()),Vt=(t,i,e,r)=>{let s=Ft,n=r+e;t^=-1;for(let c=r;c<n;c++)t=t>>>8^s[(t^i[c])&255];return t^-1};Re.exports=Vt});var Oe=R((zi,Ue)=>{"use strict";Ue.exports=function(i,e){let r,s,n,c,f,_,a,o,v,w,l,u,I,p,x,T,g,d,E,A,h,S,k,b,m=i.state;r=i.next_in,k=i.input,s=r+(i.avail_in-5),n=i.next_out,b=i.output,c=n-(e-i.avail_out),f=n+(i.avail_out-257),_=m.dmax,a=m.wsize,o=m.whave,v=m.wnext,w=m.window,l=m.hold,u=m.bits,I=m.lencode,p=m.distcode,x=(1<<m.lenbits)-1,T=(1<<m.distbits)-1;e:do{u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=I[l&x];t:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d===0)b[n++]=g&65535;else if(d&16){E=g&65535,d&=15,d&&(u<d&&(l+=k[r++]<<u,u+=8),E+=l&(1<<d)-1,l>>>=d,u-=d),u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=p[l&T];i:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d&16){if(A=g&65535,d&=15,u<d&&(l+=k[r++]<<u,u+=8,u<d&&(l+=k[r++]<<u,u+=8)),A+=l&(1<<d)-1,A>_){i.msg="invalid distance too far back",m.mode=16209;break e}if(l>>>=d,u-=d,d=n-c,A>d){if(d=A-d,d>o&&m.sane){i.msg="invalid distance too far back",m.mode=16209;break e}if(h=0,S=w,v===0){if(h+=a-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}else if(v<d){if(h+=a+v-d,d-=v,d<E){E-=d;do b[n++]=w[h++];while(--d);if(h=0,v<E){d=v,E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}}else if(h+=v-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}for(;E>2;)b[n++]=S[h++],b[n++]=S[h++],b[n++]=S[h++],E-=3;E&&(b[n++]=S[h++],E>1&&(b[n++]=S[h++]))}else{h=n-A;do b[n++]=b[h++],b[n++]=b[h++],b[n++]=b[h++],E-=3;while(E>2);E&&(b[n++]=b[h++],E>1&&(b[n++]=b[h++]))}}else if(d&64){i.msg="invalid distance code",m.mode=16209;break e}else{g=p[(g&65535)+(l&(1<<d)-1)];continue i}break}}else if(d&64)if(d&32){m.mode=16191;break e}else{i.msg="invalid literal/length code",m.mode=16209;break e}else{g=I[(g&65535)+(l&(1<<d)-1)];continue t}break}}while(r<s&&n<f);E=u>>3,r-=E,u-=E<<3,l&=(1<<u)-1,i.next_in=r,i.next_out=n,i.avail_in=r<s?5+(s-r):5-(r-s),i.avail_out=n<f?257+(f-n):257-(n-f),m.hold=l,m.bits=u}});var Me=R((Hi,Ne)=>{"use strict";var Gt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Yt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Xt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),qt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Kt=(t,i,e,r,s,n,c,f)=>{let _=f.bits,a=0,o=0,v=0,w=0,l=0,u=0,I=0,p=0,x=0,T=0,g,d,E,A,h,S=null,k,b=new Uint16Array(16),m=new Uint16Array(16),L=null,Ee,W,Q;for(a=0;a<=15;a++)b[a]=0;for(o=0;o<r;o++)b[i[e+o]]++;for(l=_,w=15;w>=1&&b[w]===0;w--);if(l>w&&(l=w),w===0)return s[n++]=1<<24|64<<16|0,s[n++]=1<<24|64<<16|0,f.bits=1,0;for(v=1;v<w&&b[v]===0;v++);for(l<v&&(l=v),p=1,a=1;a<=15;a++)if(p<<=1,p-=b[a],p<0)return-1;if(p>0&&(t===0||w!==1))return-1;for(m[1]=0,a=1;a<15;a++)m[a+1]=m[a]+b[a];for(o=0;o<r;o++)i[e+o]!==0&&(c[m[i[e+o]]++]=o);if(t===0?(S=L=c,k=20):t===1?(S=Gt,L=Yt,k=257):(S=Xt,L=qt,k=0),T=0,o=0,a=v,h=n,u=l,I=0,E=-1,x=1<<l,A=x-1,t===1&&x>852||t===2&&x>592)return 1;for(;;){Ee=a-I,c[o]+1<k?(W=0,Q=c[o]):c[o]>=k?(W=L[c[o]-k],Q=S[c[o]-k]):(W=96,Q=0),g=1<<a-I,d=1<<u,v=d;do d-=g,s[h+(T>>I)+d]=Ee<<24|W<<16|Q|0;while(d!==0);for(g=1<<a-1;T&g;)g>>=1;if(g!==0?(T&=g-1,T+=g):T=0,o++,--b[a]===0){if(a===w)break;a=i[e+c[o]]}if(a>l&&(T&A)!==E){for(I===0&&(I=l),h+=v,u=a-I,p=1<<u;u+I<w&&(p-=b[u+I],!(p<=0));)u++,p<<=1;if(x+=1<<u,t===1&&x>852||t===2&&x>592)return 1;E=T&A,s[E]=l<<24|u<<16|h-n|0}}return T!==0&&(s[h+T]=a-I<<24|64<<16|0),f.bits=l,0};Ne.exports=Kt});var J=R((Fi,Ze)=>{"use strict";Ze.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var bt=R((Vi,O)=>{"use strict";var he=Ie(),M=De(),jt=Oe(),X=Me(),Wt=0,st=1,ft=2,{Z_FINISH:Be,Z_BLOCK:Qt,Z_TREES:$,Z_OK:P,Z_STREAM_END:Jt,Z_NEED_DICT:$t,Z_STREAM_ERROR:U,Z_DATA_ERROR:lt,Z_MEM_ERROR:ue,Z_BUF_ERROR:ei,Z_DEFLATED:Ce}=J(),ne=16180,Le=16181,Pe=16182,ze=16183,He=16184,Fe=16185,Ve=16186,Ge=16187,Ye=16188,Xe=16189,ie=16190,Z=16191,se=16192,qe=16193,fe=16194,Ke=16195,je=16196,We=16197,Qe=16198,ee=16199,te=16200,Je=16201,$e=16202,et=16203,tt=16204,it=16205,le=16206,nt=16207,rt=16208,y=16209,we=16210,ct=16211,ti=852,ii=592,ni=15,ri=ni,at=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function ai(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var z=t=>{if(!t)return 1;let i=t.state;return!i||i.strm!==t||i.mode<ne||i.mode>ct?1:0},dt=t=>{if(z(t))return U;let i=t.state;return t.total_in=t.total_out=i.total=0,t.msg="",i.wrap&&(t.adler=i.wrap&1),i.mode=ne,i.last=0,i.havedict=0,i.flags=-1,i.dmax=32768,i.head=null,i.hold=0,i.bits=0,i.lencode=i.lendyn=new Int32Array(ti),i.distcode=i.distdyn=new Int32Array(ii),i.sane=1,i.back=-1,P},ht=t=>{if(z(t))return U;let i=t.state;return i.wsize=0,i.whave=0,i.wnext=0,dt(t)},ut=(t,i)=>{let e;if(z(t))return U;let r=t.state;return i<0?(e=0,i=-i):(e=(i>>4)+5,i<48&&(i&=15)),i&&(i<8||i>15)?U:(r.window!==null&&r.wbits!==i&&(r.window=null),r.wrap=e,r.wbits=i,ht(t))},wt=(t,i)=>{if(!t)return U;let e=new ai;t.state=e,e.strm=t,e.window=null,e.mode=ne;let r=ut(t,i);return r!==P&&(t.state=null),r},oi=t=>wt(t,ri),ot=!0,ce,de,si=t=>{if(ot){ce=new Int32Array(512),de=new Int32Array(32);let i=0;for(;i<144;)t.lens[i++]=8;for(;i<256;)t.lens[i++]=9;for(;i<280;)t.lens[i++]=7;for(;i<288;)t.lens[i++]=8;for(X(st,t.lens,0,288,ce,0,t.work,{bits:9}),i=0;i<32;)t.lens[i++]=5;X(ft,t.lens,0,32,de,0,t.work,{bits:5}),ot=!1}t.lencode=ce,t.lenbits=9,t.distcode=de,t.distbits=5},xt=(t,i,e,r)=>{let s,n=t.state;return n.window===null&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new Uint8Array(n.wsize)),r>=n.wsize?(n.window.set(i.subarray(e-n.wsize,e),0),n.wnext=0,n.whave=n.wsize):(s=n.wsize-n.wnext,s>r&&(s=r),n.window.set(i.subarray(e-r,e-r+s),n.wnext),r-=s,r?(n.window.set(i.subarray(e-r,e),0),n.wnext=r,n.whave=n.wsize):(n.wnext+=s,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=s))),0},fi=(t,i)=>{let e,r,s,n,c,f,_,a,o,v,w,l,u,I,p=0,x,T,g,d,E,A,h,S,k=new Uint8Array(4),b,m,L=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(z(t)||!t.output||!t.input&&t.avail_in!==0)return U;e=t.state,e.mode===Z&&(e.mode=se),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,v=f,w=_,S=P;e:for(;;)switch(e.mode){case ne:if(e.wrap===0){e.mode=se;break}for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&2&&a===35615){e.wbits===0&&(e.wbits=15),e.check=0,k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0),a=0,o=0,e.mode=Le;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((a&255)<<8)+(a>>8))%31){t.msg="incorrect header check",e.mode=y;break}if((a&15)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(a>>>=4,o-=4,h=(a&15)+8,e.wbits===0&&(e.wbits=h),h>15||h>e.wbits){t.msg="invalid window size",e.mode=y;break}e.dmax=1<<e.wbits,e.flags=0,t.adler=e.check=1,e.mode=a&512?Xe:Z,a=0,o=0;break;case Le:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.flags=a,(e.flags&255)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(e.flags&57344){t.msg="unknown header flags set",e.mode=y;break}e.head&&(e.head.text=a>>8&1),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=Pe;case Pe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.time=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,k[2]=a>>>16&255,k[3]=a>>>24&255,e.check=M(e.check,k,4,0)),a=0,o=0,e.mode=ze;case ze:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.xflags=a&255,e.head.os=a>>8),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=He;case He:if(e.flags&1024){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length=a,e.head&&(e.head.extra_len=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0}else e.head&&(e.head.extra=null);e.mode=Fe;case Fe:if(e.flags&1024&&(l=e.length,l>f&&(l=f),l&&(e.head&&(h=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(n,n+l),h)),e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,e.length-=l),e.length))break e;e.length=0,e.mode=Ve;case Ve:if(e.flags&2048){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.name+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.name=null);e.length=0,e.mode=Ge;case Ge:if(e.flags&4096){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.comment+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.comment=null);e.mode=Ye;case Ye:if(e.flags&512){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.check&65535)){t.msg="header crc mismatch",e.mode=y;break}a=0,o=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=Z;break;case Xe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}t.adler=e.check=at(a),a=0,o=0,e.mode=ie;case ie:if(e.havedict===0)return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,$t;t.adler=e.check=1,e.mode=Z;case Z:if(i===Qt||i===$)break e;case se:if(e.last){a>>>=o&7,o-=o&7,e.mode=le;break}for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}switch(e.last=a&1,a>>>=1,o-=1,a&3){case 0:e.mode=qe;break;case 1:if(si(e),e.mode=ee,i===$){a>>>=2,o-=2;break e}break;case 2:e.mode=je;break;case 3:t.msg="invalid block type",e.mode=y}a>>>=2,o-=2;break;case qe:for(a>>>=o&7,o-=o&7;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if((a&65535)!==(a>>>16^65535)){t.msg="invalid stored block lengths",e.mode=y;break}if(e.length=a&65535,a=0,o=0,e.mode=fe,i===$)break e;case fe:e.mode=Ke;case Ke:if(l=e.length,l){if(l>f&&(l=f),l>_&&(l=_),l===0)break e;s.set(r.subarray(n,n+l),c),f-=l,n+=l,_-=l,c+=l,e.length-=l;break}e.mode=Z;break;case je:for(;o<14;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.nlen=(a&31)+257,a>>>=5,o-=5,e.ndist=(a&31)+1,a>>>=5,o-=5,e.ncode=(a&15)+4,a>>>=4,o-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=y;break}e.have=0,e.mode=We;case We:for(;e.have<e.ncode;){for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.lens[L[e.have++]]=a&7,a>>>=3,o-=3}for(;e.have<19;)e.lens[L[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,b={bits:e.lenbits},S=X(Wt,e.lens,0,19,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid code lengths set",e.mode=y;break}e.have=0,e.mode=Qe;case Qe:for(;e.have<e.nlen+e.ndist;){for(;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(g<16)a>>>=x,o-=x,e.lens[e.have++]=g;else{if(g===16){for(m=x+2;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(a>>>=x,o-=x,e.have===0){t.msg="invalid bit length repeat",e.mode=y;break}h=e.lens[e.have-1],l=3+(a&3),a>>>=2,o-=2}else if(g===17){for(m=x+3;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=3+(a&7),a>>>=3,o-=3}else{for(m=x+7;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=11+(a&127),a>>>=7,o-=7}if(e.have+l>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=y;break}for(;l--;)e.lens[e.have++]=h}}if(e.mode===y)break;if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block",e.mode=y;break}if(e.lenbits=9,b={bits:e.lenbits},S=X(st,e.lens,0,e.nlen,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid literal/lengths set",e.mode=y;break}if(e.distbits=6,e.distcode=e.distdyn,b={bits:e.distbits},S=X(ft,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,b),e.distbits=b.bits,S){t.msg="invalid distances set",e.mode=y;break}if(e.mode=ee,i===$)break e;case ee:e.mode=te;case te:if(f>=6&&_>=258){t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,jt(t,w),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,e.mode===Z&&(e.back=-1);break}for(e.back=0;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(T&&!(T&240)){for(d=x,E=T,A=g;p=e.lencode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,e.length=g,T===0){e.mode=it;break}if(T&32){e.back=-1,e.mode=Z;break}if(T&64){t.msg="invalid literal/length code",e.mode=y;break}e.extra=T&15,e.mode=Je;case Je:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=$e;case $e:for(;p=e.distcode[a&(1<<e.distbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(!(T&240)){for(d=x,E=T,A=g;p=e.distcode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,T&64){t.msg="invalid distance code",e.mode=y;break}e.offset=g,e.extra=T&15,e.mode=et;case et:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.offset+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=y;break}e.mode=tt;case tt:if(_===0)break e;if(l=w-_,e.offset>l){if(l=e.offset-l,l>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=y;break}l>e.wnext?(l-=e.wnext,u=e.wsize-l):u=e.wnext-l,l>e.length&&(l=e.length),I=e.window}else I=s,u=c-e.offset,l=e.length;l>_&&(l=_),_-=l,e.length-=l;do s[c++]=I[u++];while(--l);e.length===0&&(e.mode=te);break;case it:if(_===0)break e;s[c++]=e.length,_--,e.mode=te;break;case le:if(e.wrap){for(;o<32;){if(f===0)break e;f--,a|=r[n++]<<o,o+=8}if(w-=_,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,c-w):he(e.check,s,w,c-w)),w=_,e.wrap&4&&(e.flags?a:at(a))!==e.check){t.msg="incorrect data check",e.mode=y;break}a=0,o=0}e.mode=nt;case nt:if(e.wrap&&e.flags){for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.total&4294967295)){t.msg="incorrect length check",e.mode=y;break}a=0,o=0}e.mode=rt;case rt:S=Jt;break e;case y:S=lt;break e;case we:return ue;case ct:default:return U}return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,(e.wsize||w!==t.avail_out&&e.mode<y&&(e.mode<le||i!==Be))&&xt(t,t.output,t.next_out,w-t.avail_out)?(e.mode=we,ue):(v-=t.avail_in,w-=t.avail_out,t.total_in+=v,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,t.next_out-w):he(e.check,s,w,t.next_out-w)),t.data_type=e.bits+(e.last?64:0)+(e.mode===Z?128:0)+(e.mode===ee||e.mode===fe?256:0),(v===0&&w===0||i===Be)&&S===P&&(S=ei),S)},li=t=>{if(z(t))return U;let i=t.state;return i.window&&(i.window=null),t.state=null,P},ci=(t,i)=>{if(z(t))return U;let e=t.state;return e.wrap&2?(e.head=i,i.done=!1,P):U},di=(t,i)=>{let e=i.length,r,s,n;return z(t)||(r=t.state,r.wrap!==0&&r.mode!==ie)?U:r.mode===ie&&(s=1,s=he(s,i,e,0),s!==r.check)?lt:(n=xt(t,i,e,e),n?(r.mode=we,ue):(r.havedict=1,P))};O.exports.inflateReset=ht;O.exports.inflateReset2=ut;O.exports.inflateResetKeep=dt;O.exports.inflateInit=oi;O.exports.inflateInit2=wt;O.exports.inflate=fi;O.exports.inflateEnd=li;O.exports.inflateGetHeader=ci;O.exports.inflateSetDictionary=di;O.exports.inflateInfo="pako inflate (from Nodeca project)"});var _t=R((Gi,xe)=>{"use strict";var hi=(t,i)=>Object.prototype.hasOwnProperty.call(t,i);xe.exports.assign=function(t){let i=Array.prototype.slice.call(arguments,1);for(;i.length;){let e=i.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let r in e)hi(e,r)&&(t[r]=e[r])}}return t};xe.exports.flattenChunks=t=>{let i=0;for(let r=0,s=t.length;r<s;r++)i+=t[r].length;let e=new Uint8Array(i);for(let r=0,s=0,n=t.length;r<n;r++){let c=t[r];e.set(c,s),s+=c.length}return e}});var kt=R((Yi,re)=>{"use strict";var gt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{gt=!1}var q=new Uint8Array(256);for(let t=0;t<256;t++)q[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;q[254]=q[254]=1;re.exports.string2buf=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let i,e,r,s,n,c=t.length,f=0;for(s=0;s<c;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),f+=e<128?1:e<2048?2:e<65536?3:4;for(i=new Uint8Array(f),n=0,s=0;n<f;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),e<128?i[n++]=e:e<2048?(i[n++]=192|e>>>6,i[n++]=128|e&63):e<65536?(i[n++]=224|e>>>12,i[n++]=128|e>>>6&63,i[n++]=128|e&63):(i[n++]=240|e>>>18,i[n++]=128|e>>>12&63,i[n++]=128|e>>>6&63,i[n++]=128|e&63);return i};var ui=(t,i)=>{if(i<65534&&t.subarray&>)return String.fromCharCode.apply(null,t.length===i?t:t.subarray(0,i));let e="";for(let r=0;r<i;r++)e+=String.fromCharCode(t[r]);return e};re.exports.buf2string=(t,i)=>{let e=i||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,i));let r,s,n=new Array(e*2);for(s=0,r=0;r<e;){let c=t[r++];if(c<128){n[s++]=c;continue}let f=q[c];if(f>4){n[s++]=65533,r+=f-1;continue}for(c&=f===2?31:f===3?15:7;f>1&&r<e;)c=c<<6|t[r++]&63,f--;if(f>1){n[s++]=65533;continue}c<65536?n[s++]=c:(c-=65536,n[s++]=55296|c>>10&1023,n[s++]=56320|c&1023)}return ui(n,s)};re.exports.utf8border=(t,i)=>{i=i||t.length,i>t.length&&(i=t.length);let e=i-1;for(;e>=0&&(t[e]&192)===128;)e--;return e<0||e===0?i:e+q[t[e]]>i?e:i}});var Et=R((Xi,pt)=>{"use strict";pt.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var St=R((qi,mt)=>{"use strict";function wi(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}mt.exports=wi});var vt=R((Ki,Tt)=>{"use strict";function xi(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Tt.exports=xi});var Rt=R((ji,V)=>{"use strict";var B=bt(),At=_t(),ge=kt(),ke=Et(),bi=St(),_i=vt(),It=Object.prototype.toString,{Z_NO_FLUSH:gi,Z_FINISH:ki,Z_OK:K,Z_STREAM_END:be,Z_NEED_DICT:_e,Z_STREAM_ERROR:pi,Z_DATA_ERROR:yt,Z_MEM_ERROR:Ei}=J();function j(t){this.options=At.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});let i=this.options;i.raw&&i.windowBits>=0&&i.windowBits<16&&(i.windowBits=-i.windowBits,i.windowBits===0&&(i.windowBits=-15)),i.windowBits>=0&&i.windowBits<16&&!(t&&t.windowBits)&&(i.windowBits+=32),i.windowBits>15&&i.windowBits<48&&(i.windowBits&15||(i.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bi,this.strm.avail_out=0;let e=B.inflateInit2(this.strm,i.windowBits);if(e!==K)throw new Error(ke[e]);if(this.header=new _i,B.inflateGetHeader(this.strm,this.header),i.dictionary&&(typeof i.dictionary=="string"?i.dictionary=ge.string2buf(i.dictionary):It.call(i.dictionary)==="[object ArrayBuffer]"&&(i.dictionary=new Uint8Array(i.dictionary)),i.raw&&(e=B.inflateSetDictionary(this.strm,i.dictionary),e!==K)))throw new Error(ke[e])}j.prototype.push=function(t,i){let e=this.strm,r=this.options.chunkSize,s=this.options.dictionary,n,c,f;if(this.ended)return!1;for(i===~~i?c=i:c=i===!0?ki:gi,It.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),n=B.inflate(e,c),n===_e&&s&&(n=B.inflateSetDictionary(e,s),n===K?n=B.inflate(e,c):n===yt&&(n=_e));e.avail_in>0&&n===be&&e.state.wrap>0&&t[e.next_in]!==0;)B.inflateReset(e),n=B.inflate(e,c);switch(n){case pi:case yt:case _e:case Ei:return this.onEnd(n),this.ended=!0,!1}if(f=e.avail_out,e.next_out&&(e.avail_out===0||n===be))if(this.options.to==="string"){let _=ge.utf8border(e.output,e.next_out),a=e.next_out-_,o=ge.buf2string(e.output,_);e.next_out=a,e.avail_out=r-a,a&&e.output.set(e.output.subarray(_,_+a),0),this.onData(o)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(n===K&&f===0)){if(n===be)return n=B.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};j.prototype.onData=function(t){this.chunks.push(t)};j.prototype.onEnd=function(t){t===K&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=At.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function pe(t,i){let e=new j(i);if(e.push(t),e.err)throw e.msg||ke[e.err];return e.result}function mi(t,i){return i=i||{},i.raw=!0,pe(t,i)}V.exports.Inflate=j;V.exports.inflate=pe;V.exports.inflateRaw=mi;V.exports.ungzip=pe;V.exports.constants=J()});var Nt=1953029805,Mt=2917034100;function oe(t,i){if(oe.passThroughDataForTesting)return i;ae.typeOf.object("key",t),ae.typeOf.object("data",i);let e=t.byteLength;if(e===0||e%4!==0)throw new D("The length of key must be greater than 0 and a multiple of 4.");let r=new DataView(i),s=r.getUint32(0,!0);if(s===Nt||s===Mt)return i;let n=new DataView(t),c=0,f=i.byteLength,_=f-f%8,a=e,o,v=8;for(;c<_;)for(v=(v+8)%24,o=v;c<_&&o<a;)r.setUint32(c,r.getUint32(c,!0)^n.getUint32(o,!0),!0),r.setUint32(c+4,r.getUint32(c+4,!0)^n.getUint32(o+4,!0),!0),c+=8,o+=24;if(c<f)for(o>=a&&(v=(v+8)%24,o=v);c<f;)r.setUint8(c,r.getUint8(c)^n.getUint8(o)),c++,o++}oe.passThroughDataForTesting=!1;var Te=oe;function Zt(t,i){return(t&i)!==0}var F=Zt;var Bt=[1,2,4,8],ve=15,Ct=16,Lt=64,Pt=128;function N(t,i,e,r,s,n){this._bits=t,this.cnodeVersion=i,this.imageryVersion=e,this.terrainVersion=r,this.imageryProvider=s,this.terrainProvider=n,this.ancestorHasTerrain=!1,this.terrainState=void 0}N.clone=function(t,i){return me(i)?(i._bits=t._bits,i.cnodeVersion=t.cnodeVersion,i.imageryVersion=t.imageryVersion,i.terrainVersion=t.terrainVersion,i.imageryProvider=t.imageryProvider,i.terrainProvider=t.terrainProvider):i=new N(t._bits,t.cnodeVersion,t.imageryVersion,t.terrainVersion,t.imageryProvider,t.terrainProvider),i.ancestorHasTerrain=t.ancestorHasTerrain,i.terrainState=t.terrainState,i};N.prototype.setParent=function(t){this.ancestorHasTerrain=t.ancestorHasTerrain||this.hasTerrain()};N.prototype.hasSubtree=function(){return F(this._bits,Ct)};N.prototype.hasImagery=function(){return F(this._bits,Lt)};N.prototype.hasTerrain=function(){return F(this._bits,Pt)};N.prototype.hasChildren=function(){return F(this._bits,ve)};N.prototype.hasChild=function(t){return F(this._bits,Bt[t])};N.prototype.getChildBitmask=function(){return this._bits&ve};var ye=N;var Ut=Ot(Rt(),1);var G=Uint16Array.BYTES_PER_ELEMENT,H=Int32Array.BYTES_PER_ELEMENT,Y=Uint32Array.BYTES_PER_ELEMENT,C={METADATA:0,TERRAIN:1,DBROOT:2};C.fromString=function(t){if(t==="Metadata")return C.METADATA;if(t==="Terrain")return C.TERRAIN;if(t==="DbRoot")return C.DBROOT};function Si(t,i){let e=C.fromString(t.type),r=t.buffer;Te(t.key,r);let s=Di(r);r=s.buffer;let n=s.length;switch(e){case C.METADATA:return vi(r,n,t.quadKey);case C.TERRAIN:return Ii(r,n,i);case C.DBROOT:return i.push(r),{buffer:r}}}var Ti=32301;function vi(t,i,e){let r=new DataView(t),s=0,n=r.getUint32(s,!0);if(s+=Y,n!==Ti)throw new D("Invalid magic");let c=r.getUint32(s,!0);if(s+=Y,c!==1)throw new D("Invalid data type. Must be 1 for QuadTreePacket");let f=r.getUint32(s,!0);if(s+=Y,f!==2)throw new D("Invalid QuadTreePacket version. Only version 2 is supported.");let _=r.getInt32(s,!0);s+=H;let a=r.getInt32(s,!0);if(s+=H,a!==32)throw new D("Invalid instance size.");let o=r.getInt32(s,!0);s+=H;let v=r.getInt32(s,!0);s+=H;let w=r.getInt32(s,!0);if(s+=H,o!==_*a+s)throw new D("Invalid dataBufferOffset");if(o+v+w!==i)throw new D("Invalid packet offsets");let l=[];for(let g=0;g<_;++g){let d=r.getUint8(s);++s,++s;let E=r.getUint16(s,!0);s+=G;let A=r.getUint16(s,!0);s+=G;let h=r.getUint16(s,!0);s+=G,s+=G,s+=G,s+=H,s+=H,s+=8;let S=r.getUint8(s++),k=r.getUint8(s++);s+=G,l.push(new ye(d,E,A,h,S,k))}let u=[],I=0;function p(g,d,E){let A=!1;if(E===4){if(d.hasSubtree())return;A=!0}for(let h=0;h<4;++h){let S=g+h.toString();if(A)u[S]=null;else if(E<4)if(!d.hasChild(h))u[S]=null;else{if(I===_){console.log("Incorrect number of instances");return}let k=l[I++];u[S]=k,p(S,k,E+1)}}}let x=0,T=l[I++];return e===""?++x:u[e]=T,p(e,T,x),u}var yi=5,Ai=4;function Ii(t,i,e){let r=new DataView(t),s=function(f){for(let _=0;_<Ai;++_){let a=r.getUint32(f,!0);if(f+=Y,f+=a,f>i)throw new D("Malformed terrain packet found.")}return f},n=0,c=[];for(;c.length<yi;){let f=n;n=s(n);let _=t.slice(f,n);e.push(_),c.push(_)}return c}var Dt=1953029805,Ri=2917034100;function Di(t){let i=new DataView(t),e=0,r=i.getUint32(e,!0);if(e+=Y,r!==Dt&&r!==Ri)throw new D("Invalid magic");let s=i.getUint32(e,r===Dt);e+=Y;let n=new Uint8Array(t,e),c=Ut.default.inflate(n);if(c.length!==s)throw new D("Size of packet doesn't match header");return c}var en=Se(Si);export{en as default}; diff --git a/cesium/Workers/decodeI3S.js b/cesium/Workers/decodeI3S.js index d4a6b28..a5cd1d1 100644 --- a/cesium/Workers/decodeI3S.js +++ b/cesium/Workers/decodeI3S.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as xt}from"./chunk-5DM27XHE.js";import{a as P}from"./chunk-L5JEMK3W.js";import{a as yt}from"./chunk-4FSMRIBR.js";import{a as ht}from"./chunk-7RBDS4IP.js";import{a as g,b as ot,d as st,e as it}from"./chunk-LJCGAQ64.js";import{a as M}from"./chunk-JFG572S7.js";import{a as ft}from"./chunk-42NIXFVW.js";import{b as lt}from"./chunk-5YVCOCPP.js";import{d as mt,e as h}from"./chunk-U73D6PDD.js";var at=mt(xt(),1);function wt(n){return lt.defined("value",n),n<=.04045?n*.07739938080495357:Math.pow((n+.055)*.9478672985781991,2.4)}var k=wt;var ut;function It(n,t,e,o,a,i){let r=e*(1-n)+o*n,s=a*(1-n)+i*n;return r*(1-t)+s*t}function H(n,t,e,o){let a=n+t*e;return o[a]}function At(n,t,e){let o=e.nativeExtent,a=(n-o.west)/(o.east-o.west)*(e.width-1),i=(t-o.south)/(o.north-o.south)*(e.height-1),r=Math.floor(a),s=Math.floor(i);a-=r,i-=s;let c=r<e.width?r+1:r,u=s<e.height?s+1:s;s=e.height-1-s,u=e.height-1-u;let l=H(r,s,e.width,e.buffer),f=H(c,s,e.width,e.buffer),p=H(r,u,e.width,e.buffer),m=H(c,u,e.width,e.buffer),d=It(a,i,l,f,p,m);return d=d*e.scale+e.offset,d}function bt(n,t,e){for(let o=0;o<e.length;o++){let a=e[o].nativeExtent,i=new g;if(e[o].projectionType==="WebMercator"){let r=e[o].projection._ellipsoid._radii;i=new ht(new st(r.x,r.y,r.z)).project(new ot(n,t,0))}else i.x=n,i.y=t;if(i.x>a.west&&i.x<a.east&&i.y>a.south&&i.y<a.north)return At(i.x,i.y,e[o])}return 0}function Lt(n,t,e,o,a,i,r){if(r)return;let s=bt(a.longitude,a.latitude,i);for(let c=0;c<n;++c){let u=bt(a.longitude+M.toRadians(e*t[c*3]),a.latitude+M.toRadians(o*t[c*3+1]),i);t[c*3+2]+=u-s}}function Ot(n,t,e,o,a,i,r,s,c){if(n===0||!h(t)||t.length===0)return;let u=new st(Math.sqrt(r.x),Math.sqrt(r.y),Math.sqrt(r.z));for(let l=0;l<n;++l){let f=l*3,p=f+1,m=f+2,d=new ot;d.longitude=o.longitude+M.toRadians(s*t[f]),d.latitude=o.latitude+M.toRadians(c*t[p]),d.height=o.height+t[m];let b={};u.cartographicToCartesian(d,b),b.x-=a.x,b.y-=a.y,b.z-=a.z;let x={};if(it.multiplyByVector(i,b,x),t[f]=x.x,t[p]=x.y,t[m]=x.z,h(e)){let T=new g(e[f],e[p],e[m]),I={};it.multiplyByVector(i,T,I),e[f]=I.x,e[p]=I.y,e[m]=I.z}}}function Tt(n,t,e){for(let o=0;o<n;++o){let a=e[o*4]/65535,i=e[o*4+1]/65535,r=(e[o*4+2]-e[o*4])/65535,s=(e[o*4+3]-e[o*4+1])/65535;t[o*2]*=r,t[o*2]+=a,t[o*2+1]*=s,t[o*2+1]+=i}}function Ct(n,t,e,o){let a=new Uint32Array(n),i=h(t)?s=>t[s]:s=>s,r=0;if(o&&h(e)){let s=c=>e[i(c)*4+3]<255;for(let c=0;c<n;c+=3)!s(c)&&!s(c+1)&&!s(c+2)&&(a[r++]=i(c),a[r++]=i(c+1),a[r++]=i(c+2));if(r>0){let c=r;for(let u=0;u<n;u+=3)(s(u)||s(u+1)||s(u+2))&&(a[c++]=i(u),a[c++]=i(u+1),a[c++]=i(u+2))}else for(let c=0;c<n;++c)a[c]=i(c)}else{r=n;for(let s=0;s<n;++s)a[s]=i(s)}return{indexArray:a,transparentVertexOffset:r}}function Ft(n,t,e){let o=t[e];if(h(o))return o;let a=t[e]={positions:{},indices:{},edges:{}},i=ft(n[e],n.default);return a.hasOutline=h(i?.edges),a}function Ut(n,t,e,o){if(!h(n[e])){let a=e*3,i=t;for(let r=0;r<3;r++){let s=o[a+r];h(i[s])||(i[s]={}),i=i[s]}h(i.index)||(i.index=e),n[e]=i.index}}function Vt(n,t,e,o,a,i){let r,s;o<a?(r=o,s=a):(r=a,s=o);let c=n[r];h(c)||(c=n[r]={});let u=c[s];h(u)||(u=c[s]={normalsIndex:[],outlines:[]}),u.normalsIndex.push(i),(u.outlines.length===0||t!==o||e!==a)&&u.outlines.push(t,e)}function Et(n,t,e,o){let a=[];for(let i=0;i<e.length;i+=3){let r=h(t)?t[e[i]]:"default",s=Ft(n,a,r);if(!s.hasOutline)continue;let c=s.indices,u=s.positions;for(let f=0;f<3;f++){let p=e[i+f];Ut(c,u,p,o)}let l=s.edges;for(let f=0;f<3;f++){let p=e[i+f],m=e[i+(f+1)%3],d=c[p],b=c[m];Vt(l,p,m,d,b,i)}}return a}var O=new g,X=new g,Y=new g;function gt(n,t,e,o){let a=e[t]*3,i=e[t+1]*3,r=e[t+2]*3;g.fromArray(o,a,O),g.fromArray(o,i,X),g.fromArray(o,r,Y),g.subtract(X,O,X),g.subtract(Y,O,Y),g.cross(X,Y,O);let s=g.magnitude(O);s!==0&&g.divideByScalar(O,s,O);let c=t*3,u=(t+1)*3,l=(t+2)*3;g.pack(O,n,c),g.pack(O,n,u),g.pack(O,n,l)}var z=new g,ct=new g;function _t(n,t,e){g.fromArray(n,t,z),g.fromArray(n,e,ct);let o=g.dot(z,ct),a=g.magnitude(g.cross(z,ct,z));return Math.atan2(a,o)<.25}function Rt(n,t,e,o,a){if(t.normalsIndex.length>1){let i=o.length===a.length;for(let r=0;r<t.normalsIndex.length;r++){let s=t.normalsIndex[r];if(h(a[s*3])||gt(a,s,e,o),r!==0)for(let c=0;c<r;c++){let u=t.normalsIndex[c],l=i?e[s]*3:s*3,f=i?e[u]*3:u*3;if(_t(a,l,f))return}}}n.push(...t.outlines)}function Nt(n,t,e,o,a){let i=Object.keys(t);for(let r=0;r<i.length;r++){let s=t[i[r]],c=Object.keys(s);for(let u=0;u<c.length;u++){let l=s[c[u]];Rt(n,l,e,o,a)}}}function Bt(n,t,e,o){let a=[],i=Object.keys(n);for(let r=0;r<i.length;r++){let s=n[i[r]].edges;Nt(a,s,t,e,o)}return a}function Gt(n,t,e,o,a){if(!h(n)||Object.keys(n).length===0)return;let i=Et(n,t,e,o);(!h(a)||e.length*3!==a.length)&&(a=[]);let r=Bt(i,e,o,a);return r.length>0?new Uint32Array(r):void 0}function St(n){let t=new Float32Array(n.length);for(let e=0;e<n.length;e+=4)t[e]=k(P.byteToFloat(n[e])),t[e+1]=k(P.byteToFloat(n[e+1])),t[e+2]=k(P.byteToFloat(n[e+2])),t[e+3]=P.byteToFloat(n[e+3]);return t}function vt(n,t,e,o,a,i,r){let s={normals:void 0,positions:void 0,uv0s:void 0,colors:void 0,featureIndex:void 0,vertexCount:void 0};if(n===0||!h(e)||e.length===0||h(o))return s;if(h(t)){s.vertexCount=t.length,s.positions=new Float32Array(t.length*3),s.uv0s=h(a)?new Float32Array(t.length*2):void 0,s.colors=h(i)?new Uint8Array(t.length*4):void 0,s.featureIndex=h(r)?new Array(t.length):void 0;for(let c=0;c<t.length;c++){let u=t[c];s.positions[c*3]=e[u*3],s.positions[c*3+1]=e[u*3+1],s.positions[c*3+2]=e[u*3+2],h(s.uv0s)&&(s.uv0s[c*2]=a[u*2],s.uv0s[c*2+1]=a[u*2+1]),h(s.colors)&&(s.colors[c*4]=i[u*4],s.colors[c*4+1]=i[u*4+1],s.colors[c*4+2]=i[u*4+2],s.colors[c*4+3]=i[u*4+3]),h(s.featureIndex)&&(s.featureIndex[c]=r[u])}n=t.length,e=s.positions}t=new Array(n);for(let c=0;c<n;c++)t[c]=c;s.normals=new Float32Array(t.length*3);for(let c=0;c<t.length;c+=3)gt(s.normals,c,t,e);return s}function Mt(n,t,e,o,a,i,r,s){if(n===0||!h(e)||e.length===0)return{buffers:[],bufferViews:[],accessors:[],meshes:[],nodes:[],nodesInScene:[]};let c=[],u=[],l=[],f=[],p=[],m=[],d={},b=[];h(t)&&(n=t.length);let{indexArray:x,transparentVertexOffset:T}=Ct(n,t,i,s.splitGeometryByColorTransparency),I=new Blob([x],{type:"application/binary"}),A=URL.createObjectURL(I),w=n,F=s.enableFeatures&&h(r)?new Float32Array(r.length):void 0,C=0;if(h(F))for(let y=0;y<r.length;++y){F[y]=r[y];let E=r[y]+1;C<E&&(C=E)}let U,R=Gt(s.symbologyData,r,x,e,o);if(h(R)){let y=new Blob([R],{type:"application/binary"});U=URL.createObjectURL(y)}let L=e.subarray(0,w*3),dt=new Blob([L],{type:"application/binary"}),pt=URL.createObjectURL(dt),D=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,Q=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY;for(let y=0;y<L.length/3;y++)D=Math.min(D,L[y*3+0]),K=Math.max(K,L[y*3+0]),Q=Math.min(Q,L[y*3+1]),Z=Math.max(Z,L[y*3+1]),J=Math.min(J,L[y*3+2]),$=Math.max($,L[y*3+2]);let N=o?o.subarray(0,w*3):void 0,q;if(h(N)){let y=new Blob([N],{type:"application/binary"});q=URL.createObjectURL(y)}let B=a?a.subarray(0,w*2):void 0,tt;if(h(B)){let y=new Blob([B],{type:"application/binary"});tt=URL.createObjectURL(y)}let G=h(i)?St(i.subarray(0,w*4)):void 0,et;if(h(G)){let y=new Blob([G],{type:"application/binary"});et=URL.createObjectURL(y)}let S=h(F)?F.subarray(0,w):void 0,nt;if(h(S)){let y=new Blob([S],{type:"application/binary"});nt=URL.createObjectURL(y)}let _=h(F)?new Float32Array(C):void 0,rt;if(h(_)){for(let E=0;E<_.length;++E)_[E]=E;let y=new Blob([_],{type:"application/binary"});rt=URL.createObjectURL(y)}let V={},j={};V.POSITION=l.length,c.push({uri:pt,byteLength:L.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:L.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:L.length/3,type:"VEC3",max:[D,Q,J],min:[K,Z,$]}),h(q)&&(V.NORMAL=l.length,c.push({uri:q,byteLength:N.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:N.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:N.length/3,type:"VEC3"})),h(tt)&&(V.TEXCOORD_0=l.length,c.push({uri:tt,byteLength:B.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:B.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:B.length/2,type:"VEC2"})),h(et)&&(V.COLOR_0=l.length,c.push({uri:et,byteLength:G.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:G.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:G.length/4,type:"VEC4"})),h(nt)&&(V._FEATURE_ID_0=l.length,c.push({uri:nt,byteLength:S.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:S.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:S.length,type:"SCALAR"}),j.EXT_mesh_features={featureIds:[{attribute:0,propertyTable:0,featureCount:C}]},b.push("EXT_mesh_features")),h(rt)&&(c.push({uri:rt,byteLength:_.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:_.byteLength,target:34963}),d.EXT_structural_metadata={schema:{id:"i3s-metadata-schema-001",name:"I3S metadata schema 001",description:"The schema for I3S metadata",version:"1.0",classes:{feature:{name:"feature",description:"Feature metadata",properties:{index:{description:"The feature index",type:"SCALAR",componentType:"FLOAT32",required:!0}}}}},propertyTables:[{name:"feature-indices-mapping",class:"feature",count:C,properties:{index:{values:u.length-1}}}]},b.push("EXT_structural_metadata")),h(U)&&(c.push({uri:U,byteLength:R.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:R.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:R.length,type:"SCALAR"}),j.CESIUM_primitive_outline={indices:l.length-1},b.push("CESIUM_primitive_outline")),c.push({uri:A,byteLength:x.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:x.byteLength,target:34963});let v=[];return T>0&&(l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j})),T<n&&(l.push({bufferView:u.length-1,byteOffset:4*T,componentType:5125,count:n-T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j,extra:{isTransparent:!0}})),f.push({primitives:v}),m.push(0),p.push({mesh:0}),{buffers:c,bufferViews:u,accessors:l,meshes:f,nodes:p,nodesInScene:m,rootExtensions:d,extensionsUsed:b}}function Pt(n,t,e,o){let a=new Uint8Array(n,0,5);return a[0]===68&&a[1]===82&&a[2]===65&&a[3]===67&&a[4]===79?jt(n,e):Ht(n,t,e,o)}function jt(n){let t=ut,e=new t.DecoderBuffer,o=new Uint8Array(n);e.Init(o,o.length);let a=new t.Decoder,i=a.GetEncodedGeometryType(e),r=new t.MetadataQuerier,s,c;i===t.TRIANGULAR_MESH&&(s=new t.Mesh,c=a.DecodeBufferToMesh(e,s));let u={vertexCount:[0],featureCount:0};if(h(c)&&c.ok()&&s.ptr!==0){let l=s.num_faces(),f=s.num_attributes(),p=s.num_points();u.indices=new Uint32Array(l*3);let m=u.indices;u.vertexCount[0]=p,u.scale_x=1,u.scale_y=1;let d=new t.DracoInt32Array(3);for(let b=0;b<l;++b)a.GetFaceFromMesh(s,b,d),m[b*3]=d.GetValue(0),m[b*3+1]=d.GetValue(1),m[b*3+2]=d.GetValue(2);t.destroy(d);for(let b=0;b<f;++b){let x=a.GetAttribute(s,b),T=kt(t,a,s,x,p),I=x.attribute_type(),A="unknown";I===t.POSITION?A="positions":I===t.NORMAL?A="normals":I===t.COLOR?A="colors":I===t.TEX_COORD&&(A="uv0s");let w=a.GetAttributeMetadata(s,b);if(w.ptr!==0){let F=r.NumEntries(w);for(let C=0;C<F;++C){let U=r.GetEntryName(w,C);U==="i3s-scale_x"?u.scale_x=r.GetDoubleEntry(w,"i3s-scale_x"):U==="i3s-scale_y"?u.scale_y=r.GetDoubleEntry(w,"i3s-scale_y"):U==="i3s-attribute-type"&&(A=r.GetStringEntry(w,"i3s-attribute-type"))}}h(u[A])&&console.log("Attribute already exists",A),u[A]=T,A==="feature-index"&&u.featureCount++}t.destroy(s)}return t.destroy(r),t.destroy(a),u}function kt(n,t,e,o,a){let i=o.num_components()*a,r,c=[function(){},function(){r=new n.DracoInt8Array(i),t.GetAttributeInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeUInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeUInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){},function(){r=new n.DracoFloat32Array(i),t.GetAttributeFloatForAllPoints(e,o,r)||console.error("Bad stream");let l=new Float32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){r=new n.DracoUInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l}][o.data_type()]();return h(r)&&n.destroy(r),c}var W={position:function(n,t,e){let o=n.vertexCount*3;return n.positions=new Float32Array(t,e,o),e+=o*4,e},normal:function(n,t,e){let o=n.vertexCount*3;return n.normals=new Float32Array(t,e,o),e+=o*4,e},uv0:function(n,t,e){let o=n.vertexCount*2;return n.uv0s=new Float32Array(t,e,o),e+=o*4,e},color:function(n,t,e){let o=n.vertexCount*4;return n.colors=new Uint8Array(t,e,o),e+=o,e},featureId:function(n,t,e){let o=n.featureCount;return e+=o*8,e},id:function(n,t,e){let o=n.featureCount;return e+=o*8,e},faceRange:function(n,t,e){let o=n.featureCount*2;return n.faceRange=new Uint32Array(t,e,o),e+=o*4,e},uvRegion:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e},region:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e}};function Ht(n,t,e,o){let a={vertexCount:0},i=new DataView(n);try{let r=0;if(a.vertexCount=i.getUint32(r,1),r+=4,a.featureCount=i.getUint32(r,1),r+=4,h(e))for(let s=0;s<e.attributes.length;s++)h(W[e.attributes[s]])?r=W[e.attributes[s]](a,n,r):console.error("Unknown decoder for",e.attributes[s]);else{let s=t.ordering,c=t.featureAttributeOrder;h(o)&&h(o.geometryData)&&h(o.geometryData[0])&&h(o.geometryData[0].params)&&(s=Object.keys(o.geometryData[0].params.vertexAttributes),c=Object.keys(o.geometryData[0].params.featureAttributes));for(let u=0;u<s.length;u++){let l=W[s[u]];r=l(a,n,r)}for(let u=0;u<c.length;u++){let l=W[c[u]];r=l(a,n,r)}}}catch(r){console.error(r)}return a.scale_x=1,a.scale_y=1,a}function Xt(n){let t=Pt(n.binaryData,n.schema,n.bufferInfo,n.featureData);h(n.geoidDataList)&&n.geoidDataList.length>0&&Lt(t.vertexCount,t.positions,t.scale_x,t.scale_y,n.cartographicCenter,n.geoidDataList,!1),Ot(t.vertexCount,t.positions,t.normals,n.cartographicCenter,n.cartesianCenter,n.parentRotation,n.ellipsoidRadiiSquare,t.scale_x,t.scale_y),h(t.uv0s)&&h(t["uv-region"])&&Tt(t.vertexCount,t.uv0s,t["uv-region"]);let e;if(h(t["feature-index"]))e=t["feature-index"];else if(h(t.faceRange)){e=new Array(t.vertexCount);for(let r=0;r<t.faceRange.length-1;r+=2){let s=r/2,c=t.faceRange[r],u=t.faceRange[r+1];for(let l=c;l<=u;l++)e[l*3]=s,e[l*3+1]=s,e[l*3+2]=s}}if(n.calculateNormals){let r=vt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e);h(r.normals)&&(t.normals=r.normals,h(r.vertexCount)&&(t.vertexCount=r.vertexCount,t.indices=r.indices,t.positions=r.positions,t.uv0s=r.uv0s,t.colors=r.colors,e=r.featureIndex))}let o=Mt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e,n),a={positions:t.positions,indices:t.indices,featureIndex:e,sourceURL:n.url,cartesianCenter:n.cartesianCenter,parentRotation:n.parentRotation};return o._customAttributes=a,{meshData:o}}async function Yt(n,t){let e=n.webAssemblyConfig;return h(e)&&h(e.wasmBinaryFile)?ut=await(0,at.default)(e):ut=await(0,at.default)(),!0}function zt(n,t){let e=n.webAssemblyConfig;return h(e)?Yt(n,t):Xt(n,t)}var se=yt(zt);export{se as default}; +import{a as xt}from"./chunk-F5IHREXR.js";import{a as P}from"./chunk-V7JEDBOE.js";import{a as yt}from"./chunk-PXCJYT2S.js";import{a as ht}from"./chunk-SB224QGV.js";import{a as g,b as ot,d as st,e as it}from"./chunk-POASMU2N.js";import{a as M}from"./chunk-R6KGAEF6.js";import{a as ft}from"./chunk-IUA6FAOZ.js";import{b as lt}from"./chunk-UH2WFNTA.js";import{d as mt,e as h}from"./chunk-PEYJTJPE.js";var at=mt(xt(),1);function wt(n){return lt.defined("value",n),n<=.04045?n*.07739938080495357:Math.pow((n+.055)*.9478672985781991,2.4)}var k=wt;var ut;function It(n,t,e,o,a,i){let r=e*(1-n)+o*n,s=a*(1-n)+i*n;return r*(1-t)+s*t}function H(n,t,e,o){let a=n+t*e;return o[a]}function At(n,t,e){let o=e.nativeExtent,a=(n-o.west)/(o.east-o.west)*(e.width-1),i=(t-o.south)/(o.north-o.south)*(e.height-1),r=Math.floor(a),s=Math.floor(i);a-=r,i-=s;let c=r<e.width?r+1:r,u=s<e.height?s+1:s;s=e.height-1-s,u=e.height-1-u;let l=H(r,s,e.width,e.buffer),f=H(c,s,e.width,e.buffer),p=H(r,u,e.width,e.buffer),m=H(c,u,e.width,e.buffer),d=It(a,i,l,f,p,m);return d=d*e.scale+e.offset,d}function bt(n,t,e){for(let o=0;o<e.length;o++){let a=e[o].nativeExtent,i=new g;if(e[o].projectionType==="WebMercator"){let r=e[o].projection._ellipsoid._radii;i=new ht(new st(r.x,r.y,r.z)).project(new ot(n,t,0))}else i.x=n,i.y=t;if(i.x>a.west&&i.x<a.east&&i.y>a.south&&i.y<a.north)return At(i.x,i.y,e[o])}return 0}function Lt(n,t,e,o,a,i,r){if(r)return;let s=bt(a.longitude,a.latitude,i);for(let c=0;c<n;++c){let u=bt(a.longitude+M.toRadians(e*t[c*3]),a.latitude+M.toRadians(o*t[c*3+1]),i);t[c*3+2]+=u-s}}function Ot(n,t,e,o,a,i,r,s,c){if(n===0||!h(t)||t.length===0)return;let u=new st(Math.sqrt(r.x),Math.sqrt(r.y),Math.sqrt(r.z));for(let l=0;l<n;++l){let f=l*3,p=f+1,m=f+2,d=new ot;d.longitude=o.longitude+M.toRadians(s*t[f]),d.latitude=o.latitude+M.toRadians(c*t[p]),d.height=o.height+t[m];let b={};u.cartographicToCartesian(d,b),b.x-=a.x,b.y-=a.y,b.z-=a.z;let x={};if(it.multiplyByVector(i,b,x),t[f]=x.x,t[p]=x.y,t[m]=x.z,h(e)){let T=new g(e[f],e[p],e[m]),I={};it.multiplyByVector(i,T,I),e[f]=I.x,e[p]=I.y,e[m]=I.z}}}function Tt(n,t,e){for(let o=0;o<n;++o){let a=e[o*4]/65535,i=e[o*4+1]/65535,r=(e[o*4+2]-e[o*4])/65535,s=(e[o*4+3]-e[o*4+1])/65535;t[o*2]*=r,t[o*2]+=a,t[o*2+1]*=s,t[o*2+1]+=i}}function Ct(n,t,e,o){let a=new Uint32Array(n),i=h(t)?s=>t[s]:s=>s,r=0;if(o&&h(e)){let s=c=>e[i(c)*4+3]<255;for(let c=0;c<n;c+=3)!s(c)&&!s(c+1)&&!s(c+2)&&(a[r++]=i(c),a[r++]=i(c+1),a[r++]=i(c+2));if(r>0){let c=r;for(let u=0;u<n;u+=3)(s(u)||s(u+1)||s(u+2))&&(a[c++]=i(u),a[c++]=i(u+1),a[c++]=i(u+2))}else for(let c=0;c<n;++c)a[c]=i(c)}else{r=n;for(let s=0;s<n;++s)a[s]=i(s)}return{indexArray:a,transparentVertexOffset:r}}function Ft(n,t,e){let o=t[e];if(h(o))return o;let a=t[e]={positions:{},indices:{},edges:{}},i=ft(n[e],n.default);return a.hasOutline=h(i?.edges),a}function Ut(n,t,e,o){if(!h(n[e])){let a=e*3,i=t;for(let r=0;r<3;r++){let s=o[a+r];h(i[s])||(i[s]={}),i=i[s]}h(i.index)||(i.index=e),n[e]=i.index}}function Vt(n,t,e,o,a,i){let r,s;o<a?(r=o,s=a):(r=a,s=o);let c=n[r];h(c)||(c=n[r]={});let u=c[s];h(u)||(u=c[s]={normalsIndex:[],outlines:[]}),u.normalsIndex.push(i),(u.outlines.length===0||t!==o||e!==a)&&u.outlines.push(t,e)}function Et(n,t,e,o){let a=[];for(let i=0;i<e.length;i+=3){let r=h(t)?t[e[i]]:"default",s=Ft(n,a,r);if(!s.hasOutline)continue;let c=s.indices,u=s.positions;for(let f=0;f<3;f++){let p=e[i+f];Ut(c,u,p,o)}let l=s.edges;for(let f=0;f<3;f++){let p=e[i+f],m=e[i+(f+1)%3],d=c[p],b=c[m];Vt(l,p,m,d,b,i)}}return a}var O=new g,X=new g,Y=new g;function gt(n,t,e,o){let a=e[t]*3,i=e[t+1]*3,r=e[t+2]*3;g.fromArray(o,a,O),g.fromArray(o,i,X),g.fromArray(o,r,Y),g.subtract(X,O,X),g.subtract(Y,O,Y),g.cross(X,Y,O);let s=g.magnitude(O);s!==0&&g.divideByScalar(O,s,O);let c=t*3,u=(t+1)*3,l=(t+2)*3;g.pack(O,n,c),g.pack(O,n,u),g.pack(O,n,l)}var z=new g,ct=new g;function _t(n,t,e){g.fromArray(n,t,z),g.fromArray(n,e,ct);let o=g.dot(z,ct),a=g.magnitude(g.cross(z,ct,z));return Math.atan2(a,o)<.25}function Rt(n,t,e,o,a){if(t.normalsIndex.length>1){let i=o.length===a.length;for(let r=0;r<t.normalsIndex.length;r++){let s=t.normalsIndex[r];if(h(a[s*3])||gt(a,s,e,o),r!==0)for(let c=0;c<r;c++){let u=t.normalsIndex[c],l=i?e[s]*3:s*3,f=i?e[u]*3:u*3;if(_t(a,l,f))return}}}n.push(...t.outlines)}function Nt(n,t,e,o,a){let i=Object.keys(t);for(let r=0;r<i.length;r++){let s=t[i[r]],c=Object.keys(s);for(let u=0;u<c.length;u++){let l=s[c[u]];Rt(n,l,e,o,a)}}}function Bt(n,t,e,o){let a=[],i=Object.keys(n);for(let r=0;r<i.length;r++){let s=n[i[r]].edges;Nt(a,s,t,e,o)}return a}function Gt(n,t,e,o,a){if(!h(n)||Object.keys(n).length===0)return;let i=Et(n,t,e,o);(!h(a)||e.length*3!==a.length)&&(a=[]);let r=Bt(i,e,o,a);return r.length>0?new Uint32Array(r):void 0}function St(n){let t=new Float32Array(n.length);for(let e=0;e<n.length;e+=4)t[e]=k(P.byteToFloat(n[e])),t[e+1]=k(P.byteToFloat(n[e+1])),t[e+2]=k(P.byteToFloat(n[e+2])),t[e+3]=P.byteToFloat(n[e+3]);return t}function vt(n,t,e,o,a,i,r){let s={normals:void 0,positions:void 0,uv0s:void 0,colors:void 0,featureIndex:void 0,vertexCount:void 0};if(n===0||!h(e)||e.length===0||h(o))return s;if(h(t)){s.vertexCount=t.length,s.positions=new Float32Array(t.length*3),s.uv0s=h(a)?new Float32Array(t.length*2):void 0,s.colors=h(i)?new Uint8Array(t.length*4):void 0,s.featureIndex=h(r)?new Array(t.length):void 0;for(let c=0;c<t.length;c++){let u=t[c];s.positions[c*3]=e[u*3],s.positions[c*3+1]=e[u*3+1],s.positions[c*3+2]=e[u*3+2],h(s.uv0s)&&(s.uv0s[c*2]=a[u*2],s.uv0s[c*2+1]=a[u*2+1]),h(s.colors)&&(s.colors[c*4]=i[u*4],s.colors[c*4+1]=i[u*4+1],s.colors[c*4+2]=i[u*4+2],s.colors[c*4+3]=i[u*4+3]),h(s.featureIndex)&&(s.featureIndex[c]=r[u])}n=t.length,e=s.positions}t=new Array(n);for(let c=0;c<n;c++)t[c]=c;s.normals=new Float32Array(t.length*3);for(let c=0;c<t.length;c+=3)gt(s.normals,c,t,e);return s}function Mt(n,t,e,o,a,i,r,s){if(n===0||!h(e)||e.length===0)return{buffers:[],bufferViews:[],accessors:[],meshes:[],nodes:[],nodesInScene:[]};let c=[],u=[],l=[],f=[],p=[],m=[],d={},b=[];h(t)&&(n=t.length);let{indexArray:x,transparentVertexOffset:T}=Ct(n,t,i,s.splitGeometryByColorTransparency),I=new Blob([x],{type:"application/binary"}),A=URL.createObjectURL(I),w=n,F=s.enableFeatures&&h(r)?new Float32Array(r.length):void 0,C=0;if(h(F))for(let y=0;y<r.length;++y){F[y]=r[y];let E=r[y]+1;C<E&&(C=E)}let U,R=Gt(s.symbologyData,r,x,e,o);if(h(R)){let y=new Blob([R],{type:"application/binary"});U=URL.createObjectURL(y)}let L=e.subarray(0,w*3),dt=new Blob([L],{type:"application/binary"}),pt=URL.createObjectURL(dt),D=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,Q=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY;for(let y=0;y<L.length/3;y++)D=Math.min(D,L[y*3+0]),K=Math.max(K,L[y*3+0]),Q=Math.min(Q,L[y*3+1]),Z=Math.max(Z,L[y*3+1]),J=Math.min(J,L[y*3+2]),$=Math.max($,L[y*3+2]);let N=o?o.subarray(0,w*3):void 0,q;if(h(N)){let y=new Blob([N],{type:"application/binary"});q=URL.createObjectURL(y)}let B=a?a.subarray(0,w*2):void 0,tt;if(h(B)){let y=new Blob([B],{type:"application/binary"});tt=URL.createObjectURL(y)}let G=h(i)?St(i.subarray(0,w*4)):void 0,et;if(h(G)){let y=new Blob([G],{type:"application/binary"});et=URL.createObjectURL(y)}let S=h(F)?F.subarray(0,w):void 0,nt;if(h(S)){let y=new Blob([S],{type:"application/binary"});nt=URL.createObjectURL(y)}let _=h(F)?new Float32Array(C):void 0,rt;if(h(_)){for(let E=0;E<_.length;++E)_[E]=E;let y=new Blob([_],{type:"application/binary"});rt=URL.createObjectURL(y)}let V={},j={};V.POSITION=l.length,c.push({uri:pt,byteLength:L.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:L.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:L.length/3,type:"VEC3",max:[D,Q,J],min:[K,Z,$]}),h(q)&&(V.NORMAL=l.length,c.push({uri:q,byteLength:N.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:N.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:N.length/3,type:"VEC3"})),h(tt)&&(V.TEXCOORD_0=l.length,c.push({uri:tt,byteLength:B.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:B.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:B.length/2,type:"VEC2"})),h(et)&&(V.COLOR_0=l.length,c.push({uri:et,byteLength:G.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:G.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:G.length/4,type:"VEC4"})),h(nt)&&(V._FEATURE_ID_0=l.length,c.push({uri:nt,byteLength:S.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:S.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:S.length,type:"SCALAR"}),j.EXT_mesh_features={featureIds:[{attribute:0,propertyTable:0,featureCount:C}]},b.push("EXT_mesh_features")),h(rt)&&(c.push({uri:rt,byteLength:_.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:_.byteLength,target:34963}),d.EXT_structural_metadata={schema:{id:"i3s-metadata-schema-001",name:"I3S metadata schema 001",description:"The schema for I3S metadata",version:"1.0",classes:{feature:{name:"feature",description:"Feature metadata",properties:{index:{description:"The feature index",type:"SCALAR",componentType:"FLOAT32",required:!0}}}}},propertyTables:[{name:"feature-indices-mapping",class:"feature",count:C,properties:{index:{values:u.length-1}}}]},b.push("EXT_structural_metadata")),h(U)&&(c.push({uri:U,byteLength:R.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:R.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:R.length,type:"SCALAR"}),j.CESIUM_primitive_outline={indices:l.length-1},b.push("CESIUM_primitive_outline")),c.push({uri:A,byteLength:x.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:x.byteLength,target:34963});let v=[];return T>0&&(l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j})),T<n&&(l.push({bufferView:u.length-1,byteOffset:4*T,componentType:5125,count:n-T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j,extra:{isTransparent:!0}})),f.push({primitives:v}),m.push(0),p.push({mesh:0}),{buffers:c,bufferViews:u,accessors:l,meshes:f,nodes:p,nodesInScene:m,rootExtensions:d,extensionsUsed:b}}function Pt(n,t,e,o){let a=new Uint8Array(n,0,5);return a[0]===68&&a[1]===82&&a[2]===65&&a[3]===67&&a[4]===79?jt(n,e):Ht(n,t,e,o)}function jt(n){let t=ut,e=new t.DecoderBuffer,o=new Uint8Array(n);e.Init(o,o.length);let a=new t.Decoder,i=a.GetEncodedGeometryType(e),r=new t.MetadataQuerier,s,c;i===t.TRIANGULAR_MESH&&(s=new t.Mesh,c=a.DecodeBufferToMesh(e,s));let u={vertexCount:[0],featureCount:0};if(h(c)&&c.ok()&&s.ptr!==0){let l=s.num_faces(),f=s.num_attributes(),p=s.num_points();u.indices=new Uint32Array(l*3);let m=u.indices;u.vertexCount[0]=p,u.scale_x=1,u.scale_y=1;let d=new t.DracoInt32Array(3);for(let b=0;b<l;++b)a.GetFaceFromMesh(s,b,d),m[b*3]=d.GetValue(0),m[b*3+1]=d.GetValue(1),m[b*3+2]=d.GetValue(2);t.destroy(d);for(let b=0;b<f;++b){let x=a.GetAttribute(s,b),T=kt(t,a,s,x,p),I=x.attribute_type(),A="unknown";I===t.POSITION?A="positions":I===t.NORMAL?A="normals":I===t.COLOR?A="colors":I===t.TEX_COORD&&(A="uv0s");let w=a.GetAttributeMetadata(s,b);if(w.ptr!==0){let F=r.NumEntries(w);for(let C=0;C<F;++C){let U=r.GetEntryName(w,C);U==="i3s-scale_x"?u.scale_x=r.GetDoubleEntry(w,"i3s-scale_x"):U==="i3s-scale_y"?u.scale_y=r.GetDoubleEntry(w,"i3s-scale_y"):U==="i3s-attribute-type"&&(A=r.GetStringEntry(w,"i3s-attribute-type"))}}h(u[A])&&console.log("Attribute already exists",A),u[A]=T,A==="feature-index"&&u.featureCount++}t.destroy(s)}return t.destroy(r),t.destroy(a),u}function kt(n,t,e,o,a){let i=o.num_components()*a,r,c=[function(){},function(){r=new n.DracoInt8Array(i),t.GetAttributeInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeUInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeUInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){},function(){r=new n.DracoFloat32Array(i),t.GetAttributeFloatForAllPoints(e,o,r)||console.error("Bad stream");let l=new Float32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){r=new n.DracoUInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l}][o.data_type()]();return h(r)&&n.destroy(r),c}var W={position:function(n,t,e){let o=n.vertexCount*3;return n.positions=new Float32Array(t,e,o),e+=o*4,e},normal:function(n,t,e){let o=n.vertexCount*3;return n.normals=new Float32Array(t,e,o),e+=o*4,e},uv0:function(n,t,e){let o=n.vertexCount*2;return n.uv0s=new Float32Array(t,e,o),e+=o*4,e},color:function(n,t,e){let o=n.vertexCount*4;return n.colors=new Uint8Array(t,e,o),e+=o,e},featureId:function(n,t,e){let o=n.featureCount;return e+=o*8,e},id:function(n,t,e){let o=n.featureCount;return e+=o*8,e},faceRange:function(n,t,e){let o=n.featureCount*2;return n.faceRange=new Uint32Array(t,e,o),e+=o*4,e},uvRegion:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e},region:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e}};function Ht(n,t,e,o){let a={vertexCount:0},i=new DataView(n);try{let r=0;if(a.vertexCount=i.getUint32(r,1),r+=4,a.featureCount=i.getUint32(r,1),r+=4,h(e))for(let s=0;s<e.attributes.length;s++)h(W[e.attributes[s]])?r=W[e.attributes[s]](a,n,r):console.error("Unknown decoder for",e.attributes[s]);else{let s=t.ordering,c=t.featureAttributeOrder;h(o)&&h(o.geometryData)&&h(o.geometryData[0])&&h(o.geometryData[0].params)&&(s=Object.keys(o.geometryData[0].params.vertexAttributes),c=Object.keys(o.geometryData[0].params.featureAttributes));for(let u=0;u<s.length;u++){let l=W[s[u]];r=l(a,n,r)}for(let u=0;u<c.length;u++){let l=W[c[u]];r=l(a,n,r)}}}catch(r){console.error(r)}return a.scale_x=1,a.scale_y=1,a}function Xt(n){let t=Pt(n.binaryData,n.schema,n.bufferInfo,n.featureData);h(n.geoidDataList)&&n.geoidDataList.length>0&&Lt(t.vertexCount,t.positions,t.scale_x,t.scale_y,n.cartographicCenter,n.geoidDataList,!1),Ot(t.vertexCount,t.positions,t.normals,n.cartographicCenter,n.cartesianCenter,n.parentRotation,n.ellipsoidRadiiSquare,t.scale_x,t.scale_y),h(t.uv0s)&&h(t["uv-region"])&&Tt(t.vertexCount,t.uv0s,t["uv-region"]);let e;if(h(t["feature-index"]))e=t["feature-index"];else if(h(t.faceRange)){e=new Array(t.vertexCount);for(let r=0;r<t.faceRange.length-1;r+=2){let s=r/2,c=t.faceRange[r],u=t.faceRange[r+1];for(let l=c;l<=u;l++)e[l*3]=s,e[l*3+1]=s,e[l*3+2]=s}}if(n.calculateNormals){let r=vt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e);h(r.normals)&&(t.normals=r.normals,h(r.vertexCount)&&(t.vertexCount=r.vertexCount,t.indices=r.indices,t.positions=r.positions,t.uv0s=r.uv0s,t.colors=r.colors,e=r.featureIndex))}let o=Mt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e,n),a={positions:t.positions,indices:t.indices,featureIndex:e,sourceURL:n.url,cartesianCenter:n.cartesianCenter,parentRotation:n.parentRotation};return o._customAttributes=a,{meshData:o}}async function Yt(n,t){let e=n.webAssemblyConfig;return h(e)&&h(e.wasmBinaryFile)?ut=await(0,at.default)(e):ut=await(0,at.default)(),!0}function zt(n,t){let e=n.webAssemblyConfig;return h(e)?Yt(n,t):Xt(n,t)}var se=yt(zt);export{se as default}; diff --git a/cesium/Workers/transcodeKTX2.js b/cesium/Workers/transcodeKTX2.js index 4a181d5..1284fda 100644 --- a/cesium/Workers/transcodeKTX2.js +++ b/cesium/Workers/transcodeKTX2.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,7 +23,7 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as rn}from"./chunk-4FSMRIBR.js";import{a as M}from"./chunk-JZYZ7RT4.js";import{a as ie}from"./chunk-IRDBGNMC.js";import{a as _n}from"./chunk-42NIXFVW.js";import{b as nn}from"./chunk-5YVCOCPP.js";import{a as Gt,c as sr,d as or,e as ge}from"./chunk-U73D6PDD.js";var Rn=sr((it,pt)=>{var Nt=function(){var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(i=i||__filename),function(f){f=f||{};var r=typeof f<"u"?f:{},B,l;r.ready=new Promise(function(e,t){B=e,l=t});var p={},C;for(C in r)r.hasOwnProperty(C)&&(p[C]=r[C]);var U=[],y="./this.program",m=function(e,t){throw t},V=!1,d=!1,P=!1,Q=!1;V=typeof window=="object",d=typeof importScripts=="function",P=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Q=!V&&!P&&!d;var u="";function X(e){return r.locateFile?r.locateFile(e,u):u+e}var se,le,W,J,g,Fe;P?(d?u=Gt("path").dirname(u)+"/":u=__dirname+"/",se=function(t,n){return g||(g=Gt("fs")),Fe||(Fe=Gt("path")),t=Fe.normalize(t),g.readFileSync(t,n?null:"utf8")},W=function(t){var n=se(t,!0);return n.buffer||(n=new Uint8Array(n)),Se(n.buffer),n},process.argv.length>1&&(y=process.argv[1].replace(/\\/g,"/")),U=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof rr))throw e}),process.on("unhandledRejection",Me),m=function(e){process.exit(e)},r.inspect=function(){return"[Emscripten Module object]"}):Q?(typeof read<"u"&&(se=function(t){return read(t)}),W=function(t){var n;return typeof readbuffer=="function"?new Uint8Array(readbuffer(t)):(n=read(t,"binary"),Se(typeof n=="object"),n)},typeof scriptArgs<"u"?U=scriptArgs:typeof arguments<"u"&&(U=arguments),typeof quit=="function"&&(m=function(e){quit(e)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(V||d)&&(d?u=self.location.href:typeof document<"u"&&document.currentScript&&(u=document.currentScript.src),i&&(u=i),u.indexOf("blob:")!==0?u=u.substr(0,u.lastIndexOf("/")+1):u="",se=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(W=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),le=function(e,t,n){var _=new XMLHttpRequest;_.open("GET",e,!0),_.responseType="arraybuffer",_.onload=function(){if(_.status==200||_.status==0&&_.response){t(_.response);return}n()},_.onerror=n,_.send(null)},J=function(e){document.title=e});var st=r.print||console.log.bind(console),ee=r.printErr||console.warn.bind(console);for(C in p)p.hasOwnProperty(C)&&(r[C]=p[C]);p=null,r.arguments&&(U=r.arguments),r.thisProgram&&(y=r.thisProgram),r.quit&&(m=r.quit);var De=0,Ie=function(e){De=e},ae;r.wasmBinary&&(ae=r.wasmBinary);var ot=r.noExitRuntime||!0;typeof WebAssembly!="object"&&Me("no native wasm support detected");var ce,de=!1,be;function Se(e,t){e||Me("Assertion failed: "+t)}var we=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function He(e,t,n){for(var _=t+n,s=t;e[s]&&!(s>=_);)++s;if(s-t>16&&e.subarray&&we)return we.decode(e.subarray(t,s));for(var a="";t<s;){var c=e[t++];if(!(c&128)){a+=String.fromCharCode(c);continue}var o=e[t++]&63;if((c&224)==192){a+=String.fromCharCode((c&31)<<6|o);continue}var R=e[t++]&63;if((c&240)==224?c=(c&15)<<12|o<<6|R:c=(c&7)<<18|o<<12|R<<6|e[t++]&63,c<65536)a+=String.fromCharCode(c);else{var T=c-65536;a+=String.fromCharCode(55296|T>>10,56320|T&1023)}}return a}function Xe(e,t){return e?He(D,e,t):""}function Rt(e,t,n,_){if(!(_>0))return 0;for(var s=n,a=n+_-1,c=0;c<e.length;++c){var o=e.charCodeAt(c);if(o>=55296&&o<=57343){var R=e.charCodeAt(++c);o=65536+((o&1023)<<10)|R&1023}if(o<=127){if(n>=a)break;t[n++]=o}else if(o<=2047){if(n+1>=a)break;t[n++]=192|o>>6,t[n++]=128|o&63}else if(o<=65535){if(n+2>=a)break;t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|o&63}else{if(n+3>=a)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|o&63}}return t[n]=0,n-s}function L(e,t,n){return Rt(e,D,t,n)}function j(e){for(var t=0,n=0;n<e.length;++n){var _=e.charCodeAt(n);_>=55296&&_<=57343&&(_=65536+((_&1023)<<10)|e.charCodeAt(++n)&1023),_<=127?++t:_<=2047?t+=2:_<=65535?t+=3:t+=4}return t}var Ae=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function at(e,t){for(var n=e,_=n>>1,s=_+t/2;!(_>=s)&&Ge[_];)++_;if(n=_<<1,n-e>32&&Ae)return Ae.decode(D.subarray(e,n));for(var a="",c=0;!(c>=t/2);++c){var o=fe[e+c*2>>1];if(o==0)break;a+=String.fromCharCode(o)}return a}function xe(e,t,n){if(n===void 0&&(n=2147483647),n<2)return 0;n-=2;for(var _=t,s=n<e.length*2?n/2:e.length,a=0;a<s;++a){var c=e.charCodeAt(a);fe[t>>1]=c,t+=2}return fe[t>>1]=0,t-_}function Tn(e){return e.length*2}function un(e,t){for(var n=0,_="";!(n>=t/4);){var s=H[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var a=s-65536;_+=String.fromCharCode(55296|a>>10,56320|a&1023)}else _+=String.fromCharCode(s)}return _}function On(e,t,n){if(n===void 0&&(n=2147483647),n<4)return 0;for(var _=t,s=_+n-4,a=0;a<e.length;++a){var c=e.charCodeAt(a);if(c>=55296&&c<=57343){var o=e.charCodeAt(++a);c=65536+((c&1023)<<10)|o&1023}if(H[t>>2]=c,t+=4,t+4>s)break}return H[t>>2]=0,t-_}function ln(e){for(var t=0,n=0;n<e.length;++n){var _=e.charCodeAt(n);_>=55296&&_<=57343&&++n,t+=4}return t}function Mn(e,t){return e%t>0&&(e+=t-e%t),e}var ct,ke,D,fe,Ge,H,Y,Pt,Et;function vt(e){ct=e,r.HEAP8=ke=new Int8Array(e),r.HEAP16=fe=new Int16Array(e),r.HEAP32=H=new Int32Array(e),r.HEAPU8=D=new Uint8Array(e),r.HEAPU16=Ge=new Uint16Array(e),r.HEAPU32=Y=new Uint32Array(e),r.HEAPF32=Pt=new Float32Array(e),r.HEAPF64=Et=new Float64Array(e)}var ur=r.INITIAL_MEMORY||16777216,Ve,ht=[],Ut=[],Kn=[],yt=[],Bn=!1;function Cn(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Gn(r.preRun.shift());$e(ht)}function Fn(){Bn=!0,$e(Ut)}function dn(){$e(Kn)}function Sn(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Nn(r.postRun.shift());$e(yt)}function Gn(e){ht.unshift(e)}function Vn(e){Ut.unshift(e)}function Nn(e){yt.unshift(e)}var Te=0,At=null,Ne=null;function pn(e){Te++,r.monitorRunDependencies&&r.monitorRunDependencies(Te)}function Pn(e){if(Te--,r.monitorRunDependencies&&r.monitorRunDependencies(Te),Te==0&&(At!==null&&(clearInterval(At),At=null),Ne)){var t=Ne;Ne=null,t()}}r.preloadedImages={},r.preloadedAudios={};function Me(e){r.onAbort&&r.onAbort(e),e+="",ee(e),de=!0,be=1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw l(t),t}function gt(e,t){return String.prototype.startsWith?e.startsWith(t):e.indexOf(t)===0}var En="data:application/octet-stream;base64,";function Lt(e){return gt(e,En)}var vn="file://";function mt(e){return gt(e,vn)}var x="basis_transcoder.wasm";Lt(x)||(x=X(x));function Dt(e){try{if(e==x&&ae)return new Uint8Array(ae);if(W)return W(e);throw"both async and sync fetching of the wasm failed"}catch(t){Me(t)}}function hn(){if(!ae&&(V||d)){if(typeof fetch=="function"&&!mt(x))return fetch(x,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+x+"'";return e.arrayBuffer()}).catch(function(){return Dt(x)});if(le)return new Promise(function(e,t){le(x,function(n){e(new Uint8Array(n))},t)})}return Promise.resolve().then(function(){return Dt(x)})}function Un(){var e={a:er};function t(c,o){var R=c.exports;r.asm=R,ce=r.asm.K,vt(ce.buffer),Ve=r.asm.O,Vn(r.asm.L),Pn("wasm-instantiate")}pn("wasm-instantiate");function n(c){t(c.instance)}function _(c){return hn().then(function(o){var R=WebAssembly.instantiate(o,e);return R}).then(c,function(o){ee("failed to asynchronously prepare wasm: "+o),Me(o)})}function s(){return!ae&&typeof WebAssembly.instantiateStreaming=="function"&&!Lt(x)&&!mt(x)&&typeof fetch=="function"?fetch(x,{credentials:"same-origin"}).then(function(c){var o=WebAssembly.instantiateStreaming(c,e);return o.then(n,function(R){return ee("wasm streaming compile failed: "+R),ee("falling back to ArrayBuffer instantiation"),_(n)})}):_(n)}if(r.instantiateWasm)try{var a=r.instantiateWasm(e,t);return a}catch(c){return ee("Module.instantiateWasm callback failed with error: "+c),!1}return s().catch(l),{}}function $e(e){for(;e.length>0;){var t=e.shift();if(typeof t=="function"){t(r);continue}var n=t.func;typeof n=="number"?t.arg===void 0?Ve.get(n)():Ve.get(n)(t.arg):n(t.arg===void 0?null:t.arg)}}var We={};function je(e){for(;e.length;){var t=e.pop(),n=e.pop();n(t)}}function pe(e){return this.fromWireType(Y[e>>2])}var Ke={},ue={},ze={},yn=48,gn=57;function Ye(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=yn&&t<=gn?"_"+e:e}function qe(e,t){return e=Ye(e),new Function("body","return function "+e+`() { +import{a as rn}from"./chunk-PXCJYT2S.js";import{a as M}from"./chunk-3C7WC463.js";import{a as ie}from"./chunk-II4VNKYR.js";import{a as _n}from"./chunk-IUA6FAOZ.js";import{b as nn}from"./chunk-UH2WFNTA.js";import{a as Gt,c as sr,d as or,e as ge}from"./chunk-PEYJTJPE.js";var Rn=sr((it,pt)=>{var Nt=function(){var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(i=i||__filename),function(f){f=f||{};var r=typeof f<"u"?f:{},B,l;r.ready=new Promise(function(e,t){B=e,l=t});var p={},C;for(C in r)r.hasOwnProperty(C)&&(p[C]=r[C]);var U=[],y="./this.program",m=function(e,t){throw t},V=!1,d=!1,P=!1,Q=!1;V=typeof window=="object",d=typeof importScripts=="function",P=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Q=!V&&!P&&!d;var u="";function X(e){return r.locateFile?r.locateFile(e,u):u+e}var se,le,W,J,g,Fe;P?(d?u=Gt("path").dirname(u)+"/":u=__dirname+"/",se=function(t,n){return g||(g=Gt("fs")),Fe||(Fe=Gt("path")),t=Fe.normalize(t),g.readFileSync(t,n?null:"utf8")},W=function(t){var n=se(t,!0);return n.buffer||(n=new Uint8Array(n)),Se(n.buffer),n},process.argv.length>1&&(y=process.argv[1].replace(/\\/g,"/")),U=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof rr))throw e}),process.on("unhandledRejection",Me),m=function(e){process.exit(e)},r.inspect=function(){return"[Emscripten Module object]"}):Q?(typeof read<"u"&&(se=function(t){return read(t)}),W=function(t){var n;return typeof readbuffer=="function"?new Uint8Array(readbuffer(t)):(n=read(t,"binary"),Se(typeof n=="object"),n)},typeof scriptArgs<"u"?U=scriptArgs:typeof arguments<"u"&&(U=arguments),typeof quit=="function"&&(m=function(e){quit(e)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(V||d)&&(d?u=self.location.href:typeof document<"u"&&document.currentScript&&(u=document.currentScript.src),i&&(u=i),u.indexOf("blob:")!==0?u=u.substr(0,u.lastIndexOf("/")+1):u="",se=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(W=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),le=function(e,t,n){var _=new XMLHttpRequest;_.open("GET",e,!0),_.responseType="arraybuffer",_.onload=function(){if(_.status==200||_.status==0&&_.response){t(_.response);return}n()},_.onerror=n,_.send(null)},J=function(e){document.title=e});var st=r.print||console.log.bind(console),ee=r.printErr||console.warn.bind(console);for(C in p)p.hasOwnProperty(C)&&(r[C]=p[C]);p=null,r.arguments&&(U=r.arguments),r.thisProgram&&(y=r.thisProgram),r.quit&&(m=r.quit);var De=0,Ie=function(e){De=e},ae;r.wasmBinary&&(ae=r.wasmBinary);var ot=r.noExitRuntime||!0;typeof WebAssembly!="object"&&Me("no native wasm support detected");var ce,de=!1,be;function Se(e,t){e||Me("Assertion failed: "+t)}var we=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function He(e,t,n){for(var _=t+n,s=t;e[s]&&!(s>=_);)++s;if(s-t>16&&e.subarray&&we)return we.decode(e.subarray(t,s));for(var a="";t<s;){var c=e[t++];if(!(c&128)){a+=String.fromCharCode(c);continue}var o=e[t++]&63;if((c&224)==192){a+=String.fromCharCode((c&31)<<6|o);continue}var R=e[t++]&63;if((c&240)==224?c=(c&15)<<12|o<<6|R:c=(c&7)<<18|o<<12|R<<6|e[t++]&63,c<65536)a+=String.fromCharCode(c);else{var T=c-65536;a+=String.fromCharCode(55296|T>>10,56320|T&1023)}}return a}function Xe(e,t){return e?He(D,e,t):""}function Rt(e,t,n,_){if(!(_>0))return 0;for(var s=n,a=n+_-1,c=0;c<e.length;++c){var o=e.charCodeAt(c);if(o>=55296&&o<=57343){var R=e.charCodeAt(++c);o=65536+((o&1023)<<10)|R&1023}if(o<=127){if(n>=a)break;t[n++]=o}else if(o<=2047){if(n+1>=a)break;t[n++]=192|o>>6,t[n++]=128|o&63}else if(o<=65535){if(n+2>=a)break;t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|o&63}else{if(n+3>=a)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|o&63}}return t[n]=0,n-s}function L(e,t,n){return Rt(e,D,t,n)}function j(e){for(var t=0,n=0;n<e.length;++n){var _=e.charCodeAt(n);_>=55296&&_<=57343&&(_=65536+((_&1023)<<10)|e.charCodeAt(++n)&1023),_<=127?++t:_<=2047?t+=2:_<=65535?t+=3:t+=4}return t}var Ae=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function at(e,t){for(var n=e,_=n>>1,s=_+t/2;!(_>=s)&&Ge[_];)++_;if(n=_<<1,n-e>32&&Ae)return Ae.decode(D.subarray(e,n));for(var a="",c=0;!(c>=t/2);++c){var o=fe[e+c*2>>1];if(o==0)break;a+=String.fromCharCode(o)}return a}function xe(e,t,n){if(n===void 0&&(n=2147483647),n<2)return 0;n-=2;for(var _=t,s=n<e.length*2?n/2:e.length,a=0;a<s;++a){var c=e.charCodeAt(a);fe[t>>1]=c,t+=2}return fe[t>>1]=0,t-_}function Tn(e){return e.length*2}function un(e,t){for(var n=0,_="";!(n>=t/4);){var s=H[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var a=s-65536;_+=String.fromCharCode(55296|a>>10,56320|a&1023)}else _+=String.fromCharCode(s)}return _}function On(e,t,n){if(n===void 0&&(n=2147483647),n<4)return 0;for(var _=t,s=_+n-4,a=0;a<e.length;++a){var c=e.charCodeAt(a);if(c>=55296&&c<=57343){var o=e.charCodeAt(++a);c=65536+((c&1023)<<10)|o&1023}if(H[t>>2]=c,t+=4,t+4>s)break}return H[t>>2]=0,t-_}function ln(e){for(var t=0,n=0;n<e.length;++n){var _=e.charCodeAt(n);_>=55296&&_<=57343&&++n,t+=4}return t}function Mn(e,t){return e%t>0&&(e+=t-e%t),e}var ct,ke,D,fe,Ge,H,Y,Pt,Et;function vt(e){ct=e,r.HEAP8=ke=new Int8Array(e),r.HEAP16=fe=new Int16Array(e),r.HEAP32=H=new Int32Array(e),r.HEAPU8=D=new Uint8Array(e),r.HEAPU16=Ge=new Uint16Array(e),r.HEAPU32=Y=new Uint32Array(e),r.HEAPF32=Pt=new Float32Array(e),r.HEAPF64=Et=new Float64Array(e)}var ur=r.INITIAL_MEMORY||16777216,Ve,ht=[],Ut=[],Kn=[],yt=[],Bn=!1;function Cn(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Gn(r.preRun.shift());$e(ht)}function Fn(){Bn=!0,$e(Ut)}function dn(){$e(Kn)}function Sn(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Nn(r.postRun.shift());$e(yt)}function Gn(e){ht.unshift(e)}function Vn(e){Ut.unshift(e)}function Nn(e){yt.unshift(e)}var Te=0,At=null,Ne=null;function pn(e){Te++,r.monitorRunDependencies&&r.monitorRunDependencies(Te)}function Pn(e){if(Te--,r.monitorRunDependencies&&r.monitorRunDependencies(Te),Te==0&&(At!==null&&(clearInterval(At),At=null),Ne)){var t=Ne;Ne=null,t()}}r.preloadedImages={},r.preloadedAudios={};function Me(e){r.onAbort&&r.onAbort(e),e+="",ee(e),de=!0,be=1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw l(t),t}function gt(e,t){return String.prototype.startsWith?e.startsWith(t):e.indexOf(t)===0}var En="data:application/octet-stream;base64,";function Lt(e){return gt(e,En)}var vn="file://";function mt(e){return gt(e,vn)}var x="basis_transcoder.wasm";Lt(x)||(x=X(x));function Dt(e){try{if(e==x&&ae)return new Uint8Array(ae);if(W)return W(e);throw"both async and sync fetching of the wasm failed"}catch(t){Me(t)}}function hn(){if(!ae&&(V||d)){if(typeof fetch=="function"&&!mt(x))return fetch(x,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+x+"'";return e.arrayBuffer()}).catch(function(){return Dt(x)});if(le)return new Promise(function(e,t){le(x,function(n){e(new Uint8Array(n))},t)})}return Promise.resolve().then(function(){return Dt(x)})}function Un(){var e={a:er};function t(c,o){var R=c.exports;r.asm=R,ce=r.asm.K,vt(ce.buffer),Ve=r.asm.O,Vn(r.asm.L),Pn("wasm-instantiate")}pn("wasm-instantiate");function n(c){t(c.instance)}function _(c){return hn().then(function(o){var R=WebAssembly.instantiate(o,e);return R}).then(c,function(o){ee("failed to asynchronously prepare wasm: "+o),Me(o)})}function s(){return!ae&&typeof WebAssembly.instantiateStreaming=="function"&&!Lt(x)&&!mt(x)&&typeof fetch=="function"?fetch(x,{credentials:"same-origin"}).then(function(c){var o=WebAssembly.instantiateStreaming(c,e);return o.then(n,function(R){return ee("wasm streaming compile failed: "+R),ee("falling back to ArrayBuffer instantiation"),_(n)})}):_(n)}if(r.instantiateWasm)try{var a=r.instantiateWasm(e,t);return a}catch(c){return ee("Module.instantiateWasm callback failed with error: "+c),!1}return s().catch(l),{}}function $e(e){for(;e.length>0;){var t=e.shift();if(typeof t=="function"){t(r);continue}var n=t.func;typeof n=="number"?t.arg===void 0?Ve.get(n)():Ve.get(n)(t.arg):n(t.arg===void 0?null:t.arg)}}var We={};function je(e){for(;e.length;){var t=e.pop(),n=e.pop();n(t)}}function pe(e){return this.fromWireType(Y[e>>2])}var Ke={},ue={},ze={},yn=48,gn=57;function Ye(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=yn&&t<=gn?"_"+e:e}function qe(e,t){return e=Ye(e),new Function("body","return function "+e+`() { "use strict"; return body.apply(this, arguments); }; `)(t)}function ft(e,t){var n=qe(t,function(_){this.name=t,this.message=_;var s=new Error(_).stack;s!==void 0&&(this.stack=this.toString()+` diff --git a/cesium/Workers/transferTypedArrayTest.js b/cesium/Workers/transferTypedArrayTest.js index eb7bf8a..8477b4f 100644 --- a/cesium/Workers/transferTypedArrayTest.js +++ b/cesium/Workers/transferTypedArrayTest.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * diff --git a/cesium/Workers/upsampleQuantizedTerrainMesh.js b/cesium/Workers/upsampleQuantizedTerrainMesh.js index e38d0a0..458c66d 100644 --- a/cesium/Workers/upsampleQuantizedTerrainMesh.js +++ b/cesium/Workers/upsampleQuantizedTerrainMesh.js @@ -1,7 +1,7 @@ /** * @license * Cesium - https://github.com/CesiumGS/cesium - * Version 1.118.1 + * Version 1.119 * * Copyright 2011-2022 Cesium Contributors * @@ -23,4 +23,4 @@ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ -import{a as be,b as Ne}from"./chunk-XXATY55N.js";import{a as Ae}from"./chunk-4FSMRIBR.js";import{a as ue}from"./chunk-K62YE2WO.js";import{a as ee}from"./chunk-ED2EM7ZX.js";import"./chunk-TLL4Q2KI.js";import"./chunk-4IWHN7T4.js";import"./chunk-PT2EMSIG.js";import"./chunk-REUYHR24.js";import{a as Ve}from"./chunk-RQXB4B4V.js";import{d as de}from"./chunk-3FEM743H.js";import{h as Se}from"./chunk-CMXCDAKR.js";import"./chunk-77ESX6BV.js";import{a as A,b as Ie,c as Z,d as Ce}from"./chunk-LJCGAQ64.js";import{a as N}from"./chunk-JFG572S7.js";import"./chunk-JZYZ7RT4.js";import"./chunk-IRDBGNMC.js";import"./chunk-42NIXFVW.js";import{a as V,b as q}from"./chunk-5YVCOCPP.js";import{e as f}from"./chunk-U73D6PDD.js";var ne={};ne.clipTriangleAtAxisAlignedThreshold=function(n,h,o,i,s,e){if(!f(n))throw new V("threshold is required.");if(!f(h))throw new V("keepAbove is required.");if(!f(o))throw new V("u0 is required.");if(!f(i))throw new V("u1 is required.");if(!f(s))throw new V("u2 is required.");f(e)?e.length=0:e=[];let g,w,c;h?(g=o<n,w=i<n,c=s<n):(g=o>n,w=i>n,c=s>n);let p=g+w+c,d,u,r,l,I,C;return p===1?g?(d=(n-o)/(i-o),u=(n-o)/(s-o),e.push(1),e.push(2),u!==1&&(e.push(-1),e.push(0),e.push(2),e.push(u)),d!==1&&(e.push(-1),e.push(0),e.push(1),e.push(d))):w?(r=(n-i)/(s-i),l=(n-i)/(o-i),e.push(2),e.push(0),l!==1&&(e.push(-1),e.push(1),e.push(0),e.push(l)),r!==1&&(e.push(-1),e.push(1),e.push(2),e.push(r))):c&&(I=(n-s)/(o-s),C=(n-s)/(i-s),e.push(0),e.push(1),C!==1&&(e.push(-1),e.push(2),e.push(1),e.push(C)),I!==1&&(e.push(-1),e.push(2),e.push(0),e.push(I))):p===2?!g&&o!==n?(l=(n-i)/(o-i),I=(n-s)/(o-s),e.push(0),e.push(-1),e.push(1),e.push(0),e.push(l),e.push(-1),e.push(2),e.push(0),e.push(I)):!w&&i!==n?(C=(n-s)/(i-s),d=(n-o)/(i-o),e.push(1),e.push(-1),e.push(2),e.push(1),e.push(C),e.push(-1),e.push(0),e.push(1),e.push(d)):!c&&s!==n&&(u=(n-o)/(s-o),r=(n-i)/(s-i),e.push(2),e.push(-1),e.push(0),e.push(2),e.push(u),e.push(-1),e.push(1),e.push(2),e.push(r)):p!==3&&(e.push(0),e.push(1),e.push(2)),e};ne.computeBarycentricCoordinates=function(n,h,o,i,s,e,g,w,c){if(!f(n))throw new V("x is required.");if(!f(h))throw new V("y is required.");if(!f(o))throw new V("x1 is required.");if(!f(i))throw new V("y1 is required.");if(!f(s))throw new V("x2 is required.");if(!f(e))throw new V("y2 is required.");if(!f(g))throw new V("x3 is required.");if(!f(w))throw new V("y3 is required.");let p=o-g,d=g-s,u=e-w,r=i-w,l=1/(u*p+d*r),I=h-w,C=n-g,R=(u*C+d*I)*l,O=(-r*C+p*I)*l,W=1-R-O;return f(c)?(c.x=R,c.y=O,c.z=W,c):new A(R,O,W)};ne.computeLineSegmentLineSegmentIntersection=function(n,h,o,i,s,e,g,w,c){q.typeOf.number("x00",n),q.typeOf.number("y00",h),q.typeOf.number("x01",o),q.typeOf.number("y01",i),q.typeOf.number("x10",s),q.typeOf.number("y10",e),q.typeOf.number("x11",g),q.typeOf.number("y11",w);let p=(g-s)*(h-e)-(w-e)*(n-s),d=(o-n)*(h-e)-(i-h)*(n-s),u=(w-e)*(o-n)-(g-s)*(i-h);if(u===0)return;let r=p/u,l=d/u;if(r>=0&&r<=1&&l>=0&&l<=1)return f(c)||(c=new Z),c.x=n+r*(o-n),c.y=h+r*(i-h),c};var ie=ne;var a=32767,z=a/2|0,Me=[],ze=[],Xe=[],te=new Ie,E=new A,Ke=[],We=[],Ye=[],Le=[],_e=[],Je=new A,Qe=new de,Ze=new ue,Ge=new Z,$e=new A;function je(n,h){let o=n.isEastChild,i=n.isNorthChild,s=o?z:0,e=o?a:z,g=i?z:0,w=i?a:z,c=Ke,p=We,d=Ye,u=_e;c.length=0,p.length=0,d.length=0,u.length=0;let r=Le;r.length=0;let l={},I=n.vertices,C=n.indices;C=C.subarray(0,n.indexCountWithoutSkirts);let R=Ne.clone(n.encoding),O=R.hasVertexNormals,W=0,Y=n.vertexCountWithoutSkirts,se=n.minimumHeight,ae=n.maximumHeight,D=new Array(Y),G=new Array(Y),L=new Array(Y),F=O?new Array(Y*2):void 0,$=20,H,t,k,x,y;for(t=0,k=0;t<Y;++t,k+=2){let v=R.decodeTextureCoordinates(I,t,Ge);if(H=R.decodeHeight(I,t),x=N.clamp(v.x*a|0,0,a),y=N.clamp(v.y*a|0,0,a),L[t]=N.clamp((H-se)/(ae-se)*a|0,0,a),x<$&&(x=0),y<$&&(y=0),a-x<$&&(x=a),a-y<$&&(y=a),D[t]=x,G[t]=y,O){let Q=R.getOctEncodedNormal(I,t,$e);F[k]=Q.x,F[k+1]=Q.y}(o&&x>=z||!o&&x<=z)&&(i&&y>=z||!i&&y<=z)&&(l[t]=W,c.push(x),p.push(y),d.push(L[t]),O&&(u.push(F[k]),u.push(F[k+1])),++W)}let T=[];T.push(new m),T.push(new m),T.push(new m);let B=[];B.push(new m),B.push(new m),B.push(new m);let b,j;for(t=0;t<C.length;t+=3){let v=C[t],Q=C[t+1],Be=C[t+2],De=D[v],Fe=D[Q],ke=D[Be];T[0].initializeIndexed(D,G,L,F,v),T[1].initializeIndexed(D,G,L,F,Q),T[2].initializeIndexed(D,G,L,F,Be);let P=ie.clipTriangleAtAxisAlignedThreshold(z,o,De,Fe,ke,Me);b=0,!(b>=P.length)&&(b=B[0].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[1].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O),b<P.length&&(B[2].clone(B[1]),B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O)))))}let He=o?-a:0,qe=i?-a:0,me=[],ge=[],le=[],we=[],U=Number.MAX_VALUE,_=-U,M=Xe;M.length=0;let re=Ce.clone(n.ellipsoid),J=Se.clone(n.childRectangle),Ee=J.north,Re=J.south,ce=J.east,xe=J.west;for(ce<xe&&(ce+=N.TWO_PI),t=0;t<c.length;++t)x=Math.round(c[t]),x<=s?(me.push(t),x=0):x>=e?(le.push(t),x=a):x=x*2+He,c[t]=x,y=Math.round(p[t]),y<=g?(ge.push(t),y=0):y>=w?(we.push(t),y=a):y=y*2+qe,p[t]=y,H=N.lerp(se,ae,d[t]/a),H<U&&(U=H),H>_&&(_=H),d[t]=H,te.longitude=N.lerp(xe,ce,x/a),te.latitude=N.lerp(Re,Ee,y/a),te.height=H,re.cartographicToCartesian(te,E),M.push(E.x),M.push(E.y),M.push(E.z);let he=de.fromVertices(M,A.ZERO,3,Qe),Ue=ue.fromRectangle(J,U,_,re,Ze),ve=new be(re).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(he.center,M,3,he.center,U,Je),Pe=_-U,X=new Uint16Array(c.length+p.length+d.length);for(t=0;t<c.length;++t)X[t]=c[t];let fe=c.length;for(t=0;t<p.length;++t)X[fe+t]=p[t];for(fe+=p.length,t=0;t<d.length;++t)X[fe+t]=a*(d[t]-U)/Pe;let pe=Ve.createTypedArray(c.length,r),ye;if(O){let v=new Uint8Array(u);h.push(X.buffer,pe.buffer,v.buffer),ye=v.buffer}else h.push(X.buffer,pe.buffer);return{vertices:X.buffer,encodedNormals:ye,indices:pe.buffer,minimumHeight:U,maximumHeight:_,westIndices:me,southIndices:ge,eastIndices:le,northIndices:we,boundingSphere:he,orientedBoundingBox:Ue,horizonOcclusionPoint:ve}}function m(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}m.prototype.clone=function(n){return f(n)||(n=new m),n.uBuffer=this.uBuffer,n.vBuffer=this.vBuffer,n.heightBuffer=this.heightBuffer,n.normalBuffer=this.normalBuffer,n.index=this.index,n.first=this.first,n.second=this.second,n.ratio=this.ratio,n};m.prototype.initializeIndexed=function(n,h,o,i,s){this.uBuffer=n,this.vBuffer=h,this.heightBuffer=o,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0};m.prototype.initializeFromClipResult=function(n,h,o){let i=h+1;return n[h]!==-1?o[n[h]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=o[n[i]],++i,this.second=o[n[i]],++i,this.ratio=n[i],++i),i};m.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})};m.prototype.isIndexed=function(){return f(this.index)};m.prototype.getH=function(){return f(this.index)?this.heightBuffer[this.index]:N.lerp(this.first.getH(),this.second.getH(),this.ratio)};m.prototype.getU=function(){return f(this.index)?this.uBuffer[this.index]:N.lerp(this.first.getU(),this.second.getU(),this.ratio)};m.prototype.getV=function(){return f(this.index)?this.vBuffer[this.index]:N.lerp(this.first.getV(),this.second.getV(),this.ratio)};var K=new Z,oe=-1,en=[new A,new A],nn=[new A,new A];function Te(n,h){++oe;let o=en[oe],i=nn[oe];return o=ee.octDecode(n.first.getNormalX(),n.first.getNormalY(),o),i=ee.octDecode(n.second.getNormalX(),n.second.getNormalY(),i),E=A.lerp(o,i,n.ratio,E),A.normalize(E,E),ee.octEncode(E,h),--oe,h}m.prototype.getNormalX=function(){return f(this.index)?this.normalBuffer[this.index*2]:(K=Te(this,K),K.x)};m.prototype.getNormalY=function(){return f(this.index)?this.normalBuffer[this.index*2+1]:(K=Te(this,K),K.y)};var S=[];S.push(new m);S.push(new m);S.push(new m);S.push(new m);function Oe(n,h,o,i,s,e,g,w,c){if(g.length===0)return;let p=0,d=0;for(;d<g.length;)d=S[p++].initializeFromClipResult(g,d,w);for(let u=0;u<p;++u){let r=S[u];if(r.isIndexed())r.newIndex=e[r.index],r.uBuffer=n,r.vBuffer=h,r.heightBuffer=o,c&&(r.normalBuffer=i);else{let l=r.getKey();if(f(e[l]))r.newIndex=e[l];else{let I=n.length;n.push(r.getU()),h.push(r.getV()),o.push(r.getH()),c&&(i.push(r.getNormalX()),i.push(r.getNormalY())),r.newIndex=I,e[l]=I}}}p===3?(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex)):p===4&&(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex),s.push(S[0].newIndex),s.push(S[2].newIndex),s.push(S[3].newIndex))}var An=Ae(je);export{An as default}; +import{a as be,b as Ne}from"./chunk-CV7DLCWG.js";import{a as Ae}from"./chunk-PXCJYT2S.js";import{a as ue}from"./chunk-Q6L7X3LP.js";import{a as ee}from"./chunk-ABGXSJNX.js";import"./chunk-KF5NF354.js";import"./chunk-4WRMLZA7.js";import"./chunk-TAMCUKAR.js";import"./chunk-PDMQLSBL.js";import{a as Ve}from"./chunk-P37AI2DW.js";import{d as de}from"./chunk-TMSETF7M.js";import{h as Se}from"./chunk-7Z5IIKOJ.js";import"./chunk-KZNJOCYU.js";import{a as A,b as Ie,c as Z,d as Ce}from"./chunk-POASMU2N.js";import{a as N}from"./chunk-R6KGAEF6.js";import"./chunk-3C7WC463.js";import"./chunk-II4VNKYR.js";import"./chunk-IUA6FAOZ.js";import{a as V,b as q}from"./chunk-UH2WFNTA.js";import{e as f}from"./chunk-PEYJTJPE.js";var ne={};ne.clipTriangleAtAxisAlignedThreshold=function(n,h,o,i,s,e){if(!f(n))throw new V("threshold is required.");if(!f(h))throw new V("keepAbove is required.");if(!f(o))throw new V("u0 is required.");if(!f(i))throw new V("u1 is required.");if(!f(s))throw new V("u2 is required.");f(e)?e.length=0:e=[];let g,w,c;h?(g=o<n,w=i<n,c=s<n):(g=o>n,w=i>n,c=s>n);let p=g+w+c,d,u,r,l,I,C;return p===1?g?(d=(n-o)/(i-o),u=(n-o)/(s-o),e.push(1),e.push(2),u!==1&&(e.push(-1),e.push(0),e.push(2),e.push(u)),d!==1&&(e.push(-1),e.push(0),e.push(1),e.push(d))):w?(r=(n-i)/(s-i),l=(n-i)/(o-i),e.push(2),e.push(0),l!==1&&(e.push(-1),e.push(1),e.push(0),e.push(l)),r!==1&&(e.push(-1),e.push(1),e.push(2),e.push(r))):c&&(I=(n-s)/(o-s),C=(n-s)/(i-s),e.push(0),e.push(1),C!==1&&(e.push(-1),e.push(2),e.push(1),e.push(C)),I!==1&&(e.push(-1),e.push(2),e.push(0),e.push(I))):p===2?!g&&o!==n?(l=(n-i)/(o-i),I=(n-s)/(o-s),e.push(0),e.push(-1),e.push(1),e.push(0),e.push(l),e.push(-1),e.push(2),e.push(0),e.push(I)):!w&&i!==n?(C=(n-s)/(i-s),d=(n-o)/(i-o),e.push(1),e.push(-1),e.push(2),e.push(1),e.push(C),e.push(-1),e.push(0),e.push(1),e.push(d)):!c&&s!==n&&(u=(n-o)/(s-o),r=(n-i)/(s-i),e.push(2),e.push(-1),e.push(0),e.push(2),e.push(u),e.push(-1),e.push(1),e.push(2),e.push(r)):p!==3&&(e.push(0),e.push(1),e.push(2)),e};ne.computeBarycentricCoordinates=function(n,h,o,i,s,e,g,w,c){if(!f(n))throw new V("x is required.");if(!f(h))throw new V("y is required.");if(!f(o))throw new V("x1 is required.");if(!f(i))throw new V("y1 is required.");if(!f(s))throw new V("x2 is required.");if(!f(e))throw new V("y2 is required.");if(!f(g))throw new V("x3 is required.");if(!f(w))throw new V("y3 is required.");let p=o-g,d=g-s,u=e-w,r=i-w,l=1/(u*p+d*r),I=h-w,C=n-g,R=(u*C+d*I)*l,O=(-r*C+p*I)*l,W=1-R-O;return f(c)?(c.x=R,c.y=O,c.z=W,c):new A(R,O,W)};ne.computeLineSegmentLineSegmentIntersection=function(n,h,o,i,s,e,g,w,c){q.typeOf.number("x00",n),q.typeOf.number("y00",h),q.typeOf.number("x01",o),q.typeOf.number("y01",i),q.typeOf.number("x10",s),q.typeOf.number("y10",e),q.typeOf.number("x11",g),q.typeOf.number("y11",w);let p=(g-s)*(h-e)-(w-e)*(n-s),d=(o-n)*(h-e)-(i-h)*(n-s),u=(w-e)*(o-n)-(g-s)*(i-h);if(u===0)return;let r=p/u,l=d/u;if(r>=0&&r<=1&&l>=0&&l<=1)return f(c)||(c=new Z),c.x=n+r*(o-n),c.y=h+r*(i-h),c};var ie=ne;var a=32767,z=a/2|0,Me=[],ze=[],Xe=[],te=new Ie,E=new A,Ke=[],We=[],Ye=[],Le=[],_e=[],Je=new A,Qe=new de,Ze=new ue,Ge=new Z,$e=new A;function je(n,h){let o=n.isEastChild,i=n.isNorthChild,s=o?z:0,e=o?a:z,g=i?z:0,w=i?a:z,c=Ke,p=We,d=Ye,u=_e;c.length=0,p.length=0,d.length=0,u.length=0;let r=Le;r.length=0;let l={},I=n.vertices,C=n.indices;C=C.subarray(0,n.indexCountWithoutSkirts);let R=Ne.clone(n.encoding),O=R.hasVertexNormals,W=0,Y=n.vertexCountWithoutSkirts,se=n.minimumHeight,ae=n.maximumHeight,D=new Array(Y),G=new Array(Y),L=new Array(Y),F=O?new Array(Y*2):void 0,$=20,H,t,k,x,y;for(t=0,k=0;t<Y;++t,k+=2){let v=R.decodeTextureCoordinates(I,t,Ge);if(H=R.decodeHeight(I,t),x=N.clamp(v.x*a|0,0,a),y=N.clamp(v.y*a|0,0,a),L[t]=N.clamp((H-se)/(ae-se)*a|0,0,a),x<$&&(x=0),y<$&&(y=0),a-x<$&&(x=a),a-y<$&&(y=a),D[t]=x,G[t]=y,O){let Q=R.getOctEncodedNormal(I,t,$e);F[k]=Q.x,F[k+1]=Q.y}(o&&x>=z||!o&&x<=z)&&(i&&y>=z||!i&&y<=z)&&(l[t]=W,c.push(x),p.push(y),d.push(L[t]),O&&(u.push(F[k]),u.push(F[k+1])),++W)}let T=[];T.push(new m),T.push(new m),T.push(new m);let B=[];B.push(new m),B.push(new m),B.push(new m);let b,j;for(t=0;t<C.length;t+=3){let v=C[t],Q=C[t+1],Be=C[t+2],De=D[v],Fe=D[Q],ke=D[Be];T[0].initializeIndexed(D,G,L,F,v),T[1].initializeIndexed(D,G,L,F,Q),T[2].initializeIndexed(D,G,L,F,Be);let P=ie.clipTriangleAtAxisAlignedThreshold(z,o,De,Fe,ke,Me);b=0,!(b>=P.length)&&(b=B[0].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[1].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O),b<P.length&&(B[2].clone(B[1]),B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O)))))}let He=o?-a:0,qe=i?-a:0,me=[],ge=[],le=[],we=[],U=Number.MAX_VALUE,_=-U,M=Xe;M.length=0;let re=Ce.clone(n.ellipsoid),J=Se.clone(n.childRectangle),Ee=J.north,Re=J.south,ce=J.east,xe=J.west;for(ce<xe&&(ce+=N.TWO_PI),t=0;t<c.length;++t)x=Math.round(c[t]),x<=s?(me.push(t),x=0):x>=e?(le.push(t),x=a):x=x*2+He,c[t]=x,y=Math.round(p[t]),y<=g?(ge.push(t),y=0):y>=w?(we.push(t),y=a):y=y*2+qe,p[t]=y,H=N.lerp(se,ae,d[t]/a),H<U&&(U=H),H>_&&(_=H),d[t]=H,te.longitude=N.lerp(xe,ce,x/a),te.latitude=N.lerp(Re,Ee,y/a),te.height=H,re.cartographicToCartesian(te,E),M.push(E.x),M.push(E.y),M.push(E.z);let he=de.fromVertices(M,A.ZERO,3,Qe),Ue=ue.fromRectangle(J,U,_,re,Ze),ve=new be(re).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(he.center,M,3,he.center,U,Je),Pe=_-U,X=new Uint16Array(c.length+p.length+d.length);for(t=0;t<c.length;++t)X[t]=c[t];let fe=c.length;for(t=0;t<p.length;++t)X[fe+t]=p[t];for(fe+=p.length,t=0;t<d.length;++t)X[fe+t]=a*(d[t]-U)/Pe;let pe=Ve.createTypedArray(c.length,r),ye;if(O){let v=new Uint8Array(u);h.push(X.buffer,pe.buffer,v.buffer),ye=v.buffer}else h.push(X.buffer,pe.buffer);return{vertices:X.buffer,encodedNormals:ye,indices:pe.buffer,minimumHeight:U,maximumHeight:_,westIndices:me,southIndices:ge,eastIndices:le,northIndices:we,boundingSphere:he,orientedBoundingBox:Ue,horizonOcclusionPoint:ve}}function m(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}m.prototype.clone=function(n){return f(n)||(n=new m),n.uBuffer=this.uBuffer,n.vBuffer=this.vBuffer,n.heightBuffer=this.heightBuffer,n.normalBuffer=this.normalBuffer,n.index=this.index,n.first=this.first,n.second=this.second,n.ratio=this.ratio,n};m.prototype.initializeIndexed=function(n,h,o,i,s){this.uBuffer=n,this.vBuffer=h,this.heightBuffer=o,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0};m.prototype.initializeFromClipResult=function(n,h,o){let i=h+1;return n[h]!==-1?o[n[h]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=o[n[i]],++i,this.second=o[n[i]],++i,this.ratio=n[i],++i),i};m.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})};m.prototype.isIndexed=function(){return f(this.index)};m.prototype.getH=function(){return f(this.index)?this.heightBuffer[this.index]:N.lerp(this.first.getH(),this.second.getH(),this.ratio)};m.prototype.getU=function(){return f(this.index)?this.uBuffer[this.index]:N.lerp(this.first.getU(),this.second.getU(),this.ratio)};m.prototype.getV=function(){return f(this.index)?this.vBuffer[this.index]:N.lerp(this.first.getV(),this.second.getV(),this.ratio)};var K=new Z,oe=-1,en=[new A,new A],nn=[new A,new A];function Te(n,h){++oe;let o=en[oe],i=nn[oe];return o=ee.octDecode(n.first.getNormalX(),n.first.getNormalY(),o),i=ee.octDecode(n.second.getNormalX(),n.second.getNormalY(),i),E=A.lerp(o,i,n.ratio,E),A.normalize(E,E),ee.octEncode(E,h),--oe,h}m.prototype.getNormalX=function(){return f(this.index)?this.normalBuffer[this.index*2]:(K=Te(this,K),K.x)};m.prototype.getNormalY=function(){return f(this.index)?this.normalBuffer[this.index*2+1]:(K=Te(this,K),K.y)};var S=[];S.push(new m);S.push(new m);S.push(new m);S.push(new m);function Oe(n,h,o,i,s,e,g,w,c){if(g.length===0)return;let p=0,d=0;for(;d<g.length;)d=S[p++].initializeFromClipResult(g,d,w);for(let u=0;u<p;++u){let r=S[u];if(r.isIndexed())r.newIndex=e[r.index],r.uBuffer=n,r.vBuffer=h,r.heightBuffer=o,c&&(r.normalBuffer=i);else{let l=r.getKey();if(f(e[l]))r.newIndex=e[l];else{let I=n.length;n.push(r.getU()),h.push(r.getV()),o.push(r.getH()),c&&(i.push(r.getNormalX()),i.push(r.getNormalY())),r.newIndex=I,e[l]=I}}}p===3?(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex)):p===4&&(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex),s.push(S[0].newIndex),s.push(S[2].newIndex),s.push(S[3].newIndex))}var An=Ae(je);export{An as default};